huminmin
16 小时以前 bcc665fab6efc7c73d6034272a29ab3f15fe1cf8
src/views/salesManagement/salesQuotation/index.vue
@@ -328,7 +328,8 @@
const dialogTitle = ref('新增报价')
const form = reactive({
  quotationNo: '',
  customerId: '',
  customerId: undefined,
  customer: '',
  salesperson: '',
  quotationDate: '',
  validDate: '',
@@ -407,6 +408,11 @@
  resetForm()
  dialogVisible.value = true
  getProductOptions();
  fetchCustomerOptions()
}
const fetchCustomerOptions = () => {
  if (customerOption.value.length > 0) return
  listCustomer({current: -1,size:-1, type: 0}).then((res) => {
    customerOption.value = res.data.records;
  });
@@ -537,10 +543,12 @@
  form.id = row.id || form.id || null
  // 先加载产品树数据,否则 el-tree-select 无法反显产品名称
  await getProductOptions()
  await fetchCustomerOptions()
  // 只复制需要的字段,避免将组件引用放入响应式对象
  form.quotationNo = row.quotationNo || ''
  form.customer = row.customer || ''
  form.customerId = row.customerId || undefined
  form.salesperson = row.salesperson || ''
  form.quotationDate = row.quotationDate || ''
  form.validDate = row.validDate || ''
@@ -736,6 +744,7 @@
        id: item.id,
        quotationNo: item.quotationNo || '',
        customer: item.customer || '',
        customerId: item.customerId || undefined,
        salesperson: item.salesperson || '',
        quotationDate: item.quotationDate || '',
        validDate: item.validDate || '',