|
@@ -65,7 +65,7 @@ class BillService extends CrudService {
|
|
|
const { shop, start, end } = query;
|
|
|
const pipline = [];
|
|
|
// 商店过滤&时间过滤
|
|
|
- const q = { $match: { $and: [{ apply_time: { $gte: start } }, { apply_time: { $lte: end } }] } }; // 退款,退货的完成状态, status:{$in:['-1','-2']}
|
|
|
+ const q = { $match: { $and: [{ apply_time: { $gte: start } }, { apply_time: { $lte: end } }] } }; // 退款,退货的完成状态, status:{$in:['-1','-2']}, out_bill:{$ne:'0'}
|
|
|
if (shop) q.$match.shop = shop;
|
|
|
pipline.push(q);
|
|
|
// 组织数据
|
|
@@ -104,7 +104,7 @@ class BillService extends CrudService {
|
|
|
const { shop, start, end } = query;
|
|
|
const pipline = [];
|
|
|
// 商店过滤&时间过滤
|
|
|
- const q = { $match: { $and: [{ pay_time: { $gte: start } }, { pay_time: { $lte: end } }] } };
|
|
|
+ const q = { $match: { $and: [{ pay_time: { $gte: start } }, { pay_time: { $lte: end } }] } }; // , out_bill:{$ne:'0'}
|
|
|
if (shop) q.$match.shop = shop;
|
|
|
pipline.push(q);
|
|
|
// #region 整理数据
|
|
@@ -133,7 +133,7 @@ class BillService extends CrudService {
|
|
|
const list = [];
|
|
|
for (const order of orderList) {
|
|
|
const o = _.cloneDeep(order);
|
|
|
- const type = dictData.find(f => f.value === o.type);
|
|
|
+ const type = dictData.find((f) => f.value === o.type);
|
|
|
const moneyDetail = this.moneyDetail(order);
|
|
|
const obj = {
|
|
|
_id: _.get(o, '_id'),
|