detailDialog.vue 9.4 KB

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