From 370c7ad97ff396d34631384168b95acfa3c756cd Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 17 Feb 2022 14:07:14 +0800 Subject: [PATCH] fix bug --- .../network-freight.component.html | 50 +++++++---- .../network-freight.component.less | 38 +++++--- .../network-freight.component.ts | 87 ++++++++++++++++--- .../dynamic-setting-modal.component.ts | 3 +- 4 files changed, 131 insertions(+), 47 deletions(-) diff --git a/src/app/routes/sys-setting/components/network-freight/network-freight.component.html b/src/app/routes/sys-setting/components/network-freight/network-freight.component.html index 8ad65105..64b5e0d1 100644 --- a/src/app/routes/sys-setting/components/network-freight/network-freight.component.html +++ b/src/app/routes/sys-setting/components/network-freight/network-freight.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-24 15:54:08 * @LastEditors : Shiming - * @LastEditTime : 2022-02-17 11:19:04 + * @LastEditTime : 2022-02-17 14:05:57 * @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\components\\network-freight\\network-freight.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -46,11 +46,10 @@ - -
- -
+ +
+ +
-
{{item?.costRate ? item?.costRate + '%' : '' }}
+
{{ item?.costRate ? item?.costRate + '%' : '' }}
-
货源单:{{item?.goodsSurchargeRatio ? item?.goodsSurchargeRatio + '%' : '' }}
-
合同单:{{item?.contractSurchargeRatio ? item?.contractSurchargeRatio + '%' : '' }}
+
货源单:{{ item?.goodsSurchargeRatio ? item?.goodsSurchargeRatio + '%' : '' }}
+
合同单:{{ item?.contractSurchargeRatio ? item?.contractSurchargeRatio + '%' : '' }}
-
{{item?.ticketEnable ? '已开启' : '未开启' }}
+
{{ item?.ticketEnable ? '已开启' : '未开启' }}
-
{{item?.insuranceEnable ? '已开启' : '未开启' }}
+
{{ item?.insuranceEnable ? '已开启' : '未开启' }}
-
{{item?.pinganEnable ? '已开启' : '未开启' }}
+
{{ item?.pinganEnable ? '已开启' : '未开启' }}
-
{{item?.pufaEnable ? '已开启' : '未开启' }}
+
{{ item?.pufaEnable ? '已开启' : '未开启' }}
-
{{item?.pinganAccountEnable ? '已开启' : '未开启' }}
-
{{item?.pinganAccountEnable ? item?.pinganAccount : '' }}
+
{{ item?.pinganAccountEnable ? '已开启' : '未开启' }}
+
{{ item?.pinganAccountEnable ? item?.pinganAccount : '' }}
-
{{item?.pufaAccountEnable ? '已开启' : '未开启' }}
-
{{item?.pufaAccountEnable ? item?.pufaAccount : '' }}
+
{{ item?.pufaAccountEnable ? '已开启' : '未开启' }}
+
{{ item?.pufaAccountEnable ? item?.pufaAccount : '' }}
-
{{item?.invoiceEnable ? '已开启' : '未开启' }}
+
{{ item?.invoiceEnable ? '已开启' : '未开启' }}
开通子账户 @@ -111,7 +110,20 @@ - +
+
+
    +
  • + {{ item.name }} +
  • +
+
+
+ + + +
+
diff --git a/src/app/routes/sys-setting/components/network-freight/network-freight.component.less b/src/app/routes/sys-setting/components/network-freight/network-freight.component.less index 04fd4ba3..4b87d5c1 100644 --- a/src/app/routes/sys-setting/components/network-freight/network-freight.component.less +++ b/src/app/routes/sys-setting/components/network-freight/network-freight.component.less @@ -1,13 +1,27 @@ -:host::ng-deep{ - .search-box{ - .ant-card-body{ - padding-bottom: 18px; - } +:host { + ::ng-deep { + .card-height { + min-height: 600px; + } + + .save-btn { + width : 100%; + text-align: right; + } + + .block-radio { + display : flex; + min-height: 32px; + } + + input { + width : 100px; + margin-left: 10px; + } + + .ant-form-item-control-input-content { + display: flex; + } } - - .content-box{ - .ant-card-body{ - padding-top: 14px; - } - } -} \ No newline at end of file + + } \ No newline at end of file diff --git a/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts b/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts index b7e89d83..6199f03c 100644 --- a/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts +++ b/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts @@ -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 + } + } } diff --git a/src/app/shared/components/dynamic-setting/dynamic-setting-modal/dynamic-setting-modal.component.ts b/src/app/shared/components/dynamic-setting/dynamic-setting-modal/dynamic-setting-modal.component.ts index 3da6b5e9..9d0ebbc3 100644 --- a/src/app/shared/components/dynamic-setting/dynamic-setting-modal/dynamic-setting-modal.component.ts +++ b/src/app/shared/components/dynamic-setting/dynamic-setting-modal/dynamic-setting-modal.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-10 16:06:17 * @LastEditors : Shiming - * @LastEditTime : 2022-02-15 11:23:29 + * @LastEditTime : 2022-02-17 13:28:39 * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\dynamic-setting\\dynamic-setting-modal\\dynamic-setting-modal.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -55,7 +55,6 @@ export class DynamicSettingModalComponent implements OnInit { if (typeData) { this.tabs = typeData.children; this.selectedTab = typeData.children[0]; - this.configList = this.formatItems(this.selectedTab.items); } }