edit.vue 52 KB

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