开票导出

master
胡锐 2 months ago
parent a52a9d8992
commit 719873869f
  1. 3
      src/app/pages/trade/gas-order-receipt/gas-order-receipt.component.html
  2. 13
      src/app/pages/trade/gas-order-receipt/gas-order-receipt.component.ts
  3. 12
      src/app/services/trade-receipt/gas-order-receipt.service.ts

@ -40,6 +40,7 @@
<div nz-col [nzSpan]="24" class="search-area"> <div nz-col [nzSpan]="24" class="search-area">
<button nz-button [nzType]="'primary'" (click)="searchFormSubmit()">查询</button> <button nz-button [nzType]="'primary'" (click)="searchFormSubmit()">查询</button>
<button nz-button (click)="searchFormReset()">重置</button> <button nz-button (click)="searchFormReset()">重置</button>
<button nz-button [nzType]="'primary'" (click)="export()">导出加油明细</button>
</div> </div>
</div> </div>
</form> </form>
@ -58,6 +59,7 @@
<tr> <tr>
<th>交易单号</th> <th>交易单号</th>
<th>加油站</th> <th>加油站</th>
<th>油号</th>
<th>开票公司</th> <th>开票公司</th>
<th>开票税号</th> <th>开票税号</th>
<th>开票金额</th> <th>开票金额</th>
@ -72,6 +74,7 @@
<tr *ngFor="let data of basicTable.data;let i = index" [style]="{ color: data.color}"> <tr *ngFor="let data of basicTable.data;let i = index" [style]="{ color: data.color}">
<td>{{data.orderNo}}</td> <td>{{data.orderNo}}</td>
<td>{{data.merName}}</td> <td>{{data.merName}}</td>
<td>{{data.oilNo}}</td>
<td>{{data.companyName}}</td> <td>{{data.companyName}}</td>
<td>{{data.taxNo}}</td> <td>{{data.taxNo}}</td>
<td>{{data.amount}}</td> <td>{{data.amount}}</td>

@ -33,6 +33,7 @@ import {NzTooltipDirective} from "ng-zorro-antd/tooltip";
import {DateMinutesDiffPipe} from "../../../pipes/common/date-minutes-diff.pipe"; import {DateMinutesDiffPipe} from "../../../pipes/common/date-minutes-diff.pipe";
import {NzDividerComponent} from "ng-zorro-antd/divider"; import {NzDividerComponent} from "ng-zorro-antd/divider";
import {NzTypographyComponent} from "ng-zorro-antd/typography"; import {NzTypographyComponent} from "ng-zorro-antd/typography";
import {environment} from "../../../../environments/environment";
@Component({ @Component({
selector: 'app-gas-order-receipt', selector: 'app-gas-order-receipt',
@ -89,6 +90,7 @@ import {NzTypographyComponent} from "ng-zorro-antd/typography";
styleUrl: './gas-order-receipt.component.less' styleUrl: './gas-order-receipt.component.less'
}) })
export class GasOrderReceiptComponent { export class GasOrderReceiptComponent {
imageUrl = environment.imageUrl;
loadingObject = { loadingObject = {
title: "加载中...", title: "加载中...",
status: false, status: false,
@ -249,4 +251,15 @@ export class GasOrderReceiptComponent {
}); });
} }
/**
*
*/
export() {
this.gasOrderReceiptService.export(this.searchForm.value, (data:any) => {
window.location.href = this.imageUrl + 'temporary/' + data['return_data'];
});
}
} }

@ -22,6 +22,18 @@ export class GasOrderReceiptService {
}); });
} }
/**
*
* @param param
* @param callBack
*/
public export(param: any, callBack:any) {
param.tm = new Date().getTime();
this.http.get(environment.baseUrl + 'gasOrderReceipt/export?'+ObjectData.objectByString(param)).subscribe(data => {
callBack(data);
});
}
/** /**
* *
* @param param * @param param

Loading…
Cancel
Save