This commit is contained in:
wangshiming
2022-02-17 14:07:14 +08:00
parent 38db93088a
commit 370c7ad97f
4 changed files with 131 additions and 47 deletions

View File

@ -17,21 +17,30 @@ export class NetworkFreightComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
@ViewChild('sfTicket', { static: false }) sfTicket!: SFComponent;
@ViewChild('sfTax', { static: false }) sfTax!: SFComponent;
ui: SFUISchema = {};
ui2: SFUISchema = {};
ui3: SFUISchema = {};
ui4: SFUISchema = {};
schema: SFSchema = {};
addSchema: SFSchema = {};
ticketSchema: SFSchema = {};
TaxSchema: SFSchema = {};
_$expand = false;
taxStatus = false;
formData: any;
ticketId: any;
ticketItem: any;
formDataTicket: any
formDataTax: any
isVisible = false;
isVisibleTicket = false;
edit = false;
editId = false;
tabs: any[] = [
{name: '开票设置'},
{name: '税务设置'},
];
columns: STColumn[] = [
{
@ -105,7 +114,7 @@ export class NetworkFreightComponent implements OnInit {
},
{
text: '财务设置',
click: item => this.roleAction(item, 2)
click: item => this.ticket(item)
},
{
text: '充值账户',
@ -224,6 +233,41 @@ export class NetworkFreightComponent implements OnInit {
title: '注册电话',
ui: { placeholder: '请输入' }
},
registerPhone2: {
type: 'string',
title: '税收分类版本号',
ui: { placeholder: '请输入' }
},
registerPhone3: {
type: 'string',
title: '税收分类编码',
ui: { placeholder: '请输入' }
},
registerPhone4: {
type: 'string',
title: '发票税率',
ui: { placeholder: '请输入' }
},
registerPhone5: {
type: 'string',
title: '发票面额上限',
ui: { placeholder: '请输入' }
},
registerPhone6: {
type: 'string',
title: '收款人',
ui: { placeholder: '请输入' }
},
registerPhone7: {
type: 'string',
title: '复核人',
ui: { placeholder: '请输入' }
},
registerPhone8: {
type: 'string',
title: '开票人',
ui: { placeholder: '请输入' }
},
senderName: {
type: 'string',
title: '寄件人姓名',
@ -236,7 +280,7 @@ export class NetworkFreightComponent implements OnInit {
},
senderRegionCode: {
type: 'number',
title: '营业执照所在地',
title: '寄件地区',
ui: {
widget: 'cascader',
valueProperty: 'regionCode',
@ -266,6 +310,22 @@ export class NetworkFreightComponent implements OnInit {
};
this.ui3 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
}
initSFTax() {
this.TaxSchema = {
properties: {
enterpriseName1: {
type: 'string',
title: '公司名称',
ui: {
widget: 'text',
},
default: this.ticketItem?.enterpriseName,
},
},
required: ['enterpriseName']
};
this.ui4= { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
}
initSFFre() {
this.addSchema = {
properties: {
@ -310,9 +370,12 @@ export class NetworkFreightComponent implements OnInit {
this.editId = value.id;
this.isVisible = true;
}
// 财务设置
ticket(value: any) {
this.formDataTicket = [];
this.formDataTax = [];
this.ticketItem = value;
this.initSFTax();
this.initSFTicket();
this.service.request(this.service.$api_getTicketByNetworkTransporterId, { id: value.id }).subscribe((res: any) => {
console.log(res);
@ -461,16 +524,12 @@ export class NetworkFreightComponent implements OnInit {
getRegionDetailByCode(regionCode: any) {
return this.service.request(this.service.$api_get_region_by_code, { regionCode });
}
// setMakeInvoice2(item:any) {
// this.nzModalService.create({
// nzTitle: '基础设置',
// nzContent: SinglepageSettingModalComponent,
// nzWidth: 900,
// nzComponentParams: {
// extendType: '1',
// businessId: item.id
// },
// nzFooter: null
// });
// }
changeType(value: any) {
console.log(value);
if(value.name === '税务设置') {
this.taxStatus = true
} else {
this.taxStatus = false
}
}
}