pull/781/head
zy 2025-05-28 14:30:29 +08:00
parent d97996dde6
commit c9baa7160e
2 changed files with 11 additions and 7 deletions

View File

@ -56,6 +56,7 @@
<el-select <el-select
v-model="formData.maintainer" v-model="formData.maintainer"
clearable clearable
filterable
:disabled="type" :disabled="type"
placeholder="请选择线维护人" placeholder="请选择线维护人"
class="w-1/1" class="w-1/1"
@ -74,7 +75,7 @@
<el-select <el-select
v-model="formData.requestorUserId" v-model="formData.requestorUserId"
clearable clearable
filterable
:disabled="formType || type" :disabled="formType || type"
:placeholder="formType ? '' : '请选择需求提交人'" :placeholder="formType ? '' : '请选择需求提交人'"
class="w-1/1" class="w-1/1"
@ -203,7 +204,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="平台" prop="platformId"> <el-form-item label="平台" prop="platformId">
<el-select v-model="formData.platformId" :disabled="type" clearable placeholder="请选择平台"> <el-select v-model="formData.platformId" filterable :disabled="type" clearable placeholder="请选择平台">
<el-option <el-option
v-for="dict in techOptions" v-for="dict in techOptions"
:key="dict.id" :key="dict.id"
@ -215,7 +216,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="项目难度" prop="projectDifficultyId"> <el-form-item label="项目难度" prop="projectDifficultyId">
<el-select v-model="formData.projectDifficultyId" :disabled="type" clearable placeholder="请选择项目难度" @change="changeDifficult"> <el-select v-model="formData.projectDifficultyId" filterable :disabled="type" clearable placeholder="请选择项目难度" @change="changeDifficult">
<el-option <el-option
v-for="dict in difficultOptions" v-for="dict in difficultOptions"
:key="dict.id" :key="dict.id"

View File

@ -761,6 +761,7 @@ const open = async (type: string) => {
// formLoading.value = true // formLoading.value = true
try { try {
formData.value = await ContractApi.getContract(type) formData.value = await ContractApi.getContract(type)
// handleQuotationChange(formData.value.quotationId)
} finally { } finally {
formLoading.value = false formLoading.value = false
} }
@ -882,6 +883,7 @@ const resetForm = () => {
const handleQuotationChange = async (quotationId: number) => { const handleQuotationChange = async (quotationId: number) => {
if (!quotationId) return if (!quotationId) return
try { try {
console.log('%csrc/views/crm/contract/ContractForm.vue:886 222', 'color: #007acc;', 222);
const quotation = await QuotationApi.getQuotation(quotationId) const quotation = await QuotationApi.getQuotation(quotationId)
formData.value.products = quotation.products; formData.value.products = quotation.products;
// formData.value.customerId = quotation.customerId; // formData.value.customerId = quotation.customerId;
@ -928,12 +930,15 @@ const onCustomerChange = async (customerId: string) => {
try { try {
formLoading.value = true; formLoading.value = true;
// let customerRes = {}
// if(formType.value) { // if(formType.value) {
// customerRes = await CustomerApi.getCustomer(customerId); // customerRes = await CustomerApi.getCustomer(customerId);
// }else { // }else {
let customerRes = await CustomerApi.getCustomerDetail(customerId); let customerRes = await CustomerApi.getCustomerDetail(customerId);
formData.value.quotationId = customerRes.quotationId; formData.value.quotationId = customerRes.quotationId;
formData.value.servicor = customerRes.servicor;
formData.value.technicalLead = customerRes.technicalLead;
formData.value.settlementLead = customerRes.settlementLead;
// } // }
formData.value.companyType = customerRes.companyType; formData.value.companyType = customerRes.companyType;
formData.value.listingStatus = customerRes.listingStatus; formData.value.listingStatus = customerRes.listingStatus;
@ -954,9 +959,7 @@ const onCustomerChange = async (customerId: string) => {
formData.value.registeredAddress = customerRes.registeredAddress; formData.value.registeredAddress = customerRes.registeredAddress;
formData.value.afterSaleUserId = customerRes.maintainer; formData.value.afterSaleUserId = customerRes.maintainer;
formData.value.clueDeveloper = customerRes.clueDeveloper; formData.value.clueDeveloper = customerRes.clueDeveloper;
formData.value.servicor = customerRes.servicor;
formData.value.technicalLead = customerRes.technicalLead;
formData.value.settlementLead = customerRes.settlementLead;
await handleQuotationChange(customerRes.quotationId); await handleQuotationChange(customerRes.quotationId);
} catch (err) { } catch (err) {