detailDialog.vue 15 KB

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