Ver Fonte

修改样式

YY há 2 anos atrás
pai
commit
a3ed4c2122

+ 12 - 1
src/views/platActivi/act/parts/goods.vue

@@ -20,9 +20,12 @@
             <el-col :span="24" class="thr">
               <el-button type="primary" size="mini" @click="toAdd()">新增</el-button>
             </el-col>
-            <el-col :span="24" class="four" v-if="type != '3'">
+            <el-col :span="24" class="four" v-if="type != '3' && type != '2'">
               <data-table :fields="fields" :opera="opera" @query="search" :data="list" :total="total" @del="toDel" @set="toSet"> </data-table>
             </el-col>
+            <el-col :span="24" class="four" v-if="type == '2'">
+              <data-table :fields="giftFields" :opera="opera" @query="search" :data="list" :total="total" @del="toDel" @set="toSet"> </data-table>
+            </el-col>
             <el-col :span="24" class="four" v-if="type == '3'">
               <data-table :fields="spFields" :opera="opera" @query="search" :data="list" :total="total" @del="toDel" @set="toSet"> </data-table>
             </el-col>
@@ -79,6 +82,14 @@ export default {
         { label: '店铺名称', model: 'shop_name' },
         { label: '商品原价', model: 'sell_money' },
       ],
+      // 买赠
+      giftFields: [
+        { label: '商品名称', model: 'goods_name', showTip: false },
+        { label: '商品规格', model: 'spec_name', showTip: false },
+        { label: '店铺名称', model: 'shop_name' },
+        { label: '商品原价', model: 'sell_money' },
+        { label: '赠品数量', model: 'config.gift.length' },
+      ],
       // 特价
       spFields: [
         { label: '商品名称', model: 'goods_name', showTip: false },

+ 2 - 3
src/views/platActivi/act/parts/goods/goodsDetail.vue

@@ -65,6 +65,7 @@ export default {
     ...dictData({ dictQuery: 'query' }),
     ...goods({ gQuery: 'query' }),
     ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
+    // 查询
     async search({ skip = 0, limit = this.$limit, ...info } = {}) {
       if (this.goods) info.name = this.goods;
       let res = await this.gQuery({ skip, limit, ...info });
@@ -88,9 +89,7 @@ export default {
       let res;
       // 商品状态
       res = await this.dictQuery({ code: 'goods_status' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `statusList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `statusList`, res.data);
     },
   },
   computed: {

+ 1 - 3
src/views/platActivi/act/parts/goods/tabs-2.vue

@@ -121,9 +121,7 @@ export default {
     onSubmit({ data }) {
       if (!data.id) data.id = moment(new Date()).valueOf();
       let info = this.list.find((f) => f.id == data.id);
-      if (info == '' || info == undefined) {
-        this.list.push(data);
-      }
+      if (info == '' || info == undefined) this.list.push(data);
       this.toClose();
     },
     // 关闭

+ 2 - 6
src/views/platActivi/actTags/detail.vue

@@ -75,9 +75,7 @@ export default {
     async search() {
       if (this.id) {
         let res = await this.fetch(this.id);
-        if (this.$checkRes(res)) {
-          this.$set(this, `form`, res.data);
-        }
+        if (this.$checkRes(res)) this.$set(this, `form`, res.data);
       } else {
         this.$set(this, `form`, { status: '0', show_index: '0', show_goods: '1' });
       }
@@ -98,9 +96,7 @@ export default {
       let res;
       // 是否使用
       res = await this.dictQuery({ code: 'status' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `statusList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `statusList`, res.data);
     },
     // 返回
     toBack() {

+ 1 - 3
src/views/platActivi/actTags/index.vue

@@ -140,9 +140,7 @@ export default {
       let res;
       // 是否使用
       res = await this.dictQuery({ code: 'status' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `statusList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `statusList`, res.data);
     },
   },
   computed: {

+ 5 - 13
src/views/platActivi/coupon/index.vue

@@ -171,33 +171,25 @@ export default {
     },
     // 多选
     handleSelect(data) {
-      this.$emit('handleSelect');
+      this.$set(this, `selected`, data);
     },
     // 查询其他信息
     async searchOther() {
       let res;
       // 发行方
       res = await this.dictQuery({ code: 'coupon_issue', value: '0' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `issueList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `issueList`, res.data);
       // 使用状态
       res = await this.dictQuery({ code: 'use' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `statusList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `statusList`, res.data);
       // 减免方式
       res = await this.dictQuery({ code: 'coupon_discount_type' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `discount_typeList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `discount_typeList`, res.data);
     },
     // 店铺名称远程查询
     async querySearch(value) {
       let res = await this.shopQuery({ name: value });
-      if (this.$checkRes(res)) {
-        this.$set(this, 'shopList', res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, 'shopList', res.data);
     },
   },
   computed: {

+ 1 - 3
src/views/platmanag/order/parts/card-1.vue

@@ -89,9 +89,7 @@ export default {
     // 店铺名称远程查询
     async querySearch(value) {
       let res = await this.shopQuery({ name: value });
-      if (this.$checkRes(res)) {
-        this.$set(this, 'shopList', res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, 'shopList', res.data);
     },
   },
   computed: {

+ 1 - 3
src/views/platmanag/order/parts/card-2.vue

@@ -83,9 +83,7 @@ export default {
     // 店铺名称远程查询
     async querySearch(value) {
       let res = await this.shopQuery({ name: value });
-      if (this.$checkRes(res)) {
-        this.$set(this, 'shopList', res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, 'shopList', res.data);
     },
   },
   computed: {

+ 2 - 5
src/views/platmanag/order/parts/detail/detail_order.vue

@@ -131,11 +131,8 @@ export default {
       this.loadings = false;
     },
     toUrl(url) {
-      if (url) {
-        window.open(url, '_blank');
-      } else {
-        this.$message.error('该商品还未添加来源网址,无法跳转');
-      }
+      if (url) window.open(url, '_blank');
+      else this.$message.error('该商品还未添加来源网址,无法跳转');
     },
     // 返回
     toBack() {

+ 4 - 12
src/views/platmanag/order/parts/detail/detail_orderDetail.vue

@@ -119,9 +119,7 @@ export default {
           let info = { id: this.id };
           res = await this.sotCreate(info);
           if (this.$checkRes(res)) {
-            if (res.errcode == '0') {
-              this.$set(this, `activities`, res.data);
-            }
+            if (res.errcode == '0') this.$set(this, `activities`, res.data);
           }
         }
       }
@@ -129,9 +127,7 @@ export default {
     },
     async querySearch(value) {
       let res = await this.dictQuery({ code: 'transport_company', label: value });
-      if (this.$checkRes(res)) {
-        this.$set(this, 'shop_transport_typeList', res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, 'shop_transport_typeList', res.data);
     },
     // 返回
     toBack() {
@@ -142,14 +138,10 @@ export default {
       let res;
       // 减免方式
       res = await this.dictQuery({ code: 'order_process' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `order_processList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `order_processList`, res.data);
       // 快递类型
       res = await this.dictQuery({ code: 'transport_type' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `transport_typeList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `transport_typeList`, res.data);
     },
   },
   computed: {},

+ 2 - 5
src/views/platmanag/order/parts/detail/detail_sales_order.vue

@@ -132,11 +132,8 @@ export default {
       this.loadings = false;
     },
     toUrl(url) {
-      if (url) {
-        window.open(url, '_blank');
-      } else {
-        this.$message.error('该商品还未添加来源网址,无法跳转');
-      }
+      if (url) window.open(url, '_blank');
+      else this.$message.error('该商品还未添加来源网址,无法跳转');
     },
     async toSales() {
       this.$confirm('是否确认申请售后', '提示', {

+ 1 - 5
src/views/platmanag/order/parts/detail/detail_sales_orderDetail.vue

@@ -308,7 +308,6 @@ export default {
           }).then(async () => {
             let form = this.form;
             form.order_detail = this.id;
-
             let res = await this.create(form);
             if (this.$checkRes(res)) {
               this.$message({ type: `success`, message: `申请售后成功` });
@@ -316,7 +315,6 @@ export default {
             }
           });
         } else {
-          console.log('error submit!!');
           return false;
         }
       });
@@ -330,9 +328,7 @@ export default {
       let res;
       // 减免方式
       res = await this.dictQuery({ code: 'order_process' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `order_processList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `order_processList`, res.data);
       // 售后类型
       res = await this.dictQuery({ code: 'afterSale_type' });
       if (this.$checkRes(res)) {

+ 2 - 5
src/views/platmanag/order/parts/detail/parts/card-1.vue

@@ -115,11 +115,8 @@ export default {
   created() {},
   methods: {
     toUrl(url) {
-      if (url) {
-        window.open(url, '_blank');
-      } else {
-        this.$message.error('该商品还未添加来源网址,无法跳转');
-      }
+      if (url) window.open(url, '_blank');
+      else this.$message.error('该商品还未添加来源网址,无法跳转');
     },
   },
   computed: {

+ 4 - 4
src/views/platmanag/order/parts/detail/parts/card-2.vue

@@ -153,9 +153,11 @@ export default {
     return {
       activit: {},
       logList: [],
+      shop: {},
       status: 0,
       // 物流
       reverse: false,
+      // 加载
       loading: false,
       rules: {
         shop_transport_no: [{ required: true, message: '请输入快递单号', trigger: 'blur' }],
@@ -179,7 +181,6 @@ export default {
       ],
       // 弹框
       dialog: { title: '信息管理', show: false, type: '1' },
-      shop: {},
     };
   },
   created() {},
@@ -214,9 +215,7 @@ export default {
       let data = this.fieldform;
       data.id = moment(new Date()).valueOf();
       let info = this.goodsList.find((f) => f.id == data.id);
-      if (info == '' || info == undefined) {
-        this.goodsList.push(data);
-      }
+      if (info == '' || info == undefined) this.goodsList.push(data);
       this.toClose();
     },
     onstatus(status) {
@@ -285,6 +284,7 @@ export default {
         }
       });
     },
+    // 确认收货-确认全部发货
     async onConfirm(val, text = '是否确认') {
       this.$confirm(text, '提示', {
         confirmButtonText: '确定',