|
|
|
@ -422,7 +422,6 @@ import { useRoute, useRouter } from 'vue-router';
|
|
|
|
import { addCrmQuoteInfo, getCrmQuoteInfo, quoteSubmitAndFlowStart, updateCrmQuoteInfo } from '@/api/oa/crm/crmQuoteInfo';
|
|
|
|
import { addCrmQuoteInfo, getCrmQuoteInfo, quoteSubmitAndFlowStart, updateCrmQuoteInfo } from '@/api/oa/crm/crmQuoteInfo';
|
|
|
|
import { CrmQuoteInfoForm } from '@/api/oa/crm/crmQuoteInfo/types';
|
|
|
|
import { CrmQuoteInfoForm } from '@/api/oa/crm/crmQuoteInfo/types';
|
|
|
|
import type { CrmQuoteMaterialForm } from '@/api/oa/crm/crmQuoteMaterial/types';
|
|
|
|
import type { CrmQuoteMaterialForm } from '@/api/oa/crm/crmQuoteMaterial/types';
|
|
|
|
import { getBaseMaterialInfoList } from '@/api/oa/base/materialInfo';
|
|
|
|
|
|
|
|
import { getCrmCustomerContactList } from '@/api/oa/crm/customerContact';
|
|
|
|
import { getCrmCustomerContactList } from '@/api/oa/crm/customerContact';
|
|
|
|
import { getCrmSupplierInfoList } from '@/api/oa/crm/crmSupplierInfo';
|
|
|
|
import { getCrmSupplierInfoList } from '@/api/oa/crm/crmSupplierInfo';
|
|
|
|
import { getRuleGenerateCode } from '@/api/system/codeRule';
|
|
|
|
import { getRuleGenerateCode } from '@/api/system/codeRule';
|
|
|
|
@ -482,7 +481,6 @@ const rules = {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 下拉数据
|
|
|
|
// 下拉数据
|
|
|
|
const materialList = ref<any[]>([]);
|
|
|
|
|
|
|
|
const customerContactList = ref<any[]>([]);
|
|
|
|
const customerContactList = ref<any[]>([]);
|
|
|
|
const supplierList = ref<any[]>([]);
|
|
|
|
const supplierList = ref<any[]>([]);
|
|
|
|
// 供应商计划标识:1计划内,2计划外
|
|
|
|
// 供应商计划标识:1计划内,2计划外
|
|
|
|
@ -759,15 +757,6 @@ const onSupplierChanged = (supplierId: any) => {
|
|
|
|
form.supplierContactEmail = supplier.contactEmail || '';
|
|
|
|
form.supplierContactEmail = supplier.contactEmail || '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const onMaterialChange = (row: any) => {
|
|
|
|
|
|
|
|
// 根据选中物料带出单位与名称(若有),提升录入效率
|
|
|
|
|
|
|
|
const m = materialList.value.find((x: any) => x.materialId === row.materialId);
|
|
|
|
|
|
|
|
if (m) {
|
|
|
|
|
|
|
|
if (m.unitName) row.unitName = m.unitName;
|
|
|
|
|
|
|
|
if (!row.productName && m.materialName) row.productName = m.materialName;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 生成报价单编号(codeRuleCode=1004)
|
|
|
|
// 生成报价单编号(codeRuleCode=1004)
|
|
|
|
const generateQuoteCode = async () => {
|
|
|
|
const generateQuoteCode = async () => {
|
|
|
|
if (isCodeGenerated.value) return;
|
|
|
|
if (isCodeGenerated.value) return;
|
|
|
|
@ -864,8 +853,6 @@ const submitCallback = async () => {
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(async () => {
|
|
|
|
onMounted(async () => {
|
|
|
|
// 下拉数据初始化
|
|
|
|
// 下拉数据初始化
|
|
|
|
const materialRes = await getBaseMaterialInfoList({});
|
|
|
|
|
|
|
|
materialList.value = materialRes.data || [];
|
|
|
|
|
|
|
|
const contactRes = await getCrmCustomerContactList({});
|
|
|
|
const contactRes = await getCrmCustomerContactList({});
|
|
|
|
customerContactList.value = contactRes.data || [];
|
|
|
|
customerContactList.value = contactRes.data || [];
|
|
|
|
// 加载供应商列表(计划内供应商)
|
|
|
|
// 加载供应商列表(计划内供应商)
|
|
|
|
|