Эх сурвалжийг харах

chore(报备单):添加权限

snow 1 жил өмнө
parent
commit
5ac79679be

+ 2 - 2
src/views/sellOut/filing/cpns/baseForm.vue

@@ -570,7 +570,7 @@
       </el-col>
       </el-col>
     </el-row>
     </el-row>
 
 
-    <el-col :span="24">
+    <el-row :span="24">
       <el-form-item
       <el-form-item
         label="商品图片(<1mb)"
         label="商品图片(<1mb)"
         prop="good_img"
         prop="good_img"
@@ -607,7 +607,7 @@
           </i>
           </i>
         </div>
         </div>
       </el-form-item>
       </el-form-item>
-    </el-col>
+    </el-row>
 
 
     <el-form-item v-if="type !== 'view'">
     <el-form-item v-if="type !== 'view'">
       <div style="width: 100%; display: flex; justify-content: flex-end">
       <div style="width: 100%; display: flex; justify-content: flex-end">

+ 7 - 1
src/views/sellOut/filing/detail.vue

@@ -24,7 +24,7 @@
           <el-collapse-item
           <el-collapse-item
             name="2"
             name="2"
             title="是否合规设置"
             title="是否合规设置"
-            v-if="(!isSupertube && type !== 'add' && type !== 'edit') && Number(status) === 0"
+            v-if="(!isSupertube && type !== 'add' && type !== 'edit') && Number(status) === 0 && _process.includes('0')"
           >
           >
             <compliance-form :sitem="sitem" @refresh="refresh" />
             <compliance-form :sitem="sitem" @refresh="refresh" />
           </el-collapse-item>
           </el-collapse-item>
@@ -85,6 +85,12 @@ export default {
     },
     },
     getNewTime() {
     getNewTime() {
       this.newTime = new Date().valueOf();
       this.newTime = new Date().valueOf();
+    },
+    _process() {
+      const { roleProcess } = this.$store.getters;
+      const tran = roleProcess.find(i => i.process_type === "BBD") || {};
+      const { action } = tran ?? {};
+      return action ?? [];
     }
     }
   },
   },
   methods: {
   methods: {

+ 10 - 4
src/views/sellOut/filing/index.vue

@@ -197,7 +197,7 @@
 
 
         <el-tooltip effect="dark" content="修改" placement="top">
         <el-tooltip effect="dark" content="修改" placement="top">
           <i
           <i
-            v-if="String(scope.row.status) === '1' && !isSupertube"
+            v-if="String(scope.row.status) === '1' && !isSupertube && powers.includes('005')"
             class="el-icon-edit tb-icon"
             class="el-icon-edit tb-icon"
             @click="getRouter('/sellOut/filingDetail', scope.row.id,'edit')"
             @click="getRouter('/sellOut/filingDetail', scope.row.id,'edit')"
           />
           />
@@ -210,6 +210,7 @@
               String(scope.row.status) !== '4' 
               String(scope.row.status) !== '4' 
               && String(scope.row.status) !== '5' 
               && String(scope.row.status) !== '5' 
               && Number(scope.row.wsm_has_account) === 0
               && Number(scope.row.wsm_has_account) === 0
+              && _process.includes('5')
             "
             "
             class="el-icon-refresh-right tb-icon"
             class="el-icon-refresh-right tb-icon"
             @click="handleCancel(scope.row.id)"
             @click="handleCancel(scope.row.id)"
@@ -242,9 +243,14 @@ export default {
       "size"
       "size"
     ]),
     ]),
     powers() {
     powers() {
-      const tran =
-        this.$store.getters.btnList.find(item => item.menu_route == "filing") ||
-        {};
+      const { btnList } = this.$store.getters;
+      const tran = btnList.find(item => item.menu_route == "filing") || {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    },
+    _process() {
+      const { roleProcess } = this.$store.getters;
+      const tran = roleProcess.find(i => i.process_type === "BBD") || {};
       const { action } = tran ?? {};
       const { action } = tran ?? {};
       return action ?? [];
       return action ?? [];
     },
     },

+ 2 - 2
src/views/supplierSellOut/supplierFiling/cpns/baseForm.vue

@@ -569,7 +569,7 @@
       </el-col>
       </el-col>
     </el-row>
     </el-row>
 
 
-    <el-col :span="24">
+    <el-row :span="24">
       <el-form-item
       <el-form-item
         label="商品图片(<1mb)"
         label="商品图片(<1mb)"
         prop="good_img"
         prop="good_img"
@@ -606,7 +606,7 @@
           </i>
           </i>
         </div>
         </div>
       </el-form-item>
       </el-form-item>
-    </el-col>
+    </el-row>
 
 
     <el-form-item v-if="type !== 'view'">
     <el-form-item v-if="type !== 'view'">
       <div style="width: 100%; display: flex; justify-content: flex-end">
       <div style="width: 100%; display: flex; justify-content: flex-end">

+ 105 - 94
src/views/supplierSellOut/supplierFiling/cpns/baseFormAddEdit.vue

@@ -11,8 +11,8 @@
     element-loading-text="拼命加载中"
     element-loading-text="拼命加载中"
     element-loading-spinner="el-icon-loading"
     element-loading-spinner="el-icon-loading"
     element-loading-background="rgba(0, 0, 0, 0.8)"
     element-loading-background="rgba(0, 0, 0, 0.8)"
-    append-to-body
     @close="showModelThis = false"
     @close="showModelThis = false"
+    append-to-body
   >
   >
     <el-card style="margin: -20px 0 0 0">
     <el-card style="margin: -20px 0 0 0">
       <el-row :gutter="10">
       <el-row :gutter="10">
@@ -31,32 +31,36 @@
                 :value="ruleForm.specid"
                 :value="ruleForm.specid"
                 :disabled="sitem.isMust"
                 :disabled="sitem.isMust"
                 :size="'mini'"
                 :size="'mini'"
-                :is-detail="false"
+                :isDetail="false"
                 :placeholder="'规格类型'"
                 :placeholder="'规格类型'"
                 @searchChange="specidsearchChange"
                 @searchChange="specidsearchChange"
               />
               />
             </el-form-item>
             </el-form-item>
             <el-form-item label="规格值" prop="spec_value_id">
             <el-form-item label="规格值" prop="spec_value_id">
               <div v-if="specVlist.length > 0">
               <div v-if="specVlist.length > 0">
-                <el-radio-group
+                <el-select
+                  placeholder="请选择规格值"
                   v-model="ruleForm.spec_value_id"
                   v-model="ruleForm.spec_value_id"
                   @change="spec_value_id_change"
                   @change="spec_value_id_change"
+                  style="width: 100%"
+                  filterable
                 >
                 >
-                  <el-radio
+                  <el-option
                     v-for="item in specVlist"
                     v-for="item in specVlist"
                     :key="item.id + item.spec_value"
                     :key="item.id + item.spec_value"
-                    :label="item.id"
-                  >{{ item.spec_value }}</el-radio>
-                </el-radio-group>
+                    :label="item.spec_value"
+                    :value="item.id"
+                  >{{ item.spec_value }}</el-option>
+                </el-select>
               </div>
               </div>
-              <div v-else class="no-data">暂无规格值,请添加!</div>
+              <div class="no-data" v-else>暂无规格值,请添加!</div>
             </el-form-item>
             </el-form-item>
           </el-form>
           </el-form>
         </el-col>
         </el-col>
         <el-col :span="24" style="text-align: right">
         <el-col :span="24" style="text-align: right">
           <el-input
           <el-input
-            v-model="sinput"
             style="width: 209px"
             style="width: 209px"
+            v-model="sinput"
             class="fl"
             class="fl"
             :disabled="id == 'edit'"
             :disabled="id == 'edit'"
             :size="'small'"
             :size="'small'"
@@ -67,36 +71,32 @@
             style="margin: 0 0 0 10px"
             style="margin: 0 0 0 10px"
             icon="el-icon-plus"
             icon="el-icon-plus"
             :size="'small'"
             :size="'small'"
-            class="fl"
             @click="add_spec"
             @click="add_spec"
+            class="fl"
           >新增规格值</el-button>
           >新增规格值</el-button>
-          <el-button
-            v-if="id !== 'edit'"
-            :size="'small'"
-            type="primary"
-            @click="submitForm"
-          >保 存
-          </el-button>
-          <el-button :size="'small'" @click="showModelThis = false">{{
+          <el-button v-if="id !== 'edit'" :size="'small'" type="primary" @click="submitForm">保 存</el-button>
+          <el-button @click="showModelThis = false" :size="'small'">
+            {{
             id == "edit" ? "关 闭" : "取 消"
             id == "edit" ? "关 闭" : "取 消"
-          }}</el-button>
+            }}
+          </el-button>
         </el-col>
         </el-col>
       </el-row>
       </el-row>
     </el-card>
     </el-card>
   </el-dialog>
   </el-dialog>
 </template>
 </template>
 <script>
 <script>
-import asyncRequest from '@/apis/service/goodStore/goodsCost'
-import resToken from '@/mixins/resToken'
+import asyncRequest from "@/apis/service/goodStore/goodsCost";
+import resToken from "@/mixins/resToken";
 export default {
 export default {
-  name: 'Brand',
+  name: "brand",
+  props: ["showModel", "index", "sitem"],
   mixins: [resToken],
   mixins: [resToken],
-  props: ['showModel', 'index', 'sitem'],
   data() {
   data() {
     return {
     return {
       loading: false,
       loading: false,
-      title: '商品规格',
-      sinput: '',
+      title: "商品规格",
+      sinput: "",
       showModelThis: this.showModel,
       showModelThis: this.showModel,
       specVlist: [],
       specVlist: [],
       ruleForm: {},
       ruleForm: {},
@@ -106,140 +106,151 @@ export default {
         specid: [
         specid: [
           {
           {
             required: true,
             required: true,
-            message: '规格类型不能为空',
-            trigger: 'change'
+            message: "规格类型不能为空",
+            trigger: "change"
           }
           }
         ],
         ],
-        spec_value_id: [{ required: true, message: '请选择规格值', trigger: 'change' }]
+        spec_value_id: [
+          { required: true, message: "请选择规格值", trigger: "change" }
+        ]
       }
       }
-    }
+    };
   },
   },
   watch: {
   watch: {
     showModel: function(val) {
     showModel: function(val) {
-      this.showModelThis = val
+      this.showModelThis = val;
       if (val) {
       if (val) {
-        this.initForm()
+        this.initForm();
       }
       }
     },
     },
     showModelThis(val) {
     showModelThis(val) {
       if (!val) {
       if (!val) {
-        this.$emit('cancel')
+        this.$emit("cancel");
       }
       }
     }
     }
   },
   },
   methods: {
   methods: {
     async initForm() {
     async initForm() {
-      this.loading = true
-      this.resetFormData()
-      this.rulesThis = this.rules
-      if (this.index + '' === '-1') {
-        this.title = '添加商品规格值'
+      this.loading = true;
+      this.resetFormData();
+      this.rulesThis = this.rules;
+      if (this.index + "" === "-1") {
+        this.title = "添加商品规格值";
       } else {
       } else {
-        this.title = '修改商品规格值'
+        this.title = "修改商品规格值";
       }
       }
-      await this.resetForm()
-      this.loading = false
+      await this.resetForm();
+      this.loading = false;
     },
     },
     async resetForm() {
     async resetForm() {
       // 重置
       // 重置
-      await this.$nextTick(async() => {
+      await this.$nextTick(async () => {
         if (this.$refs.ruleForm) {
         if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields()
-          this.$refs.ruleForm.clearValidate()
-          if (this.index + '' !== '-1') {
-            this.specVlist = []
-            const { specid, spec_name, spec_value_id, spec_value_name } = this.sitem
+          this.$refs.ruleForm.resetFields();
+          this.$refs.ruleForm.clearValidate();
+          if (this.index + "" !== "-1") {
+            this.specVlist = [];
+            const {
+              specid,
+              spec_name,
+              spec_value_id,
+              spec_value_name
+            } = this.sitem;
             this.ruleForm = {
             this.ruleForm = {
               index: this.index,
               index: this.index,
-              specid: specid || '',
-              spec_name: spec_name || '',
-              spec_value_id: spec_value_id || '',
-              spec_value_name: spec_value_name || ''
-            }
-            await this.getlist()
-            console.log(this.ruleForm)
+              specid: specid || "",
+              spec_name: spec_name || "",
+              spec_value_id: spec_value_id || "",
+              spec_value_name: spec_value_name || ""
+            };
+            await this.getlist();
+            console.log(this.ruleForm);
           }
           }
         }
         }
-      })
+      });
     },
     },
     resetFormData() {
     resetFormData() {
-      this.specVlist = []
+      this.specVlist = [];
       this.ruleForm = {
       this.ruleForm = {
-        index: '-1',
-        specid: '',
-        spec_name: '',
-        spec_value_id: '',
-        spec_value_name: ''
-      }
+        index: "-1",
+        specid: "",
+        spec_name: "",
+        spec_value_id: "",
+        spec_value_name: ""
+      };
     },
     },
     async add_spec() {
     async add_spec() {
-      const { specid } = this.ruleForm
+      const { specid } = this.ruleForm;
       if (specid) {
       if (specid) {
         if (this.sinput) {
         if (this.sinput) {
-          const res = await asyncRequest.valueadd({
+          const { code, data, message } = await asyncRequest.valueadd({
             spec_id: specid,
             spec_id: specid,
             spec_value: this.sinput
             spec_value: this.sinput
-          })
-          const { code, data, message } = await this.useResHandle(res, true)
+          });
           if (code === 0) {
           if (code === 0) {
-            await this.getlist()
+            await this.getlist();
+          } else if (code >= 100 && code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(message);
           }
           }
         } else {
         } else {
-          this.$message.warning('请输入规格值!')
+          this.$message.warning("请输入规格值!");
         }
         }
       } else {
       } else {
-        this.$message.warning('请选择规格类型!')
+        this.$message.warning("请选择规格类型!");
       }
       }
     },
     },
     async specidsearchChange(e) {
     async specidsearchChange(e) {
-      const { id, spec_name } = e
-      this.ruleForm.specid = id || ''
-      this.ruleForm.spec_name = spec_name || ''
-      this.$refs.ruleForm.validateField('specid')
-      await this.getlist()
+      const { id, spec_name } = e;
+      this.ruleForm.specid = id || "";
+      this.ruleForm.spec_name = spec_name || "";
+      this.$refs.ruleForm.validateField("specid");
+      await this.getlist();
     },
     },
     spec_value_id_change(e) {
     spec_value_id_change(e) {
       if (e) {
       if (e) {
-        const { id, spec_value } = this.specVlist.find((i) => i.id === e)
-        this.ruleForm.spec_value_id = id || ''
-        this.ruleForm.spec_value_name = spec_value || ''
+        const { id, spec_value } = this.specVlist.find(i => i.id === e);
+        this.ruleForm.spec_value_id = id || "";
+        this.ruleForm.spec_value_name = spec_value || "";
       } else {
       } else {
-        this.ruleForm.spec_value_id = ''
-        this.ruleForm.spec_value_name = ''
+        this.ruleForm.spec_value_id = "";
+        this.ruleForm.spec_value_name = "";
       }
       }
-      this.$refs.ruleForm.validateField('spec_value_id')
+      this.$refs.ruleForm.validateField("spec_value_id");
     },
     },
     async getlist() {
     async getlist() {
-      const { specid } = this.ruleForm
+      const { specid } = this.ruleForm;
       if (specid) {
       if (specid) {
-        const res = await asyncRequest.valueall({
+        const { code, data, message } = await asyncRequest.valueall({
           spec_id: specid
           spec_id: specid
-        })
-        const { code, data, message } = await this.useResHandle(res)
+        });
         if (code === 0) {
         if (code === 0) {
-          this.specVlist = data
+          this.specVlist = data;
+        } else if (code >= 100 && code <= 104) {
+          await this.logout();
         } else {
         } else {
-          this.specVlist = []
+          this.$message.warning(message);
         }
         }
       } else {
       } else {
-        this.specVlist = []
+        this.specVlist = [];
       }
       }
     },
     },
 
 
     async submitForm() {
     async submitForm() {
-      await this.$refs.ruleForm.validate(async(valid) => {
+      await this.$refs.ruleForm.validate(async valid => {
         if (valid) {
         if (valid) {
-          this.showModelThis = false
-          console.log(this.ruleForm)
-          this.$emit('refresh', this.ruleForm)
+          this.showModelThis = false;
+          console.log(this.ruleForm);
+          this.$emit("refresh", this.ruleForm);
         } else {
         } else {
-          console.log('error submit!!')
-          return false
+          console.log("error submit!!");
+          return false;
         }
         }
-      })
+      });
     }
     }
   }
   }
-}
+};
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>

+ 11 - 1
src/views/supplierSellOut/supplierFiling/detail.vue

@@ -17,7 +17,11 @@
               @change-detail="(detail) => (sitem = detail)"
               @change-detail="(detail) => (sitem = detail)"
             />
             />
           </template>
           </template>
-          <tempalte v-if="(status == '2' || status == '3') && !isSupertube">
+          <tempalte
+            v-if="(status == '2' || status == '3') && !isSupertube && (
+            _process.includes('2') || _process.includes('3')
+          )"
+          >
             <el-collapse-item name="3" title="待转单">
             <el-collapse-item name="3" title="待转单">
               <wait-transferred :id="id" :num="num" @refresh="handleRefresh" />
               <wait-transferred :id="id" :num="num" @refresh="handleRefresh" />
             </el-collapse-item>
             </el-collapse-item>
@@ -68,6 +72,12 @@ export default {
     },
     },
     getNewTime() {
     getNewTime() {
       this.newTime = new Date().valueOf();
       this.newTime = new Date().valueOf();
+    },
+    _process() {
+      const { roleProcess } = this.$store.getters;
+      const tran = roleProcess.find(i => i.process_type === "BBD") || {};
+      const { action } = tran ?? {};
+      return action ?? [];
     }
     }
   },
   },
   methods: {
   methods: {

+ 8 - 2
src/views/supplierSellOut/supplierFiling/index.vue

@@ -196,7 +196,7 @@
 
 
         <el-tooltip effect="dark" content="修改" placement="top">
         <el-tooltip effect="dark" content="修改" placement="top">
           <i
           <i
-            v-if="String(scope.row.status) === '1' && !isSupertube"
+            v-if="String(scope.row.status) === '1' && !isSupertube && powers.includes('005')"
             class="el-icon-edit tb-icon"
             class="el-icon-edit tb-icon"
             @click="getRouter('/supplierSellOut/supplierFilingDetail', scope.row.id,'edit')"
             @click="getRouter('/supplierSellOut/supplierFilingDetail', scope.row.id,'edit')"
           />
           />
@@ -204,7 +204,7 @@
 
 
         <el-tooltip effect="dark" content="取消转单" placement="top">
         <el-tooltip effect="dark" content="取消转单" placement="top">
           <i
           <i
-            v-if="String(scope.row.status) !== '4' && String(scope.row.status) !== '5'"
+            v-if="String(scope.row.status) !== '4' && String(scope.row.status) !== '5' && _process.includes('5')"
             class="el-icon-refresh-right tb-icon"
             class="el-icon-refresh-right tb-icon"
             @click="handleCancel(scope.row.id)"
             @click="handleCancel(scope.row.id)"
           ></i>
           ></i>
@@ -245,6 +245,12 @@ export default {
         btnList.find(item => item.menu_route == "supplierFiling") || {};
         btnList.find(item => item.menu_route == "supplierFiling") || {};
       const { action } = tran ?? {};
       const { action } = tran ?? {};
       return action ?? [];
       return action ?? [];
+    },
+    _process() {
+      const { roleProcess } = this.$store.getters;
+      const tran = roleProcess.find(i => i.process_type === "BBD") || {};
+      const { action } = tran ?? {};
+      return action ?? [];
     }
     }
   },
   },