edit.vue 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572
  1. <template>
  2. <div class="ele-body">
  3. <el-card shadow="never">
  4. <div class="page-title">
  5. <PageHeader title="入库单修改"> </PageHeader>
  6. </div>
  7. <div>
  8. <!-- <StatusStep :activeCode="infoData.verifyStatus" /> -->
  9. <div class="stepsStatus">
  10. <el-steps :active="active" align-center>
  11. <el-step title="创建"></el-step>
  12. <el-step title="待审核"></el-step>
  13. <el-step :title="stepsTitle" :status="stepsStatus"></el-step>
  14. </el-steps>
  15. </div>
  16. <div class="content-detail">
  17. <header-title title="基本信息" size="16px"></header-title>
  18. <div class="mt20">
  19. <el-form label-width="120px">
  20. <el-col :span="8">
  21. <el-form-item label="入库单:">
  22. <span>{{ infoData.bizNo }}</span>
  23. </el-form-item>
  24. </el-col>
  25. <el-col :span="8">
  26. <el-form-item label="入库物品类型:">
  27. <span>{{ handleAssetType(extInfo.assetType) }}</span>
  28. </el-form-item>
  29. </el-col>
  30. <el-col :span="8">
  31. <el-form-item label="入库场景:">
  32. <span>{{ getSceneState(infoData.bizType) }}</span>
  33. </el-form-item>
  34. </el-col>
  35. <el-col :span="8">
  36. <el-form-item label="销售订单:">
  37. <span>{{ extInfo.documentSource }}</span>
  38. </el-form-item>
  39. </el-col>
  40. <el-col :span="8">
  41. <el-form-item label="权属部门:">
  42. <span>{{ extInfo.deptName }}</span>
  43. </el-form-item>
  44. </el-col>
  45. <el-col :span="8">
  46. <el-form-item label="入库登记人:">
  47. <span>{{ extInfo.createUserName }}</span>
  48. </el-form-item>
  49. </el-col>
  50. <!-- <el-col :span="8">
  51. <el-form-item label="创建时间:">
  52. <span>{{ infoData.createTime }}</span>
  53. </el-form-item>
  54. </el-col> -->
  55. <el-col :span="8">
  56. <el-form-item label="入库时间:">
  57. <span>{{ infoData.storageTime }}</span>
  58. </el-form-item>
  59. </el-col>
  60. <el-col :span="8">
  61. <el-form-item label="状态:">
  62. <span>{{ getAuditStatus(infoData.verifyStatus) }}</span>
  63. </el-form-item>
  64. </el-col>
  65. <el-col :span="8">
  66. <el-form-item label="审核人:">
  67. <span>{{ infoData.verifyName }}</span>
  68. </el-form-item>
  69. </el-col>
  70. <el-col :span="8" v-if="infoData.bizType == 2">
  71. <el-form-item label="客户:">
  72. <span>{{ infoData.clientName }}</span>
  73. </el-form-item>
  74. </el-col>
  75. <!-- <el-col :span="8" v-if="infoData.bizType == 2">
  76. <el-form-item label="客户代码:">
  77. <span>{{ infoData.clientCode }}</span>
  78. </el-form-item>
  79. </el-col> -->
  80. <el-col :span="8" v-if="infoData.bizType == 2">
  81. <el-form-item label="供应商:">
  82. <span>{{ extInfo.supplierName }}</span>
  83. </el-form-item>
  84. </el-col>
  85. <!-- <el-col :span="8" v-if="infoData.bizType != 2">
  86. <el-form-item label="供应商代码:">
  87. <span>{{ extInfo.supplierCode }}</span>
  88. </el-form-item>
  89. </el-col> -->
  90. <el-col :span="8">
  91. <el-form-item label="送货人:">
  92. <span>{{ infoData.fromUser }}</span>
  93. </el-form-item>
  94. </el-col>
  95. <el-col :span="8">
  96. <el-form-item label="送货人联系方式:">
  97. <span>{{ extInfo.deliveryPhone }}</span>
  98. </el-form-item>
  99. </el-col>
  100. <el-col :span="8">
  101. <el-form-item label="附件:">
  102. <!-- <el-link
  103. type="primary"
  104. v-for="(item, index) in infoData.contentImage"
  105. @click="contentImageDownload(item)"
  106. :key="item.name"
  107. >{{ item.name }}</el-link
  108. > -->
  109. </el-form-item>
  110. </el-col>
  111. <el-col :span="24">
  112. <el-form-item label="备注:">
  113. <span>{{ infoData.remark }}</span>
  114. </el-form-item>
  115. </el-col>
  116. </el-form>
  117. </div>
  118. </div>
  119. <div class="content-detail mt20">
  120. <header-title title="物品信息" size="16px"></header-title>
  121. <!-- =={{ warehousingMaterialList }} -->
  122. <div class="mt20">
  123. <div class="mt10">
  124. <el-form
  125. ref="warehousingMaterialListRef"
  126. :model="{ warehousingMaterialList: warehousingMaterialList }"
  127. :show-message="false"
  128. >
  129. <el-table
  130. ref="multipleTable"
  131. :data="warehousingMaterialList"
  132. tooltip-effect="dark"
  133. :key="infoData.assetType"
  134. style="width: 100%"
  135. stripe
  136. :header-cell-style="rowClass"
  137. >
  138. <el-table-column label="序号" type="index" width="50">
  139. </el-table-column>
  140. <el-table-column
  141. label="编码"
  142. prop="categoryCode"
  143. align="center"
  144. width="150"
  145. ></el-table-column>
  146. <el-table-column
  147. label="名称"
  148. align="center"
  149. width="170"
  150. prop="name"
  151. ></el-table-column>
  152. <el-table-column
  153. v-for="(item, index) in tableHeader"
  154. :key="index"
  155. align="center"
  156. :label="item.label"
  157. width="150"
  158. :prop="item.prop"
  159. >
  160. <template slot-scope="{ row }">
  161. <template v-if="item.formatter">{{
  162. item.formatter(row)
  163. }}</template>
  164. <template v-else>{{ row[item.prop] }}</template>
  165. </template>
  166. </el-table-column>
  167. <el-table-column
  168. label="批次号"
  169. prop="batchNo"
  170. width="70"
  171. align="center"
  172. >
  173. </el-table-column>
  174. <el-table-column
  175. label="最小包装单元"
  176. align="center"
  177. prop="minPackingCount"
  178. width="100"
  179. >
  180. <el-table-column
  181. label=""
  182. prop="minPackingCount"
  183. width="100"
  184. align="center"
  185. >
  186. <template slot-scope="{ row, $index }">
  187. <template v-if="row.isSave">
  188. {{ row.minPackingCount }}
  189. </template>
  190. <el-form-item
  191. v-else
  192. :prop="`warehousingMaterialList.${$index}.minPackingCount`"
  193. required
  194. >
  195. <el-input
  196. v-model="row.minPackingCount"
  197. @input="
  198. (value) =>
  199. (row.minPackingCount = value.replace(
  200. /^(0+)|[^\d]+/g,
  201. ''
  202. ))
  203. "
  204. >
  205. </el-input>
  206. </el-form-item>
  207. </template>
  208. </el-table-column>
  209. <el-table-column label="" prop="minPackingCount">
  210. <template slot-scope="{ row, $index }">
  211. {{ handleRowUnit(row) }} /{{ row.packingUnit }}
  212. </template>
  213. </el-table-column>
  214. </el-table-column>
  215. <el-table-column
  216. label="包装数量"
  217. prop="packingCount"
  218. width="130"
  219. align="center"
  220. >
  221. <!-- <template slot-scope="{ row, $index }">
  222. {{ row.packingCount }} {{ row.packingUnit }}
  223. </template> -->
  224. <template slot-scope="{ row, $index }">
  225. <template v-if="row.isSave">
  226. {{ row.packingCount }} {{ row.packingUnit }}
  227. </template>
  228. <el-form-item
  229. v-else
  230. :prop="`warehousingMaterialList.${$index}.packingCount`"
  231. required
  232. >
  233. <el-input
  234. v-model="row.packingCount"
  235. @input="packNum(row, $event)"
  236. >
  237. <template slot="append">
  238. {{ row.packingUnit ? row.packingUnit : '/' }}
  239. </template>
  240. </el-input>
  241. </el-form-item>
  242. </template>
  243. </el-table-column>
  244. <el-table-column
  245. label="计量数量"
  246. prop="batchNo"
  247. width="100"
  248. align="center"
  249. >
  250. <template slot-scope="{ row, $index }">
  251. <template>
  252. {{ row.minPackingCount * row.packingCount }}
  253. </template>
  254. </template>
  255. </el-table-column>
  256. <el-table-column
  257. label="计量单位"
  258. prop="batchNo"
  259. width="100"
  260. align="center"
  261. >
  262. <template slot-scope="{ row, $index }">
  263. <template>
  264. {{ row.measuringUnit }}
  265. </template>
  266. </template>
  267. </el-table-column>
  268. <el-table-column
  269. label="重量"
  270. prop="count"
  271. width="100"
  272. align="center"
  273. >
  274. <template slot-scope="{ row, $index }">
  275. {{ row.weight }}
  276. </template>
  277. </el-table-column>
  278. <el-table-column
  279. label="重量单位"
  280. prop="count"
  281. width="100"
  282. align="center"
  283. >
  284. <template slot-scope="{ row, $index }">
  285. {{ row.weightUnit }}
  286. </template>
  287. </el-table-column>
  288. <el-table-column
  289. label="单价"
  290. prop="price"
  291. width="190"
  292. align="center"
  293. >
  294. <template slot-scope="{ row, $index }">
  295. <template v-if="row.isSave">
  296. {{ row.price }}
  297. </template>
  298. <el-form-item v-else>
  299. <el-input
  300. v-model="row.price"
  301. placeholder="非必填"
  302. @input="
  303. (value) =>
  304. (row.price = value.replace(/[^0-9.]+/g, ''))
  305. "
  306. >
  307. <template slot="append">
  308. 元/{{ handleRowUnit(row) }}
  309. </template>
  310. </el-input>
  311. </el-form-item>
  312. </template>
  313. </el-table-column>
  314. <el-table-column
  315. label="金额"
  316. align="center"
  317. prop="contentImage"
  318. :show-overflow-tooltip="true"
  319. width="100"
  320. >
  321. <template slot-scope="{ row, $index }">
  322. <!-- // calcSum(
  323. // row.outInNum,
  324. // row.univalenceUnit,
  325. // row.univalence,
  326. // row
  327. // ) -->
  328. {{
  329. calcSumTotal(
  330. row.packingCount,
  331. row.minPackingCount,
  332. row.price,
  333. row
  334. )
  335. }}
  336. </template>
  337. </el-table-column>
  338. <el-table-column
  339. label="货位"
  340. prop="position"
  341. :show-overflow-tooltip="true"
  342. width="200"
  343. >
  344. <template slot-scope="{ row, $index }">
  345. <template v-if="row.isSave">
  346. {{ row.position }}
  347. </template>
  348. <el-form-item
  349. v-else
  350. :prop="`warehousingMaterialList.${$index}.position`"
  351. :required="true"
  352. >
  353. <span @click="handleWareHouse(row, $index)">
  354. {{ row.position }}</span
  355. >
  356. </el-form-item>
  357. </template>
  358. </el-table-column>
  359. <el-table-column
  360. label="操作"
  361. width="200"
  362. fixed="right"
  363. align="center"
  364. >
  365. <template slot-scope="{ row, $index }">
  366. <el-button
  367. type="text"
  368. v-show="!row.isSave"
  369. @click="listSave(row, $index)"
  370. >保存</el-button
  371. >
  372. <el-button
  373. type="text"
  374. v-show="row.isSave"
  375. @click="listEdit(row, $index)"
  376. >编辑</el-button
  377. >
  378. </template>
  379. </el-table-column>
  380. </el-table>
  381. </el-form>
  382. </div>
  383. </div>
  384. </div>
  385. <div class="mt20">
  386. <!-- =={{ getDictValue('类型用途', infoData.assetType) }} -->
  387. <!-- ${handleAssetType(extInfo.assetType)} -->
  388. <header-title :title="`包装明细`" size="16px"></header-title>
  389. <el-table
  390. ref="multipleTable"
  391. :data="detailList"
  392. tooltip-effect="dark"
  393. :header-cell-style="rowClass"
  394. style="width: 100%"
  395. stripe
  396. >
  397. <el-table-column label="序号" type="index" width="50">
  398. </el-table-column>
  399. <el-table-column label="编码" prop="categoryCode"></el-table-column>
  400. <el-table-column label="名称" prop="name"></el-table-column>
  401. <el-table-column label="批次号" prop="batchNo"></el-table-column>
  402. <el-table-column label="包装编码" prop="code"></el-table-column>
  403. <el-table-column
  404. label="包装数量"
  405. prop="packingCount"
  406. width="80"
  407. ></el-table-column>
  408. <el-table-column
  409. label="包装单位"
  410. prop="packingUnit"
  411. ></el-table-column>
  412. <el-table-column
  413. label="计量数量"
  414. prop="minPackingCount"
  415. ></el-table-column>
  416. <el-table-column
  417. label="计量单位"
  418. prop="measuringUnit"
  419. ></el-table-column>
  420. <el-table-column
  421. v-if="infoData.bizType == 2 || infoData.bizType == 1"
  422. label="物料代号"
  423. prop="materielCode"
  424. >
  425. <template slot-scope="{ row }">
  426. <el-input
  427. v-show="!row.isPack"
  428. v-model="row.materielCode"
  429. ></el-input>
  430. <span v-show="row.isPack">{{ row.materielCode }}</span>
  431. </template>
  432. </el-table-column>
  433. <el-table-column
  434. v-if="infoData.bizType == 2 || infoData.bizType == 1"
  435. label="客户代号"
  436. prop="clientCode"
  437. >
  438. <template slot-scope="{ row }">
  439. <el-input
  440. v-show="!row.isPack"
  441. v-model="row.clientCode"
  442. ></el-input>
  443. <span v-show="row.isPack">{{ row.clientCode }}</span>
  444. </template>
  445. </el-table-column>
  446. <!-- v-if="infoData.bizType == 1" -->
  447. <el-table-column label="刻码" prop="engrave">
  448. <template slot-scope="{ row }">
  449. <el-input v-show="!row.isPack" v-model="row.engrave"></el-input>
  450. <span v-show="row.isPack">{{ row.engrave }}</span>
  451. </template>
  452. </el-table-column>
  453. <el-table-column label="重量" prop="weight">
  454. <template slot-scope="{ row }">
  455. <el-input v-show="!row.isPack" v-model="row.weight"></el-input>
  456. <span v-show="row.isPack">{{ row.weight }}</span>
  457. </template>
  458. </el-table-column>
  459. <el-table-column label="重量单位" prop="weightUtil">
  460. <template slot-scope="{ row }">
  461. {{ row.weightUtil }}
  462. </template>
  463. </el-table-column>
  464. <el-table-column label="质检结果" prop="result" width="120">
  465. <template slot-scope="{ row }">
  466. <DictSelection
  467. dictName="质检结果"
  468. clearable
  469. v-model="row.result"
  470. v-show="!row.isPack"
  471. />
  472. <span v-if="row.isPack">
  473. <span v-if="!row.result"></span>
  474. <span v-if="row.result == 0">合格</span>
  475. <span v-else-if="row.result == 1">不合格</span>
  476. <span v-else>让步接收</span>
  477. </span>
  478. </template>
  479. </el-table-column>
  480. <el-table-column label="质检状态" prop="status" width="120">
  481. <template slot-scope="{ row }">
  482. <DictSelection
  483. dictName="质检状态"
  484. clearable
  485. v-model="row.status"
  486. v-show="!row.isPack"
  487. />
  488. <span v-if="row.isPack">
  489. <span v-if="!row.status"></span>
  490. <span v-if="row.status == 0">未检</span>
  491. <span v-else>已检</span>
  492. </span>
  493. </template>
  494. </el-table-column>
  495. <el-table-column label="日期" prop="createTime" width="200">
  496. <template slot="header" slot-scope="scope">
  497. {{ dateTypes == 1 ? '采购日期' : '生产日期' }}
  498. </template>
  499. <template slot-scope="{ row }">
  500. {{ row.createTime }}
  501. </template>
  502. </el-table-column>
  503. <el-table-column
  504. label="操作"
  505. width="100"
  506. fixed="right"
  507. align="center"
  508. >
  509. <template slot-scope="{ row, $index }">
  510. <el-button
  511. type="text"
  512. v-show="!row.isPack"
  513. @click="packSave(row, $index)"
  514. >保存</el-button
  515. >
  516. <el-button
  517. type="text"
  518. v-show="row.isPack"
  519. @click="packEdit(row, $index)"
  520. >编辑</el-button
  521. >
  522. </template>
  523. </el-table-column>
  524. </el-table>
  525. </div>
  526. <div class="mt20">
  527. <header-title :title="`物料明细`" size="16px"> </header-title>
  528. <el-table
  529. ref="multipleTable"
  530. :data="metailList"
  531. tooltip-effect="dark"
  532. :header-cell-style="rowClass"
  533. style="width: 100%"
  534. stripe
  535. height="300px"
  536. >
  537. <el-table-column label="序号" type="index" width="50">
  538. </el-table-column>
  539. <el-table-column label="编码" prop="assetCode"></el-table-column>
  540. <el-table-column
  541. label="名称"
  542. prop="assetName"
  543. width="200"
  544. ></el-table-column>
  545. <el-table-column
  546. label="批次号"
  547. prop="batchNo"
  548. width="80"
  549. ></el-table-column>
  550. <el-table-column
  551. label="物料编码"
  552. prop="no"
  553. width="200"
  554. ></el-table-column>
  555. <el-table-column
  556. label="计量数量"
  557. prop="minPackingCount"
  558. width="90"
  559. ></el-table-column>
  560. <el-table-column
  561. width="80"
  562. label="计量单位"
  563. prop="measuringUnit"
  564. ></el-table-column>
  565. <el-table-column
  566. v-if="infoData.bizType == 2"
  567. label="物料代号"
  568. prop="materielCode"
  569. >
  570. <template slot-scope="{ row }">
  571. {{ row.materielCode }}
  572. </template>
  573. </el-table-column>
  574. <el-table-column
  575. v-if="infoData.bizType == 2 || infoData.bizType == 1"
  576. label="客户代号"
  577. prop="clientCode"
  578. >
  579. <template slot-scope="{ row }">
  580. {{ row.clientCode }}
  581. </template>
  582. </el-table-column>
  583. <!-- v-if="infoData.bizType == 1" -->
  584. <el-table-column label="刻码" prop="engrave">
  585. <template slot-scope="{ row }">
  586. {{ row.engrave }}
  587. </template>
  588. </el-table-column>
  589. <el-table-column width="100" label="重量" prop="weight">
  590. <template slot-scope="{ row }">
  591. {{ row.weight }}
  592. </template>
  593. </el-table-column>
  594. <el-table-column label="重量单位" prop="weightUnit">
  595. <template slot-scope="{ row }">
  596. {{ row.weightUnit }}
  597. </template>
  598. </el-table-column>
  599. <el-table-column label="质检结果" prop="result" width="120">
  600. <template slot-scope="{ row }">
  601. <span>
  602. <span v-if="!row.result"></span>
  603. <span v-if="row.result == 0">合格</span>
  604. <span v-else-if="row.result == 1">不合格</span>
  605. <span v-else>让步接收</span>
  606. </span>
  607. </template>
  608. </el-table-column>
  609. <el-table-column label="质检状态" prop="status" width="120">
  610. <template slot-scope="{ row }">
  611. <span
  612. ><span v-if="!row.status"></span>
  613. <span v-if="row.status == 0">未检</span>
  614. <span v-else>已检</span></span
  615. >
  616. </template>
  617. </el-table-column>
  618. </el-table>
  619. </div>
  620. </div>
  621. <div class="center mt20" style="text-align: center">
  622. <el-button type="primary" @click="handleSave" :loading="saveLoading"
  623. >保存</el-button
  624. >
  625. <el-button @click="$router.go(-1)">返回</el-button>
  626. </div>
  627. <WareHouseDailog
  628. ref="wareHouseDailogRef"
  629. @houseData="houseData"
  630. ></WareHouseDailog>
  631. </el-card>
  632. </div>
  633. </template>
  634. <script>
  635. // import { getInfo } from '@/api/stockManagement';
  636. import PageHeader from '@/components/PageHeader';
  637. import selectType from '../components/selectType.vue';
  638. import WareHouseDailog from '../components/WareHouseDailog.vue';
  639. import StatusStep from '@/components/StatusStep/common.vue';
  640. // import { fileSystemDownload } from '@/utils';
  641. import outin from '@/api/warehouseManagement/outin';
  642. import { getTreeByPid } from '@/api/classifyManage';
  643. import {
  644. materialType,
  645. warehousingType,
  646. useDict,
  647. useDictLabel,
  648. inputStatus,
  649. emergencyState,
  650. sceneState
  651. } from '@/utils/dict/index';
  652. import { auditStatus } from '@/utils/dict/common';
  653. // import { batchBarPrint } from '@/api/ledgerAssets/booksList';
  654. import { tableHeader } from '../common';
  655. import { mapGetters, mapActions } from 'vuex';
  656. import { number } from 'echarts/core';
  657. export default {
  658. components: { StatusStep, PageHeader, WareHouseDailog },
  659. data() {
  660. return {
  661. saveLoading: false,
  662. metailList: [],
  663. dateTypes: 1,
  664. detailList: [],
  665. extInfo: {},
  666. codeList: [],
  667. auditStatus,
  668. infoData: {},
  669. warehousingMaterialList: [],
  670. tableData2: [],
  671. activeName: 'a',
  672. num: 1,
  673. openWindows: false, //打印弹窗
  674. barCodeConfig: [],
  675. stepsTitle: '已完成',
  676. stepsStatus: 'success',
  677. active: 0,
  678. // 条码类型枚举
  679. codeTypeObj: {
  680. 生产设备: 'EQUIPMENT',
  681. 舟皿: '',
  682. 周转车: 'TURNOVER_CAR',
  683. 模具: 'MODE',
  684. 库位: 'STORE_LOCAL',
  685. 混合料: 'MIX_MATER',
  686. 混炼料: 'MIXING_MATER',
  687. 破碎料: 'CRUSH_MATER',
  688. 货架: 'GOODS_SHELF',
  689. 返回料: 'RETURN_MATER',
  690. 返工料: 'REWORK_MATER',
  691. 备品备件: 'SPARE_PART',
  692. 车削料: 'LATHE_MATER',
  693. 风管料: 'WIND_PIPE_MATER',
  694. 地面料: 'GROUND_MATER'
  695. }
  696. };
  697. },
  698. watch: {
  699. 'infoData.verifyStatus': {
  700. immediate: true,
  701. handler(val) {
  702. if (val == 0) {
  703. this.active = 1;
  704. this.stepsTitle = '未审核';
  705. this.stepsStatus = 'wait';
  706. } else if (val == 1) {
  707. this.active = 2;
  708. this.stepsTitle = '审核中';
  709. this.stepsStatus = 'process';
  710. } else if (val == 2) {
  711. this.active = 2;
  712. this.stepsTitle = '审核通过';
  713. this.stepsStatus = 'success';
  714. } else if (val == 3) {
  715. this.active = 2;
  716. this.stepsTitle = '驳回';
  717. this.stepsStatus = 'error';
  718. }
  719. }
  720. }
  721. },
  722. computed: {
  723. ...mapGetters(['getDictValue']),
  724. curDateType() {
  725. if (this.materialCodeReqList) {
  726. return this.materialCodeReqList[0].manufactureTime
  727. ? 'manufactureTime'
  728. : 'procurementTime';
  729. }
  730. },
  731. tableHeader() {
  732. return tableHeader(this.infoData.assetType);
  733. },
  734. emergencyState() {
  735. return useDict(emergencyState)(this.infoData.emergencyState);
  736. }
  737. // 条码信息
  738. // materialCodeReqList() {
  739. // return this.warehousingMaterialList.warehouseLedgerDetails;
  740. // }
  741. },
  742. created() {
  743. this.requestDict('类型用途');
  744. this._getInfo();
  745. },
  746. methods: {
  747. //包装保存
  748. async packSave(row, index) {
  749. console.log('===', row);
  750. console.log('row.minPackingCount', row.minPackingCount);
  751. console.log(' this.detailList.length', this.detailList.length);
  752. let packNo = 0;
  753. this.warehousingMaterialList.forEach((item) => {
  754. if (
  755. item.categoryCode == row.categoryCode &&
  756. item.categoryCode == row.categoryCode
  757. ) {
  758. packNo = item.packingCount;
  759. }
  760. });
  761. console.log('packNopackNopackNo', packNo);
  762. if (packNo != this.detailList.length) {
  763. //存当前没改之前包装数量
  764. let count = 0;
  765. for (const item of this.warehousingMaterialList) {
  766. console.log('item', item);
  767. if (item.categoryId == row.categoryId) {
  768. count = item.outInNum;
  769. }
  770. }
  771. console.log(111);
  772. //新增包装更新物料
  773. const arr = [];
  774. row.outInDetailRecordVOList.forEach((it) => {
  775. it.outInDetailRecordMaterialDetailVOList.forEach((item) => {
  776. arr.push({ ...item });
  777. });
  778. });
  779. if (row.minPackingCount < Number(count)) {
  780. console.log(1);
  781. console.log('arr====arr', arr);
  782. console.log('rrrr', this.metailList.length);
  783. this.metailList = this.metaUpdate(arr, row);
  784. } else {
  785. console.log(2);
  786. this.metailList = this.metaAdd(arr, row);
  787. }
  788. this.$set(row, 'isPack', true);
  789. return;
  790. }
  791. this.$set(row, 'isPack', true);
  792. //更新包装明细数据,同步物料明细
  793. for (const i in this.metailList) {
  794. if (this.metailList[i].onlyCode == row.code) {
  795. this.metailList[i].clientCode = row.clientCode; //客户代号
  796. this.metailList[i].materielCode = row.materielCode; //物料代号
  797. this.metailList[i].result = row.result; //质检结果
  798. this.metailList[i].status = row.status; //质检状态
  799. this.metailList[i].weight = row.weight / row.minPackingCount; //重量
  800. }
  801. }
  802. //更新包装明细重量,更新物品重量
  803. const list = this.detailList;
  804. let sum = 0;
  805. for (let i = 0; i < list.length; i++) {
  806. sum += Number(list[i].weight);
  807. }
  808. // const data = await outin.updateOutInRecord(row);
  809. // if (data.code == 0) {
  810. // this.$message.success('修改成功');
  811. // }
  812. this.warehousingMaterialList.forEach((item) => {
  813. if (
  814. item.categoryCode == row.categoryCode &&
  815. item.categoryCode == row.categoryCode
  816. ) {
  817. item.weight = sum;
  818. }
  819. });
  820. console.log(this.warehousingMaterialList);
  821. },
  822. //更新物料
  823. metaUpdate(arr, row) {
  824. const obj = {
  825. assetCode: row.categoryCode,
  826. assetName: row.name,
  827. batchNo: row.batchNo,
  828. clientCode: row.clientCode,
  829. createTime: row.createTime,
  830. engrave: '',
  831. id: '',
  832. materielCode: row.materielCode,
  833. measuringUnit: row.measuringUnit,
  834. minPackingCount: 1,
  835. no: '',
  836. onlyCode: row.code,
  837. outInDetailRecordId: '',
  838. pathName: row.position,
  839. result: row.result,
  840. status: row.status,
  841. weight: row.weight / row.minPackingCount,
  842. weightUnit: row.weightUtil,
  843. counts: row.minPackingCount
  844. };
  845. // 生成 no 字段的值
  846. let newArr = [];
  847. for (let i = 1; i <= obj.counts; i++) {
  848. newArr.push({
  849. ...obj,
  850. no: obj.onlyCode + i.toString().padStart(4, '0')
  851. });
  852. }
  853. console.log('新增', newArr);
  854. console.log(arr);
  855. let data = this.metailList.concat(newArr);
  856. const uniqueData = data.reduce((acc, curr) => {
  857. acc[curr.no] = curr;
  858. return acc;
  859. }, {});
  860. const result = Object.values(uniqueData);
  861. return result;
  862. },
  863. //包装编辑
  864. packEdit(row, index) {
  865. console.log('row', row);
  866. console.log('this.detailList', this.detailList);
  867. this.$set(row, 'isPack', false);
  868. this.$set(
  869. row,
  870. 'result',
  871. row.result != null ? row.result.toString() : ''
  872. );
  873. this.$set(
  874. row,
  875. 'status',
  876. row.status != null ? row.status.toString() : ''
  877. );
  878. },
  879. houseData(argum, idx) {
  880. this.$set(this.warehousingMaterialList[idx], 'houseList', argum);
  881. argum.forEach((item) => {
  882. item.position = `${item.warehouseName}-${item.areaName}-${item.shelfCode}-${item.cargoSpaceCode}`;
  883. item.pathIds = `${item.warehouseId},${item.areaId},${item.shelfId},${item.cargoSpaceId}`;
  884. });
  885. console.log(argum);
  886. this.$set(
  887. this.warehousingMaterialList[idx],
  888. 'position',
  889. argum[0].position
  890. );
  891. console.log(
  892. 'this.warehousingMaterialList',
  893. this.warehousingMaterialList
  894. );
  895. },
  896. // 仓库编辑
  897. handleWareHouse(row, idx) {
  898. const a = row.pathIds.split(',');
  899. const b = row.position.split('-');
  900. row.houseList = [
  901. {
  902. warehouseId: a[0],
  903. warehouseNam: b[0] + '-' + b[1],
  904. areaId: a[1],
  905. areaName: b[2],
  906. shelfId: a[2],
  907. shelfCode: b[3],
  908. cargoSpaceId: a[3],
  909. cargoSpaceCode: b[4],
  910. num: row.packingCount
  911. }
  912. ];
  913. this.$refs.wareHouseDailogRef.open(
  914. { ...row, outInNum: row.packingCount, warehouseId: a[0] },
  915. idx
  916. );
  917. },
  918. async handleSave() {
  919. this.saveLoading = true;
  920. if (this.detailList.length != 0) {
  921. let a = this.infoData;
  922. let array1 = this.warehousingMaterialList;
  923. let array2 = this.detailList.map((item) => {
  924. return { ...item, materialDetails: this.metailList };
  925. });
  926. // 遍历数组1
  927. array1.forEach((item1) => {
  928. item1.arr = [];
  929. item1.outInDetailRecordUpdatePOList = [];
  930. // 遍历数组2
  931. array2.forEach((item2) => {
  932. if (
  933. item1.id == item2.outInDetailId &&
  934. item1.batchNo == item2.batchNo &&
  935. item1.categoryCode == item2.categoryCode
  936. ) {
  937. // 判断id、batchNo、categoryId是否相等
  938. // 将数组2对象添加到数组1对象的outInDetailRecordVOList中
  939. item1.arr.push(item2);
  940. } else {
  941. console.log(item2);
  942. item1.outInDetailRecordUpdatePOList.push({ ...item2 });
  943. }
  944. });
  945. });
  946. array1.forEach((ele) => {
  947. if (ele.outInDetailRecordUpdatePOList.length == ele.arr.length) {
  948. delete ele.arr;
  949. } else {
  950. ele.outInDetailRecordUpdatePOList = ele.arr;
  951. delete ele.arr;
  952. }
  953. });
  954. array1.forEach((e) => {
  955. if (e.hasOwnProperty('houseList')) {
  956. e.houseList.forEach((item) => {
  957. e.position = `${item.warehouseName}-${item.areaName}-${item.shelfCode}-${item.cargoSpaceCode}`;
  958. e.pathIds = `${item.warehouseId},${item.areaId},${item.shelfId},${item.cargoSpaceId}`;
  959. });
  960. }
  961. });
  962. delete array1.houseList;
  963. a.outInDetailUpdatePOList = array1;
  964. a.extInfo = this.extInfo;
  965. const obj = this.formatUpdate(a);
  966. console.log('sss===》', obj);
  967. try {
  968. const data = await outin.update(obj);
  969. if (data.code == 0) {
  970. this.$message.success('修改成功!');
  971. this.$router.push('/warehouseManagement/stockManagement');
  972. }
  973. } catch (error) {
  974. this.saveLoading = false;
  975. }
  976. } else {
  977. this.$message.warning('包装明细为空!');
  978. }
  979. this.saveLoading = false;
  980. },
  981. formatUpdate(a) {
  982. delete a.outInDetailVOList;
  983. console.log(a);
  984. // 删除 outInDetailVOList 数组对象里面的 outInDetailRecordVOList 数组对象里面的 outInDetailRecordMaterialDetailVOList
  985. a.outInDetailUpdatePOList = a.outInDetailUpdatePOList.map((item) => {
  986. const newItem = { ...item };
  987. delete newItem.outInDetailRecordVOList;
  988. return newItem;
  989. });
  990. const newData = {
  991. ...a,
  992. outInDetailUpdatePOList: a.outInDetailUpdatePOList.map((detail) => {
  993. const { outInDetailRecordMaterialDetailVOList, ...rest } = detail;
  994. return {
  995. ...rest,
  996. outInDetailRecordUpdatePOList:
  997. rest.outInDetailRecordUpdatePOList.map((record) => {
  998. const {
  999. outInDetailRecordMaterialDetailVOList,
  1000. ...recordRest
  1001. } = record;
  1002. return { ...recordRest };
  1003. })
  1004. };
  1005. })
  1006. };
  1007. // 对原始数据进行深拷贝,以避免修改原始数据
  1008. const arr = JSON.parse(JSON.stringify(newData));
  1009. // 遍历 outInDetailUpdatePOList 数组
  1010. arr.outInDetailUpdatePOList.forEach((detail) => {
  1011. // 遍历 outInDetailRecordUpdatePOList 数组
  1012. detail.outInDetailRecordUpdatePOList.forEach((record) => {
  1013. // 筛选出与 code 相等的 materialDetails 项
  1014. const matchedDetails = record.materialDetails.filter(
  1015. (item) => item.onlyCode === record.code
  1016. );
  1017. // 将匹配项放入 materialDetails 数组中
  1018. record.materialDetails = matchedDetails;
  1019. });
  1020. });
  1021. return arr;
  1022. },
  1023. packNum(row, value) {
  1024. console.log(row);
  1025. const total = {
  1026. packingCount: Number(row.minPackingCount),
  1027. outInNum: Number(row.packingCount)
  1028. };
  1029. if (row.measuringUnit == row.weightUnit) {
  1030. row.weight = total.packingCount * 1 * total.outInNum.toFixed(2);
  1031. } else {
  1032. const totals = total.packingCount * total.outInNum;
  1033. row.weight = totals * row.netWeight.toFixed(2);
  1034. }
  1035. return (row.outInNum = value.replace(/^(0+)|[^\d]+/g, ''));
  1036. },
  1037. listEdit(row) {
  1038. this.$set(row, 'isSave', false);
  1039. //包装
  1040. const list = this.detailList;
  1041. for (let i = 0; i < list.length; i++) {
  1042. if (list[i].categoryCode === row.categoryCode) {
  1043. // 删除满足条件的对象
  1044. this.detailList.splice(i, 1);
  1045. // 因为删除了一个对象,需要将索引减1
  1046. i--;
  1047. }
  1048. }
  1049. //物料
  1050. const lists = this.metailList;
  1051. for (let i = 0; i < lists.length; i++) {
  1052. if (lists[i].assetCode === row.categoryCode) {
  1053. // 删除满足条件的对象
  1054. this.metailList.splice(i, 1);
  1055. // 因为删除了一个对象,需要将索引减1
  1056. i--;
  1057. }
  1058. }
  1059. },
  1060. listSave(row, index) {
  1061. console.log(row);
  1062. const fileds = [
  1063. // `warehousingMaterialList.${index}.batchNo`,
  1064. `warehousingMaterialList.${index}.position`
  1065. ];
  1066. console.log('==1', this.infoData.bizType);
  1067. if (this.infoData.bizType != 5) {
  1068. fileds.push(
  1069. ...[
  1070. // `warehousingMaterialList.${index}.packingCount`,
  1071. // `warehousingMaterialList.${index}.minPackingCount`
  1072. ]
  1073. );
  1074. } else if (
  1075. this.warehousingMaterialList.some(
  1076. (i) => !i.outInDetailRecordVOList?.length
  1077. )
  1078. ) {
  1079. this.$message.error('请选择资产编号!');
  1080. return;
  1081. }
  1082. Promise.all(
  1083. fileds.map(
  1084. (item) =>
  1085. new Promise(async (resolve, rej) => {
  1086. this.$refs.warehousingMaterialListRef.validateField(
  1087. item,
  1088. (err) => {
  1089. if (err) {
  1090. rej(err);
  1091. } else {
  1092. resolve();
  1093. }
  1094. }
  1095. );
  1096. })
  1097. )
  1098. )
  1099. .then((res) => {
  1100. this.$set(row, 'isSave', true);
  1101. if (this.infoData.bizType != 5) {
  1102. this.createMaterialCode(row);
  1103. } else {
  1104. // 退还
  1105. // this.createMaterialCodeReturn(row);
  1106. }
  1107. })
  1108. .catch((err) => {
  1109. console.log(err);
  1110. this.$message.error('请填入必填项!');
  1111. });
  1112. },
  1113. async createMaterialCode(row) {
  1114. console.log('==--', row);
  1115. const {
  1116. packingCount,
  1117. minPackingCount,
  1118. weight,
  1119. outInDetailRecordVOList
  1120. } = row;
  1121. // console.log(row);
  1122. // if (row.houseList) {
  1123. // row.houseList.forEach((item) => {
  1124. // position = `${item.warehouseName}-${item.areaName}-${item.shelfCode}-${item.cargoSpaceCode}`;
  1125. // pathIds = `${item.warehouseId},${item.areaId},${item.shelfId},${item.cargoSpaceId}`;
  1126. // });
  1127. // }
  1128. const codes = outInDetailRecordVOList[0].code;
  1129. const index = outInDetailRecordVOList[0].code.indexOf('636');
  1130. const result = codes.slice(-3);
  1131. const dataArray = [];
  1132. for (let i = 0; i < packingCount; i++) {
  1133. const newData = { ...row };
  1134. if (outInDetailRecordVOList.length != packingCount) {
  1135. newData.minPackingCount = row.minPackingCount;
  1136. newData.packingCount = 1;
  1137. newData.weight = weight / packingCount;
  1138. newData.weightUtil = row.weightUnit;
  1139. newData.outInDetailId = row.id;
  1140. } else {
  1141. newData.minPackingCount = row.minPackingCount;
  1142. newData.weight = weight / packingCount;
  1143. newData.packingCount = row.packingCount / packingCount;
  1144. newData.weightUtil = row.weightUnit;
  1145. newData.outInDetailId = row.id;
  1146. }
  1147. dataArray.push(newData);
  1148. }
  1149. for (let j = 0; j < dataArray.length; j++) {
  1150. const num = Number(result);
  1151. const nums = num + j;
  1152. const str = nums.toString().padStart(result.length, '0');
  1153. dataArray[j].code =
  1154. dataArray[j].categoryCode + dataArray[j].batchNo + str;
  1155. dataArray[j].isPack = true;
  1156. }
  1157. const list = JSON.parse(localStorage.getItem('exitList'));
  1158. dataArray.forEach((ele, index) => {
  1159. if (index < list.length) {
  1160. if (ele.code === list[index].code) {
  1161. ele.id = list[index].id;
  1162. } else {
  1163. ele.isPack = false;
  1164. ele.id = ''; // 当 code 不匹配时,将 id 设为空字符串
  1165. }
  1166. } else {
  1167. ele.isPack = false;
  1168. ele.id = ''; // 如果 index 超出了 list 的范围,将 id 设为空字符串
  1169. }
  1170. });
  1171. this.detailList = this.pacKUpdate(dataArray);
  1172. this.metailList = this.metailUpdate(dataArray);
  1173. // this.metailList = this.metaAdd(dataArray);
  1174. console.log('====>>>>>1', dataArray);
  1175. },
  1176. //包装修改
  1177. pacKUpdate(arr) {
  1178. for (const it of arr) {
  1179. for (const ti of it.outInDetailRecordVOList) {
  1180. if (ti.id == it.id) {
  1181. it.materielCode = ti.materielCode;
  1182. it.clientCode = ti.clientCode;
  1183. it.result = ti.result;
  1184. it.status = ti.status;
  1185. }
  1186. }
  1187. }
  1188. return arr;
  1189. },
  1190. //物料新增
  1191. metaAdd(arr) {
  1192. const list = arr;
  1193. let resultArray = [];
  1194. list.forEach((item) => {
  1195. for (let i = 1; i <= Number(item.minPackingCount); i++) {
  1196. resultArray.push({
  1197. onlyCode: item.code,
  1198. no: item.code + i.toString().padStart(4, '0'),
  1199. assetCode: item.categoryCode,
  1200. assetName: item.name,
  1201. batchNo: item.batchNo,
  1202. minPackingCount: 1,
  1203. measuringUnit: item.measuringUnit,
  1204. materielCode: item.materielCode,
  1205. clientCode: item.clientCode,
  1206. weight: item.weight / Number(item.minPackingCount),
  1207. weightUnit: item.weightUnit,
  1208. engrave: item.engrave,
  1209. result: item.result,
  1210. status: item.status
  1211. });
  1212. }
  1213. });
  1214. return resultArray;
  1215. // console.log('物料', resultArray);
  1216. },
  1217. //物料修改
  1218. metailUpdate(arr) {
  1219. console.log('---', arr);
  1220. const extractedArray = [];
  1221. arr.forEach((item) => {
  1222. item.outInDetailRecordVOList.forEach((record) => {
  1223. extractedArray.push(
  1224. ...record.outInDetailRecordMaterialDetailVOList
  1225. );
  1226. });
  1227. });
  1228. // 用于存储已经遇到的ID
  1229. let idMap = {};
  1230. // 用于存储结果的数组
  1231. let uniqueArray = [];
  1232. // 遍历原始数据
  1233. for (let i = 0; i < extractedArray.length; i++) {
  1234. let currentItem = extractedArray[i];
  1235. // 检查当前ID是否已经在map中存在
  1236. if (!idMap[currentItem.id]) {
  1237. // 如果ID不存在,将当前ID添加到map中,并将当前数据添加到结果数组中
  1238. idMap[currentItem.id] = true;
  1239. uniqueArray.push(currentItem);
  1240. }
  1241. }
  1242. return uniqueArray;
  1243. },
  1244. //计算金额
  1245. calcSumTotal(PackingCount, outInNum, univalence) {
  1246. //最小包装单元,包装数量,单价
  1247. const total = {
  1248. PackingCount: Number(PackingCount),
  1249. outInNum: Number(outInNum),
  1250. univalence: Number(univalence == undefined ? 0 : univalence)
  1251. };
  1252. return total.PackingCount * total.outInNum * total.univalence;
  1253. },
  1254. ...mapActions('dict', ['requestDict']),
  1255. getAuditStatus: useDictLabel(auditStatus),
  1256. getMaterialType: useDictLabel(materialType),
  1257. getInputStatus: useDictLabel(inputStatus),
  1258. getSceneState: useDictLabel(sceneState),
  1259. handleRowUnit(row) {
  1260. return row.measuringUnit;
  1261. // if (this.extInfo.assetType == 1) {
  1262. // console.log(row);
  1263. // return row.weightUnit;
  1264. // } else if (this.extInfo.assetType == 4) {
  1265. // return row.measuringUnit;
  1266. // } else {
  1267. // return row.measuringUnit;
  1268. // }
  1269. },
  1270. handleAssetType(r) {
  1271. const code = this.codeList.find((item) => item.dictCode == r);
  1272. return code?.dictValue;
  1273. },
  1274. rowClass({ row, column, rowIndex, columnIndex }) {
  1275. if (rowIndex === 1) {
  1276. return {
  1277. display: 'none',
  1278. background: '#EEEEEE',
  1279. border: 'none'
  1280. };
  1281. }
  1282. return { background: '#EEEEEE', border: 'none' };
  1283. },
  1284. async _getInfo() {
  1285. const res = await outin.getById(this.$route.query.id);
  1286. console.log('===', res);
  1287. if (res) {
  1288. this.infoData = res;
  1289. this.extInfo = res.extInfo;
  1290. this.warehousingMaterialList = res.outInDetailVOList.map((item) => {
  1291. return { ...item, isSave: true };
  1292. });
  1293. const arr = [];
  1294. for (const key in this.warehousingMaterialList) {
  1295. for (const k in this.warehousingMaterialList[key]
  1296. .outInDetailRecordVOList) {
  1297. arr.push({
  1298. ...this.warehousingMaterialList[key].outInDetailRecordVOList[k],
  1299. weightUnit: this.warehousingMaterialList[key].weightUnit
  1300. });
  1301. }
  1302. }
  1303. this.exitList = arr;
  1304. localStorage.setItem('exitList', JSON.stringify(arr));
  1305. this.dateTypes = arr[0].dateType;
  1306. this.detailList = arr.map((item) => {
  1307. return { ...item, isPack: true };
  1308. });
  1309. let iArr = [];
  1310. arr.forEach((item) => {
  1311. item.outInDetailRecordMaterialDetailVOList.forEach((ele) => {
  1312. iArr.push({ ...ele });
  1313. });
  1314. });
  1315. this.metailList = iArr;
  1316. }
  1317. const { data } = await getTreeByPid(0);
  1318. this.codeList = data.map((item) => {
  1319. return { dictCode: item.id, dictValue: item.name };
  1320. });
  1321. },
  1322. calcSum(a, b, c, row) {
  1323. if (
  1324. (Number.isNaN(+a) && a !== '') ||
  1325. (Number.isNaN(+b) && b !== '') ||
  1326. (Number.isNaN(+c) && c !== '')
  1327. ) {
  1328. return '';
  1329. }
  1330. return a * b * c + { yuan: '元', wanyuan: '万元' }[row.univalenceUnit];
  1331. },
  1332. contentImageDownload(item) {
  1333. fileSystemDownload(item);
  1334. },
  1335. selectActive(num) {
  1336. this.num = num;
  1337. }
  1338. }
  1339. };
  1340. </script>
  1341. <style lang="scss" scoped>
  1342. ::v-deep .page-title {
  1343. border-bottom: none;
  1344. }
  1345. ::v-deep .page-title-div {
  1346. width: 100%;
  1347. }
  1348. .stepsStatus {
  1349. width: 40%;
  1350. margin: 0 auto;
  1351. }
  1352. .el-form-item {
  1353. margin-bottom: 10px;
  1354. }
  1355. .p20 {
  1356. padding: 20px;
  1357. }
  1358. .flex {
  1359. display: flex;
  1360. }
  1361. .title {
  1362. justify-content: space-between;
  1363. border-bottom: 1px solid #ccc;
  1364. padding-bottom: 5px;
  1365. span {
  1366. font-size: 16px;
  1367. }
  1368. .col {
  1369. padding-left: 40px;
  1370. font-size: 14px;
  1371. color: #aaaaaa;
  1372. }
  1373. }
  1374. .degree {
  1375. margin-right: 10px;
  1376. padding: 0px 15px;
  1377. color: #fff;
  1378. font-size: 13px;
  1379. line-height: 23px;
  1380. border-radius: 23px;
  1381. display: flex;
  1382. align-items: center;
  1383. justify-content: space-between;
  1384. span {
  1385. width: 5px;
  1386. height: 5px;
  1387. border-radius: 100%;
  1388. margin-right: 6px;
  1389. background-color: #fff;
  1390. }
  1391. }
  1392. .red {
  1393. background-color: rgb(163, 0, 20);
  1394. }
  1395. .blue {
  1396. background-color: #1989fa;
  1397. }
  1398. .createdInfo {
  1399. justify-content: space-around;
  1400. margin-top: 10px;
  1401. font-size: 14px;
  1402. .col {
  1403. color: #6e6e6e;
  1404. padding-right: 10px;
  1405. }
  1406. }
  1407. .mt40 {
  1408. margin-top: 40px;
  1409. }
  1410. .custSteps {
  1411. margin-top: 20px;
  1412. margin-left: 70px;
  1413. .box {
  1414. width: 158px;
  1415. border: 1px solid #ccc;
  1416. padding: 10px;
  1417. flex-direction: row;
  1418. flex-wrap: wrap;
  1419. // justify-content: space-between;
  1420. font-size: 12px;
  1421. color: #9e9e9e;
  1422. .x {
  1423. width: 20px;
  1424. height: 15px;
  1425. margin-right: 5px;
  1426. }
  1427. .q {
  1428. background-color: #d0e4d5;
  1429. }
  1430. .b {
  1431. background-color: #1989fa;
  1432. }
  1433. .g {
  1434. background-color: #157a2c;
  1435. }
  1436. .r {
  1437. background-color: #a30014;
  1438. }
  1439. .a {
  1440. align-items: center;
  1441. margin-bottom: 10px;
  1442. }
  1443. .mr10 {
  1444. margin-right: 10px;
  1445. }
  1446. .mb0 {
  1447. margin-bottom: 0;
  1448. }
  1449. }
  1450. .stepsInfo {
  1451. // flex: 1;
  1452. width: 483px;
  1453. }
  1454. }
  1455. .mt20 {
  1456. margin-top: 20px;
  1457. }
  1458. .content-detail {
  1459. overflow: hidden;
  1460. }
  1461. .executor {
  1462. font-size: 14px;
  1463. .col {
  1464. color: #6e6e6e;
  1465. padding-right: 10px;
  1466. }
  1467. }
  1468. .result {
  1469. justify-content: space-around;
  1470. }
  1471. .mr20 {
  1472. margin-right: 20px;
  1473. }
  1474. .details {
  1475. font-size: 14px;
  1476. margin-bottom: 10px;
  1477. }
  1478. .customSteps {
  1479. margin-top: 40px;
  1480. font-size: 14px;
  1481. margin-left: 80px;
  1482. .time {
  1483. font-size: 12px;
  1484. color: #6e6e6e;
  1485. margin-right: 20px;
  1486. position: relative;
  1487. &::after {
  1488. content: '';
  1489. width: 1px;
  1490. height: 100%;
  1491. background-color: #157a2c;
  1492. position: absolute;
  1493. right: -26px;
  1494. }
  1495. }
  1496. .flex:last-child {
  1497. .time {
  1498. &::after {
  1499. display: none;
  1500. }
  1501. }
  1502. }
  1503. .round {
  1504. margin-right: 20px;
  1505. width: 10px;
  1506. height: 10px;
  1507. border-radius: 100%;
  1508. background-color: #157a2c;
  1509. position: relative;
  1510. span {
  1511. position: absolute;
  1512. top: 50%;
  1513. left: 50%;
  1514. width: 4px;
  1515. height: 4px;
  1516. background-color: #fff;
  1517. border-radius: 100%;
  1518. transform: translate(-2px, -2px);
  1519. }
  1520. }
  1521. .text {
  1522. .info {
  1523. margin-top: 10px;
  1524. width: 955px;
  1525. background-color: #f0f3f3;
  1526. overflow: hidden;
  1527. padding: 10px;
  1528. margin-bottom: 10px;
  1529. }
  1530. }
  1531. }
  1532. .switch_left li {
  1533. border-right: 1px solid rgba(222, 222, 222, 1);
  1534. border-left: 1px solid rgba(222, 222, 222, 1);
  1535. }
  1536. </style>