|
@@ -12,7 +12,10 @@ import { useUserStore } from '@vben/stores';
|
|
|
import { ElMessage, ElMessageBox, ElTag } from 'element-plus';
|
|
import { ElMessage, ElMessageBox, ElTag } from 'element-plus';
|
|
|
|
|
|
|
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
|
|
-import { getCoupon2AuditListApi } from '#/api/coupon/coupon2';
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ getCoupon2AuditListApi,
|
|
|
|
|
+ getCoupon2EditListApi,
|
|
|
|
|
+} from '#/api/coupon/coupon2';
|
|
|
import { $t } from '#/locales';
|
|
import { $t } from '#/locales';
|
|
|
|
|
|
|
|
import AuditForm from './audit-form.vue';
|
|
import AuditForm from './audit-form.vue';
|
|
@@ -94,12 +97,10 @@ const gridOptions: VxeGridProps<any> = {
|
|
|
...formValues,
|
|
...formValues,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- // 如果是代理商且非管理员,添加商户id查询条件
|
|
|
|
|
- if (isDLSNotAdmin && userStore.userInfo?.workeruserid) {
|
|
|
|
|
- queryParams.coupon2merchantid = userStore.userInfo.workeruserid;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return await getCoupon2AuditListApi(queryParams);
|
|
|
|
|
|
|
+ // 根据用户角色调用不同的API:代理商且非管理员调用编辑API,否则调用审核API
|
|
|
|
|
+ return await (isDLSNotAdmin
|
|
|
|
|
+ ? getCoupon2EditListApi(queryParams) // editlist接口加了session,只能看自己新增的
|
|
|
|
|
+ : getCoupon2AuditListApi(queryParams));
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|