receiptInfo.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526
  1. <template>
  2. <div class="ele-body">
  3. <!-- <el-card shadow="never"> -->
  4. <el-form ref="form" :model="form" label-width="130px">
  5. <!-- <headerTitle title="收货信息"></headerTitle> -->
  6. <el-row>
  7. <el-col :span="8">
  8. <el-form-item label="供应商名称:" prop="supplierName">
  9. {{ form.supplierName }}
  10. </el-form-item>
  11. </el-col>
  12. <el-col :span="8">
  13. <el-form-item label="供应商联系人:" prop="linkName">
  14. {{ form.linkName }}
  15. </el-form-item>
  16. </el-col>
  17. <el-col :span="8">
  18. <el-form-item label="供应商电话:" prop="linkPhone">
  19. {{ form.linkPhone }}
  20. </el-form-item>
  21. </el-col>
  22. <!-- <el-form-item
  23. label="客户地址:"
  24. prop="partaAddress"
  25. style="margin-bottom: 16px"
  26. >
  27. {{ form.receiveAddress }}
  28. </el-form-item> -->
  29. <el-col :span="8">
  30. <el-form-item label="车牌号:" prop="carNo">
  31. {{ form.carNo }}
  32. </el-form-item>
  33. </el-col>
  34. <el-col :span="8">
  35. <el-form-item prop="receiveDate" label="收货日期:">
  36. {{ form.receiveDate }}
  37. </el-form-item>
  38. </el-col>
  39. <el-col :span="8">
  40. <el-form-item label="收货单编码:" prop="receiveNo">
  41. {{ form.receiveNo }}
  42. </el-form-item>
  43. </el-col>
  44. <el-col :span="8">
  45. <el-form-item prop="orderNo" label="订单编码:">
  46. {{ form.orderNo }}
  47. </el-form-item>
  48. </el-col>
  49. <el-col :span="8">
  50. <el-form-item prop="outsourceSendCode" label="委外发货单编码:">
  51. {{ form.outsourceSendCode }}
  52. </el-form-item>
  53. </el-col>
  54. <!-- <el-col :span="8">
  55. <el-form-item prop="pricingWay" label="计价方式:">
  56. {{ form.pricingWay == 1 ? '按数量计费' : '按重量计费' }}
  57. </el-form-item>
  58. </el-col> -->
  59. <el-col :span="8">
  60. <el-form-item label="制单人:" prop="makerName">
  61. {{ form.makerName }}
  62. </el-form-item>
  63. </el-col>
  64. <el-col :span="8">
  65. <el-form-item label="审核状态:" prop="reviewStatus">
  66. {{ reviewStatusEnum[form.reviewStatus]?.label }}
  67. </el-form-item>
  68. </el-col>
  69. <el-col :span="8">
  70. <el-form-item label="附件:" prop="receiveFiles">
  71. <fileMain v-model="form.receiveFiles" type="view"></fileMain>
  72. </el-form-item>
  73. </el-col>
  74. <!-- <el-form-item prop="replied" label="是否回执:">
  75. {{ form.replied == 1 ? '是' : '否' }}
  76. </el-form-item> -->
  77. </el-row>
  78. </el-form>
  79. <div class="fontSize" style="margin-bottom: 12px">物品清单</div>
  80. <ele-pro-table
  81. ref="table"
  82. :needPage="false"
  83. :columns="columns"
  84. :datasource="detailData.productList"
  85. :cache-key="cacheKeyUrl"
  86. @columns-change="handleColumnChange"
  87. row-key="id"
  88. max-height="500px"
  89. >
  90. <template v-slot:technicalDrawings="{ row }">
  91. <fileMain v-model="row.receiveFiles" type="view"></fileMain>
  92. </template>
  93. </ele-pro-table>
  94. <!-- </el-card> -->
  95. </div>
  96. </template>
  97. <script>
  98. import { reviewStatusEnum } from '@/enum/dict';
  99. import dictMixins from '@/mixins/dictMixins';
  100. import { lbjtList } from '@/enum/dict.js';
  101. import { levelList,pricingWayList } from '@/enum/dict.js';
  102. import { parameterGetByCode } from '@/api/main/index.js';
  103. import tabMixins from '@/mixins/tableColumnsMixin';
  104. // import fileMain from '@/components/addDoc/index.vue';
  105. export default {
  106. // components: { fileMain },
  107. mixins: [dictMixins, tabMixins],
  108. props: {
  109. form: { type: Object, default: () => {} },
  110. detailData: { type: Object, default: () => {} },
  111. taskDefinitionKey: { type: String, default: '' }
  112. },
  113. data() {
  114. return {
  115. cacheKeyUrl: '202605141437-receiptInfoTableColumns',
  116. reviewStatusEnum,
  117. isHidePrice: 0
  118. };
  119. },
  120. computed: {
  121. columns() {
  122. const tempList = [
  123. {
  124. width: 160,
  125. prop: 'singlePrice',
  126. label: '单价',
  127. slot: 'singlePrice',
  128. align: 'center'
  129. },
  130. {
  131. width: 150,
  132. prop: 'notaxSinglePrice',
  133. label: '不含税单价',
  134. align: 'center'
  135. },
  136. {
  137. width: 160,
  138. prop: 'discountSinglePrice',
  139. label: '折后单价',
  140. slot: 'discountSinglePrice',
  141. align: 'center'
  142. },
  143. {
  144. width: 120,
  145. prop: 'totalPrice',
  146. label: '合计',
  147. slot: 'totalPrice',
  148. align: 'center'
  149. },
  150. {
  151. width: 160,
  152. prop: 'discountTotalPrice',
  153. label: '折后合计',
  154. slot: 'discountTotalPrice',
  155. align: 'center'
  156. },
  157. ]
  158. const list = [
  159. {
  160. width: 45,
  161. type: 'index',
  162. columnKey: 'index',
  163. align: 'center',
  164. fixed: 'left'
  165. },
  166. {
  167. width: 200,
  168. prop: 'productName',
  169. label: '名称',
  170. slot: 'productName',
  171. align: 'center'
  172. },
  173. {
  174. width: 120,
  175. prop: 'productCode',
  176. label: '编码',
  177. slot: 'productCode',
  178. align: 'center'
  179. },
  180. {
  181. width: 200,
  182. prop: 'productCategoryName',
  183. label: '类型',
  184. slot: 'productCategoryName',
  185. align: 'center'
  186. },
  187. {
  188. width: 110,
  189. prop: 'batchNo',
  190. label: '批次号',
  191. align: 'center'
  192. },
  193. {
  194. width: 160,
  195. prop: 'productBrand',
  196. label: '牌号',
  197. slot: 'productBrand',
  198. align: 'center'
  199. },
  200. {
  201. width: 120,
  202. prop: 'modelType',
  203. label: '型号',
  204. slot: 'modelType',
  205. align: 'center'
  206. },
  207. {
  208. width: 120,
  209. prop: 'produceType',
  210. align: 'center',
  211. label: '属性类型',
  212. showOverflowTooltip: true,
  213. formatter: (row, column) => {
  214. if (row.produceType) {
  215. return row.produceType
  216. .map((item) => {
  217. return lbjtList[item];
  218. })
  219. .toString();
  220. }
  221. }
  222. },
  223. {
  224. width: 120,
  225. prop: 'packingSpecification',
  226. align: 'center',
  227. label: '包装规格',
  228. showOverflowTooltip: true
  229. },
  230. {
  231. width: 120,
  232. prop: 'supplierMark',
  233. label: '供应商代号',
  234. slot: 'supplierMark',
  235. align: 'center'
  236. },
  237. {
  238. width: 120,
  239. prop: 'specification',
  240. label: '规格',
  241. slot: 'specification',
  242. align: 'center'
  243. },
  244. {
  245. width: 200,
  246. prop: 'warehouseName',
  247. label: '仓库名称',
  248. slot: 'warehouseName',
  249. align: 'center'
  250. },
  251. {
  252. width: 150,
  253. prop: 'purchaseCount',
  254. label: '收货数量',
  255. formatter: (row, column) => {
  256. if (row.purchaseCount) {
  257. return row.purchaseCount + ' ' + row.purchaseUnit;
  258. }
  259. },
  260. headerSlot: 'headerTotalCount',
  261. align: 'center'
  262. },
  263. // {
  264. // width: 150,
  265. // prop: 'purchaseUnit',
  266. // label: '单位',
  267. // slot: 'purchaseUnit',
  268. // headerSlot: 'headerTotalCount',
  269. // align: 'center'
  270. // },
  271. // {
  272. // width: 120,
  273. // prop: 'packingSpecification',
  274. // align: 'center',
  275. // label: '包装规格',
  276. // showOverflowTooltip: true
  277. // },
  278. {
  279. width: 80,
  280. prop: 'totalCount',
  281. label: '计量数量',
  282. formatter: (row, column) => {
  283. if (row.totalCount) {
  284. return row.totalCount + ' ' + row.measuringUnit;
  285. }
  286. },
  287. align: 'center'
  288. },
  289. // {
  290. // width: 120,
  291. // prop: 'orderTotalCount',
  292. // label: '总数量',
  293. // formatter: (row, column) => {
  294. // if (row.orderTotalCount) {
  295. // return row.orderTotalCount + ' ' + row.measuringUnit;
  296. // }
  297. // },
  298. // align: 'center'
  299. // },
  300. {
  301. minWidth: 120,
  302. prop: 'taskName',
  303. label: '工序',
  304. slot: 'taskName',
  305. align: 'center'
  306. },
  307. // {
  308. // width: 80,
  309. // prop: 'measuringUnit',
  310. // label: '计量单位',
  311. // slot: 'measuringUnit',
  312. // align: 'center'
  313. // },
  314. {
  315. width: 120,
  316. prop: 'singleWeight',
  317. label: '单重',
  318. formatter: (row, column) => {
  319. if (row.singleWeight) {
  320. return row.singleWeight + ' ' + row.weightUnit;
  321. }
  322. },
  323. align: 'center'
  324. },
  325. {
  326. width: 200,
  327. prop: 'sendTotalWeight',
  328. label: '发货总重',
  329. formatter: (row, column) => {
  330. if (row.sendTotalWeight) {
  331. return row.sendTotalWeight + ' ' + row.weightUnit;
  332. }
  333. },
  334. align: 'center',
  335. headerSlot: 'headerTotalCount'
  336. },
  337. {
  338. width: 100,
  339. prop: 'receiveTotalWeight',
  340. label: '收货总重',
  341. formatter: (row, column) => {
  342. if (row.receiveTotalWeight) {
  343. return row.receiveTotalWeight + ' ' + row.weightUnit;
  344. }
  345. },
  346. align: 'center'
  347. },
  348. {
  349. width: 100,
  350. prop: 'increaseTotalWeight',
  351. label: '增重重量',
  352. formatter: (row, column) => {
  353. if (row.increaseTotalWeight) {
  354. return row.increaseTotalWeight + ' ' + row.weightUnit;
  355. }
  356. },
  357. align: 'center'
  358. },
  359. // {
  360. // width: 100,
  361. // prop: 'weightUnit',
  362. // label: '重量单位',
  363. // slot: 'weightUnit',
  364. // align: 'center'
  365. // },
  366. {
  367. width: 140,
  368. prop: 'pricingWay',
  369. label: '计价方式',
  370. align: 'center',
  371. fixed: 'left',
  372. formatter: (row, column) => {
  373. return pricingWayList.find((item) => item.id == row.pricingWay)
  374. ?.name;
  375. }
  376. },
  377. {
  378. minWidth: 120,
  379. prop: 'goodsLevel',
  380. label: '物品级别',
  381. formatter: (_row, _column, cellValue) => {
  382. return levelList.find((item) => item.value == _row.goodsLevel)
  383. ?.label;
  384. },
  385. align: 'center'
  386. },
  387. {
  388. width: 120,
  389. prop: 'taxRate',
  390. label: '税率',
  391. formatter: (_row, _column, cellValue) => {
  392. return _row.taxRate ? _row.taxRate + '%' : '';
  393. },
  394. align: 'center'
  395. },
  396. {
  397. prop: 'provenance',
  398. label: '产地',
  399. slot: 'provenance',
  400. align: 'center',
  401. minWidth: 200,
  402. showOverflowTooltip: true,
  403. formatter: (row, column) => {
  404. return row.provenance && row.provenance.length
  405. ? row.provenance
  406. .map((item) => this.getDictValue('产地', item))
  407. .join(',')
  408. : '';
  409. }
  410. },
  411. {
  412. minWidth: 120,
  413. prop: 'modelKey',
  414. label: '机型',
  415. showOverflowTooltip: true,
  416. align: 'center'
  417. },
  418. {
  419. minWidth: 120,
  420. prop: 'colorKey',
  421. showOverflowTooltip: true,
  422. label: '颜色',
  423. align: 'center'
  424. },
  425. {
  426. prop: 'productionDate',
  427. label: '生产日期',
  428. slot: 'productionDate',
  429. align: 'center',
  430. showOverflowTooltip: true,
  431. minWidth: 200
  432. },
  433. {
  434. width: 160,
  435. prop: 'deliveryDeadline',
  436. label: '交期截止日期',
  437. slot: 'deliveryDeadline',
  438. align: 'center'
  439. },
  440. {
  441. width: 200,
  442. prop: 'guaranteePeriod',
  443. label: '有效期',
  444. slot: 'guaranteePeriod',
  445. align: 'center',
  446. formatter: (_row, _column, cellValue) => {
  447. return (
  448. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  449. );
  450. }
  451. },
  452. {
  453. width: 160,
  454. prop: 'guaranteePeriodDeadline',
  455. label: '有效期截止日期',
  456. slot: 'guaranteePeriodDeadline',
  457. align: 'center'
  458. },
  459. {
  460. width: 120,
  461. prop: 'isComeCheck',
  462. label: '是否来料检验',
  463. align: 'center',
  464. formatter: (_row, _column, cellValue) => {
  465. return _row.isComeCheck == 1 ? '是' : '否';
  466. }
  467. },
  468. {
  469. width: 130,
  470. prop: 'technicalAnswerName',
  471. label: '技术答疑人',
  472. slot: 'technicalAnswerName',
  473. align: 'center'
  474. },
  475. {
  476. width: 220,
  477. prop: 'technicalParams',
  478. label: '技术参数',
  479. slot: 'technicalParams',
  480. align: 'center'
  481. },
  482. {
  483. width: 240,
  484. prop: 'technicalDrawings',
  485. label: '技术图纸',
  486. slot: 'technicalDrawings',
  487. align: 'center'
  488. },
  489. {
  490. width: 220,
  491. prop: 'remark',
  492. label: '备注',
  493. slot: 'remark',
  494. align: 'center'
  495. }
  496. ]
  497. return this.taskDefinitionKey == 'storeManagerApprove' && this.isHidePrice == 0 ? list : [...list, ...tempList]
  498. }
  499. },
  500. created() {
  501. console.log(this.detailData, 'detailData');
  502. this.requestDict('产地');
  503. this.requestDict('生产类型');
  504. //批次号是否必填//0否 1是
  505. parameterGetByCode({
  506. code: 'eom_purchase_invoice_approval_price'
  507. }).then((res) => {
  508. this.isHidePrice = res.value;
  509. });
  510. },
  511. methods: {}
  512. };
  513. </script>
  514. <style scoped lang="scss">
  515. .fontSize {
  516. font-size: 14px;
  517. font-weight: bold;
  518. }
  519. </style>