|
|
@ -3,7 +3,7 @@ import {environment} from '../../../../environments/environment'; |
|
|
|
import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms'; |
|
|
|
import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms'; |
|
|
|
import {OrderService} from '../../../services/order.service'; |
|
|
|
import {OrderService} from '../../../services/order.service'; |
|
|
|
import {IconService} from '../../../services/icon.service'; |
|
|
|
import {IconService} from '../../../services/icon.service'; |
|
|
|
import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd'; |
|
|
|
import {NzMessageService, NzModalService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd'; |
|
|
|
import {Router} from '_@angular_router@9.0.7@@angular/router'; |
|
|
|
import {Router} from '_@angular_router@9.0.7@@angular/router'; |
|
|
|
import {CompanyService} from '../../../services/company.service'; |
|
|
|
import {CompanyService} from '../../../services/company.service'; |
|
|
|
import {MerchantService} from '../../../services/merchant.service'; |
|
|
|
import {MerchantService} from '../../../services/merchant.service'; |
|
|
@ -40,11 +40,18 @@ export class OilStationOrderComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
gasArray = []; |
|
|
|
gasArray = []; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
printDataObject = { |
|
|
|
|
|
|
|
orderId: null, |
|
|
|
|
|
|
|
printData: null |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
printModal = false; |
|
|
|
|
|
|
|
|
|
|
|
constructor( |
|
|
|
constructor( |
|
|
|
private form: FormBuilder, |
|
|
|
private form: FormBuilder, |
|
|
|
private order: OrderService, |
|
|
|
private order: OrderService, |
|
|
|
private webSocketService: WebsocketService, |
|
|
|
private webSocketService: WebsocketService, |
|
|
|
private iconService: IconService, |
|
|
|
private iconService: IconService, |
|
|
|
|
|
|
|
private modal: NzModalService, |
|
|
|
private message: NzMessageService, |
|
|
|
private message: NzMessageService, |
|
|
|
private router: Router, |
|
|
|
private router: Router, |
|
|
|
private company: CompanyService, |
|
|
|
private company: CompanyService, |
|
|
@ -167,11 +174,31 @@ export class OilStationOrderComponent implements OnInit { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
showPrintDiv(orderId: number, data: PrintData) { |
|
|
|
showPrintModal(orderId: number, data: PrintData) { |
|
|
|
|
|
|
|
this.printDataObject.orderId = orderId; |
|
|
|
|
|
|
|
this.printDataObject.printData = data; |
|
|
|
|
|
|
|
this.printModal = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cloudPrint() { |
|
|
|
|
|
|
|
this.orderService.print(this.printDataObject.orderId, 2, dataBack => { |
|
|
|
|
|
|
|
if (dataBack['return_code'] === '000000') { |
|
|
|
|
|
|
|
this.modal.success({ |
|
|
|
|
|
|
|
nzTitle: '提示', |
|
|
|
|
|
|
|
nzContent: '操作成功', |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.getRequest(false, this.searchForm.value); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
showPrintDiv() { |
|
|
|
|
|
|
|
const orderId = this.printDataObject.orderId; |
|
|
|
|
|
|
|
const data = this.printDataObject.printData; |
|
|
|
data['createTime'] = new Date(data['createTime']).toLocaleString(); |
|
|
|
data['createTime'] = new Date(data['createTime']).toLocaleString(); |
|
|
|
this.printDiv(data); |
|
|
|
this.printDiv(data); |
|
|
|
|
|
|
|
|
|
|
|
this.orderService.print(orderId, dataBack => { |
|
|
|
this.orderService.print(orderId, 1, dataBack => { |
|
|
|
if (dataBack['return_code'] === '000000') { |
|
|
|
if (dataBack['return_code'] === '000000') { |
|
|
|
this.getRequest(false, this.searchForm.value); |
|
|
|
this.getRequest(false, this.searchForm.value); |
|
|
|
} |
|
|
|
} |
|
|
|