index.vue 86 KB

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