xiaodai2022 2 years ago
parent
commit
223260013e

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/0.js


+ 35 - 13
src/views/serviceParam/supplier/components/baseForm.vue

@@ -258,7 +258,7 @@
         </el-form-item>
       </el-col>
       <el-col :span="24"><div class="supplierAdd-title">联系人信息</div></el-col>
-      <el-col :span="6">
+      <el-col :span="8">
         <el-form-item label="姓名" prop="contactor">
           <el-input
             v-model="ruleForm.contactor"
@@ -268,7 +268,7 @@
           />
         </el-form-item>
       </el-col>
-      <el-col :span="6">
+      <el-col :span="8">
         <el-form-item label="手机号" prop="mobile">
           <el-input
             v-model="ruleForm.mobile"
@@ -278,17 +278,18 @@
           />
         </el-form-item>
       </el-col>
-      <el-col :span="6">
-        <el-form-item label="座机号" prop="telephone">
+      <el-col :span="8">
+        <el-form-item label="电子邮箱" prop="email">
           <el-input
-            v-model="ruleForm.telephone"
+            v-model="ruleForm.email"
             :disabled="type !== 'add' && type !== 'edit'"
-            placeholder="座机号"
+            placeholder="电子邮箱"
             maxlength="50"
           />
         </el-form-item>
       </el-col>
-      <el-col :span="6">
+
+      <el-col :span="8">
         <el-form-item label="职位" prop="position">
           <el-input
             v-model="ruleForm.position"
@@ -298,6 +299,16 @@
           />
         </el-form-item>
       </el-col>
+      <el-col :span="8">
+        <el-form-item label="座机号" prop="telephone">
+          <el-input
+            v-model="ruleForm.telephone"
+            :disabled="type !== 'add' && type !== 'edit'"
+            placeholder="座机号"
+            maxlength="50"
+          />
+        </el-form-item>
+      </el-col>
       <el-col :span="24"> <div class="supplierAdd-title">营业执照信息</div></el-col>
 
       <el-col :span="16">
@@ -433,6 +444,7 @@ import {
   isSpecialSymbol,
   hasSpace,
   isAddr,
+  validEmail,
 } from "@/utils/validate";
 export default {
   name: "supplierAdd",
@@ -487,6 +499,17 @@ export default {
         }
       }
     };
+    const validateEmail = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("邮箱不能为空!"));
+      } else {
+        if (!validEmail(value)) {
+          callback(new Error("邮箱格式不正确!"));
+        } else {
+          callback();
+        }
+      }
+    };
     return {
       loading: false,
       hand_name: "",
@@ -573,6 +596,7 @@ export default {
         ],
         contactor: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
         mobile: [{ required: true, validator: validatemobile, trigger: "blur" }],
+        email: [{ required: true, validator: validateEmail, trigger: "blur" }],
         telephone: [{ required: false, validator: validatetelephone, trigger: "blur" }],
         position: [{ required: true, message: "职位不能为空", trigger: "blur" }],
         registercode: [{ required: true, validator: validateLicense, trigger: "blur" }],
@@ -635,6 +659,7 @@ export default {
         personid,
         person,
         telephone,
+        email,
       } = this.sitem;
       this.hand_name = person || "";
       this.ruleForm = {
@@ -655,6 +680,7 @@ export default {
         position: position || "",
         registercode: registercode || "",
         name: name || "",
+        email: email || "",
         nature: nature || "",
         addr: addr || "",
         legaler: legaler || "",
@@ -719,12 +745,8 @@ export default {
       this.$refs.ruleForm.validateField("personid");
     },
     type_search_change(e) {
-      const { id, code, label } = e;
-      if (id) {
-        this.ruleForm.nature = id;
-      } else {
-        this.ruleForm.nature = "";
-      }
+      const { id } = e;
+      this.ruleForm.nature = id ? id : "";
       this.$refs.ruleForm.validateField("nature");
     },
 

+ 8 - 21
src/views/serviceParam/supplier/detail.vue

@@ -1,9 +1,6 @@
 <template>
   <div class="supplierDetail">
-    <div
-      class="supplierDetail-main"
-      v-if=" powers.some((i) => i == '007')"
-    >
+    <div class="supplierDetail-main" v-if="powers.some((i) => i == '007')">
       <show-data-table
         style="padding: 10px 0 5px 0"
         :newTime="newTime"
@@ -16,8 +13,7 @@
             :size="'mini'"
             :type="sitem.status == '0' ? 'warning' : ''"
             v-text="
-              (statusOptions.find((item) => item.id == sitem.status) || {})
-                .label || '--'
+              (statusOptions.find((item) => item.id == sitem.status) || {}).label || '--'
             "
           ></el-tag>
         </template>
@@ -34,8 +30,7 @@
                 : ''
             "
             v-text="
-              (ocr_status.find((item) => item.id == sitem.ocr_status) || {})
-                .label || '--'
+              (ocr_status.find((item) => item.id == sitem.ocr_status) || {}).label || '--'
             "
           ></el-tag>
         </template>
@@ -86,7 +81,7 @@
     </div>
   </div>
 </template>
-   <script>
+<script>
 import asyncRequest from "@/apis/service/serviceParam/supplier";
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
@@ -101,9 +96,8 @@ export default {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {
       const tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "supplierDetail"
-        ) || {};
+        this.$store.getters.btnList.find((item) => item.menu_route == "supplierDetail") ||
+        {};
       const { action } = tran ?? {};
       return action ?? [];
     },
@@ -224,13 +218,7 @@ export default {
       console.log(row);
     },
     async refresh(e) {
-      const { id } = e;
-      let model = {
-        id: this.queryType === "add" ? id : this.queryId,
-        type: "view",
-      };
-      this.routeReGoto("supplierDetail", model);
-      await this.initForm();
+      this.routeReGoto("supplier", {});
     },
     async initData() {
       this.loading = true;
@@ -255,7 +243,7 @@ export default {
   },
 };
 </script>
-   <style lang="scss" scoped>
+<style lang="scss" scoped>
 .supplierDetail {
   position: relative;
   height: 100%;
@@ -298,4 +286,3 @@ export default {
   }
 }
 </style>
-   

+ 9 - 9
src/views/serviceParam/supplier/index.vue

@@ -315,56 +315,56 @@ export default {
         {
           prop: "code",
           label: "编号",
-          width: "160",
+          minWidth: "160",
         },
         {
           prop: "name",
           label: "供应商名称",
+          minWidth: "200",
         },
         {
           prop: "status",
           label: "状态",
-          width: "60",
+          minWidth: "60",
           _slot_: "status",
         },
         {
           prop: "ocr_status",
           label: "营业执照识别状态",
-          width: "120",
+          minWidth: "120",
           _slot_: "ocr_status",
         },
 
         {
           prop: "legaler",
           label: "法人",
-          width: "80",
+          minWidth: "80",
         },
         {
           prop: "person",
           label: "负责人",
-          width: "100",
+          minWidth: "100",
         },
         {
           prop: "company_name",
           label: "创建人部门",
-          minWidth: "150px",
+          minWidth: "120px",
         },
         {
           prop: "creater",
           label: "创建人",
-          width: "100",
+          minWidth: "80",
         },
         {
           prop: "addtime",
           label: "创建时间",
           width: "145",
-          sortable: true,
         },
         {
           prop: "",
           label: "操作",
           fixed: "right",
-          width: "180",
+          width: "140",
           _noset_: true,
           _slot_: "operation",
         },

Some files were not shown because too many files changed in this diff