index.vue 90 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116
  1. <template>
  2. <div class="app-container">
  3. <div class="operation">
  4. <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" style="float:left;" @click="handleCreate">{{$t('premixedPlan.xzcc')}}
  5. </el-button>
  6. <el-button v-if="isRoleEdit" class="danger" icon="el-icon-delete" style="float:left;" @click="handleReduceTrains">{{$t('premixedPlan.jscc')}}</el-button>
  7. <el-button v-if="isRoleEdit && ischeck" class="danger" style="float: left;" @click="handleCheck">{{$t('premixedPlan.jy')}} </el-button>
  8. <el-button v-else-if="isRoleEdit && !ischeck" class="success" style="float: left;" @click="handleCheck">{{$t('premixedPlan.jy')}} </el-button>
  9. <el-button v-if="isRoleEdit" class="success" icon="el-icon-download" style="float:left;" @click="handleAutomaticGeneration">{{$t('premixedPlan.zdsc')}} </el-button>
  10. <el-button v-if="isOrder && isRoleEdit" icon="el-icon-sort" style="float: left;" class="success" @click="handleChangeOrder">{{$t('formulationEvaluation.ggsx')}}</el-button>
  11. <div v-else style="float: left;margin-left: 10px;">
  12. <el-button v-if="isRoleEdit" icon="el-icon-folder-checked" class="success" @click="saveChangeOrder">{{$t('premixedPlan.save')}} </el-button>
  13. <el-button v-if="isRoleEdit" icon="el-icon-close" class="sortCancel" @click="cancelChangeOrder">{{$t('formulationEvaluation.cancel')}}</el-button>
  14. </div>
  15. <el-button v-if="isRoleEdit" class="success" icon="el-icon-open" style="float: left;" @click="handleTakeEffect"> {{$t('premixedPlan.sx')}}</el-button>
  16. <el-button v-if="isRoleEdit" class="danger" icon="el-icon-turn-off" style="float: left;" @click="handleDisable"> {{$t('premixedPlan.jy')}}</el-button>
  17. <el-button v-if="isRoleEdit" class="danger" icon="el-icon-delete" style="float: left;" @click="handleAllEmpty"> {{$t('premixedPlan.qkyfls')}}</el-button>
  18. <el-select v-model="table.getdataListParm.parammaps.times" filterable :placeholder="$t('premixedPlan.bc')" class="filter-item" style="width: 120px;float: left;margin-left: 10px;" @change="changeFrequency">
  19. <el-option v-for="item in frequencyList" :key="item.id" :label="item.name" :value="item.id" />
  20. </el-select>
  21. <el-button class="export" icon="el-icon-time" style="float:right;" @click="handleHistoryRecord">{{$t('premixedPlan.lsjl')}}</el-button>
  22. </div>
  23. <!-- <div class="search">
  24. <el-select v-model="table.getdataListParm.parammaps.times" filterable :placeholder="$t('premixedPlan.bc')" class="filter-item" style="width: 120px;" @change="changeFrequency">
  25. <el-option v-for="item in frequencyList" :key="item.id" :label="item.name" :value="item.id" />
  26. </el-select>
  27. </div> -->
  28. <div class="table">
  29. <el-table
  30. id="table"
  31. :key="table.tableKey"
  32. ref="table"
  33. v-loading="table.listLoading"
  34. :element-loading-text="$t('common.tableMsg')"
  35. :data="table.list"
  36. border
  37. highlight-current-row
  38. style="width: 100%;"
  39. :height="height"
  40. :row-style="rowStyle"
  41. :cell-style="cellStyle"
  42. class="elTable"
  43. row-key="id"
  44. @selection-change="handleSelect"
  45. >
  46. <el-table-column type="selection" width="50" />
  47. <el-table-column :label="$t('errorAnalysis.projname')" width="50px" align="center" class-name="small-padding fixed-width" fixed="">
  48. <template slot-scope="scope">
  49. <span>{{ scope.row.sort }}</span>
  50. </template>
  51. </el-table-column>
  52. <el-table-column :label="$t('premixedPlan.tmrbh')" width="110px" align="center" class-name="small-padding fixed-width" fixed="left">
  53. <template slot-scope="scope">
  54. <span>{{ scope.row.tmrname }}</span>
  55. </template>
  56. </el-table-column>
  57. <el-table-column :label="$t('premixedPlan.ms')" width="110px" align="center">
  58. <template slot-scope="scope">
  59. <span>{{ scope.row.display }}</span>
  60. </template>
  61. </el-table-column>
  62. <el-table-column :label="$t('premixedPlan.sx')" width="70px" align="center">
  63. <template slot-scope="scope">
  64. <el-switch v-model="scope.row.sel" disabled active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
  65. </template>
  66. </el-table-column>
  67. <el-table-column :label="$t('errorAnalysis.isTrainNumber')" width="65px" align="center">
  68. <template slot-scope="scope">
  69. <span>{{ scope.row.timesstr }}</span>
  70. </template>
  71. </el-table-column>
  72. <el-table-column :label="$t('premixedPlan.time')" width="55px" align="center">
  73. <template slot-scope="scope">
  74. <span>{{ scope.row.begintime }}</span>
  75. </template>
  76. </el-table-column>
  77. <el-table-column :label="$t('premixedPlan.zdzl')" width="75px" align="center">
  78. <template slot-scope="scope">
  79. <span>{{ scope.row.maxweight }}</span>
  80. </template>
  81. </el-table-column>
  82. <el-table-column :label="$t('premixedPlan.hjzl')" width="80px" align="center">
  83. <template slot-scope="scope">
  84. <span>{{ scope.row.sumweight }}</span>
  85. </template>
  86. </el-table-column>
  87. <el-table-column :label="$t('premixedPlan.pfmb')" width="90px" align="center">
  88. <template slot-scope="scope">
  89. <span>{{ scope.row.ftname }}</span>
  90. </template>
  91. </el-table-column>
  92. <el-table-column :label="$t('premixedPlan.wlxq')" width="90px" align="center">
  93. <template slot-scope="scope">
  94. <el-popover
  95. placement="bottom"
  96. width="400"
  97. trigger="click">
  98. <b style="text-align: center;width:100%;display:inline-block;">{{$t('premixedPlan.wlxq')}}</b>
  99. <el-table :data="materialdetailsList" border height="200">
  100. <el-table-column min-width="150" property="fname" :label="$t('premixedPlan.wl')" />
  101. <el-table-column min-width="100" property="fweight" :label="$t('premixedPlan.weight')" />
  102. <el-table-column min-width="100" property="scale" :label="$t('premixedPlan.zb')" />
  103. </el-table>
  104. <span slot="reference" style="color: blue;" @click="getmaterialdetailsList(scope.row)">{{$t('premixedPlan.xq')}}</span>
  105. </el-popover>
  106. </template>
  107. </el-table-column>
  108. <el-table-column v-show="isInforvalue" :label="$t('premixedPlan.sftqcfxl')" width="70px" align="center">
  109. <template slot-scope="scope">
  110. <el-switch v-model="scope.row.issplit" disabled active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
  111. </template>
  112. </el-table-column>
  113. <el-table-column :label="$t('premixedPlan.rlzt')" width="90px" align="center">
  114. <template slot-scope="scope">
  115. <span v-if="scope.row.volumeStatus == 1" style="color:red;">{{ scope.row.volumeStatusStr }}</span>
  116. <span v-if="scope.row.volumeStatus == 2" style="color:red;">{{ scope.row.volumeStatusStr }}</span>
  117. <span v-if="scope.row.volumeStatus == 0" style="color:green;">{{ scope.row.volumeStatusStr }}</span>
  118. </template>
  119. </el-table-column>
  120. <el-table-column :label="$t('premixedPlan.sl')" min-width="250px" align="left" header-align="center">
  121. <template slot-scope="scope">
  122. <div v-for="element in scope.row.arrList" :key="element.name" class="list">
  123. <el-tooltip placement="top" :open-delay="1000">
  124. <div slot="content">
  125. <div> 栏舍全称:{{ element.barname }} </div>
  126. <div> 饲料重量:{{ element.weight }} </div>
  127. <div> 撒料车:{{ element.tmrname }} </div>
  128. </div>
  129. <div :style="{'background':element.background}" class="tmrname">{{ element.barname }}</div>
  130. </el-tooltip>
  131. </div>
  132. </template>
  133. </el-table-column>
  134. <el-table-column :label="$t('errorAnalysis.cz')" align="center" width="70" class-name="small-padding fixed-width" fixed="right">
  135. <template slot-scope="{row}">
  136. <el-button v-if="isRoleEdit" class="miniSuccess" icon="el-icon-edit-outline" @click="handleUpdate(row)" />
  137. <span v-if="isRoleEdit" class="centerSpan">|</span>
  138. <el-button v-if="isRoleEdit" class="miniDanger" icon="el-icon-delete" @click="handleRowDelete(row)" />
  139. </template>
  140. </el-table-column>
  141. </el-table>
  142. <span v-if="table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">{{$t('processAnalysis.total')}}{{ table.total }}{{$t('processAnalysis.tiao')}}</span>
  143. </div>
  144. <!-- 自动生成 -->
  145. <el-dialog :fullscreen="dialogFull" :destroy-on-close="true" :visible.sync="automaticGeneration.dialogFormVisible" :close-on-click-modal="false" width="30%">
  146. <template slot="title">
  147. <div class="avue-crud__dialog__header">
  148. <span class="el-dialog__title">
  149. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
  150. {{ textMap[automaticGeneration.dialogStatus] }}
  151. </span>
  152. <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
  153. <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
  154. <svg-icon v-else icon-class="fullscreen" />
  155. </div>
  156. </div>
  157. </template>
  158. <div class="app-automaticGeneration" style="margin: 0 auto;">
  159. <div style="width: 210px;margin:60px auto 120px;font-weight: 16px;">
  160. {{$t('premixedPlan.qxzzdscfa1')}};<br>
  161. {{$t('premixedPlan.qxzzdscfa2')}};<br>
  162. {{$t('premixedPlan.qxzzdscfa3')}};<br>
  163. </div>
  164. <div slot="footer" class="dialog-footer">
  165. <el-button style="right:240px;" class="cancelClose" @click="automaticGeneration.dialogFormVisible = false;">{{$t('common.closed')}}</el-button>
  166. <el-button style="right:130px;" class="save" :disabled="isokDisable" @click="continueData(0)">{{$t('premixedPlan.jxsc')}} </el-button>
  167. <el-button style="right:20px;" class="save" :disabled="isokDisable" @click="continueData(1)">{{$t('premixedPlan.cxsc')}} </el-button>
  168. </div>
  169. </div>
  170. </el-dialog>
  171. <!-- 历史记录 -->
  172. <el-dialog :fullscreen="dialogFull" :destroy-on-close="true" :visible.sync="historyRecord.dialogFormVisible" :close-on-click-modal="false" width="90%">
  173. <template slot="title">
  174. <div class="avue-crud__dialog__header">
  175. <span class="el-dialog__title">
  176. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
  177. {{ textMap[historyRecord.dialogStatus] }}
  178. </span>
  179. <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
  180. <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
  181. <svg-icon v-else icon-class="fullscreen" />
  182. </div>
  183. </div>
  184. </template>
  185. <div class="historyRecord">
  186. <keep-alive>
  187. <component :is="historyRecord.myComponent" ref="historyRecord" />
  188. </keep-alive>
  189. </div>
  190. <div slot="footer" class="dialog-footer">
  191. <el-button class="cancelClose cancelClose1" @click="historyRecord.dialogFormVisible = false; ">{{$t('common.closed')}}</el-button>
  192. </div>
  193. </el-dialog>
  194. <!-- 新增、编辑 -->
  195. <el-dialog :fullscreen="dialogFull" :destroy-on-close="true" :visible.sync="create.dialogFormVisible" v-if='create.dialogFormVisible' :before-close="close" :close-on-click-modal="false" width="90%">
  196. <template slot="title">
  197. <div class="avue-crud__dialog__header">
  198. <span class="el-dialog__title">
  199. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
  200. {{ textMap[create.dialogStatus] }}
  201. </span>
  202. <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
  203. <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
  204. <svg-icon v-else icon-class="fullscreen" />
  205. </div>
  206. </div>
  207. </template>
  208. <div class="create">
  209. <el-form ref="temp" :rules="create.rules" :model="create.temp" label-position="right" label-width="135px" style="width: 100%;margin:0 auto 10px;">
  210. <el-row>
  211. <el-col :span="8">
  212. <el-form-item :label="$t('premixedPlan.sx')" prop="sel">
  213. <el-switch v-model="create.temp.sel" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
  214. </el-form-item>
  215. </el-col>
  216. <el-col :span="8">
  217. <el-form-item :label="$t('premixedPlan.tmrbh')" prop="tmrid2">
  218. <el-select v-model="create.temp.tmrid2" style="width: 100%;" :placeholder="$t('premixedPlan.tmrbh')" @change="changeTMRNumber">
  219. <!-- <el-option v-for="item in equipmentList" :key="item.id" :label="`${item.tclassname}/${item.eqcode}`" :value="item.id" /> -->
  220. <el-option v-for="item in TMRNumberList" :key="item.id" :label="`${item.tclassname}/${item.eqcode}`" :value="item.id" />
  221. </el-select>
  222. </el-form-item>
  223. </el-col>
  224. <el-col :span="8">
  225. <el-form-item :label="$t('premixedPlan.bc')" prop="times">
  226. <el-select v-model="create.temp.times" :disabled="create.list2.length>0" :placeholder="$t('premixedPlan.bc')" style="width:100%;" @change="changeTimes">
  227. <el-option v-for="item in frequencyList" :key="item.id" :label="item.name" :value="item.id" />
  228. </el-select>
  229. </el-form-item>
  230. </el-col>
  231. </el-row>
  232. <el-row>
  233. <el-col :span="8">
  234. <el-form-item :label="$t('premixedPlan.sftqcfxl')" prop="issplit">
  235. <el-switch v-model="create.temp.issplit" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
  236. </el-form-item>
  237. </el-col>
  238. <el-col :span="8">
  239. <el-form-item :label="$t('premixedPlan.time')" prop="begintime">
  240. <el-time-picker v-model="create.temp.begintime" style="width: 100%;" :clearable="false" type="datetime" placeholder="时间" format="HH:mm" value-format="HH:mm" />
  241. </el-form-item>
  242. </el-col>
  243. <el-col :span="8">
  244. <el-form-item :label="$t('premixedPlan.pfmb')"prop="ftid">
  245. <el-select v-model="create.temp.ftid" :disabled="create.list2.length>0" :placeholder="$t('premixedPlan.pfmb')" style="width:100%;" @change="changeTemplateFormulation">
  246. <el-option v-for="item in templateFormulationList" :key="item.id" :label="item.tname" :value="item.id" />
  247. </el-select>
  248. </el-form-item>
  249. </el-col>
  250. </el-row>
  251. <el-row>
  252. <el-col :span="8">
  253. <el-form-item :label="$t('premixedPlan.ms')" prop="display">
  254. <el-input v-model="create.temp.display" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" :placeholder="$t('premixedPlan.ms')" maxlength="255" style="width: 100%;" />
  255. </el-form-item>
  256. </el-col>
  257. </el-row>
  258. </el-form>
  259. <div v-if="create.dialogStatus !=='update' && !isDispaly" slot="footer" class="dialog-footer">
  260. <el-button class="cancelClose" @click="create.dialogFormVisible = false;getList()">{{$t('common.closed')}}</el-button>
  261. <el-button v-if="create.dialogStatus==='create'" class="save" :disabled="isokDisable" @click="distributionAndSpreading()">{{$t('premixedPlan.fpsl')}} </el-button>
  262. </div>
  263. <!-- 栏舍 -->
  264. <div v-if="create.dialogStatus =='update' || isDispaly" class="bottom" style="border-top: 1px solid #009C69;">
  265. <el-row>
  266. <el-col :span="20">
  267. <div class="fenceHouse">
  268. <ul v-loading="create.listLoadingTimes" class="fenceHouseList">
  269. <li v-for="element in create.list1" :key="element.arrid">
  270. <span v-if="element.isShowTitle" class="fenceHouseTitle">{{ element.ftname }}:</span>
  271. <div v-for="item in element.arrList" :key="item.id" class="colorBlock">
  272. <div style="position: relative;">
  273. <el-tooltip placement="top" style="height: 18px;line-height: 18px;" :style="{'background':item.background}">
  274. <div slot="content">{{ item.barname }}</div>
  275. <div class="barname">
  276. <span style="float: left;width: 70px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{ item.barname }}</span>
  277. <button style="background: red;float: right;color: #fff;width: 18px;font-size: 18px;border: none;text-align: center;" :disabled="isokDisable" @click="clickBar(item)">√</button>
  278. </div>
  279. </el-tooltip>
  280. <el-tooltip placement="bottom" style="height: 18px;line-height: 18px;" :style="{ background: 'rgba('+item.background2+ ',0.1)' }">
  281. <div slot="content">{{ item.weight }}</div>
  282. <div class="barWeight">
  283. <span style="float: left;width: 70px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{ item.weight }}</span>
  284. <el-popover
  285. placement="right"
  286. width="400"
  287. trigger="click">
  288. <b style="text-align: center;width:100%;display:inline-block;">{{$t('premixedPlan.wlxq')}}</b>
  289. <el-table :data="materialdetailsList" height="200" border>
  290. <el-table-column min-width="150" property="fname" :label="$t('premixedPlan.wl')" />
  291. <el-table-column min-width="100" property="fweight" :label="$t('premixedPlan.weight')" />
  292. <el-table-column min-width="100" property="scale" :label="$t('premixedPlan.zb')" />
  293. </el-table>
  294. <!-- <span style="color: blue;">{{$t('premixedPlan.xq')}}</span> -->
  295. <button slot="reference" style="background: #ccc;float: right;color: #fff;width: 18px;height:18px;font-size: 16px;border: none;text-align: center;" :disabled="isokDisable">?</button>
  296. </el-popover>
  297. </div>
  298. </el-tooltip>
  299. <!-- <div class="barWeight" :style="{ background: 'rgba('+item.background2+ ',0.1)' }"> {{ item.weight }} </div> -->
  300. </div>
  301. </div>
  302. </li>
  303. </ul>
  304. </div>
  305. </el-col>
  306. <el-col :span="4">
  307. <div style="text-align: center;height: 100px;margin-top: 40px;">
  308. <div class="maxweight" style="line-height:20px;"><b>{{$t('premixedPlan.clrj')}} :</b>{{ create.temp.tmrvolume }} ( {{ create.temp.minVolume }} - {{ create.temp.maxVolume }})m³</div>
  309. <div class="sumweight" style="line-height:20px;margin-top: 10px;"><b>{{$t('premixedPlan.hjzl')}} :</b>{{ create.temp.sumweight }} (KG) </div>
  310. <div class="sumweight" style="line-height:20px;margin-top: 10px;color: red;" v-if="parseFloat(create.temp.volume) > parseFloat(create.temp.tmrvolume)"><b>{{$t('premixedPlan.rjl')}} :</b>{{ create.temp.volume }} m³ </div>
  311. <div class="sumweight" style="line-height:20px;margin-top: 10px;" v-else><b>{{$t('premixedPlan.rjl')}} :</b>{{ create.temp.volume }} m³ </div>
  312. </div>
  313. </el-col>
  314. </el-row>
  315. <!-- 撒料 -->
  316. <div class="spreadingMaterial">
  317. <div>{{$t('premixedPlan.sl')}} <el-button type="danger" @click="handleEmpty">{{$t('premixedPlan.qk')}} </el-button></div>
  318. <div class="spreadingMaterialList">
  319. <!-- force-fallback="true" -->
  320. <draggable
  321. :disabled="isDropState"
  322. id="1"
  323. data-source="juju"
  324. :list="create.list2"
  325. class="list-group1"
  326. draggable=".item"
  327. group="a"
  328. animation="500"
  329. :move="move1"
  330. @change="changeLog1"
  331. @start="start1"
  332. @end="end1(create.temp)"
  333. >
  334. <div v-for="element in create.list2" :key="element.name" class="list-group-item2 item">
  335. <div class="arr-l" :style="{'background':element.tbackground}">
  336. <div class="arr-l-t">
  337. <div class="arr-l-t-t" />
  338. <el-select
  339. v-model="element.tmrid"
  340. placeholder="撒料设备"
  341. class="arr-l-t-b el-icon-arrow-down"
  342. @change="(value)=> {changeEquipment(value, element.fttype,element.id)}"
  343. >
  344. <el-option
  345. v-for="item in equipmentList"
  346. :key="item.id"
  347. :label="item.tname"
  348. :value="item.id"
  349. />
  350. </el-select>
  351. </div>
  352. <div class="arr-l-b">
  353. <el-tooltip placement="top" class="list-group-item1 item" style="height: 18px;line-height: 18px;">
  354. <div slot="content">{{ element.tmrname }}</div>
  355. <div class="tmrname">{{ element.tmrname }}</div>
  356. </el-tooltip>
  357. </div>
  358. <div v-if="element.fttype==0" style="background: #009C69;position:absolute;bottom: 0;left: 0;">补</div>
  359. </div>
  360. <div class="arr-r">
  361. <div class="arr-r-l">
  362. <el-tooltip placement="top">
  363. <div slot="content">{{ element.barname }}</div>
  364. <div class="barname">{{ element.barname }}</div>
  365. </el-tooltip>
  366. </div>
  367. <div class="arr-r-c">-</div>
  368. <div class="arr-r-r">
  369. <el-tooltip placement="top">
  370. <div slot="content">{{ element.weight }}</div>
  371. <input
  372. ref="weight"
  373. v-model="element.weight"
  374. type="number"
  375. :placeholder="$t('formulationEvaluation.reset')"
  376. step="0.01"
  377. class="filter-item2"
  378. style="display: inline-block;height:25px;padding:4px 4px 4px 0;text-align:right;font-size:12px;width: 95%;border: 1px solid #e6e6e6;"
  379. @keyup.enter="$event.target.blur"
  380. @focus="focusWeight"
  381. @blur="blurWeight(element)"
  382. />
  383. <!-- <el-input ref="wagonnumber" v-model="create.createTemp.wagonnumber" :disabled="create.dialogStatus=='see'" class="filter-item" placeholder="送货单编号" type="text" /> -->
  384. </el-tooltip>
  385. </div>
  386. </div>
  387. <div class="arr-t" :style="{'background':element.background}">
  388. <i class="el-icon-close" style="position: absolute;right: 0;" @click="handleFLDelete(element)" />
  389. <el-popover
  390. placement="bottom"
  391. width="400"
  392. height="200"
  393. trigger="click">
  394. <b style="text-align: center;width:100%;display:inline-block;">{{$t('premixedPlan.wlxq')}}</b>
  395. <el-table :data="materialdetailsList" height="200" border>
  396. <el-table-column min-width="150" property="fname" :label="$t('premixedPlan.wl')" />
  397. <el-table-column min-width="100" property="fweight" :label="$t('premixedPlan.weight')" />
  398. <el-table-column min-width="100" property="scale" :label="$t('premixedPlan.zb')" />
  399. </el-table>
  400. <i slot="reference" class="el-icon-question" style="position: absolute;right: 0;top: 20px;"/>
  401. </el-popover>
  402. <!-- <span style="position: absolute;right: 5px;width: 5px;height: 5px;border-radius: 50%;">?</span> -->
  403. </div>
  404. </div>
  405. </draggable>
  406. </div>
  407. </div>
  408. <div slot="footer" class="dialog-footer" style="height: 55px;">
  409. <el-button class="cancelClose" :disabled="isokDisable" @click="close()" style="top:40px;">{{$t('common.closed')}}</el-button>
  410. <el-button class="save" :disabled="isokDisable" @click="updateData()" style="top:40px;">{{$t('errorAnalysis.confirm')}}</el-button>
  411. </div>
  412. </div>
  413. </div>
  414. </el-dialog>
  415. <!-- 校验 -->
  416. <el-dialog :title="textMap[check.dialogStatus]" :destroy-on-close="true" :visible.sync="check.dialogFormVisible" :close-on-click-modal="false" width="30%">
  417. <div class="check">
  418. <p v-if="check.temp.isDistribution == 0">当前有未分配栏舍,未分配栏舍如下:</p>
  419. <p v-else>已分配完:当前栏舍已分配完善</p>
  420. <div v-for="(item,index) in check.temp.ftlist" :key="index">
  421. <b v-if="item.arrList !== null && item.arrList !== undefined && item.arrList.length>0">{{item.ftname}}:</b>
  422. <span v-if="item.arrList !== null && item.arrList !== undefined && item.arrList.length>0">
  423. <span v-for="(item2,index2) in item.arrList" :key="index2">
  424. {{item2.barname}}({{item2.weight}}kg)
  425. </span>
  426. </span>
  427. </div>
  428. </div>
  429. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  430. <el-button class="save" @click="check.dialogFormVisible=false;">{{$t('errorAnalysis.confirm')}}</el-button>
  431. </div>
  432. </el-dialog>
  433. <!-- 更改TMR编号 -->
  434. <el-dialog :title="textMap[tmrNumber.dialogStatus]" :destroy-on-close="true" :visible.sync="tmrNumber.dialogFormVisible" :close-on-click-modal="false" width="30%">
  435. <h3 style="text-align: center;">是否要改变TMR设备?</h3>
  436. <div class="tmrNumber" style="padding: 10px 30px;">
  437. <p>注:更换TMR撒料设备,变更后的装载重量不同,请选择处理方式</p>
  438. <el-radio v-model="tmrNumber.radio" label="0">1、多出的饲料平均从已分配的各栏舍中扣减。</el-radio><br/><br/>
  439. <el-radio v-model="tmrNumber.radio" label="1">2、多出的饲料从最后一个栏舍依次往前扣减。</el-radio><br/><br/>
  440. <el-radio v-model="tmrNumber.radio" label="2">3、清空已分配的撒料车。</el-radio>
  441. </div>
  442. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  443. <el-button class="cancelClose" :disabled="isokDisable" @click="closeTmrNumber">{{$t('feedChart.no')}}</el-button>
  444. <el-button class="save" :disabled="isokDisable" @click="tmrNumberData()">{{$t('feedChart.yes')}}</el-button>
  445. </div>
  446. </el-dialog>
  447. <!-- 清空已分配的栏舍 -->
  448. <el-dialog :title="textMap[allEmpty.dialogStatus]" :destroy-on-close="true" :visible.sync="allEmpty.dialogFormVisible" :close-on-click-modal="false" width="50%">
  449. <div class="allEmptyData">
  450. <el-table
  451. id="table"
  452. :key="allEmpty.table.tableKey"
  453. ref="allEmptyTable"
  454. v-loading="allEmpty.table.listLoading"
  455. :element-loading-text="$t('common.tableMsg')"
  456. :data="allEmpty.table.list"
  457. border
  458. highlight-current-row
  459. style="width: 100%;"
  460. :height="height"
  461. :row-style="rowStyle"
  462. :cell-style="cellStyle"
  463. class="elTable"
  464. row-key="id"
  465. @selection-change="handleAllEmptySelect"
  466. height="300"
  467. >
  468. <el-table-column type="selection" width="50" />
  469. <el-table-column :label="$t('formulationEvaluation.xh')" width="50px" align="center" type="index" />
  470. <el-table-column :label="$t('errorAnalysis.isHouseName')" min-width="110px" align="center" prop="bname"/>
  471. </el-table>
  472. </div>
  473. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  474. <el-button class="cancelClose" @click="allEmpty.dialogFormVisible = false;getList()">{{$t('common.closed')}}</el-button>
  475. <el-button class="save" :disabled="isokDisable" @click="allEmptyData()">{{$t('errorAnalysis.confirm')}}</el-button>
  476. </div>
  477. </el-dialog>
  478. </div>
  479. </template>
  480. <script>
  481. import Cookies from 'js-cookie'
  482. import draggable from 'vuedraggable'
  483. import Sortable from 'sortablejs'
  484. import { checkButtons, ExecDataByConfig, postJson } from '@/api/common'
  485. import { MessageBox } from 'element-ui'
  486. export default {
  487. components: {
  488. draggable
  489. },
  490. data() {
  491. return {
  492. isRoleEdit: [],
  493. rowStyle: { maxHeight: 25 + 'px', height: 25 + 'px' },
  494. cellStyle: { padding: 0 + 'px' },
  495. height: document.body.clientHeight - 220, // table高度
  496. materialdetailsList: [],
  497. table: {
  498. getdataListParm: {
  499. page: 1,
  500. offset: 1,
  501. pagecount: 0,
  502. returntype: 'Map',
  503. parammaps: {
  504. pastureid: Cookies.get('pastureid'),
  505. times: 1,
  506. refresh: 1
  507. }
  508. },
  509. tableKey: 0,
  510. list: [],
  511. total: 0,
  512. listLoading: false
  513. },
  514. frequencyList: [], // 班次
  515. maxTime: {
  516. getMaxTimesParm: {
  517. name: 'getSysoptEnable',
  518. page: 1,
  519. offset: 1,
  520. pagecount: 1,
  521. returntype: 'Map',
  522. parammaps: {
  523. pastureid: Cookies.get('pastureid'),
  524. inforname: 'times'
  525. }
  526. }
  527. },
  528. // 是否显示小料拆分
  529. isInforvalue: false,
  530. selectList: [],
  531. historyRecord: {
  532. dialogFormVisible: false,
  533. dialogStatus: '',
  534. myComponent: null
  535. },
  536. // 自动生成
  537. automaticGeneration: {
  538. dialogFormVisible: false,
  539. dialogStatus: ''
  540. },
  541. textMap: {
  542. automaticGeneration: '提示',
  543. historyRecord: this.$t('message.msg34'),
  544. create: '新增',
  545. update: '编辑',
  546. check: '提示',
  547. tmrNumber:'',
  548. allEmpty:'清空已分配的栏舍'
  549. },
  550. check: {
  551. dialogFormVisible: false,
  552. dialogStatus: '',
  553. temp: {
  554. ftlist:[],
  555. isDistribution: ''
  556. }
  557. },
  558. dialogFull: false,
  559. isOrder: true,
  560. requestParam: {},
  561. isokDisable: false,
  562. create: {
  563. dialogFormVisible: false,
  564. dialogStatus: '',
  565. temp: { sel: 1, tmrid: '', tmrid2: '', maxweight: '', issplit: 1, begintime: '', sumweight: 0, display: '', times: 1, ftid: '', ftname: '', tmrname: '', maxweight: '' },
  566. rules: {
  567. tmrid2: [{ type: 'string', required: true, message: this.$t('hardwareTest.bt'), trigger: 'blur' }],
  568. times: [{ type: 'number', required: true, message: this.$t('hardwareTest.bt'), trigger: 'blur' }],
  569. ftid: [{ type: 'string', required: true, message: this.$t('hardwareTest.bt'), trigger: 'blur' }]
  570. },
  571. listLoadingTimes: false,
  572. list1: [],
  573. list2: [],
  574. checkBarList: []
  575. },
  576. TMRNumberList: [], // TMR编号
  577. equipmentList: [], // 撒料设备
  578. templateFormulationList: [], // 模板配方
  579. isDispaly: false,
  580. dropState: false,
  581. isDropState:false,
  582. tmrNumber:{
  583. dialogFormVisible: false,
  584. dialogStatus: '',
  585. temp:{},
  586. radio:'0'
  587. },
  588. allEmpty:{
  589. dialogFormVisible: false,
  590. dialogStatus: '',
  591. table: {
  592. getdataListParm: {
  593. name:'getBarList',
  594. page: 1,
  595. offset: 1,
  596. pagecount: '',
  597. returntype: 'Map',
  598. parammaps: {
  599. pastureid: Cookies.get('pastureid'),
  600. times: 1,
  601. refresh: 1
  602. }
  603. },
  604. tableKey: 0,
  605. list: [],
  606. total: 0,
  607. listLoading: false,
  608. }
  609. },
  610. allEmptySelect:[],
  611. ischeck:false
  612. }
  613. },
  614. created() {
  615. this.getButtons()
  616. this.getIsDisplay()
  617. this.getList()
  618. this.getIsCheck()
  619. },
  620. methods: {
  621. getIsCheck(){
  622. const url = 'authdata/GetDataByName'
  623. const data = {
  624. name:'getSpillageCount',
  625. page: 1,
  626. offset: 1,
  627. pagecount: 0,
  628. returntype: 'Map',
  629. parammaps: {
  630. pastureid: Cookies.get('pastureid'),
  631. times: this.table.getdataListParm.parammaps.times,
  632. // refresh: 2
  633. }
  634. }
  635. postJson(url, data).then(response => {
  636. if (response.data.list !== null) {
  637. if(response.data.list[0].count){
  638. if(parseFloat(response.data.list[0].count) > 0){
  639. this.ischeck = true
  640. }else{
  641. this.ischeck = false
  642. }
  643. }else{
  644. this.ischeck = false
  645. }
  646. } else {
  647. this.ischeck = false
  648. }
  649. })
  650. },
  651. getButtons() {
  652. const Edit = 'MaterialIssuancePlan'
  653. const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
  654. this.isRoleEdit = isRoleEdit
  655. },
  656. // 下拉列表
  657. getDownList() {
  658. const url = 'authdata/GetDataByName'
  659. const data1 = {
  660. name: 'getTMRListEnableType',
  661. offset: 0,
  662. parammaps: {
  663. pastureid: Cookies.get('pastureid'),
  664. eqtype: '1'
  665. }
  666. }
  667. postJson(url, data1).then(response => {
  668. if (response.data !== null) {
  669. this.TMRNumberList = response.data.list
  670. if(this.create.dialogStatus == 'create'){
  671. let isId = false
  672. for(let i=0;i<this.TMRNumberList.length;i++){
  673. if(this.TMRNumberList[i].id == '1000'){
  674. isId = true
  675. }
  676. }
  677. if(isId = true){
  678. if (this.create.list2.length > 0) {
  679. this.tmrNumber.dialogFormVisible = true
  680. this.tmrNumber.dialogStatus = 'tmrNumber'
  681. this.tmrNumber.radio = '0'
  682. } else {
  683. this.create.temp.tmrid2 = '1000'
  684. this.create.temp.tmrid = this.create.temp.tmrid2
  685. this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === '1000').eqcode
  686. this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === '1000').maxstirfeed
  687. this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === '1000').tclassname
  688. this.create.temp.mytmrid = this.create.temp.tmrid
  689. this.create.temp.mytmrname = this.create.temp.tmrname
  690. if (this.isDispaly || this.create.dialogStatus == 'update') {
  691. this.getClearList()
  692. }
  693. }
  694. }
  695. }
  696. } else {
  697. this.TMRNumberList = []
  698. }
  699. })
  700. const url2 = 'authdata/tmrListEnableTypeAll'
  701. const data2 = {
  702. parammaps: {
  703. pastureid: Cookies.get('pastureid')
  704. }
  705. }
  706. postJson(url2, data2).then(response => {
  707. if (response.data !== null) {
  708. this.equipmentList = response.data
  709. if(this.create.dialogStatus == 'update'){
  710. if(this.equipmentList.find(obj => obj.id == this.create.temp.tmrid) !== undefined){
  711. this.create.temp.tclassname = this.equipmentList.find(obj => obj.id == this.create.temp.tmrid).tclassname
  712. }else{
  713. this.create.temp.tclassname = '固定式'
  714. }
  715. }
  716. } else {
  717. this.equipmentList = []
  718. }
  719. })
  720. const data3 = {
  721. name: 'getFTSWList',
  722. offset: 0,
  723. parammaps: {
  724. pastureid: Cookies.get('pastureid')
  725. }
  726. }
  727. postJson(url, data3).then(response => {
  728. if (response.data !== null) {
  729. this.templateFormulationList = response.data.list
  730. } else {
  731. this.templateFormulationList = []
  732. }
  733. })
  734. const data4 = {
  735. name: 'getSysoptEnable',
  736. offset: 0,
  737. parammaps: {
  738. pastureid: Cookies.get('pastureid'),
  739. inforname: 'isSmallMaterial'
  740. }
  741. }
  742. postJson(url, data4).then(response => {
  743. if (response.data !== null) {
  744. if (response.data.list[0].inforvalue == 0) {
  745. this.isInforvalue = false
  746. } else {
  747. this.isInforvalue = true
  748. }
  749. } else {
  750. this.isInforvalue = false
  751. }
  752. })
  753. },
  754. getIsDisplay() {
  755. const url = 'authdata/GetDataByName'
  756. const data = this.maxTime.getMaxTimesParm
  757. postJson(url, data).then(response => {
  758. console.log(response.data.list[0].inforvalue)
  759. if (response.data.list[0].inforvalue == 1) {
  760. this.frequencyList = [{ id: 1, name: this.$t('errorAnalysis.one'), }]
  761. } else if (response.data.list[0].inforvalue == 2) {
  762. this.frequencyList = [
  763. { id: 1, name: this.$t('errorAnalysis.one'), },
  764. { id: 2, name: this.$t('errorAnalysis.two'), }
  765. ]
  766. } else if (response.data.list[0].inforvalue == 3) {
  767. this.frequencyList = [
  768. { id: 1, name: this.$t('errorAnalysis.one'), },
  769. { id: 2, name: this.$t('errorAnalysis.two'), },
  770. { id: 3, name: this.$t('errorAnalysis.three'), }
  771. ]
  772. } else if (response.data.list[0].inforvalue == 4) {
  773. this.frequencyList = [
  774. { id: 1, name: this.$t('errorAnalysis.one'), },
  775. { id: 2, name: this.$t('errorAnalysis.two'), },
  776. { id: 3, name: this.$t('errorAnalysis.three'), },
  777. { id: 4, name: this.$t('errorAnalysis.four'), }
  778. ]
  779. }else if (response.data.list[0].inforvalue == 5) {
  780. this.frequencyList = [
  781. { id: 1, name: this.$t('errorAnalysis.one'), },
  782. { id: 2, name: this.$t('errorAnalysis.two'), },
  783. { id: 3, name: this.$t('errorAnalysis.three'), },
  784. { id: 4, name: this.$t('errorAnalysis.four'), },
  785. { id: 5, name: this.$t('errorAnalysis.five'), }
  786. ]
  787. }else if (response.data.list[0].inforvalue == 6) {
  788. this.frequencyList = [
  789. { id: 1, name: this.$t('errorAnalysis.one'), },
  790. { id: 2, name: this.$t('errorAnalysis.two'), },
  791. { id: 3, name: this.$t('errorAnalysis.three'), },
  792. { id: 4, name: this.$t('errorAnalysis.four'), },
  793. { id: 5, name: this.$t('errorAnalysis.five'), },
  794. { id: 6, name: this.$t('errorAnalysis.six'), },
  795. ]
  796. }
  797. })
  798. },
  799. getList() {
  800. this.table.listLoading = true
  801. const url = 'authdata/spillage'
  802. const data = this.table.getdataListParm
  803. postJson(url, data).then(response => {
  804. if (response.data.list !== undefined) {
  805. if (response.data.list !== null) {
  806. console.log('table数据', response.data.list)
  807. for (let i = 0; i < response.data.list.length; i++) {
  808. if (response.data.list[i].arrList == null) {
  809. this.$set(response.data.list[i], 'arrList', [])
  810. }
  811. }
  812. this.table.list = response.data.list
  813. this.table.total = response.data.list.length
  814. setTimeout(() => {
  815. this.$refs.table.doLayout()
  816. }, 100)
  817. } else {
  818. this.table.list = []
  819. }
  820. }
  821. this.table.listLoading = false
  822. this.getIsCheck()
  823. })
  824. },
  825. changeFrequency(val) {
  826. console.log('选择了班次', val)
  827. this.getList()
  828. },
  829. // 行内删除
  830. handleRowDelete(row) {
  831. console.log(row, '点击了行删除')
  832. if (row.arrList.length == 0) {
  833. MessageBox.confirm( this.$t('common.delMsg'), {
  834. confirmButtonText: this.$t('common.confirm'), confirmButtonText: this.$t('common.cancel'), type: 'warning'
  835. }).then(() => {
  836. this.selectList = []
  837. this.requestParam = {}
  838. this.requestParam.name = 'deleteLpp'
  839. this.requestParam.parammaps = {}
  840. this.requestParam.parammaps.pastureid = row.pastureid
  841. this.requestParam.parammaps.id = row.id
  842. const url = 'authdata/PostDataByName'
  843. const data = this.requestParam
  844. postJson(url, data).then(response => {
  845. if (response.msg === 'fail') {
  846. this.$notify({ title: this.$t('common.delfail'), message: response.data, type: 'warning', duration: 2000 })
  847. } else {
  848. this.$notify({ title: this.$t('common.succes'),message: this.$t('common.delSuccess'), type: 'success', duration: 2000 })
  849. this.table.getdataListParm.parammaps.refresh = 1
  850. this.getList()
  851. }
  852. })
  853. }).catch(() => {
  854. this.$message({ type: 'info', message: this.$t('common.cancelMsg') })
  855. })
  856. } else {
  857. this.$message({ type: 'error', message: '本车次已添加栏舍不可删除', duration: 2000 })
  858. return false
  859. }
  860. },
  861. handleSelect(val) {
  862. console.log('勾选数据', val)
  863. this.selectList = val
  864. },
  865. changeTemplateFormulation(item) {
  866. this.create.temp.ftname = this.templateFormulationList.find(obj => obj.id === item).tname
  867. this.create.temp.ftvolume = this.templateFormulationList.find(obj => obj.id === item).volume
  868. if(this.create.temp.display == ''){
  869. this.create.temp.display = this.create.temp.ftname
  870. }
  871. this.getCreateList1()
  872. var obj = {
  873. 'pastureid':this.create.temp.pastureid,
  874. 'ftid':this.create.temp.ftid
  875. }
  876. this.getmaterialdetailsList(obj)
  877. },
  878. changeTimes(item) {
  879. this.getCreateList1()
  880. },
  881. // TMR编号
  882. changeTMRNumber(item) {
  883. if (this.create.list2.length > 0) {
  884. // 备份
  885. // MessageBox.confirm('更换TMR撒料设备,会清空撒料车,是否更换?', {
  886. // confirmButtonText: '是', cancelButtonText: '否', type: 'warning'
  887. // }).then(() => {
  888. // this.create.temp.tmrid = this.create.temp.tmrid2
  889. // this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === item).eqcode
  890. // this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === item).maxstirfeed
  891. // this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === item).tclassname
  892. // this.create.temp.mytmrid = this.create.temp.tmrid
  893. // this.create.temp.mytmrname = this.create.temp.tmrname
  894. // console.log('tmrname==>', this.create.temp)
  895. // if (this.isDispaly || this.create.dialogStatus == 'update') {
  896. // this.getClearList()
  897. // }
  898. // }).catch(() => {
  899. // if(this.create.temp.tclassname == '固定式'){
  900. // console.log( this.create.temp,'====')
  901. // this.create.temp.tmrid = this.create.temp.mytmrid
  902. // }
  903. // this.create.temp.tmrid2 = this.create.temp.tmrid
  904. // this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).eqcode
  905. // this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).maxstirfeed
  906. // this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).tclassname
  907. // this.create.temp.mytmrid = this.create.temp.tmrid2
  908. // this.create.temp.mytmrname = this.create.temp.tmrname
  909. // console.log(this.create.temp)
  910. // this.$message({ type: 'info', message: '已取消' })
  911. // })
  912. // 备份
  913. this.tmrNumber.dialogFormVisible = true
  914. this.tmrNumber.dialogStatus = 'tmrNumber'
  915. this.tmrNumber.radio = '0'
  916. } else {
  917. this.create.temp.tmrid = this.create.temp.tmrid2
  918. this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === item).eqcode
  919. this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === item).maxstirfeed
  920. this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === item).tclassname
  921. this.create.temp.tmrvolume = this.TMRNumberList.find(obj => obj.id === item).tmrvolume
  922. this.create.temp.maxVolume = this.TMRNumberList.find(obj => obj.id === item).maxVolume
  923. this.create.temp.minVolume = this.TMRNumberList.find(obj => obj.id === item).minVolume
  924. this.create.temp.mytmrid = this.create.temp.tmrid
  925. this.create.temp.mytmrname = this.create.temp.tmrname
  926. if (this.isDispaly || this.create.dialogStatus == 'update') {
  927. this.getClearList()
  928. }
  929. }
  930. },
  931. tmrNumberData(){
  932. if(this.tmrNumber.radio == '0'){
  933. console.log('1、多出的饲料平均从已分配的各栏舍中扣减。')
  934. }else if(this.tmrNumber.radio == '1'){
  935. console.log('2、多出的饲料从最后一个栏舍依次往前扣减。')
  936. }else if(this.tmrNumber.radio == '2'){
  937. console.log('3、清空已分配的撒料车。')
  938. }
  939. const url = 'authdata/materialtmr/edit'
  940. const data = {
  941. tmrid:this.create.temp.tmrid2,
  942. tmrtype: this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).tclassid,
  943. lppid:this.create.temp.id,
  944. times:this.create.temp.times,
  945. pastureid:Cookies.get('pastureid'),
  946. status:this.tmrNumber.radio
  947. }
  948. postJson(url, data).then(response => {
  949. if (response.msg === 'fail') {
  950. this.$notify({ title:this.$t('message.msg37'), message: response.data, type: 'warning', duration: 2000 })
  951. } else {
  952. this.$notify({ title: '', message: '成功', type: 'success', duration: 2000 })
  953. this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).maxstirfeed
  954. this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).tclassname
  955. this.create.temp.tmrvolume = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).tmrvolume
  956. this.create.temp.maxVolume = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).maxVolume
  957. this.create.temp.minVolume = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).minVolume
  958. this.tmrNumber.dialogFormVisible = false
  959. this.getCreateList1()
  960. }
  961. })
  962. },
  963. closeTmrNumber(){
  964. if(this.create.temp.tclassname == '固定式'){
  965. console.log( this.create.temp,'====')
  966. this.create.temp.tmrid = this.create.temp.mytmrid
  967. }
  968. this.create.temp.tmrid2 = this.create.temp.tmrid
  969. this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).eqcode
  970. this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).maxstirfeed
  971. this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).maxstirfeed
  972. this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).tclassname
  973. this.create.temp.mytmrid = this.create.temp.tmrid2
  974. this.create.temp.mytmrname = this.create.temp.tmrname
  975. this.tmrNumber.dialogFormVisible = false
  976. },
  977. getClearList() {
  978. const url = 'authdata/lpplandtl/del'
  979. const data = []
  980. this.create.list2.forEach((item, i) => {
  981. const obj = {}
  982. obj.pastureid = item.pastureid
  983. obj.lpplandtlid = item.id
  984. obj.fttype = item.fttype
  985. obj.lweight = item.lweight
  986. obj.fpdid = item.fpdid
  987. data.push(obj)
  988. })
  989. postJson(url, data).then(response => {
  990. if (response.msg === 'fail') {
  991. this.$notify({ title:this.$t('message.msg37'), message: response.data, type: 'warning', duration: 2000 })
  992. } else {
  993. this.$notify({ title: '', message: '成功', type: 'success', duration: 2000 })
  994. this.getCreateList1()
  995. }
  996. })
  997. },
  998. colorRgb(sColor) {
  999. sColor = sColor.toLowerCase()
  1000. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/
  1001. // 如果是16进制颜色
  1002. if (sColor && reg.test(sColor)) {
  1003. if (sColor.length === 4) {
  1004. var sColorNew = '#'
  1005. for (var i = 1; i < 4; i += 1) {
  1006. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1))
  1007. }
  1008. sColor = sColorNew
  1009. }
  1010. // 处理六位的颜色值
  1011. var sColorChange = []
  1012. for (var i = 1; i < 7; i += 2) {
  1013. sColorChange.push(parseInt('0x' + sColor.slice(i, i + 2)))
  1014. }
  1015. return sColorChange.join(',')
  1016. }
  1017. return 'rgba(' + sColorChange.join(',') + ')'
  1018. },
  1019. dbclickWeight(item) {
  1020. console.log('item==>', item)
  1021. console.log('isRoleEdit==>', this.isRoleEdit)
  1022. this.$set(item, 'isWeight', true)
  1023. this.$set(item, 'focusState', true)
  1024. },
  1025. focusWeight(){
  1026. this.isDropState = true
  1027. },
  1028. blurWeight(item) {
  1029. console.log("item.weight", item)
  1030. console.log("监听Blur======================")
  1031. this.isDropState = false
  1032. if (parseFloat(item.weight) <= 0) {
  1033. this.$message({ type: 'error', message: '重量不可输入小于0的数据', duration: 2000 })
  1034. return false
  1035. }
  1036. if (item.weight == '') {
  1037. item.weight = 0
  1038. }
  1039. const lweight = String(parseFloat(item.weight) - parseFloat(item.lweight))
  1040. let sum = 0
  1041. this.create.list2.forEach((item, i) => {
  1042. console.log('item==>', item)
  1043. sum += parseFloat(item.weight)
  1044. })
  1045. if (sum > this.create.temp.maxweight) {
  1046. this.$message({ type: 'error', message: '撒料车总重量大于最大重量', duration: 2000 })
  1047. return false
  1048. }
  1049. this.requestParam = {}
  1050. this.requestParam.common = { 'returnmap': '0' }
  1051. this.requestParam.data = []
  1052. this.requestParam.data[0] = {
  1053. 'name': 'checkFPdLeftW', 'type': 'v',
  1054. 'parammaps': {
  1055. pastureid: item.pastureid, fpdid: item.fpdid, fttype: item.fttype,
  1056. lweight: lweight
  1057. }
  1058. }
  1059. this.requestParam.data[1] = {
  1060. 'name': 'updateLppd', 'type': 'e',
  1061. 'parammaps': {
  1062. pastureid: this.create.temp.pastureid, lppid: this.create.temp.id, barid: item.barid,
  1063. barname: item.barname, fpdid: item.fpdid, fttype: item.fttype,
  1064. lweight: item.weight, sort: item.sort, tmrid: item.tmrid,
  1065. tmrname: item.tmrname, background: item.background, id: item.id
  1066. }
  1067. }
  1068. this.requestParam.data[2] = {
  1069. 'name': 'updateFpdetailUse', 'type': 'e',
  1070. 'parammaps': {
  1071. pastureid: item.pastureid, id: item.fpdid,
  1072. fttype: item.fttype, lweight: lweight
  1073. }
  1074. }
  1075. ExecDataByConfig(this.requestParam).then(response => {
  1076. if (response.msg === 'fail') {
  1077. this.$notify({ title: this.$t('driver.saveFail'), message: response.data, type: 'warning', duration: 2000 })
  1078. } else {
  1079. // this.isDropState = false
  1080. // this.$notify({ title: '', message: this.$t('driver.saveSuccess'), type: 'success', duration: 2000 })
  1081. }
  1082. this.getCreateList1()
  1083. })
  1084. },
  1085. handleFLDelete(ele) {
  1086. console.log(ele, '点击了撒料删除')
  1087. this.requestParam = {}
  1088. this.requestParam.common = { 'returnmap': '0' }
  1089. this.requestParam.data = []
  1090. this.requestParam.data[0] = {
  1091. 'name': 'deleteLppd', 'type': 'e',
  1092. 'parammaps': { pastureid: ele.pastureid, id: ele.id }
  1093. }
  1094. this.requestParam.data[1] = {
  1095. 'name': 'updateFpdetailUse', 'type': 'e',
  1096. 'parammaps': { pastureid: ele.pastureid, id: ele.fpdid, fttype: ele.fttype, lweight: '-' + parseFloat(ele.weight) }
  1097. }
  1098. const url = 'authdata/ExecDataByConfig'
  1099. const data = this.requestParam
  1100. postJson(url, data).then(response => {
  1101. if (response.msg === 'fail') {
  1102. this.$notify({ title: this.$t('common.delfail'), message: response.data, type: 'warning', duration: 2000 })
  1103. } else {
  1104. this.$notify({ title: '',message: this.$t('common.delSuccess'), type: 'success', duration: 2000 })
  1105. this.getCreateList1()
  1106. }
  1107. })
  1108. },
  1109. handleCreate() {
  1110. this.create.temp = { sel: 1, tmrid: '', tmrid2: '', maxweight: '', issplit: 1, begintime: '', sumweight: 0,volume:0, display: '', times: 1, ftid: '', ftname: '', tmrname: '', maxweight: '' }
  1111. // console.log('新增车次',create.temp.tmrid2)
  1112. this.create.temp.times = this.table.getdataListParm.parammaps.times
  1113. this.getDownList()
  1114. this.isDispaly = false
  1115. this.dialogFull = false
  1116. this.create.dialogStatus = 'create'
  1117. this.create.dialogFormVisible = true
  1118. this.create.list1 = []
  1119. this.create.list2 = []
  1120. this.create.checkBarList = []
  1121. },
  1122. distributionAndSpreading() {
  1123. console.log('点击了分配撒料')
  1124. this.$refs['temp'].validate(valid => {
  1125. if (valid) {
  1126. this.isokDisable = true
  1127. setTimeout(() => {
  1128. this.isokDisable = false
  1129. }, 1000)
  1130. const url = 'authdata/lpplan/add'
  1131. const data = {}
  1132. this.create.temp.pastureid = Cookies.get('pastureid')
  1133. this.create.temp.times = parseInt(this.create.temp.times)
  1134. data.parammaps = this.create.temp
  1135. postJson(url, data).then(response => {
  1136. console.log('新增保存发送参数', this.requestParam)
  1137. if (response.msg !== 'fail') {
  1138. this.$notify({ title: this.$t('common.succes'), message: this.$t('driver.saveSuccess'), type: 'success', duration: 2000 })
  1139. this.create.temp.id = response.data.Id
  1140. this.isDispaly = true
  1141. } else {
  1142. this.$notify({ title: this.$t('driver.saveFail'), message: response.data, type: 'warning', duration: 2000 })
  1143. }
  1144. })
  1145. this.getCreateList1()
  1146. }
  1147. })
  1148. },
  1149. getCreateList1() {
  1150. this.create.listLoadingTimes = true
  1151. const url = 'authdata/spillage'
  1152. const data = {
  1153. page: 1,
  1154. offset: 1,
  1155. pagecount: 0,
  1156. returntype: 'Map',
  1157. parammaps: {
  1158. pastureid: Cookies.get('pastureid'),
  1159. times: this.create.temp.times,
  1160. refresh: 2,
  1161. ftid: this.create.temp.ftid
  1162. }
  1163. }
  1164. postJson(url, data).then(response => {
  1165. if (response.data.ftlist !== null) {
  1166. for (let i = 0; i < response.data.ftlist.length; i++) {
  1167. this.$set(response.data.ftlist[i], 'isShowTitle', true)
  1168. if (response.data.ftlist[i].arrList == null) {
  1169. this.$set(response.data.ftlist[i], 'isShowTitle', false)
  1170. } else {
  1171. for (let j = 0; j < response.data.ftlist[i].arrList.length; j++) {
  1172. this.$set(response.data.ftlist[i].arrList[j], 'background2', this.colorRgb(response.data.ftlist[i].arrList[j].background))
  1173. }
  1174. }
  1175. }
  1176. this.create.list1 = response.data.ftlist
  1177. } else {
  1178. this.create.list1 = []
  1179. }
  1180. this.create.listLoadingTimes = false
  1181. })
  1182. this.getCreateList2()
  1183. },
  1184. getCreateList2() {
  1185. const url = 'authdata/lpplandtl'
  1186. const data = {}
  1187. data.parammaps = {}
  1188. data.parammaps.pastureid = Cookies.get('pastureid'),
  1189. data.parammaps.id = this.create.temp.id
  1190. postJson(url, data).then(response => {
  1191. if (response.data !== null) {
  1192. this.create.list2 = response.data
  1193. this.create.temp.sort = response.data.length + 1
  1194. var sumweight = 0
  1195. for (let i = 0; i < this.create.list2.length; i++) {
  1196. sumweight += parseFloat(this.create.list2[i].weight)
  1197. this.$set(this.create.list2[i], 'isWeight', false)
  1198. this.$set(this.create.list2[i], 'focusState', false)
  1199. }
  1200. console.log('sumweight==>', sumweight)
  1201. this.create.temp.sumweight = (sumweight).toFixed(2)
  1202. if(parseFloat(this.create.temp.ftvolume) !== 0 && parseFloat(this.create.temp.sumweight) !== 0){
  1203. this.create.temp.volume = (parseFloat(this.create.temp.sumweight) / parseFloat(this.create.temp.ftvolume)).toFixed(2)
  1204. }else{
  1205. console.log(22)
  1206. this.create.temp.volume = 0
  1207. }
  1208. } else {
  1209. this.create.list2 = []
  1210. // this.create.temp.sort = 0
  1211. this.create.temp.sumweight = 0
  1212. this.create.temp.volume = 0
  1213. }
  1214. })
  1215. },
  1216. clickBar(item) {
  1217. this.isokDisable = true
  1218. setTimeout(() => {
  1219. this.isokDisable = false
  1220. }, 1000)
  1221. this.create.temp.sumweight = parseFloat(this.create.temp.sumweight)
  1222. console.log('需要计算容积量')
  1223. console.log('this.TMRNumberList==>', this.TMRNumberList)
  1224. console.log('点击了栏舍item==>', item)
  1225. console.log('temp==>',this.create.temp)
  1226. console.log('this.equipmentList==>',this.equipmentList)
  1227. // if(this.create.temp.tclassname == '固定式'){
  1228. // if(this.equipmentList.find(obj => obj.tclassname == '撒料设备') !== undefined){
  1229. // this.create.temp.tmrname = this.equipmentList.find(obj => obj.tclassname == '撒料设备').eqcode
  1230. // this.create.temp.tmrid = this.equipmentList.find(obj => obj.tclassname == '撒料设备').id
  1231. // }else if(this.equipmentList.find(obj => obj.tclassname == '自走式') !== undefined){
  1232. // this.create.temp.tmrname = this.equipmentList.find(obj => obj.tclassname == '自走式').eqcode
  1233. // this.create.temp.tmrid = this.equipmentList.find(obj => obj.tclassname == '自走式').id
  1234. // }else{
  1235. // this.$message({ type: 'error', message: '请先在TMR设备中创建撒料设备', duration: 2000 })
  1236. // return
  1237. // }
  1238. // }
  1239. if(this.create.temp.tclassname == '固定式'){
  1240. if(this.equipmentList.find(obj => obj.tclassname == '任意车1') !== undefined){
  1241. this.create.temp.tmrname = this.equipmentList.find(obj => obj.tclassname == '任意车1').eqcode
  1242. this.create.temp.tmrid = this.equipmentList.find(obj => obj.tclassname == '任意车1').id
  1243. }
  1244. }
  1245. var evt = this.create.temp
  1246. if (parseFloat(evt.maxweight) - parseFloat(evt.sumweight) < parseFloat(item.weight)) {
  1247. if (parseFloat(evt.sumweight) + parseFloat(item.weight) > parseFloat(evt.maxweight)) {
  1248. this.$set(item, 'weight', (parseFloat(evt.maxweight) - parseFloat(evt.sumweight)).toFixed(2))
  1249. }
  1250. }
  1251. if (parseFloat(evt.maxweight) == parseFloat(evt.sumweight) || parseFloat(evt.maxweight) < parseFloat(evt.sumweight)) {
  1252. this.$message({ type: 'error', message: '计划配方已经是最大容量', duration: 2000 })
  1253. this.getCreateList1()
  1254. return
  1255. }
  1256. console.log('item.weight===>', evt.maxweight)
  1257. console.log('item.weight===>', evt.sumweight)
  1258. const url = 'authdata/lpplandtl/add'
  1259. const data = {}
  1260. data.parammaps = {}
  1261. data.parammaps.id = item.id
  1262. data.parammaps.pastureid = evt.pastureid
  1263. data.parammaps.lppid = evt.id
  1264. data.parammaps.barid = item.barid
  1265. data.parammaps.barname = item.barname
  1266. data.parammaps.fpdid = item.id
  1267. data.parammaps.lweight = item.weight
  1268. data.parammaps.tmrid = evt.tmrid
  1269. data.parammaps.tmrname = evt.tmrname
  1270. data.parammaps.fttype = item.fttype
  1271. data.parammaps.background = item.background
  1272. data.parammaps.cowcount = item.cowcount
  1273. data.parammaps.ccountradio = item.ccountradio
  1274. postJson(url, data).then(response => {
  1275. // this.requestParam = {}
  1276. // this.requestParam.common = {
  1277. // 'returnmap': '0'
  1278. // }
  1279. // this.requestParam.data = []
  1280. // this.requestParam.data[0] = { 'name': 'insertLppd', 'type': 'e', 'parammaps': {
  1281. // pastureid:item.pastureid,
  1282. // lppid:evt.id,
  1283. // barid:item.barid,
  1284. // barname:item.barname,
  1285. // fpdid:item.id,
  1286. // tmrid:evt.tmrid,
  1287. // tmrname:evt.tmrname,
  1288. // fttype:item.fttype,
  1289. // background:item.background,
  1290. // cowcount:item.cowcount,
  1291. // ccountradio:item.ccountradio,
  1292. // lweight:item.weight
  1293. // }
  1294. // }
  1295. // ExecDataByConfig(this.requestParam).then(response => {
  1296. this.requestParam = {}
  1297. this.requestParam.common = { 'returnmap': '0' }
  1298. this.requestParam.data = []
  1299. this.requestParam.data[0] = { 'name': 'updateFpdetailUse', 'type': 'e',
  1300. 'parammaps': { pastureid: item.pastureid, id: item.id, fttype: item.fttype, lweight: item.weight }
  1301. }
  1302. const url2 = 'authdata/ExecDataByConfig'
  1303. const data2 = this.requestParam
  1304. postJson(url2, data2).then(response => {
  1305. if (response.msg === 'fail') {
  1306. this.$notify({ title: this.$t('driver.saveFail'), message: response.data, type: 'warning', duration: 2000 })
  1307. } else {
  1308. this.$notify({ title: '', message: this.$t('driver.saveSuccess'), type: 'success', duration: 2000 })
  1309. }
  1310. this.getCreateList1()
  1311. })
  1312. })
  1313. },
  1314. handleUpdate(row) {
  1315. console.log(row)
  1316. console.log("equipmentList",this.equipmentList)
  1317. this.getDownList()
  1318. this.dialogFull = false
  1319. this.create.dialogStatus = 'update'
  1320. this.create.dialogFormVisible = true
  1321. row.tmrid2 = row.tmrid
  1322. this.create.temp = Object.assign({}, row)
  1323. this.create.temp.mytmrname = row.tmrname
  1324. this.create.temp.mytmrid = row.tmrid
  1325. this.create.checkBarList = []
  1326. this.create.temp.mytmrid = row.tmrid
  1327. if(this.create.temp.display == ''){
  1328. this.create.temp.display = this.create.temp.ftname
  1329. }
  1330. if(this.create.temp.volume == undefined || this.create.temp.volume == ''){
  1331. console.log(111)
  1332. this.$set(this.create.temp,'volume',0)
  1333. }
  1334. console.log(this.create.temp,'this.create.temp')
  1335. this.getCreateList1()
  1336. this.getmaterialdetailsList(row)
  1337. },
  1338. updateData() {
  1339. this.$refs['temp'].validate(valid => {
  1340. if (valid) {
  1341. this.isokDisable = true
  1342. setTimeout(() => {
  1343. this.isokDisable = false
  1344. }, 1000)
  1345. // {{ create.temp.tmrvolume }} ({{ create.temp.maxVolume }} - {{ create.temp.minVolume }})
  1346. // 当超过车辆容量100%时
  1347. var tip = ''
  1348. if(parseFloat(this.create.temp.volume) > parseFloat(this.create.temp.tmrvolume)){
  1349. tip = '装载量已超过车辆容量' + this.create.temp.tmrvolume + 'm³,请确认'
  1350. MessageBox.confirm(tip, {
  1351. confirmButtonText: this.$t('common.confirm'), confirmButtonText: this.$t('common.cancel'), type: 'warning'
  1352. }).then(() => {
  1353. this.save_updateData()
  1354. })
  1355. }else if(parseFloat(this.create.temp.volume) > parseFloat(this.create.temp.maxVolume)){
  1356. tip = '装载量不可超过车辆容量' + this.create.temp.maxVolume + 'm³,请确认'
  1357. MessageBox.confirm(tip, {
  1358. confirmButtonText: this.$t('common.confirm'), confirmButtonText: this.$t('common.cancel'), type: 'warning'
  1359. }).then(() => {
  1360. this.save_updateData()
  1361. })
  1362. }else if(parseFloat(this.create.temp.volume) < parseFloat(this.create.temp.minVolume)){
  1363. tip = '装载量不可低于车辆容量' + this.create.temp.minVolume + 'm³,请确认'
  1364. MessageBox.confirm(tip, {
  1365. confirmButtonText: this.$t('common.confirm'), confirmButtonText: this.$t('common.cancel'), type: 'warning'
  1366. }).then(() => {
  1367. this.save_updateData()
  1368. })
  1369. }else{
  1370. this.save_updateData()
  1371. }
  1372. }
  1373. })
  1374. },
  1375. save_updateData(){
  1376. const url = 'authdata/lpplan/edit'
  1377. const data = {}
  1378. this.create.temp.pastureid = Cookies.get('pastureid')
  1379. this.create.temp.times = parseInt(this.create.temp.times)
  1380. data.parammaps = this.create.temp
  1381. data.parammaps.tmrid = this.create.temp.tmrid2
  1382. data.parammaps.tmrname = this.create.temp.mytmrname
  1383. data.old = this.create.temp.arrList
  1384. postJson(url, data).then(response => {
  1385. console.log('新增保存发送参数', this.requestParam)
  1386. if (response.msg !== 'fail') {
  1387. this.$notify({ title: this.$t('common.succes'), message: this.$t('driver.saveSuccess'), type: 'success', duration: 2000 })
  1388. this.isDispaly = false
  1389. this.dialogFull = false
  1390. this.create.dialogFormVisible = false
  1391. this.getList()
  1392. } else {
  1393. this.$notify({ title: this.$t('driver.saveFail'), message: response.data, type: 'warning', duration: 2000 })
  1394. }
  1395. })
  1396. },
  1397. close() {
  1398. if (this.create.dialogStatus == 'create') {
  1399. console.log('新增关闭')
  1400. this.isokDisable = true
  1401. setTimeout(() => {
  1402. this.isokDisable = false
  1403. }, 1000)
  1404. const url = 'authdata/lpplandtl/restore'
  1405. const data = {}
  1406. data.old = []
  1407. data.new = this.create.list2
  1408. postJson(url, data).then(response => {
  1409. console.log('新增保存发送参数', this.requestParam)
  1410. if (response.msg !== 'fail') {
  1411. this.isDispaly = false
  1412. this.dialogFull = false
  1413. this.create.dialogFormVisible = false
  1414. this.getList()
  1415. //window.location.reload()
  1416. }
  1417. })
  1418. } else {
  1419. console.log('编辑关闭')
  1420. this.isokDisable = true
  1421. setTimeout(() => {
  1422. this.isokDisable = false
  1423. }, 1000)
  1424. const url = 'authdata/lpplandtl/restore'
  1425. const data = {}
  1426. data.old = this.create.temp.arrList
  1427. data.new = this.create.list2
  1428. postJson(url, data).then(response => {
  1429. console.log('新增保存发送参数', this.requestParam)
  1430. if (response.msg !== 'fail') {
  1431. this.$notify({ title: this.$t('common.succes'), message: this.$t('driver.saveSuccess'), type: 'success', duration: 2000 })
  1432. this.isDispaly = false
  1433. this.dialogFull = false
  1434. this.create.dialogFormVisible = false
  1435. this.getList()
  1436. // window.location.reload()
  1437. } else {
  1438. this.$notify({ title: this.$t('driver.saveFail'), message: response.data, type: 'warning', duration: 2000 })
  1439. }
  1440. })
  1441. }
  1442. },
  1443. changeEquipment(item, fttype, myid) {
  1444. console.log('item==>',item)
  1445. console.log('fttype==>',fttype)
  1446. console.log('myid==>',myid)
  1447. let tclassname = this.equipmentList.find(obj => obj.id == item).tclassname
  1448. let maxstirfeed = this.equipmentList.find(obj => obj.id == item).maxstirfeed
  1449. if(tclassname == '固定式'){
  1450. this.$message({ type: 'error', message: '固定式设备无法撒料,请选择撒料设备', duration: 2000 })
  1451. this.getCreateList2()
  1452. return
  1453. }
  1454. var objList = {}
  1455. for (let i = 0; i < this.create.list2.length; i++) {
  1456. if (this.create.list2[i].fttype == fttype && this.create.list2[i].id == myid) {
  1457. this.create.list2[i].tmrname = this.equipmentList.find(obj => obj.id === item).tname
  1458. objList = this.create.list2[i]
  1459. if(parseFloat(this.create.list2[i].weight) > parseFloat(maxstirfeed)){
  1460. objList.weight = maxstirfeed
  1461. }
  1462. }
  1463. }
  1464. const url = 'authdata/lpplandtl/add'
  1465. const data = {}
  1466. data.parammaps = {}
  1467. data.parammaps.id = objList.id
  1468. data.parammaps.pastureid = this.create.temp.pastureid
  1469. data.parammaps.lppid = this.create.temp.id
  1470. data.parammaps.tmrid = objList.tmrid
  1471. data.parammaps.tmrname = objList.tmrname
  1472. postJson(url, data).then(response => {
  1473. console.log('新增保存发送参数', this.requestParam)
  1474. if (response.msg === 'fail') {
  1475. this.$notify({ title: this.$t('driver.saveFail'), message: response.data, type: 'warning', duration: 2000 })
  1476. } else {
  1477. this.getCreateList2()
  1478. this.$notify({ title: '', message: this.$t('driver.saveSuccess'), type: 'success', duration: 2000 })
  1479. }
  1480. })
  1481. },
  1482. move1(evt, originalEvent){
  1483. console.log('move1===>evt', evt)
  1484. console.log('move1===>originalEvent', originalEvent)
  1485. },
  1486. changeLog1(evt){
  1487. console.log("evt========",evt)
  1488. // 按组拖拽
  1489. const url = 'authdata/lpplandtl/edit/sort'
  1490. const data = {}
  1491. var obj = evt.moved.element
  1492. data.parammaps = {}
  1493. data.parammaps.tmrid = obj.tmrid
  1494. data.parammaps.pastureid = obj.pastureid
  1495. data.parammaps.lppid = obj.lppid
  1496. data.parammaps.sort = evt.moved.newIndex +1
  1497. data.parammaps.id = obj.id
  1498. postJson(url, data).then(response => {
  1499. console.log('拖动保存发送参数', this.requestParam)
  1500. if (response.msg === 'fail') {
  1501. this.$notify({ title: this.$t('driver.saveFail'), message: response.data, type: 'warning', duration: 2000 })
  1502. } else {
  1503. this.getCreateList2()
  1504. this.$notify({ title: '', message: this.$t('driver.saveSuccess'), type: 'success', duration: 2000 })
  1505. }
  1506. })
  1507. },
  1508. start1(evt){
  1509. console.log('start1===>', evt)
  1510. // this.$set(this.table.startObj, 'from', evt.from.className)
  1511. // this.$set(this.table.startObj, 'to', evt.from.className)
  1512. },
  1513. end1(evt){
  1514. console.log('end1===>', evt)
  1515. },
  1516. // 减少车次
  1517. handleReduceTrains() {
  1518. if (this.selectList.length == 0) {
  1519. this.$message({ type: 'error', message: '请选择车次', duration: 2000 })
  1520. return false
  1521. } else {
  1522. // 减少对应车次
  1523. for (let i = 0; i < this.selectList.length; i++) {
  1524. if (this.selectList[i].arrList.length > 0) {
  1525. this.$message({ type: 'error', message: '本车次已添加栏舍不可删除', duration: 2000 })
  1526. return false
  1527. }
  1528. }
  1529. MessageBox.confirm( this.$t('common.delMsg'), {
  1530. confirmButtonText: this.$t('common.confirm'), confirmButtonText: this.$t('common.cancel'), type: 'warning'
  1531. }).then(() => {
  1532. console.log(this.selectList)
  1533. this.requestParam = {}
  1534. this.requestParam.common = { 'returnmap': '0' }
  1535. this.requestParam.data = []
  1536. this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
  1537. this.requestParam.data[0].children = []
  1538. this.requestParam.data[0].children[0] = {
  1539. 'name': 'deleteLpp', 'type': 'e', 'parammaps': { id: '@insertSpotList.id', pastureid: '@insertSpotList.pastureid' }
  1540. }
  1541. ExecDataByConfig(this.requestParam).then(response => {
  1542. console.log('删除保存发送参数', this.requestParam)
  1543. if (response.msg === 'fail') {
  1544. this.$notify({ title: this.$t('common.delfail'), message: response.data, type: 'warning', duration: 2000 })
  1545. } else {
  1546. this.$notify({ title: '',message: this.$t('common.delSuccess'), type: 'success', duration: 2000 })
  1547. this.table.getdataListParm.parammaps.refresh = 1
  1548. this.getList()
  1549. }
  1550. })
  1551. })
  1552. }
  1553. },
  1554. // 自动生成
  1555. handleAutomaticGeneration() {
  1556. this.dialogFull = false
  1557. this.automaticGeneration.dialogStatus = 'automaticGeneration'
  1558. this.automaticGeneration.dialogFormVisible = true
  1559. },
  1560. continueData(item) {
  1561. if (item == 0) {
  1562. console.log('点击继续生成')
  1563. this.requestParam = {}
  1564. this.requestParam.pastureid = Cookies.get('pastureid')
  1565. this.requestParam.type = 0
  1566. const url = 'authdata/autogeneration'
  1567. const data = this.requestParam
  1568. postJson(url, data).then(response => {
  1569. console.log('新增保存发送参数', this.requestParam)
  1570. if (response.msg !== 'fail') {
  1571. this.$notify({ title: this.$t('common.succes'), message: this.$t('driver.saveSuccess'), type: 'success', duration: 2000 })
  1572. this.automaticGeneration.dialogFormVisible = false
  1573. this.getIsDisplay()
  1574. } else {
  1575. this.$notify({ title: this.$t('driver.saveFail'), message: response.data, type: 'warning', duration: 2000 })
  1576. }
  1577. })
  1578. } else {
  1579. console.log('点击重新生成')
  1580. MessageBox.confirm('重新生成计划会将原有计划清空再生成,是否确认重新生成?', {
  1581. confirmButtonText: this.$t('common.confirm'), confirmButtonText: this.$t('common.cancel'), type: 'warning'
  1582. }).then(() => {
  1583. this.automaticGeneration.dialogFormVisible = false
  1584. this.requestParam = {}
  1585. this.requestParam.pastureid = Cookies.get('pastureid')
  1586. this.requestParam.type = 1
  1587. const url = 'authdata/autogeneration'
  1588. const data = this.requestParam
  1589. postJson(url, data).then(response => {
  1590. console.log('新增保存发送参数', this.requestParam)
  1591. if (response.msg !== 'fail') {
  1592. this.$notify({ title: this.$t('common.succes'), message: this.$t('driver.saveSuccess'), type: 'success', duration: 2000 })
  1593. this.automaticGeneration.dialogFormVisible = false
  1594. this.getIsDisplay()
  1595. } else {
  1596. this.$notify({ title: this.$t('driver.saveFail'), message: response.data, type: 'warning', duration: 2000 })
  1597. }
  1598. })
  1599. }).catch(() => {
  1600. this.$message({ type: 'info', message: '已取消重新生成' })
  1601. })
  1602. }
  1603. },
  1604. handleChangeOrder() {
  1605. console.log('更改顺序')
  1606. this.isOrder = false
  1607. this.rowDrop()
  1608. },
  1609. // 行拖拽
  1610. rowDrop() {
  1611. console.log(document.querySelector('#table .el-table__body-wrapper tbody'))
  1612. const tbody = document.querySelector('#table .el-table__body-wrapper tbody')
  1613. const that = this
  1614. var sortable = Sortable.create(tbody, {
  1615. disabled: that.dropState,
  1616. onChoose({ newIndex, oldIndex }) {
  1617. console.log(that.isOrder, 'that.isOrder == false')
  1618. console.log(that.dropState, 'that.dropState')
  1619. if (that.dropState == true || that.isOrder == true) {
  1620. sortable.destroy()
  1621. }
  1622. },
  1623. onEnd({ newIndex, oldIndex }) {
  1624. const currRow = that.table.list.splice(oldIndex, 1)[0]
  1625. that.table.list.splice(newIndex, 0, currRow)
  1626. console.log('索引', newIndex)
  1627. console.log('拖动数据', currRow)
  1628. console.log('上', that.table.list[newIndex - 1])
  1629. console.log('下', that.table.list[newIndex + 1])
  1630. }
  1631. })
  1632. },
  1633. saveChangeOrder() {
  1634. // 保存顺序
  1635. var sortArr = []
  1636. for (let i = 0; i < this.table.list.length; i++) {
  1637. var obj = {}
  1638. obj.sort = i + 1
  1639. obj.id = this.table.list[i].id
  1640. obj.pastureid = this.table.list[i].pastureid
  1641. sortArr.push(obj)
  1642. }
  1643. const url = 'authdata/trains'
  1644. const data = sortArr
  1645. postJson(url, data).then(response => {
  1646. if (response.msg === 'fail') {
  1647. this.$notify({ title: this.$t('message.msg51'), message: response.data, type: 'warning', duration: 2000 })
  1648. } else {
  1649. this.$notify({ title: '', message: this.$t('message.msg50'), type: 'success', duration: 2000 })
  1650. this.table.getdataListParm.parammaps.refresh = 1
  1651. this.getList()
  1652. this.isOrder = true
  1653. }
  1654. })
  1655. },
  1656. cancelChangeOrder() {
  1657. console.log('取消顺序')
  1658. this.table.getdataListParm.parammaps.refresh = 1
  1659. this.getList()
  1660. this.isOrder = true
  1661. },
  1662. handleTakeEffect() {
  1663. if (this.selectList.length == 0) {
  1664. this.$message({ type: 'error',message:this.$t('message.msg12'), duration: 2000 })
  1665. } else {
  1666. MessageBox.confirm(this.$t('message.msg29')+ this.selectList.length + '条信息,是否生效?', {
  1667. confirmButtonText: this.$t('common.confirm'),
  1668. confirmButtonText: this.$t('common.cancel'),
  1669. type: 'warning'
  1670. }).then(() => {
  1671. for (let i = 0; i < this.selectList.length; i++) {
  1672. this.selectList[i].sel = 1
  1673. }
  1674. console.log('生效', this.selectList)
  1675. this.requestParam.common = { 'returnmap': '0' }
  1676. this.requestParam.data = []
  1677. this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
  1678. this.requestParam.data[0].children = []
  1679. this.requestParam.data[0].children[0] = {
  1680. 'name': 'updatelpplanEnable', 'type': 'e', 'parammaps': { sel: '@insertSpotList.sel', id: '@insertSpotList.id', pastureid: '@insertSpotList.pastureid' }
  1681. }
  1682. ExecDataByConfig(this.requestParam).then(response => {
  1683. console.log('生效保存发送参数', this.requestParam)
  1684. if (response.msg === 'fail') {
  1685. this.$notify({ title:this.$t('message.msg11'), message: response.data, type: 'warning', duration: 2000 })
  1686. } else {
  1687. this.$notify({ title: '', message:this.$t('message.msg10'), type: 'success', duration: 2000 })
  1688. this.table.getdataListParm.parammaps.refresh = 1
  1689. this.getList()
  1690. }
  1691. })
  1692. })
  1693. }
  1694. },
  1695. handleDisable() {
  1696. if (this.selectList.length == 0) {
  1697. this.$message({ type: 'error',message:this.$t('message.msg12'), duration: 2000 })
  1698. } else {
  1699. MessageBox.confirm(this.$t('message.msg29')+ this.selectList.length + this.$t('message.msg30'), {
  1700. confirmButtonText: this.$t('common.confirm'), confirmButtonText: this.$t('common.cancel'), type: 'warning'
  1701. }).then(() => {
  1702. for (let i = 0; i < this.selectList.length; i++) {
  1703. this.selectList[i].sel = 0
  1704. }
  1705. console.log('禁用', this.selectList)
  1706. this.requestParam.common = { 'returnmap': '0' }
  1707. this.requestParam.data = []
  1708. this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
  1709. this.requestParam.data[0].children = []
  1710. this.requestParam.data[0].children[0] = {
  1711. 'name': 'updatelpplanEnable',
  1712. 'type': 'e',
  1713. 'parammaps': { sel: '@insertSpotList.sel', id: '@insertSpotList.id', pastureid: '@insertSpotList.pastureid' }
  1714. }
  1715. ExecDataByConfig(this.requestParam).then(response => {
  1716. console.log('禁用保存发送参数', this.requestParam)
  1717. if (response.msg === 'fail') {
  1718. this.$notify({ title:this.$t('message.msg13'), message: response.data, type: 'warning', duration: 2000 })
  1719. } else {
  1720. this.$notify({ title: '禁用成功', message:this.$t('message.msg15'), type: 'success', duration: 2000 })
  1721. this.table.getdataListParm.parammaps.refresh = 1
  1722. this.getList()
  1723. }
  1724. })
  1725. })
  1726. }
  1727. },
  1728. // 历史记录
  1729. handleHistoryRecord() {
  1730. console.log('点击历史记录')
  1731. this.dialogFull = false
  1732. this.historyRecord.dialogStatus = 'historyRecord'
  1733. this.historyRecord.dialogFormVisible = true
  1734. const vue = this
  1735. var myComponent = () => import('./historyRecord.vue')
  1736. return vue.historyRecord.myComponent = myComponent
  1737. },
  1738. handleCheck() {
  1739. console.log('点击了校验')
  1740. this.check.dialogStatus = 'check'
  1741. this.check.dialogFormVisible = true
  1742. this.getCheckList()
  1743. },
  1744. getCheckList() {
  1745. const url = 'authdata/spillage'
  1746. const data = {
  1747. page: 1,
  1748. offset: 1,
  1749. pagecount: 0,
  1750. returntype: 'Map',
  1751. parammaps: {
  1752. pastureid: Cookies.get('pastureid'),
  1753. times: this.table.getdataListParm.parammaps.times,
  1754. refresh: 2
  1755. }
  1756. }
  1757. postJson(url, data).then(response => {
  1758. if (response.data.ftlist !== undefined && response.data.ftlist !== null) {
  1759. this.$set(this.check.temp,'isDistribution',0)
  1760. this.check.temp.ftlist = response.data.ftlist
  1761. } else {
  1762. this.check.temp = {}
  1763. this.$set(this.check.temp,'isDistribution',1)
  1764. }
  1765. })
  1766. },
  1767. handleEmpty(){
  1768. console.log('点击了清空')
  1769. var list = []
  1770. for(let i=0;i<this.create.list2.length;i++){
  1771. var obj = {}
  1772. obj.pastureid = this.create.list2[i].pastureid
  1773. obj.id = this.create.list2[i].fpdid
  1774. obj.fttype = this.create.list2[i].fttype
  1775. obj.lweight = '-'+this.create.list2[i].weight
  1776. list.push(obj)
  1777. }
  1778. this.requestParam = {}
  1779. this.requestParam.common = { 'returnmap': '0' }
  1780. this.requestParam.data = []
  1781. this.requestParam.data[0] = { 'name': 'deleteLpplandtl1ByLppid', 'type': 'e', 'parammaps': { lppid: this.create.temp.id, pastureid: Cookies.get('pastureid') }},
  1782. this.requestParam.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': list }}
  1783. this.requestParam.data[1].children = []
  1784. this.requestParam.data[1].children[0] = {
  1785. 'name': 'updateFpdetailUse',
  1786. 'type': 'e',
  1787. 'parammaps': { pastureid: '@insertSpotList.pastureid', id: '@insertSpotList.id', fttype: '@insertSpotList.fttype', lweight: '@insertSpotList.lweight' }
  1788. }
  1789. ExecDataByConfig(this.requestParam).then(response => {
  1790. console.log('清空保存发送参数', this.requestParam)
  1791. if (response.msg === 'fail') {
  1792. this.$notify({ title: '清空失败', message: response.data, type: 'warning', duration: 2000 })
  1793. } else {
  1794. this.$notify({ title: '清空成功', message: '清空成功', type: 'success', duration: 2000 })
  1795. this.getCreateList1()
  1796. }
  1797. })
  1798. },
  1799. handleAllEmpty(){
  1800. this.allEmpty.dialogStatus = 'allEmpty'
  1801. this.allEmpty.dialogFormVisible = true
  1802. // MessageBox.confirm('执行该操作会将现有车次已分配的撒料栏舍全部清空,是否要执行该操作?', {
  1803. // confirmButtonText: this.$t('common.confirm'), confirmButtonText: this.$t('common.cancel'), type: 'warning'
  1804. // }).then(() => {
  1805. //
  1806. // })
  1807. this.getAllEmptyList()
  1808. },
  1809. getAllEmptyList() {
  1810. this.allEmpty.table.listLoading = true
  1811. const url = 'authdata/GetDataByName'
  1812. const data = this.allEmpty.table.getdataListParm
  1813. postJson(url, data).then(response => {
  1814. if (response.data.list !== undefined) {
  1815. if (response.data.list !== null) {
  1816. this.allEmpty.table.list = response.data.list
  1817. this.allEmpty.table.total = response.data.list.length
  1818. setTimeout(() => {
  1819. this.$refs.allEmptyTable.doLayout()
  1820. }, 100)
  1821. } else {
  1822. this.allEmpty.table.list = []
  1823. }
  1824. }
  1825. this.allEmpty.table.listLoading = false
  1826. })
  1827. },
  1828. handleAllEmptySelect(val){
  1829. this.allEmptySelect = []
  1830. val.forEach((ele)=> {
  1831. this.allEmptySelect.push(ele.id)
  1832. });
  1833. },
  1834. allEmptyData(){
  1835. // console.log(this.allEmptySelect)
  1836. // console.log(this.allEmptySelect.toString())
  1837. if(this.allEmptySelect.length == 0){
  1838. this.allEmpty.dialogFormVisible = false;
  1839. this.getList()
  1840. }else{
  1841. // this.requestParam = {}
  1842. // this.requestParam.common = { 'returnmap': '0' }
  1843. // this.requestParam.data = []
  1844. // this.requestParam.data[0] = { 'name': 'deleteLpplandtl1All', 'type': 'e', 'parammaps': { pastureid: Cookies.get('pastureid') ,times:this.table.getdataListParm.parammaps.times,barid:this.allEmptySelect.toString()}},
  1845. // this.requestParam.data[1] = { 'name': 'deletefpdetailAll', 'type': 'e', 'parammaps': { pastureid: Cookies.get('pastureid') ,times:this.table.getdataListParm.parammaps.times,barid:this.allEmptySelect.toString()}},
  1846. // this.requestParam.data[1] = { 'name': 'deletefpdetailAll', 'type': 'e', 'parammaps': { pastureid: Cookies.get('pastureid') ,times:this.table.getdataListParm.parammaps.times,barid:this.allEmptySelect.toString()}},
  1847. // ExecDataByConfig(this.requestParam).then(response => {
  1848. //
  1849. // if (response.msg === 'fail') {
  1850. // this.$notify({ title: '清空失败', message: response.data, type: 'warning', duration: 2000 })
  1851. // } else {
  1852. let url = 'authdata/spillageall/del'
  1853. let data = {}
  1854. data.parammaps = {}
  1855. data.parammaps.pastureid = Cookies.get('pastureid')
  1856. data.parammaps.times = this.table.getdataListParm.parammaps.times
  1857. data.parammaps.barid = this.allEmptySelect.toString()
  1858. postJson(url, data).then(response => {
  1859. if (response.msg !== 'fail') {
  1860. this.$notify({ title: '清空成功', message: '清空成功', type: 'success', duration: 2000 })
  1861. this.allEmpty.dialogFormVisible = false;
  1862. this.getList()
  1863. } else {
  1864. this.$notify({ title: '清空失败', message: response.data, type: 'warning', duration: 2000 })
  1865. }
  1866. })
  1867. // }
  1868. // })
  1869. }
  1870. },
  1871. getmaterialdetailsList(item){
  1872. let url = 'authdata/GetDataByName'
  1873. let data = {
  1874. name:"getFTdetailList",page:1,offset:1,pagecount:"",returntype:"Map",
  1875. parammaps:{
  1876. pastureid:item.pastureid,ftid:item.ftid,
  1877. // fttypeid:item.fttypeid,
  1878. }
  1879. }
  1880. postJson(url, data).then(response => {
  1881. if (response.msg !== 'fail') {
  1882. this.materialdetailsList = response.data.list
  1883. } else {
  1884. this.materialdetailsList = []
  1885. }
  1886. })
  1887. }
  1888. }
  1889. }
  1890. </script>
  1891. <style lang="scss" scoped>
  1892. .list{min-width: 60px;display: inline-block;margin: 5px 5px;text-align: center;
  1893. .tmrname{
  1894. width:100%;padding: 5px 5px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  1895. }
  1896. }
  1897. .fenceHouse {
  1898. height: 130px;
  1899. background: #fff;
  1900. position: relative;
  1901. ::-webkit-scrollbar {
  1902. width: 7px;
  1903. height: 7px;
  1904. background-color: #F5F5F5;
  1905. }
  1906. ::-webkit-scrollbar-track {
  1907. box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  1908. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  1909. border-radius: 10px;
  1910. background-color: #F5F5F5;
  1911. }
  1912. ::-webkit-scrollbar-thumb {
  1913. border-radius: 10px;
  1914. box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
  1915. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
  1916. background-color: #c8c8c8;
  1917. }
  1918. .fenceHouseList {
  1919. position: absolute;
  1920. width: 100%;
  1921. margin: 0 0;
  1922. height: 130px;
  1923. list-style: none;
  1924. padding: 0 0;
  1925. overflow: auto;
  1926. font-size: 12px;
  1927. .fenceHouseTitle {
  1928. float: left;
  1929. width: 105px;
  1930. white-space: nowrap;
  1931. overflow: hidden;
  1932. text-overflow: ellipsis;
  1933. margin: 5px 5px;
  1934. border-radius: 7px;
  1935. text-align: center;
  1936. color: #000;
  1937. height: 36px;
  1938. line-height: 36px;
  1939. }
  1940. li {
  1941. text-align: center;
  1942. color: #fff;
  1943. .barname {
  1944. display: block;
  1945. width: 100%;
  1946. overflow: hidden;
  1947. text-overflow: ellipsis;
  1948. white-space: nowrap;
  1949. }
  1950. .barWeight{
  1951. display: block;
  1952. line-height: 18px;
  1953. height: 18px;
  1954. color: #000;
  1955. width: 100%;
  1956. margin: 0 auto;
  1957. }
  1958. .colorBlock{
  1959. width: 88px;float: left;margin:5px 5px;height: 36px;
  1960. }
  1961. }
  1962. }
  1963. }
  1964. </style>
  1965. <style lang="scss" >
  1966. .spreadingMaterial {
  1967. height: 200px;
  1968. ::-webkit-scrollbar {
  1969. width: 7px;
  1970. height: 7px;
  1971. background-color: #F5F5F5;
  1972. }
  1973. ::-webkit-scrollbar-track {
  1974. box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  1975. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  1976. border-radius: 10px;
  1977. background-color: #F5F5F5;
  1978. }
  1979. ::-webkit-scrollbar-thumb {
  1980. border-radius: 10px;
  1981. box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
  1982. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
  1983. background-color: #c8c8c8;
  1984. }
  1985. .spreadingMaterialList{height: 100%;overflow: auto;}
  1986. .list-group-item2 {
  1987. width: 220px;
  1988. height: 50px;
  1989. overflow: hidden;
  1990. float: left;
  1991. margin: 5px 5px;
  1992. position: relative;
  1993. color: #fff;
  1994. .arr-t {
  1995. height: 50px;
  1996. border-radius: 5px 5px;
  1997. }
  1998. .arr-l {
  1999. float: left;
  2000. width: 60px;
  2001. height: 50px;
  2002. overflow: hidden;
  2003. border-radius: 5px 50% 50% 5px;
  2004. .arr-l-t {
  2005. position: relative;
  2006. .arr-l-t-t {
  2007. width: 0;
  2008. height: 0;
  2009. border-top: 26px solid #3479f2;
  2010. border-right: 26px solid transparent;
  2011. }
  2012. .arr-l-t-b {
  2013. position: absolute;
  2014. top: 4px;
  2015. left: 1px;
  2016. color: #fff;
  2017. width: 10px;
  2018. height: 10px;
  2019. .el-input--suffix {
  2020. opacity: 0;
  2021. .el-input__inner {
  2022. height: 10px;
  2023. }
  2024. }
  2025. }
  2026. }
  2027. .arr-l-b {
  2028. width: 45px;
  2029. position: absolute;
  2030. top: 15px;
  2031. left: 10px;
  2032. color: #fff !important;
  2033. font-size: 12px;
  2034. .tmrname {
  2035. width: 100%;
  2036. overflow: hidden;
  2037. text-overflow: ellipsis;
  2038. white-space: nowrap;
  2039. }
  2040. }
  2041. }
  2042. .arr-c {
  2043. position: absolute;
  2044. top: 0px;
  2045. left: 0;
  2046. }
  2047. .arr-r {
  2048. float: right;
  2049. width: 160px;
  2050. height: 50px;
  2051. overflow: hidden;
  2052. line-height: 50px;
  2053. .arr-r-l {
  2054. float: left;
  2055. width: 70px;
  2056. .barname {
  2057. width: 95%;
  2058. overflow: hidden;
  2059. text-overflow: ellipsis;
  2060. white-space: nowrap;
  2061. font-size: 14px;
  2062. text-align: center;
  2063. }
  2064. }
  2065. .arr-r-c {
  2066. float: left;
  2067. width: 10px;
  2068. }
  2069. .arr-r-r {
  2070. float: left;
  2071. width: 65px;
  2072. .weight {
  2073. width: 100%;
  2074. overflow: hidden;
  2075. text-overflow: ellipsis;
  2076. white-space: nowrap;
  2077. font-size: 14px;
  2078. }
  2079. }
  2080. }
  2081. }
  2082. }
  2083. </style>