Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/environments/environment.ts
master
袁野 12 months ago
commit 0458abc38f
  1. 24
      src/app/admin/gas-class-group/gas-class-group-task/gas-class-group-task.component.ts
  2. 16
      src/app/admin/merchant/merchant-list/merchant-list.component.html
  3. 50
      src/app/admin/merchant/merchant-list/merchant-list.component.ts
  4. 159
      src/app/admin/order-manage/order-oil/order-oil-list/order-oil-list.component.html
  5. 140
      src/app/admin/order-manage/order-oil/order-oil-list/order-oil-list.component.ts
  6. 2
      src/app/services/order.service.ts
  7. 10
      src/environments/environment.ts

@ -85,17 +85,19 @@ export class GasClassGroupTaskComponent implements OnInit {
* *
*/ */
requestData(pageNum) { requestData(pageNum) {
this.tableLoading = true; if (pageNum != null) {
this.whereObject['pageNum'] = pageNum; this.tableLoading = true;
this.whereObject['pageSize'] = 10; this.whereObject['pageNum'] = pageNum;
this.gasClassGroupTaskService.getClassGroupTaskList(this.whereObject, data => { this.whereObject['pageSize'] = 10;
if (data['return_code'] === '000000') { this.gasClassGroupTaskService.getClassGroupTaskList(this.whereObject, data => {
this.dataObject = data['return_data']; if (data['return_code'] === '000000') {
} else { this.dataObject = data['return_data'];
this.modal.error(data['return_msg']); } else {
} this.modal.error(data['return_msg']);
this.tableLoading = false; }
}); this.tableLoading = false;
});
}
} }
/** /**

@ -118,7 +118,7 @@
<a (click)='jumpMerAccountRecord(data.id)'>余额充值记录</a> <a (click)='jumpMerAccountRecord(data.id)'>余额充值记录</a>
</li> </li>
<li nz-menu-item> <li nz-menu-item>
<a (click)='showTripartitePlatformModal(data.id)'>商户平台配置</a> <a (click)='showTripartitePlatformModal(data.id, 1)'>商户平台配置</a>
</li> </li>
</ul> </ul>
</nz-dropdown-menu> </nz-dropdown-menu>
@ -203,10 +203,11 @@
<nz-modal [(nzVisible)]="tripartitePlatformModal" nzTitle="商户配置" (nzOnCancel)="closeTripartitePlatformModal()" nzWidth="500px" [nzFooter]="null"> <nz-modal [(nzVisible)]="tripartitePlatformModal" nzTitle="商户配置" (nzOnCancel)="closeTripartitePlatformModal()" nzWidth="500px" [nzFooter]="null">
<form nz-form [formGroup]="tripartitePlatformForm"> <form nz-form [formGroup]="tripartitePlatformForm">
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired >第三方平台</nz-form-label> <nz-form-label [nzSpan]="6" nzRequired>第三方平台</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14" >
<nz-select formControlName="platformType"> <nz-select formControlName="platformType" (ngModelChange)="getPlatformDetail(tripartitePlatformForm.controls['merId'].value, $event)">
<nz-option nzValue="1" nzLabel="微信"></nz-option> <nz-option nzValue="1" nzLabel="微信"></nz-option>
<nz-option nzValue="2" nzLabel="惠支付"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
@ -225,6 +226,13 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6">商户KEY</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input placeholder="请输入第三方平台商户KEY" formControlName="platformMerKey" />
</nz-form-control>
</nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired >是否分账</nz-form-label> <nz-form-label [nzSpan]="6" nzRequired >是否分账</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">

@ -73,6 +73,7 @@ export class MerchantListComponent implements OnInit {
platformType: ['1', [Validators.required]], platformType: ['1', [Validators.required]],
platformMerName: [null, [Validators.required]], platformMerName: [null, [Validators.required]],
platformMerNumber: [null, [Validators.required]], platformMerNumber: [null, [Validators.required]],
platformMerKey: [null],
profitSharingStatus: ['false', [Validators.required]], profitSharingStatus: ['false', [Validators.required]],
profitSharingRatio: [null], profitSharingRatio: [null],
profitSharingReceiversNumber: [null], profitSharingReceiversNumber: [null],
@ -260,21 +261,48 @@ export class MerchantListComponent implements OnInit {
} }
showTripartitePlatformModal(merId: number) { showTripartitePlatformModal(merId: number, platformType: number) {
this.tripartitePlatformService.getDetail(merId, 1, data => { this.getPlatformDetail(merId, platformType);
if (data['return_data'] != null) {
data['return_data']['platformType'] = String(data['return_data']['platformType']);
data['return_data']['profitSharingStatus'] = String(data['return_data']['profitSharingStatus']);
this.tripartitePlatformForm.patchValue(data['return_data']);
} else {
this.tripartitePlatformForm.patchValue( { merId: merId, platformType: '1', profitSharingStatus: 'false' });
}
});
this.tripartitePlatformModal = true; this.tripartitePlatformModal = true;
} }
getPlatformDetail(merId: number, platformType: number) {
if (merId != null) {
this.tripartitePlatformService.getDetail(merId, platformType, data => {
if (data['return_data'] != null) {
const dataObj = data['return_data'];
this.tripartitePlatformForm.controls['merId'].setValue(dataObj['merId']);
this.tripartitePlatformForm.controls['platformMerName'].setValue(dataObj['platformMerName']);
this.tripartitePlatformForm.controls['platformMerNumber'].setValue(dataObj['platformMerNumber']);
this.tripartitePlatformForm.controls['platformMerKey'].setValue(dataObj['platformMerKey']);
this.tripartitePlatformForm.controls['profitSharingStatus'].setValue(String(dataObj['profitSharingStatus']));
this.tripartitePlatformForm.controls['profitSharingRatio'].setValue(dataObj['profitSharingRatio']);
this.tripartitePlatformForm.controls['profitSharingReceiversNumber'].setValue(dataObj['profitSharingReceiversNumber']);
this.tripartitePlatformForm.controls['profitSharingReceiversName'].setValue(dataObj['profitSharingReceiversName']);
} else {
this.tripartitePlatformForm.controls['merId'].setValue(merId);
this.tripartitePlatformForm.controls['platformMerName'].setValue(null);
this.tripartitePlatformForm.controls['platformMerNumber'].setValue(null);
this.tripartitePlatformForm.controls['platformMerKey'].setValue(null);
this.tripartitePlatformForm.controls['profitSharingStatus'].setValue('false');
this.tripartitePlatformForm.controls['profitSharingRatio'].setValue(null);
this.tripartitePlatformForm.controls['profitSharingReceiversNumber'].setValue(null);
this.tripartitePlatformForm.controls['profitSharingReceiversName'].setValue(null);
}
});
}
}
closeTripartitePlatformModal() { closeTripartitePlatformModal() {
this.tripartitePlatformForm.reset(); this.tripartitePlatformForm.controls['merId'].setValue(null);
this.tripartitePlatformForm.controls['platformMerName'].setValue(null);
this.tripartitePlatformForm.controls['platformMerNumber'].setValue(null);
this.tripartitePlatformForm.controls['platformType'].setValue(String(1));
this.tripartitePlatformForm.controls['platformMerKey'].setValue(null);
this.tripartitePlatformForm.controls['profitSharingStatus'].setValue('false');
this.tripartitePlatformForm.controls['profitSharingRatio'].setValue(null);
this.tripartitePlatformForm.controls['profitSharingReceiversNumber'].setValue(null);
this.tripartitePlatformForm.controls['profitSharingReceiversName'].setValue(null);
this.tripartitePlatformModal = false; this.tripartitePlatformModal = false;
} }

@ -299,6 +299,7 @@
<ul nz-menu nzSelectable> <ul nz-menu nzSelectable>
<li (click)="showOrderDetail(data.orderNo)" nz-menu-item>交易详情</li> <li (click)="showOrderDetail(data.orderNo)" nz-menu-item>交易详情</li>
<li *ngIf="REFUND_OIL_BTN == true && data.status == 2" (click)="showRefund(data.orderNo)" nz-menu-item>交易退款</li> <li *ngIf="REFUND_OIL_BTN == true && data.status == 2" (click)="showRefund(data.orderNo)" nz-menu-item>交易退款</li>
<li *ngIf="data.status == 2" (click)="showPrintModal(data.orderNo, data)" nz-menu-item>打印小票</li>
<li (click)="showRefundRecord(data.orderNo)" nz-menu-item>退款记录</li> <li (click)="showRefundRecord(data.orderNo)" nz-menu-item>退款记录</li>
</ul> </ul>
</nz-dropdown-menu> </nz-dropdown-menu>
@ -488,3 +489,161 @@
</tbody> </tbody>
</nz-table> </nz-table>
</nz-modal> </nz-modal>
<nz-modal [(nzVisible)]="printModal" nzTitle="选择打印方式" nzWidth="200" (nzOnCancel)="printModal = false" [nzFooter]="null">
<form nz-form>
<nz-form-item>
<nz-form-control>
<button nz-button nzType="primary" nzBlock (click)="showPrintDiv()">热敏打印机</button>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-control>
<button nz-button nzType="primary" nzBlock (click)="cloudPrint()">云打印机</button>
</nz-form-control>
</nz-form-item>
</form>
</nz-modal>
<!--<div id="div_print">
<div style="float: left;margin-bottom: 150px;">
<div style="line-height: 30px; color:#000;">
<span style="font-size: 13px;float: left;width: 100%;">{{printDataObject.gasName}}</span>
<span style="font-size: 13px;float: left;width: 100%;margin-left: 60px;">(客户存根)</span>
</div>
<table style="width: 100%;">
<tbody>
<tr><td class="print_td">-&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;</td></tr>
<tr>
<td class="print_td">流水号:<span>{{printDataObject.orderNo}}</span></td>
</tr>
<tr><td class="print_td">-&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;</td></tr>
<tr>
<td class="print_td">时间:<span>{{printDataObject.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</span></td>
</tr>
<tr>
<td class="print_td">来源:<span>嗨森逛</span></td>
</tr>
<tr>
<td class="print_td">油枪:<span>{{printDataObject.gasGunNo}}</span></td>
</tr>
<tr>
<td class="print_td">油品:<span>{{printDataObject.gasOilNo}}</span></td>
</tr>
<tr>
<td class="print_td">升数:<span>{{printDataObject.gasOilLiters}}升</span></td>
</tr>
<tr>
<td class="print_td">实际加油升数以油站加油机为准!</td>
</tr>
<tr><td style="float: left;margin-top: 10px;font-size: 30px;color: black">加油金额</td></tr>
<tr><td style="font-size: 30px;color: black">¥{{printDataObject.oilPrice}}元</td></tr>
<tr><td class="print_td">-&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;</td></tr>
<tr><td style="float: left;color: black;margin-left: 35px;">开心又省钱; 来”嗨森逛“</td></tr>
</tbody>
</table>
</div>
<div style="float: left;margin-bottom: 50px;">
<div style="line-height: 30px; color:#000;">
<span style="font-size: 13px;float: left;width: 100%;">{{printDataObject.gasName}}</span>
<span style="font-size: 13px;float: left;width: 100%;margin-left: 60px;">(收银员存根)</span>
</div>
<table style="width: 100%;">
<tbody>
<tr><td class="print_td">-&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;</td></tr>
<tr>
<td class="print_td">流水号:<span>{{printDataObject.orderNo}}</span></td>
</tr>
<tr><td class="print_td">-&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;</td></tr>
<tr>
<td class="print_td">时间:<span>{{printDataObject.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</span></td>
</tr>
<tr>
<td class="print_td">来源:<span>嗨森逛</span></td>
</tr>
<tr>
<td class="print_td">油枪:<span>{{printDataObject.gasGunNo}}</span></td>
</tr>
<tr>
<td class="print_td">油品:<span>{{printDataObject.gasOilNo}}</span></td>
</tr>
<tr>
<td class="print_td">升数:<span>{{printDataObject.gasOilLiters}}升</span></td>
</tr>
<tr>
<td class="print_td">实际加油升数以油站加油机为准!</td>
</tr>
<tr><td style="float: left;margin-top: 10px;font-size: 30px;color: black">加油金额</td></tr>
<tr><td style="font-size: 30px;color: black">¥{{printDataObject.oilPrice}}元</td></tr>
<tr><td class="print_td">-&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;</td></tr>
<tr><td style="float: left;color: black;margin-left: 35px;">开心又省钱; 来”嗨森逛“</td></tr>
</tbody>
</table>
</div>
&lt;!&ndash; <table border=1 cellspacing=0 cellpadding=1 width="100%" style="border-collapse:collapse" bordercolor="#333333">
<thead>
<tr>
<td width="10%">
<div align=center><b>表格页眉</b></div>
</td>
<td width="25%">
<div align=center><b>品名</b></div>
</td>
<td width="10%">
<div align=center><b>颜色</b></div>
</td>
<td width="10%">
<div align=center><b>规格</b></div>
</td>
<td width="10%">
<div align=center><b>数量</b></div>
</td>
<td width="15%">
<div align=center><b>单价</b></div>
</td>
<td width="20%">
<div align=center><b>金额</b></div>
</td>
</tr>
</thead>
<tbody>
<tr>
<td>&nbsp;1</td>
<td>名称01</td>
<td>浅灰色</td>
<td>185/10</td>
<td>1</td>
<td>248.00</td>
<td>248.00</td>
</tr>
<tr>
<td>&nbsp;2</td>
<td>名称02</td>
<td>浅灰色</td>
<td>185/10</td>
<td>1</td>
<td>248.00</td>
<td>248.00</td>
</tr>
<tr>
<td>&nbsp;3</td>
<td>名称03</td>
<td>浅灰色</td>
<td>185/10</td>
<td>1</td>
<td>248.00</td>
<td>248.00</td>
</tr>
<tr>
<td>&nbsp;4</td>
<td>名称04</td>
<td>浅灰色</td>
<td>185/10</td>
<td>1</td>
<td>248.00</td>
<td>248.00</td>
</tr>
</table>&ndash;&gt;
</div>-->

@ -14,6 +14,7 @@ import {MerchantService} from '../../../../services/merchant.service';
import {OrderOilService} from '../../../../services/order/order-oil.service'; import {OrderOilService} from '../../../../services/order/order-oil.service';
import {OrderManageService} from '../../../../services/order/order-manage.service'; import {OrderManageService} from '../../../../services/order/order-manage.service';
import {ActivatedRoute} from '@angular/router'; import {ActivatedRoute} from '@angular/router';
import {OrderService} from '../../../../services/order.service';
@Component({ @Component({
selector: 'app-order-oil-list', selector: 'app-order-oil-list',
@ -66,6 +67,12 @@ export class OrderOilListComponent implements OnInit {
// 退款按钮权限 // 退款按钮权限
REFUND_OIL_BTN = false; REFUND_OIL_BTN = false;
printDataObject = {
orderNo: null,
printData: null
};
printModal = false;
constructor(private modal: NzModalService, constructor(private modal: NzModalService,
private message: NzMessageService, private message: NzMessageService,
private commonsService: CommonsService, private commonsService: CommonsService,
@ -73,6 +80,7 @@ export class OrderOilListComponent implements OnInit {
private merchantService: MerchantService, private merchantService: MerchantService,
private store: LocalStorageService, private store: LocalStorageService,
private orderManageService: OrderManageService, private orderManageService: OrderManageService,
private orderService: OrderService,
private orderOilService: OrderOilService, private orderOilService: OrderOilService,
private tyAgentService: TyAgentService, private tyAgentService: TyAgentService,
private tySalesmanService: TySalesmanService, private tySalesmanService: TySalesmanService,
@ -456,4 +464,136 @@ export class OrderOilListComponent implements OnInit {
this.refundRecordModal = false; this.refundRecordModal = false;
} }
showPrintModal(orderNo: string, data: PrintData) {
this.printDataObject.orderNo = orderNo;
this.printDataObject.printData = data;
this.printModal = true;
}
cloudPrint() {
this.orderService.print(this.printDataObject.orderNo, 2, dataBack => {
if (dataBack['return_code'] === '000000') {
this.modal.success({
nzTitle: '提示',
nzContent: '操作成功',
});
}
});
}
showPrintDiv() {
const data = this.printDataObject.printData;
data['createTime'] = new Date(data['createTime']).toLocaleString();
this.printDiv(data);
}
printDiv(data: object) {
const headstr = '<html><head><title>打印小票</title></head><body>';
const footstr = '</body>';
const newstr = '<div id="div_print" style="font-size: 16px;">\n' +
' <div style="float: left;margin-bottom: 150px;">\n' +
' <div style="line-height: 30px; color:#000;">\n' +
' <span style="font-size: 13px;float: left;width: 100%;">' + data['storeName'] + '</span>\n' +
' <span style="font-size: 13px;float: left;width: 100%;margin-left: 60px;">(客户存根)</span>\n' +
' </div>\n' +
' <table style="width: 100%;">\n' +
' <tbody>\n' +
' <tr><td style="font-size: xx-small;color: black;">-------------------------------------------</td></tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">流水号:<span>' + data['orderNo'] + '</span></td>\n' +
' </tr>\n' +
' <tr><td style="font-size: xx-small;color: black;">-------------------------------------------</td></tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">时间:<span>' + data['createTime'] + '</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">来源:<span>嗨森逛</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">油枪:<span>' + data['gasGunNo'] + '</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">油品:<span>' + data['gasOilNo'] + '</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">升数:<span>' + data['gasOilLiters'] + '升</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">实际加油升数以油站加油机为准!</td>\n' +
' </tr>\n' +
' <tr><td style="font-size: xx-small;color: black;">-------------------------------------------</td></tr>\n' +
' <tr><td style="float: left;margin-top: 10px;font-size: 30px;color: black">加油金额</td></tr>\n' +
' <tr><td style="font-size: 30px;color: black">¥' + data['gasRefuelPrice'] + '元</td></tr>\n' +
' <tr><td style="font-size: xx-small;color: black;">-------------------------------------------</td></tr>\n' +
' <tr><td style="float: left;font-size: xx-small;color: black;margin-left: 25px;">开心又省钱; 来”嗨森逛“</td></tr>\n' +
' </tbody>\n' +
' </table>\n' +
' </div>\n' +
' <div style="float: left;margin-bottom: 50px;">\n' +
' <div style="line-height: 30px; color:#000;">\n' +
' <span style="font-size: 13px;float: left;width: 100%;">' + data['storeName'] + '</span>\n' +
' <span style="font-size: 13px;float: left;width: 100%;margin-left: 60px;">(收银员存根)</span>\n' +
' </div>\n' +
' <table style="width: 100%;">\n' +
' <tbody>\n' +
' <tr><td style="font-size: xx-small;color: black;">-------------------------------------------</td></tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">流水号:<span>' + data['orderNo'] + '</span></td>\n' +
' </tr>\n' +
' <tr><td style="font-size: xx-small;color: black;">-------------------------------------------</td></tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">时间:<span>' + data['createTime'] + '</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">来源:<span>嗨森逛</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">油枪:<span>' + data['gasGunNo'] + '</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">油品:<span>' + data['gasOilNo'] + '</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">升数:<span>' + data['gasOilLiters'] + '升</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">实际加油升数以油站加油机为准!</td>\n' +
' </tr>\n' +
' <tr><td style="font-size: xx-small;color: black;">-------------------------------------------</td></tr>\n' +
' <tr><td style="float: left;margin-top: 10px;font-size: 30px;color: black">加油金额</td></tr>\n' +
' <tr><td style="font-size: 30px;color: black">¥' + data['gasRefuelPrice'] + '元</td></tr>\n' +
' <tr><td style="font-size: xx-small;color: black;">-------------------------------------------</td></tr>\n' +
' <tr><td style="float: left;font-size: xx-small;color: black;margin-left: 25px;">开心又省钱; 来”嗨森逛“</td></tr>\n' +
' </tbody>\n' +
' </table>\n' +
' </div>\n' +
'</div>';
// const oldstr = document.body.innerHTML;
// document.body.innerHTML = headstr + newstr + footstr;
const newWindow = window.open('', '');
newWindow.document.write(headstr + newstr + footstr);
newWindow.print();
newWindow.close();
// document.body.innerHTML = oldstr;
// location.reload();
return false;
}
}
export class PrintData {
// 油站名称
gasName = '';
// 订单号
orderNo = '';
// 下单时间
createTime = '';
// 油品
gasOilNo = '';
// 加油抢号
gasGunNo = '';
// 加油升数
gasOilLiters = 0;
// 加油金额
oilPrice = 0;
} }

@ -22,7 +22,7 @@ export class OrderService {
* @param callBack * @param callBack
*/ */
public print(orderId: number, printType: number, callBack) { public print(orderId: number, printType: number, callBack) {
this.http.get(environment.baseUrl + 'highOrder/print?orderId=' + orderId + '&printType=' + printType).subscribe(data => { this.http.get(environment.baseUrl + 'highOrder/print?orderNo=' + orderId + '&printType=' + printType).subscribe(data => {
callBack(data); callBack(data);
}); });
} }

@ -4,10 +4,12 @@
export const environment = { export const environment = {
production: false, production: false,
baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
orderUrl: 'http://localhost:9304/order/', // 测试环境服务器地址(请求数据地址) // orderUrl: 'http://localhost:9304/order/', // 测试环境服务器地址(请求数据地址)
// baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// orderUrl: 'https://hsgcs.dctpay.com/order/', // 测试环境服务器地址(请求数据地址) // baseUrl: 'https://hsg.dctpay.com/brest/', // 正式环境服务器地址(请求数据地址)
// orderUrl: 'https://hsg.dctpay.com/order/', // 测试环境服务器地址(请求数据地址)
orderUrl: 'https://hsgcs.dctpay.com/order/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://hsgcs.dctpay.com/filesystem/', imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=', key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=',
inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=', inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=',

Loading…
Cancel
Save