From 5b5c6374749159db03a14ee645760327930bbb28 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期一, 13 十月 2025 14:46:41 +0800
Subject: [PATCH] 修改

---
 src/views/work/qualityInfo/supplierQuality/satisfiedEvaluste/deliver/components/editDialog.vue |   72 +++++++++++++++++++++++++++++++++++-
 1 files changed, 70 insertions(+), 2 deletions(-)

diff --git a/src/views/work/qualityInfo/supplierQuality/satisfiedEvaluste/deliver/components/editDialog.vue b/src/views/work/qualityInfo/supplierQuality/satisfiedEvaluste/deliver/components/editDialog.vue
index 49fa348..302b7d1 100644
--- a/src/views/work/qualityInfo/supplierQuality/satisfiedEvaluste/deliver/components/editDialog.vue
+++ b/src/views/work/qualityInfo/supplierQuality/satisfiedEvaluste/deliver/components/editDialog.vue
@@ -38,7 +38,15 @@
         <el-row :gutter="24">
           <el-col :span="12">
             <el-form-item label="单位名称:" prop="unitName" >
-              <el-input :disabled="title === '查看'" v-model="state.form.unitName" placeholder="单位名称"></el-input>
+<!--              <el-input :disabled="title === '查看'" v-model="state.form.unitName" placeholder="单位名称"></el-input>-->
+              <el-select v-model="state.form.unitName" placeholder="请选择" filterable clearable style="width: 100%" :disabled="title == '查看'" @change="selectUnitCom">
+                <el-option
+                    v-for="item in state.supplierList"
+                    :key="item.id"
+                    :label="item.customerName"
+                    :value="item.id">
+                </el-option>
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -141,6 +149,7 @@
 import {verifyPhone} from "@/utils/validate";
 import {developList} from "@/views/work/qualityInfo/supplierQuality/supplierList/components/qualityDatas";
 import {addDelivery, editDelivery} from "@/api/satisfiedNew/satisfiedNew";
+import {getCustomer, getCustomerAll} from "@/api/customerList";
 
 const dialogVisible = ref(false);
 const title = ref("");
@@ -250,7 +259,8 @@
       name: '其他'
     },
   ],
-  checkProductTypes: []
+  checkProductTypes: [],
+  supplierList: []
 })
 
 onMounted(() => {
@@ -258,6 +268,7 @@
 
 });
 const openDialog = async (type, value,companyList) => {
+
   const userInfo = JSON.parse(Cookies.get('userInfo'))
   state.isAdmin = userInfo.userType === 0;
   state.form.companyName = userInfo.companyName
@@ -267,9 +278,11 @@
     state.form.companyName = value.companyName
     state.companyList = companyList
   }
+  await getSupplier()
   title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' ;
   if(type === 'edit' || type === 'review') {
     state.form = JSON.parse(JSON.stringify(value));
+    state.form.unitName = Number(state.form.unitName)
     if(state.isAdmin){
       state.form.companyId = value.companyId
       state.form.companyName = value.companyName
@@ -281,6 +294,17 @@
   dialogVisible.value = true;
 }
 
+const getSupplier = async () => {
+  const param = {
+    companyId: state.form.companyId,
+  }
+  const res = await getCustomerAll(param);
+  if(res.code === 200){
+    state.supplierList = res.data.data
+  }else{
+    ElMessage.warning(res.message)
+  }
+}
 const onSubmit = async () => {
   state.form.mess = JSON.stringify(state.dataList)
   state.form.product = state.checkProductTypes.join(',')
@@ -343,6 +367,38 @@
   }
   state.checkProductTypes = []
   state.companyList = []
+  state.dataList =[
+    {
+      num: '说明',
+      item: '哪项不满意,请在相应的选项“⬜︎︎︎”内打“√”',
+      satisfied:'总体评价,请在相应的选项“⬜︎︎︎”内打“√”'
+    },
+    {
+      num: '1',
+      item: ['产品性能','技术资料','操作性','维护性','稳定性'],
+      satisfied:['满意','基本满意','不满意']
+    },
+    {
+      num: '2',
+      item: ['节点控制','交付及时性','可靠性'],
+      satisfied:['满意','基本满意','不满意']
+    },
+    {
+      num: '3',
+      item: ['顾客培训','技术支持','售后维修','备品及备件供应'],
+      satisfied:['满意','基本满意','不满意']
+    },
+    {
+      num: '4',
+      item: ['技术技能','服务态度','过程规范','综合素质'],
+      satisfied:['满意','基本满意','不满意']
+    },
+    {
+      num: '5',
+      item: ['服务的及时性','有效性','服务态度'],
+      satisfied:['满意','基本满意','不满意']
+    },
+  ]
 }
 
 
@@ -367,7 +423,19 @@
     state.yearList.push({ value, label: value }); // 添加新选项(这里简单地将值和标签设为相同)
   }
 }
+const selectUnitCom = (val) => {
+  state.form.person = ''
+  state.form.address = ''
+  state.form.phone = ''
+  state.supplierList.forEach(item => {
+    if(val == item.id){
+      state.form.person = item.person
+      state.form.address = item.customerAddr
+      state.form.phone = item.phone
+    }
+  })
 
+}
 defineExpose({
   openDialog
 });

--
Gitblit v1.9.2