YY 2 gadi atpakaļ
vecāks
revīzija
bac6d391e9

+ 1 - 3
src/components/orderParts/card-2.vue

@@ -90,9 +90,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 - 3
src/components/orderParts/card-3.vue

@@ -29,9 +29,8 @@ export default {
   methods: {
     // 生成发货清单
     toDeliver({ data }) {
-      if (data.length == '0') {
-        this.$message('请选择订单');
-      } else {
+      if (data.length == '0') this.$message('请选择订单');
+      else {
         this.$set(this, 'list', data);
         this.$set(this, 'num', '2');
       }

+ 2 - 5
src/components/orderParts/detail/detail_order.vue

@@ -164,11 +164,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() {

+ 3 - 9
src/components/orderParts/detail/detail_sales_orderDetail.vue

@@ -249,11 +249,8 @@ export default {
     },
     handleSelect(value) {},
     async toSales(status) {
-      if (status == '1') {
-        var info = { order_detail: this.id, type: '4' };
-      } else if (status == '2') {
-        var info = { order_detail: this.id, type: '5' };
-      }
+      if (status == '1') var info = { order_detail: this.id, type: '4' };
+      else if (status == '2') var info = { order_detail: this.id, type: '5' };
       this.$confirm('是否确认申请售后', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -275,10 +272,7 @@ export default {
     async typeChange(value) {
       this.$set(this.form, `type`, value);
       if (value != '3') {
-        let info = {
-          order_detail: this.id,
-          goods_id: this.form.goods,
-        };
+        let info = { order_detail: this.id, goods_id: this.form.goods };
         let res = await this.cgfr(info);
         if (this.$checkRes(res)) {
           this.$set(this, `payMoney`, res.data);

+ 1 - 3
src/components/orderParts/parts/detail-1.vue

@@ -119,9 +119,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/components/orderParts/parts/detail-2.vue

@@ -112,11 +112,8 @@ export default {
       } else {
         if (goodsList.length > 0) {
           for (const val of fileList) {
-            if (address._id == val.address._id) {
-              val.goodsList = goodsList;
-            } else {
-              fileList.push({ goodsList, address });
-            }
+            if (address._id == val.address._id) val.goodsList = goodsList;
+            else fileList.push({ goodsList, address });
           }
         } else {
           let p1 = fileList.filter((i) => i.address._id != address._id);

+ 4 - 13
src/components/rateParts/detail.vue

@@ -118,9 +118,7 @@ export default {
       info.goods = this.id;
       let res;
       res = await this.goodsFetch(this.id);
-      if (this.$checkRes(res)) {
-        this.$set(this, 'goods', res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, 'goods', res.data);
       res = await this.query({ skip, limit, ...info });
       if (this.$checkRes(res)) {
         for (const p1 of res.data) {
@@ -166,9 +164,7 @@ export default {
     async toSend(item, data) {
       let res;
       if (data.id) res = await this.update(data);
-      if (this.$checkRes(res)) {
-        this.$message({ type: `success`, message: `回复成功` });
-      }
+      if (this.$checkRes(res)) this.$message({ type: `success`, message: `回复成功` });
       this.search();
     },
     async toDel(item, data, index) {
@@ -181,17 +177,12 @@ export default {
         let list = data.reply;
         if (index == '0') {
           res = await this.delete(data.id);
-          if (this.$checkRes(res)) {
-            this.$message({ type: `success`, message: `刪除成功` });
-          }
+          if (this.$checkRes(res)) this.$message({ type: `success`, message: `刪除成功` });
         } else {
           list.splice(index, 1);
           if (data.id) res = await this.update(data);
-          if (this.$checkRes(res)) {
-            this.$message({ type: `success`, message: `删除成功` });
-          }
+          if (this.$checkRes(res)) this.$message({ type: `success`, message: `删除成功` });
         }
-
         this.search();
       });
     },

+ 1 - 3
src/views/index.vue

@@ -110,9 +110,7 @@ export default {
     async search({ skip = 0, limit = this.$limit, ...info } = {}) {
       // info.shop = this.user.shop.id;
       let res = await this.query({ skip, limit, ...info });
-      if (this.$checkRes(res)) {
-        this.$set(this, 'data', res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, 'data', res.data);
     },
   },
   metaInfo() {

+ 1 - 4
src/views/platActivi/act/parts/detail.vue

@@ -107,10 +107,7 @@ export default {
           else this.$set(this, `goodsAct`, false);
         }
       } else {
-        this.$set(this, `form`, {
-          is_use: '0',
-          show_index: '0',
-        });
+        this.$set(this, `form`, { is_use: '0', show_index: '0' });
         this.$set(this.act_time, `is_use`, '0');
         this.$set(this.content, `is_use`, '0');
       }

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

@@ -76,9 +76,7 @@ export default {
       if (this.id) {
         let res = await this.fetch(this.id);
         if (this.$checkRes(res)) this.$set(this, `form`, res.data);
-      } else {
-        this.$set(this, `form`, { status: '0', show_index: '0', show_goods: '1' });
-      }
+      } else this.$set(this, `form`, { status: '0', show_index: '0', show_goods: '1' });
       this.loadings = false;
     },
     // 提交

+ 9 - 27
src/views/platActivi/coupon/detail.vue

@@ -230,18 +230,14 @@ export default {
           }
           this.$set(this, `form`, data);
         }
-      } else {
-        this.$set(this, `form`, { status: '0' });
-      }
+      } else this.$set(this, `form`, { status: '0' });
       this.loadings = false;
     },
     // 店铺名称远程查询
     async querySearch(value) {
       this.loading = true;
       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);
       this.loading = false;
     },
     // 店铺远程搜索多选
@@ -262,9 +258,7 @@ export default {
           if (data._id) res = await this.update(data);
           else res = await this.create(data);
           if (this.$checkRes(res, '维护信息成功', `${res.errmsg}`)) this.toBack();
-        } else {
-          return false;
-        }
+        } else return false;
       });
     },
     // 查询其他信息
@@ -272,37 +266,25 @@ export default {
       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: 'coupon_expire_type' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `expire_typeList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `expire_typeList`, 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);
       // 使用限制
       res = await this.dictQuery({ code: 'coupon_use_limit' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `use_limitList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `use_limitList`, res.data);
       // 领取限制
       res = await this.dictQuery({ code: 'coupon_get_limit' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `get_limitList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `get_limitList`, res.data);
       // 商品类型
       res = await this.tree();
       if (this.$checkRes(res)) this.$set(this, `tagsList`, 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);
     },
     // 返回
     toBack() {

+ 4 - 12
src/views/platSettings/indexModule/detail.vue

@@ -71,12 +71,8 @@ export default {
     async search() {
       if (this.id) {
         let res = await this.fetch(this.id);
-        if (this.$checkRes(res)) {
-          this.$set(this, `form`, res.data);
-        }
-      } else {
-        this.$set(this, `form`, { status: '0' });
-      }
+        if (this.$checkRes(res)) this.$set(this, `form`, res.data);
+      } else this.$set(this, `form`, { status: '0' });
       this.loadings = false;
     },
     // 提交
@@ -94,13 +90,9 @@ export default {
       let res;
       // 类型
       res = await this.dictQuery({ code: 'to_type' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `typeList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `typeList`, res.data);
       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() {

+ 2 - 6
src/views/platfinance/bill/index.vue

@@ -101,9 +101,7 @@ export default {
           this.$set(this, 'afterSaleList', res.data.afterSaleList);
           this.$set(this, 'orderList', res.data.orderList);
         }
-      } else {
-        this.$message({ type: `warning`, message: `请选择查询信息` });
-      }
+      } else this.$message({ type: `warning`, message: `请选择查询信息` });
       this.loadings = false;
     },
     // 重置
@@ -114,9 +112,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);
     },
     // 导出清单
     toFile() {

+ 1 - 3
src/views/platfinance/withdrawal/index.vue

@@ -125,9 +125,7 @@ export default {
       let res;
       // 提现审核状态
       res = await this.dictQuery({ code: 'withdrawal_exam_status' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `statusList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `statusList`, res.data);
     },
   },
   computed: {

+ 4 - 12
src/views/platmanag/goods/index.vue

@@ -220,9 +220,7 @@ export default {
         }
         this.$set(this, `form`, res.data);
         this.view = 'info';
-      } else {
-        this.$message.error('未找到指定数据');
-      }
+      } else this.$message.error('未找到指定数据');
     },
     // 多选
     handleSelect(data) {
@@ -232,18 +230,14 @@ export default {
     async querySearch(value) {
       this.loading = true;
       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);
       this.loading = false;
     },
     // 店铺名称远程查询
     selectShop(data) {},
     async searchShop(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);
     },
     changeTags(value) {
       let tags = _.last(value);
@@ -256,9 +250,7 @@ export default {
     },
     // 添加自定义
     initAddData() {
-      const obj = {
-        status: '1',
-      };
+      const obj = { status: '1' };
       this.$set(this, 'form', obj);
     },
     // 复制

+ 0 - 7
src/views/platmanag/order/index.vue

@@ -239,13 +239,6 @@ export default {
       let shopname = i.map((e) => e.shop_name);
       return shopname.join(',');
     },
-    // // 详情
-    // toDetail({ data }) {
-    //   this.$emit('toDetail', data._id);
-    // },
-    // toSales({ data }) {
-    //   this.$emit('toSales', data._id);
-    // },
     // 重置
     toClose() {
       this.searchForm = {};

+ 1 - 4
src/views/platmanag/user/index.vue

@@ -120,10 +120,7 @@ export default {
             cancelButtonText: '取消',
             type: 'warning',
           }).then(async () => {
-            let info = {
-              key: res.data,
-              target: data.target,
-            };
+            let info = { key: res.data, target: data.target };
             res = await this.delete(info);
             if (this.$checkRes(res)) {
               this.$message({ type: `success`, message: `删除成功` });

+ 1 - 3
src/views/selfShop/bill/index.vue

@@ -145,9 +145,7 @@ export default {
         }
         let res;
         res = await this.outCreate({ order, afterSale });
-        if (this.$checkRes(res)) {
-          this.$message({ type: `success`, message: `对账成功` });
-        }
+        if (this.$checkRes(res)) this.$message({ type: `success`, message: `对账成功` });
       });
     },
     // 查询其他信息

+ 3 - 10
src/views/selfShop/goods/index.vue

@@ -197,16 +197,11 @@ export default {
         this.$set(this, `form`, res.data);
         if (res.data.cb_config) this.cb_config = res.data.cb_config;
         this.view = 'info';
-      } else {
-        this.$message.error('未找到指定数据');
-      }
+      } else this.$message.error('未找到指定数据');
     },
     // 添加自定义
     initAddData() {
-      const obj = {
-        status: '1',
-        shop: _.get(this.user.shop, '_id'),
-      };
+      const obj = { status: '1', shop: _.get(this.user.shop, '_id') };
       this.$set(this, 'form', obj);
     },
     // 商品分类查询
@@ -267,9 +262,7 @@ export default {
         else data.status = '1';
         let res;
         if (data._id) res = await this.update(data);
-        if (this.$checkRes(res)) {
-          this.$message({ type: `success`, message: `修改成功` });
-        }
+        if (this.$checkRes(res)) this.$message({ type: `success`, message: `修改成功` });
         this.search();
       });
     },

+ 2 - 6
src/views/selfShop/goods/spec.vue

@@ -146,9 +146,7 @@ export default {
     async toData(row) {
       let data = this.data;
       let res = await this.goodsFetch(this.goods);
-      if (this.$checkRes(res)) {
-        data.push(res.data);
-      }
+      if (this.$checkRes(res)) data.push(res.data);
       this.search();
     },
     // 复制
@@ -197,9 +195,7 @@ export default {
         delete data.group_config;
         this.$set(this, `form`, data);
         this.view = 'info';
-      } else {
-        this.$message.error('未找到指定数据');
-      }
+      } else this.$message.error('未找到指定数据');
     },
     // 返回
     toBack() {

+ 1 - 3
src/views/selfShop/info/index.vue

@@ -42,9 +42,7 @@ export default {
     async search() {
       let id = this.user.shop.id;
       const res = await this.fetch(id);
-      if (this.$checkRes(res)) {
-        this.$set(this, `form`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `form`, res.data);
     },
     async toSave({ data }) {
       const res = await this.update(data);

+ 2 - 6
src/views/selfShop/sales/index.vue

@@ -110,14 +110,10 @@ export default {
       let res;
       // 类型
       res = await this.dictQuery({ code: 'afterSale_type' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `typeList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `typeList`, res.data);
       // 售后状态
       res = await this.dictQuery({ code: 'afterSale_status' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `statusList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `statusList`, res.data);
     },
   },
   computed: {

+ 4 - 12
src/views/zr/zrGoods/index.vue

@@ -110,11 +110,8 @@ export default {
     ...methodsUtil,
     // 查询
     async search({ skip = 0, limit = this.$limit, ...others } = {}) {
-      if (this.user.role.code == 'sadmin') {
-        others.shop = '';
-      } else {
-        others.shop = this.user.shop.id;
-      }
+      if (this.user.role.code == 'sadmin') others.shop = '';
+      else others.shop = this.user.shop.id;
       let query = { skip, limit, ...others };
       if (Object.keys(this.searchInfo).length > 0) query = { ...query, ...this.searchInfo };
       const res = await this.query(query);
@@ -126,10 +123,7 @@ export default {
     },
     // 添加自定义
     initAddData() {
-      const obj = {
-        status: '1',
-        shop: _.get(this.user.shop, '_id'),
-      };
+      const obj = { status: '1', shop: _.get(this.user.shop, '_id') };
       this.$set(this, 'form', obj);
     },
     // 查询其他信息
@@ -177,9 +171,7 @@ export default {
         else data.status = '1';
         let res;
         if (data.id) res = await this.update(data);
-        if (this.$checkRes(res)) {
-          this.$message({ type: `success`, message: `修改成功` });
-        }
+        if (this.$checkRes(res)) this.$message({ type: `success`, message: `修改成功` });
         this.search();
       });
     },

+ 3 - 9
src/views/zr/zrOrder/detail_orderDetail.vue

@@ -209,9 +209,7 @@ export default {
     async querySearch(value) {
       this.loading = true;
       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);
       this.loading = false;
     },
     handleSelect() {},
@@ -260,14 +258,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: {},

+ 3 - 6
src/views/zr/zrOrder/index.vue

@@ -46,15 +46,12 @@ export default {
       let res;
       // 类型
       res = await this.dictQuery({ code: 'order_process' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `statusList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `statusList`, res.data);
     },
     // 生成发货清单
     toDeliver({ data }) {
-      if (data.length == '0') {
-        this.$message('请选择订单');
-      } else {
+      if (data.length == '0') this.$message('请选择订单');
+      else {
         this.$set(this, 'list', data);
         this.$set(this, 'num', '2');
       }

+ 1 - 4
src/views/zr/zrOrder/parts/detail-1.vue

@@ -95,7 +95,6 @@ export default {
     // 详情
     toDetail({ data }) {
       this.$emit('toDetail', data._id);
-      // this.$router.push({ path: '/zr/zrOrder/detail_orderDetail', query: { id: data._id } });
     },
     toClose() {
       this.searchForm = {};
@@ -112,9 +111,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/zr/zrOrder/parts/detail-2.vue

@@ -97,11 +97,8 @@ export default {
       } else {
         if (goodsList.length > 0) {
           for (const val of fileList) {
-            if (address._id == val.address._id) {
-              val.goodsList = goodsList;
-            } else {
-              fileList.push({ goodsList, address });
-            }
+            if (address._id == val.address._id) val.goodsList = goodsList;
+            else fileList.push({ goodsList, address });
           }
         } else {
           let p1 = fileList.filter((i) => i.address._id != address._id);