detailDialog.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523
  1. <template>
  2. <ele-modal
  3. custom-class="ele-dialog-form long-dialog-form"
  4. :centered="true"
  5. :visible.sync="detailDialogFlag"
  6. :title="title"
  7. :append-to-body="true"
  8. :close-on-click-modal="false"
  9. width="70%"
  10. :maxable="true"
  11. :resizable="true"
  12. @close="cancel"
  13. >
  14. <div class="switch">
  15. <div class="switch_left">
  16. <ul>
  17. <li
  18. v-for="item in tabOptions"
  19. :key="item.key"
  20. :class="{ active: activeComp == item.key }"
  21. @click="handleTag(item.key)"
  22. >
  23. {{ item.name }}
  24. </li>
  25. </ul>
  26. </div>
  27. </div>
  28. <div v-if="activeComp === 'main'">
  29. <el-form
  30. ref="form"
  31. :model="form"
  32. :rules="rules"
  33. class="el-form-box"
  34. label-width="120px"
  35. >
  36. <headerTitle title="发货信息"></headerTitle>
  37. <el-row :gutter="20">
  38. <el-col :span="12">
  39. <el-form-item
  40. label="委外发货单编码:"
  41. prop="code"
  42. class="form_item_label"
  43. >
  44. <el-input v-model="form.code" disabled></el-input>
  45. </el-form-item>
  46. </el-col>
  47. <el-col :span="12">
  48. <el-form-item label="采购订单编码:" prop="orderNo">
  49. <el-input v-model="form.orderNo" disabled></el-input>
  50. </el-form-item>
  51. </el-col>
  52. </el-row>
  53. <el-row :gutter="20">
  54. <el-col :span="12">
  55. <el-form-item label="外协单位:" prop="contactName">
  56. <el-input v-model="form.supplierName" disabled></el-input>
  57. </el-form-item>
  58. </el-col>
  59. <el-col :span="12">
  60. <el-form-item
  61. label="外协单位联系人:"
  62. prop="linkName"
  63. class="form_item_label"
  64. >
  65. <el-input v-model="form.linkName" disabled></el-input>
  66. </el-form-item>
  67. </el-col>
  68. <el-col :span="12">
  69. <el-form-item label="外协单位电话:" prop="linkPhone">
  70. <el-input v-model="form.linkPhone" disabled></el-input>
  71. </el-form-item>
  72. </el-col>
  73. <el-col :span="12">
  74. <el-form-item label="发货日期:" prop="sendDate">
  75. <el-input v-model="form.sendDate" disabled></el-input>
  76. </el-form-item>
  77. </el-col>
  78. <el-col :span="12">
  79. <el-form-item label="发货单号:" prop="sendNoteNo">
  80. <el-input v-model="form.sendNoteNo" disabled></el-input>
  81. </el-form-item>
  82. </el-col>
  83. </el-row>
  84. <el-row :gutter="20">
  85. <el-col :span="12">
  86. <el-form-item label="订单类型:" prop="sourceTypeName">
  87. <el-input v-model="form.sourceTypeName" disabled></el-input>
  88. </el-form-item>
  89. </el-col>
  90. <el-col :span="12">
  91. <el-form-item label="车辆号:" prop="carNo">
  92. <el-input v-model="form.carNo" disabled></el-input>
  93. </el-form-item>
  94. </el-col>
  95. <el-col :span="12">
  96. <el-form-item prop="files" label="附件:">
  97. <fileMain v-model="form.files" type="view"></fileMain>
  98. </el-form-item>
  99. </el-col>
  100. <el-col :span="12"> </el-col>
  101. </el-row>
  102. </el-form>
  103. <headerTitle title="物品清单"></headerTitle>
  104. <ele-pro-table
  105. ref="table"
  106. :needPage="false"
  107. :columns="competAnalysisListcolumns"
  108. @columns-change="handleColumnChange"
  109. :cache-key="cacheKeyUrl"
  110. :datasource="detailData.productList"
  111. row-key="id"
  112. >
  113. <template v-slot:technicalDrawings="{ row }">
  114. <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
  115. </template>
  116. </ele-pro-table>
  117. </div>
  118. <bpmDetail
  119. v-if="activeComp === 'bpm' && form.processInstanceId"
  120. :id="form.processInstanceId"
  121. ></bpmDetail>
  122. <out-bound-details
  123. v-if="activeComp === 'store' && form.reviewStatus == 2"
  124. ref="innerBoundDetailsRef"
  125. ></out-bound-details>
  126. <div slot="footer" class="footer">
  127. <el-button @click="cancel">返回</el-button>
  128. </div>
  129. </ele-modal>
  130. </template>
  131. <script>
  132. import { getFile } from '@/api/system/file';
  133. import dictMixins from '@/mixins/dictMixins';
  134. import { reviewStatusEnum, lbjtList } from '@/enum/dict';
  135. import { getPurchaseOutSourceSendDetailAPI } from '@/api/purchasingManage/outSourceSend';
  136. import bpmDetail from '@/views/bpm/processInstance/detail.vue';
  137. import fileUpload from '@/components/upload/fileUpload.vue';
  138. // import fileMain from '@/components/addDoc/index.vue';
  139. import outBoundDetails from '@/BIZComponents/outdetails.vue';
  140. import tabMixins from '@/mixins/tableColumnsMixin';
  141. export default {
  142. mixins: [dictMixins,tabMixins],
  143. components: {
  144. // fileMain,
  145. fileUpload,
  146. bpmDetail,
  147. outBoundDetails
  148. },
  149. props: {
  150. detailDialogFlag: Boolean
  151. },
  152. data() {
  153. return {
  154. cacheKeyUrl:'eos-purchaseOrder-outSourceSend-inventoryTableDetail',
  155. activeComp: 'main',
  156. tabOptions: [
  157. { key: 'main', name: '发货单详情' },
  158. { key: 'bpm', name: '流程详情' },
  159. { key: 'store', name: '出库单详情' }
  160. ],
  161. fullscreen: false,
  162. reviewStatusEnum,
  163. detailId: '',
  164. title: '详情',
  165. row: {},
  166. activeName: 'base',
  167. form: {
  168. orderFiles: [{ name: '222' }]
  169. },
  170. rules: {},
  171. detailData: {},
  172. competAnalysisListcolumns: [
  173. {
  174. width: 45,
  175. type: 'index',
  176. columnKey: 'index',
  177. align: 'center',
  178. fixed: 'left'
  179. },
  180. {
  181. minWidth: 140,
  182. prop: 'productName',
  183. label: '名称',
  184. slot: 'productName',
  185. align: 'center'
  186. },
  187. {
  188. minWidth: 120,
  189. prop: 'productCode',
  190. label: '编码',
  191. slot: 'productCode',
  192. align: 'center'
  193. },
  194. {
  195. minWidth: 100,
  196. prop: 'productCategoryName',
  197. label: '类型',
  198. slot: 'productCategoryName',
  199. align: 'center'
  200. },
  201. {
  202. width: 160,
  203. prop: 'productBrand',
  204. label: '牌号',
  205. slot: 'productBrand',
  206. align: 'center'
  207. },
  208. {
  209. width: 120,
  210. prop: 'modelType',
  211. label: '型号',
  212. slot: 'modelType',
  213. align: 'center'
  214. },
  215. {
  216. width: 120,
  217. prop: 'specification',
  218. label: '规格',
  219. slot: 'specification',
  220. align: 'center'
  221. },
  222. {
  223. width: 120,
  224. prop: 'imgCode',
  225. align: 'center',
  226. label: '图号/件号',
  227. showOverflowTooltip: true
  228. },
  229. {
  230. width: 120,
  231. prop: 'produceType',
  232. align: 'center',
  233. label: '属性类型',
  234. showOverflowTooltip: true,
  235. formatter: (row, column) => {
  236. if (row.produceType) {
  237. return row.produceType
  238. .map((item) => {
  239. return lbjtList[item];
  240. })
  241. .toString();
  242. }
  243. }
  244. },
  245. {
  246. width: 120,
  247. prop: 'packingSpecification',
  248. align: 'center',
  249. label: '包装规格',
  250. showOverflowTooltip: true
  251. },
  252. {
  253. width: 200,
  254. prop: 'supplierMark',
  255. label: '客户代号',
  256. slot: 'supplierMark',
  257. align: 'center'
  258. },
  259. {
  260. width: 200,
  261. prop: 'warehouseName',
  262. label: '仓库名称',
  263. slot: 'warehouseName',
  264. align: 'center'
  265. },
  266. {
  267. width: 120,
  268. prop: 'totalCount',
  269. label: '发货数量',
  270. slot: 'totalCount',
  271. align: 'center'
  272. },
  273. {
  274. minWidth: 120,
  275. prop: 'taskName',
  276. label: '工序',
  277. slot: 'taskName',
  278. align: 'center'
  279. },
  280. {
  281. width: 110,
  282. prop: 'batchNo',
  283. label: '批次号',
  284. slot: 'batchNo',
  285. align: 'center'
  286. },
  287. {
  288. width: 120,
  289. prop: 'measuringUnit',
  290. label: '计量单位',
  291. slot: 'measuringUnit',
  292. align: 'center'
  293. },
  294. {
  295. width: 120,
  296. prop: 'singleWeight',
  297. label: '单重',
  298. slot: 'singleWeight',
  299. align: 'center'
  300. },
  301. {
  302. width: 100,
  303. prop: 'sendTotalWeight',
  304. label: '发货总重',
  305. slot: 'sendTotalWeight',
  306. align: 'center'
  307. },
  308. {
  309. width: 100,
  310. prop: 'weightUnit',
  311. label: '重量单位',
  312. slot: 'weightUnit',
  313. align: 'center'
  314. },
  315. {
  316. width: 160,
  317. prop: 'pricingWay',
  318. label: '计价方式',
  319. slot: 'pricingWay',
  320. align: 'center',
  321. formatter: (row, column) => {
  322. return row.pricingWay == 1
  323. ? '按数量计费'
  324. : row.pricingWay == 2
  325. ? '按重量计费'
  326. : '';
  327. }
  328. },
  329. {
  330. width: 120,
  331. prop: 'taxRate',
  332. label: '税率',
  333. formatter: (_row, _column, cellValue) => {
  334. return _row.taxRate ? _row.taxRate + '%' : '';
  335. },
  336. align: 'center'
  337. },
  338. {
  339. width: 160,
  340. prop: 'singlePrice',
  341. label: '单价',
  342. slot: 'singlePrice',
  343. align: 'center'
  344. },
  345. {
  346. width: 150,
  347. prop: 'notaxSinglePrice',
  348. label: '不含税单价',
  349. align: 'center'
  350. },
  351. {
  352. width: 100,
  353. prop: 'discountSinglePrice',
  354. label: '折让单价',
  355. slot: 'discountSinglePrice',
  356. align: 'center',
  357. formatter: (_row, _column, cellValue) => {
  358. return _row.discountSinglePrice
  359. ? Number(_row.discountSinglePrice).toFixed(2)
  360. : '';
  361. }
  362. },
  363. {
  364. width: 120,
  365. prop: 'totalPrice',
  366. label: '合计',
  367. slot: 'totalPrice',
  368. formatter: (_row, _column, cellValue) => {
  369. return _row.totalPrice + '元';
  370. },
  371. align: 'center'
  372. },
  373. {
  374. width: 100,
  375. prop: 'discountTotalPrice',
  376. label: '折让合计',
  377. slot: 'discountTotalPrice',
  378. align: 'center',
  379. formatter: (_row, _column, cellValue) => {
  380. return _row.discountTotalPrice
  381. ? Number(_row.discountTotalPrice).toFixed(2)
  382. : '';
  383. }
  384. },
  385. {
  386. prop: 'provenance',
  387. label: '产地',
  388. slot: 'provenance',
  389. align: 'center',
  390. minWidth: 200,
  391. showOverflowTooltip: true,
  392. formatter: (row, column) => {
  393. return row.provenance && row.provenance.length
  394. ? row.provenance
  395. .map((item) => this.getDictValue('产地', item))
  396. .join(',')
  397. : '';
  398. }
  399. },
  400. // {
  401. // width: 120,
  402. // prop: 'deliveryDays',
  403. // label: '交期(天)',
  404. // slot: 'deliveryDays',
  405. // align: 'center'
  406. // },
  407. {
  408. width: 200,
  409. prop: 'guaranteePeriod',
  410. label: '有效期',
  411. slot: 'guaranteePeriod',
  412. formatter: (_row, _column, cellValue) => {
  413. return (
  414. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  415. );
  416. },
  417. align: 'center'
  418. },
  419. // {
  420. // width: 120,
  421. // prop: 'guaranteePeriodUnitCode',
  422. // label: '',
  423. // slot: 'guaranteePeriodUnitCode'
  424. // },
  425. {
  426. width: 120,
  427. prop: 'technicalAnswerName',
  428. label: '技术答疑人',
  429. slot: 'technicalAnswerName',
  430. align: 'center'
  431. },
  432. {
  433. width: 220,
  434. prop: 'technicalParams',
  435. label: '技术参数',
  436. slot: 'technicalParams',
  437. align: 'center'
  438. },
  439. {
  440. width: 240,
  441. prop: 'technicalDrawings',
  442. label: '技术图纸',
  443. slot: 'technicalDrawings',
  444. align: 'center'
  445. },
  446. {
  447. width: 220,
  448. prop: 'remark',
  449. label: '备注',
  450. slot: 'remark',
  451. align: 'center'
  452. }
  453. ]
  454. };
  455. },
  456. created() {
  457. this.requestDict('产地');
  458. },
  459. methods: {
  460. async open(row) {
  461. this.form = row;
  462. this.getDetailData(row.id);
  463. this.detailId = row.id;
  464. },
  465. //关闭弹窗
  466. cancel() {
  467. this.$emit('update:detailDialogFlag', false);
  468. },
  469. downloadFile(file) {
  470. getFile({ objectName: file.storePath }, file.name);
  471. },
  472. handleTag(val) {
  473. this.activeComp = val;
  474. if (val == 'store') {
  475. this.$nextTick(() => {
  476. this.$refs.innerBoundDetailsRef._getInfo(this.form.code);
  477. });
  478. }
  479. },
  480. async getDetailData(id) {
  481. this.loading = true;
  482. const data = await getPurchaseOutSourceSendDetailAPI(id);
  483. this.loading = false;
  484. if (data) {
  485. this.form = data;
  486. this.detailData = data;
  487. }
  488. }
  489. }
  490. };
  491. </script>
  492. <style scoped lang="scss">
  493. .ele-dialog-form {
  494. .el-form-item {
  495. margin-bottom: 10px;
  496. }
  497. }
  498. .headbox {
  499. display: flex;
  500. justify-content: flex-start;
  501. align-items: center;
  502. .amount {
  503. font-size: 14px;
  504. font-weight: bold;
  505. margin-right: 20px;
  506. }
  507. }
  508. </style>