detailDialog.vue 15 KB

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