戴艳蓉 3 роки тому
батько
коміт
037dfb7b39
1 змінених файлів з 20 додано та 16 видалено
  1. 20 16
      src/views/serviceParam/supplier/components/baseForm.vue

+ 20 - 16
src/views/serviceParam/supplier/components/baseForm.vue

@@ -185,6 +185,7 @@
             />
             <el-link
               class="fl"
+              v-if="type !== 'view'"
               :underline="false"
               @click="deleteimg()"
               type="warning"
@@ -271,7 +272,7 @@
             v-model="ruleForm.contactor"
             :disabled="type !== 'add' && type !== 'edit'"
             placeholder="姓名"
-            minlength="20"
+            maxlength="20"
           />
         </el-form-item>
       </el-col>
@@ -281,7 +282,7 @@
             v-model="ruleForm.mobile"
             :disabled="type !== 'add' && type !== 'edit'"
             placeholder="手机号"
-            minlength="20"
+            maxlength="20"
           />
         </el-form-item>
       </el-col>
@@ -291,7 +292,7 @@
             v-model="ruleForm.telephone"
             :disabled="type !== 'add' && type !== 'edit'"
             placeholder="座机号"
-            minlength="20"
+            maxlength="20"
           />
         </el-form-item>
       </el-col>
@@ -301,7 +302,7 @@
             v-model="ruleForm.position"
             :disabled="type !== 'add' && type !== 'edit'"
             placeholder="职位"
-            minlength="20"
+            maxlength="20"
           />
         </el-form-item>
       </el-col>
@@ -315,11 +316,11 @@
             v-model="ruleForm.name"
             :disabled="type !== 'add' && type !== 'edit'"
             placeholder="供应商名称"
-            minlength="20"
+            maxlength="20"
           />
         </el-form-item>
       </el-col>
-      <el-col :span="8"  v-if="(ruleForm.supplier_img==='' && (type === 'add'|| type === 'edit'))">
+      <el-col :span="8" v-if="!(ruleForm.supplier_img && type === 'add')">
         <el-form-item
           label="统一社会信用代码"
           prop="registercode"
@@ -327,14 +328,17 @@
         >
           <el-input
             v-model="ruleForm.registercode"
-            :disabled="type !== 'add' && type !== 'edit'"
+            :disabled="
+              (ruleForm.supplier_img && (type == 'add' || type == 'edit')) ||
+              (type !== 'add' && type !== 'edit')
+            "
             placeholder="统一社会信用代码"
-            minlength="20"
+            maxlength="20"
           />
         </el-form-item>
       </el-col>
 
-      <el-col :span="16" v-if="(ruleForm.supplier_img==='' && (type === 'add'|| type === 'edit'))">
+      <el-col :span="16" v-if="!(ruleForm.supplier_img && type === 'add')">
         <el-form-item label="详细地址" prop="addr">
           <el-input
             v-model="ruleForm.addr"
@@ -343,11 +347,11 @@
               (type !== 'add' && type !== 'edit')
             "
             placeholder="详细地址"
-            minlength="20"
+            maxlength="20"
           />
         </el-form-item>
       </el-col>
-      <el-col :span="8"  v-if="(ruleForm.supplier_img==='' && (type === 'add'|| type === 'edit'))">
+      <el-col :span="8" v-if="!(ruleForm.supplier_img && type === 'add')">
         <el-form-item label="公司类型" prop="nature">
           <search-company-type
             :value="ruleForm.nature"
@@ -363,7 +367,7 @@
         </el-form-item>
       </el-col>
 
-      <el-col :span="16"  v-if="(ruleForm.supplier_img==='' && (type === 'add'|| type === 'edit'))">
+      <el-col :span="16" v-if="!(ruleForm.supplier_img && type === 'add')">
         <el-form-item label="运营范围" prop="scope">
           <el-input
             v-model="ruleForm.scope"
@@ -374,11 +378,11 @@
               (type !== 'add' && type !== 'edit')
             "
             placeholder="运营范围"
-            minlength="20"
+            maxlength="20"
           />
         </el-form-item>
       </el-col>
-      <el-col :span="8"  v-if="(ruleForm.supplier_img==='' && (type === 'add'|| type === 'edit'))">
+      <el-col :span="8" v-if="!(ruleForm.supplier_img && type === 'add')">
         <el-form-item label="法人代表" prop="legaler">
           <el-input
             v-model="ruleForm.legaler"
@@ -387,7 +391,7 @@
               (type !== 'add' && type !== 'edit')
             "
             placeholder="法人代表"
-            minlength="20"
+            maxlength="20"
           />
         </el-form-item>
         <el-form-item label="成立日期" prop="registertime">
@@ -502,7 +506,7 @@ export default {
         { value: "1", label: "月清" },
         { value: "2", label: "双月清" },
       ],
-        ocr_status: [
+      ocr_status: [
         { id: "0", label: "未上传" },
         { id: "1", label: "识别成功" },
         { id: "2", label: "识别失败" },