|
@@ -39,7 +39,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</InfoCard>
|
|
|
- <InfoCard v-if="getOnlineContractFormShow">
|
|
|
+ <InfoCard v-if="showContract">
|
|
|
<template #title>
|
|
|
<div class="contract-info-card-title">
|
|
|
<span>电子协议信息</span>
|
|
@@ -84,6 +84,7 @@
|
|
|
@confirm="editContractArchiveConfirm"
|
|
|
>
|
|
|
<EditContractInfo
|
|
|
+ ref="editContractArchiveModule"
|
|
|
:orderDetail="orderDetail"
|
|
|
:isAdmin="isAdmin"
|
|
|
:contractFeedbackInfo="contractFeedbackInfo"
|
|
@@ -100,7 +101,9 @@ import EditContractInfo from './EditContractInfo.vue';
|
|
|
import Dialog from '@/components/Dialog.vue';
|
|
|
import newDetailModel from '../newDetailModel.vue';
|
|
|
import { sortOrderInfo } from '@/views/create-order/components/schema-form/resort/'
|
|
|
+import { dateFormatter } from '@/assets/js/date'
|
|
|
import { calcShowOnlineContractForm } from "@/views/create-order/hooks/utils"
|
|
|
+import { ajaxEditOrderContract } from '@/api/modules/'
|
|
|
export default {
|
|
|
name: 'ContractInfo',
|
|
|
components: {
|
|
@@ -138,12 +141,14 @@ export default {
|
|
|
editContractArchiveDialogVisible: false,
|
|
|
protocolArchivingDialogVisible: false,
|
|
|
contractRes: this.orderDetail?.contractRes || {},
|
|
|
- contractFeedbackInfo: {}
|
|
|
+ contractFeedbackInfo: {},
|
|
|
+ showContract: false,
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
this.contractFeedbackInfo = sortOrderInfo(this.orderDetail)
|
|
|
- this.getOnlineContractFormShow(this.contractFeedbackInfo.pageFormValue, this.contractFeedbackInfo.productArr)
|
|
|
+ const res = this.getOnlineContractFormShow(this.contractFeedbackInfo.pageFormValue, this.contractFeedbackInfo.productArr)
|
|
|
+ this.showContract = res || false
|
|
|
},
|
|
|
methods: {
|
|
|
// 是否显示电子协议订单
|
|
@@ -164,8 +169,37 @@ export default {
|
|
|
this.$message.error('暂无权限')
|
|
|
}
|
|
|
},
|
|
|
- editContractArchiveConfirm() {
|
|
|
- // this.$refs.editContractArchiveDialog.close()
|
|
|
+ async editContractArchiveConfirm() {
|
|
|
+ const {
|
|
|
+ signTime,
|
|
|
+ e_contract_type,
|
|
|
+ e_contract_userA_type,
|
|
|
+ e_contract_userA_name,
|
|
|
+ e_contract_userA_contacts_name,
|
|
|
+ e_contract_userA_contacts_tel,
|
|
|
+ e_contract_userA_contacts_address,
|
|
|
+ e_contract_userB_contacts_name,
|
|
|
+ e_contract_remark,
|
|
|
+ } = this.$refs.editContractArchiveModule.pageForm
|
|
|
+ const params = {
|
|
|
+ contractTime: dateFormatter(signTime, 'yyyy-MM-dd'),
|
|
|
+ e_contract_type: e_contract_type,
|
|
|
+ e_contract_userA_type: e_contract_userA_type,
|
|
|
+ e_contract_userA_name: e_contract_userA_name,
|
|
|
+ e_contract_userA_contacts_name: e_contract_userA_contacts_name,
|
|
|
+ e_contract_userA_contacts_tel: e_contract_userA_contacts_tel,
|
|
|
+ e_contract_userA_contacts_address: e_contract_userA_contacts_address,
|
|
|
+ e_contract_userB_contacts_name: e_contract_userB_contacts_name,
|
|
|
+ e_contract_remark: e_contract_remark,
|
|
|
+ }
|
|
|
+ const { error_code: code, error_msg: msg } = await ajaxEditOrderContract(params)
|
|
|
+ if(code === 0) {
|
|
|
+ this.$message.success('电子协议信息编辑成功')
|
|
|
+ this.$emit('refresh', '协议信息')
|
|
|
+ this.editContractArchiveDialogVisible = false;
|
|
|
+ } else {
|
|
|
+ this.$message.error(msg || '电子协议信息编辑失败')
|
|
|
+ }
|
|
|
},
|
|
|
// 查看归档协议
|
|
|
viewfileEvent() {
|