edit
This commit is contained in:
@ -122,7 +122,7 @@ export class ETCBlacklistComponent implements OnInit {
|
||||
return false;
|
||||
}
|
||||
const ids = com.selectedData.map(node => node.carId);
|
||||
this.service.request(this.service.$api_save_etc_shipper, { carIds: ids }).subscribe(res => {
|
||||
this.service.request(this.service.$api_save_etc_cart, { carIds: ids }).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('添加成功');
|
||||
modal.destroy();
|
||||
|
||||
@ -22,16 +22,16 @@
|
||||
|
||||
<nz-card class="content-box" nzBordered>
|
||||
|
||||
<st #st [data]="service.$mock_url" [columns]="columns"
|
||||
<st #st [data]="service.$api_get_invoice_record_page" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '400px' }">
|
||||
<ng-template st-row="call1No" let-item let-index="index" let-column="column">
|
||||
张三<br>13812345678
|
||||
{{item.driverName}}<br>{{item.driverTelephone}}
|
||||
</ng-template>
|
||||
<ng-template st-row="call12No" let-item let-index="index" let-column="column">
|
||||
粤B88888<br>张三
|
||||
{{item.licenseCarNo}}<br>{{item.licenseBelonging}}
|
||||
</ng-template>
|
||||
</st>
|
||||
</nz-card>
|
||||
@ -74,21 +74,21 @@ export class ETCInvoicedListComponent implements OnInit {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
orderSn: {
|
||||
wayBillCode: {
|
||||
type: 'string',
|
||||
title: '运单号',
|
||||
ui: {
|
||||
autocomplete: 'off'
|
||||
}
|
||||
},
|
||||
order2Sn: {
|
||||
billCode: {
|
||||
type: 'string',
|
||||
title: '订单号',
|
||||
ui: {
|
||||
autocomplete: 'off'
|
||||
}
|
||||
},
|
||||
order2S2n: {
|
||||
billType: {
|
||||
type: 'string',
|
||||
title: '订单类型',
|
||||
ui: {
|
||||
@ -97,12 +97,12 @@ export class ETCInvoicedListComponent implements OnInit {
|
||||
placeholder: '请选择'
|
||||
}
|
||||
},
|
||||
receiveName: {
|
||||
invoicingStatus: {
|
||||
type: 'string',
|
||||
title: '开票状态',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'refund:apply:status' },
|
||||
params: { dictKey: 'etc:invoicing:status' },
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
@ -110,7 +110,7 @@ export class ETCInvoicedListComponent implements OnInit {
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
receiveName2: {
|
||||
shipperId: {
|
||||
type: 'string',
|
||||
title: '托运人',
|
||||
enum: [{ label: '全部', value: '' }],
|
||||
@ -123,7 +123,7 @@ export class ETCInvoicedListComponent implements OnInit {
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
ltdId: {
|
||||
enterpriseInfoId: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
ui: {
|
||||
@ -143,19 +143,19 @@ export class ETCInvoicedListComponent implements OnInit {
|
||||
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '运单号', index: 'no' },
|
||||
{ title: '订单号', index: 'no' },
|
||||
{ title: '开票状态', index: 'callNo' },
|
||||
{ title: '订单类型', index: 'callNo' },
|
||||
{ title: '装货地', index: 'callNo' },
|
||||
{ title: '卸货地', index: 'callNo' },
|
||||
{ title: '运单号', index: 'wayBillCode' },
|
||||
{ title: '订单号', index: 'billCode' },
|
||||
{ title: '开票状态', index: 'invoicingStatus', type: 'enum', enum: { '0': '待开票', '1': '开票中', '2': '已开票', '3': '开票失败' } },
|
||||
{ title: '订单类型', index: 'billType' },
|
||||
{ title: '装货地', index: 'loadingPlace' },
|
||||
{ title: '卸货地', index: 'dischargePlace' },
|
||||
{ title: '司机信息', render: 'call1No' },
|
||||
{ title: '车辆信息', render: 'call12No' },
|
||||
{ title: '托运人', index: 'callNo' },
|
||||
{ title: '网络货运人', index: 'callNo' },
|
||||
{ title: '开票金额', index: 'callNo' },
|
||||
{ title: '开票张数', index: 'callNo' },
|
||||
{ title: '申请时间', index: 'updatedAt', type: 'date' },
|
||||
{ title: '托运人', index: 'shipperAppUserName' },
|
||||
{ title: '网络货运人', index: 'enterpriseInfoName' },
|
||||
{ title: '开票金额', index: 'invoicingAmount' },
|
||||
{ title: '开票张数', index: 'invoicingNumber' },
|
||||
{ title: '申请时间', index: 'orderReceivingTime', type: 'date' },
|
||||
{
|
||||
title: '操作',
|
||||
buttons: [
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
</div>
|
||||
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1">
|
||||
<se label="销售方" required>
|
||||
{{headerInfo?.hrto}}
|
||||
{{headerInfo?.hrtoName}}
|
||||
</se>
|
||||
<se label="发票号" required>
|
||||
{{headerInfo?.invoiceno}}
|
||||
|
||||
@ -212,16 +212,16 @@ export class InputInvoiceComponent implements OnInit {
|
||||
return [
|
||||
{ title: '', index: 'key', type: 'checkbox' },
|
||||
{ title: '收票单号', index: 'inpinvcode', type: 'link' },
|
||||
{ title: '网络货运人', index: 'ltdid' },
|
||||
{ title: '网络货运人', index: 'ltdName' },
|
||||
{ title: '发票日期', index: 'invdate', type: 'date' },
|
||||
{ title: '发票号', index: 'invoiceno' },
|
||||
{ title: '发票金额', index: 'invmoney' },
|
||||
{ title: '税额', index: 'invtax' },
|
||||
{ title: '发票类型', index: 'invtype' },
|
||||
{ title: '销售方', index: 'hrto' },
|
||||
{ title: '销售方', index: 'hrtoName' },
|
||||
{ title: '创建时间', index: 'createtime', type: 'date' },
|
||||
{ title: '创建人', index: 'createbyname' },
|
||||
{ title: '收票状态', index: 'sts' },
|
||||
{ title: '收票状态', index: 'stsLabel' },
|
||||
{
|
||||
title: '操作',
|
||||
buttons: [
|
||||
|
||||
@ -47,6 +47,8 @@
|
||||
</div>
|
||||
<button nz-button (click)="this.batchRequested()">开票</button>
|
||||
<button nz-button (click)="this.rejectAction(selectedRows)">驳回</button>
|
||||
<button nz-button (click)="changePice(selectedRows)">修改地址</button>
|
||||
<button nz-button (click)="printOrder(selectedRows)">打印面单</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@ import { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema } from '@delon/fo
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { TicketService } from '../../services/ticket.service';
|
||||
import { PrintOrderModalComponent } from './print-order-modal/print-order-modal.component';
|
||||
import { RequestedInvoiceModalComponent } from './requested-invoice-modal/requested-invoice-modal.component';
|
||||
|
||||
@Component({
|
||||
@ -83,6 +84,51 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
changePice(item: any[]) {
|
||||
const modal = this.nzModalService.create({
|
||||
nzTitle: '驳回',
|
||||
nzContent: this.rejectModal,
|
||||
nzFooter: [
|
||||
{
|
||||
label: '拒绝',
|
||||
type: 'default',
|
||||
onClick: () => {
|
||||
modal.destroy();
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '通过',
|
||||
type: 'primary',
|
||||
onClick: () => {
|
||||
modal.destroy();
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
modal.afterClose.subscribe(res => {
|
||||
this.st.load();
|
||||
});
|
||||
}
|
||||
|
||||
printOrder(item: any[]) {
|
||||
if (this.selectedRows?.length <= 0) {
|
||||
this.service.msgSrv.warning('请选择订单');
|
||||
return;
|
||||
}
|
||||
const modal = this.nzModalService.create({
|
||||
nzTitle: '打印面单',
|
||||
nzContent: PrintOrderModalComponent,
|
||||
nzWidth: 650,
|
||||
nzComponentParams: { vatappcodes: this.selectedRows.map(item => item.vatappcode) },
|
||||
nzFooter: null
|
||||
});
|
||||
modal.afterClose.subscribe(res => {
|
||||
if (res) {
|
||||
this.st.load();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
showReason(item: any) {
|
||||
const modal = this.nzModalService.create({
|
||||
nzTitle: '查看原因',
|
||||
@ -117,12 +163,10 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
// id: this.id
|
||||
};
|
||||
this.service.request(this.service.$api_get_applyBatchFicoVatinv, params).subscribe((res: any) => {
|
||||
console.log(res);
|
||||
if (res) {
|
||||
this.service.msgSrv.success('开票成功!');
|
||||
modal.destroy();
|
||||
} else {
|
||||
this.service.msgSrv.error(res?.msg);
|
||||
this.st.load(1);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -139,6 +183,7 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('开票成功!');
|
||||
modal.destroy();
|
||||
this.st.load(1);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -318,6 +363,7 @@ export class InvoiceRequestedComponent implements OnInit {
|
||||
{ title: '其他要求', index: 'otherremarks', width: 100 },
|
||||
{ title: '申请人', index: 'applyName', width: 90 },
|
||||
{ title: '申请时间', index: 'applyTime', type: 'date', width: 150 },
|
||||
{ title: '快递是否下单成功', index: 'expressHSts', width: 150, type: 'enum', enum: { true: '是', false: '否' } },
|
||||
{
|
||||
title: '操作',
|
||||
width: 150,
|
||||
|
||||
@ -0,0 +1,48 @@
|
||||
<div nz-row class="statistics-box">
|
||||
<div nz-col nzSpan="24" se-container [labelWidth]="100" col="1">
|
||||
<se label="打印发票" required>
|
||||
<nz-radio-group [(ngModel)]="type">
|
||||
<label nz-radio [nzValue]="1">分批下单</label>
|
||||
<label nz-radio [nzValue]="2">汇总下单</label>
|
||||
</nz-radio-group>
|
||||
</se>
|
||||
<se>
|
||||
{{type===1?'分批下单系统会根据网络货运人、货主以及收件地址自动拆分成多个包裹下单':'汇总下单系统会将所选申请单汇总成一个包裹下单'}}
|
||||
</se>
|
||||
<ng-container *ngIf="type===2">
|
||||
<se label="收件地址" required>
|
||||
<nz-select [(ngModel)]="data.rcontactInfo" [nzCustomTemplate]="rcontactInfosData">
|
||||
<nz-option [nzValue]="item" nzLabel="Jack" *ngFor="let item of rcontactInfos"
|
||||
[nzCustomContent]="true">
|
||||
{{item.contact}} {{item.tel}}<br />
|
||||
{{item.province}} {{item.city}} {{item.county}} {{item.address}}
|
||||
</nz-option>
|
||||
</nz-select>
|
||||
<ng-template #rcontactInfosData>
|
||||
{{data.rcontactInfo.contact}} {{data.rcontactInfo.tel}}<br />
|
||||
{{data.rcontactInfo.province}} {{data.rcontactInfo.city}} {{data.rcontactInfo.county}}
|
||||
{{data.rcontactInfo.address}}
|
||||
</ng-template>
|
||||
</se>
|
||||
<se label="寄件地址" required>
|
||||
<nz-select [(ngModel)]="data.scontactInfo" [nzCustomTemplate]="scontactInfosData">
|
||||
<nz-option [nzValue]="item" nzLabel="Jack" *ngFor="let item of scontactInfos"
|
||||
[nzCustomContent]="true">
|
||||
{{item.contact}} {{item.tel}}<br />
|
||||
{{item.province}} {{item.city}} {{item.county}} {{item.address}}
|
||||
</nz-option>
|
||||
</nz-select>
|
||||
<ng-template #scontactInfosData>
|
||||
{{data.scontactInfo.contact}} {{data.scontactInfo.tel}}<br />
|
||||
{{data.scontactInfo.province}} {{data.scontactInfo.city}} {{data.scontactInfo.county}}
|
||||
{{data.scontactInfo.address}}
|
||||
</ng-template>
|
||||
</se>
|
||||
</ng-container>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button nz-button type="button" (click)="close()">取消</button>
|
||||
<button nz-button type="button" nzType="primary" (click)="sure()">保存</button>
|
||||
</div>
|
||||
@ -0,0 +1,7 @@
|
||||
nz-select-top-control {
|
||||
height: 65px !important;
|
||||
}
|
||||
|
||||
cdk-virtual-scroll-viewport {
|
||||
height: 100px !important;
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
import { Component, Input, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { TicketService } from '../../../services/ticket.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-print-order-modal',
|
||||
templateUrl: './print-order-modal.component.html',
|
||||
styleUrls: ['./print-order-modal.component.less'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class PrintOrderModalComponent implements OnInit {
|
||||
data: any = {};
|
||||
|
||||
type = 1;
|
||||
|
||||
rcontactInfos: any[] = [];
|
||||
scontactInfos: any[] = [];
|
||||
|
||||
@Input()
|
||||
vatappcodes: string[] = [];
|
||||
|
||||
constructor(private modal: NzModalRef, public msgSrv: NzMessageService, public service: TicketService) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.loadAddress();
|
||||
}
|
||||
|
||||
loadAddress() {
|
||||
this.service.request(this.service.$api_get_order_summary_path, this.vatappcodes).subscribe(res => {
|
||||
if (res) {
|
||||
this.rcontactInfos = res.rcontactInfos || [];
|
||||
this.scontactInfos = res.scontactInfos || [];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
sure() {
|
||||
console.log(this.data);
|
||||
if (this.type === 1) {
|
||||
this.service.request(this.service.$api_create_express, this.vatappcodes).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('操作成功');
|
||||
this.modal.destroy(true);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (!this.data.rcontactInfo || !this.data.scontactInfo) {
|
||||
this.service.msgSrv.warning('请选择收件地址和寄件地');
|
||||
return;
|
||||
}
|
||||
const params = {
|
||||
rcontactInfo: this.data.rcontactInfo,
|
||||
ltdId: this.data.scontactInfo.ltdId,
|
||||
shipperId: this.data.scontactInfo.shipperId,
|
||||
vatappcodes: this.vatappcodes,
|
||||
scontactInfo: this.data.scontactInfo
|
||||
};
|
||||
delete this.data.scontactInfo.ltdId;
|
||||
delete this.data.scontactInfo.shipperId;
|
||||
delete this.data.scontactInfo.id;
|
||||
this.service.request(this.service.$api_get_order_summary, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('操作成功');
|
||||
this.modal.destroy(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modal.destroy();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user