detailDialog.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  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. import {lbjtList } from '@/enum/dict.js';
  129. export default {
  130. components: { fileMain },
  131. mixins: [dictMixins],
  132. props: {
  133. businessId: {
  134. default: ''
  135. }
  136. },
  137. data() {
  138. return {
  139. detailId: '',
  140. form: {},
  141. detailData: {},
  142. competAnalysisListcolumns: [
  143. {
  144. width: 45,
  145. type: 'index',
  146. columnKey: 'index',
  147. align: 'center',
  148. fixed: 'left'
  149. },
  150. {
  151. minWidth: 140,
  152. prop: 'productName',
  153. label: '名称',
  154. slot: 'productName',
  155. align: 'center'
  156. },
  157. {
  158. minWidth: 120,
  159. prop: 'productCode',
  160. label: '编码',
  161. slot: 'productCode',
  162. align: 'center'
  163. },
  164. {
  165. minWidth: 100,
  166. prop: 'productCategoryName',
  167. label: '类型',
  168. slot: 'productCategoryName',
  169. align: 'center'
  170. },
  171. {
  172. width: 160,
  173. prop: 'productBrand',
  174. label: '牌号',
  175. slot: 'productBrand',
  176. align: 'center'
  177. },
  178. {
  179. width: 120,
  180. prop: 'modelType',
  181. label: '型号',
  182. slot: 'modelType',
  183. align: 'center'
  184. },
  185. {
  186. width: 120,
  187. prop: 'specification',
  188. label: '规格',
  189. slot: 'specification',
  190. align: 'center'
  191. },
  192. {
  193. width: 120,
  194. prop: 'imgCode',
  195. align: 'center',
  196. label: '图号/件号',
  197. showOverflowTooltip: true
  198. },
  199. {
  200. width: 120,
  201. prop: 'produceType',
  202. align: 'center',
  203. label: '属性类型',
  204. showOverflowTooltip: true,
  205. formatter: (row, column) => {
  206. if(row.produceType){
  207. return row.produceType.map(item=>{
  208. return lbjtList[item]
  209. }).toString()
  210. }
  211. }
  212. },
  213. {
  214. width: 120,
  215. prop: 'packingSpecification',
  216. align: 'center',
  217. label: '包装规格',
  218. showOverflowTooltip: true
  219. },
  220. {
  221. width: 200,
  222. prop: 'supplierMark',
  223. label: '客户代号',
  224. slot: 'supplierMark',
  225. align: 'center'
  226. },
  227. {
  228. width: 200,
  229. prop: 'warehouseName',
  230. label: '仓库名称',
  231. slot: 'warehouseName',
  232. align: 'center'
  233. },
  234. {
  235. width: 120,
  236. prop: 'totalCount',
  237. label: '发货数量',
  238. slot: 'totalCount',
  239. align: 'center'
  240. },
  241. {
  242. minWidth: 150,
  243. prop: 'taskName',
  244. label: '工序',
  245. slot: 'taskName',
  246. align: 'center'
  247. },
  248. {
  249. width: 120,
  250. prop: 'measuringUnit',
  251. label: '计量单位',
  252. slot: 'measuringUnit',
  253. align: 'center'
  254. },
  255. {
  256. width: 120,
  257. prop: 'singleWeight',
  258. label: '单重',
  259. slot: 'singleWeight',
  260. align: 'center'
  261. },
  262. {
  263. width: 100,
  264. prop: 'sendTotalWeight',
  265. label: '发货总重',
  266. slot: 'sendTotalWeight',
  267. align: 'center'
  268. },
  269. {
  270. width: 100,
  271. prop: 'weightUnit',
  272. label: '重量单位',
  273. slot: 'weightUnit',
  274. align: 'center'
  275. },
  276. {
  277. width: 160,
  278. prop: 'pricingWay',
  279. label: '计价方式',
  280. slot: 'pricingWay',
  281. align: 'center',
  282. formatter: (row, column) => {
  283. return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
  284. }
  285. },
  286. {
  287. width: 160,
  288. prop: 'singlePrice',
  289. label: '单价',
  290. slot: 'singlePrice',
  291. align: 'center'
  292. },
  293. {
  294. width: 120,
  295. prop: 'taxRate',
  296. label: '税率',
  297. formatter: (_row, _column, cellValue) => {
  298. return _row.taxRate
  299. ? _row.taxRate+'%'
  300. : '';
  301. },
  302. align: 'center',
  303. show: !this.detailType
  304. },
  305. {
  306. width: 100,
  307. prop: 'discountSinglePrice',
  308. label: '折让单价',
  309. slot: 'discountSinglePrice',
  310. align: 'center'
  311. },
  312. {
  313. width: 120,
  314. prop: 'totalPrice',
  315. label: '合计',
  316. slot: 'totalPrice',
  317. formatter: (_row, _column, cellValue) => {
  318. return _row.totalPrice + '元';
  319. },
  320. align: 'center'
  321. },
  322. {
  323. width: 100,
  324. prop: 'discountTotalPrice',
  325. label: '折让合计',
  326. slot: 'discountTotalPrice',
  327. align: 'center'
  328. },
  329. {
  330. prop: 'provenance',
  331. label: '产地',
  332. slot: 'provenance',
  333. align: 'center',
  334. minWidth: 200,
  335. showOverflowTooltip: true,
  336. formatter: (row, column) => {
  337. return row.provenance && row.provenance.length
  338. ? row.provenance
  339. .map((item) => this.getDictValue('产地', item))
  340. .join(',')
  341. : '';
  342. }
  343. },
  344. // {
  345. // width: 120,
  346. // prop: 'deliveryDays',
  347. // label: '交期(天)',
  348. // slot: 'deliveryDays',
  349. // align: 'center'
  350. // },
  351. {
  352. width: 200,
  353. prop: 'guaranteePeriod',
  354. label: '质保期',
  355. slot: 'guaranteePeriod',
  356. formatter: (_row, _column, cellValue) => {
  357. return (
  358. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  359. );
  360. },
  361. align: 'center'
  362. },
  363. // {
  364. // width: 120,
  365. // prop: 'guaranteePeriodUnitCode',
  366. // label: '',
  367. // slot: 'guaranteePeriodUnitCode'
  368. // },
  369. {
  370. width: 120,
  371. prop: 'technicalAnswerName',
  372. label: '技术答疑人',
  373. slot: 'technicalAnswerName',
  374. align: 'center'
  375. },
  376. {
  377. width: 220,
  378. prop: 'technicalParams',
  379. label: '技术参数',
  380. slot: 'technicalParams',
  381. align: 'center'
  382. },
  383. {
  384. width: 240,
  385. prop: 'technicalDrawings',
  386. label: '技术图纸',
  387. slot: 'technicalDrawings',
  388. align: 'center'
  389. },
  390. {
  391. width: 220,
  392. prop: 'remark',
  393. label: '备注',
  394. slot: 'remark',
  395. align: 'center'
  396. }
  397. ]
  398. };
  399. },
  400. created() {
  401. this.requestDict('产地');
  402. this.requestDict('生产类型');
  403. this.getDetailData(this.businessId);
  404. },
  405. methods: {
  406. ...mapActions('dict', ['requestDict']),
  407. downloadFile(file) {
  408. getFile({ objectName: file.storePath }, file.name);
  409. },
  410. async getDetailData(id) {
  411. this.loading = true;
  412. const data = await getPurchaseOutSourceSendDetailAPI(id);
  413. this.loading = false;
  414. if (data) {
  415. this.form = data;
  416. this.detailData = data;
  417. }
  418. },
  419. getTableValue() {
  420. return Promise.resolve(this.form);
  421. }
  422. }
  423. };
  424. </script>
  425. <style scoped lang="scss">
  426. .ele-dialog-form {
  427. .el-form-item {
  428. margin-bottom: 10px;
  429. }
  430. }
  431. .headbox {
  432. display: flex;
  433. justify-content: flex-start;
  434. align-items: center;
  435. .amount {
  436. font-size: 14px;
  437. font-weight: bold;
  438. margin-right: 20px;
  439. }
  440. }
  441. </style>