detailDialog.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. <template>
  2. <div class="ele-body">
  3. <el-form ref="form" :model="form" label-width="130px">
  4. <headerTitle title="基本信息"></headerTitle>
  5. <el-row :gutter="24">
  6. <el-col :span="8">
  7. <el-form-item
  8. label="委外发货单编码:"
  9. prop="code"
  10. >
  11. {{ form.code }}
  12. </el-form-item>
  13. </el-col>
  14. <el-col :span="8">
  15. <el-form-item
  16. label="采购订单编码:"
  17. prop="orderNo"
  18. >
  19. {{ form.orderNo }}
  20. </el-form-item>
  21. </el-col>
  22. <el-col :span="8">
  23. <el-form-item
  24. label="外协单位:"
  25. prop="contactName"
  26. >
  27. {{ form.supplierName }}
  28. </el-form-item>
  29. </el-col>
  30. </el-row>
  31. <el-row :gutter="24">
  32. <el-col :span="8">
  33. <el-form-item
  34. label="外协单位联系人:"
  35. prop="linkName"
  36. >
  37. {{ form.linkName }}
  38. </el-form-item>
  39. </el-col>
  40. <el-col :span="8">
  41. <el-form-item
  42. label="外协单位电话:"
  43. prop="linkPhone"
  44. >
  45. {{ form.linkPhone }}
  46. </el-form-item>
  47. </el-col>
  48. <el-col :span="8">
  49. <el-form-item
  50. label="发货日期:"
  51. prop="sendDate"
  52. >
  53. {{ form.sendDate }}
  54. </el-form-item>
  55. </el-col>
  56. </el-row>
  57. <el-row :gutter="24">
  58. <el-col :span="8">
  59. <el-form-item
  60. label="发货单号:"
  61. prop="sendNoteNo"
  62. >
  63. {{ form.sendNoteNo }}
  64. </el-form-item>
  65. </el-col>
  66. <el-col :span="8">
  67. <el-form-item
  68. label="订单类型:"
  69. prop="sourceTypeName"
  70. >
  71. {{ form.sourceTypeName }}
  72. </el-form-item>
  73. </el-col>
  74. <el-col :span="8">
  75. <el-form-item
  76. label="车辆号:"
  77. prop="carNo"
  78. >
  79. {{ form.carNo }}
  80. </el-form-item>
  81. </el-col>
  82. <el-col :span="12">
  83. <el-form-item prop="files" label="附件:">
  84. <fileMain v-model="form.files" type="view"></fileMain>
  85. <!-- <div v-if="form.files && form.files?.length">-->
  86. <!-- <el-link-->
  87. <!-- v-for="link in form.files"-->
  88. <!-- :key="link.id"-->
  89. <!-- type="primary"-->
  90. <!-- :underline="false"-->
  91. <!-- @click="downloadFile(link)"-->
  92. <!-- >-->
  93. <!-- {{ link.name }}-->
  94. <!-- </el-link>-->
  95. <!-- </div>-->
  96. </el-form-item>
  97. </el-col>
  98. <el-col :span="12"> </el-col>
  99. </el-row>
  100. </el-form>
  101. <headerTitle title="物品清单"></headerTitle>
  102. <ele-pro-table
  103. ref="table"
  104. :needPage="false"
  105. :columns="competAnalysisListcolumns"
  106. :toolkit="[]"
  107. :datasource="detailData.productList"
  108. row-key="id"
  109. >
  110. <!-- <template v-slot:toolbar>
  111. <div class="headbox">
  112. <span class="amount">总计:{{detailData.totalAmount}}元</span>
  113. <span class="amount">应付金额:{{detailData.payAmount}}元</span>
  114. </div>
  115. </template> -->
  116. <template v-slot:technicalDrawings="{ row }">
  117. <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
  118. </template>
  119. </ele-pro-table>
  120. </div>
  121. </template>
  122. <script>
  123. import { getFile } from '@/api/system/file';
  124. import { getPurchaseOutSourceSendDetailAPI } from '@/api/bpm/components/purchasingManage/outSourceSend';
  125. import fileMain from '@/components/addDoc/index.vue';
  126. import { mapActions } from 'vuex';
  127. import dictMixins from '@/mixins/dictMixins';
  128. export default {
  129. components: { fileMain },
  130. mixins: [dictMixins],
  131. props: {
  132. businessId: {
  133. default: ''
  134. }
  135. },
  136. data() {
  137. return {
  138. detailId: '',
  139. form: {},
  140. detailData: {},
  141. competAnalysisListcolumns: [
  142. {
  143. width: 45,
  144. type: 'index',
  145. columnKey: 'index',
  146. align: 'center',
  147. fixed: 'left'
  148. },
  149. {
  150. minWidth: 140,
  151. prop: 'productName',
  152. label: '名称',
  153. slot: 'productName',
  154. align: 'center'
  155. },
  156. {
  157. minWidth: 120,
  158. prop: 'productCode',
  159. label: '编码',
  160. slot: 'productCode',
  161. align: 'center'
  162. },
  163. {
  164. minWidth: 100,
  165. prop: 'productCategoryName',
  166. label: '类型',
  167. slot: 'productCategoryName',
  168. align: 'center'
  169. },
  170. {
  171. width: 160,
  172. prop: 'productBrand',
  173. label: '牌号',
  174. slot: 'productBrand',
  175. align: 'center'
  176. },
  177. {
  178. width: 120,
  179. prop: 'modelType',
  180. label: '型号',
  181. slot: 'modelType',
  182. align: 'center'
  183. },
  184. {
  185. width: 120,
  186. prop: 'specification',
  187. label: '规格',
  188. slot: 'specification',
  189. align: 'center'
  190. },
  191. {
  192. width: 120,
  193. prop: 'imgCode',
  194. align: 'center',
  195. label: '图号/件号',
  196. showOverflowTooltip: true
  197. },
  198. {
  199. width: 120,
  200. prop: 'produceType',
  201. align: 'center',
  202. label: '属性类型',
  203. showOverflowTooltip: true,
  204. formatter: (row, column) => {
  205. return row.produceType && row.produceType.length
  206. ? row.produceType
  207. .map((item) => this.getDictValue('生产类型', item))
  208. .join(',')
  209. : '';
  210. }
  211. },
  212. {
  213. width: 120,
  214. prop: 'packingSpecification',
  215. align: 'center',
  216. label: '包装规格',
  217. showOverflowTooltip: true
  218. },
  219. {
  220. width: 200,
  221. prop: 'supplierMark',
  222. label: '客户代号',
  223. slot: 'supplierMark',
  224. align: 'center'
  225. },
  226. {
  227. width: 200,
  228. prop: 'warehouseName',
  229. label: '仓库名称',
  230. slot: 'warehouseName',
  231. align: 'center'
  232. },
  233. {
  234. width: 120,
  235. prop: 'totalCount',
  236. label: '发货数量',
  237. slot: 'totalCount',
  238. align: 'center'
  239. },
  240. {
  241. width: 120,
  242. prop: 'measuringUnit',
  243. label: '计量单位',
  244. slot: 'measuringUnit',
  245. align: 'center'
  246. },
  247. {
  248. width: 120,
  249. prop: 'singleWeight',
  250. label: '单重',
  251. slot: 'singleWeight',
  252. align: 'center'
  253. },
  254. {
  255. width: 100,
  256. prop: 'sendTotalWeight',
  257. label: '发货总重',
  258. slot: 'sendTotalWeight',
  259. align: 'center'
  260. },
  261. {
  262. width: 100,
  263. prop: 'weightUnit',
  264. label: '重量单位',
  265. slot: 'weightUnit',
  266. align: 'center'
  267. },
  268. {
  269. width: 160,
  270. prop: 'pricingWay',
  271. label: '计价方式',
  272. slot: 'pricingWay',
  273. align: 'center',
  274. formatter: (row, column) => {
  275. return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
  276. }
  277. },
  278. {
  279. width: 160,
  280. prop: 'singlePrice',
  281. label: '单价',
  282. slot: 'singlePrice',
  283. align: 'center'
  284. },
  285. {
  286. width: 120,
  287. prop: 'taxRate',
  288. label: '税率',
  289. formatter: (_row, _column, cellValue) => {
  290. return _row.taxRate
  291. ? _row.taxRate+'%'
  292. : '';
  293. },
  294. align: 'center',
  295. show: !this.detailType
  296. },
  297. {
  298. width: 100,
  299. prop: 'discountSinglePrice',
  300. label: '折让单价',
  301. slot: 'discountSinglePrice',
  302. align: 'center'
  303. },
  304. {
  305. width: 120,
  306. prop: 'totalPrice',
  307. label: '合计',
  308. slot: 'totalPrice',
  309. formatter: (_row, _column, cellValue) => {
  310. return _row.totalPrice + '元';
  311. },
  312. align: 'center'
  313. },
  314. {
  315. width: 100,
  316. prop: 'discountTotalPrice',
  317. label: '折让合计',
  318. slot: 'discountTotalPrice',
  319. align: 'center'
  320. },
  321. {
  322. prop: 'provenance',
  323. label: '产地',
  324. slot: 'provenance',
  325. align: 'center',
  326. minWidth: 200,
  327. showOverflowTooltip: true,
  328. formatter: (row, column) => {
  329. return row.provenance && row.provenance.length
  330. ? row.provenance
  331. .map((item) => this.getDictValue('产地', item))
  332. .join(',')
  333. : '';
  334. }
  335. },
  336. // {
  337. // width: 120,
  338. // prop: 'deliveryDays',
  339. // label: '交期(天)',
  340. // slot: 'deliveryDays',
  341. // align: 'center'
  342. // },
  343. {
  344. width: 200,
  345. prop: 'guaranteePeriod',
  346. label: '质保期',
  347. slot: 'guaranteePeriod',
  348. formatter: (_row, _column, cellValue) => {
  349. return (
  350. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  351. );
  352. },
  353. align: 'center'
  354. },
  355. // {
  356. // width: 120,
  357. // prop: 'guaranteePeriodUnitCode',
  358. // label: '',
  359. // slot: 'guaranteePeriodUnitCode'
  360. // },
  361. {
  362. width: 120,
  363. prop: 'technicalAnswerName',
  364. label: '技术答疑人',
  365. slot: 'technicalAnswerName',
  366. align: 'center'
  367. },
  368. {
  369. width: 220,
  370. prop: 'technicalParams',
  371. label: '技术参数',
  372. slot: 'technicalParams',
  373. align: 'center'
  374. },
  375. {
  376. width: 240,
  377. prop: 'technicalDrawings',
  378. label: '技术图纸',
  379. slot: 'technicalDrawings',
  380. align: 'center'
  381. },
  382. {
  383. width: 220,
  384. prop: 'remark',
  385. label: '备注',
  386. slot: 'remark',
  387. align: 'center'
  388. }
  389. ]
  390. };
  391. },
  392. created() {
  393. this.requestDict('产地');
  394. this.requestDict('生产类型');
  395. this.getDetailData(this.businessId);
  396. },
  397. methods: {
  398. ...mapActions('dict', ['requestDict']),
  399. downloadFile(file) {
  400. getFile({ objectName: file.storePath }, file.name);
  401. },
  402. async getDetailData(id) {
  403. this.loading = true;
  404. const data = await getPurchaseOutSourceSendDetailAPI(id);
  405. this.loading = false;
  406. if (data) {
  407. this.form = data;
  408. this.detailData = data;
  409. }
  410. },
  411. getTableValue() {
  412. return Promise.resolve(this.form);
  413. }
  414. }
  415. };
  416. </script>
  417. <style scoped lang="scss">
  418. .ele-dialog-form {
  419. .el-form-item {
  420. margin-bottom: 10px;
  421. }
  422. }
  423. .headbox {
  424. display: flex;
  425. justify-content: flex-start;
  426. align-items: center;
  427. .amount {
  428. font-size: 14px;
  429. font-weight: bold;
  430. margin-right: 20px;
  431. }
  432. }
  433. </style>