This commit is contained in:
Taric Xin
2022-01-10 13:20:56 +08:00
parent 5fa122dd25
commit 865534d2ab
15 changed files with 436 additions and 57 deletions

View File

@ -10,26 +10,26 @@
<div nz-row nzGutter="8">
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="150" col="1">
<se label="网络货运人" required>
{{headerInfo?.ltdidName}}
{{headerInfo?.ltdid}}
</se>
<se label="发票日期" required>
2021-12-11
{{headerInfo?.invdate}}
</se>
</div>
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1">
<se label="销售方" required>
{{headerInfo?.projectName}}
{{headerInfo?.hrto}}
</se>
<se label="发票号" required>
{{headerInfo?.taxNumber}}
{{headerInfo?.invoiceno}}
</se>
</div>
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="8" [nzXs]="8" se-container [labelWidth]="100" col="1">
<se label="收票类型" required>
{{headerInfo?.vatname}}
{{headerInfo?.invtype}}
</se>
<se label="收票备注">
{{headerInfo?.isdetail}}
{{headerInfo?.remarks}}
</se>
</div>
</div>
@ -55,7 +55,7 @@
</nz-card>
<nz-card class="content-box" nzBordered>
<st #st [data]="service.$api_get_invoice_requested_order_detail" [columns]="columns" size="small"
<st #st [data]="service.$api_get_input_invoice_detail_page" [columns]="columns" size="small"
[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] }"

View File

@ -31,7 +31,7 @@ export class InputInvoiceDetailComponent implements OnInit {
ngOnInit(): void {}
loadHeadInfo() {
this.service.request(this.service.$api_get_invoice_requested_header_detail, { id: this.id }).subscribe(res => {
this.service.request(this.service.$api_get_input_invoice_header, { id: this.id }).subscribe(res => {
console.log(res);
if (res) {
this.headerInfo = res;
@ -41,7 +41,17 @@ export class InputInvoiceDetailComponent implements OnInit {
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
Object.assign(requestOptions.body, { ...this.sf.value });
Object.assign(requestOptions.body, {
...this.sf.value,
billTime: {
start: this.sf.value.billTime?.[0] || null,
end: this.sf.value.billTime?.[1] || null
},
feedate: {
start: this.sf.value.feedate?.[0] || null,
end: this.sf.value.feedate?.[1] || null
}
});
}
return requestOptions;
};
@ -74,21 +84,21 @@ export class InputInvoiceDetailComponent implements OnInit {
hidden: true
}
},
billHCode: {
feecode: {
type: 'string',
title: '费用单',
ui: {
placeholder: '请输入'
}
},
billHC2ode: {
billHCode: {
type: 'string',
title: '订单号',
ui: {
placeholder: '请输入'
}
},
vatappSts: {
cno: {
type: 'string',
title: '结算客户',
enum: [{ label: '全部', value: '' }],
@ -98,7 +108,7 @@ export class InputInvoiceDetailComponent implements OnInit {
},
default: ''
},
createTime: {
feedate: {
title: '费用日期',
type: 'string',
ui: {
@ -109,7 +119,7 @@ export class InputInvoiceDetailComponent implements OnInit {
}
} as SFDateWidgetSchema
},
create2Time: {
billTime: {
title: '订单日期',
type: 'string',
ui: {
@ -127,14 +137,14 @@ export class InputInvoiceDetailComponent implements OnInit {
private initST(): STColumn[] {
return [
{ title: '序号', render: 'billHCode', width: 80 },
{ title: '费用号', index: 'vatappSts', width: 100 },
{ title: '费用日期', index: 'billTime', type: 'date', width: 150 },
{ title: '订单号', index: 'projectId', width: 100 },
{ title: '订单日期', index: 'loadingfrom', width: 150 },
{ title: '结算客户', index: 'loadingto', width: 90 },
{ title: '费用科目', index: 'goodsinfo', width: 100 },
{ title: '收票金额', index: 'driverinfo', width: 140 },
{ title: '收票税额', index: 'billkpmoney', width: 100 }
{ title: '费用号', index: 'feecode', width: 100 },
{ title: '费用日期', index: 'feedate', type: 'date', width: 150 },
{ title: '订单号', index: 'billHCode', width: 100 },
{ title: '订单日期', index: 'billTime', width: 150 },
{ title: '结算客户', index: 'cnoName', width: 90 },
{ title: '费用科目', index: 'feesubname', width: 100 },
{ title: '收票金额', index: 'invmoney', width: 140 },
{ title: '收票税额', index: 'invtax', width: 100 }
];
}
}

View File

@ -8,7 +8,7 @@
[ui]="{ '*': { spanLabelFixed: 100,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
[button]="'none'"></sf>
</div>
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right" [class.expend-options]="_$expand">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button> 导出</button>
@ -31,7 +31,7 @@
</div>
</div>
<st #st [data]="service.$mock_url" [columns]="columns"
<st #st [data]="service.$api_get_input_invoice_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] }"

View File

@ -9,7 +9,7 @@ import { AddCollectionInvoiceModalComponent } from './add-collection-invoice-mod
@Component({
selector: 'app-input-invoice',
templateUrl: './input-invoice.component.html',
styleUrls: ['../../../commom/less/box.less']
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
})
export class InputInvoiceComponent implements OnInit {
@ViewChild('st', { static: true })
@ -31,7 +31,15 @@ export class InputInvoiceComponent implements OnInit {
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
Object.assign(requestOptions.body, {
...this.sf.value
...this.sf.value,
createtime: {
start: this.sf.value.createtime?.[0] || null,
end: this.sf.value.createtime?.[1] || null
},
invdate: {
start: this.sf.value.invdate?.[0] || null,
end: this.sf.value.invdate?.[1] || null
}
});
}
return requestOptions;
@ -83,7 +91,7 @@ export class InputInvoiceComponent implements OnInit {
hidden: true
}
},
orderSn: {
inpinvcode: {
type: 'string',
title: '收票单号',
ui: {
@ -91,7 +99,7 @@ export class InputInvoiceComponent implements OnInit {
placeholder: '请输入'
}
},
ltdId: {
ltdid: {
type: 'string',
title: '网络货运人',
ui: {
@ -102,7 +110,7 @@ export class InputInvoiceComponent implements OnInit {
},
default: ''
},
orderS2n: {
invoiceno: {
type: 'string',
title: '发票号码',
ui: {
@ -110,7 +118,7 @@ export class InputInvoiceComponent implements OnInit {
placeholder: '请输入'
}
},
order2S2n: {
invtype: {
type: 'string',
title: '发票类型',
ui: {
@ -122,7 +130,7 @@ export class InputInvoiceComponent implements OnInit {
}
}
},
orderSn1: {
hrto: {
type: 'string',
title: '销售方',
ui: {
@ -132,7 +140,7 @@ export class InputInvoiceComponent implements OnInit {
}
}
},
createTime: {
createtime: {
title: '创建时间',
type: 'string',
ui: {
@ -143,7 +151,7 @@ export class InputInvoiceComponent implements OnInit {
}
} as SFDateWidgetSchema
},
ord0erSn1: {
sts: {
type: 'string',
title: '收票状态',
ui: {
@ -155,7 +163,7 @@ export class InputInvoiceComponent implements OnInit {
}
}
},
orderSn2: {
invdate: {
type: 'string',
title: '发票日期',
ui: {
@ -166,7 +174,7 @@ export class InputInvoiceComponent implements OnInit {
}
}
},
orderS1n2: {
remarks: {
type: 'string',
title: '收票备注',
ui: {
@ -176,23 +184,21 @@ export class InputInvoiceComponent implements OnInit {
}
}
},
orderS3: {
billCode: {
type: 'string',
title: '订单号',
ui: {
autocomplete: 'off',
placeholder: '请选择',
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
},
orderSn4: {
feecode: {
type: 'string',
title: '费用号',
ui: {
autocomplete: 'off',
placeholder: '请选择',
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
@ -205,23 +211,23 @@ export class InputInvoiceComponent implements OnInit {
private initST(): STColumn[] {
return [
{ title: '', index: 'key', type: 'checkbox' },
{ title: '收票单号', index: 'no', type: 'link' },
{ title: '网络货运人', index: 'no' },
{ title: '发票日期', index: 'no', type: 'date' },
{ title: '发票号', index: 'callNo' },
{ title: '发票金额', index: 'callNo' },
{ title: '税额', render: 'call1No' },
{ title: '发票类型', render: 'call1N2o' },
{ title: '销售方', index: 'callNo' },
{ title: '创建时间', index: 'updatedAt', type: 'date' },
{ title: '创建人', index: 'updatedAt' },
{ title: '收票状态', index: 'updatedAt' },
{ title: '收票单号', index: 'inpinvcode', type: 'link' },
{ title: '网络货运人', index: 'ltdid' },
{ title: '发票日期', index: 'invdate', type: 'date' },
{ title: '发票号', index: 'invoiceno' },
{ title: '发票金额', index: 'invmoney' },
{ title: '税额', index: 'invtax' },
{ title: '发票类型', index: 'invtype' },
{ title: '销售方', index: 'hrto' },
{ title: '创建时间', index: 'createtime', type: 'date' },
{ title: '创建人', index: 'createbyname' },
{ title: '收票状态', index: 'sts' },
{
title: '操作',
buttons: [
{
text: '浏览',
click: item => this.router.navigate(['/ticket/input-invoice/detail/1'])
click: item => this.router.navigate(['/ticket/input-invoice/detail/' + item.id])
},
{
text: '修改',