index.vue 69 KB

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