From c0dc0f1a85a63bccbee92c1ddf7fe80dab532e10 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 11 May 2022 17:57:00 +0800 Subject: [PATCH 1/8] fix bug --- .../components/edit/edit.component.ts | 89 +++++++++++++------ .../individual-collect.component.ts | 2 +- .../individual-declare.component.ts | 2 +- .../individual-income.component.ts | 2 +- .../invoice-reporting.component.ts | 2 +- .../order-reporting.component.ts | 2 +- 6 files changed, 65 insertions(+), 34 deletions(-) diff --git a/src/app/routes/partner/channel-sales/components/edit/edit.component.ts b/src/app/routes/partner/channel-sales/components/edit/edit.component.ts index 3fc7e467..04847177 100644 --- a/src/app/routes/partner/channel-sales/components/edit/edit.component.ts +++ b/src/app/routes/partner/channel-sales/components/edit/edit.component.ts @@ -42,30 +42,59 @@ export class ParterChannelSalesEditComponent implements OnInit { ngOnInit(): void { this.initSF(); + console.log(this.sts); + if (!this.sts) { this.service.request(this.service.$api_getChannelSalesInfo, { id: this.i?.id }).subscribe(res => { const List: any = []; + const List2: any = []; + const List3: any = []; if (res) { let value1 = Object.assign({}, res); delete value1.employeeVO; let value = res.employeeVO; List.push({ label: value.empName + '/' + value.empNo, value: value.empNo }); - setTimeout(() => { - if (this.sf) { - console.log(this.sf.getProperty('/employeeVO')!.schema); + List2.push({ label: value.roleName, value: value.id }); + res.roleInfoVOList.forEach((element: any) => { + List2.push({ label: element.roleName, value: element.id }); + List3.push(element.id); + }); + setTimeout(() => { + if (this.sf) { + console.log(this.sf.getProperty('/employeeVO')!.schema); - this.sf.getProperty('/employeeVO')!.schema.enum = List; - this.sf.getProperty('/employeeVO')!.widget.reset(List); - } - if (value.empNo) { - this.sf.setValue('/employeeVO', value.empNo); - this.currentOAItem = value; - this.sf.setValue('/phoneNumber', res.telephone); - } - }) + this.sf.getProperty('/employeeVO')!.schema.enum = List; + this.sf.getProperty('/employeeVO')!.widget.reset(List); + + this.sf.getProperty('/roleIds')!.schema.enum = List2; + this.sf.getProperty('/roleIds')!.widget.reset(List2); + } + if (value.empNo) { + this.sf.setValue('/employeeVO', value.empNo); + this.sf.setValue('/roleIds', value.List3); + this.currentOAItem = value; + this.sf.setValue('/phoneNumber', res.telephone); + } + }); this.record = value1; } }); + } else { + this.service.request(this.service.$api_getAppRoleList).subscribe(res => { + if (res) { + let List: any = []; + res.forEach((element: any) => { + List.push({ label: element.roleName, value: element.id }); + }); + console.log(List); + setTimeout(() => { + if (this.sf) { + this.sf.getProperty('/roleIds')!.schema.enum = List; + this.sf.getProperty('/roleIds')!.widget.reset(List); + } + } + )} + }); } } initSF() { @@ -88,6 +117,7 @@ export class ParterChannelSalesEditComponent implements OnInit { title: '手机号', type: 'string', maxLength: 11, + readOnly: !this.sts, ui: { placeholder: '请输入' } @@ -114,6 +144,7 @@ export class ParterChannelSalesEditComponent implements OnInit { title: '关联OA员工', type: 'string', maxLength: 30, + readOnly: !this.sts, ui: { widget: 'select', // serverSearch: true, @@ -163,17 +194,17 @@ export class ParterChannelSalesEditComponent implements OnInit { placeholder: '授权角色', mode: 'multiple', maxMultipleCount: 5, - asyncData: () => { - return this.service.request(this.service.$api_getAppRoleList).pipe( - map((res: any) => { - return res - .filter((role: any) => role.roleCode !== 'Administrator') - .map((item: any) => { - return { label: item.roleName, value: item.id }; - }); - }) - ); - }, + // asyncData: () => { + // return this.service.request(this.service.$api_getAppRoleList).pipe( + // map((res: any) => { + // return res + // .filter((role: any) => role.roleCode !== 'Administrator') + // .map((item: any) => { + // return { label: item.roleName, value: item.id }; + // }); + // }) + // ); + // }, visibleIf: { isAuthorization: (value: string) => value === '1' } } }, @@ -203,14 +234,14 @@ export class ParterChannelSalesEditComponent implements OnInit { close() { this.modalRef.destroy(); } - save() { + save() { this.sf.validator({ emitError: true }); - + if (!this.sf.valid) return; - let params: any= { - ...this.sf?.value, - } - delete params.telephone + let params: any = { + ...this.sf?.value + }; + delete params.telephone; this.service.request(this.service.$api_save, { ...params, employeeVO: this.currentOAItem }).subscribe(res => { if (res) { this.service.msgSrv.success(res.msg); diff --git a/src/app/routes/tax-management/components/individual-collect/individual-collect.component.ts b/src/app/routes/tax-management/components/individual-collect/individual-collect.component.ts index 1541fe77..42f6e319 100644 --- a/src/app/routes/tax-management/components/individual-collect/individual-collect.component.ts +++ b/src/app/routes/tax-management/components/individual-collect/individual-collect.component.ts @@ -268,6 +268,6 @@ export class TaxManagementIndividualCollectComponent extends BasicTableComponent // 导出 exprot() { - this.service.exportStart({ ...this.sfValue, pageSize: -1 }, this.service.$api_taxSummary_export); + this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_taxSummary_export); } } diff --git a/src/app/routes/tax-management/components/individual-declare/individual-declare.component.ts b/src/app/routes/tax-management/components/individual-declare/individual-declare.component.ts index 1a549383..b951ae68 100644 --- a/src/app/routes/tax-management/components/individual-declare/individual-declare.component.ts +++ b/src/app/routes/tax-management/components/individual-declare/individual-declare.component.ts @@ -431,7 +431,7 @@ export class TaxManagementIndividualDeclareComponent extends BasicTableComponent // 导出 exprot() { - this.service.exportStart({ ...this.sfValue, pageSize: -1 }, this.service.$api_taxDeclaration_export); + this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_taxDeclaration_export); } openWainingModal(content: string, title = '提示') { diff --git a/src/app/routes/tax-management/components/individual-income/individual-income.component.ts b/src/app/routes/tax-management/components/individual-income/individual-income.component.ts index 7d1d3b89..fce3e7cb 100644 --- a/src/app/routes/tax-management/components/individual-income/individual-income.component.ts +++ b/src/app/routes/tax-management/components/individual-income/individual-income.component.ts @@ -349,7 +349,7 @@ export class TaxManagementIndividualIncomeComponent extends BasicTableComponent // 导出 exprot() { - this.service.exportStart({ ...this.sfValue, pageSize: -1 }, this.service.$api_taxIncome_export); + this.service.exportStart({ ...this.sfValue,declareStatus: this.selectedIndex, pageSize: -1 }, this.service.$api_taxIncome_export); } handleOK() {} diff --git a/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.ts b/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.ts index 8b2cf608..5c26cc75 100644 --- a/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.ts +++ b/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.ts @@ -312,7 +312,7 @@ export class TaxManagementInvoiceReportingComponent extends BasicTableComponent * 异步导出 */ export() { - this.service.exportStart(this.reqParams, this.service.$api_invoiceUpload_export); + this.service.exportStart({...this.reqParams, pageSize: -1 }, this.service.$api_invoiceUpload_export); } openWainingModal(content: string, title = '提示') { diff --git a/src/app/routes/tax-management/components/order-reporting/order-reporting.component.ts b/src/app/routes/tax-management/components/order-reporting/order-reporting.component.ts index 12237a9c..3b9ea67b 100644 --- a/src/app/routes/tax-management/components/order-reporting/order-reporting.component.ts +++ b/src/app/routes/tax-management/components/order-reporting/order-reporting.component.ts @@ -467,7 +467,7 @@ export class TaxManagementOrderReportingComponent extends BasicTableComponent im * 异步导出 */ export() { - this.service.exportStart(this.sf?.value, this.service.$api_async_export_order_reporting_list); + this.service.exportStart({...this.reqParams, pageSize: -1} ,this.service.$api_async_export_order_reporting_list); } openWainingModal(content: string, title = '提示') { From 550dded6f2df58df29cca949fb6710df6ce4fb29 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 11 May 2022 19:12:10 +0800 Subject: [PATCH 2/8] fix bug --- .../individual-collect/individual-collect.component.ts | 6 +++--- .../individual-declare/individual-declare.component.ts | 6 +++--- .../individual-income/individual-income.component.ts | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/app/routes/tax-management/components/individual-collect/individual-collect.component.ts b/src/app/routes/tax-management/components/individual-collect/individual-collect.component.ts index 42f6e319..dd952cc6 100644 --- a/src/app/routes/tax-management/components/individual-collect/individual-collect.component.ts +++ b/src/app/routes/tax-management/components/individual-collect/individual-collect.component.ts @@ -247,11 +247,11 @@ export class TaxManagementIndividualCollectComponent extends BasicTableComponent uploadSetting() { let params: any; if (this.selectedRows.length === 0) { - params ={} + params =[] } else{ - params ={ ids: []} + params =[] this.selectedRows.forEach(item => { - params.ids.push(item.id); + params.push(item.id); }); } this.service.request(this.service.$api_get_updateData,params).subscribe((res: any) => { diff --git a/src/app/routes/tax-management/components/individual-declare/individual-declare.component.ts b/src/app/routes/tax-management/components/individual-declare/individual-declare.component.ts index b951ae68..a34121fb 100644 --- a/src/app/routes/tax-management/components/individual-declare/individual-declare.component.ts +++ b/src/app/routes/tax-management/components/individual-declare/individual-declare.component.ts @@ -383,11 +383,11 @@ export class TaxManagementIndividualDeclareComponent extends BasicTableComponent resetData() { let params: any; if (this.selectedRows.length === 0) { - params ={} + params =[] } else{ - params ={ ids: []} + params =[] this.selectedRows.forEach(item => { - params.ids.push(item.id); + params.push(item.id); }); } this.service.request(this.service.$api_get_taxDeclaration_updateAll, params).subscribe((res: any) => { diff --git a/src/app/routes/tax-management/components/individual-income/individual-income.component.ts b/src/app/routes/tax-management/components/individual-income/individual-income.component.ts index fce3e7cb..c3307605 100644 --- a/src/app/routes/tax-management/components/individual-income/individual-income.component.ts +++ b/src/app/routes/tax-management/components/individual-income/individual-income.component.ts @@ -328,11 +328,11 @@ export class TaxManagementIndividualIncomeComponent extends BasicTableComponent uploadSetting() { let params: any; if (this.selectedRows.length === 0) { - params ={} + params =[] } else{ - params ={ ids: []} + params =[] this.selectedRows.forEach(item => { - params.ids.push(item.id); + params.push(item.id); }); } this.service.request(this.service.$api_update_individual_income_page, params).subscribe((res: any) => { From e520327e18b2185aa37394002157439fcd4a7255 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 11 May 2022 19:16:04 +0800 Subject: [PATCH 3/8] fix bug --- .../partner/channel-sales/components/edit/edit.component.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/routes/partner/channel-sales/components/edit/edit.component.ts b/src/app/routes/partner/channel-sales/components/edit/edit.component.ts index 04847177..f0bcfeed 100644 --- a/src/app/routes/partner/channel-sales/components/edit/edit.component.ts +++ b/src/app/routes/partner/channel-sales/components/edit/edit.component.ts @@ -92,8 +92,7 @@ export class ParterChannelSalesEditComponent implements OnInit { this.sf.getProperty('/roleIds')!.schema.enum = List; this.sf.getProperty('/roleIds')!.widget.reset(List); } - } - )} + } )} }); } } From 040d1c61524184142d6610cc0eeb5917a4bf8fcd Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 11 May 2022 19:16:39 +0800 Subject: [PATCH 4/8] fix bug --- .../components/freight/list/list.component.html | 4 ++-- .../components/freight/list/list.component.ts | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/app/routes/usercenter/components/freight/list/list.component.html b/src/app/routes/usercenter/components/freight/list/list.component.html index f51fa90a..27371202 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.html +++ b/src/app/routes/usercenter/components/freight/list/list.component.html @@ -46,12 +46,12 @@
  • 新增企业
  • -
  • + diff --git a/src/app/routes/usercenter/components/freight/list/list.component.ts b/src/app/routes/usercenter/components/freight/list/list.component.ts index cfb0dad0..2d615c35 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.ts +++ b/src/app/routes/usercenter/components/freight/list/list.component.ts @@ -469,14 +469,14 @@ export class FreightComponentsListComponent extends BasicTableComponent implemen text: '分配客服
    ', click: item => this.showService(item) }, - { - text: '修改合伙人', - click: item => this.editPartner(item) - }, - { - text: '修改渠道销售', - click: item => this.editSale(item) - } + // { + // text: '修改合伙人', + // click: item => this.editPartner(item) + // }, + // { + // text: '修改渠道销售', + // click: item => this.editSale(item) + // } ] } ]; From b66f4fa6568d29a6e6eb0e57371ef07a2690dbb7 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 11 May 2022 19:17:07 +0800 Subject: [PATCH 5/8] fix bug --- .../components/freight/list/list.component.html | 4 ++-- .../components/freight/list/list.component.ts | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/app/routes/usercenter/components/freight/list/list.component.html b/src/app/routes/usercenter/components/freight/list/list.component.html index 27371202..f51fa90a 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.html +++ b/src/app/routes/usercenter/components/freight/list/list.component.html @@ -46,12 +46,12 @@
  • 新增企业
  • - + diff --git a/src/app/routes/usercenter/components/freight/list/list.component.ts b/src/app/routes/usercenter/components/freight/list/list.component.ts index 2d615c35..cfb0dad0 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.ts +++ b/src/app/routes/usercenter/components/freight/list/list.component.ts @@ -469,14 +469,14 @@ export class FreightComponentsListComponent extends BasicTableComponent implemen text: '分配客服
    ', click: item => this.showService(item) }, - // { - // text: '修改合伙人', - // click: item => this.editPartner(item) - // }, - // { - // text: '修改渠道销售', - // click: item => this.editSale(item) - // } + { + text: '修改合伙人', + click: item => this.editPartner(item) + }, + { + text: '修改渠道销售', + click: item => this.editSale(item) + } ] } ]; From 9dbafb2a30d8c0d65e1cf91a25ee8ab74c79cb08 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 11 May 2022 19:27:21 +0800 Subject: [PATCH 6/8] fix bug --- proxy.conf.js | 4 +- .../components/edit/edit.component.ts | 49 ++++++------------- 2 files changed, 16 insertions(+), 37 deletions(-) diff --git a/proxy.conf.js b/proxy.conf.js index 000f97b3..b9211e38 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-18 09:51:21 * @LastEditors : Shiming - * @LastEditTime : 2022-05-11 13:29:32 + * @LastEditTime : 2022-05-11 19:19:55 * @FilePath : \\tms-obc-web\\proxy.conf.js * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -30,7 +30,7 @@ module.exports = { // }, '//api': { target: { - host: 'tms-api-test.eascs.com', + host: 'tms-api-dev.eascs.com', protocol: 'https:', port: 443 }, diff --git a/src/app/routes/partner/channel-sales/components/edit/edit.component.ts b/src/app/routes/partner/channel-sales/components/edit/edit.component.ts index f0bcfeed..27bd17ea 100644 --- a/src/app/routes/partner/channel-sales/components/edit/edit.component.ts +++ b/src/app/routes/partner/channel-sales/components/edit/edit.component.ts @@ -47,31 +47,25 @@ export class ParterChannelSalesEditComponent implements OnInit { if (!this.sts) { this.service.request(this.service.$api_getChannelSalesInfo, { id: this.i?.id }).subscribe(res => { const List: any = []; - const List2: any = []; const List3: any = []; if (res) { let value1 = Object.assign({}, res); delete value1.employeeVO; let value = res.employeeVO; List.push({ label: value.empName + '/' + value.empNo, value: value.empNo }); - List2.push({ label: value.roleName, value: value.id }); res.roleInfoVOList.forEach((element: any) => { - List2.push({ label: element.roleName, value: element.id }); List3.push(element.id); }); setTimeout(() => { if (this.sf) { - console.log(this.sf.getProperty('/employeeVO')!.schema); - this.sf.getProperty('/employeeVO')!.schema.enum = List; this.sf.getProperty('/employeeVO')!.widget.reset(List); - - this.sf.getProperty('/roleIds')!.schema.enum = List2; - this.sf.getProperty('/roleIds')!.widget.reset(List2); } if (value.empNo) { this.sf.setValue('/employeeVO', value.empNo); - this.sf.setValue('/roleIds', value.List3); + console.log(List3); + + this.sf.setValue('/roleIds', List3); this.currentOAItem = value; this.sf.setValue('/phoneNumber', res.telephone); } @@ -79,21 +73,6 @@ export class ParterChannelSalesEditComponent implements OnInit { this.record = value1; } }); - } else { - this.service.request(this.service.$api_getAppRoleList).subscribe(res => { - if (res) { - let List: any = []; - res.forEach((element: any) => { - List.push({ label: element.roleName, value: element.id }); - }); - console.log(List); - setTimeout(() => { - if (this.sf) { - this.sf.getProperty('/roleIds')!.schema.enum = List; - this.sf.getProperty('/roleIds')!.widget.reset(List); - } - } )} - }); } } initSF() { @@ -193,17 +172,17 @@ export class ParterChannelSalesEditComponent implements OnInit { placeholder: '授权角色', mode: 'multiple', maxMultipleCount: 5, - // asyncData: () => { - // return this.service.request(this.service.$api_getAppRoleList).pipe( - // map((res: any) => { - // return res - // .filter((role: any) => role.roleCode !== 'Administrator') - // .map((item: any) => { - // return { label: item.roleName, value: item.id }; - // }); - // }) - // ); - // }, + asyncData: () => { + return this.service.request(this.service.$api_getAppRoleList).pipe( + map((res: any) => { + return res + .filter((role: any) => role.roleCode !== 'Administrator') + .map((item: any) => { + return { label: item.roleName, value: item.id }; + }); + }) + ); + }, visibleIf: { isAuthorization: (value: string) => value === '1' } } }, From 081d185d4cb488a3aa391fc3233de71e70dd629d Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 11 May 2022 19:52:56 +0800 Subject: [PATCH 7/8] fix bug --- .../recorded-detail.component.html | 99 ++++++++++++------- .../recorded-detail.component.ts | 14 ++- .../order-reporting.component.html | 3 + .../order-reporting.component.ts | 2 +- 4 files changed, 81 insertions(+), 37 deletions(-) diff --git a/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.html b/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.html index 218de752..a8adc5dd 100644 --- a/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.html +++ b/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.html @@ -1,3 +1,13 @@ + diff --git a/src/app/routes/tax-management/components/individual-income/individual-income.component.ts b/src/app/routes/tax-management/components/individual-income/individual-income.component.ts index c3307605..e2a1ad34 100644 --- a/src/app/routes/tax-management/components/individual-income/individual-income.component.ts +++ b/src/app/routes/tax-management/components/individual-income/individual-income.component.ts @@ -23,8 +23,10 @@ export class TaxManagementIndividualIncomeComponent extends BasicTableComponent ]; selectedIndex = '0'; //选择的项目 isVisible: boolean = false; + oneStatus: boolean = false; selectedRows: any[] = []; + driverRecord!: any; constructor(public service: TaxManagementService, public searchDrawerService: SearchDrawerService) { super(searchDrawerService); @@ -287,11 +289,20 @@ export class TaxManagementIndividualIncomeComponent extends BasicTableComponent * @param record 记录实例 */ resetData() { - // if (this.selectedRows.length === 0) { - // this.openWainingModal('请选择需要更新的数据!'); - // return; - // } - // this.isVisible = true; + if (this.selectedRows.length === 0) { + this.service.msgSrv.error('请选择明细!'); + return; + } + if(this.selectedRows.length === 1) { + console.log(this.selectedRows); + this.oneStatus = true + this.driverRecord = this.selectedRows[0] + + } else { + this.oneStatus = false + + } + this.isVisible = true; } selectChange(item: any) { @@ -352,7 +363,18 @@ export class TaxManagementIndividualIncomeComponent extends BasicTableComponent this.service.exportStart({ ...this.sfValue,declareStatus: this.selectedIndex, pageSize: -1 }, this.service.$api_taxIncome_export); } - handleOK() {} + handleOK() { + let params: any = []; + if (this.selectedRows.length !== 0) { + this.selectedRows.forEach(item => { + params.push(item.id); + }); + } + this.service.request(this.service.$api_fixThreshold, params).subscribe((res) => { + console.log(res); + + }) + } handleCancel() { this.isVisible = false; } diff --git a/src/app/routes/tax-management/services/tax-management.service.ts b/src/app/routes/tax-management/services/tax-management.service.ts index 3df8dc4a..f70df070 100644 --- a/src/app/routes/tax-management/services/tax-management.service.ts +++ b/src/app/routes/tax-management/services/tax-management.service.ts @@ -68,6 +68,8 @@ export class TaxManagementService extends ShipperBaseService { $api_taxDeclaration_export = '/api/sdc/taxDeclaration/asyncExport'; // 发票上传撤回 $api_invoiceUpload_withdraw = '/api/sdc/invoiceUploadInfo/withdraw'; + // 修改起征点 + $api_fixThreshold = '/api/sdc/taxIncome/fixThreshold'; constructor(public injector: Injector) { super(injector); }