zs 1 год назад
Родитель
Сommit
446072300b

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

@@ -153,7 +153,16 @@ export default {
       total: 0,
       // info部分
       infoFields: [
-        { label: '商铺名称', model: 'shop', custom: true },
+        {
+          label: '商铺名称',
+          model: 'shop',
+          custom: true,
+          display: () => {
+            let user = this.user;
+            if (user && !user.role.code == 'shopAdmin') return true;
+            else return false;
+          },
+        },
         { label: '商品名称', model: 'name' },
         { label: '商品分类', model: 'tags', custom: true },
         { label: '活动标签', model: 'act_tags', type: 'selectMany' },
@@ -348,6 +357,8 @@ export default {
     // 保存
     async toSave({ data }) {
       let res;
+      // 判断是否是个人店铺查询
+      if (this.user.role.code == 'shopAdmin' && !this.form.shop) this.form.shop = this.user.shop._id || this.user.shop.id;
       if (data == '' || data == undefined) {
         let form = this.form;
         form.cb_config = this.cb_config;

+ 1 - 1
src/views/platmanag/goods/spec.vue

@@ -119,7 +119,7 @@ export default {
         { label: '排序', model: 'sort', type: 'number' },
         { label: '状态', model: 'status', type: 'select' },
         { label: '会员价', model: 'leader_price', type: 'number' },
-        { label: '图片', model: 'file', type: 'upload', url: '/files/point/goodsSpec/upload', limit: 1 },
+        { label: '图片', model: 'file', type: 'upload', url: '/files/point/shopOne/goodsSpec/upload', limit: 1 },
       ],
       rules: {
         freight: [{ required: true, message: '请输入运费', trigger: 'blur' }],

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

@@ -149,6 +149,8 @@ export default {
       else if (this.activeName == '6') info.status = '-1';
       let query = { skip, limit, ...info };
       if (Object.keys(condition).length > 0) query = { ...query, ...condition };
+      // 判断是否是个人店铺查询
+      if (this.user.role.code == 'shopAdmin') query.shop = this.user.shop._id || this.user.shop.id;
       let res = await this.query(query);
       if (this.$checkRes(res)) {
         this.$set(this, 'list', res.data);

+ 2 - 0
src/views/platmanag/sales/index.vue

@@ -100,6 +100,8 @@ export default {
     async search({ skip = 0, limit = this.$limit, ...info } = {}) {
       let query = { skip, limit, ...info };
       if (Object.keys(this.searchForm).length > 0) query = { ...query, ...this.searchForm };
+      // 判断是否是个人店铺查询
+      if (this.user.role.code == 'shopAdmin') query.shop = this.user.shop._id || this.user.shop.id;
       let res = await this.query(query);
       if (this.$checkRes(res)) {
         this.$set(this, 'list', res.data);