...
|
...
|
@@ -367,16 +367,25 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
newOrder.time = _.get(order, 'create_time');
|
|
|
newOrder.payType = _.get(order, 'payment_type');
|
|
|
newOrder.title = _.get(order, 'order_title');
|
|
|
newOrder.invoiceType = '';
|
|
|
|
|
|
// 补开发票订单
|
|
|
if (type === 8) {
|
|
|
let iop = _.get(order, 'links', []);
|
|
|
let issueType = +_.get(order, 'invoice.issueType');
|
|
|
|
|
|
newOrder.invoiceType = '';
|
|
|
newOrder.issueType = issueType === 2;
|
|
|
newOrder.invoiceSupplying = issueType === 1;
|
|
|
newOrder.invoiceOperation = _.zipObject(iop, iop);
|
|
|
|
|
|
if (!newOrder.invoiceOperation || (!newOrder.invoiceOperation.invoiceDetail &&
|
|
|
!newOrder.invoiceOperation.supplyInvoice)) {
|
|
|
_.set(newOrder, 'invoiceOperation.invoiceSupplying', issueType === 1);
|
|
|
}
|
|
|
|
|
|
if (newOrder.issueType) {
|
|
|
newOrder.invoiceType = _.get(order, 'invoice.type', 0) === 2 ? '电子发票' : '纸质发票';
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (order.is_cancel === 'Y' || order.status === 6) {
|
|
|
newOrder.canDelete = true; // 删除订单
|
...
|
...
|
|