detailDialog.vue 11 KB

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