From 2816d4ec63dc9ed11f78ca2ee6fd6182967a7700 Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: 星期一, 15 十二月 2025 15:14:44 +0800
Subject: [PATCH] 修改新增

---
 src/views/work/qualityInfo/outsourcingCooperate/outsourcedProductName/components/editDialog.vue |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/views/work/qualityInfo/outsourcingCooperate/outsourcedProductName/components/editDialog.vue b/src/views/work/qualityInfo/outsourcingCooperate/outsourcedProductName/components/editDialog.vue
index e006edc..828de7e 100644
--- a/src/views/work/qualityInfo/outsourcingCooperate/outsourcedProductName/components/editDialog.vue
+++ b/src/views/work/qualityInfo/outsourcingCooperate/outsourcedProductName/components/editDialog.vue
@@ -10,7 +10,7 @@
     >
       <el-form :model="state.form" size="default" ref="superRef" :rules="state.formRules" label-width="150px" >
         <el-form-item v-if="state.isAdmin" label="单位:" prop="companyId">
-          <el-select v-model="state.form.companyId" placeholder="请选择" :disabled="state.title =='查看'" clearable style="width: 100%">
+          <el-select v-model="state.form.companyId" placeholder="请选择" :disabled="state.title =='查看'" clearable style="width: 100%" @change="getSupplier()">
             <el-option
                 v-for="item in state.companyList"
                 :key="item.id"
@@ -82,7 +82,7 @@
   if(isAdmin){
     state.companyList = companyList
   }
-  await getSupplierList()
+  await getSupplierList(companyId)
   state.title = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看'
   state.form.companyId = companyId
   if(state.title == '编辑'||state.title == '查看'){
@@ -95,10 +95,15 @@
   dialogVisible.value = true
 }
 
-const getSupplierList = async ()=>{
+const getSupplier = async ()=>{
+  await getSupplierList(state.form.companyId)
+}
+
+const getSupplierList = async (companyId)=>{
   const queryParams = {
     pageNum: 1,
-    pageSize: 999
+    pageSize: 999,
+    companyId: companyId
   }
   const res = await getSupplierPage(queryParams)
   if (res.code == 200) {

--
Gitblit v1.9.2