index.vue 69 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728
  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 data2 = {
  507. name: 'getTMRListEnableTypeAll',
  508. offset: 0,
  509. parammaps: {
  510. pastureid: Cookies.get('pastureid'),
  511. eqtype: '1'
  512. }
  513. }
  514. postJson(url, data2).then(response => {
  515. if (response.data !== null) {
  516. this.equipmentList = response.data.list
  517. if(this.create.dialogStatus == 'update'){
  518. if(this.equipmentList.find(obj => obj.id == this.create.temp.tmrid) !== undefined){
  519. this.create.temp.tclassname = this.equipmentList.find(obj => obj.id == this.create.temp.tmrid).tclassname
  520. }else{
  521. this.create.temp.tclassname = '固定式'
  522. }
  523. }
  524. } else {
  525. this.equipmentList = []
  526. }
  527. })
  528. const data3 = {
  529. name: 'getFTSWList',
  530. offset: 0,
  531. parammaps: {
  532. pastureid: Cookies.get('pastureid')
  533. }
  534. }
  535. postJson(url, data3).then(response => {
  536. if (response.data !== null) {
  537. this.templateFormulationList = response.data.list
  538. } else {
  539. this.templateFormulationList = []
  540. }
  541. })
  542. const data4 = {
  543. name: 'getSysoptEnable',
  544. offset: 0,
  545. parammaps: {
  546. pastureid: Cookies.get('pastureid'),
  547. inforname: 'isSmallMaterial'
  548. }
  549. }
  550. postJson(url, data4).then(response => {
  551. if (response.data !== null) {
  552. if (response.data.list[0].inforvalue == 0) {
  553. this.isInforvalue = false
  554. } else {
  555. this.isInforvalue = true
  556. }
  557. } else {
  558. this.isInforvalue = false
  559. }
  560. })
  561. },
  562. getIsDisplay() {
  563. const url = 'authdata/GetDataByName'
  564. const data = this.maxTime.getMaxTimesParm
  565. postJson(url, data).then(response => {
  566. console.log(response.data.list[0].inforvalue)
  567. if (response.data.list[0].inforvalue == 1) {
  568. this.frequencyList = [{ id: 1, name: '第一班' }]
  569. } else if (response.data.list[0].inforvalue == 2) {
  570. this.frequencyList = [
  571. { id: 1, name: '第一班' },
  572. { id: 2, name: '第二班' }
  573. ]
  574. } else if (response.data.list[0].inforvalue == 3) {
  575. this.frequencyList = [
  576. { id: 1, name: '第一班' },
  577. { id: 2, name: '第二班' },
  578. { id: 3, name: '第三班' }
  579. ]
  580. } else if (response.data.list[0].inforvalue == 4) {
  581. this.frequencyList = [
  582. { id: 1, name: '第一班' },
  583. { id: 2, name: '第二班' },
  584. { id: 3, name: '第三班' },
  585. { id: 4, name: '第四班' }
  586. ]
  587. }
  588. })
  589. },
  590. getList() {
  591. this.table.listLoading = true
  592. const url = 'authdata/spillage'
  593. const data = this.table.getdataListParm
  594. postJson(url, data).then(response => {
  595. if (response.data.list !== undefined) {
  596. if (response.data.list !== null) {
  597. console.log('table数据', response.data.list)
  598. for (let i = 0; i < response.data.list.length; i++) {
  599. if (response.data.list[i].arrList == null) {
  600. this.$set(response.data.list[i], 'arrList', [])
  601. }
  602. }
  603. this.table.list = response.data.list
  604. this.table.total = response.data.list.length
  605. setTimeout(() => {
  606. this.$refs.table.doLayout()
  607. }, 100)
  608. } else {
  609. this.table.list = []
  610. }
  611. }
  612. this.table.listLoading = false
  613. })
  614. },
  615. changeFrequency(val) {
  616. console.log('选择了班次', val)
  617. this.getList()
  618. },
  619. // 行内删除
  620. handleRowDelete(row) {
  621. console.log(row, '点击了行删除')
  622. if (row.arrList.length == 0) {
  623. MessageBox.confirm('是否确认删除此信息?', {
  624. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  625. }).then(() => {
  626. this.selectList = []
  627. this.requestParam = {}
  628. this.requestParam.name = 'deleteLpp'
  629. this.requestParam.parammaps = {}
  630. this.requestParam.parammaps.pastureid = row.pastureid
  631. this.requestParam.parammaps.id = row.id
  632. const url = 'authdata/PostDataByName'
  633. const data = this.requestParam
  634. postJson(url, data).then(response => {
  635. if (response.msg === 'fail') {
  636. this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
  637. } else {
  638. this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
  639. this.table.getdataListParm.parammaps.refresh = 1
  640. this.getList()
  641. }
  642. })
  643. }).catch(() => {
  644. this.$message({ type: 'info', message: '已取消删除' })
  645. })
  646. } else {
  647. this.$message({ type: 'error', message: '本车次已添加栏舍不可删除', duration: 2000 })
  648. return false
  649. }
  650. },
  651. handleSelect(val) {
  652. console.log('勾选数据', val)
  653. this.selectList = val
  654. },
  655. changeTemplateFormulation(item) {
  656. this.create.temp.ftname = this.templateFormulationList.find(obj => obj.id === item).tname
  657. this.getCreateList1()
  658. },
  659. changeTimes(item) {
  660. this.getCreateList1()
  661. },
  662. // TMR编号
  663. changeTMRNumber(item) {
  664. if (this.create.list2.length > 0) {
  665. MessageBox.confirm('更换TMR撒料设备,会清空撒料车,是否更换?', {
  666. confirmButtonText: '是', cancelButtonText: '否', type: 'warning'
  667. }).then(() => {
  668. this.create.temp.tmrid = this.create.temp.tmrid2
  669. this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === item).eqcode
  670. this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === item).maxstirfeed
  671. this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === item).tclassname
  672. this.create.temp.mytmrid = this.create.temp.tmrid
  673. this.create.temp.mytmrname = this.create.temp.tmrname
  674. console.log('tmrname==>', this.create.temp)
  675. if (this.isDispaly || this.create.dialogStatus == 'update') {
  676. this.getClearList()
  677. }
  678. }).catch(() => {
  679. this.create.temp.tmrid2 = this.create.temp.tmrid
  680. this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).eqcode
  681. this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).maxstirfeed
  682. this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).tclassname
  683. this.create.temp.mytmrid = this.create.temp.tmrid2
  684. this.create.temp.mytmrname = this.create.temp.tmrname
  685. console.log(this.create.temp)
  686. this.$message({ type: 'info', message: '已取消' })
  687. })
  688. } else {
  689. this.create.temp.tmrid = this.create.temp.tmrid2
  690. this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === item).eqcode
  691. this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === item).maxstirfeed
  692. this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === item).tclassname
  693. this.create.temp.mytmrid = this.create.temp.tmrid
  694. this.create.temp.mytmrname = this.create.temp.tmrname
  695. if (this.isDispaly || this.create.dialogStatus == 'update') {
  696. this.getClearList()
  697. }
  698. console.log('TMR编号item==>', item)
  699. }
  700. console.log('tmrname==>', this.create.temp)
  701. },
  702. getClearList() {
  703. const url = 'authdata/lpplandtl/del'
  704. const data = []
  705. this.create.list2.forEach((item, i) => {
  706. const obj = {}
  707. obj.pastureid = item.pastureid
  708. obj.lpplandtlid = item.id
  709. obj.fttype = item.fttype
  710. obj.lweight = item.lweight
  711. obj.fpdid = item.fpdid
  712. data.push(obj)
  713. })
  714. postJson(url, data).then(response => {
  715. if (response.msg === 'fail') {
  716. this.$notify({ title: '失败', message: response.data, type: 'warning', duration: 2000 })
  717. } else {
  718. this.$notify({ title: '', message: '成功', type: 'success', duration: 2000 })
  719. this.getCreateList1()
  720. }
  721. })
  722. },
  723. colorRgb(sColor) {
  724. sColor = sColor.toLowerCase()
  725. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/
  726. // 如果是16进制颜色
  727. if (sColor && reg.test(sColor)) {
  728. if (sColor.length === 4) {
  729. var sColorNew = '#'
  730. for (var i = 1; i < 4; i += 1) {
  731. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1))
  732. }
  733. sColor = sColorNew
  734. }
  735. // 处理六位的颜色值
  736. var sColorChange = []
  737. for (var i = 1; i < 7; i += 2) {
  738. sColorChange.push(parseInt('0x' + sColor.slice(i, i + 2)))
  739. }
  740. return sColorChange.join(',')
  741. }
  742. return 'rgba(' + sColorChange.join(',') + ')'
  743. },
  744. dbclickWeight(item) {
  745. console.log('item==>', item)
  746. console.log('isRoleEdit==>', this.isRoleEdit)
  747. this.$set(item, 'isWeight', true)
  748. this.$set(item, 'focusState', true)
  749. },
  750. focusWeight(){
  751. this.isDropState = true
  752. },
  753. blurWeight(item) {
  754. this.isDropState = false
  755. if (parseFloat(item.weight) <= 0) {
  756. this.$message({ type: 'error', message: '重量不可输入小于0的数据', duration: 2000 })
  757. return false
  758. }
  759. if (item.weight == '') {
  760. item.weight = 0
  761. }
  762. const lweight = String(parseFloat(item.weight) - parseFloat(item.lweight))
  763. let sum = 0
  764. this.create.list2.forEach((item, i) => {
  765. console.log('item==>', item)
  766. sum += parseFloat(item.weight)
  767. })
  768. if (sum > this.create.temp.maxweight) {
  769. this.$message({ type: 'error', message: '撒料车总重量大于最大重量', duration: 2000 })
  770. return false
  771. }
  772. this.requestParam = {}
  773. this.requestParam.common = { 'returnmap': '0' }
  774. this.requestParam.data = []
  775. this.requestParam.data[0] = {
  776. 'name': 'checkFPdLeftW', 'type': 'v',
  777. 'parammaps': {
  778. pastureid: item.pastureid, fpdid: item.fpdid, fttype: item.fttype,
  779. lweight: lweight
  780. }
  781. }
  782. this.requestParam.data[1] = {
  783. 'name': 'updateLppd', 'type': 'e',
  784. 'parammaps': {
  785. pastureid: this.create.temp.pastureid, lppid: this.create.temp.id, barid: item.barid,
  786. barname: item.barname, fpdid: item.fpdid, fttype: item.fttype,
  787. lweight: item.weight, sort: item.sort, tmrid: item.tmrid,
  788. tmrname: item.tmrname, background: item.background, id: item.id
  789. }
  790. }
  791. this.requestParam.data[2] = {
  792. 'name': 'updateFpdetailUse', 'type': 'e',
  793. 'parammaps': {
  794. pastureid: item.pastureid, id: item.fpdid,
  795. fttype: item.fttype, lweight: lweight
  796. }
  797. }
  798. ExecDataByConfig(this.requestParam).then(response => {
  799. if (response.msg === 'fail') {
  800. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  801. } else {
  802. // this.isDropState = false
  803. // this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
  804. }
  805. this.getCreateList1()
  806. })
  807. },
  808. handleFLDelete(ele) {
  809. console.log(ele, '点击了撒料删除')
  810. this.requestParam = {}
  811. this.requestParam.common = { 'returnmap': '0' }
  812. this.requestParam.data = []
  813. this.requestParam.data[0] = {
  814. 'name': 'deleteLppd', 'type': 'e',
  815. 'parammaps': { pastureid: ele.pastureid, id: ele.id }
  816. }
  817. this.requestParam.data[1] = {
  818. 'name': 'updateFpdetailUse', 'type': 'e',
  819. 'parammaps': { pastureid: ele.pastureid, id: ele.fpdid, fttype: ele.fttype, lweight: '-' + parseFloat(ele.weight) }
  820. }
  821. const url = 'authdata/ExecDataByConfig'
  822. const data = this.requestParam
  823. postJson(url, data).then(response => {
  824. if (response.msg === 'fail') {
  825. this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
  826. } else {
  827. this.$notify({ title: '', message: '删除成功', type: 'success', duration: 2000 })
  828. this.getCreateList1()
  829. }
  830. })
  831. },
  832. handleCreate() {
  833. console.log('新增车次')
  834. this.create.temp = { sel: 1, tmrid: '', tmrid2: '', maxweight: '', issplit: 1, begintime: '', sumweight: 0, display: '', times: 1, ftid: '', ftname: '', tmrname: '', maxweight: '' }
  835. this.create.temp.times = this.table.getdataListParm.parammaps.times
  836. this.getDownList()
  837. this.isDispaly = false
  838. this.dialogFull = false
  839. this.create.dialogStatus = 'create'
  840. this.create.dialogFormVisible = true
  841. this.create.list1 = []
  842. this.create.list2 = []
  843. this.create.checkBarList = []
  844. },
  845. distributionAndSpreading() {
  846. console.log('点击了分配撒料')
  847. this.$refs['temp'].validate(valid => {
  848. if (valid) {
  849. this.isokDisable = true
  850. setTimeout(() => {
  851. this.isokDisable = false
  852. }, 1000)
  853. const url = 'authdata/lpplan/add'
  854. const data = {}
  855. this.create.temp.pastureid = Cookies.get('pastureid')
  856. this.create.temp.times = parseInt(this.create.temp.times)
  857. data.parammaps = this.create.temp
  858. postJson(url, data).then(response => {
  859. console.log('新增保存发送参数', this.requestParam)
  860. if (response.msg !== 'fail') {
  861. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  862. this.create.temp.id = response.data.Id
  863. this.isDispaly = true
  864. } else {
  865. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  866. }
  867. })
  868. this.getCreateList1()
  869. }
  870. })
  871. },
  872. getCreateList1() {
  873. this.create.listLoadingTimes = true
  874. const url = 'authdata/spillage'
  875. const data = {
  876. page: 1,
  877. offset: 1,
  878. pagecount: 0,
  879. returntype: 'Map',
  880. parammaps: {
  881. pastureid: Cookies.get('pastureid'),
  882. times: this.create.temp.times,
  883. refresh: 2,
  884. ftid: this.create.temp.ftid
  885. }
  886. }
  887. postJson(url, data).then(response => {
  888. if (response.data.ftlist !== null) {
  889. for (let i = 0; i < response.data.ftlist.length; i++) {
  890. this.$set(response.data.ftlist[i], 'isShowTitle', true)
  891. if (response.data.ftlist[i].arrList == null) {
  892. this.$set(response.data.ftlist[i], 'isShowTitle', false)
  893. } else {
  894. for (let j = 0; j < response.data.ftlist[i].arrList.length; j++) {
  895. this.$set(response.data.ftlist[i].arrList[j], 'background2', this.colorRgb(response.data.ftlist[i].arrList[j].background))
  896. }
  897. }
  898. }
  899. this.create.list1 = response.data.ftlist
  900. } else {
  901. this.create.list1 = []
  902. }
  903. this.create.listLoadingTimes = false
  904. })
  905. this.getCreateList2()
  906. },
  907. getCreateList2() {
  908. const url = 'authdata/lpplandtl'
  909. const data = {}
  910. data.parammaps = {}
  911. data.parammaps.pastureid = Cookies.get('pastureid'),
  912. data.parammaps.id = this.create.temp.id
  913. postJson(url, data).then(response => {
  914. if (response.data !== null) {
  915. this.create.list2 = response.data
  916. this.create.temp.sort = response.data.length + 1
  917. var sumweight = 0
  918. for (let i = 0; i < this.create.list2.length; i++) {
  919. sumweight += parseFloat(this.create.list2[i].weight)
  920. this.$set(this.create.list2[i], 'isWeight', false)
  921. this.$set(this.create.list2[i], 'focusState', false)
  922. }
  923. console.log('sumweight==>', sumweight)
  924. this.create.temp.sumweight = (sumweight).toFixed(2)
  925. } else {
  926. this.create.list2 = []
  927. // this.create.temp.sort = 0
  928. this.create.temp.sumweight = 0
  929. }
  930. })
  931. },
  932. clickBar(item) {
  933. this.isokDisable = true
  934. setTimeout(() => {
  935. this.isokDisable = false
  936. }, 1000)
  937. this.create.temp.sumweight = parseFloat(this.create.temp.sumweight)
  938. console.log('this.TMRNumberList==>', this.TMRNumberList)
  939. console.log('点击了栏舍item==>', item)
  940. console.log('temp==>',this.create.temp)
  941. console.log('this.equipmentList==>',this.equipmentList)
  942. // if(this.create.temp.tclassname == '固定式'){
  943. // if(this.equipmentList.find(obj => obj.tclassname == '撒料设备') !== undefined){
  944. // this.create.temp.tmrname = this.equipmentList.find(obj => obj.tclassname == '撒料设备').eqcode
  945. // this.create.temp.tmrid = this.equipmentList.find(obj => obj.tclassname == '撒料设备').id
  946. // }else if(this.equipmentList.find(obj => obj.tclassname == '自走式') !== undefined){
  947. // this.create.temp.tmrname = this.equipmentList.find(obj => obj.tclassname == '自走式').eqcode
  948. // this.create.temp.tmrid = this.equipmentList.find(obj => obj.tclassname == '自走式').id
  949. // }else{
  950. // this.$message({ type: 'error', message: '请先在TMR设备中创建撒料设备', duration: 2000 })
  951. // return
  952. // }
  953. // }
  954. if(this.create.temp.tclassname == '固定式'){
  955. if(this.equipmentList.find(obj => obj.tclassname == '任意车') !== undefined){
  956. this.create.temp.tmrname = this.equipmentList.find(obj => obj.tclassname == '任意车').eqcode
  957. this.create.temp.tmrid = this.equipmentList.find(obj => obj.tclassname == '任意车').id
  958. }
  959. }
  960. var evt = this.create.temp
  961. if (parseFloat(evt.maxweight) - parseFloat(evt.sumweight) < parseFloat(item.weight)) {
  962. if (parseFloat(evt.sumweight) + parseFloat(item.weight) > parseFloat(evt.maxweight)) {
  963. this.$set(item, 'weight', (parseFloat(evt.maxweight) - parseFloat(evt.sumweight)).toFixed(2))
  964. }
  965. }
  966. if (parseFloat(evt.maxweight) == parseFloat(evt.sumweight) || parseFloat(evt.maxweight) < parseFloat(evt.sumweight)) {
  967. this.$message({ type: 'error', message: '计划配方已经是最大容量', duration: 2000 })
  968. this.getCreateList1()
  969. return
  970. }
  971. console.log('item.weight===>', evt.maxweight)
  972. console.log('item.weight===>', evt.sumweight)
  973. const url = 'authdata/lpplandtl/add'
  974. const data = {}
  975. data.parammaps = {}
  976. data.parammaps.id = item.id
  977. data.parammaps.pastureid = evt.pastureid
  978. data.parammaps.lppid = evt.id
  979. data.parammaps.barid = item.barid
  980. data.parammaps.barname = item.barname
  981. data.parammaps.fpdid = item.id
  982. data.parammaps.lweight = item.weight
  983. data.parammaps.tmrid = evt.tmrid
  984. data.parammaps.tmrname = evt.tmrname
  985. data.parammaps.fttype = item.fttype
  986. data.parammaps.background = item.background
  987. data.parammaps.cowcount = item.cowcount
  988. data.parammaps.ccountradio = item.ccountradio
  989. postJson(url, data).then(response => {
  990. // this.requestParam = {}
  991. // this.requestParam.common = {
  992. // 'returnmap': '0'
  993. // }
  994. // this.requestParam.data = []
  995. // this.requestParam.data[0] = { 'name': 'insertLppd', 'type': 'e', 'parammaps': {
  996. // pastureid:item.pastureid,
  997. // lppid:evt.id,
  998. // barid:item.barid,
  999. // barname:item.barname,
  1000. // fpdid:item.id,
  1001. // tmrid:evt.tmrid,
  1002. // tmrname:evt.tmrname,
  1003. // fttype:item.fttype,
  1004. // background:item.background,
  1005. // cowcount:item.cowcount,
  1006. // ccountradio:item.ccountradio,
  1007. // lweight:item.weight
  1008. // }
  1009. // }
  1010. // ExecDataByConfig(this.requestParam).then(response => {
  1011. this.requestParam = {}
  1012. this.requestParam.common = { 'returnmap': '0' }
  1013. this.requestParam.data = []
  1014. this.requestParam.data[0] = { 'name': 'updateFpdetailUse', 'type': 'e',
  1015. 'parammaps': { pastureid: item.pastureid, id: item.id, fttype: item.fttype, lweight: item.weight }
  1016. }
  1017. const url2 = 'authdata/ExecDataByConfig'
  1018. const data2 = this.requestParam
  1019. postJson(url2, data2).then(response => {
  1020. if (response.msg === 'fail') {
  1021. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1022. } else {
  1023. this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
  1024. }
  1025. this.getCreateList1()
  1026. })
  1027. })
  1028. },
  1029. handleUpdate(row) {
  1030. console.log(row)
  1031. console.log("equipmentList",this.equipmentList)
  1032. this.getDownList()
  1033. this.dialogFull = false
  1034. this.create.dialogStatus = 'update'
  1035. this.create.dialogFormVisible = true
  1036. row.tmrid2 = row.tmrid
  1037. this.create.temp = Object.assign({}, row)
  1038. this.create.temp.mytmrname = row.tmrname
  1039. this.create.temp.mytmrid = row.tmrid
  1040. this.create.checkBarList = []
  1041. console.log(this.create.temp,'this.create.temp')
  1042. this.getCreateList1()
  1043. },
  1044. updateData() {
  1045. this.$refs['temp'].validate(valid => {
  1046. if (valid) {
  1047. this.isokDisable = true
  1048. setTimeout(() => {
  1049. this.isokDisable = false
  1050. }, 1000)
  1051. const url = 'authdata/lpplan/edit'
  1052. const data = {}
  1053. this.create.temp.pastureid = Cookies.get('pastureid')
  1054. this.create.temp.times = parseInt(this.create.temp.times)
  1055. data.parammaps = this.create.temp
  1056. data.parammaps.tmrid = this.create.temp.mytmrid
  1057. data.parammaps.tmrname = this.create.temp.mytmrname
  1058. //临时注释
  1059. // data.old = this.create.temp.arrList
  1060. //临时注释
  1061. postJson(url, data).then(response => {
  1062. console.log('新增保存发送参数', this.requestParam)
  1063. if (response.msg !== 'fail') {
  1064. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  1065. this.isDispaly = false
  1066. this.dialogFull = false
  1067. this.create.dialogFormVisible = false
  1068. this.getList()
  1069. } else {
  1070. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1071. }
  1072. })
  1073. }
  1074. })
  1075. },
  1076. close() {
  1077. if (this.create.dialogStatus == 'create') {
  1078. console.log('新增关闭')
  1079. this.isokDisable = true
  1080. setTimeout(() => {
  1081. this.isokDisable = false
  1082. }, 1000)
  1083. const url = 'authdata/lpplandtl/restore'
  1084. const data = {}
  1085. data.old = []
  1086. data.new = this.create.list2
  1087. postJson(url, data).then(response => {
  1088. console.log('新增保存发送参数', this.requestParam)
  1089. if (response.msg !== 'fail') {
  1090. this.isDispaly = false
  1091. this.dialogFull = false
  1092. this.create.dialogFormVisible = false
  1093. this.getList()
  1094. }
  1095. })
  1096. } else {
  1097. console.log('编辑关闭')
  1098. this.isokDisable = true
  1099. setTimeout(() => {
  1100. this.isokDisable = false
  1101. }, 1000)
  1102. const url = 'authdata/lpplandtl/restore'
  1103. const data = {}
  1104. data.old = this.create.temp.arrList
  1105. data.new = this.create.list2
  1106. postJson(url, data).then(response => {
  1107. console.log('新增保存发送参数', this.requestParam)
  1108. if (response.msg !== 'fail') {
  1109. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  1110. this.isDispaly = false
  1111. this.dialogFull = false
  1112. this.create.dialogFormVisible = false
  1113. this.getList()
  1114. } else {
  1115. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1116. }
  1117. })
  1118. }
  1119. },
  1120. changeEquipment(item, fttype, myid) {
  1121. console.log('item==>',item)
  1122. console.log('fttype==>',fttype)
  1123. console.log('myid==>',myid)
  1124. let tclassname = this.equipmentList.find(obj => obj.id == item).tclassname
  1125. let maxstirfeed = this.equipmentList.find(obj => obj.id == item).maxstirfeed
  1126. if(tclassname == '固定式'){
  1127. this.$message({ type: 'error', message: '固定式设备无法撒料,请选择撒料设备', duration: 2000 })
  1128. this.getCreateList2()
  1129. return
  1130. }
  1131. var objList = {}
  1132. for (let i = 0; i < this.create.list2.length; i++) {
  1133. if (this.create.list2[i].fttype == fttype && this.create.list2[i].id == myid) {
  1134. this.create.list2[i].tmrname = this.equipmentList.find(obj => obj.id === item).tname
  1135. objList = this.create.list2[i]
  1136. if(parseFloat(this.create.list2[i].weight) > parseFloat(maxstirfeed)){
  1137. objList.weight = maxstirfeed
  1138. }
  1139. }
  1140. }
  1141. const url = 'authdata/lpplandtl/add'
  1142. const data = {}
  1143. data.parammaps = {}
  1144. data.parammaps.id = objList.id
  1145. data.parammaps.pastureid = this.create.temp.pastureid
  1146. data.parammaps.lppid = this.create.temp.id
  1147. data.parammaps.tmrid = objList.tmrid
  1148. data.parammaps.tmrname = objList.tmrname
  1149. postJson(url, data).then(response => {
  1150. console.log('新增保存发送参数', this.requestParam)
  1151. if (response.msg === 'fail') {
  1152. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1153. } else {
  1154. this.getCreateList2()
  1155. this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
  1156. }
  1157. })
  1158. },
  1159. move1(evt, originalEvent){
  1160. console.log('move1===>evt', evt)
  1161. console.log('move1===>originalEvent', originalEvent)
  1162. },
  1163. changeLog1(evt){
  1164. // 按组拖拽
  1165. const url = 'authdata/lpplandtl/edit/sort'
  1166. const data = {}
  1167. var obj = evt.moved.element
  1168. data.parammaps = {}
  1169. data.parammaps.tmrid = obj.tmrid
  1170. data.parammaps.pastureid = obj.pastureid
  1171. data.parammaps.lppid = obj.lppid
  1172. data.parammaps.sort = evt.moved.newIndex +1
  1173. data.parammaps.id = obj.id
  1174. postJson(url, data).then(response => {
  1175. console.log('拖动保存发送参数', this.requestParam)
  1176. if (response.msg === 'fail') {
  1177. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1178. } else {
  1179. this.getCreateList2()
  1180. this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
  1181. }
  1182. })
  1183. },
  1184. start1(evt){
  1185. console.log('start1===>', evt)
  1186. // this.$set(this.table.startObj, 'from', evt.from.className)
  1187. // this.$set(this.table.startObj, 'to', evt.from.className)
  1188. },
  1189. end1(evt){
  1190. console.log('end1===>', evt)
  1191. },
  1192. // 减少车次
  1193. handleReduceTrains() {
  1194. if (this.selectList.length == 0) {
  1195. this.$message({ type: 'error', message: '请选择车次', duration: 2000 })
  1196. return false
  1197. } else {
  1198. // 减少对应车次
  1199. for (let i = 0; i < this.selectList.length; i++) {
  1200. if (this.selectList[i].arrList.length > 0) {
  1201. this.$message({ type: 'error', message: '本车次已添加栏舍不可删除', duration: 2000 })
  1202. return false
  1203. }
  1204. }
  1205. MessageBox.confirm('是否确认删除此信息?', {
  1206. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  1207. }).then(() => {
  1208. console.log(this.selectList)
  1209. this.requestParam = {}
  1210. this.requestParam.common = { 'returnmap': '0' }
  1211. this.requestParam.data = []
  1212. this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
  1213. this.requestParam.data[0].children = []
  1214. this.requestParam.data[0].children[0] = {
  1215. 'name': 'deleteLpp', 'type': 'e', 'parammaps': { id: '@insertSpotList.id', pastureid: '@insertSpotList.pastureid' }
  1216. }
  1217. ExecDataByConfig(this.requestParam).then(response => {
  1218. console.log('删除保存发送参数', this.requestParam)
  1219. if (response.msg === 'fail') {
  1220. this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
  1221. } else {
  1222. this.$notify({ title: '', message: '删除成功', type: 'success', duration: 2000 })
  1223. this.table.getdataListParm.parammaps.refresh = 1
  1224. this.getList()
  1225. }
  1226. })
  1227. })
  1228. }
  1229. },
  1230. // 自动生成
  1231. handleAutomaticGeneration() {
  1232. this.dialogFull = false
  1233. this.automaticGeneration.dialogStatus = 'automaticGeneration'
  1234. this.automaticGeneration.dialogFormVisible = true
  1235. },
  1236. continueData(item) {
  1237. if (item == 0) {
  1238. console.log('点击继续生成')
  1239. this.requestParam = {}
  1240. this.requestParam.pastureid = Cookies.get('pastureid')
  1241. this.requestParam.type = 0
  1242. const url = 'authdata/autogeneration'
  1243. const data = this.requestParam
  1244. postJson(url, data).then(response => {
  1245. console.log('新增保存发送参数', this.requestParam)
  1246. if (response.msg !== 'fail') {
  1247. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  1248. this.automaticGeneration.dialogFormVisible = false
  1249. this.getIsDisplay()
  1250. } else {
  1251. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1252. }
  1253. })
  1254. } else {
  1255. console.log('点击重新生成')
  1256. MessageBox.confirm('重新生成计划会将原有计划清空再生成,是否确认重新生成?', {
  1257. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  1258. }).then(() => {
  1259. this.automaticGeneration.dialogFormVisible = false
  1260. this.requestParam = {}
  1261. this.requestParam.pastureid = Cookies.get('pastureid')
  1262. this.requestParam.type = 1
  1263. const url = 'authdata/autogeneration'
  1264. const data = this.requestParam
  1265. postJson(url, data).then(response => {
  1266. console.log('新增保存发送参数', this.requestParam)
  1267. if (response.msg !== 'fail') {
  1268. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  1269. this.automaticGeneration.dialogFormVisible = false
  1270. this.getIsDisplay()
  1271. } else {
  1272. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1273. }
  1274. })
  1275. }).catch(() => {
  1276. this.$message({ type: 'info', message: '已取消重新生成' })
  1277. })
  1278. }
  1279. },
  1280. handleChangeOrder() {
  1281. console.log('更改顺序')
  1282. this.isOrder = false
  1283. this.rowDrop()
  1284. },
  1285. // 行拖拽
  1286. rowDrop() {
  1287. console.log(document.querySelector('#table .el-table__body-wrapper tbody'))
  1288. const tbody = document.querySelector('#table .el-table__body-wrapper tbody')
  1289. const that = this
  1290. var sortable = Sortable.create(tbody, {
  1291. disabled: that.dropState,
  1292. onChoose({ newIndex, oldIndex }) {
  1293. console.log(that.isOrder, 'that.isOrder == false')
  1294. console.log(that.dropState, 'that.dropState')
  1295. if (that.dropState == true || that.isOrder == true) {
  1296. sortable.destroy()
  1297. }
  1298. },
  1299. onEnd({ newIndex, oldIndex }) {
  1300. const currRow = that.table.list.splice(oldIndex, 1)[0]
  1301. that.table.list.splice(newIndex, 0, currRow)
  1302. console.log('索引', newIndex)
  1303. console.log('拖动数据', currRow)
  1304. console.log('上', that.table.list[newIndex - 1])
  1305. console.log('下', that.table.list[newIndex + 1])
  1306. }
  1307. })
  1308. },
  1309. saveChangeOrder() {
  1310. // 保存顺序
  1311. var sortArr = []
  1312. for (let i = 0; i < this.table.list.length; i++) {
  1313. var obj = {}
  1314. obj.sort = i + 1
  1315. obj.id = this.table.list[i].id
  1316. obj.pastureid = this.table.list[i].pastureid
  1317. sortArr.push(obj)
  1318. }
  1319. const url = 'authdata/trains'
  1320. const data = sortArr
  1321. postJson(url, data).then(response => {
  1322. if (response.msg === 'fail') {
  1323. this.$notify({ title: '顺序切换失败', message: response.data, type: 'warning', duration: 2000 })
  1324. } else {
  1325. this.$notify({ title: '', message: '顺序切换成功', type: 'success', duration: 2000 })
  1326. this.table.getdataListParm.parammaps.refresh = 1
  1327. this.getList()
  1328. this.isOrder = true
  1329. }
  1330. })
  1331. },
  1332. cancelChangeOrder() {
  1333. console.log('取消顺序')
  1334. this.table.getdataListParm.parammaps.refresh = 1
  1335. this.getList()
  1336. this.isOrder = true
  1337. },
  1338. handleTakeEffect() {
  1339. if (this.selectList.length == 0) {
  1340. this.$message({ type: 'error', message: '请选择车次信息', duration: 2000 })
  1341. } else {
  1342. MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否生效?', {
  1343. confirmButtonText: '确认',
  1344. cancelButtonText: '取消',
  1345. type: 'warning'
  1346. }).then(() => {
  1347. for (let i = 0; i < this.selectList.length; i++) {
  1348. this.selectList[i].sel = 1
  1349. }
  1350. console.log('生效', this.selectList)
  1351. this.requestParam.common = { 'returnmap': '0' }
  1352. this.requestParam.data = []
  1353. this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
  1354. this.requestParam.data[0].children = []
  1355. this.requestParam.data[0].children[0] = {
  1356. 'name': 'updatelpplanEnable', 'type': 'e', 'parammaps': { sel: '@insertSpotList.sel', id: '@insertSpotList.id', pastureid: '@insertSpotList.pastureid' }
  1357. }
  1358. ExecDataByConfig(this.requestParam).then(response => {
  1359. console.log('生效保存发送参数', this.requestParam)
  1360. if (response.msg === 'fail') {
  1361. this.$notify({ title: '生效失败', message: response.data, type: 'warning', duration: 2000 })
  1362. } else {
  1363. this.$notify({ title: '', message: '生效成功', type: 'success', duration: 2000 })
  1364. this.table.getdataListParm.parammaps.refresh = 1
  1365. this.getList()
  1366. }
  1367. })
  1368. })
  1369. }
  1370. },
  1371. handleDisable() {
  1372. if (this.selectList.length == 0) {
  1373. this.$message({ type: 'error', message: '请选择车次信息', duration: 2000 })
  1374. } else {
  1375. MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否禁用?', {
  1376. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  1377. }).then(() => {
  1378. for (let i = 0; i < this.selectList.length; i++) {
  1379. this.selectList[i].sel = 0
  1380. }
  1381. console.log('禁用', this.selectList)
  1382. this.requestParam.common = { 'returnmap': '0' }
  1383. this.requestParam.data = []
  1384. this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
  1385. this.requestParam.data[0].children = []
  1386. this.requestParam.data[0].children[0] = {
  1387. 'name': 'updatelpplanEnable',
  1388. 'type': 'e',
  1389. 'parammaps': { sel: '@insertSpotList.sel', id: '@insertSpotList.id', pastureid: '@insertSpotList.pastureid' }
  1390. }
  1391. ExecDataByConfig(this.requestParam).then(response => {
  1392. console.log('禁用保存发送参数', this.requestParam)
  1393. if (response.msg === 'fail') {
  1394. this.$notify({ title: '禁用失败', message: response.data, type: 'warning', duration: 2000 })
  1395. } else {
  1396. this.$notify({ title: '禁用成功', message: '禁用成功', type: 'success', duration: 2000 })
  1397. this.table.getdataListParm.parammaps.refresh = 1
  1398. this.getList()
  1399. }
  1400. })
  1401. })
  1402. }
  1403. },
  1404. // 历史记录
  1405. handleHistoryRecord() {
  1406. console.log('点击历史记录')
  1407. this.dialogFull = false
  1408. this.historyRecord.dialogStatus = 'historyRecord'
  1409. this.historyRecord.dialogFormVisible = true
  1410. const vue = this
  1411. var myComponent = () => import('./historyRecord.vue')
  1412. return vue.historyRecord.myComponent = myComponent
  1413. },
  1414. handleCheck() {
  1415. console.log('点击了校验')
  1416. this.check.dialogStatus = 'check'
  1417. this.check.dialogFormVisible = true
  1418. this.getCheckList()
  1419. },
  1420. getCheckList() {
  1421. const url = 'authdata/spillage'
  1422. const data = {
  1423. page: 1,
  1424. offset: 1,
  1425. pagecount: 0,
  1426. returntype: 'Map',
  1427. parammaps: {
  1428. pastureid: Cookies.get('pastureid'),
  1429. times: this.table.getdataListParm.parammaps.times,
  1430. refresh: 2
  1431. }
  1432. }
  1433. postJson(url, data).then(response => {
  1434. if (response.data.ftlist !== undefined && response.data.ftlist !== null) {
  1435. this.$set(this.check.temp,'isDistribution',0)
  1436. this.check.temp.ftlist = response.data.ftlist
  1437. } else {
  1438. this.check.temp = {}
  1439. this.$set(this.check.temp,'isDistribution',1)
  1440. }
  1441. })
  1442. },
  1443. handleEmpty(){
  1444. console.log('点击了清空')
  1445. var list = []
  1446. for(let i=0;i<this.create.list2.length;i++){
  1447. var obj = {}
  1448. obj.pastureid = this.create.list2[i].pastureid
  1449. obj.id = this.create.list2[i].fpdid
  1450. obj.fttype = this.create.list2[i].fttype
  1451. obj.lweight = '-'+this.create.list2[i].weight
  1452. list.push(obj)
  1453. }
  1454. this.requestParam = {}
  1455. this.requestParam.common = { 'returnmap': '0' }
  1456. this.requestParam.data = []
  1457. this.requestParam.data[0] = { 'name': 'deleteLpplandtl1ByLppid', 'type': 'e', 'parammaps': { lppid: this.create.temp.id, pastureid: Cookies.get('pastureid') }},
  1458. this.requestParam.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': list }}
  1459. this.requestParam.data[1].children = []
  1460. this.requestParam.data[1].children[0] = {
  1461. 'name': 'updateFpdetailUse',
  1462. 'type': 'e',
  1463. 'parammaps': { pastureid: '@insertSpotList.pastureid', id: '@insertSpotList.id', fttype: '@insertSpotList.fttype', lweight: '@insertSpotList.lweight' }
  1464. }
  1465. ExecDataByConfig(this.requestParam).then(response => {
  1466. console.log('清空保存发送参数', this.requestParam)
  1467. if (response.msg === 'fail') {
  1468. this.$notify({ title: '清空失败', message: response.data, type: 'warning', duration: 2000 })
  1469. } else {
  1470. this.$notify({ title: '清空成功', message: '清空成功', type: 'success', duration: 2000 })
  1471. this.getCreateList1()
  1472. }
  1473. })
  1474. },
  1475. handleAllEmpty(){
  1476. MessageBox.confirm('执行该操作会将现有车次已分配的撒料栏舍全部清空,是否要执行该操作?', {
  1477. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  1478. }).then(() => {
  1479. this.requestParam = {}
  1480. this.requestParam.common = { 'returnmap': '0' }
  1481. this.requestParam.data = []
  1482. this.requestParam.data[0] = { 'name': 'deleteLpplandtl1All', 'type': 'e', 'parammaps': { pastureid: Cookies.get('pastureid') ,times:this.table.getdataListParm.parammaps.times}},
  1483. this.requestParam.data[1] = { 'name': 'deletefpdetailAll', 'type': 'e', 'parammaps': { pastureid: Cookies.get('pastureid') ,times:this.table.getdataListParm.parammaps.times}},
  1484. this.requestParam.data[1] = { 'name': 'deletefpdetailAll', 'type': 'e', 'parammaps': { pastureid: Cookies.get('pastureid') ,times:this.table.getdataListParm.parammaps.times}},
  1485. ExecDataByConfig(this.requestParam).then(response => {
  1486. console.log('清空已分配栏舍', this.requestParam)
  1487. if (response.msg === 'fail') {
  1488. this.$notify({ title: '清空失败', message: response.data, type: 'warning', duration: 2000 })
  1489. } else {
  1490. // 临时注释
  1491. // let url = 'authdata/spillageall/del'
  1492. // let data = {}
  1493. // data.parammaps = {}
  1494. // data.parammaps.pastureid = Cookies.get('pastureid')
  1495. // data.parammaps.times = this.table.getdataListParm.parammaps.times
  1496. // postJson(url, data).then(response => {
  1497. // if (response.msg !== 'fail') {
  1498. // this.$notify({ title: '清空成功', message: '清空成功', type: 'success', duration: 2000 })
  1499. // this.getList()
  1500. // } else {
  1501. // this.$notify({ title: '清空失败', message: response.data, type: 'warning', duration: 2000 })
  1502. // }
  1503. // })
  1504. // 临时注释
  1505. this.$notify({ title: '清空成功', message: '清空成功', type: 'success', duration: 2000 })
  1506. this.getList()
  1507. }
  1508. })
  1509. })
  1510. }
  1511. }
  1512. }
  1513. </script>
  1514. <style lang="scss" scoped>
  1515. .list{width: 60px;display: inline-block;margin: 5px 5px;text-align: center;
  1516. .tmrname{
  1517. width:100%;padding: 5px 5px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  1518. }
  1519. }
  1520. .fenceHouse {
  1521. height: 130px;
  1522. background: #fff;
  1523. position: relative;
  1524. ::-webkit-scrollbar {
  1525. width: 7px;
  1526. height: 7px;
  1527. background-color: #F5F5F5;
  1528. }
  1529. ::-webkit-scrollbar-track {
  1530. box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  1531. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  1532. border-radius: 10px;
  1533. background-color: #F5F5F5;
  1534. }
  1535. ::-webkit-scrollbar-thumb {
  1536. border-radius: 10px;
  1537. box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
  1538. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
  1539. background-color: #c8c8c8;
  1540. }
  1541. .fenceHouseList {
  1542. position: absolute;
  1543. width: 100%;
  1544. margin: 0 0;
  1545. height: 130px;
  1546. list-style: none;
  1547. padding: 0 0;
  1548. overflow: auto;
  1549. font-size: 12px;
  1550. .fenceHouseTitle {
  1551. float: left;
  1552. width: 105px;
  1553. white-space: nowrap;
  1554. overflow: hidden;
  1555. text-overflow: ellipsis;
  1556. margin: 5px 5px;
  1557. border-radius: 7px;
  1558. text-align: center;
  1559. color: #000;
  1560. height: 36px;
  1561. line-height: 36px;
  1562. }
  1563. li {
  1564. text-align: center;
  1565. color: #fff;
  1566. .barname {
  1567. display: block;
  1568. width: 100%;
  1569. overflow: hidden;
  1570. text-overflow: ellipsis;
  1571. white-space: nowrap;
  1572. }
  1573. .barWeight{
  1574. display: block;
  1575. line-height: 18px;
  1576. height: 18px;
  1577. color: #000;
  1578. width: 100%;
  1579. margin: 0 auto;
  1580. }
  1581. .colorBlock{
  1582. width: 88px;float: left;margin:5px 5px;height: 36px;
  1583. }
  1584. }
  1585. }
  1586. }
  1587. </style>
  1588. <style lang="scss" >
  1589. .spreadingMaterial {
  1590. height: 200px;
  1591. ::-webkit-scrollbar {
  1592. width: 7px;
  1593. height: 7px;
  1594. background-color: #F5F5F5;
  1595. }
  1596. ::-webkit-scrollbar-track {
  1597. box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  1598. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  1599. border-radius: 10px;
  1600. background-color: #F5F5F5;
  1601. }
  1602. ::-webkit-scrollbar-thumb {
  1603. border-radius: 10px;
  1604. box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
  1605. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
  1606. background-color: #c8c8c8;
  1607. }
  1608. .spreadingMaterialList{height: 100%;overflow: auto;}
  1609. .list-group-item2 {
  1610. width: 220px;
  1611. height: 50px;
  1612. overflow: hidden;
  1613. float: left;
  1614. margin: 5px 5px;
  1615. position: relative;
  1616. color: #fff;
  1617. .arr-t {
  1618. height: 50px;
  1619. border-radius: 5px 5px;
  1620. }
  1621. .arr-l {
  1622. float: left;
  1623. width: 60px;
  1624. height: 50px;
  1625. overflow: hidden;
  1626. border-radius: 5px 50% 50% 5px;
  1627. .arr-l-t {
  1628. position: relative;
  1629. .arr-l-t-t {
  1630. width: 0;
  1631. height: 0;
  1632. border-top: 26px solid #3479f2;
  1633. border-right: 26px solid transparent;
  1634. }
  1635. .arr-l-t-b {
  1636. position: absolute;
  1637. top: 4px;
  1638. left: 1px;
  1639. color: #fff;
  1640. width: 10px;
  1641. height: 10px;
  1642. .el-input--suffix {
  1643. opacity: 0;
  1644. .el-input__inner {
  1645. height: 10px;
  1646. }
  1647. }
  1648. }
  1649. }
  1650. .arr-l-b {
  1651. width: 45px;
  1652. position: absolute;
  1653. top: 15px;
  1654. left: 10px;
  1655. color: #fff !important;
  1656. font-size: 12px;
  1657. .tmrname {
  1658. width: 100%;
  1659. overflow: hidden;
  1660. text-overflow: ellipsis;
  1661. white-space: nowrap;
  1662. }
  1663. }
  1664. }
  1665. .arr-c {
  1666. position: absolute;
  1667. top: 0px;
  1668. left: 0;
  1669. }
  1670. .arr-r {
  1671. float: right;
  1672. width: 160px;
  1673. height: 50px;
  1674. overflow: hidden;
  1675. line-height: 50px;
  1676. .arr-r-l {
  1677. float: left;
  1678. width: 70px;
  1679. .barname {
  1680. width: 95%;
  1681. overflow: hidden;
  1682. text-overflow: ellipsis;
  1683. white-space: nowrap;
  1684. font-size: 14px;
  1685. text-align: center;
  1686. }
  1687. }
  1688. .arr-r-c {
  1689. float: left;
  1690. width: 10px;
  1691. }
  1692. .arr-r-r {
  1693. float: left;
  1694. width: 65px;
  1695. .weight {
  1696. width: 100%;
  1697. overflow: hidden;
  1698. text-overflow: ellipsis;
  1699. white-space: nowrap;
  1700. font-size: 14px;
  1701. }
  1702. }
  1703. }
  1704. }
  1705. }
  1706. </style>