Просмотр исходного кода

Merge branch 'one' of http://git.cc-lotus.info/pointToNetwork/web-admin into one

lrf 1 год назад
Родитель
Сommit
0f80f3bd9c
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      src/views/platfinance/withdrawal/index.vue

+ 4 - 0
src/views/platfinance/withdrawal/index.vue

@@ -94,6 +94,8 @@ export default {
     // 查询
     async search({ skip = 0, limit = this.$limit, ...info } = {}) {
       let condition = _.cloneDeep(this.searchForm);
+      // 判断是否是个人店铺查询
+      if (this.user.role.code == 'shopAdmin') info.shop = this.user.shop._id || this.user.shop.id;
       let res = await this.query({ skip, limit, ...condition, ...info });
       if (this.$checkRes(res)) {
         this.$set(this, 'list', res.data);
@@ -116,6 +118,8 @@ export default {
     // 保存
     async onSubmit({ data }) {
       data.exam_time = moment().format('YYYY-MM-DD HH:mm:ss');
+      // 判断是否是个人店铺查询
+      if (this.user.role.code == 'shopAdmin' && !data.shop) data.shop = this.user.shop._id || this.user.shop.id;
       let res;
       if (data.id) res = await this.update(data);
       else res = await this.create(data);