sunlupeng 1 year ago
parent
commit
a31e45c85c
2 changed files with 89 additions and 45 deletions
  1. 43 24
      src/views/giftManage/giftList.vue
  2. 46 21
      src/views/goodsManage/goodsList.vue

+ 43 - 24
src/views/giftManage/giftList.vue

@@ -155,7 +155,7 @@
                         </el-option>
                     </el-select>
                 </el-form-item>
-                <el-form-item v-if="dataForm.productAttribute==1" label="礼品所在地" prop="location">
+                <el-form-item v-if="dataForm.deliveryType==0" label="礼品所在地" prop="location">
                     <el-select v-model="dataForm.location" filterable placeholder="请选择" style="width: 350px">
                         <el-option :key="item.dictLabel" v-for="item in locationList" :label="item.dictLabel" :value="item.dictLabel">
                         </el-option>
@@ -234,25 +234,21 @@ export default {
             skuId:'',
             options: [],
             locationList:[],
-            productAttributeList: [
-                {
-                    type: 1,
-                    name: '实物'
-                },
+            productAttributeList: [],
+            deliveryTypeList: [
                 {
                     type: 0,
-                    name: '虚拟'
+                    name: '办公室领取'
                 },
-            ],
-            deliveryTypeList: [
                 {
                     type: 1,
                     name: '快递'
                 },
                 {
-                    type: 0,
-                    name: '无需快递'
+                    type: 2,
+                    name: '卷码兑换'
                 },
+               
             ],
             goodsStatusList: [
                 {
@@ -264,12 +260,8 @@ export default {
                     name: '下架'
                 },
             ],
-            depTypeList: [
-                
-            ],
-            list: [
-               
-            ],
+            depTypeList: [],
+            list: [],
             itemList: [
                 
             ],
@@ -325,7 +317,6 @@ export default {
         }
     },
     created() {
-        // this.getCompanyTypeList();
         this.getProductAttributeList();
         this.getDataTypeList(); 
         this.getDepTypeList(); 
@@ -348,8 +339,27 @@ export default {
             }).catch(() => {});
         },
         changeProductAttribute(val) {
-            this.dataForm.deliveryType = '';
-            this.dataForm.location = '';
+            this.dataForm.deliveryType = undefined;
+            this.dataForm.location = undefined;
+            this.deliveryTypeList = [
+                {
+                    type: 0,
+                    name: '办公室领取'
+                },
+                {
+                    type: 1,
+                    name: '快递'
+                },
+                {
+                    type: 2,
+                    name: '卷码兑换'
+                },
+                {
+                    type: 3,
+                    name: '线下组织'
+                },
+               
+            ];
             if (val == 1) {
                 this.deliveryTypeList = [
                     {
@@ -358,14 +368,23 @@ export default {
                     },
                     {
                         type: 0,
-                        name: '无需快递'
+                        name: '办公室领取'
                     },
                 ]
-            } else {
+            } 
+            if (val == 2 || val == 3)  {
                 this.deliveryTypeList = [
                     {
-                        type: 0,
-                        name: '无需快递'
+                        type: 2,
+                        name: '卷码兑换'
+                    },
+                ]
+            }
+            if (val == 5)  {
+                this.deliveryTypeList = [
+                    {
+                        type: 3,
+                        name: '线下组织'
                     },
                 ]
             }

+ 46 - 21
src/views/goodsManage/goodsList.vue

@@ -42,7 +42,8 @@
             <el-table-column align="center" min-width="80px" label="兑换方式">
                 <template slot-scope="props">
                     <span v-if="props.row.deliveryType == 1">快递</span>
-                    <span v-if="props.row.deliveryType == 0">无需快递</span>
+                    <span v-if="props.row.deliveryType == 0">办公室领取</span>
+                    <span v-if="props.row.deliveryType == 2">卷码兑换</span>
                 </template>
             </el-table-column>
             <el-table-column align="center" min-width="100px" label="商品所在地" prop="location">
@@ -151,7 +152,7 @@
                         </el-option>
                     </el-select>
                 </el-form-item>
-                <el-form-item v-if="dataForm.productAttribute==1" label="商品所在地" prop="location">
+                <el-form-item v-if="dataForm.deliveryType==0" label="商品所在地" prop="location">
                     <el-select v-model="dataForm.location" filterable placeholder="请选择" style="width: 350px">
                         <el-option :key="item.dictLabel" v-for="item in locationList" :label="item.dictLabel" :value="item.dictLabel">
                         </el-option>
@@ -217,26 +218,22 @@ export default {
     directives: { waves },
     data() {
         return {
-            locationList:['洛阳','北京','上海'],
-            productAttributeList: [
-                {
-                    type: 1,
-                    name: '实物'
-                },
+            locationList:[],
+            productAttributeList: [],
+            deliveryTypeList: [
                 {
                     type: 0,
-                    name: '虚拟'
+                    name: '办公室领取'
                 },
-            ],
-            deliveryTypeList: [
                 {
                     type: 1,
                     name: '快递'
                 },
                 {
-                    type: 0,
-                    name: '无需快递'
+                    type: 2,
+                    name: '卷码兑换'
                 },
+               
             ],
             goodsStatusList: [
                 {
@@ -311,8 +308,27 @@ export default {
             window.location.href = process.env.BASE_API + '/mall-sku/exportSkuLog?skuId=' + this.itemListQuery.skuId + '&deptId=' + this.itemListQuery.deptId + '&userName=' + this.itemListQuery.userName;
         },
         changeProductAttribute(val) {
-            this.dataForm.deliveryType = '';
-            this.dataForm.location = '';
+            this.dataForm.deliveryType = undefined;
+            this.dataForm.location = undefined;
+            this.deliveryTypeList = [
+                {
+                    type: 0,
+                    name: '办公室领取'
+                },
+                {
+                    type: 1,
+                    name: '快递'
+                },
+                {
+                    type: 2,
+                    name: '卷码兑换'
+                },
+                {
+                    type: 3,
+                    name: '线下组织'
+                },
+               
+            ];
             if (val == 1) {
                 this.deliveryTypeList = [
                     {
@@ -321,14 +337,23 @@ export default {
                     },
                     {
                         type: 0,
-                        name: '无需快递'
+                        name: '办公室领取'
                     },
                 ]
-            } else {
+            } 
+            if (val == 2 || val == 3)  {
                 this.deliveryTypeList = [
                     {
-                        type: 0,
-                        name: '无需快递'
+                        type: 2,
+                        name: '卷码兑换'
+                    },
+                ]
+            }
+            if (val == 5)  {
+                this.deliveryTypeList = [
+                    {
+                        type: 3,
+                        name: '线下组织'
                     },
                 ]
             }
@@ -429,14 +454,14 @@ export default {
                     },
                     {
                         type: 0,
-                        name: '无需快递'
+                        name: '办公室领取'
                     },
                 ]
             } else {
                 this.deliveryTypeList = [
                     {
                         type: 0,
-                        name: '无需快递'
+                        name: '办公室领取'
                     },
                 ]
             }