|
@@ -86,7 +86,7 @@ export default {
|
|
|
await this.searchOther();
|
|
|
},
|
|
|
methods: {
|
|
|
- ...shop({ shopQuery: 'query' }),
|
|
|
+ ...shop({ shopQuery: 'query', shopFetch: 'fetch' }),
|
|
|
...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
|
|
|
...outBill({ outQuery: 'query', outCreate: 'create' }),
|
|
|
// 查询
|
|
@@ -96,6 +96,8 @@ export default {
|
|
|
condition[`start`] = _.head(condition.buy_time);
|
|
|
condition[`end`] = _.last(condition.buy_time);
|
|
|
delete condition.buy_time;
|
|
|
+ // 判断是否是个人店铺查询
|
|
|
+ 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, 'info', res.data);
|
|
@@ -147,23 +149,6 @@ export default {
|
|
|
workbook.xlsx.writeBuffer().then((buffer) => {
|
|
|
FileSaver.saveAs(new Blob([buffer], { type: 'application/octet-stream' }), `对账单.xlsx`);
|
|
|
});
|
|
|
- // this.$confirm('是否确认对账?', '提示', {
|
|
|
- // confirmButtonText: '确定',
|
|
|
- // cancelButtonText: '取消',
|
|
|
- // type: 'warning',
|
|
|
- // }).then(async () => {
|
|
|
- // let order = [];
|
|
|
- // for (const p1 of this.orderList) {
|
|
|
- // order.push(p1._id);
|
|
|
- // }
|
|
|
- // let afterSale = [];
|
|
|
- // for (const p1 of this.afterSaleList) {
|
|
|
- // afterSale.push(p1._id);
|
|
|
- // }
|
|
|
- // let res;
|
|
|
- // res = await this.outCreate({ order, afterSale });
|
|
|
- // if (this.$checkRes(res)) this.$message({ type: `success`, message: `对账成功` });
|
|
|
- // });
|
|
|
},
|
|
|
// 查询其他信息
|
|
|
async searchOther() {},
|