From d936ea4fe6869de05adc46f35cbba826eec7217c Mon Sep 17 00:00:00 2001
From: zhengmingliang <hongtianzai@126.com>
Date: Wed, 9 Nov 2022 09:36:25 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B5=84=E8=B4=A8=E5=8A=9F?=
 =?UTF-8?q?=E8=83=BDbug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/views/purchase/supCertAddDialog.vue          | 4 ++--
 src/views/purchase/supCertificationAdd.vue       | 5 +++++
 src/views/purchase/supCompanyAduditDialog.vue    | 9 +++++++++
 src/views/purchase/supManufacturerEditDialog.vue | 9 ++++++---
 src/views/purchase/supProductEditDialog.vue      | 3 ++-
 5 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/src/views/purchase/supCertAddDialog.vue b/src/views/purchase/supCertAddDialog.vue
index 55705bd..1b198cf 100644
--- a/src/views/purchase/supCertAddDialog.vue
+++ b/src/views/purchase/supCertAddDialog.vue
@@ -88,8 +88,8 @@
           <el-col :span="8">
             <el-form-item prop="need">
               <el-select v-model="formData.status" style="width: 100%">
-                <el-option label="禁用" :value=1></el-option>
-                <el-option label="启用" :value=0></el-option>
+                <el-option label="失效" :value=1></el-option>
+                <el-option label="有效" :value=0></el-option>
               </el-select>
             </el-form-item>
           </el-col>
diff --git a/src/views/purchase/supCertificationAdd.vue b/src/views/purchase/supCertificationAdd.vue
index 8930439..d49d951 100644
--- a/src/views/purchase/supCertificationAdd.vue
+++ b/src/views/purchase/supCertificationAdd.vue
@@ -184,6 +184,7 @@
                         <el-button
                             type="text"
                             size="small"
+                            :disabled="scope.row.auditStatus === 1"
                             @click.native="deleteRegistration(scope.row)"
                         >删除
                         </el-button
@@ -464,6 +465,10 @@ export default {
             this.getRegistrationList();
         },
         onSubmit2() {
+            if(this.currentManufacturer==null){
+                this.$message.error("请先选中生产企业!");
+                return
+            }
             this.getRegistrationList();
         },
         registrationDialog(row) {
diff --git a/src/views/purchase/supCompanyAduditDialog.vue b/src/views/purchase/supCompanyAduditDialog.vue
index 0519b3d..d3c6ac0 100644
--- a/src/views/purchase/supCompanyAduditDialog.vue
+++ b/src/views/purchase/supCompanyAduditDialog.vue
@@ -142,6 +142,11 @@
                     <el-table-column label="有效期" prop="vailDate"></el-table-column>
                     <el-table-column label="失效期" prop="expireDate"></el-table-column>
                     <el-table-column label="备注" prop="remark"></el-table-column>
+                    <el-table-column label="证书状态" prop="status">
+                    <template slot-scope="scope">
+                                {{ supStatus[scope.row.status] }}
+                        </template>
+                    </el-table-column>
                     <el-table-column label="审核状态" prop="auditStatus" width="120">
                         <template slot-scope="scope">
                             <el-tag :type="(scope.row.auditStatus) | statusFilterType">
@@ -355,6 +360,10 @@ export default {
                 3: "变更未审核",
                 6: "未审核",
             },
+            supStatus: {
+                0: "有效",
+                1: "失效",
+            },
             certAuditVisible: false,
             currentAudit: {},
         };
diff --git a/src/views/purchase/supManufacturerEditDialog.vue b/src/views/purchase/supManufacturerEditDialog.vue
index 203e5fa..e1de3c7 100644
--- a/src/views/purchase/supManufacturerEditDialog.vue
+++ b/src/views/purchase/supManufacturerEditDialog.vue
@@ -226,7 +226,7 @@
                                 type="text"
                                 size="small"
                                 @click.native="addCert(scope.row)"
-                                v-if="scope.row.auditStatus == 0 || scope.row.auditStatus == 2|| scope.row.auditStatus == 6"
+                               
                             >编辑
                             </el-button
                             >
@@ -358,7 +358,7 @@ export default {
             classesDisplay: false,
             selectedOptions: [],
             selectedOptions2: [],
-            options: regionDataPlus,
+            options: regionData,
             rules: {
 
                 customerId: [
@@ -478,7 +478,10 @@ export default {
         } else {
             this.certQuery.customerId = this.inputQuery.customerId;
             this.selectedOptions = this.inputQuery.placeAreaCode.split(",");
-            this.selectedOptions2 = this.inputQuery.productionAreaCode.split(",");
+            if(this.inputQuery.productionAreaCode!="" && this.inputQuery.productionAreaCode!=null && this.inputQuery.productionAreaCode!=undefined){
+                this.selectedOptions2 = this.inputQuery.productionAreaCode.split(",");
+            }
+           
 
         }
         this.certQuery.manufacturerIdFk = this.inputQuery.manufacturerId;
diff --git a/src/views/purchase/supProductEditDialog.vue b/src/views/purchase/supProductEditDialog.vue
index 343fa48..4afcee2 100644
--- a/src/views/purchase/supProductEditDialog.vue
+++ b/src/views/purchase/supProductEditDialog.vue
@@ -42,7 +42,7 @@
                         size="mini"
                         icon="search"
                         v-if="inputQuery.auditStatus == 4|| inputQuery.auditStatus == 1|| inputQuery.auditStatus == 2"
-                        @click="onModifySubmit(4)"
+                        @click="onModifySubmit(3)"
                     >提交审核
                     </el-button
                     >
@@ -286,6 +286,7 @@
                         <el-button
                             type="text"
                             size="small"
+                            :disabled="scope.row.auditStatus === 1"
                             @click.native="deleteCompanyCert(scope.row)"
                         >删除
                         </el-button