detailDialog.vue 10 KB

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