detailDialog.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  1. <template>
  2. <div>
  3. <!-- <div class="switch">
  4. <div class="switch_left">
  5. <ul>
  6. <li
  7. v-for="item in tabOptions"
  8. :key="item.key"
  9. :class="{ active: activeComp == item.key }"
  10. @click="activeComp = item.key"
  11. >
  12. {{ item.name }}
  13. </li>
  14. </ul>
  15. </div>
  16. </div> -->
  17. <div>
  18. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  19. <headerTitle title="订单信息"> </headerTitle>
  20. <el-row>
  21. <el-col :span="12">
  22. <el-form-item
  23. label="订单编号:"
  24. prop="orderNo"
  25. style="margin-bottom: 16px"
  26. >
  27. {{ form.orderNo }}
  28. </el-form-item>
  29. <el-form-item
  30. label="合同名称:"
  31. prop="contractName"
  32. style="margin-bottom: 16px"
  33. >
  34. {{ form.contractName }}
  35. </el-form-item>
  36. <el-form-item
  37. label="合同编号:"
  38. prop="contractNumber"
  39. style="margin-bottom: 16px"
  40. >
  41. {{ form.contractNumber }}
  42. </el-form-item>
  43. <el-form-item
  44. label="结算方式:"
  45. prop="settlementModeName"
  46. style="margin-bottom: 16px"
  47. >
  48. {{ detailData.settlementModeName }}
  49. </el-form-item>
  50. <el-form-item prop="orderFiles" label="订单附件:">
  51. <fileMain v-model="detailData.orderFiles" type="view"></fileMain>
  52. <!-- <div-->
  53. <!-- v-if="detailData.orderFiles && detailData.orderFiles?.length"-->
  54. <!-- >-->
  55. <!-- <el-link-->
  56. <!-- v-for="link in detailData.orderFiles"-->
  57. <!-- :key="link.id"-->
  58. <!-- type="primary"-->
  59. <!-- :underline="false"-->
  60. <!-- @click="downloadFile(link)"-->
  61. <!-- >-->
  62. <!-- {{ link.name }}</el-link-->
  63. <!-- >-->
  64. <!-- </div>-->
  65. </el-form-item>
  66. <el-form-item
  67. label="客户收货地址:"
  68. prop="receiveAddress"
  69. style="margin-bottom: 16px"
  70. >
  71. {{ form.receiveAddress }}
  72. </el-form-item>
  73. <el-form-item
  74. label="订单备注:"
  75. prop="remark"
  76. style="margin-bottom: 16px"
  77. >
  78. {{ form.remark }}
  79. </el-form-item>
  80. </el-col>
  81. <el-col :span="12">
  82. <!-- <el-form-item
  83. label="交货日期:"
  84. prop="deliveryDate"
  85. style="margin-bottom: 16px"
  86. >
  87. {{ form.deliveryDate }}
  88. </el-form-item> -->
  89. <el-form-item
  90. label="项目名称:"
  91. prop="projectName"
  92. style="margin-bottom: 16px"
  93. >
  94. {{ form.projectName }}
  95. </el-form-item>
  96. <el-form-item
  97. label="销售部门:"
  98. prop="salesDeptName"
  99. style="margin-bottom: 16px"
  100. >
  101. {{ form.salesDeptName }}
  102. </el-form-item>
  103. <el-form-item
  104. label="销售类型:"
  105. prop="saleTypeName"
  106. style="margin-bottom: 16px"
  107. >
  108. {{ form.saleTypeName }}
  109. </el-form-item>
  110. <el-form-item
  111. label="应付金额:"
  112. prop="payAmount"
  113. style="margin-bottom: 16px"
  114. >
  115. {{ form.payAmount }}元
  116. </el-form-item>
  117. <el-form-item
  118. label="订单总金额:"
  119. prop="totalAmount"
  120. style="margin-bottom: 16px"
  121. >
  122. {{ form.totalAmount }}元
  123. </el-form-item>
  124. <el-form-item
  125. label="订单类型:"
  126. prop="totalAmount"
  127. style="margin-bottom: 16px"
  128. >
  129. {{
  130. form.needProduce == 1
  131. ? '有客户生产性订单'
  132. : form.needProduce == 2
  133. ? '无客户生产性订单'
  134. : form.needProduce == 4
  135. ? '不定向订单'
  136. : '库存式订单'
  137. }}
  138. </el-form-item>
  139. <el-form-item
  140. label="总数"
  141. prop="totalPlanNum"
  142. v-if="form.needProduce == 4"
  143. >
  144. {{ form.totalPlanNum }}
  145. {{ form.planNumUnit }}
  146. </el-form-item>
  147. </el-col>
  148. </el-row>
  149. <headerTitle title="基本信息"></headerTitle>
  150. <el-row>
  151. <el-col :span="12">
  152. <el-form-item
  153. label="客户名称:"
  154. prop="partaName"
  155. style="margin-bottom: 16px"
  156. >
  157. {{ form.partaName }}
  158. </el-form-item>
  159. <el-form-item
  160. label="客户统一社会信用代码"
  161. prop="partaUnifiedSocialCreditCode"
  162. label-width="160px"
  163. style="margin-bottom: 16px"
  164. >
  165. {{ form.partaUnifiedSocialCreditCode }}
  166. </el-form-item>
  167. <el-form-item
  168. label="客户联系人:"
  169. prop="partaLinkName"
  170. style="margin-bottom: 16px"
  171. >
  172. {{ form.partaLinkName }}
  173. </el-form-item>
  174. <el-form-item
  175. label="客户电话:"
  176. prop="partaTel"
  177. style="margin-bottom: 16px"
  178. >
  179. {{ form.partaTel }}
  180. </el-form-item>
  181. <el-form-item
  182. label="客户传真:"
  183. prop="partaFax"
  184. style="margin-bottom: 16px"
  185. >
  186. {{ form.partaFax }}
  187. </el-form-item>
  188. <el-form-item
  189. label=" 客户Email:"
  190. prop="partaEmail"
  191. style="margin-bottom: 16px"
  192. >
  193. {{ form.partaEmail }}
  194. </el-form-item>
  195. <el-form-item
  196. label="客户地址:"
  197. prop="partaAddress"
  198. style="margin-bottom: 16px"
  199. >
  200. {{ form.partaAddress }}
  201. </el-form-item>
  202. <!-- <el-form-item
  203. label="客户税号"
  204. prop="contactAddress"
  205. style="margin-bottom: 16px"
  206. >
  207. <el-input
  208. clearable
  209. v-model="form.contactAddress"
  210. placeholder="请输入"
  211. />
  212. </el-form-item> -->
  213. </el-col>
  214. <el-col :span="12">
  215. <el-form-item
  216. label="售出方名称:"
  217. prop="partbName"
  218. style="margin-bottom: 16px"
  219. >
  220. {{ form.partbName }}
  221. </el-form-item>
  222. <el-form-item
  223. label="售出方统一社会信用代码"
  224. prop="partbUnifiedSocialCreditCode"
  225. label-width="180px"
  226. style="margin-bottom: 16px"
  227. >
  228. {{ form.partbUnifiedSocialCreditCode }}
  229. </el-form-item>
  230. <el-form-item
  231. label="售出方联系人:"
  232. prop="partbLinkName"
  233. style="margin-bottom: 16px"
  234. >
  235. {{ form.partbLinkName }}
  236. </el-form-item>
  237. <el-form-item
  238. prop="partbTel"
  239. label="售出方联系电话:"
  240. label-width="140px"
  241. >
  242. {{ form.partbTel }}
  243. </el-form-item>
  244. <el-form-item prop="partbFax" label="售出方传真:">
  245. {{ form.partbFax }}
  246. </el-form-item>
  247. <el-form-item
  248. label="售出方Email:"
  249. prop="partbEmail"
  250. style="margin-bottom: 16px"
  251. >
  252. {{ form.partbEmail }}
  253. </el-form-item>
  254. <el-form-item
  255. label="售出方地址:"
  256. prop="partbAddress"
  257. style="margin-bottom: 16px"
  258. >
  259. {{ form.partbAddress }}
  260. </el-form-item>
  261. <!-- <el-form-item
  262. label="售出方税号"
  263. prop="contactAddress"
  264. style="margin-bottom: 16px"
  265. >
  266. <el-input
  267. clearable
  268. v-model="form.contactAddress"
  269. placeholder="请输入"
  270. />
  271. </el-form-item> -->
  272. </el-col>
  273. </el-row>
  274. </el-form>
  275. <headerTitle title="物品清单" v-if="form.needProduce != 4"></headerTitle>
  276. <inventoryTabledetail
  277. v-if="form.needProduce != 4"
  278. ref="inventoryTabledetailRef"
  279. :isCustomerMark="true"
  280. :isDiscountTotalPrice="true"
  281. :isArrivalWay="true"
  282. ></inventoryTabledetail>
  283. <headerTitle title="类型清单" v-if="form.needProduce == 4"></headerTitle>
  284. <typeList
  285. v-if="form.needProduce == 4"
  286. ref="typeListRef"
  287. type="view"
  288. ></typeList>
  289. </div>
  290. <!-- <div v-if="activeComp=='invoice'">
  291. <invoiceList :orderId="detailId"></invoiceList>
  292. </div>
  293. <div v-if="activeComp=='returnorder'">
  294. <returnGoodsList :orderId="detailId"></returnGoodsList>
  295. </div>
  296. <div v-if="activeComp=='accountstatement'">
  297. <accountstatementList :orderId="detailId"></accountstatementList>
  298. </div> -->
  299. </div>
  300. </template>
  301. <script>
  302. import { getSaleOrderDetail } from '@/api/bpm/components/saleManage/saleorder';
  303. // import invoiceList from '@/views/saleManage/saleOrder/orderAssociation/invoiceList.vue'
  304. // import returnGoodsList from '@/views/saleManage/saleOrder/orderAssociation/returnGoodsList.vue'
  305. // import accountstatementList from '@/views/saleManage/saleOrder/orderAssociation/accountstatementList.vue'
  306. import { getFile } from '@/api/system/file';
  307. import dictMixins from '@/mixins/dictMixins';
  308. import { copyObj } from '@/utils/util';
  309. import inventoryTabledetail from '@/BIZComponents/inventoryTableDetails.vue';
  310. import fileMain from '@/components/addDoc/index.vue';
  311. import typeList from './typeList.vue';
  312. export default {
  313. mixins: [dictMixins],
  314. components: {
  315. fileMain,
  316. inventoryTabledetail,
  317. typeList
  318. },
  319. props: {
  320. businessId: {
  321. default: ''
  322. }
  323. },
  324. data() {
  325. return {
  326. activeComp: 'order',
  327. tabOptions: [
  328. { key: 'order', name: '订单详情' },
  329. { key: 'invoice', name: '发货列表' },
  330. { key: 'returnorder', name: '退货列表' },
  331. { key: 'accountstatement', name: '对账列表' }
  332. ],
  333. visible: false,
  334. detailId: '',
  335. title: '详情',
  336. row: {},
  337. activeName: 'base',
  338. form: {
  339. orderFiles: [{ name: '222' }]
  340. },
  341. rules: {},
  342. detailData: {},
  343. receiptPaymentListcolumns: [
  344. {
  345. width: 45,
  346. type: 'index',
  347. columnKey: 'index',
  348. align: 'center',
  349. fixed: 'left'
  350. },
  351. {
  352. width: 200,
  353. prop: 'moneyName',
  354. label: '款项名称',
  355. slot: 'moneyName'
  356. },
  357. {
  358. width: 100,
  359. prop: 'price',
  360. label: '金额',
  361. slot: 'price',
  362. formatter: (_row, _column, cellValue) => {
  363. return _row.price + '元';
  364. }
  365. },
  366. {
  367. width: 100,
  368. prop: 'ratio',
  369. label: '比例',
  370. slot: 'ratio',
  371. formatter: (_row, _column, cellValue) => {
  372. return _row.ratio + '%';
  373. }
  374. },
  375. {
  376. width: 160,
  377. prop: 'deadLine',
  378. label: '截止日期',
  379. slot: 'deadLine'
  380. },
  381. {
  382. prop: 'remark',
  383. label: ' 说明',
  384. slot: 'remark'
  385. }
  386. ],
  387. competAnalysisListcolumns: [
  388. {
  389. width: 45,
  390. type: 'index',
  391. columnKey: 'index',
  392. align: 'center',
  393. fixed: 'left'
  394. },
  395. {
  396. width: 200,
  397. prop: 'productName',
  398. label: '名称',
  399. slot: 'productName'
  400. },
  401. {
  402. width: 120,
  403. prop: 'productCode',
  404. label: '编码',
  405. slot: 'productCode'
  406. },
  407. {
  408. width: 200,
  409. prop: 'productCategoryName',
  410. label: '类型',
  411. slot: 'productCategoryName'
  412. },
  413. {
  414. width: 160,
  415. prop: 'productBrand',
  416. label: '牌号',
  417. slot: 'productBrand'
  418. },
  419. {
  420. width: 120,
  421. prop: 'modelType',
  422. label: '型号',
  423. slot: 'modelType'
  424. },
  425. {
  426. width: 120,
  427. prop: 'specification',
  428. label: '规格',
  429. slot: 'specification'
  430. },
  431. {
  432. width: 120,
  433. prop: 'totalCount',
  434. label: '数量',
  435. slot: 'totalCount'
  436. },
  437. {
  438. width: 120,
  439. prop: 'measuringUnit',
  440. label: '计量单位',
  441. slot: 'measuringUnit'
  442. },
  443. {
  444. width: 160,
  445. prop: 'singlePrice',
  446. label: '单价',
  447. slot: 'singlePrice'
  448. },
  449. {
  450. width: 120,
  451. prop: 'totalPrice',
  452. label: '销售总金额',
  453. slot: 'totalPrice',
  454. formatter: (_row, _column, cellValue) => {
  455. return _row.totalPrice + '元';
  456. }
  457. },
  458. {
  459. width: 120,
  460. prop: 'deliveryDays',
  461. label: '交期(天)',
  462. slot: 'deliveryDays'
  463. },
  464. {
  465. width: 200,
  466. prop: 'guaranteePeriod',
  467. label: '有效期',
  468. slot: 'guaranteePeriod',
  469. formatter: (_row, _column, cellValue) => {
  470. return (
  471. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  472. );
  473. }
  474. },
  475. // {
  476. // width: 120,
  477. // prop: 'guaranteePeriodUnitCode',
  478. // label: '',
  479. // slot: 'guaranteePeriodUnitCode'
  480. // },
  481. {
  482. width: 120,
  483. prop: 'technicalAnswerName',
  484. label: '技术答疑人',
  485. slot: 'technicalAnswerName'
  486. },
  487. {
  488. width: 220,
  489. prop: 'technicalParams',
  490. label: '技术参数',
  491. slot: 'technicalParams'
  492. },
  493. {
  494. width: 240,
  495. prop: 'technicalDrawings',
  496. label: '技术图纸',
  497. slot: 'technicalDrawings',
  498. formatter: (_row, _column, cellValue) => {
  499. return (
  500. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  501. );
  502. }
  503. },
  504. {
  505. width: 220,
  506. prop: 'remark',
  507. label: '备注',
  508. slot: 'remark'
  509. }
  510. ]
  511. };
  512. },
  513. created() {
  514. this.getDetailData(this.businessId);
  515. },
  516. methods: {
  517. cancel() {
  518. this.$nextTick(() => {
  519. // 关闭后,销毁所有的表单数据
  520. (this.form = copyObj(this.formDef)),
  521. (this.otherForm = copyObj(this.otherFormDef)),
  522. (this.tableBankData = []);
  523. this.tableLinkData = [];
  524. this.visible = false;
  525. });
  526. },
  527. downloadFile(file) {
  528. getFile({ objectName: file.storePath }, file.name);
  529. },
  530. async getDetailData(id) {
  531. this.loading = true;
  532. const data = await getSaleOrderDetail(id);
  533. this.loading = false;
  534. if (data) {
  535. this.form = data;
  536. this.detailData = data;
  537. this.$nextTick(() => {
  538. this.$refs.inventoryTabledetailRef &&
  539. this.$refs.inventoryTabledetailRef.putTableValue(data);
  540. this.$refs.typeListRef &&
  541. this.$refs.typeListRef.putTableValue(data.typedetailList);
  542. });
  543. }
  544. }
  545. }
  546. };
  547. </script>
  548. <style scoped lang="scss">
  549. .ele-dialog-form {
  550. .el-form-item {
  551. margin-bottom: 10px;
  552. }
  553. }
  554. .headbox {
  555. display: flex;
  556. justify-content: flex-start;
  557. align-items: center;
  558. .amount {
  559. font-size: 14px;
  560. font-weight: bold;
  561. margin-right: 20px;
  562. }
  563. }
  564. .switch_left ul .active {
  565. border-top: 4px solid var(--color-primary);
  566. color: var(--color-primary-5);
  567. }
  568. .switch {
  569. padding-bottom: 20px;
  570. }
  571. :deep .divider .content {
  572. justify-content: flex-start;
  573. }
  574. </style>