Browse Source

3146 复消和会员报单判断是否是报单中心

tyler 2 years ago
parent
commit
0124f11ce3

+ 22 - 0
src/views/shop/shoppingCart.vue

@@ -0,0 +1,22 @@
+<template>
+  <div class="">
+
+  </div>
+</template>
+  
+  <script>
+export default {
+  name: "shoppingCart",
+  components: {},
+  data() {
+    return {};
+  },
+  watch: {},
+  created() {},
+  methods: {},
+};
+</script>
+  
+  <style scoped>
+</style>
+  

+ 15 - 3
src/views/shop/standard-products.vue

@@ -39,7 +39,7 @@
     </el-table>
     </el-table>
 
 
     <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
     <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
-
+      <!-- 底部 去结算 -->
     <div v-show="total>0" class="white-box-footer" style="margin-top: 15px;">
     <div v-show="total>0" class="white-box-footer" style="margin-top: 15px;">
       <div class="flex data" style="float: left; display: inline-block; margin-top: 20px;">
       <div class="flex data" style="float: left; display: inline-block; margin-top: 20px;">
         <el-button type="primary" size="small" style="float: left;" @click="settlement()">{{ $t('shop.checkOut') }}</el-button>
         <el-button type="primary" size="small" style="float: left;" @click="settlement()">{{ $t('shop.checkOut') }}</el-button>
@@ -104,7 +104,7 @@
             <el-divider />
             <el-divider />
             <el-form>
             <el-form>
               <el-form-item :label="$t('shop.declarationCenterNumber')">
               <el-form-item :label="$t('shop.declarationCenterNumber')">
-                <el-input v-model="recUserName" />
+                <el-input v-model="recUserName" :disabled="isDec == '1'"/>
               </el-form-item>
               </el-form-item>
             </el-form>
             </el-form>
             
             
@@ -353,7 +353,8 @@ export default {
       },
       },
       imageStyle: 'margin-top: -50px;',
       imageStyle: 'margin-top: -50px;',
       recRealName:null,
       recRealName:null,
-      recUserName:usersInfo.userName(),
+      recUserName:null,
+      isDec:null
     }
     }
   },
   },
   computed: {
   computed: {
@@ -367,6 +368,15 @@ export default {
       return text
       return text
     }
     }
   },
   },
+  watch: {
+    isDec: {
+      handler(newValue, old) {
+        if (newValue == '1') {
+           this.recUserName = usersInfo.userName();
+        }
+      },
+    }
+  },
   created() {
   created() {
     this.getList()
     this.getList()
   },
   },
@@ -531,6 +541,8 @@ export default {
         this.freeShipping = response.data.freeShipping
         this.freeShipping = response.data.freeShipping
         // 运费
         // 运费
         this.freight = response.data.freight
         this.freight = response.data.freight
+        //是否是报单中心
+        this.isDec = response.data.isDec
       })
       })
     },
     },
     // 支付
     // 支付

+ 15 - 4
src/views/user/welcome-pack.vue

@@ -22,7 +22,7 @@
               </el-select>
               </el-select>
             </el-form-item>
             </el-form-item>
             <el-form-item :label="$t('user.stockistCode')">
             <el-form-item :label="$t('user.stockistCode')">
-              <el-input v-model="form.decUserName" />
+              <el-input v-model="form.decUserName" :disabled="isDec == '1'"/>
             </el-form-item>
             </el-form-item>
 
 
             <el-form-item>
             <el-form-item>
@@ -406,7 +406,8 @@ export default {
       allDecLevel: usersInfo.getBaseInfo().decLevels,
       allDecLevel: usersInfo.getBaseInfo().decLevels,
       allOpenBank: [],
       allOpenBank: [],
 
 
-      activeName: 'product'
+      activeName: 'product',
+      isDec:null
     }
     }
   },
   },
   computed: {
   computed: {
@@ -420,6 +421,15 @@ export default {
       return text
       return text
     }
     }
   },
   },
+  watch: {
+    isDec: {
+      handler(newValue, old) {
+        if (newValue == '1') {
+           this.form.decUserName = usersInfo.userName();
+        }
+      },
+    }
+  },
   created() {
   created() {
     const regionInfo = this.$store.getters.regionInfo
     const regionInfo = this.$store.getters.regionInfo
     // console.log(this.$store.state.region)
     // console.log(this.$store.state.region)
@@ -436,7 +446,8 @@ export default {
         this.allGoods = response.data.allGoods
         this.allGoods = response.data.allGoods
         this.userBalance = response.data.userBalance
         this.userBalance = response.data.userBalance
         this.categoryType = 1
         this.categoryType = 1
-
+         //是否是报单中心
+         this.isDec = response.data.isDec
         const settingObj = this.allGoods
         const settingObj = this.allGoods
         for (const i in this.allGoods) {
         for (const i in this.allGoods) {
           this.storeNums[i] = 1
           this.storeNums[i] = 1
@@ -646,7 +657,7 @@ export default {
         insertUserName: this.form.insertUserName,
         insertUserName: this.form.insertUserName,
         decLv: this.form.decLv,
         decLv: this.form.decLv,
         realName: this.form.realName,
         realName: this.form.realName,
-        decUserName: this.form.decUserName,
+        decUserName: null,
         conUserName: this.form.conUserName,
         conUserName: this.form.conUserName,
         recUserName: this.form.recUserName,
         recUserName: this.form.recUserName,
         insertUserIdCard: this.form.insertUserIdCard,
         insertUserIdCard: this.form.insertUserIdCard,