...
|
...
|
@@ -367,15 +367,24 @@ 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 = '';
|
|
|
|
|
|
let issueType = +_.get(order, 'invoice.issueType');
|
|
|
// 补开发票订单
|
|
|
if (type === 8) {
|
|
|
let iop = _.get(order, 'links', []);
|
|
|
let issueType = +_.get(order, 'invoice.issueType');
|
|
|
|
|
|
newOrder.issueType = issueType === 2;
|
|
|
newOrder.invoiceSupplying = issueType === 1;
|
|
|
newOrder.invoiceType = '';
|
|
|
newOrder.issueType = issueType === 2;
|
|
|
newOrder.invoiceOperation = _.zipObject(iop, iop);
|
|
|
|
|
|
if (newOrder.issueType) {
|
|
|
newOrder.invoiceType = _.get(order, 'invoice.type', 0) === 2 ? '电子发票' : '纸质发票';
|
|
|
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) {
|
...
|
...
|
|