detailDialog.vue 15 KB

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