|
|
|
@ -20,14 +20,20 @@
|
|
|
|
<el-button class="float-right" link @click="goBack">返回</el-button>
|
|
|
|
<el-button class="float-right" link @click="goBack">返回</el-button>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
|
|
|
|
<el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
|
|
|
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="变更编号" prop="changeCode">
|
|
|
|
<el-form-item label="变更编号" prop="changeCode">
|
|
|
|
<el-input v-model="form.changeCode" placeholder="保存后自动生成" disabled/>
|
|
|
|
<el-input v-model="form.changeCode" placeholder="保存后自动生成" disabled />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="变更类型" prop="changeType">
|
|
|
|
<el-form-item label="变更类型" prop="changeType">
|
|
|
|
<el-radio-group v-model="form.changeType" :disabled="isFormDisabled">
|
|
|
|
<el-radio-group v-model="form.changeType" :disabled="isFormDisabled">
|
|
|
|
<el-radio v-for="dict in contract_change_type" :key="dict.value" :value="dict.value">{{ dict.label }}</el-radio>
|
|
|
|
<el-radio v-for="dict in contract_change_type" :key="dict.value" :value="dict.value">{{ dict.label }}</el-radio>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="选择合同" prop="contractId">
|
|
|
|
<el-form-item label="选择合同" prop="contractId">
|
|
|
|
<el-input
|
|
|
|
<el-input
|
|
|
|
v-model="selectedContractName"
|
|
|
|
v-model="selectedContractName"
|
|
|
|
@ -40,6 +46,34 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
|
|
<el-form-item label="承办人" prop="undertakeBy">
|
|
|
|
|
|
|
|
<el-select v-model="form.undertakeBy" placeholder="请选择承办人" :disabled="isFormDisabled" filterable clearable style="width: 100%">
|
|
|
|
|
|
|
|
<el-option v-for="item in userInfoList" :key="item.userId" :label="item.nickName" :value="item.userId" />
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
|
|
<el-form-item label="行业/大区" prop="industryRegion">
|
|
|
|
|
|
|
|
<el-input v-model="form.industryRegion" placeholder="请输入行业/大区" :disabled="isFormDisabled" clearable />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
|
|
<el-form-item label="承办部门" prop="undertakeDeptId">
|
|
|
|
|
|
|
|
<el-select v-model="form.undertakeDeptId" placeholder="请选择承办部门" :disabled="isFormDisabled" filterable clearable style="width: 100%">
|
|
|
|
|
|
|
|
<el-option v-for="item in deptInfoList" :key="item.deptId" :label="item.deptName" :value="item.deptId" />
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
|
|
<el-form-item label="印章法人单位" prop="sealLegalEntity">
|
|
|
|
|
|
|
|
<el-radio-group v-model="form.sealLegalEntity" :disabled="isFormDisabled">
|
|
|
|
|
|
|
|
<el-radio v-for="dict in seal_legal_entity" :key="dict.value" :value="dict.value">{{ dict.label }}</el-radio>
|
|
|
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
<el-form-item label="变更原因" prop="changeReason">
|
|
|
|
<el-form-item label="变更原因" prop="changeReason">
|
|
|
|
<el-input
|
|
|
|
<el-input
|
|
|
|
v-model="form.changeReason"
|
|
|
|
v-model="form.changeReason"
|
|
|
|
@ -418,6 +452,8 @@ import type { PaymentStageVO } from '@/api/oa/base/paymentStage/types';
|
|
|
|
import { getCrmCustomerInfoList } from '@/api/oa/crm/customerInfo';
|
|
|
|
import { getCrmCustomerInfoList } from '@/api/oa/crm/customerInfo';
|
|
|
|
import { getCrmPaymentAccountList } from '@/api/oa/crm/paymentAccount';
|
|
|
|
import { getCrmPaymentAccountList } from '@/api/oa/crm/paymentAccount';
|
|
|
|
import { getUserList } from '@/api/system/user';
|
|
|
|
import { getUserList } from '@/api/system/user';
|
|
|
|
|
|
|
|
import { allListDept } from '@/api/system/dept';
|
|
|
|
|
|
|
|
import { getInfo } from '@/api/login';
|
|
|
|
import { getBasePrintTemplateList } from '@/api/oa/base/printTemplate';
|
|
|
|
import { getBasePrintTemplateList } from '@/api/oa/base/printTemplate';
|
|
|
|
import ApprovalButton from '@/components/Process/approvalButton.vue';
|
|
|
|
import ApprovalButton from '@/components/Process/approvalButton.vue';
|
|
|
|
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
|
|
|
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
|
|
|
@ -436,9 +472,18 @@ const {
|
|
|
|
business_direction,
|
|
|
|
business_direction,
|
|
|
|
contract_flag,
|
|
|
|
contract_flag,
|
|
|
|
contract_template_flag,
|
|
|
|
contract_template_flag,
|
|
|
|
material_flag
|
|
|
|
material_flag,
|
|
|
|
|
|
|
|
seal_legal_entity
|
|
|
|
} = toRefs<any>(
|
|
|
|
} = toRefs<any>(
|
|
|
|
proxy?.useDict('contract_change_type', 'contract_category', 'business_direction', 'contract_flag', 'contract_template_flag', 'material_flag')
|
|
|
|
proxy?.useDict(
|
|
|
|
|
|
|
|
'contract_change_type',
|
|
|
|
|
|
|
|
'contract_category',
|
|
|
|
|
|
|
|
'business_direction',
|
|
|
|
|
|
|
|
'contract_flag',
|
|
|
|
|
|
|
|
'contract_template_flag',
|
|
|
|
|
|
|
|
'material_flag',
|
|
|
|
|
|
|
|
'seal_legal_entity'
|
|
|
|
|
|
|
|
)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
const paymentMethodOptions = ['电汇', '银行承兑(6个月内)', '电汇/银行承兑(6个月内)', '商业承兑'];
|
|
|
|
const paymentMethodOptions = ['电汇', '银行承兑(6个月内)', '电汇/银行承兑(6个月内)', '商业承兑'];
|
|
|
|
@ -459,6 +504,7 @@ const customerInfoList = ref<any[]>([]);
|
|
|
|
const userInfoList = ref<any[]>([]);
|
|
|
|
const userInfoList = ref<any[]>([]);
|
|
|
|
const paymentAccountList = ref<any[]>([]);
|
|
|
|
const paymentAccountList = ref<any[]>([]);
|
|
|
|
const printTemplateList = ref<any[]>([]);
|
|
|
|
const printTemplateList = ref<any[]>([]);
|
|
|
|
|
|
|
|
const deptInfoList = ref<any[]>([]);
|
|
|
|
|
|
|
|
|
|
|
|
// 变更后物料/付款方式列表(仅内容变更时使用)
|
|
|
|
// 变更后物料/付款方式列表(仅内容变更时使用)
|
|
|
|
const changeMaterialList = computed(() => form.value.changeMaterialList || []);
|
|
|
|
const changeMaterialList = computed(() => form.value.changeMaterialList || []);
|
|
|
|
@ -619,7 +665,11 @@ const form = ref<
|
|
|
|
changeInfo: undefined,
|
|
|
|
changeInfo: undefined,
|
|
|
|
changeMaterialList: undefined,
|
|
|
|
changeMaterialList: undefined,
|
|
|
|
changePaymentMethodList: undefined,
|
|
|
|
changePaymentMethodList: undefined,
|
|
|
|
changeCode: undefined
|
|
|
|
changeCode: undefined,
|
|
|
|
|
|
|
|
undertakeDeptId: undefined,
|
|
|
|
|
|
|
|
undertakeBy: undefined,
|
|
|
|
|
|
|
|
industryRegion: undefined,
|
|
|
|
|
|
|
|
sealLegalEntity: undefined
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
const rules = {
|
|
|
|
const rules = {
|
|
|
|
@ -753,6 +803,10 @@ async function loadDetail() {
|
|
|
|
form.value.changeInfo = d.changeInfo ? { ...d.changeInfo } : undefined;
|
|
|
|
form.value.changeInfo = d.changeInfo ? { ...d.changeInfo } : undefined;
|
|
|
|
form.value.changeMaterialList = (d.changeMaterialList || []).map((x: any) => ({ ...x }));
|
|
|
|
form.value.changeMaterialList = (d.changeMaterialList || []).map((x: any) => ({ ...x }));
|
|
|
|
form.value.changePaymentMethodList = (d.changePaymentMethodList || []).map((x: any) => ({ ...x }));
|
|
|
|
form.value.changePaymentMethodList = (d.changePaymentMethodList || []).map((x: any) => ({ ...x }));
|
|
|
|
|
|
|
|
form.value.undertakeDeptId = m.undertakeDeptId;
|
|
|
|
|
|
|
|
form.value.undertakeBy = m.undertakeBy;
|
|
|
|
|
|
|
|
form.value.industryRegion = m.industryRegion;
|
|
|
|
|
|
|
|
form.value.sealLegalEntity = m.sealLegalEntity;
|
|
|
|
selectedContractName.value = m.contractName || '';
|
|
|
|
selectedContractName.value = m.contractName || '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -763,6 +817,7 @@ function loadSelectOptions() {
|
|
|
|
getUserList({ pageNum: 1, pageSize: 1000 }).then((res) => (userInfoList.value = res.data || []));
|
|
|
|
getUserList({ pageNum: 1, pageSize: 1000 }).then((res) => (userInfoList.value = res.data || []));
|
|
|
|
getCrmPaymentAccountList({}).then((res) => (paymentAccountList.value = res.data || []));
|
|
|
|
getCrmPaymentAccountList({}).then((res) => (paymentAccountList.value = res.data || []));
|
|
|
|
getBasePrintTemplateList({ templateType: '1' }).then((res) => (printTemplateList.value = res.data || []));
|
|
|
|
getBasePrintTemplateList({ templateType: '1' }).then((res) => (printTemplateList.value = res.data || []));
|
|
|
|
|
|
|
|
allListDept({} as any).then((res) => (deptInfoList.value = res.data || []));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ----- 变更后物料:增删改 -----
|
|
|
|
// ----- 变更后物料:增删改 -----
|
|
|
|
@ -933,7 +988,11 @@ function buildPayload(changeStatus: '1' | '2'): ContractChangeSaveForm {
|
|
|
|
changeContractCode: f.changeContractCode,
|
|
|
|
changeContractCode: f.changeContractCode,
|
|
|
|
changeContractName: f.changeContractName,
|
|
|
|
changeContractName: f.changeContractName,
|
|
|
|
customerName: f.customerName,
|
|
|
|
customerName: f.customerName,
|
|
|
|
changeContractAmount: f.changeContractAmount
|
|
|
|
changeContractAmount: f.changeContractAmount,
|
|
|
|
|
|
|
|
undertakeDeptId: f.undertakeDeptId,
|
|
|
|
|
|
|
|
undertakeBy: f.undertakeBy,
|
|
|
|
|
|
|
|
industryRegion: f.industryRegion,
|
|
|
|
|
|
|
|
sealLegalEntity: f.sealLegalEntity
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if (f.changeType === '1') {
|
|
|
|
if (f.changeType === '1') {
|
|
|
|
payload.changeInfo = f.changeInfo;
|
|
|
|
payload.changeInfo = f.changeInfo;
|
|
|
|
@ -1019,6 +1078,17 @@ onMounted(async () => {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
form.value.changeType = '1';
|
|
|
|
form.value.changeType = '1';
|
|
|
|
form.value.flowStatus = 'draft';
|
|
|
|
form.value.flowStatus = 'draft';
|
|
|
|
|
|
|
|
// 新增时默认承办部门、承办人为当前登录用户
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
const infoRes = await getInfo();
|
|
|
|
|
|
|
|
if (infoRes?.data?.user) {
|
|
|
|
|
|
|
|
const user = infoRes.data.user as any;
|
|
|
|
|
|
|
|
if (user.deptId != null) form.value.undertakeDeptId = user.deptId;
|
|
|
|
|
|
|
|
if (user.userId != null) form.value.undertakeBy = user.userId;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
console.error('获取登录用户信息失败', e);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|