yyb
昨天 dacc95761cf7090c628fc37a5d4f8bb825ccbbb0
src/views/salesManagement/salesQuotation/index.vue
@@ -300,7 +300,6 @@
import Pagination from '@/components/PIMTable/Pagination.vue'
import FormDialog from '@/components/Dialog/FormDialog.vue'
import {getQuotationList,addQuotation,updateQuotation,deleteQuotation} from '@/api/salesManagement/salesQuotation.js'
import {customerList} from "@/api/salesManagement/salesLedger.js";
import {modelList, productTreeList} from "@/api/basicData/product.js";
import {listCustomer} from "@/api/basicData/customer.js";
import { userListNoPage } from "@/api/system/user.js";
@@ -316,7 +315,7 @@
const quotationList = ref([])
const userList = ref([])
const productOptions = ref([]);
const modelOptions = ref([]);
const modelOptions  = ref([]);
const pagination = reactive({
  total: 3,
  currentPage: 1,
@@ -328,7 +327,8 @@
const dialogTitle = ref('新增报价')
const form = reactive({
  quotationNo: '',
  customerId: '',
  customerId: undefined,
  customer: '',
  salesperson: '',
  quotationDate: '',
  validDate: '',
@@ -407,6 +407,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 +542,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 +743,7 @@
        id: item.id,
        quotationNo: item.quotationNo || '',
        customer: item.customer || '',
        customerId: item.customerId || undefined,
        salesperson: item.salesperson || '',
        quotationDate: item.quotationDate || '',
        validDate: item.validDate || '',
@@ -782,6 +790,7 @@
onMounted(()=>{
  getUserList()
  handleSearch()
  fetchCustomerOptions()
})
</script>