index - 副本.vue 93 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875
  1. <template>
  2. <div v-loading="fullscreenLoading" element-loading-text="给我一点时间" class="app-container">
  3. <div class="menuList">
  4. <div class="menuList-t">
  5. <div class="menuList-t-l">
  6. <span>班次:</span>
  7. <el-radio-group v-model="menuRadio" size="small" @change="changeMenu">
  8. <el-radio-button v-if="maxTime.isTime1" label="一班">一班</el-radio-button>
  9. <el-radio-button v-if="maxTime.isTime2" label="二班">二班</el-radio-button>
  10. <el-radio-button v-if="maxTime.isTime3" label="三班">三班</el-radio-button>
  11. <el-radio-button v-if="maxTime.isTime4" label="四班">四班</el-radio-button>
  12. </el-radio-group>
  13. </div>
  14. <div class="menuList-t-r">
  15. <div v-if="!isBarracks" class="menuList-t-r-l" @click="clickBarracks(2);">栏舍计划统计-展开<i
  16. class="el-icon-arrow-down"
  17. /></div>
  18. <div v-if="isBarracks" class="menuList-t-r-r" @click="clickBarracks(1);">栏舍计划统计-收起<i
  19. class="el-icon-arrow-up"
  20. /></div>
  21. <div v-if="isBarracks" class="columnHouse">
  22. <div class="smallTable">
  23. <el-table
  24. :list-loading="smallMenu.listLoading"
  25. element-loading-text="给我一点时间"
  26. :data="smallMenu.list"
  27. :row-style="rowStyle2"
  28. :cell-style="cellStyle2"
  29. :header-row-style="headerRowStyle2"
  30. :header-cell-style="headerCellStyle2"
  31. show-summary
  32. sum-text="总栏舍"
  33. class="elTable"
  34. >
  35. <el-table-column label="配方/班次" min-width="80px" align="center" prop="tname" />
  36. <el-table-column label="总数" min-width="50px" align="center" prop="usedsum" />
  37. <el-table-column
  38. v-if="maxTime.isTime1"
  39. label="第一班未分配"
  40. min-width="105px"
  41. align="center"
  42. prop="onetime"
  43. />
  44. <el-table-column
  45. v-if="maxTime.isTime2"
  46. label="第二班未分配"
  47. min-width="105px"
  48. align="center"
  49. prop="twotime"
  50. />
  51. <el-table-column
  52. v-if="maxTime.isTime3"
  53. label="第三班未分配"
  54. min-width="105px"
  55. align="center"
  56. prop="threetime"
  57. />
  58. <el-table-column
  59. v-if="maxTime.isTime4"
  60. label="第四班未分配"
  61. min-width="105px"
  62. align="center"
  63. prop="fourtime"
  64. />
  65. </el-table>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. <div class="menuList-b">
  71. <ul v-loading="listLoadingTimes" class="draggableList">
  72. <li v-for="element in MenuList" :key="element.arrid">
  73. <span v-if="element.isShowTitle" class="draggableTitle">{{ element.ftname }}:</span>
  74. <draggable
  75. v-if="dropState== false && isRoleEdit"
  76. id="1"
  77. data-source="juju1"
  78. :list="element.arrList"
  79. class="list-group1"
  80. draggable=".item"
  81. group="a"
  82. animation="500"
  83. force-fallback="true"
  84. :move="move"
  85. @change="changeLog"
  86. @start="start"
  87. @end="end"
  88. >
  89. <div
  90. v-for="item in element.arrList"
  91. id="item1"
  92. :key="item.id"
  93. class="list-group-item1 item"
  94. style="width: 88px;float: left;margin:5px 5px;height: 36px;"
  95. >
  96. <div style="position: relative;">
  97. <el-tooltip
  98. placement="top"
  99. style="height: 18px;line-height: 18px;"
  100. :style="{'background':item.background}"
  101. >
  102. <div slot="content">{{ item.barname }}</div>
  103. <div class="draggableName not-select">{{ item.barname }}</div>
  104. </el-tooltip>
  105. <div class="draggableWeight not-select" :style="{ background: 'rgba('+item.background2+ ',0.1)' }">
  106. <!-- <span v-if="item.isfill==1" style="background: #009C69;color:#fff;position: absolute;left: 0;top: 0;">补</span> -->
  107. {{ item.weight }}
  108. </div>
  109. </div>
  110. </div>
  111. </draggable>
  112. <div
  113. v-else
  114. id="1"
  115. data-source="juju1"
  116. :list="element.arrList"
  117. class="list-group1"
  118. draggable=".item"
  119. group="a"
  120. animation="500"
  121. force-fallback="true"
  122. :move="move"
  123. @change="changeLog"
  124. @start="start"
  125. @end="end"
  126. >
  127. <div
  128. v-for="item in element.arrList"
  129. :key="item.id"
  130. class="list-group-item1 item"
  131. style="width: 88px;float: left;margin:5px 5px;height: 36px;"
  132. >
  133. <div style="position: relative">
  134. <el-tooltip
  135. placement="top"
  136. style="height: 18px;line-height: 18px;"
  137. :style="{'background':item.background}"
  138. >
  139. <div slot="content">{{ item.barname }}</div>
  140. <div class="draggableName not-select">{{ item.barname }}</div>
  141. </el-tooltip>
  142. <div class="draggableWeight not-select" :style="{ background: 'rgba('+item.background2+ ',0.1)' }">
  143. {{ item.weight }} </div>
  144. <!-- <span v-if="item.isfill==1" style="background: #009C69;color:#fff;position: absolute;left: 0;top: 18px;">补</span> -->
  145. </div>
  146. </div>
  147. </div>
  148. </li>
  149. </ul>
  150. </div>
  151. </div>
  152. <div ref="list" class="list">
  153. <div class="operation">
  154. <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" style="float:left;" @click="handleCreate">新增车次
  155. </el-button>
  156. <el-button
  157. v-if="isRoleEdit"
  158. class="danger"
  159. icon="el-icon-delete"
  160. style="float:left;"
  161. @click="handleReduceTrains"
  162. >减少车次</el-button>
  163. <el-button
  164. v-if="isRoleEdit"
  165. class="success"
  166. icon="el-icon-download"
  167. style="float:left;"
  168. @click="handleAutomaticGeneration"
  169. >自动生成</el-button>
  170. <el-button
  171. v-if="isOrder && isRoleEdit"
  172. icon="el-icon-sort"
  173. style="float: left;"
  174. class="success"
  175. @click="handleChangeOrder"
  176. >更改顺序</el-button>
  177. <div v-else style="float: left;margin-left: 10px;">
  178. <el-button v-if="isRoleEdit" icon="el-icon-folder-checked" class="success" @click="saveChangeOrder">保存
  179. </el-button>
  180. <el-button v-if="isRoleEdit" icon="el-icon-close" class="sortCancel" @click="cancelChangeOrder">取消</el-button>
  181. </div>
  182. <el-button v-if="isRoleEdit" class="success" icon="el-icon-open" style="float: left;" @click="handleTakeEffect">
  183. 生效</el-button>
  184. <el-button v-if="isRoleEdit" class="danger" icon="el-icon-turn-off" style="float: left;" @click="handleDisable">
  185. 禁用</el-button>
  186. <el-button class="success" icon="el-icon-time" style="float:right;" @click="handleHistoryRecord">历史记录
  187. </el-button>
  188. </div>
  189. <div class="table">
  190. <el-table
  191. id="table"
  192. :key="table.tableKey"
  193. ref="table"
  194. v-loading="table.listLoading"
  195. v-loadmore="loadMore"
  196. element-loading-text="给我一点时间"
  197. :data="table.list"
  198. border
  199. highlight-current-row
  200. style="width: 100%;"
  201. :height="height"
  202. :row-style="rowStyle"
  203. :cell-style="cellStyle"
  204. class="elTable"
  205. row-key="id"
  206. @selection-change="handleSelect"
  207. >
  208. <el-table-column type="selection" width="50" />
  209. <el-table-column label="车次" width="80px" align="center" class-name="small-padding fixed-width" fixed="">
  210. <template slot-scope="scope">
  211. <span v-show="scope.row.NoEdit">{{ scope.row.sort }}</span>
  212. <el-input
  213. v-show="scope.row.Edit"
  214. v-model="scope.row.sort"
  215. type="number"
  216. placeholder="车次"
  217. class="filter-item"
  218. style="display: inline-block;width: 95%;"
  219. />
  220. </template>
  221. </el-table-column>
  222. <el-table-column
  223. label="TMR编号"
  224. width="110px"
  225. align="center"
  226. class-name="small-padding fixed-width"
  227. fixed="left"
  228. >
  229. <template slot-scope="scope">
  230. <span v-show="scope.row.NoEdit">{{ scope.row.tmrname }}</span>
  231. <el-select
  232. v-show="scope.row.Edit"
  233. v-model="scope.row.tmrid"
  234. placeholder="TMR编号"
  235. class="filter-item"
  236. style="width:95%;"
  237. @change="(value)=> {changeTMRNumber(value, scope.row)}"
  238. >
  239. <el-option v-for="item in TMRNumberList" :key="item.id" :label="item.eqcode" :value="item.id" />
  240. </el-select>
  241. </template>
  242. </el-table-column>
  243. <el-table-column label="描述" width="110px" align="center">
  244. <template slot-scope="scope">
  245. <span v-show="scope.row.NoEdit">{{ scope.row.display }}</span>
  246. <el-input
  247. v-show="scope.row.Edit"
  248. v-model="scope.row.display"
  249. type="textarea"
  250. :autosize="{ minRows: 1.3, maxRows: 4}"
  251. placeholder="描述"
  252. maxlength="255"
  253. class="filter-item"
  254. style="display: inline-block;width: 95%;"
  255. />
  256. </template>
  257. </el-table-column>
  258. <el-table-column label="生效" width="80px" align="center">
  259. <template slot-scope="scope">
  260. <el-switch
  261. v-model="scope.row.sel"
  262. :disabled="scope.row.NoEdit"
  263. active-color="#13ce66"
  264. inactive-color="#ff4949"
  265. :active-value="1"
  266. :inactive-value="0"
  267. @change="handleTakeEffectChange(scope.$index, scope.row)"
  268. />
  269. </template>
  270. </el-table-column>
  271. <el-table-column label="班次" width="100px" align="center">
  272. <template slot-scope="scope">
  273. <span v-show="scope.row.NoEdit">{{ scope.row.timesstr }}</span>
  274. <el-select
  275. v-show="scope.row.Edit"
  276. v-model="scope.row.times"
  277. :disabled="scope.row.Disabled"
  278. placeholder="班次"
  279. class="filter-item"
  280. style="width:95%;"
  281. >
  282. <el-option v-for="item in frequencyList" :key="item.id" :label="item.name" :value="item.id" />
  283. </el-select>
  284. </template>
  285. </el-table-column>
  286. <el-table-column label="时间" width="125px" align="center">
  287. <template slot-scope="scope">
  288. <span v-show="scope.row.NoEdit">{{ scope.row.begintime }}</span>
  289. <el-time-picker
  290. v-show="scope.row.Edit"
  291. v-model="scope.row.begintime"
  292. type="datetime"
  293. placeholder="选择时间"
  294. format="HH:mm"
  295. value-format="HH:mm"
  296. style="display: inline-block;width: 95%;"
  297. />
  298. </template>
  299. </el-table-column>
  300. <el-table-column label="最大重量" width="75px" align="center">
  301. <template slot-scope="scope">
  302. <span>{{ scope.row.maxweight }}</span>
  303. </template>
  304. </el-table-column>
  305. <el-table-column label="合计重量" width="80px" align="center">
  306. <template slot-scope="scope">
  307. <span>{{ scope.row.sumweight }}</span>
  308. </template>
  309. </el-table-column>
  310. <el-table-column label="模板配方" width="120px" align="center">
  311. <template slot-scope="scope">
  312. <span v-show="scope.row.NoEdit">{{ scope.row.ftname }}</span>
  313. <el-select
  314. v-show="scope.row.Edit"
  315. v-model="scope.row.ftid"
  316. :disabled="scope.row.Disabled"
  317. placeholder="模板配方"
  318. class="filter-item"
  319. style="width:95%;"
  320. @change="(value)=> {changeTemplateFormulation(value, scope.row)}"
  321. >
  322. <el-option
  323. v-for="item in templateFormulationList"
  324. :key="item.id"
  325. :label="item.tname"
  326. :value="item.id"
  327. />
  328. </el-select>
  329. </template>
  330. </el-table-column>
  331. <el-table-column v-show="isInforvalue" label="是否提前小料拆分" width="80px" align="center">
  332. <template slot-scope="scope">
  333. <el-switch
  334. v-model="scope.row.issplit"
  335. :disabled="scope.row.NoEdit"
  336. active-color="#13ce66"
  337. inactive-color="#ff4949"
  338. :active-value="1"
  339. :inactive-value="0"
  340. @change="handleIssplitChange(scope.$index, scope.row)"
  341. />
  342. </template>
  343. </el-table-column>
  344. <el-table-column label="撒料" width="950px" align="center">
  345. <template slot-scope="scope">
  346. <draggable
  347. v-if="dropState== false && isRoleEdit"
  348. id="2"
  349. data-source="juju"
  350. :list="scope.row.arrList"
  351. class="list-group2"
  352. draggable=".item"
  353. group="a"
  354. animation="500"
  355. force-fallback="true"
  356. :move="move2"
  357. @change="changeLog2(scope.row)"
  358. @start="start2"
  359. @end="end2(scope.row)"
  360. >
  361. <div v-for="element in scope.row.arrList" :key="element.name" class="list-group-item2 item">
  362. <div class="arr-l" :style="{'background':element.tbackground}">
  363. <div class="arr-l-t">
  364. <div class="arr-l-t-t" />
  365. <el-select
  366. v-model="element.tmrid"
  367. placeholder="撒料设备"
  368. class="arr-l-t-b el-icon-arrow-down"
  369. @change="(value)=> {changeEquipment(value, scope.row,element.fttype,element.id)}"
  370. >
  371. <el-option
  372. v-for="item in equipmentList"
  373. :key="item.id"
  374. :disabled="table.myTemp.isUpdateSave"
  375. :label="item.tmrmix"
  376. :value="item.id"
  377. />
  378. </el-select>
  379. </div>
  380. <div class="arr-l-b">
  381. <el-tooltip placement="top" class="list-group-item1 item" style="height: 18px;line-height: 18px;">
  382. <div slot="content">{{ element.tmrname }}</div>
  383. <div class="tmrname">{{ element.tmrname }}</div>
  384. </el-tooltip>
  385. </div>
  386. <!-- <div v-if="element.fttype==0" style="background: #009C69;position:absolute;bottom: 0;left: 0;">补</div> -->
  387. </div>
  388. <div class="arr-r">
  389. <div class="arr-r-l">
  390. <el-tooltip placement="top">
  391. <div slot="content">{{ element.barname }}</div>
  392. <div class="barname">{{ element.barname }}</div>
  393. </el-tooltip>
  394. </div>
  395. <div class="arr-r-c">-</div>
  396. <div class="arr-r-r">
  397. <el-tooltip v-show="!element.isWeight" placement="top">
  398. <div slot="content">{{ element.weight }}</div>
  399. <div class="weight" @dblclick="dbclickWeight(element)">{{ element.weight }}</div>
  400. </el-tooltip>
  401. <el-tooltip v-show="element.isWeight && isRoleEdit" placement="top">
  402. <div slot="content">{{ element.weight }}</div>
  403. <input
  404. ref="weight"
  405. v-model="element.weight"
  406. v-focus="element.focusState"
  407. :disabled="table.myTemp.isUpdateSave"
  408. type="number"
  409. placeholder="重量"
  410. step="0.01"
  411. class="filter-item2"
  412. style="display: inline-block;height:25px;padding:4px 0px; font-size:12px;width: 95%;border: 1px solid #e6e6e6;"
  413. @blur="(value)=> {blurWeight(scope.row,element.fttype,element.id)}"
  414. >
  415. </el-tooltip>
  416. <el-tooltip v-show="element.isWeight && isRoleEdit" placement="top">
  417. <div slot="content">{{ element.weight }}</div>
  418. <div class="weight" @dblclick="dbclickWeight(element)">{{ element.weight }}</div>
  419. </el-tooltip>
  420. </div>
  421. </div>
  422. <div class="arr-t" :style="{'background':element.background}">
  423. <i
  424. class="el-icon-close"
  425. style="position: absolute;right: 0;"
  426. @click="handleFLDelete(element,scope.row)"
  427. />
  428. </div>
  429. </div>
  430. </draggable>
  431. <!-- <div v-else id="2" data-source="juju" :list="scope.row.arrList" class="list-group2" draggable=".item" group="a"> -->
  432. <div v-else :list="scope.row.arrList" class="list-group2">
  433. <div v-for="element in scope.row.arrList" :key="element.name" class="list-group-item2 item">
  434. <div class="arr-l" :style="{'background':element.tbackground}">
  435. <div class="arr-l-t">
  436. <div class="arr-l-t-t" />
  437. <el-select
  438. v-model="element.tmrid"
  439. placeholder="撒料设备"
  440. :disabled="!isRoleEdit"
  441. class="arr-l-t-b el-icon-arrow-down"
  442. @change="(value)=> {changeEquipment(value, scope.row,element.fttype,element.id)}"
  443. >
  444. <el-option
  445. v-for="item in equipmentList"
  446. :key="item.id"
  447. :disabled="table.myTemp.isUpdateSave"
  448. :label="item.tmrmix"
  449. :value="item.id"
  450. />
  451. </el-select>
  452. </div>
  453. <div class="arr-l-b">
  454. <el-tooltip placement="top" class="list-group-item1 item" style="height: 18px;line-height: 18px;">
  455. <div slot="content">{{ element.tmrname }}</div>
  456. <div class="tmrname">{{ element.tmrname }}</div>
  457. </el-tooltip>
  458. </div>
  459. <!-- <div v-if="element.fttype==0" style="background: #009C69;position:absolute;bottom: 0;left: 0;">补</div> -->
  460. </div>
  461. <div class="arr-r">
  462. <div class="arr-r-l">
  463. <el-tooltip placement="top">
  464. <div slot="content">{{ element.barname }}</div>
  465. <div class="barname">{{ element.barname }}</div>
  466. </el-tooltip>
  467. </div>
  468. <div class="arr-r-c">-</div>
  469. <div class="arr-r-r">
  470. <el-tooltip v-show="!element.isWeight" placement="top">
  471. <div slot="content">{{ element.weight }}</div>
  472. <div class="weight" @dblclick="dbclickWeight(element)">{{ element.weight }}</div>
  473. </el-tooltip>
  474. <el-tooltip v-show="element.isWeight && isRoleEdit" placement="top">
  475. <div slot="content">{{ element.weight }}</div>
  476. <input
  477. ref="weight"
  478. v-model="element.weight"
  479. v-focus="element.focusState"
  480. type="number"
  481. placeholder="重量1"
  482. step="0.01"
  483. class="filter-item2"
  484. style="display: inline-block;height:25px;padding:4px 0px; font-size:12px;width: 95%;border: 1px solid #e6e6e6;"
  485. @blur="(value)=> {blurWeight(scope.row,element.fttype,element.id)}"
  486. >
  487. </el-tooltip>
  488. <el-tooltip v-show="element.isWeight && !isRoleEdit" placement="top">
  489. <div slot="content">{{ element.weight }}</div>
  490. <div class="weight">{{ element.weight }}</div>
  491. </el-tooltip>
  492. </div>
  493. </div>
  494. <div class="arr-t" :style="{'background':element.background}">
  495. <i
  496. v-if="isRoleEdit"
  497. class="el-icon-close"
  498. style="position: absolute;right: 0;"
  499. @click="handleFLDelete(element,scope.row)"
  500. />
  501. </div>
  502. </div>
  503. </div>
  504. </template>
  505. </el-table-column>
  506. <el-table-column label="操作" align="center" width="80" class-name="small-padding fixed-width" fixed="right">
  507. <template slot-scope="{row}">
  508. <el-button
  509. v-if="row.isCreate && isRoleEdit"
  510. :disabled="isokDisable"
  511. icon="el-icon-folder-checked"
  512. class="miniSuccess"
  513. @click="createData(row)"
  514. />
  515. <span v-if="row.isCreate && isRoleEdit" class="centerSpan">|</span>
  516. <el-button
  517. v-if="row.isCreate && isRoleEdit"
  518. class="minCancel"
  519. icon="el-icon-close"
  520. @click="createCancel(row)"
  521. />
  522. <el-button
  523. v-if="row.isUpdate && isRoleEdit"
  524. class="miniSuccess"
  525. icon="el-icon-edit-outline"
  526. @click="handleUpdate(row)"
  527. />
  528. <span v-if="row.isUpdate && isRoleEdit" class="centerSpan">|</span>
  529. <el-button
  530. v-if="row.isUpdate && isRoleEdit"
  531. class="miniDanger"
  532. icon="el-icon-delete"
  533. @click="handleRowDelete(row)"
  534. />
  535. <el-button
  536. v-if="row.isUpdateSave && isRoleEdit"
  537. :disabled="isokDisable"
  538. icon="el-icon-folder-checked"
  539. class="miniSuccess"
  540. @click="updateData(row)"
  541. />
  542. <span v-if="row.isUpdateSave && isRoleEdit" class="centerSpan">|</span>
  543. <el-button
  544. v-if="row.isUpdateSave && isRoleEdit"
  545. class="minCancel"
  546. icon="el-icon-close"
  547. @click="updateCancel(row)"
  548. />
  549. </template>
  550. </el-table-column>
  551. </el-table>
  552. <span
  553. v-if="table.listLoading == false"
  554. style="margin-right: 30px;margin-top: 10px;font-size: 14px;"
  555. >共{{ table.total }}条</span>
  556. </div>
  557. <!-- 自动生成 -->
  558. <el-dialog
  559. :fullscreen="dialogFull"
  560. :destroy-on-close="true"
  561. :visible.sync="automaticGeneration.dialogFormVisible"
  562. :close-on-click-modal="false"
  563. width="30%"
  564. >
  565. <template slot="title">
  566. <div class="avue-crud__dialog__header">
  567. <span class="el-dialog__title">
  568. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
  569. {{ textMap[automaticGeneration.dialogStatus] }}
  570. </span>
  571. <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
  572. <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
  573. <svg-icon v-else icon-class="fullscreen" />
  574. </div>
  575. </div>
  576. </template>
  577. <div class="app-automaticGeneration" style="margin: 0 auto;">
  578. <div style="width: 210px;margin:60px auto 120px;font-weight: 16px;">
  579. 请选择自动生成方式:<br>
  580. 清空计划并生成新计划;<br>
  581. 当前计划基础上继续生成计划;<br>
  582. </div>
  583. <div slot="footer" class="dialog-footer">
  584. <el-button
  585. style="right:240px;"
  586. class="cancelClose"
  587. @click="automaticGeneration.dialogFormVisible = false; "
  588. >关闭</el-button>
  589. <el-button style="right:130px;" class="save" :disabled="isokDisable" @click="continueData(0)">继续生成
  590. </el-button>
  591. <el-button style="right:20px;" class="save" :disabled="isokDisable" @click="continueData(1)">重新生成
  592. </el-button>
  593. </div>
  594. </div>
  595. </el-dialog>
  596. <!-- 历史记录 -->
  597. <el-dialog
  598. :fullscreen="dialogFull"
  599. :destroy-on-close="true"
  600. :visible.sync="historyRecord.dialogFormVisible"
  601. :close-on-click-modal="false"
  602. width="90%"
  603. >
  604. <template slot="title">
  605. <div class="avue-crud__dialog__header">
  606. <span class="el-dialog__title">
  607. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
  608. {{ textMap[historyRecord.dialogStatus] }}
  609. </span>
  610. <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
  611. <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
  612. <svg-icon v-else icon-class="fullscreen" />
  613. </div>
  614. </div>
  615. </template>
  616. <div class="historyRecord">
  617. <keep-alive>
  618. <component :is="historyRecord.myComponent" ref="historyRecord" />
  619. </keep-alive>
  620. </div>
  621. <div slot="footer" class="dialog-footer">
  622. <el-button class="cancelClose cancelClose1" @click="historyRecord.dialogFormVisible = false; ">关闭</el-button>
  623. </div>
  624. </el-dialog>
  625. </div>
  626. </div>
  627. </div>
  628. </template>
  629. <script>
  630. import {
  631. GetDataByName,
  632. postJson,
  633. PostDataByName,
  634. Autogeneration,
  635. ExecDataByConfig,
  636. checkButtons
  637. } from '@/api/common'
  638. import draggable from 'vuedraggable'
  639. import Sortable from 'sortablejs'
  640. import Cookies from 'js-cookie'
  641. import {
  642. MessageBox
  643. } from 'element-ui'
  644. // const id = 1
  645. export default {
  646. inject: ['reload'],
  647. name: 'MaterialIssuancePlan',
  648. display: 'Two list header slot',
  649. order: 14,
  650. components: {
  651. draggable
  652. },
  653. directives: {
  654. focus: {
  655. update: function(el, {
  656. value
  657. }) {
  658. if (value) {
  659. el.focus()
  660. }
  661. }
  662. }
  663. },
  664. data() {
  665. return {
  666. pagindex: 1, // 页码
  667. pagesize: 300, // 页/条数
  668. pagetotal: 0, // 一共要请求的次数
  669. intertimer: null, // 定时器
  670. dialogFull: false,
  671. isRoleEdit: [],
  672. isInforvalue: false,
  673. isBarracks: false,
  674. requestParams: {
  675. name: 'getTMRListEnableType',
  676. offset: 0,
  677. parammaps: {
  678. pastureid: Cookies.get('pastureid'),
  679. eqtype: '1'
  680. }
  681. },
  682. requestParams2: {
  683. name: 'getTMRListEnableTypeAll',
  684. offset: 0,
  685. parammaps: {
  686. pastureid: Cookies.get('pastureid'),
  687. eqtype: '1'
  688. }
  689. },
  690. requestParams3: {
  691. name: 'getFTSWList',
  692. offset: 0,
  693. parammaps: {
  694. pastureid: Cookies.get('pastureid')
  695. }
  696. },
  697. requestParams4: {
  698. name: 'getSysoptEnable',
  699. offset: 0,
  700. parammaps: {
  701. pastureid: Cookies.get('pastureid'),
  702. inforname: 'isSmallMaterial'
  703. }
  704. },
  705. equipmentList: [], // 撒料设备
  706. TMRNumberList: [], // TMR编号
  707. frequencyList: [], // 班次
  708. templateFormulationList: [], // 模板配方
  709. // 班次
  710. maxTime: {
  711. getMaxTimesParm: {
  712. name: 'getSysoptEnable',
  713. page: 1,
  714. offset: 1,
  715. pagecount: 1,
  716. returntype: 'Map',
  717. parammaps: {
  718. pastureid: Cookies.get('pastureid'),
  719. inforname: 'times'
  720. }
  721. },
  722. // 班次
  723. isTime1: false,
  724. isTime2: false,
  725. isTime3: false,
  726. isTime4: false
  727. },
  728. table: {
  729. getdataListParm: {
  730. name: 'getLppList',
  731. name1: 'getLppdList',
  732. page: 1,
  733. offset: 1,
  734. returntype: 'Map',
  735. parammaps: {
  736. pastureid: Cookies.get('pastureid')
  737. }
  738. },
  739. list: [],
  740. list2: [],
  741. total: 0,
  742. tableKey: 0,
  743. listLoading: false,
  744. tabClickIndex: null, // 点击的单元格
  745. tabClickLabel: '', // 当前点击的列名
  746. temp: {},
  747. move1: '',
  748. changeList: [],
  749. startObj: {},
  750. isGoing: false,
  751. myTemp: {}
  752. },
  753. selectList: [], // 选中数据
  754. // 班次
  755. menuRadio: '一班',
  756. MenuList: [], // 配单列表
  757. listLoadingTimes: false,
  758. // 栏舍统计
  759. isLeftButton: true, // 向左
  760. isRightButton: false, // 向右
  761. rowStyle2: {
  762. maxHeight: 20 + 'px',
  763. height: 20 + 'px'
  764. },
  765. cellStyle2: {
  766. padding: 0 + 'px'
  767. },
  768. headerRowStyle2: {
  769. maxHeight: 20 + 'px',
  770. height: 20 + 'px'
  771. },
  772. headerCellStyle2: {
  773. padding: 0 + 'px'
  774. },
  775. smallMenu: {
  776. getdataListParm: {
  777. name: 'getLppUseSUMList',
  778. page: 1,
  779. offset: 1,
  780. pagecount: 10,
  781. returntype: 'Map',
  782. parammaps: {
  783. pastureid: Cookies.get('pastureid')
  784. }
  785. },
  786. total: 0,
  787. tableKey: 0,
  788. listLoading: false,
  789. list: []
  790. },
  791. // 自动生成
  792. automaticGeneration: {
  793. dialogFormVisible: false,
  794. dialogStatus: ''
  795. },
  796. historyRecord: {
  797. dialogFormVisible: false,
  798. dialogStatus: '',
  799. myComponent: null
  800. },
  801. textMap: {
  802. automaticGeneration: '提示',
  803. historyRecord: '历史记录'
  804. },
  805. isokDisable: false,
  806. requestParam: {},
  807. height: document.body.clientHeight - 350 - 50, // table高度
  808. rowStyle: {
  809. maxHeight: 50 + 'px',
  810. height: 50 + 'px'
  811. },
  812. cellStyle: {
  813. padding: 0 + 'px'
  814. },
  815. dropState: false,
  816. isOrder: true,
  817. fullscreenLoading: false,
  818. getdataListParmAll: {
  819. page: 1,
  820. offset: 1,
  821. pagecount: 0,
  822. returntype: 'Map',
  823. parammaps: {
  824. pastureid: Cookies.get('pastureid'),
  825. times: '1',
  826. refresh: 0
  827. }
  828. }
  829. }
  830. },
  831. doLayout() {
  832. this.$nextTick(() => {
  833. this.$refs.table.doLayout()
  834. })
  835. },
  836. created() {
  837. this.getButtons()
  838. this.getIsDisplay()
  839. this.getDownList()
  840. this.table.list.forEach(val => {
  841. })
  842. },
  843. methods: {
  844. getButtons() {
  845. const Edit = 'MaterialIssuancePlan'
  846. const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
  847. this.isRoleEdit = isRoleEdit
  848. },
  849. clickBarracks(item) {
  850. this.isBarracks = !this.isBarracks
  851. },
  852. // 下拉列表
  853. getDownList() {
  854. GetDataByName(this.requestParams).then(response => {
  855. if (response.data !== null) {
  856. this.TMRNumberList = response.data.list
  857. } else {
  858. this.TMRNumberList = []
  859. }
  860. })
  861. GetDataByName(this.requestParams2).then(response => {
  862. if (response.data !== null) {
  863. this.equipmentList = response.data.list
  864. } else {
  865. this.equipmentList = []
  866. }
  867. })
  868. GetDataByName(this.requestParams3).then(response => {
  869. if (response.data !== null) {
  870. this.templateFormulationList = response.data.list
  871. } else {
  872. this.templateFormulationList = []
  873. }
  874. })
  875. GetDataByName(this.requestParams4).then(response => {
  876. if (response.data !== null) {
  877. if (response.data.list[0].inforvalue == 0) {
  878. this.isInforvalue = false
  879. } else {
  880. this.isInforvalue = true
  881. }
  882. } else {
  883. this.isInforvalue = false
  884. }
  885. })
  886. },
  887. // 显示班次
  888. getIsDisplay() {
  889. GetDataByName(this.maxTime.getMaxTimesParm).then(response => {
  890. console.log(response.data.list[0].inforvalue)
  891. if (response.data.list[0].inforvalue == 1) {
  892. this.frequencyList = [{
  893. id: '1',
  894. name: '第一班'
  895. }]
  896. } else if (response.data.list[0].inforvalue == 2) {
  897. this.frequencyList = [{
  898. id: '1',
  899. name: '第一班'
  900. }, {
  901. id: '2',
  902. name: '第二班'
  903. }]
  904. } else if (response.data.list[0].inforvalue == 3) {
  905. this.frequencyList = [{
  906. id: '1',
  907. name: '第一班'
  908. }, {
  909. id: '2',
  910. name: '第二班'
  911. }, {
  912. id: '3',
  913. name: '第三班'
  914. }]
  915. } else if (response.data.list[0].inforvalue == 4) {
  916. this.frequencyList = [{
  917. id: '1',
  918. name: '第一班'
  919. }, {
  920. id: '2',
  921. name: '第二班'
  922. }, {
  923. id: '3',
  924. name: '第三班'
  925. }, {
  926. id: '4',
  927. name: '第四班'
  928. }]
  929. }
  930. if (response.data.list !== null) {
  931. if (response.data.list[0].inforvalue == 1) {
  932. this.maxTime.isTime1 = true
  933. this.maxTime.isTime2 = false
  934. this.maxTime.isTime3 = false
  935. this.maxTime.isTime4 = false
  936. } else if (response.data.list[0].inforvalue == 2) {
  937. this.maxTime.isTime1 = true
  938. this.maxTime.isTime2 = true
  939. this.maxTime.isTime3 = false
  940. this.maxTime.isTime4 = false
  941. } else if (response.data.list[0].inforvalue == 3) {
  942. this.maxTime.isTime1 = true
  943. this.maxTime.isTime2 = true
  944. this.maxTime.isTime3 = true
  945. this.maxTime.isTime4 = false
  946. } else if (response.data.list[0].inforvalue == 4) {
  947. this.maxTime.isTime1 = true
  948. this.maxTime.isTime2 = true
  949. this.maxTime.isTime3 = true
  950. this.maxTime.isTime4 = true
  951. }
  952. } else {
  953. this.maxTime.isTime1 = false
  954. this.maxTime.isTime2 = false
  955. this.maxTime.isTime3 = false
  956. this.maxTime.isTime4 = false
  957. }
  958. })
  959. this.getSmallMenuList() // 栏舍统计
  960. this.getdataListParmAll.parammaps.refresh = 0
  961. this.getAllList() // 头部跟表格
  962. },
  963. getAllList() {
  964. const url = 'authdata/spillage'
  965. const data = this.getdataListParmAll
  966. postJson(url, data).then(response => {
  967. console.log(response)
  968. if (response.data.ftlist !== undefined) {
  969. if (response.data.ftlist !== null) {
  970. for (let i = 0; i < response.data.ftlist.length; i++) {
  971. this.$set(response.data.ftlist[i], 'isShowTitle', true)
  972. if (response.data.ftlist[i].arrList == null) {
  973. this.$set(response.data.ftlist[i], 'isShowTitle', false)
  974. } else {
  975. for (let j = 0; j < response.data.ftlist[i].arrList.length; j++) {
  976. this.$set(response.data.ftlist[i].arrList[j], 'background2', this.colorRgb(response.data.ftlist[
  977. i].arrList[j].background))
  978. }
  979. }
  980. }
  981. this.MenuList = response.data.ftlist
  982. } else {
  983. this.MenuList = []
  984. }
  985. }
  986. if (response.data.list !== undefined) {
  987. if (response.data.list !== null) {
  988. console.log('table数据', response.data.list)
  989. for (let i = 0; i < response.data.list.length; i++) {
  990. this.$set(response.data.list[i], 'Edit', false) // 编辑
  991. this.$set(response.data.list[i], 'NoEdit', true) // 不可编辑/输入
  992. this.$set(response.data.list[i], 'isCreate', false) // 新增操作
  993. this.$set(response.data.list[i], 'isUpdate', true) // 编辑操作
  994. this.$set(response.data.list[i], 'isUpdateSave', false) // 编辑保存
  995. this.$set(response.data.list[i], 'Disabled', true) // 班次/模板配方不可输入
  996. if (response.data.list[i].arrList == null) {
  997. this.$set(response.data.list[i], 'Disabled', false)
  998. this.$set(response.data.list[i], 'arrList', [])
  999. } else {
  1000. for (let j = 0; j < response.data.list[i].arrList.length; j++) {
  1001. this.$set(response.data.list[i].arrList[j], 'isWeight', false)
  1002. this.$set(response.data.list[i].arrList[j], 'focusState', false)
  1003. }
  1004. }
  1005. }
  1006. // this.table.list = response.data.list
  1007. var arr = []
  1008. for (let a = 0; a < response.data.list.length; a++) {
  1009. if (a < 5) {
  1010. arr.push(response.data.list[a])
  1011. }
  1012. // response.data.list.splice(5, response.data.list.length - 1)
  1013. }
  1014. this.table.list = arr
  1015. this.table.list2 = response.data.list
  1016. console.log(this.table.list2, 'this.table.list2 ')
  1017. this.table.changeList = []
  1018. this.table.startObj = {}
  1019. this.table.total = response.data.list.length
  1020. setTimeout(() => {
  1021. this.$refs.table.doLayout()
  1022. }, 100)
  1023. this.getPageInter(this.table.list2)
  1024. } else {
  1025. this.table.list = []
  1026. }
  1027. }
  1028. // this.listLoadingTimes = false
  1029. // this.table.listLoading = false
  1030. })
  1031. },
  1032. loadMore() {
  1033. this.getPageInter(this.table.list2)
  1034. },
  1035. getPageInter(map) {
  1036. this.intertimer = setInterval(() => {
  1037. this.intervalData(map) // 每三秒调用一次方法
  1038. }, 1000)
  1039. },
  1040. intervalData(map) {
  1041. if (this.pagindex * 5 < this.table.total) {
  1042. this.pagindex += 1
  1043. const arr = []
  1044. for (let i = 0; i < map.length; i++) {
  1045. if (i < this.pagindex * 5) {
  1046. arr.push(map[i])
  1047. }
  1048. }
  1049. this.table.list = arr
  1050. } else {
  1051. clearInterval(this.intertimer)
  1052. }
  1053. console.log(123)
  1054. },
  1055. colorRgb(sColor) {
  1056. sColor = sColor.toLowerCase()
  1057. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/
  1058. // 如果是16进制颜色
  1059. if (sColor && reg.test(sColor)) {
  1060. if (sColor.length === 4) {
  1061. var sColorNew = '#'
  1062. for (var i = 1; i < 4; i += 1) {
  1063. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1))
  1064. }
  1065. sColor = sColorNew
  1066. }
  1067. // 处理六位的颜色值
  1068. var sColorChange = []
  1069. for (var i = 1; i < 7; i += 2) {
  1070. sColorChange.push(parseInt('0x' + sColor.slice(i, i + 2)))
  1071. }
  1072. return sColorChange.join(',')
  1073. }
  1074. return 'rgba(' + sColorChange.join(',') + ')'
  1075. },
  1076. // 切换班次
  1077. changeMenu(val) {
  1078. console.log(val)
  1079. if (this.menuRadio === '一班') {
  1080. this.getdataListParmAll.parammaps.times = '1'
  1081. this.getdataListParmAll.parammaps.refresh = 2
  1082. this.pagindex = 1
  1083. this.getAllList()
  1084. } else if (this.menuRadio === '二班') {
  1085. this.getdataListParmAll.parammaps.times = '2'
  1086. this.getdataListParmAll.parammaps.refresh = 2
  1087. this.pagindex = 1
  1088. this.getAllList()
  1089. this.MenuList = this.twoMenuList
  1090. } else if (this.menuRadio === '三班') {
  1091. this.getdataListParmAll.parammaps.times = '3'
  1092. this.getdataListParmAll.parammaps.refresh = 2
  1093. this.getAllList()
  1094. } else if (this.menuRadio === '四班') {
  1095. this.getdataListParmAll.parammaps.times = '4'
  1096. this.getdataListParmAll.parammaps.refresh = 2
  1097. this.pagindex = 1
  1098. this.getAllList()
  1099. }
  1100. },
  1101. // 右侧栏舍统计
  1102. getSmallMenuList() {
  1103. this.smallMenu.listLoading = true
  1104. GetDataByName(this.smallMenu.getdataListParm).then(response => {
  1105. if (response.data.list !== null) {
  1106. for (let i = 0; i < response.data.list.length; i++) {
  1107. if (response.data.list[i].onetime == undefined) {
  1108. this.$set(response.data.list[i], 'onetime', 0)
  1109. } else {
  1110. response.data.list[i].onetime = parseFloat(response.data.list[i].onetime)
  1111. }
  1112. if (response.data.list[i].twotime == undefined) {
  1113. this.$set(response.data.list[i], 'twotime', 0)
  1114. } else {
  1115. response.data.list[i].twotime = parseFloat(response.data.list[i].twotime)
  1116. }
  1117. if (response.data.list[i].threetime == undefined) {
  1118. this.$set(response.data.list[i], 'threetime', 0)
  1119. } else {
  1120. response.data.list[i].threetime = parseFloat(response.data.list[i].threetime)
  1121. }
  1122. if (response.data.list[i].fourtime == undefined) {
  1123. this.$set(response.data.list[i], 'fourtime', 0)
  1124. } else {
  1125. response.data.list[i].fourtime = parseFloat(response.data.list[i].fourtime)
  1126. }
  1127. this.$set(response.data.list[i], 'usedsum', response.data.list[i].onetime + response.data.list[i]
  1128. .twotime + response.data.list[i].threetime + response.data.list[i].fourtime)
  1129. this.$set(response.data.list[i], 'all', '')
  1130. }
  1131. this.smallMenu.list = response.data.list
  1132. this.smallMenu.total = response.data.total
  1133. } else {
  1134. this.smallMenu.list = []
  1135. }
  1136. console.log('smallMenu数据', response.data.list)
  1137. setTimeout(() => {
  1138. this.smallMenu.listLoading = false
  1139. }, 100)
  1140. })
  1141. },
  1142. handleChangeOrder() {
  1143. this.isOrder = false
  1144. this.rowDrop()
  1145. },
  1146. // 行拖拽
  1147. rowDrop() {
  1148. console.log(document.querySelector('#table .el-table__body-wrapper tbody'))
  1149. const tbody = document.querySelector('#table .el-table__body-wrapper tbody')
  1150. const that = this
  1151. var sortable = Sortable.create(tbody, {
  1152. disabled: that.dropState,
  1153. onChoose({
  1154. newIndex,
  1155. oldIndex
  1156. }) {
  1157. console.log(that.isOrder, 'that.isOrder == false')
  1158. console.log(that.dropState, 'that.dropState')
  1159. if (that.dropState == true || that.isOrder == true) {
  1160. sortable.destroy()
  1161. }
  1162. },
  1163. onEnd({
  1164. newIndex,
  1165. oldIndex
  1166. }) {
  1167. const currRow = that.table.list.splice(oldIndex, 1)[0]
  1168. that.table.list.splice(newIndex, 0, currRow)
  1169. console.log('索引', newIndex)
  1170. console.log('拖动数据', currRow)
  1171. console.log('上', that.table.list[newIndex - 1])
  1172. console.log('下', that.table.list[newIndex + 1])
  1173. }
  1174. })
  1175. },
  1176. saveChangeOrder() {
  1177. // 保存顺序
  1178. var sortArr = []
  1179. for (let i = 0; i < this.table.list.length; i++) {
  1180. var obj = {}
  1181. obj.sort = i + 1
  1182. obj.id = this.table.list[i].id
  1183. obj.pastureid = this.table.list[i].pastureid
  1184. sortArr.push(obj)
  1185. }
  1186. this.requestParam = {}
  1187. this.requestParam.common = {
  1188. 'returnmap': '0'
  1189. }
  1190. this.requestParam.data = []
  1191. this.requestParam.data[0] = {
  1192. 'name': 'insertSpotList',
  1193. 'resultmaps': {
  1194. 'list': sortArr
  1195. }
  1196. }
  1197. this.requestParam.data[0].children = []
  1198. this.requestParam.data[0].children[0] = {
  1199. 'name': 'updateLppSort',
  1200. 'type': 'e',
  1201. 'parammaps': {
  1202. id: '@insertSpotList.id',
  1203. pastureid: '@insertSpotList.pastureid',
  1204. sort: '@insertSpotList.sort'
  1205. }
  1206. }
  1207. ExecDataByConfig(this.requestParam).then(response => {
  1208. console.log('顺序切换保存发送参数', this.requestParam)
  1209. if (response.msg === 'fail') {
  1210. this.$notify({
  1211. title: '顺序切换失败',
  1212. message: response.data,
  1213. type: 'warning',
  1214. duration: 2000
  1215. })
  1216. } else {
  1217. this.$notify({
  1218. title: '',
  1219. message: '顺序切换成功',
  1220. type: 'success',
  1221. duration: 2000
  1222. })
  1223. this.getdataListParmAll.parammaps.refresh = 1
  1224. this.pagindex = 1
  1225. this.getAllList()
  1226. this.isOrder = true
  1227. }
  1228. })
  1229. },
  1230. cancelChangeOrder() {
  1231. // 取消顺序
  1232. this.getdataListParmAll.parammaps.refresh = 1
  1233. this.pagindex = 1
  1234. this.getAllList()
  1235. this.isOrder = true
  1236. },
  1237. // TMR编号
  1238. changeTMRNumber(item, row) {
  1239. row.tmrname = this.TMRNumberList.find(obj => obj.id === item).eqcode
  1240. row.maxweight = this.TMRNumberList.find(obj => obj.id === item).maxstirfeed
  1241. },
  1242. // 配方模板
  1243. changeTemplateFormulation(item, row) {
  1244. row.ftname = this.templateFormulationList.find(obj => obj.id === item).tname
  1245. },
  1246. // 增加车次
  1247. handleCreate() {
  1248. for (let i = 0; i < this.table.list.length; i++) {
  1249. if (this.table.list2[i].Edit === true) {
  1250. this.$message({
  1251. type: 'error',
  1252. message: '当前内容未保存,请点击取消或保存继续进行操作',
  1253. duration: 2000
  1254. })
  1255. return false
  1256. }
  1257. }
  1258. if (this.table.list.length == 0) {
  1259. this.table.list.unshift({
  1260. 'myId': (new Date()).valueOf(),
  1261. 'Edit': true,
  1262. 'NoEdit': false,
  1263. 'isCreate': true,
  1264. 'isUpdate': false,
  1265. 'isUpdateSave': false,
  1266. 'tmrname': '',
  1267. 'tmrid': '',
  1268. 'sort': 1,
  1269. 'sel': 1,
  1270. 'issplit': 1,
  1271. 'times': '',
  1272. 'display': '',
  1273. 'begintime': '',
  1274. 'ftname': '',
  1275. 'ftid': '',
  1276. 'sumweight': '',
  1277. 'sumcowcount': '',
  1278. 'maxweight': '',
  1279. 'arrList': []
  1280. })
  1281. } else {
  1282. this.table.list.unshift({
  1283. 'myId': (new Date()).valueOf(),
  1284. 'Edit': true,
  1285. 'NoEdit': false,
  1286. 'isCreate': true,
  1287. 'isUpdate': false,
  1288. 'isUpdateSave': false,
  1289. 'tmrname': '',
  1290. 'tmrid': '',
  1291. 'sort': parseInt(this.table.list2[this.table.list2.length - 1].sort) + 1,
  1292. 'sel': 1,
  1293. 'issplit': 1,
  1294. 'times': '',
  1295. 'display': '',
  1296. 'begintime': '',
  1297. 'ftname': '',
  1298. 'ftid': '',
  1299. 'sumweight': '',
  1300. 'sumcowcount': '',
  1301. 'maxweight': '',
  1302. 'arrList': []
  1303. })
  1304. }
  1305. // this.$refs.box.scrollTop = 0
  1306. this.$refs.table.bodyWrapper.scrollTop = 0
  1307. this.dropState = true
  1308. console.log('点击了新增')
  1309. },
  1310. createData(row) {
  1311. console.log('点击了新增保存', row)
  1312. if (row.begintime == null || row.begintime == 'null') {
  1313. row.begintime = ''
  1314. }
  1315. this.table.temp.pastureid = Cookies.get('pastureid')
  1316. this.table.temp.tmrname = row.tmrname
  1317. this.table.temp.tmrid = row.tmrid
  1318. this.table.temp.sort = row.sort
  1319. this.table.temp.sel = row.sel
  1320. this.table.temp.issplit = row.issplit
  1321. this.table.temp.times = row.times
  1322. this.table.temp.display = row.display
  1323. this.table.temp.begintime = row.begintime
  1324. this.table.temp.ftname = row.ftname
  1325. this.table.temp.ftid = row.ftid
  1326. this.table.temp.sumweight = 0
  1327. this.table.temp.maxweight = row.maxweight
  1328. if (this.table.temp.sort == '' && this.table.temp.tmrid == '' && this.table.temp.times == '' && this.table.temp
  1329. .ftid == '') {
  1330. this.$message({
  1331. type: 'error',
  1332. message: '车次/TMR编号/班次/模板配方不能为空',
  1333. duration: 2000
  1334. })
  1335. return false
  1336. } else if (this.table.temp.tmrid == '' && this.table.temp.times == '' && this.table.temp.ftid == '') {
  1337. this.$message({
  1338. type: 'error',
  1339. message: 'TMR编号/班次/模板配方不能为空',
  1340. duration: 2000
  1341. })
  1342. return false
  1343. } else if (this.table.temp.times == '' && this.table.temp.ftid == '') {
  1344. this.$message({
  1345. type: 'error',
  1346. message: '班次/模板配方不能为空',
  1347. duration: 2000
  1348. })
  1349. return false
  1350. } else if (this.table.temp.ftid == '') {
  1351. this.$message({
  1352. type: 'error',
  1353. message: '模板配方不能为空',
  1354. duration: 2000
  1355. })
  1356. return false
  1357. } else if (this.table.temp.times == '') {
  1358. this.$message({
  1359. type: 'error',
  1360. message: '班次不能为空',
  1361. duration: 2000
  1362. })
  1363. return false
  1364. }
  1365. for (let i = 0; i < this.table.list2.length; i++) {
  1366. if (row.sort == this.table.list2[i].sort) {
  1367. if (row.myId !== this.table.list2[i].myId) {
  1368. this.$message({
  1369. type: 'error',
  1370. message: '车次不可重复',
  1371. duration: 2000
  1372. })
  1373. return false
  1374. }
  1375. }
  1376. }
  1377. var isInteger = /^\d+$/
  1378. if (this.table.temp.sort !== '') {
  1379. if (!isInteger.test(parseFloat(this.table.temp.sort))) {
  1380. this.$message({
  1381. type: 'error',
  1382. message: '车次请输入整数',
  1383. duration: 2000
  1384. })
  1385. return false
  1386. }
  1387. }
  1388. this.isokDisable = true
  1389. setTimeout(() => {
  1390. this.isokDisable = false
  1391. }, 1000)
  1392. this.requestParam = {}
  1393. this.requestParam.name = 'insertLpp'
  1394. this.requestParam.parammaps = this.table.temp
  1395. PostDataByName(this.requestParam).then(response => {
  1396. console.log('新增保存发送参数', this.requestParam)
  1397. if (response.msg !== 'fail') {
  1398. this.$notify({
  1399. title: '成功',
  1400. message: '保存成功',
  1401. type: 'success',
  1402. duration: 2000
  1403. })
  1404. this.getdataListParmAll.parammaps.refresh = 1
  1405. this.pagindex = 1
  1406. this.getAllList()
  1407. this.dropState = false
  1408. } else {
  1409. this.$notify({
  1410. title: '保存失败',
  1411. message: response.data,
  1412. type: 'warning',
  1413. duration: 2000
  1414. })
  1415. }
  1416. })
  1417. },
  1418. createCancel(row) {
  1419. this.dropState = false
  1420. for (let i = 0; i < this.table.list.length; i++) {
  1421. if (row.myId === this.table.list[i].myId) {
  1422. var listIndex = this.table.list.indexOf(this.table.list[i])
  1423. }
  1424. if (listIndex > -1) {
  1425. this.table.list.splice(listIndex, 1)
  1426. this.table.list2.splice(listIndex, 1)
  1427. return
  1428. }
  1429. }
  1430. // for (let i = 0; i < this.table.list2.length; i++) {
  1431. // if (row.myId === this.table.list2[i].myId) {
  1432. // var listIndex2 = this.table.list2.indexOf(this.table.list2[i])
  1433. // }
  1434. // if (listIndex2 > -1) {
  1435. // this.table.list2.splice(listIndex2, 1)
  1436. // return
  1437. // }
  1438. // }
  1439. console.log('点击了新增取消')
  1440. },
  1441. // 编辑
  1442. handleUpdate(row) {
  1443. console.log(row, '点击了行编辑')
  1444. for (let i = 0; i < this.table.list.length; i++) {
  1445. if (this.table.list[i].Edit == true) {
  1446. this.$message({
  1447. type: 'error',
  1448. message: '当前内容未保存,请点击取消或保存继续进行操作',
  1449. duration: 2000
  1450. })
  1451. return false
  1452. }
  1453. }
  1454. // 编辑true,不可编辑false
  1455. row.Edit = true
  1456. row.NoEdit = false
  1457. // 新增false,编辑false,编辑保存true
  1458. row.isCreate = false
  1459. row.isUpdate = false
  1460. row.isUpdateSave = true
  1461. row.times = String(row.times)
  1462. if (row.sort == undefined) {
  1463. row.sort = ''
  1464. }
  1465. if (row.tmrid == undefined || row.tmrname == undefined) {
  1466. row.tmrid = ''
  1467. row.tmrname = ''
  1468. }
  1469. if (row.display == undefined) {
  1470. row.display = ''
  1471. }
  1472. if (row.times == undefined) {
  1473. row.times = ''
  1474. }
  1475. if (row.begintime == undefined) {
  1476. row.begintime = ''
  1477. }
  1478. if (row.ftid == undefined || row.ftname == undefined) {
  1479. row.ftid = ''
  1480. row.ftname = ''
  1481. }
  1482. this.dropState = true
  1483. this.table.myTemp = Object.assign({}, row)
  1484. },
  1485. updateData(row) {
  1486. console.log('点击了编辑保存', row)
  1487. this.table.myTemp = Object.assign({}, row)
  1488. if (row.begintime == null || row.begintime == 'null') {
  1489. row.begintime = ''
  1490. }
  1491. this.table.temp.pastureid = row.pastureid
  1492. this.table.temp.id = row.id
  1493. this.table.temp.tmrname = row.tmrname
  1494. this.table.temp.tmrid = row.tmrid
  1495. this.table.temp.sort = row.sort
  1496. this.table.temp.sel = row.sel
  1497. this.table.temp.issplit = row.issplit
  1498. this.table.temp.times = row.times
  1499. this.table.temp.display = row.display
  1500. this.table.temp.begintime = row.begintime
  1501. this.table.temp.ftname = row.ftname
  1502. this.table.temp.ftid = row.ftid
  1503. this.table.temp.sumweight = row.sumweight
  1504. this.table.temp.sumcowcount = row.sumcowcount
  1505. this.table.temp.maxweight = row.maxweight
  1506. if (this.table.temp.sort == '' && this.table.temp.tmrid == '' && this.table.temp.times == '' && this.table.temp
  1507. .ftid == '') {
  1508. this.$message({
  1509. type: 'error',
  1510. message: '车次/TMR编号/班次/模板配方不能为空',
  1511. duration: 2000
  1512. })
  1513. return false
  1514. } else if (this.table.temp.tmrid == '' && this.table.temp.times == '' && this.table.temp.ftid == '') {
  1515. this.$message({
  1516. type: 'error',
  1517. message: 'TMR编号/班次/模板配方不能为空',
  1518. duration: 2000
  1519. })
  1520. return false
  1521. } else if (this.table.temp.times == '' && this.table.temp.ftid == '') {
  1522. this.$message({
  1523. type: 'error',
  1524. message: '班次/模板配方不能为空',
  1525. duration: 2000
  1526. })
  1527. return false
  1528. } else if (this.table.temp.ftid == '') {
  1529. this.$message({
  1530. type: 'error',
  1531. message: '模板配方不能为空',
  1532. duration: 2000
  1533. })
  1534. return false
  1535. }
  1536. for (let i = 0; i < this.table.list.length; i++) {
  1537. if (row.sort == this.table.list[i].sort) {
  1538. if (row.id !== this.table.list[i].id) {
  1539. this.$message({
  1540. type: 'error',
  1541. message: '车次不可重复',
  1542. duration: 2000
  1543. })
  1544. return false
  1545. }
  1546. }
  1547. }
  1548. var isInteger = /^\d+$/
  1549. if (this.table.temp.sort !== '') {
  1550. if (!isInteger.test(parseFloat(this.table.temp.sort))) {
  1551. this.$message({
  1552. type: 'error',
  1553. message: '车次请输入整数',
  1554. duration: 2000
  1555. })
  1556. return false
  1557. }
  1558. }
  1559. this.isokDisable = true
  1560. setTimeout(() => {
  1561. this.isokDisable = false
  1562. }, 1000)
  1563. this.requestParam = {}
  1564. this.requestParam.name = 'updateLpp'
  1565. this.requestParam.parammaps = this.table.temp
  1566. PostDataByName(this.requestParam).then(response => {
  1567. console.log('编辑保存发送参数', this.requestParam)
  1568. if (response.msg !== 'fail') {
  1569. this.$notify({
  1570. title: '成功',
  1571. message: '保存成功',
  1572. type: 'success',
  1573. duration: 2000
  1574. })
  1575. this.getdataListParmAll.parammaps.refresh = 1
  1576. this.pagindex = 1
  1577. this.getAllList()
  1578. this.table.myTemp.isUpdateSave = false
  1579. this.dropState = false
  1580. } else {
  1581. this.$notify({
  1582. title: '保存失败',
  1583. message: response.data,
  1584. type: 'warning',
  1585. duration: 2000
  1586. })
  1587. }
  1588. })
  1589. },
  1590. updateCancel(row) {
  1591. console.log('点击了编辑取消')
  1592. // 编辑false,不可编辑true
  1593. row.Edit = false
  1594. row.NoEdit = true
  1595. // 新增false,编辑true,编辑保存false
  1596. row.isCreate = false
  1597. row.isUpdate = true
  1598. row.isUpdateSave = false
  1599. this.dropState = false
  1600. this.getdataListParmAll.parammaps.refresh = 1
  1601. this.pagindex = 1
  1602. this.getAllList()
  1603. this.table.myTemp = Object.assign({}, row)
  1604. },
  1605. // 自动生成
  1606. handleAutomaticGeneration() {
  1607. this.dialogFull = false
  1608. this.automaticGeneration.dialogStatus = 'automaticGeneration'
  1609. this.automaticGeneration.dialogFormVisible = true
  1610. },
  1611. continueData(item) {
  1612. if (item == 0) {
  1613. console.log('点击继续生成')
  1614. this.requestParam = {}
  1615. this.requestParam.pastureid = Cookies.get('pastureid')
  1616. this.requestParam.type = 0
  1617. Autogeneration(this.requestParam).then(response => {
  1618. console.log('新增保存发送参数', this.requestParam)
  1619. if (response.msg !== 'fail') {
  1620. this.$notify({
  1621. title: '成功',
  1622. message: '保存成功',
  1623. type: 'success',
  1624. duration: 2000
  1625. })
  1626. this.automaticGeneration.dialogFormVisible = false
  1627. this.getIsDisplay()
  1628. this.getDownList()
  1629. } else {
  1630. this.$notify({
  1631. title: '保存失败',
  1632. message: response.data,
  1633. type: 'warning',
  1634. duration: 2000
  1635. })
  1636. }
  1637. })
  1638. } else {
  1639. console.log('点击重新生成')
  1640. MessageBox.confirm('重新生成计划会将原有计划清空再生成,是否确认重新生成?', {
  1641. confirmButtonText: '确认',
  1642. cancelButtonText: '取消',
  1643. type: 'warning'
  1644. }).then(() => {
  1645. this.automaticGeneration.dialogFormVisible = false
  1646. // const loading = this.$loading({
  1647. // lock: true,
  1648. // text: 'Loading',
  1649. // spinner: 'el-icon-loading'
  1650. // })
  1651. this.fullscreenLoading = true
  1652. this.requestParam = {}
  1653. this.requestParam.pastureid = Cookies.get('pastureid')
  1654. this.requestParam.type = 1
  1655. Autogeneration(this.requestParam).then(response => {
  1656. console.log('新增保存发送参数', this.requestParam)
  1657. if (response.msg !== 'fail') {
  1658. // loading.close()
  1659. this.fullscreenLoading = false
  1660. this.$notify({
  1661. title: '成功',
  1662. message: '保存成功',
  1663. type: 'success',
  1664. duration: 2000
  1665. })
  1666. this.automaticGeneration.dialogFormVisible = false
  1667. this.getIsDisplay()
  1668. this.getDownList()
  1669. } else {
  1670. this.fullscreenLoading = false
  1671. // loading.close()
  1672. this.$notify({
  1673. title: '保存失败',
  1674. message: response.data,
  1675. type: 'warning',
  1676. duration: 2000
  1677. })
  1678. }
  1679. })
  1680. }).catch(() => {
  1681. this.$message({
  1682. type: 'info',
  1683. message: '已取消重新生成'
  1684. })
  1685. })
  1686. }
  1687. },
  1688. // 检验
  1689. // handleCheck() {
  1690. // console.log('点击检验')
  1691. // },
  1692. // 历史记录
  1693. handleHistoryRecord() {
  1694. console.log('点击历史记录')
  1695. this.dialogFull = false
  1696. this.historyRecord.dialogStatus = 'historyRecord'
  1697. this.historyRecord.dialogFormVisible = true
  1698. const vue = this
  1699. var myComponent = () => import('./historyRecord.vue')
  1700. return vue.historyRecord.myComponent = myComponent
  1701. },
  1702. // 配方
  1703. changeLog: function(evt) {
  1704. console.log('change1', evt)
  1705. },
  1706. start(evt) {
  1707. console.log('start1===>', evt)
  1708. this.$set(this.table.startObj, 'from', evt.from.className)
  1709. this.$set(this.table.startObj, 'to', evt.from.className)
  1710. },
  1711. end(evt) {
  1712. console.log('end1===>', evt)
  1713. },
  1714. move(evt, originalEvent) {
  1715. console.log('move1===>', evt, originalEvent)
  1716. if (originalEvent.target.className === 'list-group-item1 item' || originalEvent.target.className ===
  1717. 'draggableWeight') {
  1718. return false
  1719. }
  1720. if (evt.from._prevClass == evt.to._prevClass) {
  1721. return false
  1722. }
  1723. this.table.move1 = evt.draggedContext.element
  1724. },
  1725. start2(evt) {
  1726. console.log('start2===>', evt)
  1727. this.$set(this.table.startObj, 'from', evt.from.className)
  1728. this.$set(this.table.startObj, 'to', evt.from.className)
  1729. },
  1730. move2(evt, originalEvent) {
  1731. console.log('move2===>', evt, originalEvent)
  1732. if (originalEvent.target.className === 'list-group-item1 item' || originalEvent.target.className ===
  1733. 'draggableWeight') {
  1734. return false
  1735. }
  1736. this.table.move1 = evt.draggedContext.element
  1737. },
  1738. end2(evt) {
  1739. // console.log(evt)
  1740. console.log('end2===》', evt)
  1741. },
  1742. // 撒料位
  1743. changeLog2(evt) {
  1744. // console.log(this.table.startObj)
  1745. console.log('changeLog2===>', evt)
  1746. // var _evt = [...evt]
  1747. this.table.changeList.push(evt)
  1748. evt = this.table.changeList[0]
  1749. if (evt.arrList.length == 1) {
  1750. evt.arrList[0].sort = 0
  1751. } else if (evt.arrList.length > 1) {
  1752. for (let i = 0; i < evt.arrList.length; i++) {
  1753. if (evt.arrList[i].id == this.table.move1.id && evt.arrList[i].fttype == this.table.move1.fttype) {
  1754. if (evt.arrList[i - 1] == undefined) {
  1755. evt.arrList[i].sort = 0
  1756. evt.sort = 0
  1757. } else {
  1758. evt.arrList[i].sort = parseFloat(evt.arrList[i - 1].sort) + 1
  1759. evt.sort = parseFloat(evt.arrList[i - 1].sort) + 1
  1760. }
  1761. }
  1762. }
  1763. }
  1764. console.log(evt.arrList, '==========1')
  1765. console.log(evt, '==========2')
  1766. console.log(this.table.move1.times, 'this.table.move1.times-------')
  1767. if (this.table.startObj.from == 'list-group1' && this.table.startObj.to == 'list-group1') {
  1768. if (parseFloat(evt.maxweight) - parseFloat(evt.sumweight) < parseFloat(this.table.move1.weight)) {
  1769. this.$set(this.table.move1, 'weight', parseFloat(evt.maxweight) - parseFloat(evt.sumweight))
  1770. }
  1771. console.log('this.table.move1.weight===>', this.table.move1.weight)
  1772. this.requestParam = {}
  1773. this.requestParam.common = {
  1774. 'returnmap': '0'
  1775. }
  1776. this.requestParam.data = []
  1777. this.requestParam.data[0] = {
  1778. 'name': 'checkLLPDetailInsert',
  1779. 'type': 'v',
  1780. 'parammaps': {
  1781. pastureid: this.table.move1.pastureid,
  1782. barid: this.table.move1.barid,
  1783. lppid: evt.id,
  1784. times: evt.times,
  1785. ftid: this.table.move1.ftid,
  1786. ptsid: this.table.move1.ptsid,
  1787. ptid: this.table.move1.ptid,
  1788. fttype: this.table.move1.fttype,
  1789. timesTem: this.table.move1.times
  1790. }
  1791. }
  1792. this.requestParam.data[1] = {
  1793. 'name': 'updateLpplandtlSorts',
  1794. 'type': 'e',
  1795. 'parammaps': {
  1796. pastureid: evt.pastureid,
  1797. sort: evt.sort,
  1798. lppid: evt.id
  1799. }
  1800. }
  1801. this.requestParam.data[2] = {
  1802. 'name': 'insertLppd',
  1803. 'type': 'e',
  1804. 'parammaps': {
  1805. pastureid: evt.pastureid,
  1806. lppid: evt.id,
  1807. barid: this.table.move1.barid,
  1808. barname: this.table.move1.barname,
  1809. fpdid: this.table.move1.id,
  1810. fttype: this.table.move1.fttype,
  1811. lweight: this.table.move1.weight,
  1812. sort: evt.sort,
  1813. tmrid: evt.tmrid,
  1814. tmrname: evt.tmrname,
  1815. background: this.table.move1.background,
  1816. ccountradio: this.table.move1.ccountradio,
  1817. cowcount: this.table.move1.cowcount
  1818. }
  1819. }
  1820. this.requestParam.data[3] = {
  1821. 'name': 'updateFpdetailUse',
  1822. 'type': 'e',
  1823. 'parammaps': {
  1824. pastureid: this.table.move1.pastureid,
  1825. id: this.table.move1.id,
  1826. fttype: this.table.move1.fttype,
  1827. lweight: this.table.move1.weight
  1828. }
  1829. }
  1830. console.log('撒料位上-下新增', this.requestParam)
  1831. ExecDataByConfig(this.requestParam).then(response => {
  1832. console.log('撒料位新增保存发送参数', this.requestParam)
  1833. if (response.msg === 'fail') {
  1834. this.$notify({
  1835. title: '保存失败',
  1836. message: response.data,
  1837. type: 'warning',
  1838. duration: 2000
  1839. })
  1840. this.getSmallMenuList()
  1841. this.getdataListParmAll.parammaps.refresh = 0
  1842. this.pagindex = 1
  1843. this.getAllList()
  1844. } else {
  1845. this.$notify({
  1846. title: '',
  1847. message: '保存成功',
  1848. type: 'success',
  1849. duration: 2000
  1850. })
  1851. this.getIsDisplay()
  1852. this.getSmallMenuList()
  1853. this.getdataListParmAll.parammaps.refresh = 0
  1854. this.pagindex = 1
  1855. this.getAllList()
  1856. }
  1857. })
  1858. } else if (this.table.startObj.from == 'list-group2' && this.table.startObj.to == 'list-group2') {
  1859. if (this.table.changeList.length == 1) {
  1860. this.requestParam = {}
  1861. this.requestParam.common = {
  1862. 'returnmap': '0'
  1863. }
  1864. this.requestParam.data = []
  1865. this.requestParam.data[0] = {
  1866. 'name': 'checkLLPDetailInsert',
  1867. 'type': 'v',
  1868. 'parammaps': {
  1869. pastureid: this.table.move1.pastureid,
  1870. barid: this.table.move1.barid,
  1871. lppid: evt.id,
  1872. times: evt.times,
  1873. ftid: this.table.move1.ftid,
  1874. ptsid: this.table.move1.ptsid,
  1875. ptid: this.table.move1.ptid,
  1876. fttype: this.table.move1.fttype,
  1877. timesTem: this.table.move1.times
  1878. }
  1879. }
  1880. this.requestParam.data[1] = {
  1881. 'name': 'updateLpplandtlSorts',
  1882. 'type': 'e',
  1883. 'parammaps': {
  1884. pastureid: evt.pastureid,
  1885. sort: evt.sort,
  1886. lppid: evt.id
  1887. }
  1888. }
  1889. this.requestParam.data[2] = {
  1890. 'name': 'deleteLppd',
  1891. 'type': 'e',
  1892. 'parammaps': {
  1893. pastureid: evt.pastureid,
  1894. id: this.table.move1.id
  1895. }
  1896. }
  1897. this.requestParam.data[3] = {
  1898. 'name': 'insertLppd',
  1899. 'type': 'e',
  1900. 'parammaps': {
  1901. pastureid: evt.pastureid,
  1902. lppid: evt.id,
  1903. barid: this.table.move1.barid,
  1904. barname: this.table.move1.barname,
  1905. fpdid: this.table.move1.fpdid,
  1906. fttype: this.table.move1.fttype,
  1907. lweight: this.table.move1.weight,
  1908. sort: evt.sort,
  1909. tmrid: evt.tmrid,
  1910. tmrname: evt.tmrname,
  1911. background: this.table.move1.background,
  1912. ccountradio: this.table.move1.ccountradio,
  1913. cowcount: this.table.move1.cowcount
  1914. }
  1915. }
  1916. console.log('撒料位下-下新增', this.requestParam)
  1917. ExecDataByConfig(this.requestParam).then(response => {
  1918. console.log('撒料位新增保存发送参数', this.requestParam)
  1919. if (response.msg === 'fail') {
  1920. this.$notify({
  1921. title: '保存失败',
  1922. message: response.data,
  1923. type: 'warning',
  1924. duration: 2000
  1925. })
  1926. this.getSmallMenuList()
  1927. this.getdataListParmAll.parammaps.refresh = 0
  1928. this.pagindex = 1
  1929. this.getAllList()
  1930. } else {
  1931. this.$notify({
  1932. title: '',
  1933. message: '保存成功',
  1934. type: 'success',
  1935. duration: 2000
  1936. })
  1937. this.getSmallMenuList()
  1938. this.getdataListParmAll.parammaps.refresh = 0
  1939. this.pagindex = 1
  1940. this.getAllList()
  1941. this.getIsDisplay()
  1942. }
  1943. })
  1944. } else if (this.table.changeList.length == 1) {
  1945. if (this.table.isGoing == true) {
  1946. console.log(11111)
  1947. this.requestParam.common = {
  1948. 'returnmap': '0'
  1949. }
  1950. this.requestParam.data = []
  1951. this.requestParam.data[0] = {
  1952. 'name': 'checkLLPDetailInsert',
  1953. 'type': 'e',
  1954. 'parammaps': {
  1955. pastureid: evt.pastureid,
  1956. sort: evt.sort,
  1957. lppid: evt.id
  1958. }
  1959. }
  1960. this.requestParam.data[1] = {
  1961. 'name': 'deleteLppd',
  1962. 'type': 'e',
  1963. 'parammaps': {
  1964. pastureid: evt.pastureid,
  1965. id: this.table.move1.id
  1966. }
  1967. }
  1968. this.requestParam.data[2] = {
  1969. 'name': 'insertLppd',
  1970. 'type': 'e',
  1971. 'parammaps': {
  1972. pastureid: evt.pastureid,
  1973. lppid: evt.id,
  1974. barid: this.table.move1.barid,
  1975. barname: this.table.move1.barname,
  1976. fpdid: this.table.move1.id,
  1977. fttype: this.table.move1.fttype,
  1978. lweight: this.table.move1.weight,
  1979. sort: evt.sort,
  1980. tmrid: evt.tmrid,
  1981. tmrname: evt.tmrname,
  1982. background: this.table.move1.background
  1983. }
  1984. }
  1985. this.requestParam.data[3] = {
  1986. 'name': 'updateFpdetailUse',
  1987. 'type': 'e',
  1988. 'parammaps': {
  1989. pastureid: this.table.move1.pastureid,
  1990. id: this.table.move1.id,
  1991. fttype: this.table.move1.fttype,
  1992. statue: 1
  1993. }
  1994. }
  1995. console.log('撒料位新增', this.requestParam)
  1996. ExecDataByConfig(this.requestParam).then(response => {
  1997. console.log('撒料位新增保存发送参数', this.requestParam)
  1998. if (response.msg === 'fail') {
  1999. this.$notify({
  2000. title: '保存失败',
  2001. message: response.data,
  2002. type: 'warning',
  2003. duration: 2000
  2004. })
  2005. this.getdataListParmAll.parammaps.refresh = 0
  2006. this.pagindex = 1
  2007. this.getAllList()
  2008. } else {
  2009. this.$notify({
  2010. title: '',
  2011. message: '保存成功',
  2012. type: 'success',
  2013. duration: 2000
  2014. })
  2015. this.getSmallMenuList()
  2016. this.getdataListParmAll.parammaps.refresh = 0
  2017. this.pagindex = 1
  2018. this.getAllList()
  2019. this.getIsDisplay()
  2020. }
  2021. })
  2022. this.table.isGoing = false
  2023. } else {
  2024. this.table.isGoing = true
  2025. }
  2026. }
  2027. }
  2028. },
  2029. // 编辑-撒料设备
  2030. changeEquipment(item, row, fttype, myid) {
  2031. var objList = {}
  2032. for (let i = 0; i < row.arrList.length; i++) {
  2033. row.arrList[i].tmrname = this.equipmentList.find(obj => obj.id === item).tname
  2034. if (row.arrList[i].fttype == fttype && row.arrList[i].id == myid) {
  2035. objList = row.arrList[i]
  2036. }
  2037. console.log(item, 'item')
  2038. console.log(row, 'row')
  2039. // if (row.tmrid == row.arrList[i].tmrid) {
  2040. // if (row.tmrid !== item) {
  2041. // this.$message({ type: 'warning', message: '混料设备不可与其它撒料设备同时选择1', duration: 2000 })
  2042. // this.getdataListParmAll.parammaps.refresh = 1
  2043. // this.getAllList()
  2044. // return false
  2045. // }
  2046. // } else {
  2047. // if (row.tmrid == item) {
  2048. // this.$message({ type: 'warning', message: '混料设备不可与其它撒料设备同时选择2', duration: 2000 })
  2049. // this.getdataListParmAll.parammaps.refresh = 1
  2050. // this.getAllList()
  2051. // return false
  2052. // }
  2053. // }
  2054. }
  2055. console.log(row)
  2056. this.requestParam = {}
  2057. this.requestParam.common = {
  2058. 'returnmap': '0'
  2059. }
  2060. this.requestParam.data = []
  2061. this.requestParam.data[0] = {
  2062. 'name': 'updateLppd',
  2063. 'type': 'e',
  2064. 'parammaps': {
  2065. pastureid: row.pastureid,
  2066. lppid: row.id,
  2067. barid: objList.barid,
  2068. barname: objList.barname,
  2069. fpdid: objList.fpdid,
  2070. fttype: objList.fttype,
  2071. lweight: objList.weight,
  2072. sort: objList.sort,
  2073. tmrid: objList.tmrid,
  2074. tmrname: objList.tmrname,
  2075. background: objList.background,
  2076. id: objList.id
  2077. }
  2078. }
  2079. ExecDataByConfig(this.requestParam).then(response => {
  2080. console.log('编辑保存发送参数', this.requestParam)
  2081. if (response.msg === 'fail') {
  2082. this.$notify({
  2083. title: '保存失败',
  2084. message: response.data,
  2085. type: 'warning',
  2086. duration: 2000
  2087. })
  2088. } else {
  2089. this.$notify({
  2090. title: '',
  2091. message: '保存成功',
  2092. type: 'success',
  2093. duration: 2000
  2094. })
  2095. this.getdataListParmAll.parammaps.refresh = 0
  2096. this.pagindex = 1
  2097. this.getAllList()
  2098. }
  2099. })
  2100. },
  2101. dbclickWeight(row) {
  2102. if (this.table.myTemp.isUpdateSave == true) {
  2103. return false
  2104. }
  2105. console.log(row, this.isRoleEdit, '=====')
  2106. row.isWeight = true
  2107. row.focusState = true
  2108. this.dropState = true
  2109. this.myStart2 = false
  2110. this.myMove2 = false
  2111. this.myEnd2 = false
  2112. },
  2113. // 编辑-重量
  2114. blurWeight(row, fttype, myid) {
  2115. var objList = {}
  2116. for (let i = 0; i < row.arrList.length; i++) {
  2117. if (row.arrList[i].fttype == fttype && row.arrList[i].id == myid) {
  2118. objList = row.arrList[i]
  2119. }
  2120. }
  2121. if (objList.weight !== '') {
  2122. if (parseFloat(objList.weight) <= 0) {
  2123. this.$message({
  2124. type: 'error',
  2125. message: '重量不可输入小于0的数据',
  2126. duration: 2000
  2127. })
  2128. return false
  2129. }
  2130. }
  2131. if (objList.weight == '') {
  2132. objList.weight = 0
  2133. }
  2134. this.requestParam = {}
  2135. this.requestParam.common = {
  2136. 'returnmap': '0'
  2137. }
  2138. this.requestParam.data = []
  2139. this.requestParam.data[0] = {
  2140. 'name': 'checkFPdLeftW',
  2141. 'type': 'v',
  2142. 'parammaps': {
  2143. pastureid: objList.pastureid,
  2144. fpdid: objList.fpdid,
  2145. fttype: objList.fttype,
  2146. lweight: String(parseFloat(objList.weight) - parseFloat(objList.lweight))
  2147. }
  2148. }
  2149. this.requestParam.data[1] = {
  2150. 'name': 'updateLppd',
  2151. 'type': 'e',
  2152. 'parammaps': {
  2153. pastureid: row.pastureid,
  2154. lppid: row.id,
  2155. barid: objList.barid,
  2156. barname: objList.barname,
  2157. fpdid: objList.fpdid,
  2158. fttype: objList.fttype,
  2159. lweight: objList.weight,
  2160. sort: objList.sort,
  2161. tmrid: objList.tmrid,
  2162. tmrname: objList.tmrname,
  2163. background: objList.background,
  2164. id: objList.id
  2165. }
  2166. }
  2167. this.requestParam.data[2] = {
  2168. 'name': 'updateFpdetailUse',
  2169. 'type': 'e',
  2170. 'parammaps': {
  2171. pastureid: objList.pastureid,
  2172. id: objList.fpdid,
  2173. fttype: objList.fttype,
  2174. lweight: String(parseFloat(objList.weight) - parseFloat(objList.lweight))
  2175. }
  2176. }
  2177. ExecDataByConfig(this.requestParam).then(response => {
  2178. console.log('编辑保存发送参数', this.requestParam)
  2179. if (response.msg === 'fail') {
  2180. this.$notify({
  2181. title: '保存失败',
  2182. message: response.data,
  2183. type: 'warning',
  2184. duration: 2000
  2185. })
  2186. this.getdataListParmAll.parammaps.refresh = 0
  2187. this.pagindex = 1
  2188. this.getAllList()
  2189. } else {
  2190. this.$notify({
  2191. title: '',
  2192. message: '保存成功',
  2193. type: 'success',
  2194. duration: 2000
  2195. })
  2196. this.getdataListParmAll.parammaps.refresh = 0
  2197. this.pagindex = 1
  2198. this.getAllList()
  2199. this.isWeight = false
  2200. }
  2201. })
  2202. },
  2203. handleTakeEffectChange() {
  2204. console.log('点击了生效')
  2205. },
  2206. handleIssplitChange() {
  2207. console.log('是否提前小料拆分')
  2208. },
  2209. // 撒料位删除
  2210. handleFLDelete(ele, row) {
  2211. if (this.table.myTemp.isUpdateSave == true) {
  2212. return false
  2213. }
  2214. console.log(ele, row, '点击了撒料删除')
  2215. this.selectList = []
  2216. this.requestParam = {}
  2217. this.requestParam.common = {
  2218. 'returnmap': '0'
  2219. }
  2220. this.requestParam.data = []
  2221. this.requestParam.data[0] = {
  2222. 'name': 'deleteLppd',
  2223. 'type': 'e',
  2224. 'parammaps': {
  2225. pastureid: ele.pastureid,
  2226. id: ele.id
  2227. }
  2228. }
  2229. this.requestParam.data[1] = {
  2230. 'name': 'updateFpdetailUse',
  2231. 'type': 'e',
  2232. 'parammaps': {
  2233. pastureid: ele.pastureid,
  2234. id: ele.fpdid,
  2235. fttype: ele.fttype,
  2236. lweight: '-' + parseFloat(ele.weight)
  2237. }
  2238. }
  2239. ExecDataByConfig(this.requestParam).then(response => {
  2240. console.log('删除保存发送参数', this.requestParam)
  2241. if (response.msg === 'fail') {
  2242. this.$notify({
  2243. title: '删除失败',
  2244. message: response.data,
  2245. type: 'warning',
  2246. duration: 2000
  2247. })
  2248. } else {
  2249. this.$notify({ title: '', message: '删除成功', type: 'success', duration: 2000 })
  2250. this.reload()
  2251. // this.getdataListParmAll.parammaps.refresh = 0
  2252. // this.pagindex = 1
  2253. // this.getAllList()
  2254. // this.getSmallMenuList()
  2255. }
  2256. })
  2257. },
  2258. handleSelect(val) {
  2259. console.log('勾选数据', val)
  2260. this.selectList = val
  2261. },
  2262. // 减少车次
  2263. handleReduceTrains() {
  2264. if (this.selectList.length == 0) {
  2265. this.$message({
  2266. type: 'error',
  2267. message: '请选择车次',
  2268. duration: 2000
  2269. })
  2270. return false
  2271. } else {
  2272. // 减少对应车次
  2273. for (let i = 0; i < this.selectList.length; i++) {
  2274. if (this.selectList[i].arrList.length > 0) {
  2275. this.$message({
  2276. type: 'error',
  2277. message: '本车次已添加栏舍不可删除',
  2278. duration: 2000
  2279. })
  2280. return false
  2281. }
  2282. }
  2283. MessageBox.confirm('是否确认删除此信息?', {
  2284. confirmButtonText: '确认',
  2285. cancelButtonText: '取消',
  2286. type: 'warning'
  2287. }).then(() => {
  2288. console.log(this.selectList)
  2289. this.requestParam = {}
  2290. this.requestParam.common = {
  2291. 'returnmap': '0'
  2292. }
  2293. this.requestParam.data = []
  2294. this.requestParam.data[0] = {
  2295. 'name': 'insertSpotList',
  2296. 'resultmaps': {
  2297. 'list': this.selectList
  2298. }
  2299. }
  2300. this.requestParam.data[0].children = []
  2301. this.requestParam.data[0].children[0] = {
  2302. 'name': 'deleteLpp',
  2303. 'type': 'e',
  2304. 'parammaps': {
  2305. id: '@insertSpotList.id',
  2306. pastureid: '@insertSpotList.pastureid'
  2307. }
  2308. }
  2309. ExecDataByConfig(this.requestParam).then(response => {
  2310. console.log('删除保存发送参数', this.requestParam)
  2311. if (response.msg === 'fail') {
  2312. this.$notify({
  2313. title: '删除失败',
  2314. message: response.data,
  2315. type: 'warning',
  2316. duration: 2000
  2317. })
  2318. } else {
  2319. this.$notify({
  2320. title: '',
  2321. message: '删除成功',
  2322. type: 'success',
  2323. duration: 2000
  2324. })
  2325. this.getdataListParmAll.parammaps.refresh = 1
  2326. this.pagindex = 1
  2327. this.getAllList()
  2328. }
  2329. })
  2330. })
  2331. }
  2332. },
  2333. // 行内删除
  2334. handleRowDelete(row) {
  2335. console.log(row, '点击了行删除')
  2336. if (row.arrList.length == 0) {
  2337. MessageBox.confirm('是否确认删除此信息?', {
  2338. confirmButtonText: '确认',
  2339. cancelButtonText: '取消',
  2340. type: 'warning'
  2341. }).then(() => {
  2342. this.selectList = []
  2343. this.requestParam = {}
  2344. this.requestParam.name = 'deleteLpp'
  2345. this.requestParam.parammaps = {}
  2346. this.requestParam.parammaps.pastureid = row.pastureid
  2347. this.requestParam.parammaps.id = row.id
  2348. PostDataByName(this.requestParam).then(response => {
  2349. if (response.msg === 'fail') {
  2350. this.$notify({
  2351. title: '删除失败',
  2352. message: response.data,
  2353. type: 'warning',
  2354. duration: 2000
  2355. })
  2356. } else {
  2357. this.$notify({
  2358. title: '成功',
  2359. message: '删除成功',
  2360. type: 'success',
  2361. duration: 2000
  2362. })
  2363. this.getdataListParmAll.parammaps.refresh = 1
  2364. this.pagindex = 1
  2365. this.getAllList()
  2366. }
  2367. })
  2368. }).catch(() => {
  2369. this.$message({
  2370. type: 'info',
  2371. message: '已取消删除'
  2372. })
  2373. })
  2374. } else {
  2375. this.$message({
  2376. type: 'error',
  2377. message: '本车次已添加栏舍不可删除',
  2378. duration: 2000
  2379. })
  2380. return false
  2381. }
  2382. },
  2383. handleLeftButton() { // 向左
  2384. console.log('向左', this.isLeftButton)
  2385. this.isLeftButton = false
  2386. this.isRightButton = true
  2387. this.$refs.listR.style.width = '46%'
  2388. this.$refs.listR.style.zIndex = 4
  2389. // this.$refs.listRight.style.zIndex = 4
  2390. // this.$refs.listRight2.style.zIndex = 4
  2391. this.getSmallMenuList()
  2392. },
  2393. handleRightButton() { // 向右
  2394. console.log('向右', this.isLeftButton)
  2395. this.isLeftButton = true
  2396. this.isRightButton = false
  2397. this.$refs.list.style.zIndex = 1
  2398. this.$refs.listR.style.width = '50px'
  2399. this.$refs.listR.style.zIndex = 1
  2400. this.$nextTick(() => {
  2401. this.$refs.listRight.style.zIndex = 1
  2402. this.$refs.listRight2.style.zIndex = 1
  2403. })
  2404. },
  2405. handleTakeEffect() {
  2406. if (this.selectList.length == 0) {
  2407. this.$message({
  2408. type: 'error',
  2409. message: '请选择车次信息',
  2410. duration: 2000
  2411. })
  2412. } else {
  2413. MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否生效?', {
  2414. confirmButtonText: '确认',
  2415. cancelButtonText: '取消',
  2416. type: 'warning'
  2417. }).then(() => {
  2418. for (let i = 0; i < this.selectList.length; i++) {
  2419. // this.$set(this.selectList[i], 'enable', '1')
  2420. this.selectList[i].sel = 1
  2421. }
  2422. console.log('生效', this.selectList)
  2423. this.requestParam.common = {
  2424. 'returnmap': '0'
  2425. }
  2426. this.requestParam.data = []
  2427. this.requestParam.data[0] = {
  2428. 'name': 'insertSpotList',
  2429. 'resultmaps': {
  2430. 'list': this.selectList
  2431. }
  2432. }
  2433. this.requestParam.data[0].children = []
  2434. this.requestParam.data[0].children[0] = {
  2435. 'name': 'updatelpplanEnable',
  2436. 'type': 'e',
  2437. 'parammaps': {
  2438. sel: '@insertSpotList.sel',
  2439. id: '@insertSpotList.id',
  2440. pastureid: '@insertSpotList.pastureid'
  2441. }
  2442. }
  2443. ExecDataByConfig(this.requestParam).then(response => {
  2444. console.log('生效保存发送参数', this.requestParam)
  2445. if (response.msg === 'fail') {
  2446. this.$notify({
  2447. title: '生效失败',
  2448. message: response.data,
  2449. type: 'warning',
  2450. duration: 2000
  2451. })
  2452. } else {
  2453. this.$notify({
  2454. title: '',
  2455. message: '生效成功',
  2456. type: 'success',
  2457. duration: 2000
  2458. })
  2459. this.getdataListParmAll.parammaps.refresh = 1
  2460. this.pagindex = 1
  2461. this.getAllList()
  2462. }
  2463. })
  2464. })
  2465. }
  2466. },
  2467. handleDisable() {
  2468. if (this.selectList.length == 0) {
  2469. this.$message({
  2470. type: 'error',
  2471. message: '请选择车次信息',
  2472. duration: 2000
  2473. })
  2474. } else {
  2475. MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否禁用?', {
  2476. confirmButtonText: '确认',
  2477. cancelButtonText: '取消',
  2478. type: 'warning'
  2479. }).then(() => {
  2480. for (let i = 0; i < this.selectList.length; i++) {
  2481. // this.$set(this.selectList[i], 'enable', '1')
  2482. this.selectList[i].sel = 0
  2483. }
  2484. console.log('禁用', this.selectList)
  2485. this.requestParam.common = {
  2486. 'returnmap': '0'
  2487. }
  2488. this.requestParam.data = []
  2489. this.requestParam.data[0] = {
  2490. 'name': 'insertSpotList',
  2491. 'resultmaps': {
  2492. 'list': this.selectList
  2493. }
  2494. }
  2495. this.requestParam.data[0].children = []
  2496. this.requestParam.data[0].children[0] = {
  2497. 'name': 'updatelpplanEnable',
  2498. 'type': 'e',
  2499. 'parammaps': {
  2500. sel: '@insertSpotList.sel',
  2501. id: '@insertSpotList.id',
  2502. pastureid: '@insertSpotList.pastureid'
  2503. }
  2504. }
  2505. ExecDataByConfig(this.requestParam).then(response => {
  2506. console.log('禁用保存发送参数', this.requestParam)
  2507. if (response.msg === 'fail') {
  2508. this.$notify({
  2509. title: '禁用失败',
  2510. message: response.data,
  2511. type: 'warning',
  2512. duration: 2000
  2513. })
  2514. } else {
  2515. this.$notify({
  2516. title: '',
  2517. message: '禁用成功',
  2518. type: 'success',
  2519. duration: 2000
  2520. })
  2521. this.getdataListParmAll.parammaps.refresh = 1
  2522. this.pagindex = 1
  2523. this.getAllList()
  2524. }
  2525. })
  2526. })
  2527. }
  2528. }
  2529. }
  2530. }
  2531. </script>
  2532. <style lang="scss" scoped>
  2533. /deep/ .el-radio-button__orig-radio:checked+.el-radio-button__inner {
  2534. color: #fff;
  2535. background-color: #009C69;
  2536. border-color: #009C69;
  2537. -webkit-box-shadow: -1px 0 0 0 #009C69;
  2538. box-shadow: -1px 0 0 0 #009C69;
  2539. }
  2540. .not-select {
  2541. -moz-user-select: none;
  2542. /*火狐*/
  2543. -webkit-user-select: none;
  2544. /*webkit浏览器*/
  2545. -ms-user-select: none;
  2546. /*IE10*/
  2547. -khtml-user-select: none;
  2548. /*早期浏览器*/
  2549. user-select: none;
  2550. position: relative;
  2551. }
  2552. </style>
  2553. <style lang="scss">
  2554. /deep/ :focus {
  2555. outline: 0;
  2556. }
  2557. :focus-visible {
  2558. outline: 0 !important;
  2559. }
  2560. // 下拉框
  2561. .filter-item2 .el-input--suffix .el-input__inner {
  2562. height: 30px !important;
  2563. font-size: 8px;
  2564. padding: 0 2px;
  2565. }
  2566. .filter-item2 .el-input--suffix .el-input__suffix .el-input__suffix-inner .el-input__icon {
  2567. line-height: 30px !important;
  2568. }
  2569. // 输入框
  2570. .filter-item2 .el-input__inner {
  2571. height: 30px !important;
  2572. font-size: 8px;
  2573. padding: 0 2px;
  2574. }
  2575. </style>
  2576. <style lang="scss">
  2577. // /deep/ .el-table__body .el-table__row{
  2578. // max-height:50px!important;
  2579. // height: 50px!important;
  2580. // }
  2581. .menuList {
  2582. height: 190px;
  2583. background: red;
  2584. border-bottom: 2px solid #d8dce5;
  2585. box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
  2586. .menuList-t {
  2587. height: 60px;
  2588. background: #fff;
  2589. display: flex;
  2590. justify: center;
  2591. align-items: center;
  2592. display: -webkit-flex;
  2593. flex-direction: row;
  2594. flex-wrap: wrap;
  2595. justify-content: space-between;
  2596. .menuList-t-l {}
  2597. .menuList-t-r {
  2598. display: flex;
  2599. flex-direction: row;
  2600. flex-wrap: wrap;
  2601. justify-content: space-between;
  2602. position: relative;
  2603. .menuList-t-r-l {
  2604. margin-right: 10px;
  2605. cursor: pointer;
  2606. width: 150px;
  2607. height: 20px;
  2608. line-height: 20px;
  2609. text-align: center;
  2610. background: rgba(25, 138, 244, 0);
  2611. border: 1px solid #1BBD89;
  2612. border-radius: 2px;
  2613. font-size: 12px;
  2614. color: #1BBD89;
  2615. }
  2616. .menuList-t-r-r {
  2617. margin-right: 10px;
  2618. cursor: pointer;
  2619. width: 150px;
  2620. height: 20px;
  2621. line-height: 20px;
  2622. text-align: center;
  2623. background: rgba(25, 138, 244, 0);
  2624. border: 1px solid #1BBD89;
  2625. border-radius: 2px;
  2626. font-size: 12px;
  2627. color: #1BBD89;
  2628. }
  2629. .columnHouse {
  2630. width: 650px;
  2631. background: #fff;
  2632. box-shadow: 0 0 6px 6px rgba(0, 0, 0, 0.04), 0 0 6px 6px rgba(0, 0, 0, 0.04);
  2633. position: absolute;
  2634. right: 0;
  2635. top: 25px;
  2636. z-index: 5;
  2637. .el-table {
  2638. height: 250px;
  2639. overflow: auto;
  2640. }
  2641. }
  2642. }
  2643. }
  2644. .menuList-b {
  2645. height: 130px;
  2646. background: #fff;
  2647. position: relative;
  2648. ::-webkit-scrollbar {
  2649. width: 7px;
  2650. height: 7px;
  2651. background-color: #F5F5F5;
  2652. }
  2653. ::-webkit-scrollbar-track {
  2654. box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  2655. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  2656. border-radius: 10px;
  2657. background-color: #F5F5F5;
  2658. }
  2659. ::-webkit-scrollbar-thumb {
  2660. border-radius: 10px;
  2661. box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
  2662. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
  2663. background-color: #c8c8c8;
  2664. }
  2665. .draggableList {
  2666. position: absolute;
  2667. width: 100%;
  2668. margin: 0 0;
  2669. height: 130px;
  2670. list-style: none;
  2671. padding: 0 0;
  2672. overflow: auto;
  2673. font-size: 12px;
  2674. .draggableTitle {
  2675. float: left;
  2676. width: 105px;
  2677. white-space: nowrap;
  2678. overflow: hidden;
  2679. text-overflow: ellipsis;
  2680. margin: 5px 5px;
  2681. border-radius: 7px;
  2682. text-align: center;
  2683. color: #000;
  2684. height: 36px;
  2685. line-height: 36px;
  2686. }
  2687. li {
  2688. text-align: center;
  2689. color: #fff;
  2690. .draggableName {
  2691. display: block;
  2692. width: 100%;
  2693. overflow: hidden;
  2694. text-overflow: ellipsis;
  2695. white-space: nowrap;
  2696. }
  2697. }
  2698. }
  2699. }
  2700. }
  2701. .list-group2 {
  2702. .list-group-item2 {
  2703. width: 220px;
  2704. height: 50px;
  2705. overflow: hidden;
  2706. float: left;
  2707. margin: 5px 5px;
  2708. position: relative;
  2709. color: #fff;
  2710. .arr-t {
  2711. height: 50px;
  2712. border-radius: 5px 5px;
  2713. }
  2714. .arr-l {
  2715. float: left;
  2716. width: 60px;
  2717. height: 50px;
  2718. overflow: hidden;
  2719. border-radius: 5px 50% 50% 5px;
  2720. .arr-l-t {
  2721. position: relative;
  2722. .arr-l-t-t {
  2723. width: 0;
  2724. height: 0;
  2725. border-top: 26px solid #3479f2;
  2726. border-right: 26px solid transparent;
  2727. }
  2728. .arr-l-t-b {
  2729. position: absolute;
  2730. top: 4px;
  2731. left: 1px;
  2732. color: #fff;
  2733. width: 10px;
  2734. height: 10px;
  2735. .el-input--suffix {
  2736. opacity: 0;
  2737. .el-input__inner {
  2738. height: 10px;
  2739. }
  2740. }
  2741. }
  2742. }
  2743. .arr-l-b {
  2744. width: 45px;
  2745. position: absolute;
  2746. top: 15px;
  2747. left: 10px;
  2748. color: #fff !important;
  2749. font-size: 12px;
  2750. .tmrname {
  2751. width: 100%;
  2752. overflow: hidden;
  2753. text-overflow: ellipsis;
  2754. white-space: nowrap;
  2755. }
  2756. }
  2757. }
  2758. .arr-c {
  2759. position: absolute;
  2760. top: 0px;
  2761. left: 0;
  2762. }
  2763. .arr-r {
  2764. float: right;
  2765. width: 160px;
  2766. height: 50px;
  2767. overflow: hidden;
  2768. line-height: 50px;
  2769. .arr-r-l {
  2770. float: left;
  2771. width: 85px;
  2772. .barname {
  2773. width: 100%;
  2774. overflow: hidden;
  2775. text-overflow: ellipsis;
  2776. white-space: nowrap;
  2777. font-size: 14px;
  2778. }
  2779. }
  2780. .arr-r-c {
  2781. float: left;
  2782. width: 10px;
  2783. }
  2784. .arr-r-r {
  2785. float: left;
  2786. width: 65px;
  2787. .weight {
  2788. width: 100%;
  2789. overflow: hidden;
  2790. text-overflow: ellipsis;
  2791. white-space: nowrap;
  2792. font-size: 14px;
  2793. }
  2794. }
  2795. }
  2796. }
  2797. }
  2798. </style>
  2799. <style>
  2800. .draggableWeight {
  2801. display: block;
  2802. line-height: 18px;
  2803. height: 18px;
  2804. color: #000;
  2805. width: 100%;
  2806. margin: 0 auto;
  2807. }
  2808. </style>