detailDialog.vue 14 KB

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