فهرست منبع

fix(初始化账户):获取流程节点权限

snow 2 سال پیش
والد
کامیت
12a1fba249

+ 6 - 1
src/apis/user/index.js

@@ -57,10 +57,15 @@ export function usergetinfo(data) {
 
 // 获取角色流程节点详情
 export function roleProcessInfo(data) {
+  const _data = {
+    ...data,
+    noRelation: true
+  }
+
   return http({
     url: `${urlConfig.baseURL}admin/role_process_detail`,
     method: "post",
-    data,
+    data: _data,
   });
 }
 

+ 4 - 1
src/components/globalComponents/search-stock/main.vue

@@ -6,14 +6,15 @@
     remote
     clearable
     :multiple-limit="1"
+    :disabled="disabled"
     reserve-keyword
     :size="size || 'medium'"
     style="width: 100%"
     :placeholder="placeholder || ''"
-    :disabled="disabled || (isRelation && companyCode === '')"
     :loading="selectLoading"
     @change="selectChange"
   >
+  <!-- :disabled="disabled || (isRelation && companyCode === '')" -->
     <el-option
       v-for="(item, index) in options"
       :key="item.id + index"
@@ -129,7 +130,9 @@ export default {
       this.formValue.supplierNo = this.companyCode || "";
       this.formValue.companyNo = this.companyNo || "";
       this.formValue.wsm_type = this.wsmtype || "";
+      
       const { code, data, message } = await asyncRequest.list(this.formValue);
+
       if (code === 0) {
         const { list } = data;
         this.options = list;

+ 14 - 11
src/store/modules/user.js

@@ -166,24 +166,27 @@ const actions = {
         } else if (ucode !== 0) {
           resolve({ code: ucode, data: udata, massage: umsg });
         } else {
+          const { level, private_field, roleid } = udata;
+          console.log(private_field);
         
           // // 保存默认业务公司名称
           // commit("business_company", business_company);
           // // 保存默认业务公司编号
           // commit("business_companyNo", business_companyNo);
+
           // 关键字段设置
-          // commit("private_field", private_field === "" ? [] : private_field);
-          // const { pcode, pdata, pmsg } = await getRoleProcess(roleid);
-          // if (pcode >= 100 && pcode <= 104) {
-          //   resolve("noToken");
-          // } else if (pcode !== 0) {
-          //   resolve({ code: pcode, data: {}, massage: pmsg });
-          // } else {
-            // 保存默认业务公司编号
-            // commit("roleProcess", pdata ?? []);
+          commit("private_field", !private_field ? [] : private_field);
+          const { pcode, pdata, pmsg } = await getRoleProcess(roleid);
+
+          if (pcode >= 100 && pcode <= 104) {
+            resolve("noToken");
+          } else if (pcode !== 0) {
+            resolve({ code: pcode, data: {}, massage: pmsg });
+          } else {
+            commit("roleProcess", pdata ?? []);
 
           //保存是否超管用户
-          commit("setSupertube", udata.level === '1');
+            commit("setSupertube", level === '1');
           //获取菜单
           const { mcode, mdata, mmsg } = await getRoleMenuList();
             if (mcode >= 100 && mcode <= 104) {
@@ -200,7 +203,7 @@ const actions = {
               initRouter(arrag, that);
               resolve(isok ? "success-dataV" : "success");
             }
-          // }
+          }
         }
       }
     });

+ 16 - 16
src/views/serviceParam/storeSet/addEdit.vue

@@ -46,7 +46,7 @@
                   />
                 </el-form-item>
               </el-col>
-              <el-col :span="12"
+              <!-- <el-col :span="12"
                 ><el-form-item
                   label="仓库所在公司"
                   prop="supplierNo"
@@ -63,7 +63,7 @@
                     @searchChange="supplierChange"
                   />
                 </el-form-item>
-              </el-col>
+              </el-col> -->
               <el-col :span="12">
                 <el-form-item label="仓库名称" prop="name">
                   <el-input
@@ -309,7 +309,7 @@ export default {
       ruleForm: {
         companyNo: "",
         name: "", // 仓库名称
-        supplierNo: [], //供应商编码
+        // supplierNo: [], //供应商编码
         wsmtype: "", //仓库类型 目前随便填
         addr_code: [], //仓库省市区
         addr: "", //仓库详细地址
@@ -334,14 +334,14 @@ export default {
             trigger: "change",
           },
         ],
-        supplierNo: [
-          {
-            type: "array",
-            required: true,
-            message: "供应商公司",
-            trigger: "change",
-          },
-        ],
+        // supplierNo: [
+        //   {
+        //     type: "array",
+        //     required: true,
+        //     message: "供应商公司",
+        //     trigger: "change",
+        //   },
+        // ],
         addr_code: [
           {
             type: "array",
@@ -483,7 +483,7 @@ export default {
           contactor_name,
           mobile,
           name,
-          supplierNo,
+          // supplierNo,
           supplier_name,
           wsm_addr,
           wsm_code,
@@ -499,7 +499,7 @@ export default {
         this.ruleForm = {
           companyNo: companyNo || this.business_companyNo || "",
           name: name, // 仓库名称
-          supplierNo: [supplierNo], //供应商编码
+          // supplierNo: [supplierNo], //供应商编码
           wsmtype: wsm_type || "", //仓库类型 目前随便填
           addr_code: this.getCode(addr_code), //仓库省市区
           addr: addr, //仓库详细地址
@@ -534,7 +534,7 @@ export default {
           this.ruleForm = {
             companyNo: "",
             name: "", // 仓库名称
-            supplierNo: [], //供应商编码
+            // supplierNo: [], //供应商编码
             wsmtype: "", //仓库类型 目前随便填
             addr_code: [], //仓库省市区
             addr: "", //仓库详细地址
@@ -579,7 +579,7 @@ export default {
           this.loading = true;
           const {
             name,
-            supplierNo,
+            // supplierNo,
             addr_code,
             addr,
             contactor_id,
@@ -596,7 +596,7 @@ export default {
             id: this.id,
             companyNo,
             name,
-            supplierNo: this.getId(supplierNo),
+            // supplierNo: this.getId(supplierNo),
             addr_code: this.setCode(addr_code),
             addr,
             contactor_id: this.getId(contactor_id),

+ 14 - 14
src/views/stock/allot/components/addForm.vue

@@ -25,7 +25,7 @@
                 @searchChange="supplierChange($event, 'out_companyNo')"
               />
             </el-form-item>
-            <el-form-item label="公司" prop="supplier_code">
+            <!-- <el-form-item label="公司" prop="supplier_code">
               <search-supplier
                 :value="ruleForm.supplier_code"
                 :placeholder="'请选择公司'"
@@ -37,7 +37,7 @@
                 :names="supplier_name"
                 @searchChange="selectSupplierOut"
               />
-            </el-form-item>
+            </el-form-item> -->
             <el-form-item label="仓库" prop="stock_code">
               <search-stock
                 :value="ruleForm.stock_code"
@@ -69,7 +69,7 @@
                 @searchChange="supplierChange($event, 'in_companyNo')"
               />
             </el-form-item>
-            <el-form-item label="公司" prop="supplier_in_code">
+            <!-- <el-form-item label="公司" prop="supplier_in_code">
               <search-supplier
                 :value="ruleForm.supplier_in_code"
                 :placeholder="'请选择公司'"
@@ -81,7 +81,7 @@
                 :names="supplier_in_name"
                 @searchChange="selectSupplierIn"
               />
-            </el-form-item>
+            </el-form-item> -->
             <el-form-item label="仓库" prop="stock_in_code">
               <search-stock
                 :value="ruleForm.stock_in_code"
@@ -337,14 +337,14 @@ export default {
             trigger: "change",
           },
         ],
-        supplier_in_code: [
-          {
-            type: "array",
-            required: true,
-            message: "请选择供应商",
-            trigger: "change",
-          },
-        ],
+        // supplier_in_code: [
+        //   {
+        //     type: "array",
+        //     required: true,
+        //     message: "请选择供应商",
+        //     trigger: "change",
+        //   },
+        // ],
         stock_in_code: [
           {
             type: "array",
@@ -437,7 +437,7 @@ export default {
           this.status = status || "";
           this.supplier_code = out_code || "";
           this.supplier_name = wsm_out_name || "";
-          this.supplier_in_code = in_code || "";
+          // this.supplier_in_code = in_code || "";
           this.supplier_in_name = wsm_in_name || "";
           this.stock_code = wsm_out || "";
           this.stock_in_code = wsm_in || "";
@@ -446,7 +446,7 @@ export default {
             out_companyNo: out_companyNo || "",
             supplier_code: out_code ? [out_code] : [], //出库供应商code
             stock_code: wsm_out ? [wsm_out] : [], //出库仓库code
-            supplier_in_code: in_code ? [in_code] : [], //入库供应商code
+            // supplier_in_code: in_code ? [in_code] : [], //入库供应商code
             stock_in_code: wsm_in ? [wsm_in] : [], //入库仓库code
           };
         }

+ 2 - 2
src/views/stock/check/components/addEdit.vue

@@ -21,7 +21,7 @@
             />
           </el-form-item>
         </el-col>
-        <el-col :span="id === 'add' ? 24 : 12">
+        <!-- <el-col :span="id === 'add' ? 24 : 12">
           <el-form-item label="盘点公司" prop="wsm_supplier">
             <search-supplier
               :value="ruleForm.wsm_supplier"
@@ -33,7 +33,7 @@
               @searchChange="supplierChange"
             />
           </el-form-item>
-        </el-col>
+        </el-col> -->
         <el-col :span="id === 'add' ? 24 : 12">
           <el-form-item label="盘点仓库" prop="wsm_code">
             <search-stock

+ 3 - 3
src/views/stock/stockCount/components/dataWeido/index.vue

@@ -37,7 +37,7 @@
                     @searchChange="supplierChange"
                   />
                 </el-col>
-                <el-col :span="12" style="width: 300px; padding: 0 0 0 10px">
+                <!-- <el-col :span="12" style="width: 300px; padding: 0 0 0 10px">
                   <search-supplier
                     :size="searchSize"
                     :placeholder="'供应商公司'"
@@ -45,13 +45,13 @@
                     :value="parmValue.supplier_code"
                     @searchChange="selectSupplier"
                   />
-                </el-col>
+                </el-col> -->
                 <el-col :span="12" style="width: 200px; padding-left: 10px">
                   <search-stock
                     :isDetail="true"
                     :size="searchSize"
                     :value="parmValue.stock_code"
-                    :disabled="supplier_code === ''"
+                    :disabled="parmValue.companyNo === ''"
                     :placeholder="'出库仓库'"
                     :isRelation="true"
                     :companyCode="supplier_code"

+ 3 - 3
src/views/stock/stockCount/components/spaceCount/index.vue

@@ -57,7 +57,7 @@
               </el-col>
             </el-row>
             <el-row style="padding: 10px 0 0 0">
-              <el-col :span="12" style="width: 380px">
+              <!-- <el-col :span="12" style="width: 380px">
                 <search-supplier
                   :size="searchSize"
                   :placeholder="'供应商公司'"
@@ -65,13 +65,13 @@
                   :value="parmValue.supplier_code"
                   @searchChange="selectSupplier"
                 />
-              </el-col>
+              </el-col> -->
               <el-col :span="12" style="width: 330px; padding:0 0 0 10px">
                 <search-stock
                   :isDetail="true"
                   :size="searchSize"
                   :value="parmValue.stock_code"
-                  :disabled="supplier_code === ''"
+                  :disabled="parmValue.companyNo === ''"
                   :placeholder="'出库仓库'"
                   :isRelation="true"
                   :companyCode="supplier_code"

+ 3 - 3
src/views/stock/stockWarning/index.vue

@@ -69,7 +69,7 @@
               </el-col>
             </el-row>
             <el-row style="padding: 10px 0 0 0">
-              <el-col :span="12" style="width: 360px">
+              <!-- <el-col :span="12" style="width: 360px">
                 <search-supplier
                   :size="searchSize"
                   :disabled="parmValue.companyNo === ''"
@@ -77,13 +77,13 @@
                   :value="parmValue.supplier_code"
                   @searchChange="selectSupplier"
                 />
-              </el-col>
+              </el-col> -->
               <el-col :span="12" style="width: 350px; padding-left: 10px">
                 <search-stock
                   :isDetail="true"
                   :size="searchSize"
                   :value="parmValue.stock_code"
-                  :disabled="supplier_code === ''"
+                  :disabled="parmValue.companyNo === ''"
                   :placeholder="'出库仓库'"
                   :isRelation="true"
                   :companyCode="supplier_code"

+ 5 - 4
src/views/stock/survey/index.vue

@@ -14,7 +14,7 @@
               @searchChange="supplierChange"
             />
           </el-col>
-          <el-col :span="12" style="width: 300px; padding-left: 10px">
+          <!-- <el-col :span="12" style="width: 300px; padding-left: 10px">
             <search-supplier
               :size="searchSize"
               :placeholder="'供应商公司'"
@@ -22,20 +22,21 @@
               :value="parmValue.supplier_code"
               @searchChange="selectSupplier"
             />
-          </el-col>
+          </el-col> -->
           <el-col :span="12" style="width: 240px; padding-left: 10px">
             <search-stock
               :isDetail="true"
               :size="searchSize"
               :value="parmValue.stock_code"
-              :disabled="supplier_code === '' || parmValue.companyNo === ''"
+              :disabled="parmValue.companyNo === ''"
               :placeholder="'出库仓库'"
               :isRelation="true"
               :companyNo="parmValue.companyNo"
-              :companyCode="supplier_code"
+              :companyCode="''"
               :names="''"
               @searchChange="selectStock"
             />
+            <!-- :companyNo="parmValue.companyNo" -->
           </el-col>
           <el-col :span="12" style="width: 290px;margin:0 10px">
             <el-input