Prechádzať zdrojové kódy

【修改】预留单按钮限制

howie 2 rokov pred
rodič
commit
aa1a16e097

+ 2 - 2
src/views/supply/engin/components/commerce_form.vue

@@ -1347,8 +1347,8 @@ export default {
               this.$errorMsg("请选择现金钱包");
               return;
             }
-            if (!this.multipleSelection[i].qty) {
-              this.$errorMsg("请输入数量");
+            if (!Number(this.multipleSelection[i].qty)) {
+              this.$errorMsg("不允许数量为0");
               return;
             }
             if (

+ 4 - 0
src/views/supply/engin/components/engin_form.vue

@@ -809,6 +809,10 @@ export default {
               this.$errorMsg('请选择销售类型')
               return
             }
+            if (!Number(this.goodsList[i].qty)) {
+              this.$errorMsg('不允许数量为0')
+              return
+            }
             if (!this.goodsList[i].materialNumber) {
               return
             }

+ 3 - 3
src/views/supply/engin/components/home_form.vue

@@ -2025,9 +2025,9 @@ export default {
               return;
             }
 
-            if (!this.goodsList[i].qty) {
-              this.$errorMsg("金额不能为0");
-              return;
+            if (!Number(this.goodsList[i].qty)) {
+              this.$errorMsg('不允许数量为0')
+              return
             }
           }
 

+ 6 - 3
src/views/supply/reserve/reserve_list.vue

@@ -110,13 +110,13 @@
             <ExportButton
               class="ml"
               :exUrl="'reserve/download'"
-              v-if="$checkBtnRole('add', $route.meta.roles)"
+              v-if="!isDealer "
               exText="下载模板"
               :exParams="{}"
             />
             <ImportButton
               :imUrl="'reserve/importData'"
-              v-if="$checkBtnRole('add', $route.meta.roles)"
+              v-if=" !isDealer "
               @importSuccess="getList"
             />
           </div>
@@ -405,7 +405,10 @@ export default {
         status: this.screenForm.status,
         correspondId: this.screenForm.warehouse
       }
-    }
+    },
+    isDealer() {
+      return JSON.parse(localStorage.getItem("supply_user")).isCustomer;
+    },
   },
 
   beforeCreate() {