Ver código fonte

新增总商品库列表

Guos 3 semanas atrás
pai
commit
d3ceb30340

+ 3 - 0
src/views/hisStore/platformProduct/index.vue

@@ -233,6 +233,9 @@
 
     <el-tabs type="card" v-model="activeName" @tab-click="handleClick">
       <el-tab-pane label="全部商品" name="-1"></el-tab-pane>
+      <el-tab-pane label="已上线" name="1"></el-tab-pane>
+      <el-tab-pane label="草稿" name="9"></el-tab-pane>
+      <el-tab-pane label="已下线" name="0"></el-tab-pane>
     </el-tabs>
 
     <el-table height="500" border v-loading="loading" :data="storeProductList"

+ 21 - 17
src/views/hisStore/storeProduct/index.vue

@@ -1619,6 +1619,7 @@ export default {
       },
       // 表单参数
       form: {
+        header: [], // 确保有这个字段
         ingredient: null,
         cateId: null,
         businessExpire: null,
@@ -2272,6 +2273,9 @@ export default {
       this.isFormInitialized = false; // 重置初始化标志
       this.ingredientError = '';
       this.form = {
+        header: [], // 初始化为空数组
+        items: [],
+        values: [],
         ingredient: null,
         productId: null,
         image: null,
@@ -2338,22 +2342,23 @@ export default {
       // 重置药品展示图
       this.drugImageArr = [];
       this.resetForm("form");
-      this.oneFormValidate = [
-        {
-          image: '',
-          price: 0,
-          agentPrice: 0,
-          cost: 0,
-          otPrice: 0,
-          stock: 0,
-          barCode: '',
-          weight: 0,
-          volume: 0,
-          integral: 0,
-          brokerage: 0,
-          brokerageTwo: 0
-        }
-      ]
+      // 单规格表格数据也要初始化
+      this.oneFormValidate = [{
+        image: '',
+        price: '',
+        agentPrice: '',
+        cost: '',
+        otPrice: '',
+        stock: '',
+        barCode: '',
+        groupBarCode: '',
+        weight: '',
+        volume: '',
+        integral: '',
+        brokerage: '',
+        brokerageTwo: '',
+        brokerageThree: ''
+      }];
       this.attrs = [];
       this.photoArr = [];
       this.imageArr = [];
@@ -2417,7 +2422,6 @@ export default {
         this.$refs.myeditor.setText("");
         this.$refs.instructionManualRef.setText("");
       }, 500);
-
     },
     /** 修改按钮操作 */
     handleUpdate(row) {