planProjectRoundGx.vue 116 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658
  1. <template>
  2. <div class="balanceSheetData">
  3. <div class="box">
  4. <div class="box-top">
  5. <el-form
  6. style="overflow: hidden;"
  7. :style="filterForm.show ? null : { height: '0px' }"
  8. size="mini"
  9. label-width="70px"
  10. >
  11. <el-row>
  12. <el-col :span="6">
  13. <el-form-item label="排产日期">
  14. <zj-timegran-date
  15. v-model="filterForm.data.clock"
  16. style="width: 100%;"
  17. :type="'daterange'"
  18. :oneFoo="getTableData"
  19. :custom ="1"
  20. ></zj-timegran-date>
  21. </el-form-item>
  22. </el-col>
  23. <el-col :span="4">
  24. <el-form-item label="编号">
  25. <el-input
  26. v-model="filterForm.data.Gmid"
  27. style="width: 100%;"
  28. refcous="true"
  29. clearable
  30. ></el-input>
  31. </el-form-item>
  32. </el-col>
  33. <el-col :span="5">
  34. <el-form-item label="钢种">
  35. <el-select
  36. filterable clearable
  37. collapse-tags
  38. v-model="filterForm.data.grades"
  39. multiple
  40. placeholder=""
  41. style="width: 100%;"
  42. >
  43. <el-option
  44. v-for="item of nameObj.grades.arr"
  45. :key="item.id"
  46. :value="item.name"
  47. :label="item.name"
  48. ></el-option>
  49. </el-select>
  50. </el-form-item>
  51. </el-col>
  52. <el-col :span="5">
  53. <el-form-item label="规格">
  54. <el-select
  55. filterable clearable
  56. collapse-tags
  57. v-model="filterForm.data.specifications"
  58. multiple
  59. placeholder=""
  60. style="width: 100%;"
  61. >
  62. <el-option
  63. v-for="item of nameObj.specifications.arr"
  64. :key="item.id"
  65. :value="item.name"
  66. :label="item.name"
  67. ></el-option>
  68. </el-select>
  69. </el-form-item>
  70. </el-col>
  71. <el-col :span="3">
  72. <el-form-item label="工序">
  73. <el-select
  74. filterable
  75. collapse-tags
  76. v-model="filterForm.data.workprocid"
  77. placeholder=""
  78. style="width: 100%;"
  79. >
  80. <el-option
  81. v-for="item of nameObj.workprocid.arr"
  82. :key="item.id"
  83. :value="item.id"
  84. :label="item.name"
  85. ></el-option>
  86. </el-select>
  87. </el-form-item>
  88. </el-col>
  89. </el-row>
  90. </el-form>
  91. <div class="box-top-gjl">
  92. <el-button
  93. class="button"
  94. type="primary"
  95. size="mini"
  96. icon="el-icon-plus"
  97. v-privilege="activeMenu + 'ADD'"
  98. @click="but_addNBJH()"
  99. >新增内部计划</el-button>
  100. <el-button
  101. class="button"
  102. type="primary"
  103. size="mini"
  104. icon="el-icon-plus"
  105. v-privilege="activeMenu + 'ADD'"
  106. @click="but_add(1)"
  107. >新增子计划</el-button>
  108. <el-select v-model ="filterForm.data.options" clearable @change="getTableData()" size="mini">
  109. <el-option
  110. v-for="item of options.arr"
  111. :key="item.id"
  112. :label="item.name"
  113. :value="item.id">
  114. </el-option>
  115. </el-select>
  116. <el-button
  117. class="button"
  118. type="primary"
  119. size="mini"
  120. icon="el-icon-edit-outline"
  121. @click="but_update"
  122. :loading="loading"
  123. v-privilege="activeMenu + 'PUT'"
  124. >修改轮次描述</el-button>
  125. <el-switch
  126. v-model="leftIssueShow"
  127. active-text="显示全部"
  128. inactive-text="隐藏已下发"
  129. @change="leftIssueShowChange">
  130. </el-switch>
  131. <div style="float:right; text-align: right;">
  132. <el-radio-group v-model="radio" @change="radioChange()">
  133. <el-radio :label="0">
  134. 展开编辑
  135. </el-radio>
  136. <el-radio :label="1">
  137. 取消展开
  138. </el-radio>
  139. </el-radio-group>
  140. <el-button
  141. type="danger"
  142. size="mini"
  143. icon="el-icon-add-outline"
  144. @click="edit_plural()"
  145. >强制修改</el-button>
  146. <el-button
  147. type="primary"
  148. size="mini"
  149. icon="el-icon-search"
  150. v-privilege="activeMenu + 'QUERY'"
  151. @click="getTableData(1)"
  152. >查询</el-button>
  153. <el-button
  154. type="primary"
  155. size="mini"
  156. icon="el-icon-add-outline"
  157. @click="but_edit_plural()"
  158. >保存</el-button>
  159. <el-button
  160. type="primary"
  161. size="mini"
  162. icon="el-icon-add-outline"
  163. @click="issue()"
  164. >下发</el-button>
  165. <!-- <el-button
  166. type="primary"
  167. size="mini"
  168. icon="el-icon-add-outline"
  169. @click="audit()"
  170. >审核</el-button> -->
  171. <el-button
  172. type="primary"
  173. size="mini"
  174. icon="el-icon-add-outline"
  175. @click="offissue()"
  176. >取消下发</el-button>
  177. <el-button
  178. class="button"
  179. type="danger"
  180. size="mini"
  181. icon="el-icon-delete"
  182. @click="but_del_plural()"
  183. >删除</el-button>
  184. <el-button
  185. size="mini"
  186. :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
  187. :title="filterForm.show ? '收起搜索区' : '展开搜索区'"
  188. @click="filterForm.show = !filterForm.show;
  189. $nextTick(() => {
  190. singleTableHeight = getRoleHeight($refs['boxBottom']) - 45;
  191. }
  192. );"
  193. >{{ filterForm.show ? '收起' : '展开' }}</el-button>
  194. </div>
  195. </div>
  196. </div>
  197. <div class="box-bottom" ref="boxBottom">
  198. <div class="table-box" ref="table_box">
  199. <div class="table-left" :style="{ width: leftTableWidth + 'px' }" v-if="leftTableShow">
  200. <el-form
  201. size="mini"
  202. ref="dialog_form_arr_1"
  203. label-width="0px"
  204. :model="tableFormDataObj"
  205. >
  206. <el-table stripe
  207. id="singleTable1"
  208. ref="singleTable1"
  209. :data="leftTableData"
  210. v-loading="leftTableLoading"
  211. style="width: 100%;"
  212. :height="singleTableHeight"
  213. border
  214. size="mini"
  215. highlight-current-row
  216. show-summary
  217. :summary-method="getSummaries"
  218. @current-change="getTableDetailData"
  219. @selection-change="handleSelectionChangeAsleft"
  220. @row-click="openDetails"
  221. >
  222. <el-table-column
  223. sortable
  224. type="selection"
  225. width="40"
  226. prop="seq"
  227. label="序号"
  228. align="center"
  229. :selectable="checkboxTLeft"
  230. fixed="left"
  231. class-name="cnspicuous"
  232. ></el-table-column>
  233. <el-table-column
  234. sortable
  235. prop="id"
  236. label="编号"
  237. fixed="left"
  238. width="141px"
  239. :show-overflow-tooltip="true"
  240. ></el-table-column>
  241. <el-table-column
  242. sortable
  243. prop="jhTime"
  244. label="排产日期"
  245. align="center"
  246. width="95px"
  247. :show-overflow-tooltip="true"
  248. ></el-table-column>
  249. <el-table-column
  250. sortable
  251. prop="deliveryDate"
  252. label="交货日期"
  253. align="center"
  254. width="80px"
  255. :show-overflow-tooltip="true"
  256. ></el-table-column>
  257. <el-table-column
  258. sortable
  259. prop="grades"
  260. align="center"
  261. label="钢种"
  262. width="71px"
  263. :show-overflow-tooltip="true"
  264. >
  265. </el-table-column>
  266. <el-table-column
  267. sortable
  268. prop="specifications"
  269. label="规格"
  270. align="center"
  271. width="84px"
  272. :show-overflow-tooltip="true"
  273. >
  274. </el-table-column>
  275. <el-table-column
  276. sortable
  277. prop="tag"
  278. label="订单类型"
  279. align="center"
  280. width="88px"
  281. :show-overflow-tooltip="true"
  282. >
  283. <template slot-scope="scope">
  284. <span
  285. :style="{color: nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].color : ''}"
  286. >{{ nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].name : scope.row.tag }}</span>
  287. </template>
  288. </el-table-column>
  289. <el-table-column
  290. sortable
  291. prop="planweight"
  292. label="计划量"
  293. width="80px"
  294. align="center"
  295. :show-overflow-tooltip="true"
  296. >
  297. </el-table-column>
  298. <el-table-column
  299. sortable
  300. prop="kxf_weight"
  301. label="可下发量"
  302. min-width="80px"
  303. align="center"
  304. :show-overflow-tooltip="true"
  305. >
  306. </el-table-column>
  307. <el-table-column
  308. sortable
  309. prop="yxf_weight"
  310. label="已下发量"
  311. min-width="80px"
  312. align="center"
  313. :show-overflow-tooltip="true"
  314. >
  315. </el-table-column>
  316. <el-table-column
  317. sortable
  318. prop="workprocType"
  319. label="工序"
  320. min-width="100px"
  321. align="center"
  322. :show-overflow-tooltip="true"
  323. >
  324. <template slot-scope="scope">
  325. <span>{{ nameObj.workprocid.obj[scope.row.workprocType] ? nameObj.workprocid.obj[scope.row.workprocType].name : scope.row.workprocType }}</span>
  326. </template>
  327. </el-table-column>
  328. </el-table>
  329. </el-form>
  330. </div>
  331. <div class="table-tuodong" :style="{ height: singleTableHeight + 'px' }"
  332. @mousedown="tableTDMousedown"
  333. ></div>
  334. <div class="table-right" :style="{ 'margin-left': (leftTableWidth + 7) + 'px' }">
  335. <el-form
  336. size="mini"
  337. ref="dialog_form_arr_2"
  338. label-width="0px"
  339. :model="rightTableObj"
  340. >
  341. <el-table stripe
  342. id="singleTable2"
  343. ref="singleTable2"
  344. :data="rightTableData"
  345. v-loading="tableLoading"
  346. style="width: 100%;"
  347. :height="singleTableHeight"
  348. border
  349. size="mini"
  350. highlight-current-row
  351. show-summary
  352. :summary-method="getSummaries"
  353. @selection-change="handleSelectionChange"
  354. :row-class-name="tableRowClassName"
  355. @cell-click="cellClick"
  356. >
  357. <el-table-column
  358. sortable
  359. type="selection"
  360. width="40"
  361. align="center"
  362. :selectable='checkboxT'
  363. fixed="left"
  364. class-name="cnspicuous"
  365. ></el-table-column>
  366. <el-table-column
  367. sortable
  368. prop="roundid"
  369. label="编号"
  370. fixed="left"
  371. min-width="141px"
  372. v-model="filterForm.data.sqno"
  373. :show-overflow-tooltip="true"
  374. ></el-table-column>
  375. <el-table-column
  376. sortable
  377. prop="describe"
  378. label="轮次描述"
  379. align="center"
  380. min-width="160px"
  381. :show-overflow-tooltip="true"
  382. >
  383. <template slot-scope="scope">
  384. <el-form-item
  385. :prop="scope.row.seq + '.describe'"
  386. v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '3'"
  387. :rules="tableFormRules.grades"
  388. >
  389. <el-input
  390. style="width: 100%;"
  391. v-model="rightTableObj[scope.row.seq].describe"
  392. @keydown.native="keyDown" :id="scope.$index + scope.column.id"
  393. refcous="true"
  394. ></el-input>
  395. </el-form-item>
  396. <span v-else>{{scope.row.describe}}</span>
  397. </template>
  398. </el-table-column>
  399. <el-table-column
  400. sortable
  401. prop="may"
  402. label="排产日期"
  403. align="center"
  404. min-width="134px"
  405. :show-overflow-tooltip="true"
  406. >
  407. <template slot-scope="scope">
  408. <el-form-item
  409. :prop="scope.row.seq + '.may'"
  410. v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '3'"
  411. :rules="tableFormRules.grades"
  412. >
  413. <el-date-picker
  414. value-format="yyyy-MM-dd"
  415. type="date"
  416. v-model="rightTableObj[scope.row.seq].may"
  417. placeholder=""
  418. style="width: 100%;"
  419. @keydown.native="keyDown"
  420. ></el-date-picker>
  421. </el-form-item>
  422. <span v-else>{{scope.row.may}}</span>
  423. </template>
  424. </el-table-column>
  425. <!-- <el-table-column
  426. sortable
  427. prop="deliveryDate"
  428. label="交货日期"
  429. align="center"
  430. width="80px"
  431. :show-overflow-tooltip="true"
  432. ></el-table-column> -->
  433. <el-table-column
  434. sortable
  435. prop="state"
  436. label="状态"
  437. align="center"
  438. min-width="70px"
  439. :show-overflow-tooltip="true"
  440. >
  441. <template slot-scope="scope">
  442. <span
  443. :style="{color: nameObj.state.obj[scope.row.state] ? nameObj.state.obj[scope.row.state].color : ''}"
  444. >{{ nameObj.state.obj[scope.row.state] ? nameObj.state.obj[scope.row.state].name : scope.row.state }}</span>
  445. </template>
  446. </el-table-column>
  447. <el-table-column
  448. sortable
  449. prop="tag"
  450. align="center"
  451. label="订单类型"
  452. min-width="70px"
  453. :show-overflow-tooltip="true"
  454. >
  455. <template slot-scope="scope">
  456. <span
  457. :style="{color: nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].color : ''}"
  458. >{{ nameObj.tag.obj[scope.row.tag] ? nameObj.tag.obj[scope.row.tag].name : scope.row.tag }}</span>
  459. </template>
  460. </el-table-column>
  461. <el-table-column
  462. sortable
  463. prop="grades"
  464. label="钢种"
  465. align="center"
  466. min-width="100px"
  467. :show-overflow-tooltip="true"
  468. >
  469. <template slot-scope="scope">
  470. <el-form-item
  471. :prop="scope.row.seq + '.grades'"
  472. v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '3'"
  473. :rules="tableFormRules.grades"
  474. >
  475. <el-select
  476. allow-create
  477. filterable
  478. clearable
  479. v-model="rightTableObj[scope.row.seq].grades"
  480. @keydown.native="keyDown" :id="scope.$index + scope.column.id"
  481. placeholder=""
  482. @change = "((data) =>{gradesChange(data,scope)})"
  483. >
  484. <el-option
  485. v-for="item of nameObj.grades.arr"
  486. :key="item.id"
  487. :value="item.name"
  488. :label="item.name"
  489. ></el-option>
  490. </el-select>
  491. </el-form-item>
  492. <span v-else>{{ nameObj.grades.obj[scope.row.grades] ? nameObj.grades.obj[scope.row.grades].name : scope.row.grades }}</span>
  493. </template>
  494. </el-table-column>
  495. <el-table-column
  496. sortable
  497. prop="specifications"
  498. label="规格"
  499. align="center"
  500. min-width="109px"
  501. :show-overflow-tooltip="true"
  502. >
  503. <template slot-scope="scope">
  504. <el-form-item
  505. :prop="scope.row.seq + '.specifications'"
  506. v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '3'"
  507. :rules="tableFormRules.grades"
  508. >
  509. <el-select
  510. allow-create
  511. filterable
  512. clearable
  513. v-model="rightTableObj[scope.row.seq].specifications"
  514. @keydown.native="keyDown" :id="scope.$index + scope.column.id"
  515. placeholder=""
  516. >
  517. <el-option
  518. v-for="item of nameObj.specifications.arr"
  519. :key="item.id"
  520. :value="item.name"
  521. :label="item.name"
  522. ></el-option>
  523. </el-select>
  524. </el-form-item>
  525. <span v-else>{{ nameObj.specifications.obj[scope.row.specifications] ? nameObj.specifications.obj[scope.row.specifications].name : scope.row.specifications }}</span>
  526. </template>
  527. </el-table-column>
  528. <el-table-column
  529. sortable
  530. prop="planWeight"
  531. label="计划量"
  532. align="center"
  533. min-width="100px"
  534. :show-overflow-tooltip="true"
  535. >
  536. <template slot-scope="scope">
  537. <el-form-item
  538. :prop="scope.row.seq + '.planWeight'"
  539. v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '3'"
  540. :rules="tableFormRules.planWeight"
  541. >
  542. <el-input
  543. style="width: 100%;"
  544. v-model="rightTableObj[scope.row.seq].planWeight"
  545. @keydown.native="keyDown" :id="scope.$index + scope.column.id"
  546. refcous="true"
  547. clearable
  548. ></el-input>
  549. </el-form-item>
  550. <span v-else>{{scope.row.planWeight}}</span>
  551. </template>
  552. </el-table-column>
  553. <el-table-column
  554. sortable
  555. prop="transportType"
  556. label="运输方式"
  557. align="center"
  558. min-width="100px"
  559. :show-overflow-tooltip="true"
  560. >
  561. <template slot-scope="scope">
  562. <el-form-item
  563. :prop="scope.row.seq + '.transportType'"
  564. v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '3'"
  565. :rules="tableFormRules.transportType"
  566. >
  567. <el-select
  568. allow-create
  569. filterable
  570. clearable
  571. v-model="rightTableObj[scope.row.seq].transportType"
  572. @keydown.native="keyDown" :id="scope.$index + scope.column.id"
  573. placeholder=""
  574. >
  575. <el-option
  576. v-for="item of nameObj.transportType.arr"
  577. :key="item.id"
  578. :value="item.name"
  579. :label="item.name"
  580. ></el-option>
  581. </el-select>
  582. </el-form-item>
  583. <span v-else>{{ nameObj.transportType.obj[scope.row.transportType] ? nameObj.transportType.obj[scope.row.transportType].name : scope.row.transportType }}</span>
  584. </template>
  585. </el-table-column>
  586. <el-table-column
  587. sortable
  588. prop="purpose"
  589. label="用途"
  590. align="center"
  591. min-width="100px"
  592. :show-overflow-tooltip="true"
  593. >
  594. <template slot-scope="scope">
  595. <el-form-item
  596. :prop="scope.row.seq + '.purpose'"
  597. :rules="tableFormRules.purpose"
  598. v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '3'"
  599. >
  600. <el-select
  601. allow-create
  602. filterable
  603. clearable
  604. v-model="rightTableObj[scope.row.seq].purpose"
  605. @keydown.native="keyDown" :id="scope.$index + scope.column.id"
  606. placeholder=""
  607. >
  608. <el-option
  609. v-for="item of nameObj.purpose.arr"
  610. :key="item.id"
  611. :value="item.name"
  612. :label="item.name"
  613. ></el-option>
  614. </el-select>
  615. </el-form-item>
  616. <span v-else>{{ nameObj.purpose.obj[scope.row.purpose] ? nameObj.purpose.obj[scope.row.purpose].name : scope.row.purpose }}</span>
  617. </template>
  618. </el-table-column>
  619. <el-table-column
  620. sortable
  621. prop="chemicalStandard"
  622. label="化学成份执行标准"
  623. align="center"
  624. min-width="126px"
  625. :show-overflow-tooltip="true"
  626. >
  627. <template slot-scope="scope">
  628. <el-form-item
  629. :prop="scope.row.seq + '.chemicalStandard'"
  630. :rules="tableFormRules.chemicalStandard"
  631. v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '3'"
  632. >
  633. <el-select
  634. filterable
  635. clearable
  636. v-model="rightTableObj[scope.row.seq].chemicalStandard"
  637. @keydown.native="keyDown" :id="scope.$index + scope.column.id"
  638. placeholder=""
  639. >
  640. <el-option
  641. v-for="item of nameObj.chemicalStandard.arr"
  642. :key="item.id"
  643. :value="item.name"
  644. :label="item.name"
  645. ></el-option>
  646. </el-select>
  647. </el-form-item>
  648. <span v-else>{{ nameObj.chemicalStandard.obj[scope.row.chemicalStandard] ? nameObj.chemicalStandard.obj[scope.row.chemicalStandard].name : scope.row.chemicalStandard }}</span>
  649. </template>
  650. </el-table-column>
  651. <el-table-column
  652. sortable
  653. prop="issuedTime"
  654. label="下发时间"
  655. align="center"
  656. min-width="130px"
  657. :show-overflow-tooltip="true"
  658. ></el-table-column>
  659. <el-table-column
  660. sortable
  661. prop="createman"
  662. label="创建人"
  663. align="center"
  664. min-width="75px"
  665. :show-overflow-tooltip="true"
  666. ></el-table-column>
  667. <el-table-column
  668. sortable
  669. prop="createtime"
  670. label="创建时间"
  671. align="center"
  672. min-width="130px"
  673. :show-overflow-tooltip="true"
  674. ></el-table-column>
  675. <el-table-column
  676. sortable
  677. prop="updateman"
  678. label="修改人"
  679. align="center"
  680. min-width="75px"
  681. :show-overflow-tooltip="true"
  682. ></el-table-column>
  683. <el-table-column
  684. sortable
  685. prop="updatetime"
  686. label="修改时间"
  687. align="center"
  688. min-width="130px"
  689. :show-overflow-tooltip="true"
  690. ></el-table-column>
  691. <el-table-column
  692. sortable
  693. prop="memo"
  694. label="备注"
  695. align="center"
  696. min-width="100px"
  697. :show-overflow-tooltip="true"
  698. >
  699. <template slot-scope="scope">
  700. <el-form-item
  701. :prop="scope.row.seq + '.memo'"
  702. v-if=" !isCheck && scope.row.isSelection && scope.row.state !== '3'"
  703. :rules="tableFormRules.memo"
  704. >
  705. <el-input
  706. style="width: 100%;"
  707. v-model="rightTableObj[scope.row.seq].memo"
  708. @keydown.native="keyDown" :id="scope.$index + scope.column.id"
  709. refcous="true"
  710. ></el-input>
  711. </el-form-item>
  712. <span v-else>{{scope.row.memo}}</span>
  713. </template>
  714. </el-table-column>
  715. <el-table-column
  716. prop="roundid"
  717. label="轮次序号"
  718. min-width="100px"
  719. :show-overflow-tooltip="true"
  720. v-if="filterForm.data.show"
  721. ></el-table-column>
  722. <el-table-column
  723. prop="parentid"
  724. label="月序号"
  725. min-width="100px"
  726. :show-overflow-tooltip="true"
  727. v-if="filterForm.data.show"
  728. ></el-table-column>
  729. <el-table-column
  730. prop="workprocType"
  731. label="工序类别"
  732. min-width="100px"
  733. :show-overflow-tooltip="true"
  734. v-if="filterForm.data.show"
  735. ></el-table-column>
  736. </el-table>
  737. </el-form>
  738. </div>
  739. </div>
  740. <el-row>
  741. <el-col :span="10" v-if="leftTableShow">
  742. <el-pagination
  743. layout="total, sizes, prev, pager, next, jumper"
  744. :total="total1"
  745. :page-sizes="[10, 20, 50, 100, 500, 1000]"
  746. :page-size="pageSize1"
  747. :current-page.sync="pageNum1"
  748. @size-change="LftetableSizeChange"
  749. @current-change="getTableData"
  750. style="text-align: left;margin-top: 10px;"
  751. ></el-pagination>
  752. </el-col>
  753. <el-col :span="14">
  754. <el-pagination
  755. layout="total, sizes, prev, pager, next, jumper"
  756. :total="total"
  757. :page-sizes="[10, 20, 50, 100, 500, 1000]"
  758. :page-size="pageSize"
  759. :current-page.sync="pageNum"
  760. @size-change="tableSizeChange"
  761. @current-change="chageMethod()"
  762. style="text-align: right;margin-top: 10px;"
  763. ></el-pagination>
  764. </el-col>
  765. </el-row>
  766. </div>
  767. </div>
  768. <el-dialog
  769. title="内部计划 新增"
  770. :visible.sync="dialog.editorBox.show"
  771. width="600px"
  772. :close-on-click-modal="false"
  773. :show-close="!loading"
  774. >
  775. <div>
  776. <el-form
  777. ref="dialog_form"
  778. :model="dialog.editorBox.form.data"
  779. :rules="dialog.editorBox.form.rules"
  780. size="mini"
  781. label-width="95px"
  782. >
  783. <el-row>
  784. <el-col :span="12">
  785. <el-form-item
  786. label="排产日期"
  787. prop="may"
  788. :rules="dialog.editorBox.form.may"
  789. >
  790. <zj-timegran-date
  791. v-model="dialog.editorBox.form.data.may"
  792. style="width: 100%;"
  793. :timegranId="'DAY'"
  794. :oneFoo="getTableData"
  795. ></zj-timegran-date>
  796. </el-form-item>
  797. </el-col>
  798. <el-col :span="12">
  799. <el-form-item
  800. label="计划量"
  801. >
  802. <el-input
  803. clearable
  804. style="width: 100%;"
  805. v-model="dialog.editorBox.form.data.planWeight"
  806. >
  807. </el-input>
  808. </el-form-item>
  809. </el-col>
  810. </el-row>
  811. <el-row>
  812. <el-col>
  813. <el-form-item
  814. label="工序"
  815. prop="workprocid"
  816. :rules="dialog.editorBox.form.workprocid"
  817. >
  818. <el-select
  819. filterable
  820. clearable
  821. v-model="dialog.editorBox.form.data.workprocid"
  822. placeholder=""
  823. style="width: 40%;"
  824. >
  825. <el-option
  826. v-for="item of nameObj.workprocid.arr"
  827. :key="item.id"
  828. :value="item.id"
  829. :label="item.name"
  830. ></el-option>
  831. </el-select>
  832. </el-form-item>
  833. </el-col>
  834. </el-row>
  835. </el-form>
  836. </div>
  837. <span
  838. slot="footer"
  839. class="dialog-footer"
  840. >
  841. <el-button
  842. @click="dialog.editorBox.show = false"
  843. :loading="loading"
  844. >取 消</el-button>
  845. <el-button
  846. type="primary"
  847. @click="dataSave"
  848. :loading="loading"
  849. >保 存</el-button>
  850. </span>
  851. </el-dialog>
  852. <el-dialog
  853. title="高线轮次描述-修改"
  854. :visible.sync="dialog.editorBox3.show"
  855. width="400px"
  856. :close-on-click-modal="false"
  857. :show-close="!loading">
  858. <div>
  859. <div class="lastData">查询到工序 <el-tag size="medium">
  860. {{ nameObj.workprocid.obj[lastIssuedData.arr[0].workprocType] ?
  861. nameObj.workprocid.obj[lastIssuedData.arr[0].workprocType].name :
  862. lastIssuedData.arr[0].workprocType }}</el-tag> 最近一次下发的数据:
  863. <div>轮次计划 <el-tag size="small">{{lastIssuedData.arr[0].id}}</el-tag></div>
  864. <div>国贸订单 <el-tag size="small">{{lastIssuedData.arr[0].parentid}}</el-tag></div>
  865. <div>下发时间 <el-tag size="small">{{lastIssuedData.arr[0].issuedTime}}</el-tag></div>
  866. <div>轮次描述 <el-tag size="small">{{lastIssuedData.arr[0].describe}}</el-tag></div>
  867. </div>
  868. <el-form
  869. :model="dialog.editorBox3.form.data"
  870. ref="dialog_form3"
  871. size="mini"
  872. label-width="300px"
  873. >
  874. <el-row>
  875. <el-col>
  876. <el-col :span="20">
  877. <el-form-item
  878. label="轮次描述"
  879. prop="describe"
  880. label-width="100px"
  881. :rules="dialog.editorBox3.form.rules.describe"
  882. >
  883. <el-input clearable
  884. style="width: 100%;"
  885. v-model="dialog.editorBox3.form.data.describe"
  886. refcous="true"
  887. ></el-input>
  888. </el-form-item>
  889. </el-col>
  890. </el-col>
  891. </el-row>
  892. </el-form>
  893. </div>
  894. <span
  895. slot="footer"
  896. class="dialog-footer"
  897. >
  898. <el-button
  899. :loading="loading"
  900. @click="dialog.editorBox3.show = false"
  901. >取 消</el-button>
  902. <el-button
  903. type="primary"
  904. @click="but_copy"
  905. :loading="loading"
  906. >保 存</el-button>
  907. </span>
  908. </el-dialog>
  909. <zj-formulaEditor :equationEditing="dialog.equationEditing"></zj-formulaEditor>
  910. </div>
  911. </template>
  912. <script>
  913. import { zCheckNumber1 } from '~/utils/validator.js';
  914. import timegranDate from '~/components/zg/timegranDate.vue';
  915. import formulaEditor from '~/components/zg/formulaEditor.vue';
  916. import {formatDate, XtcommonSummaries} from '@/utils/util.js';
  917. export default {
  918. name: 'balanceSheetData',
  919. components: {
  920. 'zj-timegran-date': timegranDate,
  921. 'zj-formulaEditor': formulaEditor
  922. },
  923. data () {
  924. return {
  925. activeMenu: '',
  926. isCheck: false, // 是否为审核人
  927. radio: '1',
  928. leftTableShow: true,
  929. filterForm: {
  930. show: true,
  931. data: {
  932. id: '',
  933. Gmid: '',
  934. timegranid: '',
  935. clock: '',
  936. workprocid: 'AT2005',
  937. workprocType: '',
  938. workproc_type: '',
  939. energyid: '',
  940. propertyid: '',
  941. itemid: '',
  942. itemname: '',
  943. itemdesc: '',
  944. may: '',
  945. canissue: '',
  946. weightMonth: '',
  947. issue: '',
  948. yxf_weight: '',
  949. kxf_weight: '',
  950. describe: '',
  951. state: '',
  952. grades: '',
  953. specifications: '',
  954. lengths: '',
  955. chemicalStandard: '',
  956. surfaceStandard: '',
  957. transportType: '',
  958. parentid: '',
  959. purpose: '',
  960. sqno: '',
  961. show: false,
  962. options: ''
  963. }
  964. },
  965. options: {
  966. obj: {'2': {id: '2', name: '已下发'}, '3': {id: '3', name: '已接收'}},
  967. arr: [{id: '2', name: '已下发'}, {id: '3', name: '已接收'}]
  968. },
  969. rules: {
  970. },
  971. pageNum: 1,
  972. pageSize: 100,
  973. total: 0,
  974. pageNum1: 1,
  975. pageSize1: 100,
  976. total1: 0,
  977. singleTableHeight: 100,
  978. leftIssueShow: false,
  979. leftTableData: [],
  980. leftTableDataObj: {},
  981. leftTableDataAll: [],
  982. leftTableLoading: false,
  983. leftTableWidth: 550,
  984. difference: 0,
  985. rightTableData: [],
  986. rightTableObj: {},
  987. leftData: {},
  988. multipleSelection: [],
  989. multipleSelectionAscLeft: [],
  990. tableFormDataObj: {},
  991. tableFormRules: {
  992. planWeight: [
  993. { required: true, message: '该项不能为空', trigger: 'change' },
  994. { validator: zCheckNumber1, trigger: 'change' }
  995. ],
  996. grades: [
  997. { required: true, message: '该项不能为空', trigger: 'change' }
  998. ],
  999. specifications: [
  1000. { required: true, message: '该项不能为空', trigger: 'change' }
  1001. ],
  1002. transportType: [
  1003. { required: true, message: '该项不能为空', trigger: 'change' }
  1004. ],
  1005. purpose: [
  1006. { required: true, message: '该项不能为空', trigger: 'change' }
  1007. ],
  1008. chemicalStandard: [
  1009. { required: true, message: '该项不能为空', trigger: 'change' }
  1010. ]
  1011. },
  1012. nameObj: {
  1013. timegranid: {
  1014. obj: {},
  1015. arr: []
  1016. },
  1017. workprocid: {
  1018. obj: {
  1019. 'AT2005': {
  1020. id: 'AT2005',
  1021. name: '一高线'
  1022. },
  1023. 'AT2006': {
  1024. id: 'AT2006',
  1025. name: '二高线'
  1026. }
  1027. },
  1028. arr: [{
  1029. id: 'AT2005',
  1030. name: '一高线'
  1031. },
  1032. {
  1033. id: 'AT2006',
  1034. name: '二高线'
  1035. }]
  1036. },
  1037. energyid: {
  1038. obj: {},
  1039. arr: []
  1040. },
  1041. propertyid: {
  1042. obj: {},
  1043. arr: []
  1044. },
  1045. unit: {
  1046. obj: {},
  1047. arr: []
  1048. },
  1049. state: {
  1050. obj: {
  1051. '0': {
  1052. name: '已编制',
  1053. color: '#7a7a7a'
  1054. },
  1055. '1': {
  1056. name: '已下发',
  1057. color: 'rgb(28, 111, 217)'
  1058. },
  1059. '2': {
  1060. name: '已接收',
  1061. color: 'red'
  1062. },
  1063. arr: [
  1064. {
  1065. id: '0',
  1066. name: '已编制'
  1067. },
  1068. {
  1069. id: '1',
  1070. name: '已下发'
  1071. },
  1072. {
  1073. id: '2',
  1074. name: '已接收'
  1075. }
  1076. ]
  1077. }
  1078. },
  1079. grades: {
  1080. obj: {},
  1081. arr: []
  1082. },
  1083. specifications: {
  1084. obj: {},
  1085. arr: []
  1086. },
  1087. transportType: {
  1088. obj: {'0': {name: '火运'}, '1': {name: '汽运'}, '2': {name: '火运或者汽运'}},
  1089. arr: [
  1090. {
  1091. id: '0',
  1092. name: '火运'
  1093. },
  1094. {
  1095. id: '1',
  1096. name: '汽运'
  1097. },
  1098. {
  1099. id: '2',
  1100. name: '火运或者汽运'
  1101. }
  1102. ]
  1103. },
  1104. chemicalStandard: {
  1105. obj: {},
  1106. arr: []
  1107. },
  1108. purpose: {
  1109. obj: {
  1110. '0': {name: '标准件'},
  1111. '1': {name: '铁丝'},
  1112. '2': {name: '钢丝、弹簧'}
  1113. },
  1114. arr: [
  1115. {
  1116. id: '0',
  1117. name: '标准件'
  1118. },
  1119. {
  1120. id: '1',
  1121. name: '铁丝'
  1122. },
  1123. {
  1124. id: '2',
  1125. name: '钢丝、弹簧'
  1126. }
  1127. ]
  1128. },
  1129. tag: {
  1130. obj: {
  1131. '0': {
  1132. name: '正常',
  1133. color: '#7a7a7a'
  1134. },
  1135. '1': {
  1136. name: '应急',
  1137. color: 'red'
  1138. }
  1139. },
  1140. arr: [
  1141. {
  1142. id: '0',
  1143. name: '正常'
  1144. },
  1145. {
  1146. id: '1',
  1147. name: '应急'
  1148. }
  1149. ]
  1150. },
  1151. ExecutiveStandard: {
  1152. obj: {},
  1153. arr: []
  1154. }
  1155. },
  1156. loading: false,
  1157. tableLoading: false,
  1158. dialog: {
  1159. fRow: null,
  1160. editorBox: {
  1161. show: false,
  1162. type: '',
  1163. form: {
  1164. default: {
  1165. workprocid: ''
  1166. },
  1167. data: {
  1168. itemid: '',
  1169. materialid: '',
  1170. workprocid: '',
  1171. unitid: '',
  1172. seqno: '',
  1173. mes_prodline: '',
  1174. code: '',
  1175. digits: '',
  1176. may: '',
  1177. canissue: '',
  1178. weightMonth: '',
  1179. issue: '',
  1180. yxf_weight: '',
  1181. kxf_weight: '',
  1182. describe: '',
  1183. state: '',
  1184. grades: '',
  1185. specifications: '',
  1186. lengths: '',
  1187. chemicalStandard: '',
  1188. surfaceStandard: '',
  1189. transportType: '',
  1190. workprocType: '',
  1191. purpose: '',
  1192. planWeight: ''
  1193. },
  1194. rules: {
  1195. planWeight: [
  1196. { required: true, message: '该项不能为空', trigger: 'change' },
  1197. { validator: zCheckNumber1, trigger: 'change' }
  1198. ],
  1199. grades: [
  1200. { required: true, message: '该项不能为空', trigger: 'change' }
  1201. ],
  1202. specifications: [
  1203. { required: true, message: '该项不能为空', trigger: 'change' }
  1204. ],
  1205. transportType: [
  1206. { required: true, message: '该项不能为空', trigger: 'change' }
  1207. ],
  1208. purpose: [
  1209. { required: true, message: '该项不能为空', trigger: 'change' }
  1210. ],
  1211. chemicalStandard: [
  1212. { required: true, message: '该项不能为空', trigger: 'change' }
  1213. ],
  1214. may: [
  1215. { required: true, message: '该项不能为空', trigger: 'change' }
  1216. ],
  1217. workprocid: [
  1218. { required: true, message: '该项不能为空', trigger: 'change' }
  1219. ]
  1220. }
  1221. }
  1222. },
  1223. editorBox3: {
  1224. show: false,
  1225. type: '',
  1226. form: {
  1227. data: {
  1228. describe: ''
  1229. },
  1230. rules: {
  1231. describe: [{ required: true, message: '该项不能为空', trigger: 'change' }]
  1232. }
  1233. }
  1234. }
  1235. },
  1236. lastIssuedData: {
  1237. obj: {},
  1238. arr: [{
  1239. id: '',
  1240. parentid: '',
  1241. describe: '',
  1242. issuedTime: '',
  1243. currentDescribe: '',
  1244. workprocType: ''
  1245. }]
  1246. }
  1247. }
  1248. },
  1249. created () {
  1250. this.activeMenu = window.localStorage.getItem('activeMenu');
  1251. },
  1252. mounted () {
  1253. let that = this;
  1254. window.PEDataObj = {
  1255. // 将数据绑定到window上,供main页面使用
  1256. vm: that,
  1257. // tableArr:用于导出成Excel的表格的信息
  1258. tableArr: [
  1259. {
  1260. name: '左表格',
  1261. id: 'singleTable1'
  1262. },
  1263. {
  1264. name: '右表格',
  1265. id: 'singleTable2'
  1266. }
  1267. ]
  1268. };
  1269. // 接收路由参数
  1270. if (that.$route.query.workproc_type) {
  1271. that.filterForm.data.workproc_type = that.$route.query.workproc_type;
  1272. }
  1273. that.$nextTick(() => {
  1274. // 立即获取的height有一定偏差,通过setTimeout延迟来解决
  1275. setTimeout(() => {
  1276. that.singleTableHeight = that.getRoleHeight(that.$refs['boxBottom']) - 45;
  1277. }, 1);
  1278. });
  1279. // that.getTimeGranData();
  1280. // that.getEnergyIdData();
  1281. // that.getPropertyIdData();
  1282. that.getGrades();
  1283. that.getSpecifications();
  1284. that.getStandards();
  1285. that.getExecutiveStandard();
  1286. // that.getUnitIdData();
  1287. },
  1288. methods: {
  1289. // 计算树区域高度
  1290. getRoleHeight (dom) {
  1291. return window.innerHeight - dom.offsetTop;
  1292. },
  1293. // 自定义的表格合计方法:只给指定列进行合计
  1294. getSummaries (param) {
  1295. const prop = ['kxf_weight', 'planweight', 'yxf_weight', 'planWeight']; // 合计列绑定的prop
  1296. return XtcommonSummaries(param, prop);
  1297. },
  1298. // 获取时间粒度(平衡表数据维护)
  1299. getTimeGranData () {
  1300. let that = this
  1301. let url = 'pass/ems/v1/tcmdatasourcetimegrans/getTimegranRmBalanceValue';
  1302. that.axios.get(url)
  1303. .then(function (res) {
  1304. if (res.code === '0') {
  1305. let arr = [];
  1306. let obj = {};
  1307. for (let item of res.data) {
  1308. arr.push({
  1309. id: item.ID,
  1310. name: item.NAME
  1311. })
  1312. obj[item.ID] = item.NAME;
  1313. that.filterForm.data.timegranid = that.filterForm.data.timegranid ? that.filterForm.data.timegranid : item.ID;
  1314. }
  1315. that.nameObj.timegranid.arr = arr;
  1316. that.nameObj.timegranid.obj = obj;
  1317. } else {
  1318. that.$message.error(res.message);
  1319. }
  1320. });
  1321. },
  1322. checkboxT (row, index) {
  1323. if (row.state === '3' && !this.isCheck) {
  1324. return false;
  1325. } else {
  1326. return true;
  1327. }
  1328. },
  1329. checkboxTLeft (row, index) {
  1330. return true;
  1331. },
  1332. // 获取能介(平衡表)
  1333. getEnergyIdData () {
  1334. let that = this
  1335. let url = 'pass/ems/v1/trmenergys/selectNameAndId/?isbalance=1';
  1336. that.axios.get(url)
  1337. .then(function (res) {
  1338. if (res.code === '0') {
  1339. let arr = [];
  1340. let obj = {};
  1341. for (let item of res.data) {
  1342. arr.push({
  1343. id: item.id,
  1344. name: item.name
  1345. })
  1346. obj[item.id] = item.name;
  1347. }
  1348. that.nameObj.energyid.arr = arr;
  1349. that.nameObj.energyid.obj = obj;
  1350. } else {
  1351. that.$message.error(res.message);
  1352. }
  1353. });
  1354. },
  1355. // 获取属性
  1356. getPropertyIdData () {
  1357. let that = this
  1358. let url = 'pass/ems/v1/trmenergypropertys/getidandname/';
  1359. that.axios.get(url)
  1360. .then(function (res) {
  1361. if (res.code === '0') {
  1362. let arr = [];
  1363. let obj = {};
  1364. for (let item of res.data) {
  1365. arr.push({
  1366. id: item.id,
  1367. name: item.name
  1368. })
  1369. obj[item.id] = item.name;
  1370. }
  1371. that.nameObj.propertyid.arr = arr;
  1372. that.nameObj.propertyid.obj = obj;
  1373. } else {
  1374. that.$message.error(res.message);
  1375. }
  1376. });
  1377. },
  1378. // 获取标准计量单位
  1379. getUnitIdData () {
  1380. let that = this
  1381. let url = 'pass/ems/v1/trmunits/getIdAndName';
  1382. that.axios.get(url)
  1383. .then(function (res) {
  1384. if (res.code === '0') {
  1385. let arr = [];
  1386. let obj = {};
  1387. for (let item of res.data) {
  1388. arr.push({
  1389. id: item.id,
  1390. name: item.name
  1391. })
  1392. obj[item.id] = item.name;
  1393. if (item.name === '吨') {
  1394. that.nameObj.unit.defaults = that.nameObj.unit.defaults ? that.nameObj.unit.defaults : item.id;
  1395. }
  1396. }
  1397. that.nameObj.unit.arr = arr;
  1398. that.nameObj.unit.obj = obj;
  1399. } else {
  1400. that.$message.error(res.message);
  1401. }
  1402. });
  1403. },
  1404. // 获取表格中的数据
  1405. getTableData (pageNum1) {
  1406. let that = this,
  1407. params = {
  1408. workprocType: that.filterForm.data.workprocid,
  1409. startTime: that.filterForm.data.clock[0],
  1410. endTime: that.filterForm.data.clock[1],
  1411. id: that.filterForm.data.Gmid,
  1412. grades: that.filterForm.data.grades.join(','),
  1413. specifications: that.filterForm.data.specifications.join(','),
  1414. state: that.filterForm.data.options
  1415. };
  1416. that.pageNum1 = pageNum1 || that.pageNum1;
  1417. that.leftTableLoading = true;
  1418. let url = 'pass/ems/v1/emsgmpcjhs/getGmDates/?pageNum=' + that.pageNum1 + '&pageSize=' + that.pageSize1;
  1419. that.axios.get(url, {
  1420. params: params
  1421. })
  1422. .then(function (res) {
  1423. if (res.code === '0') {
  1424. let arr = [];
  1425. let obj = {};
  1426. for (let i = 0; i < res.data.list.length; i++) {
  1427. let item = res.data.list[i];
  1428. arr.push({
  1429. seq: i,
  1430. id: item.ID,
  1431. jhTime: item.JHTIME,
  1432. state: item.STATE,
  1433. grades: item.GRADES,
  1434. specifications: item.SPECIFICATIONS,
  1435. lengths: item.LENGTHS,
  1436. chemicalStandard: item.CHEMICALSTANDARD,
  1437. surfacestandard: item.SURFACESTANDARD,
  1438. workprocType: item.WORKPROCTYPE,
  1439. iateralarea: item.IATERALAREA,
  1440. lengthtimeswidth: item.LENGTHTIMESWIDTH,
  1441. transportType: item.TRANSPORTTYPE,
  1442. receivetime: item.RECEIVETIME,
  1443. createman: item.CREATEMAN,
  1444. createtime: item.CREATETIME,
  1445. updateman: item.UPDATEMAN,
  1446. purpose: item.PURPOSE,
  1447. updatetime: item.UPDATETIME,
  1448. memo: item.MEMO,
  1449. deliveryDate: item.DELIVERYDATE,
  1450. planweight: item.PLANWEIGHT,
  1451. dimension: item.DIMENSION,
  1452. kxf_weight: item.PLANWEIGHT - item.YXF_WEIGHT,
  1453. yxf_weight: item.YXF_WEIGHT,
  1454. tag: item.TAG ? item.TAG : '0'
  1455. });
  1456. obj[item.ID] = {seq: i,
  1457. id: item.ID,
  1458. jhTime: item.JHTIME,
  1459. state: item.STATE,
  1460. grades: item.GRADES,
  1461. specifications: item.SPECIFICATIONS,
  1462. lengths: item.LENGTHS,
  1463. chemicalStandard: item.CHEMICALSTANDARD,
  1464. surfaceStandard: item.SURFACESTANDARD,
  1465. workprocType: item.WORKPROCTYPE,
  1466. iateralarea: item.IATERALAREA,
  1467. lengthtimeswidth: item.LENGTHTIMESWIDTH,
  1468. transportType: item.TRANSPORTTYPE,
  1469. receivetime: item.RECEIVETIME,
  1470. createman: item.CREATEMAN,
  1471. createtime: item.CREATETIME,
  1472. updateman: item.UPDATEMAN,
  1473. purpose: item.PURPOSE,
  1474. updatetime: item.UPDATETIME,
  1475. memo: item.MEMO,
  1476. planweight: item.PLANWEIGHT,
  1477. deliveryDate: item.DELIVERYDATE,
  1478. dimension: item.DIMENSION,
  1479. kxf_weight: item.PLANWEIGHT - item.YXF_WEIGHT,
  1480. yxf_weight: item.YXF_WEIGHT,
  1481. tag: item.TAG ? item.TAG : '0'
  1482. };
  1483. }
  1484. that.leftTableDataAll = arr;
  1485. that.leftIssueShow = false;
  1486. that.leftTableData = that.leftTableDataAll.filter(item => item.kxf_weight > 0);
  1487. that.leftTableDataObj = obj;
  1488. that.total1 = res.data.total;
  1489. that.dialog.fRow = null;
  1490. } else {
  1491. that.$message.error(res.message);
  1492. }
  1493. that.leftTableLoading = false;
  1494. }).catch(function () {
  1495. that.leftTableLoading = false;
  1496. });
  1497. },
  1498. // 切换查询方法
  1499. chageMethod () {
  1500. let that = this;
  1501. if (that.leftTableShow === true) {
  1502. that.getTableDetailDatas(that.pageNum);
  1503. } else {
  1504. that.getTableDetailAsRadio(that.pageNum)
  1505. }
  1506. },
  1507. // 改变表格显示条数
  1508. tableSizeChange (val) {
  1509. let that = this;
  1510. that.pageSize = val;
  1511. that.chageMethod();
  1512. },
  1513. LftetableSizeChange (val) {
  1514. let that = this;
  1515. that.pageSize1 = val;
  1516. that.getTableData(1);
  1517. },
  1518. // 点击查询
  1519. getTableDetailData (row) {
  1520. let that = this;
  1521. if (row) {
  1522. that.tableLoading = true;
  1523. that.filterForm.data.workprocid = row.workprocType;
  1524. let url = 'pass/ems/v1/emsprodplanrounds/';
  1525. that.axios.get(url, {
  1526. params: {parentid: row.id}
  1527. })
  1528. .then(function (res) {
  1529. if (res.code === '0') {
  1530. let arr = [];
  1531. for (let i = 0; i < res.data.list.length; i++) {
  1532. let item = res.data.list[i];
  1533. arr.push({
  1534. seq: i,
  1535. parentid: item.parentid,
  1536. may: item.may,
  1537. roundid: item.id,
  1538. describe: item.describe,
  1539. state: item.state,
  1540. grades: item.grades,
  1541. planWeight: item.planWeight,
  1542. specifications: item.specifications,
  1543. transportType: item.transportType,
  1544. purpose: item.purpose,
  1545. chemicalStandard: item.chemicalStandard,
  1546. memo: item.memo,
  1547. issuedTime: item.issuedTime,
  1548. createman: item.createman,
  1549. createtime: item.createtime,
  1550. updateman: item.updateman,
  1551. updatetime: item.updatetime,
  1552. deliveryDate: item.deliveryDate,
  1553. sqno: item.sqno,
  1554. workprocType: item.workprocType,
  1555. auditState: item.auditState,
  1556. tag: item.tag ? item.tag : '0'
  1557. });
  1558. }
  1559. that.rightTableData = arr;
  1560. that.total = res.data.total;
  1561. } else {
  1562. that.$message.error(res.message);
  1563. }
  1564. that.tableLoading = false;
  1565. }).catch(function () {
  1566. that.tableLoading = false;
  1567. });
  1568. }
  1569. },
  1570. // 展开自动查询
  1571. getTableDetailAsRadio (pageNum) {
  1572. let that = this;
  1573. let ids = [];
  1574. that.leftTableData.forEach((element) => {
  1575. ids.push(element.id);
  1576. });
  1577. that.pageNum = pageNum || that.pageNum;
  1578. let url = 'pass/ems/v1/emsprodplanrounds/getTableDetailAsRadio/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
  1579. // state 是不等于
  1580. that.axios.get(url, {
  1581. params: {
  1582. id: ids.join(','),
  1583. state: 2
  1584. }
  1585. }).then(function (res) {
  1586. if (res.code === '0') {
  1587. let arr = [];
  1588. for (let i = 0; i < res.data.list.length; i++) {
  1589. let item = res.data.list[i];
  1590. arr.push({
  1591. seq: i,
  1592. parentid: item.parentid,
  1593. may: item.may,
  1594. roundid: item.id,
  1595. describe: item.describe,
  1596. state: item.state,
  1597. grades: item.grades,
  1598. planWeight: item.planWeight,
  1599. specifications: item.specifications,
  1600. transportType: item.transportType,
  1601. purpose: item.purpose,
  1602. chemicalStandard: item.chemicalStandard,
  1603. memo: item.memo,
  1604. issuedTime: item.issuedTime,
  1605. createman: item.createman,
  1606. createtime: item.createtime,
  1607. updateman: item.updateman,
  1608. deliveryDate: item.deliveryDate,
  1609. sqno: item.sqno,
  1610. updatetime: item.updatetime,
  1611. workprocType: item.workprocType,
  1612. auditState: item.auditState,
  1613. tag: item.tag ? item.tag : '0'
  1614. });
  1615. }
  1616. that.rightTableData = arr;
  1617. that.total = res.data.total;
  1618. } else {
  1619. that.$message.error(res.message);
  1620. }
  1621. that.tableLoading = false;
  1622. }).catch(function () {
  1623. that.tableLoading = false;
  1624. });
  1625. },
  1626. getTableDetailDatas (pageNum, type) {
  1627. let that = this;
  1628. let params = {};
  1629. if (type === 'Add') {
  1630. params = {
  1631. parentid: that.multipleSelectionAscLeft[0].id
  1632. };
  1633. } else {
  1634. params = {
  1635. parentid: that.rightTableData[0].parentid,
  1636. workprocType: that.filterForm.data.workprocid
  1637. };
  1638. }
  1639. that.pageNum = pageNum || that.pageNum;
  1640. that.tableLoading = true;
  1641. let url = 'pass/ems/v1/emsprodplanrounds/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
  1642. that.axios.get(url, {
  1643. params: params
  1644. })
  1645. .then(function (res) {
  1646. if (res.code === '0') {
  1647. let arr = [];
  1648. for (let i = 0; i < res.data.list.length; i++) {
  1649. let item = res.data.list[i];
  1650. arr.push({
  1651. seq: i,
  1652. parentid: item.parentid,
  1653. may: item.may,
  1654. roundid: item.id,
  1655. describe: item.describe,
  1656. state: item.state,
  1657. grades: item.grades,
  1658. planWeight: item.planWeight,
  1659. specifications: item.specifications,
  1660. transportType: item.transportType,
  1661. purpose: item.purpose,
  1662. chemicalStandard: item.chemicalStandard,
  1663. memo: item.memo,
  1664. issuedTime: item.issuedTime,
  1665. createman: item.createman,
  1666. createtime: item.createtime,
  1667. updateman: item.updateman,
  1668. deliveryDate: item.deliveryDate,
  1669. sqno: item.sqno,
  1670. updatetime: item.updatetime,
  1671. workprocType: item.workprocType,
  1672. auditState: item.auditState,
  1673. tag: item.tag
  1674. });
  1675. }
  1676. that.rightTableData = arr;
  1677. that.total = res.data.total;
  1678. } else {
  1679. that.$message.error(res.message);
  1680. }
  1681. that.tableLoading = false;
  1682. }).catch(function () {
  1683. that.tableLoading = false;
  1684. });
  1685. },
  1686. jsDifference () {
  1687. let that = this;
  1688. let fV = that.dialog.fRow.apportvalue,
  1689. zV = 0;
  1690. let xId = that.dialog.fRow.itemid + '-' + that.dialog.fRow.timegranid + '-' + that.dialog.fRow.clock;
  1691. if (that.tableFormDataObj[xId]) {
  1692. fV = that.tableFormDataObj[xId].apportvalue;
  1693. }
  1694. for (let item of that.rightTableObj.tableData) {
  1695. zV = that.floatComputed(zV, item.apportvalue, '+');
  1696. }
  1697. that.difference = +that.floatComputed(fV, zV, '-').toFixed(3);
  1698. },
  1699. upTableFormDataObj () {
  1700. // 更新右侧表格编辑模式绑定的数据
  1701. let that = this;
  1702. let fRow = that.dialog.fRow;
  1703. if (fRow) {
  1704. if (!fRow.tableFormDataArr || !fRow.isSelection) {
  1705. // 当前选中行被勾选时不更新tableFormDataObj
  1706. fRow.tableFormDataArr = JSON.parse(JSON.stringify(fRow.childrenArr));
  1707. }
  1708. if (fRow.isSelection) {
  1709. that.rightTableObj.tableData = fRow.tableFormDataArr;
  1710. } else {
  1711. that.rightTableObj.tableData = fRow.childrenArr;
  1712. }
  1713. that.jsDifference();
  1714. }
  1715. },
  1716. // 左边菜单选中
  1717. handleSelectionChangeAsleft (val) {
  1718. let that = this;
  1719. let tableFormDataObj = {};
  1720. let arr = [];
  1721. for (let item of val) {
  1722. arr.push(item.seq);
  1723. }
  1724. this.seqArr = arr.sort(sortNumber);
  1725. for (let item of that.leftTableData) {
  1726. item.isSelection = false;
  1727. }
  1728. for (let item of val) {
  1729. let obj = {};
  1730. let xId = item.seq;
  1731. if (that.tableFormDataObj[xId]) {
  1732. // 如果已存在该数据则使用该数据
  1733. tableFormDataObj[xId] = that.tableFormDataObj[xId];
  1734. } else {
  1735. // 负责则从对应行中获取行内原数据
  1736. for (let key in item) {
  1737. obj[key] = item[key];
  1738. }
  1739. tableFormDataObj[xId] = obj;
  1740. }
  1741. item.isSelection = true;
  1742. }
  1743. that.tableFormDataObj = tableFormDataObj;
  1744. that.multipleSelectionAscLeft = val;
  1745. },
  1746. // 右边菜单选中
  1747. handleSelectionChange (val) {
  1748. let that = this;
  1749. let rightTableObj = {};
  1750. let arr = [];
  1751. for (let item of val) {
  1752. arr.push(item.seq);
  1753. }
  1754. this.seqArr = arr.sort(sortNumber);
  1755. for (let item of that.rightTableData) {
  1756. item.isSelection = false;
  1757. }
  1758. for (let item of val) {
  1759. let obj = {};
  1760. let xId = item.seq;
  1761. if (that.rightTableObj[xId]) {
  1762. // 如果已存在该数据则使用该数据
  1763. rightTableObj[xId] = that.rightTableObj[xId];
  1764. } else {
  1765. // 负责则从对应行中获取行内原数据
  1766. for (let key in item) {
  1767. obj[key] = item[key];
  1768. }
  1769. item.realvalue = (!isNaN(Number(item.apportvalue)) && !isNaN(Number(item.wastage))) ? Number(item.apportvalue) + Number(item.wastage) - Number(item.secondVal) : item.realvalue;
  1770. rightTableObj[xId] = obj;
  1771. try {
  1772. if (item.grades != null && item.grades !== '') {
  1773. if (item.surfaceStandard === '' || item.surfaceStandard === null) {
  1774. rightTableObj[xId].surfaceStandard = that.nameObj.ExecutiveStandard.obj[item.grades].surface;
  1775. }
  1776. if (item.chemicalStandard === '' || item.chemicalStandard === null) {
  1777. if (item.grades === 'Q195' && item.specifications === '6.5') {
  1778. rightTableObj[xId].chemicalStandard = that.nameObj.ExecutiveStandard.obj['Q195L'].factory;
  1779. } else {
  1780. rightTableObj[xId].chemicalStandard = that.nameObj.ExecutiveStandard.obj[item.grades].factory;
  1781. }
  1782. }
  1783. }
  1784. } catch (e) {
  1785. rightTableObj[xId].chemicalStandard = '';
  1786. console.log('没有对应')
  1787. }
  1788. }
  1789. item.isSelection = true;
  1790. }
  1791. for (let item of that.rightTableData) {
  1792. if (item.isSelection === false) {
  1793. item.realvalue = (!isNaN(Number(item.apportvalue)) && !isNaN(Number(item.wastage))) ? Number(item.apportvalue) + Number(item.wastage) - Number(item.secondVal) : item.realvalue;
  1794. }
  1795. }
  1796. that.rightTableObj = rightTableObj;
  1797. that.multipleSelection = val;
  1798. },
  1799. but_edit_plural () {
  1800. let that = this;
  1801. if (that.multipleSelection.length > 0) {
  1802. that.$refs['dialog_form_arr_2'].validate((valid) => {
  1803. if (valid) {
  1804. let SubmitData = [];
  1805. for (let key in that.rightTableObj) {
  1806. SubmitData.push({
  1807. parentid: that.rightTableObj[key].parentid,
  1808. may: that.rightTableObj[key].may,
  1809. describe: that.rightTableObj[key].describe,
  1810. state: that.rightTableObj[key].state,
  1811. grades: that.rightTableObj[key].grades,
  1812. planWeight: that.rightTableObj[key].planWeight,
  1813. specifications: that.rightTableObj[key].specifications,
  1814. transportType: that.rightTableObj[key].transportType,
  1815. workprocType: that.rightTableObj[key].workprocType,
  1816. purpose: that.rightTableObj[key].purpose,
  1817. chemicalStandard: that.rightTableObj[key].chemicalStandard,
  1818. memo: that.rightTableObj[key].memo,
  1819. id: that.rightTableObj[key].roundid,
  1820. sqno: that.rightTableObj[key].sqno,
  1821. createman: that.rightTableObj[key].createman,
  1822. createtime: that.rightTableObj[key].createtime
  1823. });
  1824. }
  1825. that.loading = true;
  1826. that.axios.put('pass/ems/v1/emsprodplanrounds/batchUpdate', SubmitData)
  1827. .then(function (res) {
  1828. if (res.code === '0') {
  1829. that.$message({
  1830. message: '保存成功',
  1831. type: 'success'
  1832. });
  1833. that.chageMethod();
  1834. that.getStandards();
  1835. } else {
  1836. that.$message.error(res.message);
  1837. }
  1838. that.loading = false;
  1839. }).catch(function () {
  1840. that.loading = false;
  1841. });
  1842. } else {
  1843. }
  1844. });
  1845. } else {
  1846. this.$message.error('至少要选择一条数据');
  1847. }
  1848. },
  1849. edit_plural () {
  1850. let that = this;
  1851. if (that.multipleSelection.length > 0) {
  1852. let SubmitData = [];
  1853. for (let key in that.rightTableObj) {
  1854. SubmitData.push({
  1855. parentid: that.rightTableObj[key].parentid,
  1856. may: that.rightTableObj[key].may,
  1857. describe: that.rightTableObj[key].describe,
  1858. state: that.rightTableObj[key].state,
  1859. grades: that.rightTableObj[key].grades,
  1860. planWeight: that.rightTableObj[key].planWeight,
  1861. specifications: that.rightTableObj[key].specifications,
  1862. transportType: that.rightTableObj[key].transportType,
  1863. workprocType: that.rightTableObj[key].workprocType,
  1864. purpose: that.rightTableObj[key].purpose,
  1865. chemicalStandard: that.rightTableObj[key].chemicalStandard,
  1866. memo: that.rightTableObj[key].memo,
  1867. id: that.rightTableObj[key].roundid,
  1868. sqno: that.rightTableObj[key].sqno,
  1869. createman: that.rightTableObj[key].createman,
  1870. createtime: that.rightTableObj[key].createtime,
  1871. issuedTime: that.rightTableObj[key].issuedTime,
  1872. updateman: that.rightTableObj[key].updateman,
  1873. updatetime: that.rightTableObj[key].updatetime
  1874. });
  1875. }
  1876. that.loading = true;
  1877. that.$confirm('确定要强制修改数据吗?', '提示', {
  1878. confirmButtonText: '确定',
  1879. cancelButtonText: '取消',
  1880. state: 'warning'
  1881. }).then(() => {
  1882. that.axios.put('pass/ems/v1/emsprodplanrounds/ForcedUpdate', SubmitData)
  1883. .then(function (res) {
  1884. if (res.code === '0') {
  1885. that.$message({
  1886. message: '保存成功',
  1887. type: 'success'
  1888. });
  1889. that.chageMethod();
  1890. } else {
  1891. that.$message.error(res.message);
  1892. }
  1893. that.loading = false;
  1894. }).catch(function () {
  1895. that.loading = false;
  1896. });
  1897. });
  1898. } else {
  1899. this.$message.error('至少要选择一条数据');
  1900. }
  1901. },
  1902. getGrades () {
  1903. let that = this
  1904. let url = 'pass/product/v1/emssteel/getGrades/?type=' + '高线';
  1905. that.axios.get(url)
  1906. .then(function (res) {
  1907. if (res.code === '0') {
  1908. let arr = [];
  1909. let obj = {};
  1910. for (let item of res.data) {
  1911. arr.push({
  1912. id: item.id,
  1913. name: item.steelName
  1914. })
  1915. }
  1916. that.nameObj.grades.arr = arr;
  1917. that.nameObj.grades.obj = obj;
  1918. } else {
  1919. that.$message.error(res.message);
  1920. }
  1921. });
  1922. },
  1923. getSpecifications () {
  1924. let that = this
  1925. let url = 'pass/product/v1/emssteel/getSpecifications/?type=' + '高线';
  1926. that.axios.get(url)
  1927. .then(function (res) {
  1928. if (res.code === '0') {
  1929. let arr = [];
  1930. let obj = {};
  1931. for (let item of res.data) {
  1932. arr.push({
  1933. id: item.id,
  1934. name: item.specName
  1935. })
  1936. }
  1937. that.nameObj.specifications.arr = arr;
  1938. that.nameObj.specifications.obj = obj;
  1939. } else {
  1940. that.$message.error(res.message);
  1941. }
  1942. });
  1943. },
  1944. getStandards () {
  1945. let that = this
  1946. let url = 'pass/product/v1/emsstandard/getStandards?type=线材';
  1947. that.axios.get(url)
  1948. .then(function (res) {
  1949. if (res.code === '0') {
  1950. let arr = [];
  1951. let obj = {};
  1952. for (let item of res.data) {
  1953. arr.push({
  1954. id: item.basecode,
  1955. name: item.basename
  1956. })
  1957. }
  1958. that.nameObj.chemicalStandard.arr = arr;
  1959. that.nameObj.chemicalStandard.obj = obj;
  1960. } else {
  1961. that.$message.error(res.message);
  1962. }
  1963. });
  1964. },
  1965. issue () {
  1966. let that = this;
  1967. if (that.multipleSelection.length > 0) {
  1968. that.$refs['dialog_form_arr_2'].validate(async (valid, obj) => {
  1969. if (valid) {
  1970. let SubmitData = [];
  1971. let auditStates = [];
  1972. let messageRoundid = '';
  1973. for (let key in that.rightTableObj) {
  1974. SubmitData.push({
  1975. parentid: that.rightTableObj[key].parentid,
  1976. may: that.rightTableObj[key].may,
  1977. roundid: that.rightTableObj[key].roundid,
  1978. describe: that.rightTableObj[key].describe,
  1979. grades: that.rightTableObj[key].grades,
  1980. planWeight: that.rightTableObj[key].planWeight,
  1981. specifications: that.rightTableObj[key].specifications,
  1982. transportType: that.rightTableObj[key].transportType,
  1983. workprocType: that.rightTableObj[key].workprocType,
  1984. purpose: that.rightTableObj[key].purpose,
  1985. chemicalStandard: that.rightTableObj[key].chemicalStandard,
  1986. memo: that.rightTableObj[key].memo,
  1987. issuedTime: that.rightTableObj[key].issuedTime,
  1988. createman: that.rightTableObj[key].createman,
  1989. auditState: that.rightTableObj[key].auditState,
  1990. createtime: that.rightTableObj[key].createtime,
  1991. updateman: that.rightTableObj[key].updateman,
  1992. updatetime: that.rightTableObj[key].updatetime,
  1993. id: that.rightTableObj[key].roundid,
  1994. state: that.rightTableObj[key].state,
  1995. sqno: that.rightTableObj[key].sqno
  1996. });
  1997. try {
  1998. if (that.rightTableObj[key].planWeight > that.leftTableDataObj[that.rightTableObj[key].parentid].kxf_weight) {
  1999. messageRoundid += that.rightTableObj[key].roundid + ',';
  2000. }
  2001. } catch (e) {
  2002. console.log(that.rightTableObj[key].parentid + '判断错误')
  2003. }
  2004. }
  2005. that.loading = true;
  2006. let down = false;
  2007. if (messageRoundid !== '') {
  2008. await that.$confirm('计划编号' + messageRoundid + '本次下发量已超出订单可下发量,是否继续下发?', '提示', {
  2009. confirmButtonText: '确定',
  2010. cancelButtonText: '取消',
  2011. type: 'warning'
  2012. }).then(() => {
  2013. down = true;
  2014. }).catch(() => {
  2015. down = false;
  2016. that.$message({
  2017. type: 'info',
  2018. message: '已取消下发'
  2019. });
  2020. that.loading = false;
  2021. });
  2022. } else {
  2023. down = true;
  2024. }
  2025. if (down) {
  2026. await that.axios.post('pass/ems/v1/emsprodplanrounds/issue', SubmitData, {
  2027. contentType: 'application/json'
  2028. })
  2029. .then(function (res) {
  2030. if (res.code === '0') {
  2031. that.$message({
  2032. message: '操作成功',
  2033. type: 'success'
  2034. });
  2035. that.getTableData();
  2036. that.chageMethod();
  2037. } else {
  2038. that.$message.error(res.message);
  2039. }
  2040. that.loading = false;
  2041. }).catch(function () {
  2042. that.loading = false;
  2043. });
  2044. }
  2045. }
  2046. });
  2047. } else {
  2048. this.$message.error('至少要选择一条数据');
  2049. }
  2050. },
  2051. offissue () {
  2052. let that = this;
  2053. if (that.multipleSelection.length > 0) {
  2054. that.$refs['dialog_form_arr_2'].validate((valid, obj) => {
  2055. if (valid) {
  2056. let SubmitData = [];
  2057. for (let key in that.rightTableObj) {
  2058. SubmitData.push({
  2059. parentid: that.rightTableObj[key].parentid,
  2060. may: that.rightTableObj[key].may,
  2061. roundid: that.rightTableObj[key].roundid,
  2062. describe: that.rightTableObj[key].describe,
  2063. grades: that.rightTableObj[key].grades,
  2064. planWeight: that.rightTableObj[key].planWeight,
  2065. specifications: that.rightTableObj[key].specifications,
  2066. transportType: that.rightTableObj[key].transportType,
  2067. workprocType: that.rightTableObj[key].workprocType,
  2068. purpose: that.rightTableObj[key].purpose,
  2069. chemicalStandard: that.rightTableObj[key].chemicalStandard,
  2070. memo: that.rightTableObj[key].memo,
  2071. issuedTime: that.rightTableObj[key].issuedTime,
  2072. createman: that.rightTableObj[key].createman,
  2073. createtime: that.rightTableObj[key].createtime,
  2074. updateman: that.rightTableObj[key].updateman,
  2075. updatetime: that.rightTableObj[key].updatetime,
  2076. id: that.rightTableObj[key].roundid,
  2077. state: that.rightTableObj[key].state,
  2078. sqno: that.rightTableObj[key].sqno
  2079. });
  2080. }
  2081. that.loading = true;
  2082. that.axios.post('pass/ems/v1/emsprodplanrounds/offissue', SubmitData, {
  2083. contentType: 'application/json'
  2084. })
  2085. .then(function (res) {
  2086. if (res.code === '0') {
  2087. that.$message({
  2088. message: '操作成功',
  2089. type: 'success'
  2090. });
  2091. that.getTableData();
  2092. that.chageMethod();
  2093. } else {
  2094. that.$message.error(res.message);
  2095. }
  2096. that.loading = false;
  2097. }).catch(function () {
  2098. that.loading = false;
  2099. });
  2100. }
  2101. });
  2102. } else {
  2103. this.$message.error('至少要选择一条数据');
  2104. }
  2105. },
  2106. but_del_plural () {
  2107. let that = this;
  2108. if (that.multipleSelection.length > 0) {
  2109. let SubmitData = [];
  2110. for (let key in that.rightTableObj) {
  2111. SubmitData.push({
  2112. id: that.rightTableObj[key].roundid,
  2113. state: that.rightTableObj[key].state,
  2114. parentid: that.rightTableObj[key].parentid
  2115. });
  2116. }
  2117. that.$confirm('是否删除已选数据?', '提示', {
  2118. confirmButtonText: '确定',
  2119. cancelButtonText: '取消',
  2120. state: 'warning'
  2121. }).then(() => {
  2122. that.axios.post('pass/ems/v1/emsprodplanrounds/delete', SubmitData, {
  2123. contentType: 'application/json'
  2124. })
  2125. .then(function (res) {
  2126. if (res.code === '0') {
  2127. that.$message({
  2128. message: '删除成功',
  2129. type: 'success'
  2130. });
  2131. that.chageMethod();
  2132. that.getTableData();
  2133. that.dialog.editorBox.show = false;
  2134. } else {
  2135. that.$message.error(res.message);
  2136. }
  2137. that.loading = false;
  2138. }).catch(function () {
  2139. that.loading = false;
  2140. });
  2141. });
  2142. } else {
  2143. this.$message.error('至少要选择一条数据');
  2144. }
  2145. },
  2146. dataSave () {
  2147. let that = this;
  2148. let SubmitData = {
  2149. jhTime: that.dialog.editorBox.form.data.may,
  2150. planWeight: that.dialog.editorBox.form.data.planWeight,
  2151. workprocType: that.dialog.editorBox.form.data.workprocid,
  2152. tag: '0'
  2153. };
  2154. that.$refs['dialog_form'].validate((valid) => {
  2155. if (valid) {
  2156. that.loading = true;
  2157. that.axios.post('pass/ems/v1/emsgmpcjhs/addNbJH', SubmitData, {
  2158. contentType: 'application/json'
  2159. })
  2160. .then(function (res) {
  2161. if (res.code === '0') {
  2162. that.$message({
  2163. message: '新增成功',
  2164. type: 'success'
  2165. });
  2166. that.dialog.editorBox.show = false;
  2167. that.getTableData();
  2168. } else {
  2169. that.$message.error(res.message);
  2170. }
  2171. that.loading = false;
  2172. }).catch(function () {
  2173. that.loading = false;
  2174. });
  2175. }
  2176. });
  2177. },
  2178. correctvalueUpFoo (row) {
  2179. let that = this;
  2180. // 防止数据为无效值
  2181. if (row.correctvalue === '' || !isFinite(row.correctvalue)) {
  2182. row.correctvalue = 0;
  2183. row.apportvalue = row.actualvalue;
  2184. } else {
  2185. row.apportvalue = that.floatComputed(row.actualvalue, row.correctvalue, '+');
  2186. }
  2187. that.jsDifference();
  2188. },
  2189. apportvalueUpFoo (row) {
  2190. let that = this;
  2191. if (row.apportvalue === '' || !isFinite(row.apportvalue)) {
  2192. row.correctvalue = 0;
  2193. row.apportvalue = row.actualvalue;
  2194. } else {
  2195. row.correctvalue = that.floatComputed(row.apportvalue, row.actualvalue, '-');
  2196. }
  2197. that.jsDifference();
  2198. },
  2199. tableTDMousedown (e) {
  2200. let that = this;
  2201. let nowPageX = e.pageX,
  2202. nowWidth = that.leftTableWidth,
  2203. minWidth = 200,
  2204. maxWidth = window.innerWidth - 200;
  2205. that.$refs.table_box.style.userSelect = 'none';
  2206. that.$refs.table_box.style.cursor = 'col-resize';
  2207. that.$refs.table_box.onmousemove = function (e) {
  2208. let bh = e.pageX - nowPageX;
  2209. if (nowWidth + bh > maxWidth) {
  2210. that.leftTableWidth = maxWidth;
  2211. } else if (nowWidth + bh < minWidth) {
  2212. that.leftTableWidth = minWidth;
  2213. } else {
  2214. that.leftTableWidth = nowWidth + bh;
  2215. }
  2216. }
  2217. that.$refs.table_box.onmouseup = function () {
  2218. that.$refs.table_box.onmousemove = false;
  2219. that.$refs.table_box.onmouseup = false;
  2220. that.$refs.table_box.style.userSelect = '';
  2221. that.$refs.table_box.style.cursor = ''
  2222. }
  2223. },
  2224. // 对proportion的值进行处理,使其符合要求
  2225. proportionFormat (row) {
  2226. let that = this;
  2227. if (row.proportion === '' || !isFinite(row.proportion)) {
  2228. row.proportion = 0;
  2229. }
  2230. },
  2231. // 重新计算,根据自定义的分配比例来自动调整最终值
  2232. againCount () {
  2233. let that = this;
  2234. if (that.multipleSelection.length > 0) {
  2235. for (let item of that.multipleSelection) {
  2236. let xId = item.itemid + '-' + item.timegranid + '-' + item.clock;
  2237. let objItem = that.tableFormDataObj[xId];
  2238. let bl = 0;
  2239. for (let dataObj of item.tableFormDataArr) {
  2240. bl = +that.floatComputed(bl, dataObj.proportion, '+');
  2241. }
  2242. if (bl !== 100) {
  2243. this.$message.error('所有比例之和不为100%,请调整比例后再执行计算。');
  2244. continue;
  2245. }
  2246. let sum = objItem.apportvalue;
  2247. for (let i = 0, ilength = item.tableFormDataArr.length; i < ilength; i++) {
  2248. if (i === (ilength - 1)) {
  2249. item.tableFormDataArr[i].apportvalue = sum;
  2250. } else {
  2251. let z = that.floatComputed(objItem.apportvalue, item.tableFormDataArr[i].proportion, '*');
  2252. item.tableFormDataArr[i].apportvalue = that.floatComputed(z, 100, '/');
  2253. sum = that.floatComputed(sum, item.tableFormDataArr[i].apportvalue, '-');
  2254. }
  2255. item.tableFormDataArr[i].correctvalue = that.floatComputed(item.tableFormDataArr[i].apportvalue, item.tableFormDataArr[i].actualvalue, '-');
  2256. }
  2257. that.jsDifference();
  2258. }
  2259. } else {
  2260. this.$message.error('请勾选一条数据');
  2261. }
  2262. },
  2263. but_add (type) {
  2264. let that = this;
  2265. let SubmitData = [];
  2266. if (that.multipleSelectionAscLeft.length > 0) {
  2267. for (let key in that.tableFormDataObj) {
  2268. SubmitData.push({
  2269. parentid: that.tableFormDataObj[key].id,
  2270. may: that.tableFormDataObj[key].jhTime,
  2271. describe: that.tableFormDataObj[key].describe,
  2272. state: that.tableFormDataObj[key].state,
  2273. grades: that.tableFormDataObj[key].grades,
  2274. specifications: that.tableFormDataObj[key].specifications,
  2275. transportType: that.tableFormDataObj[key].transportType,
  2276. workprocType: that.tableFormDataObj[key].workprocType,
  2277. purpose: that.tableFormDataObj[key].purpose,
  2278. chemicalStandard: that.tableFormDataObj[key].chemicalStandard,
  2279. memo: that.tableFormDataObj[key].memo,
  2280. createMan: that.tableFormDataObj[key].createman,
  2281. planweight: that.tableFormDataObj[key].planweight,
  2282. createTime: that.tableFormDataObj[key].createtime,
  2283. deliveryDate: that.tableFormDataObj[key].deliveryDate,
  2284. auditState: '0',
  2285. tag: that.tableFormDataObj[key].tag ? that.tableFormDataObj[key].tag : '0'
  2286. })
  2287. }
  2288. that.loading = true;
  2289. that.axios.post('pass/ems/v1/emsprodplanrounds/', SubmitData, {
  2290. contentType: 'application/json'
  2291. })
  2292. .then(function (res) {
  2293. if (res.code === '0') {
  2294. that.$message({
  2295. message: '新增成功',
  2296. type: 'success'
  2297. });
  2298. that.dialog.editorBox.show = false;
  2299. that.getTableDetailDatas(1, 'Add');
  2300. } else {
  2301. that.$message.error(res.message);
  2302. }
  2303. that.loading = false;
  2304. }).catch(function () {
  2305. that.loading = false;
  2306. });
  2307. } else {
  2308. this.$message.error('至少要选择一条数据');
  2309. }
  2310. },
  2311. // 审核
  2312. audit () {
  2313. let that = this;
  2314. if (that.multipleSelection.length > 0) {
  2315. let SubmitData = [];
  2316. for (let key in that.rightTableObj) {
  2317. SubmitData.push({
  2318. parentid: that.rightTableObj[key].parentid,
  2319. auditState: that.rightTableObj[key].auditState,
  2320. id: that.rightTableObj[key].roundid,
  2321. state: that.rightTableObj[key].state
  2322. });
  2323. }
  2324. that.loading = true;
  2325. that.axios.put('pass/ems/v1/emsprodplanrounds/updateAuditState', SubmitData, {
  2326. contentType: 'application/json'
  2327. })
  2328. .then(function (res) {
  2329. if (res.code === '0') {
  2330. that.$message({
  2331. message: '操作成功',
  2332. type: 'success'
  2333. });
  2334. that.getTableData();
  2335. that.getTableDetailDatas();
  2336. } else {
  2337. that.$message.error(res.message);
  2338. }
  2339. that.loading = false;
  2340. }).catch(function () {
  2341. that.loading = false;
  2342. });
  2343. } else {
  2344. this.$message.error('至少要选择一条数据');
  2345. }
  2346. },
  2347. but_addNBJH () {
  2348. let that = this;
  2349. that.dialog.editorBox.form.data.planWeight = '';
  2350. that.dialog.editorBox.show = true;
  2351. setTimeout(() => {
  2352. that.$refs['dialog_form'].clearValidate();
  2353. }, 100);
  2354. },
  2355. getChildTable (row, expandedRows) {
  2356. let that = this;
  2357. if (!row.getTable) {
  2358. let params = {
  2359. clock: row.clock,
  2360. energyid: row.energyid
  2361. };
  2362. row.tableLoading = true;
  2363. let url = 'pass/ems/v1/trmbalancevalues/getitem';
  2364. that.axios.get(url, {
  2365. params: params
  2366. })
  2367. .then(function (res) {
  2368. if (res.code === '0') {
  2369. let arr = [];
  2370. for (let item of res.data) {
  2371. arr.push({
  2372. clock: item.CLOCK,
  2373. itemname: item.ITEMNAME,
  2374. timegranid: item.TIMEGRANID,
  2375. apportvalue: item.APPORTVALUE
  2376. })
  2377. }
  2378. row.tableData = arr;
  2379. row.getTable = true;
  2380. } else {
  2381. that.$message.error(res.message);
  2382. }
  2383. row.tableLoading = false;
  2384. }).catch(function () {
  2385. row.tableLoading = false;
  2386. });
  2387. }
  2388. },
  2389. radioChange () {
  2390. let that = this;
  2391. let leftwith = 0;
  2392. let rightwith = 550;
  2393. if (that.radio === 0) {
  2394. that.leftTableWidth = leftwith;
  2395. that.leftTableShow = false;
  2396. that.getTableDetailAsRadio(1);
  2397. }
  2398. if (that.radio === 1) {
  2399. that.leftTableWidth = rightwith;
  2400. that.leftTableShow = true;
  2401. that.rightTableData = [];
  2402. }
  2403. },
  2404. keyDown (event1, disabledFlag) {
  2405. let tdTarget = event1.target;
  2406. let _this = this;
  2407. while (tdTarget.tagName !== 'TD') {
  2408. tdTarget = tdTarget.parentElement;
  2409. }
  2410. // 如果按下键盘下键或者回车键
  2411. if (event.keyCode === 40 || event.keyCode === 13) {
  2412. let index = parseInt(this.rowIndex);
  2413. // index++;
  2414. if (index !== this.seqArr[this.seqArr.length - 1]) {
  2415. for (let i = 0; i < this.seqArr.length; i++) {
  2416. if (index === this.seqArr[i]) {
  2417. index = this.seqArr[i + 1];
  2418. break;
  2419. }
  2420. }
  2421. }
  2422. this.editSetFlag = index + this.columnId;
  2423. let id = '#' + this.editSetFlag;
  2424. this.$nextTick(() => {
  2425. $(id).click();
  2426. });
  2427. } else if (event.keyCode === 38) { // 键盘上键
  2428. let index = parseInt(this.rowIndex);
  2429. if (index !== this.seqArr[0]) {
  2430. for (let i = 0; i < this.seqArr.length; i++) {
  2431. if (index === this.seqArr[i]) {
  2432. index = this.seqArr[i - 1];
  2433. break;
  2434. }
  2435. }
  2436. }
  2437. this.editSetFlag = index + this.columnId;
  2438. let id = '#' + this.editSetFlag;
  2439. this.$nextTick(() => {
  2440. $(id).click();
  2441. });
  2442. } else if (event.keyCode === 37) { // 键盘左键
  2443. $(tdTarget).prevAll().find('input:text').last().click();
  2444. } else if (event.keyCode === 39) { // 键盘右键
  2445. $(tdTarget).nextAll().find('input').eq(0).click();
  2446. }
  2447. },
  2448. cellClick (row, column, cell, event) {
  2449. let _this = this;
  2450. this.rowIndex = row.index;
  2451. this.columnId = column.id;
  2452. _this.editSetFlag = row.index + column.id;
  2453. _this.focusTarget = event.target;
  2454. while (_this.focusTarget.tagName !== 'TD') {
  2455. _this.focusTarget = _this.focusTarget.parentElement;
  2456. }
  2457. _this.$nextTick(() => {
  2458. let target = this.focusTarget;
  2459. $(target).find('input').focus();
  2460. });
  2461. },
  2462. tableRowClassName ({row, rowIndex}) {
  2463. // 把每一行的索引放进row
  2464. row.index = rowIndex;
  2465. },
  2466. openDetails (row) {
  2467. let that = this;
  2468. that.leftData = row;
  2469. },
  2470. getExecutiveStandard () {
  2471. let that = this;
  2472. let url = 'pass/ems/v1/emsproductsexecutivestandards/?pageNum=1&pageSize=999';
  2473. that.axios.get(url)
  2474. .then(function (res) {
  2475. if (res.code === '0') {
  2476. let arr = [];
  2477. let obj = {};
  2478. for (let item of res.data.list) {
  2479. arr.push({
  2480. brand: item.brand,
  2481. factory: item.factoryStandard,
  2482. surface: item.surfaceStandard
  2483. });
  2484. obj[item.brand] = {
  2485. brand: item.brand,
  2486. factory: item.factoryStandard,
  2487. surface: item.surfaceStandard
  2488. };
  2489. }
  2490. that.nameObj.ExecutiveStandard.arr = arr;
  2491. that.nameObj.ExecutiveStandard.obj = obj;
  2492. } else {
  2493. that.$message.error(res.message);
  2494. }
  2495. });
  2496. },
  2497. gradesChange (data, scope) {
  2498. let that = this;
  2499. let obj = that.rightTableObj[scope.row.seq];
  2500. // 化学成分执行标准 / 出厂执行标准
  2501. let factory = obj.chemicalStandard;
  2502. // 表面执行标准
  2503. let surface = obj.surfaceStandard;
  2504. // if(factory === '' || factory === null)
  2505. // {
  2506. try {
  2507. obj.chemicalStandard = that.nameObj.ExecutiveStandard.obj[data].factory;
  2508. if (data === 'Q195' && obj.specifications === '6.5') {
  2509. obj.chemicalStandard = that.nameObj.ExecutiveStandard.obj['Q195L'].factory;
  2510. // rightTableObj[xId].chemicalStandard = that.nameObj.ExecutiveStandard.obj['Q195L'].factory;
  2511. }
  2512. // }
  2513. // if(surface === '' || surface === null) {
  2514. obj.surfaceStandard = that.nameObj.ExecutiveStandard.obj[data].surface;
  2515. // }
  2516. } catch (e) {
  2517. obj.chemicalStandard = '';
  2518. console.log('没有对应');
  2519. }
  2520. },
  2521. but_update () {
  2522. let that = this;
  2523. if (that.multipleSelection.length > 0) {
  2524. setTimeout(() => {
  2525. that.$refs['dialog_form3'].clearValidate();
  2526. }, 100);
  2527. that.getLastIssuedData();
  2528. that.dialog.editorBox3.show = true;
  2529. } else {
  2530. this.$message.error('至少要选择一条数据');
  2531. }
  2532. },
  2533. // 轮次描述复制
  2534. but_copy () {
  2535. let that = this;
  2536. that.$refs['dialog_form3'].validate((valid) => {
  2537. if (valid) {
  2538. for (let key in that.rightTableObj) {
  2539. that.rightTableObj[key].describe = that.dialog.editorBox3.form.data.describe;
  2540. }
  2541. that.dialog.editorBox3.show = false;
  2542. }
  2543. });
  2544. },
  2545. // 显示/隐藏
  2546. leftIssueShowChange (val) {
  2547. let that = this;
  2548. if (val) {
  2549. that.leftTableData = that.leftTableDataAll;
  2550. } else {
  2551. that.leftTableData = that.leftTableDataAll.filter(item => item.kxf_weight > 0);
  2552. }
  2553. },
  2554. // 获取最后一次下发的数据
  2555. getLastIssuedData () {
  2556. let that = this;
  2557. let id = 'G-G1';
  2558. if (that.filterForm.data.workprocid === 'AT2006') {
  2559. id = 'G-G2';
  2560. }
  2561. let url = 'pass/ems/v1/emsprodplanrounds/getLastIssuedData/';
  2562. that.axios.get(url, {
  2563. params: {
  2564. id: id,
  2565. workprocType: that.filterForm.data.workprocid
  2566. }
  2567. })
  2568. .then(function (res) {
  2569. if (res.code === '0') {
  2570. let arr = [];
  2571. let obj = {};
  2572. for (let item of res.data) {
  2573. // console.log('获取当前工序最后一次下发的数据');
  2574. // item.currentDescribe = item.describe.substring(8);
  2575. // item.currentDescribe = item.currentDescribe.replace(/[^0-9]/ig,"");
  2576. arr.push(item);
  2577. obj[id] = item;
  2578. }
  2579. that.lastIssuedData.arr = arr;
  2580. that.lastIssuedData.obj = obj;
  2581. } else {
  2582. that.$message.error(res.message);
  2583. }
  2584. });
  2585. }
  2586. }
  2587. }
  2588. function sortNumber (a, b) {
  2589. return a - b
  2590. }
  2591. </script>
  2592. <style lang="less">
  2593. .balanceSheetData {
  2594. min-width: 700px;
  2595. height: 100%;
  2596. .box {
  2597. height: 100%;
  2598. padding: 15px 15px 0 15px;
  2599. .box-top {
  2600. .el-form-item {
  2601. margin-bottom: 7px;
  2602. }
  2603. .box-top-gjl {
  2604. overflow: hidden;
  2605. // margin-top: -7px;
  2606. padding: 7px 0;
  2607. border-top: 1px solid #ccc;
  2608. // border-bottom: 1px solid #ccc;
  2609. // margin-bottom: 6px;
  2610. }
  2611. }
  2612. .table-box {
  2613. .table-left {
  2614. float: left;
  2615. width: 550px;
  2616. }
  2617. .table-tuodong {
  2618. float: left;
  2619. width: 5px;
  2620. margin: 0 1px 0 1px;
  2621. cursor: col-resize;
  2622. }
  2623. .table-right {
  2624. margin-left: 557px;
  2625. }
  2626. }
  2627. .el-table .el-table__row {
  2628. height: 35px;
  2629. }
  2630. .el-table__body .el-form-item--mini.el-form-item {
  2631. margin: 0px;
  2632. .error {
  2633. overflow: hidden;
  2634. color: #f56c6c;
  2635. font-size: 12px;
  2636. line-height: 1;
  2637. }
  2638. }
  2639. // 隐藏全选按钮
  2640. thead .el-table-column--selection .cell {
  2641. display: none;
  2642. }
  2643. }
  2644. td .el-form-item__error {
  2645. position: static;
  2646. }
  2647. .lastData {
  2648. margin: 0px 0px 10px 5px;
  2649. div {
  2650. margin: 3px;
  2651. }
  2652. }
  2653. }
  2654. </style>