snow 2 år sedan
förälder
incheckning
e35067cb4b

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/static/js/0.js


+ 19 - 60
src/views/interest/account/addEditDepart.vue

@@ -21,7 +21,7 @@
             :model="ruleForm"
             status-icon
             :size="'mini'"
-            :rules="rulesThis"
+            :rules="rules"
             label-width="80px"
             class="demo-ruleForm"
           >
@@ -60,7 +60,7 @@
               </el-col>
 
               <el-col :span="24">
-                <el-form-item v-loading="departLoading" label="部门">
+                <el-form-item v-loading="departLoading" label="部门" prop="itemid">
                   <el-cascader
                     v-model="ruleForm.itemid"
                     :disabled="!companyNo"
@@ -68,6 +68,7 @@
                     :options="departData"
                     :props="{value:'id',label:'name',children:'child',expandTrigger:'hover'}"
                     placeholder="请选择部门"
+                    @change="handleDepartChange"
                   />
                 </el-form-item>
               </el-col>
@@ -94,44 +95,11 @@ import asyncRequest from '@/apis/service/interest/account'
 import companyHelper from '@/mixins/companyHelper'
 import resToken from '@/mixins/resToken'
 
-import {
-  isMobile,
-  isEmoticon
-} from '@/utils/validate'
-
 export default {
   name: 'Account',
   mixins: [resToken, companyHelper],
   props: ['showModel', 'id', 'isDetail', 'sitem'],
   data() {
-    const validatename = (_, value, callback) => {
-      if (value === '') {
-        callback(new Error('真实姓名不能为空!'))
-      } else {
-        if (value.length < 2 || value.length > 12) {
-          callback(new Error('真实姓名规则为2~12位!'))
-        } else {
-          if (isEmoticon(value)) {
-            callback(new Error('真实姓名规则为2~12位!'))
-          } else {
-            callback()
-          }
-        }
-      }
-    }
-
-    const validatemobile = (rule, value, callback) => {
-      if (value === '') {
-        callback(new Error('手机号不能为空!'))
-      } else {
-        if (!isMobile(value)) {
-          callback(new Error('手机号格式不正确!'))
-        } else {
-          callback()
-        }
-      }
-    }
-
     return {
       companyNo: '',
       roleList: [],
@@ -155,24 +123,11 @@ export default {
       platformoptions: [],
       rulesThis: this.rules,
       rules: {
-        nickname: [
-          {
-            required: true,
-            validator: validatename,
-            trigger: 'blur'
-          }
-        ],
-        mobile: [
-          {
-            required: true,
-            validator: validatemobile,
-            trigger: 'blur'
-          }
-        ],
-        role_id: [
+        itemid: [
           {
+            type: 'array',
             required: true,
-            message: '请选择角色',
+            message: '请选择部门',
             trigger: 'change'
           }
         ]
@@ -199,6 +154,10 @@ export default {
     }
   },
   methods: {
+    handleDepartChange() {
+      console.log(11)
+      this.$nextTick(() => this.$refs.ruleForm.validateField('itemid'))
+    },
     async initForm() {
       this.loading = true
 
@@ -210,11 +169,11 @@ export default {
       if (this.id === 'add') {
         this.rulesThis = this.rules
       } else {
-        if (this.isDetail) {
-          this.rulesThis = {}
-        } else {
-          this.rulesThis = this.rules
-        }
+        // if (this.isDetail) {
+        //   this.rulesThis = {}
+        // } else {
+        //   this.rulesThis = this.rules
+        // }
       }
       this.loading = false
     },
@@ -339,10 +298,10 @@ export default {
       })
     },
     async submitForm() {
-      if (!this.ruleForm.itemid || this.ruleForm.itemid.length === 0) {
-        this.$message.warning('请选择部门')
-        return
-      }
+      // if (!this.ruleForm.itemid || this.ruleForm.itemid.length === 0) {
+      //   this.$message.warning('请选择部门')
+      //   return
+      // }
 
       await this.$refs.ruleForm.validate(async(valid) => {
         if (valid) {

+ 40 - 30
src/views/serviceParam/storeSet/index.vue

@@ -162,6 +162,10 @@
           ></el-tag>
         </template>
 
+        <template #wsm_type="{scope}">
+          {{(options.find((item) => item.value === String(scope.row.wsm_type)) || {}).label || '--'}}
+        </template>
+
         <template #operation="{ scope }">
           <el-tooltip
             v-if="powers.some((i) => i == '007')"
@@ -250,28 +254,6 @@ export default {
   },
   data() {
     return {
-      options: [
-        // {
-        //   value: "1",
-        //   label: "系统仓",
-        // },
-        //   {
-        //   value: "2",
-        //   label: "虚拟仓",
-        // },
-        //     {
-        //   value: "3",
-        //   label: "自建仓",
-        // },
-        {
-          value: "5",
-          label: "销售仓",
-        },
-        {
-          value: "4",
-          label: "次品仓",
-        },
-      ],
       select: "1", //选择
       input: "",
       supplierNo: [], //供应商
@@ -294,6 +276,28 @@ export default {
         size: 15,
         page: 1,
       },
+      options: [
+        // {
+        //   value: "1",
+        //   label: "系统仓",
+        // },
+        //   {
+        //   value: "2",
+        //   label: "虚拟仓",
+        // },
+        //     {
+        //   value: "3",
+        //   label: "自建仓",
+        // },
+        {
+          value: '5',
+          label: '销售仓'
+        },
+        {
+          value: '4',
+          label: '次品仓'
+        }
+      ],
       tableData: [],
       passwordModel: false,
       passwordModelId: 0,
@@ -322,11 +326,13 @@ export default {
         {
           prop: "name",
           label: "仓库名称",
+          minWidth:'160px'
         },
         {
-          prop: "type_name",
+          prop: "wsm_type",
           label: "仓库类型",
           width: "80px",
+          _slot_: "wsm_type",
         },
         {
           prop: "companyNo",
@@ -345,21 +351,25 @@ export default {
           // sortable: true,
           _slot_: "status",
         },
+
+        /**
+         * @todo 负责人字段没给
+        */
         {
-          prop: "company_new_name",
-          label: "负责人部门",
-          minWidth: "150px",
-        },
-        {
-          prop: "contactor_name",
+          prop: "todo",
           label: "负责人",
-          width: "70px",
+          minWidth: "70px",
         },
         {
           prop: "mobile",
           label: "负责人电话",
           width: "100px",
         },
+        {
+          prop: "contactor_name",
+          label: "创建人",
+          width: "70px",
+        },
         {
           prop: "addtime",
           label: "创建时间",

+ 3 - 0
src/views/serviceParam/supplier/components/baseForm.vue

@@ -625,6 +625,7 @@ export default {
     resetFormData() {
       const {
         id,
+        code,
         coop_state,
         source,
         type,
@@ -650,9 +651,11 @@ export default {
         telephone,
         email
       } = this.sitem
+
       this.hand_name = person || ''
       this.ruleForm = {
         id: id || '',
+        code: code || '',
         coop_state: coop_state || '',
         source: source || '',
         type: type || '',

+ 10 - 2
src/views/serviceParam/workCompany/index.vue

@@ -203,11 +203,13 @@
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/serviceParam/workCompany";
+import companyHelper from "@/mixins/companyHelper"
 import addEdit from "./addEdit";
 import { mapGetters } from "vuex";
+
 export default {
   name: "workCompany",
-  mixins: [mixinPage, resToken],
+  mixins: [mixinPage, resToken, companyHelper],
   components: {
     addEdit,
   },
@@ -377,7 +379,11 @@ export default {
         return;
       }
       this.loading = true;
-      const res = await asyncRequest.list(this.parmValue);
+      const res = await asyncRequest.list({
+        ...this.parmValue,
+        needRela: true
+      });
+      
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
         this.pageInfo.total = Number(res.data.count);
@@ -403,7 +409,9 @@ export default {
             id: id,
             status: status + "" === "1" ? "0" : "1",
           };
+          
           const res = await asyncRequest.status(model);
+
           if (res && res.code === 0) {
             this.loading = false;
             this.$notify.success({

Vissa filer visades inte eftersom för många filer har ändrats