From 7db20e1c5396fe020cebabec26aa6dd8b90550e9 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 22 Apr 2022 16:28:25 +0800 Subject: [PATCH 01/80] fix bug --- .../vehicle-detail.component.html | 2 +- .../view-track/view-track.component.html | 6 +- .../view-track/view-track.component.less | 92 ++----------------- .../view-track/view-track.component.ts | 20 ++-- 4 files changed, 19 insertions(+), 101 deletions(-) diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html index 77591f60..1da90e5c 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-28 14:42:03 * @LastEditors : Shiming - * @LastEditTime : 2022-04-21 17:03:50 + * @LastEditTime : 2022-04-22 16:27:43 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> diff --git a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html index 97426178..b37da5ec 100644 --- a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html +++ b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-02-22 13:53:29 * @LastEditors : Shiming - * @LastEditTime : 2022-03-08 15:01:14 + * @LastEditTime : 2022-04-22 16:27:40 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -13,8 +13,8 @@ - + [page]="{ show: false, showSize: false }" size="small" class="map_st"> + diff --git a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.less b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.less index 64f5143e..529639f7 100644 --- a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.less +++ b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.less @@ -1,84 +1,10 @@ +/* stylelint-disable order/properties-order */ :host { - .btn-size { - font-size: 14px; - } - - .bdr { - border-right: 1px solid #ccc; - } - - .bdl { - border-left: 1px solid #ccc; - } - - .source-info { - p { - margin-bottom: .5em; - } - } - - .freight-info-box { - width: 95%; - } - - .freigth-label { - display : inline-block; - width : 50px; - text-align: right; - } - - ::ng-deep { - .approval-status { - .ant-steps { - width : 70%; - margin: 0 auto; - } - } - - } - - .leftPadding { - padding-right: 100px; - } - .hide{ - display: none; - } - .handling-info { - min-height: 100px; - border: 1px solid #ccc; - - .loading-row { - display: flex; - } - - .handling-info-icon { - width: 32px; - height: 32px; - margin-right: 24px; - color: #fff; - line-height: 32px; - text-align: center; - border-radius: 50%; - - &.loading-bg { - background-color: #50D4AB; - } - - &.unloaing-bg { - background: #F66F6A; - } - } - - .info { - flex: 1; - } - - .time-info { - margin-left: 56px; - } - } - .target-fix { - display: block; - margin-top: 290px; - } -} \ No newline at end of file + .map_st2 { + position: absolute; + top: 20px; + right: 49px; + height: 350px; + width: 360px; + } +} diff --git a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts index b0864915..30bd5b74 100644 --- a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts +++ b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts @@ -4,27 +4,17 @@ * @Author : Shiming * @Date : 2022-02-22 13:53:29 * @LastEditors : Shiming - * @LastEditTime : 2022-04-22 15:49:04 + * @LastEditTime : 2022-04-22 16:24:06 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ -import { Component, OnInit, ViewChild } from '@angular/core'; -import { STColumn } from '@delon/abc/st'; -import { - SFComponent, - SFCustomWidgetSchema, - SFNumberWidgetSchema, - SFRadioWidgetSchema, - SFSchema, - SFTextareaWidgetSchema, - SFUISchema -} from '@delon/form'; +import { Component, OnInit } from '@angular/core'; +import { STColumn, STComponent } from '@delon/abc/st'; import format from 'date-fns/format'; import { _HttpClient } from '@delon/theme'; import { NzMessageService } from 'ng-zorro-antd/message'; import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; import { OrderManagementService } from '../../../services/order-management.service'; -import { ThisReceiver } from '@angular/compiler'; @Component({ selector: 'app-order-management-view-track', @@ -39,7 +29,7 @@ export class OneCarOrderViewtrackComponent implements OnInit { addressItems: any[] = []; //打点地址数据组 logColumns2: STColumn[] = [ { title: '时间', index: 'parkBte', width: 120, className: 'text-center' }, - { title: '地点', index: 'parkAdr' } + { title: '地点', index: 'parkAdr',width: 120,className: 'text-center' } ]; pois: any[] = []; @@ -102,6 +92,8 @@ export class OneCarOrderViewtrackComponent implements OnInit { } else { this.addressItems = []; } + console.log(this.addressItems); + } }); } From 327b6c23c76ed62ec60f8d4e06646bf8a74e42a9 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 22 Apr 2022 16:32:26 +0800 Subject: [PATCH 02/80] fix bug --- .../vehicle/modify-captain/modify-captain.component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/routes/order-management/modal/vehicle/modify-captain/modify-captain.component.ts b/src/app/routes/order-management/modal/vehicle/modify-captain/modify-captain.component.ts index e2e8182c..7e3ab9d6 100644 --- a/src/app/routes/order-management/modal/vehicle/modify-captain/modify-captain.component.ts +++ b/src/app/routes/order-management/modal/vehicle/modify-captain/modify-captain.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-30 14:45:39 * @LastEditors : Shiming - * @LastEditTime : 2022-04-22 15:42:08 + * @LastEditTime : 2022-04-22 16:31:57 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\modify-captain\\modify-captain.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -108,6 +108,11 @@ export class VehicleModifyCaptainComponent implements OnInit { }); } initDate() { + let phone = this.sf?.value.mobile.replace(/^\s*|\s*$/g,"") + if(!phone) { + this.service.msgSrv.error('请输入手机号!'); + return + } const params = { fetchBank: 1, ...this.sf?.value From a8b258c13f3ab52fc339cedec1f853efcf33d820 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 22 Apr 2022 16:52:16 +0800 Subject: [PATCH 03/80] fix bug --- .../order-management/components/bulk/bulk.component.html | 4 ++-- .../routes/order-management/components/bulk/bulk.component.ts | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/routes/order-management/components/bulk/bulk.component.html b/src/app/routes/order-management/components/bulk/bulk.component.html index bced8f7d..1ea7f649 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.html +++ b/src/app/routes/order-management/components/bulk/bulk.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-04-14 10:53:35 + * @LastEditTime : 2022-04-22 16:51:29 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk\\bulk.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -82,7 +82,7 @@
{{ item.settlementWeight ? item.settlementWeight + '吨/ ': ''}} {{ item.settlementVolume ? item.settlementVolume + '方 ': ''}}
-
{{ item?.payeeName }}{{ item?.payeePhone ? "/" + item?.payeePhone : '' }}
+
{{ item?.payeeName }}{{ item?.payeePhone ? "/" + item?.payeePhone : '' }}
{{ item?.createUserName }}{{ item?.createUserPhone ? "/" + item?.createUserPhone : '' }}
diff --git a/src/app/routes/order-management/components/bulk/bulk.component.ts b/src/app/routes/order-management/components/bulk/bulk.component.ts index 15ba339a..688a6796 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.ts +++ b/src/app/routes/order-management/components/bulk/bulk.component.ts @@ -509,8 +509,7 @@ export class OrderManagementBulkComponent implements OnInit { title: '车队长', className: 'text-left', width: '180px', - index: 'payeeName', - render: 'payeeName' + render: 'payeeName', }, { title: '装卸货时间', From 514832dbfdc9832540e3c431b6734bf3b6250d14 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 22 Apr 2022 16:53:59 +0800 Subject: [PATCH 04/80] fix bug --- .../components/vehicle/vehicle.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.html b/src/app/routes/order-management/components/vehicle/vehicle.component.html index 35c07449..4780db3c 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.html +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-04-08 11:32:46 + * @LastEditTime : 2022-04-22 16:53:07 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle\\vehicle.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -95,7 +95,7 @@
{{ item?.driverName }}{{ item?.driverPhone ? '/' + item?.driverPhone : '' }}{{ item?.carNo ? '/' + item?.carNo : '' }}

-
{{ item?.payeeName ? item?.payeeName + '/' : ''}}{{ item?.payeePhone }}
+
车队长: {{ item?.payeeName ? item?.payeeName + '/' : ''}}{{ item?.payeePhone }}
From 8626dcaabf011323410a45719c02e37c6914cc16 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 22 Apr 2022 17:16:01 +0800 Subject: [PATCH 05/80] fix bug --- .../receipts-audit.component.ts | 3 +- .../voucher-view/voucher-view.component.ts | 29 ++----------------- .../services/order-management.service.ts | 8 +++-- 3 files changed, 8 insertions(+), 32 deletions(-) diff --git a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts index c3ddd93f..d8c217a8 100644 --- a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts +++ b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts @@ -547,8 +547,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { nzContent: `确认后单据不可修改,请谨慎操作。`, nzOnOk: () => { - this.service.downloadFile(this.service.$api_createBillTakeGoods,params) - this.service.downloadFile(this.service.$api_createBillDischargeGoods,params) + this.service.downloadFile(this.service.$api_createBillEsignGoods,params) this.service.msgSrv.success('生成成功!'); this.st?.reload() // this.getGoodsSourceStatistical(); diff --git a/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts b/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts index 80ec4a45..cb1704bb 100644 --- a/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts +++ b/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts @@ -523,38 +523,13 @@ export class orderManagementVoucherViewComponent implements OnInit { 请等待${time}秒后自动关闭 ` }); - this.service.request(this.service.$api_createBillTakeGoods, [this.datas?.id]).subscribe(res => { + this.service.request(this.service.$api_createBillEsignGoods, [this.datas?.id]).subscribe(res => { if (res) { switch (res[0]?.esignFlowStatus) { case 1: case '1': setTimeout(() => { - this.service.request(this.service.$api_getBillTakeEsignFile, [this.datas?.id]).subscribe(res => { - if (res[0]?.esignFlowStatus == '2') { - } - }); - }, 9000); - return; - case 2: - return; - case '13': - default: - this.service.msgSrv.error('电子装货单签署异常!'); - modal.destroy(); - return; - } - } else { - this.service.msgSrv.error('电子装货单签署异常!'); - modal.destroy(); - } - }); - this.service.request(this.service.$api_createBillDischargeGoods, [this.datas?.id]).subscribe(res => { - if (res) { - switch (res[0]?.esignFlowStatus) { - case 1: - case '1': - setTimeout(() => { - this.service.request(this.service.$api_getBillDischargeEsignFile, [this.datas?.id]).subscribe(res => { + this.service.request(this.service.$api_getBillGoodsEsignFile, [this.datas?.id]).subscribe(res => { if (res[0]?.esignFlowStatus == '2') { this.service.msgSrv.success('生成电子单据成功!'); this.modal.destroy(true); diff --git a/src/app/routes/order-management/services/order-management.service.ts b/src/app/routes/order-management/services/order-management.service.ts index 3df90939..087d7a70 100644 --- a/src/app/routes/order-management/services/order-management.service.ts +++ b/src/app/routes/order-management/services/order-management.service.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-03 15:31:52 * @LastEditors : Shiming - * @LastEditTime : 2022-04-22 10:54:29 + * @LastEditTime : 2022-04-22 17:14:39 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\services\\order-management.service.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -163,8 +163,8 @@ export class OrderManagementService extends ShipperBaseService { // 异常预警 public $api_getAbnormalWarningByBillId = '/api/sdc/abnormalWarning/getAbnormalWarningByBillId'; - // 生成卸货单 - public $api_createBillDischargeGoods = '/api/sdc/billOperate/createBillDischargeGoods'; + // 获取电子提/卸货单签章附件 + public $api_getBillGoodsEsignFile = '/api/sdc/billOperate/getBillGoodsEsignFile'; // 生成提货单 public $api_createBillTakeGoods = '/api/sdc/billOperate/createBillTakeGoods'; // 生成卸货单-页面展示 @@ -217,6 +217,8 @@ export class OrderManagementService extends ShipperBaseService { public $api_getBillDischargeGoods = `/api/sdc/billOperate/getBillDischargeGoods`; // 预览提货单 public $api_getBillTakeGoods = `/api/sdc/billOperate/getBillTakeGoods`; + // 生成提/卸货单 + public $api_createBillEsignGoods = `/api/sdc/billOperate/createBillEsignGoods`; // // 生成卸货单 // public $api_createBillDischargeGoods = `/api/sdc/billOperate/createBillDischargeGoods`; From cbbdd6b069fcbb4deb3dec6449b746a043056104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Fri, 22 Apr 2022 18:11:01 +0800 Subject: [PATCH 06/80] =?UTF-8?q?=E6=8F=90=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../platform-account.component.ts | 34 ++- .../withdraw-deposit.component.html | 39 +++ .../withdraw-deposit.component.less | 37 +++ .../withdraw-deposit.component.spec.ts | 24 ++ .../withdraw-deposit.component.ts | 288 ++++++++++++++++++ .../financial-management.module.ts | 4 +- .../services/bank-card-management.service.ts | 2 + src/assets/images/wallet.svg | 6 + 8 files changed, 430 insertions(+), 4 deletions(-) create mode 100644 src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.html create mode 100644 src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.less create mode 100644 src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.spec.ts create mode 100644 src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.ts create mode 100644 src/assets/images/wallet.svg diff --git a/src/app/routes/financial-management/components/platform-account/platform-account.component.ts b/src/app/routes/financial-management/components/platform-account/platform-account.component.ts index f54f0046..1cfb6a07 100644 --- a/src/app/routes/financial-management/components/platform-account/platform-account.component.ts +++ b/src/app/routes/financial-management/components/platform-account/platform-account.component.ts @@ -5,6 +5,7 @@ import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; import { NzModalService } from 'ng-zorro-antd/modal'; import { FreightAccountService } from '../../services/freight-account.service'; import { CwcBankCardManagementBindComponent } from '../bank-card-management/bind/bind.component'; +import { CwcAccountManagementWithdrawDepositComponent } from './withdraw-deposit/withdraw-deposit.component'; @Component({ selector: 'app-platform-account', @@ -192,12 +193,18 @@ export class PlatformAccountComponent implements OnInit { }) }, { - text: '绑定银行卡', - click: item => this.bindBankcard(item) + text: '提现', + click: item => this.withdraw(item), + iif: (_record) => _record.bankType !== '1' }, + // { + // text: '绑定银行卡', + // click: item => this.bindBankcard(item) + // }, { text: '查看银行卡', - click: item => this.viewBankcard(item) + click: item => this.viewBankcard(item), + iif: (_record) => _record.bankType !== '1' }, ] } @@ -239,4 +246,25 @@ export class PlatformAccountComponent implements OnInit { exportList() { this.service.exportStart({ ...this.sf.value, pageSize: -1 }, this.service.$api_get_exportPlatformAccountBalanceByOperator,); } + + // 提现 + withdraw(record: any) { + const modalRef = this.modal.create({ + nzTitle: '提现', + nzWidth: '35%', + nzContent: CwcAccountManagementWithdrawDepositComponent, + nzMaskClosable: false, + nzComponentParams: { + record + }, + nzFooter: null + }); + modalRef.afterClose.subscribe(res => { + if (res) { + // this.getSummary(); + // this.withdrawTable.refresh(); + } + }) + } + } diff --git a/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.html b/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.html new file mode 100644 index 00000000..79a7a3e2 --- /dev/null +++ b/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.html @@ -0,0 +1,39 @@ + + +
-
+
{{me.formProperty.value | currency}}
+
+ + +
+ +
+
+ +
+ + + + 全部提现 + + + + 忘记密码? + + + +
diff --git a/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.less b/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.less new file mode 100644 index 00000000..d4fad7b5 --- /dev/null +++ b/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.less @@ -0,0 +1,37 @@ +:host { + .bank-card-select-content { + padding: 5px; + border: 1px solid #ccc; + + .band-card-row { + display: flex; + align-items: center; + } + } + + .pay-way-group { + width: 100%; + margin-bottom: 5px; + + .bank-card-row { + display: flex; + align-items: center; + } + + .band-card { + border: 1px solid #e8e8e8; + + .pay-way-label { + width: 100%; + padding: 6px 10px; + } + } + + } + + .input-row { + width: 70%; + margin-right: 8px; + } + +} diff --git a/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.spec.ts b/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.spec.ts new file mode 100644 index 00000000..2d1f933a --- /dev/null +++ b/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { CwcAccountManagementWithdrawDepositComponent } from './withdraw-deposit.component'; + +describe('CwcAccountManagementWithdrawDepositComponent', () => { + let component: CwcAccountManagementWithdrawDepositComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [CwcAccountManagementWithdrawDepositComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CwcAccountManagementWithdrawDepositComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.ts b/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.ts new file mode 100644 index 00000000..ca2cb877 --- /dev/null +++ b/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.ts @@ -0,0 +1,288 @@ +import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; +import { Router } from '@angular/router'; +import { cacheConf } from '@conf/cache.conf'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; +import { EACacheService, EAEnvironmentService, ShipperBaseService } from '@shared'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { BankCardManagementService } from '../../../services/bank-card-management.service'; + +@Component({ + selector: 'app-cwc-withdraw-deposit', + templateUrl: './withdraw-deposit.component.html', + styleUrls: ['./withdraw-deposit.component.less'] +}) +export class CwcAccountManagementWithdrawDepositComponent implements OnInit { + accountBalance = 0; + minWithdrawAmount = 0; + minWithdrawFee: any = 0; + code = ''; + bankList: Array = []; + bankAccount = ''; + count = 0; + interval$: any; + ui: SFUISchema = {}; + i: any; + schema: SFSchema = {}; + totalGJ: any = 0.0; + cacFee: any = 0; + columns: STColumn[] = []; + totalBalance = 200; + bankCardList: Array = []; + cardNo = ''; + accountDetail: any = {}; + networkTransporterId = ''; + networkTransporterName = ''; + balanceObj: any = { + allBalance: 99999999 + }; + @ViewChild('st', { static: false }) st!: STComponent; + @ViewChild('sf', { static: false }) sf!: SFComponent; + @ViewChild('psd') psd!: ElementRef; + record: any; + bankType = '2'; + + constructor( + public service: BankCardManagementService, + private modal: NzModalRef, + private shipperSrv: ShipperBaseService, + public eaCacheSrv: EACacheService, + public envSrv: EAEnvironmentService, + public router: Router + ) { + this.networkTransporterId = this.eaCacheSrv.get(cacheConf.env)?.networkTransporterId; + } + + ngOnInit() { + this.initSF(); + this.getBankList(); + this.getProjectBalanceDetail(); + } + + + + + /** + * 初始化查询表单 + */ + initSF() { + this.schema = { + properties: { + ltdName: { + title: '网络货运人', + type: 'string', + default: this.record?.ltdName, + ui: { + widget: 'text', + } + }, + bankType: { + title: '银行', + type: 'string', + default: this.bankType, + enum: [ + { label: '浦发银行', value: '2' } + ], + ui: { + widget: 'select', + containsAllLabel: false, + showRequired: true, + change: (value: any) => { + // if (value && this.sf?.value?.ltdId) { + // const parmas = { bankType: value, ltdId: this.sf.getValue('/ltdId') }; + // this.getProjectBalanceDetail(parmas); + // } + } + } as SFSelectWidgetSchema + }, + availableBalance: { title: '可提现余额', type: 'string', ui: { showRequired: false, widget: 'custom' } }, + bankId: { + title: '提现至', + type: 'string', + ui: { + showRequired: true, widget: 'custom' + }, + }, + amount: { + title: '提现金额', + type: 'string', + ui: { + showRequired: true, + widget: 'custom', + validator: (val) => { + if (!val && val !== 0) { + return [{ keyword: 'required', message: '必填项' }]; + } else if (val > this.balanceObj.allBalance) { + return [{ keyword: 'required', message: '提现金额超过可提现余额' }]; + } + return []; + } + }, + + }, + payPsd: { + title: '支付密码', + type: 'string', + minLength: 6, + maxLength: 6, + ui: { widget: 'custom' }, + }, + payPassword: { + title: '', + type: 'string', + ui: { + hidden: true + } + } + }, + autocomplete: 'off', + required: ['bankType', 'payPsd'] + }; + this.ui = { + '*': { spanLabelFixed: 100, grid: { span: 18, gutter: 2 } }, + $addBankCard1: { + grid: { span: 24 } + }, + $addBankCard2: { + grid: { span: 24 } + } + }; + } + + save(value: any) { + if (this.sf.valid) { + const { amount, bankId, bankType, ltdName, payPassword } = value; + if (amount > this.balanceObj?.allBalance) { + this.service.msgSrv.warning('提现金额超过可提现余额!'); + return; + } + const params = { + amount, + bankId, + bankType, + ltdId: this.record.ltdId, + ltdName, + payPassword + }; + this.service.request(this.service.$api_apply_withdraw, { ...params }) + .subscribe(res => { + if (res) { + this.service.msgSrv.success('提现成功!'); + this.close(true); + } + }) + } + } + close(flag: boolean) { + this.modal.destroy(flag); + } + + + toAddBankPage() { + window.open(`/#/financial-management/bank-card-management/index?ltdId=${this.record?.ltdId}<dName=${this.record?.ltdName}`); + } + /** + * 全部提现 + */ + allWithdrawal() { + if (!this.sf.getValue('/availableBalance')) { + this.sf.setValue('/amount', ''); + return; + } + this.sf.setValue('/amount', this.balanceObj?.allBalance); + } + /** + * 跳转至忘记密码页 + */ + toForgetPsdPage() { + window.open('/#/account/edit-paypassword'); + } + + /** + * 切换银行卡 + */ + checkBankCard(e: any) { + this.sf.setValue('/bankId', e); + } + getBankList() { + this.service.request(this.service.$api_bank_card_list, { accountType: '3', roleId: this.record?.ltdId }).subscribe((res) => { + if (res) { + this.bankCardList = res; + } + }); + } + + /** + * 获取项目账户余额 + */ + getProjectBalanceDetail(params = {}) { + this.service.request(this.service.$api_get_account_available_balance, { bankType: this.bankType, ltdId: this.record?.ltdId }).subscribe(res => { + if (res) { + this.balanceObj = res; + this.sf.setValue('/availableBalance', res?.allBalance); + // this.sf.getProperty('/amount')?.updateValueAndValidity(); + } + }) + } + + keydown(e: any) { + if (e.keyCode == 37 || e.keyCode == 39) e.preventDefault(); + if (e.keyCode === 8) { + // const payPswVal = this.sf.getValue('/password'); + // this.sf.setValue('/password', payPswVal.substr(0, payPswVal.length - 1)); + } + + } + clickInput(e: any) { + this.psd.nativeElement.focus(); + } + changePsd(val: any) { + this.sf.setValue('/payPsd', val); + if (val || val !== '') { + const last = val.substr(val.length - 1); + const password = this.sf.getValue('/payPassword'); + const start = this.psd?.nativeElement.selectionStart; + if (last !== '•') { + this.sf.setValue('/payPassword', start !== 1 ? (password + last) : last); + } else { + this.sf.setValue('/payPassword', password.substr(0, val.length)); + } + const payPswVal = this.sf.getValue('/payPsd'); + this.sf.setValue('/payPsd', payPswVal.replace(/./g, "•")); + } else { + this.sf.setValue('/payPassword', ''); + } + + } + + /** + * 设置光标聚焦 + */ + setFocus() { + + const len = this.psd?.nativeElement.value.length; + this.setSelectionRange(this.psd?.nativeElement, len, len); //将光标定位到文本最后 + } + + /** + * 设置光标位置 + * @param input dom元素 + * @param selectionStart 起始位置 + * @param selectionEnd 结束位置 + */ + setSelectionRange(input: ElementRef | any, selectionStart: number, selectionEnd: number) { + if (input?.setSelectionRange) { + input.focus(); + input.setSelectionRange(selectionStart, selectionEnd); + } + else if (input.createTextRange) { + var range = input.createTextRange(); + range.collapse(true); + range.moveEnd('character', selectionEnd); + range.moveStart('character', selectionStart); + range.select(); + } + } + + +} diff --git a/src/app/routes/financial-management/financial-management.module.ts b/src/app/routes/financial-management/financial-management.module.ts index 63b99337..76cafed5 100644 --- a/src/app/routes/financial-management/financial-management.module.ts +++ b/src/app/routes/financial-management/financial-management.module.ts @@ -39,6 +39,7 @@ import { AbnormalGoldDetailComponent } from './components/abnormal-gold/abnormal import { CwcBankCardManagementIndexComponent } from './components/bank-card-management/index/index.component'; import { CwcBankCardManagementBindComponent } from './components/bank-card-management/bind/bind.component'; import { CwcBankCardManagementAddComponent } from './components/bank-card-management/add/add.component'; +import { CwcAccountManagementWithdrawDepositComponent } from './components/platform-account/withdraw-deposit/withdraw-deposit.component'; const ROUTESCOMPONENTS = [ FreightAccountComponent, @@ -74,7 +75,8 @@ const ROUTESCOMPONENTS = [ AbnormalGoldDetailComponent, CwcBankCardManagementIndexComponent, CwcBankCardManagementBindComponent, - CwcBankCardManagementAddComponent + CwcBankCardManagementAddComponent, + CwcAccountManagementWithdrawDepositComponent ]; const NOTROUTECOMPONENTS = [DriverAccountDetailComponent, FreightAccountDetailComponent, ClearingModalComponent]; diff --git a/src/app/routes/financial-management/services/bank-card-management.service.ts b/src/app/routes/financial-management/services/bank-card-management.service.ts index 65db517b..76faf71c 100644 --- a/src/app/routes/financial-management/services/bank-card-management.service.ts +++ b/src/app/routes/financial-management/services/bank-card-management.service.ts @@ -8,6 +8,8 @@ export class BankCardManagementService extends BaseService { $api_bank_card_list = `/api/fcc/bankInfoOBC/list/myBankInfo`; // 获取银行卡列表 $api_bank_card_del = `/api/fcc/bankInfoOBC/delete`; // 删除银行卡 $api_bank_card_add = `/api/fcc/bankInfoOBC/save`;//新增银行卡 + $api_get_account_available_balance = `/api/fcc/accountBalance/getWithdrawalAccountBalanceOperator`; //平台可提现金额查询 + $api_apply_withdraw = `/api/fcc/refundApplicationOBC/addAgreeRefund`; // 提现申请 constructor(public injector: Injector) { super(injector); } diff --git a/src/assets/images/wallet.svg b/src/assets/images/wallet.svg new file mode 100644 index 00000000..d1cc7990 --- /dev/null +++ b/src/assets/images/wallet.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From e8a961acfe7e029e2edf77b9d47696e4a9a9eac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Sun, 24 Apr 2022 10:09:19 +0800 Subject: [PATCH 07/80] =?UTF-8?q?=E6=9B=B4=E6=94=B9dict-select=E7=BB=84?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/shared/widget/dict-select/dict-select.widget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/widget/dict-select/dict-select.widget.ts b/src/app/shared/widget/dict-select/dict-select.widget.ts index d8906295..fced5406 100644 --- a/src/app/shared/widget/dict-select/dict-select.widget.ts +++ b/src/app/shared/widget/dict-select/dict-select.widget.ts @@ -39,6 +39,6 @@ export class DictSelectWidget extends ControlWidget implements OnInit { } reset(value: any) { - this.setValue(value); + if (value) this.setValue(value); } } From af9f6b1400fe01066c05f4164376e09156301ff4 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Sun, 24 Apr 2022 10:27:44 +0800 Subject: [PATCH 08/80] fix bug --- .../voucher-view/voucher-view.component.ts | 41 +++++++++---------- .../etc-invoiced-logs.component.ts | 2 + 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts b/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts index cb1704bb..62a4719b 100644 --- a/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts +++ b/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts @@ -525,30 +525,27 @@ export class orderManagementVoucherViewComponent implements OnInit { }); this.service.request(this.service.$api_createBillEsignGoods, [this.datas?.id]).subscribe(res => { if (res) { - switch (res[0]?.esignFlowStatus) { - case 1: - case '1': - setTimeout(() => { - this.service.request(this.service.$api_getBillGoodsEsignFile, [this.datas?.id]).subscribe(res => { - if (res[0]?.esignFlowStatus == '2') { - this.service.msgSrv.success('生成电子单据成功!'); - this.modal.destroy(true); - } - }); + res.forEach((element:any) => { + switch (element?.esignFlowStatus) { + case '1': + setTimeout(() => { + this.service.request(this.service.$api_getBillGoodsEsignFile, [this.datas?.id]).subscribe(res => { + if (res[0]?.esignFlowStatus == '2') { + this.service.msgSrv.success('生成电子单据成功!'); + this.modal.destroy(true); + } + }); + }, 9000); + return; + default: + this.service.msgSrv.error('签署异常!'); modal.destroy(); - }, 9000); - - return; - case 2: - modal.destroy(); - return; - default: - this.service.msgSrv.error('电子卸货单签署异常!'); - modal.destroy(); - return; - } + return; + } + }); + } else { - this.service.msgSrv.error('电子卸货单签署异常!'); + this.service.msgSrv.error('签署异常!'); modal.destroy(); } }); diff --git a/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.ts b/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.ts index c3c7c253..c9a2a049 100644 --- a/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.ts +++ b/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.ts @@ -208,6 +208,8 @@ export class ETCInvoicedLogsComponent implements OnInit { className: 'text-right font-weight-bold', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.totalAmount }) } }, + { title: '进站时间', index: 'trafficStartTime', type: 'date', width: 150 }, + { title: '出站时间', index: 'trafficEndTime', type: 'date', width: 150 }, { title: '交易时间', index: 'exTime', type: 'date', width: 150 }, { title: '开票日期', index: 'invoiceMakeTime', type: 'date', width: 150 }, { title: '销售方', index: 'sellerName', width: 150 }, From 096cbc6958eaaebb127f893d2dceb59af525d9dd Mon Sep 17 00:00:00 2001 From: wangshiming Date: Sun, 24 Apr 2022 10:45:01 +0800 Subject: [PATCH 09/80] fix bug --- .../routes/usercenter/components/freight/list/list.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 4df4f161..8d1e1b63 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.ts +++ b/src/app/routes/usercenter/components/freight/list/list.component.ts @@ -409,7 +409,7 @@ export class FreightComponentsListComponent implements OnInit { }, { title: '业务员', className: 'text-center', render: 'promotersTelephone', width: 150 }, { title: '合伙人', className: 'text-center', render: 'partnerName', width: 150 }, - { title: '客服人员', className: 'text-center', render: 'customerServiceId', width: 150 }, + { title: '客服人员', className: 'text-center', render: 'customerServiceIdLabel', width: 150 }, { title: '网络货运人', className: 'text-center', index: 'netTranName', width: 180 }, { title: '注册渠道', From f0e17090d581a565be84f2c8c9ae7eb287187fab Mon Sep 17 00:00:00 2001 From: wangshiming Date: Sun, 24 Apr 2022 10:46:03 +0800 Subject: [PATCH 10/80] fix bug --- .../routes/usercenter/components/freight/list/list.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 8d1e1b63..4653512b 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.ts +++ b/src/app/routes/usercenter/components/freight/list/list.component.ts @@ -409,7 +409,7 @@ export class FreightComponentsListComponent implements OnInit { }, { title: '业务员', className: 'text-center', render: 'promotersTelephone', width: 150 }, { title: '合伙人', className: 'text-center', render: 'partnerName', width: 150 }, - { title: '客服人员', className: 'text-center', render: 'customerServiceIdLabel', width: 150 }, + { title: '客服人员', className: 'text-center', index: 'customerServiceIdLabel', width: 150 }, { title: '网络货运人', className: 'text-center', index: 'netTranName', width: 180 }, { title: '注册渠道', From 3f1073df674ba62ef220e3bf83f5d824a78dccff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Sun, 24 Apr 2022 11:07:14 +0800 Subject: [PATCH 11/80] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=A4=A7=E5=AE=97?= =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=8C=89=E9=92=AE=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supply-management/components/bulk/bulk.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/routes/supply-management/components/bulk/bulk.component.ts b/src/app/routes/supply-management/components/bulk/bulk.component.ts index 9e90a8f6..894d5a0c 100644 --- a/src/app/routes/supply-management/components/bulk/bulk.component.ts +++ b/src/app/routes/supply-management/components/bulk/bulk.component.ts @@ -42,7 +42,7 @@ export class SupplyManagementBulkComponent implements OnInit { private modal: NzModalService, private router: Router, public shipperservice: ShipperBaseService - ) {} + ) { } ngOnInit(): void { this.initSF(); @@ -335,7 +335,7 @@ export class SupplyManagementBulkComponent implements OnInit { { text: '二维码', click: _record => this.assignedQrcode(_record), - iif: item => item.resourceStatus == 1 + iif: item => item.resourceStatus == 1 && item.serviceType === '1' }, { text: '修改单价', @@ -565,7 +565,7 @@ export class SupplyManagementBulkComponent implements OnInit { } }); } - userAction() {} + userAction() { } // 导出 exportFire() { this.service.exportStart(this.reqParams, this.service.$api_asyncExportBulkList); From 64371322e3d28883507dbe0d5500d60d3dc2229d Mon Sep 17 00:00:00 2001 From: wangshiming Date: Sun, 24 Apr 2022 13:43:23 +0800 Subject: [PATCH 12/80] fix bug --- .../rebate-setting/add/add.component.html | 2 +- .../rebate-setting/add/add.component.ts | 62 +++++++++---------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html index 8a4b1a3f..08f89e5b 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-02-24 20:09:49 * @LastEditors : Shiming - * @LastEditTime : 2022-04-22 14:29:23 + * @LastEditTime : 2022-04-24 13:42:10 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts index cf090af2..15e68e18 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts @@ -8,16 +8,14 @@ * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ -import { ModalHelper } from '@delon/theme'; import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; -import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; -import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; -import { processSingleSort, ShipperBaseService } from '@shared'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFComponent, SFSchema } from '@delon/form'; +import { ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { RebateManagementService } from '../../../services/rebate-management.service'; import { ParterRebateManageMentAddPartnerListComponent } from '../add-partnerlist/add-partnerlist.component'; -import { inRange } from '@delon/util'; @Component({ selector: 'app-parter-channel-rebate-management-add', styleUrls: ['./add.component.less'], @@ -35,7 +33,7 @@ export class ParterRebateManageMentAddComponent implements OnInit { partnerPeopleList: any = []; configType = '1'; precision = 2; - partnerId :Array =[]; + partnerId: Array = []; inputValue = ''; @ViewChild('st', { static: true }) st!: STComponent; @@ -59,15 +57,17 @@ export class ParterRebateManageMentAddComponent implements OnInit { { title: '手机号', index: 'contactMobile', className: 'text-center', width: 150 }, { title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } }, { - title: '操作', width: '90px', fixed: 'right', + title: '操作', + width: '90px', + fixed: 'right', buttons: [ { text: '移除', click: _record => this.delete(_record), acl: { ability: ['AbnormalAppear-reply'] } - }, + } ] - }, + } ]; initSF(data?: any) { this.schema1 = { @@ -79,16 +79,16 @@ export class ParterRebateManageMentAddComponent implements OnInit { widget: 'tinymce', loadingTip: 'loading...', config: { - height: 500, + height: 500 } - }, + } // default: data?.agreementContent || '' } } }; } ngOnInit() { - this.addStatus =false + this.addStatus = false; this.initSF(); } goBack() { @@ -97,64 +97,64 @@ export class ParterRebateManageMentAddComponent implements OnInit { /** *合伙人选择 */ - add(item?: any) { + add(item?: any) { const modalRef = this.modal.create({ nzTitle: '合伙人选择', nzWidth: 1000, nzContent: ParterRebateManageMentAddPartnerListComponent, nzComponentParams: { - i: item, + i: item }, nzFooter: null }); modalRef.afterClose.subscribe((res: any) => { this.partnerId = []; if (res) { - if(Array.isArray(res)) { + if (Array.isArray(res)) { console.log(res); console.log(this.partnerPeopleList); - this.partnerPeopleList = this.partnerPeopleList.concat(res); + this.partnerPeopleList = this.partnerPeopleList.concat(res); res.forEach((ele: any) => { this.partnerId.push(ele?.id); - }) + }); } else { console.log(res); - this.partnerPeopleList = this.partnerPeopleList.concat(res); + this.partnerPeopleList = this.partnerPeopleList.concat(res); this.partnerId.push(res?.id); - } + } } }); } delete(item: any) { - this.partnerPeopleList = this.partnerPeopleList.filter((d:any, i: any) => { - return item.id != d.id - }); + this.partnerPeopleList = this.partnerPeopleList.filter((d: any, i: any) => { + return item.id != d.id; + }); } - save () { + save() { const params = { accountingRate: this.accountingRate, configName: this.configName, configType: this.configType, rebateConfigLineDTO: this.table.data, - priority: this.priority,// 优先级 + priority: this.priority, // 优先级 partnerId: this.partnerId.join(','), ruleDescription: this.sf.value.ruleDescription, remarke: this.remarke, partnerType: this.partnerType - } + }; console.log(params); this.service.request(this.service.$api_save_rebateConfig, params).subscribe((res: any) => { - if(res) { + if (res) { console.log(res); - this.service.msgSrv.success('新增成功!') - this.router.navigate(['/partner/rebate/setting']) + this.service.msgSrv.success('新增成功!'); + this.router.navigate(['/partner/rebate/setting']); } - }) + }); } changePartner(value: any) { console.log(value); - if(value) { - this.addStatus = true + if (value) { + this.addStatus = true; } } } From b2d7d8e81708f56431f12c7b96df0b132b1c7f52 Mon Sep 17 00:00:00 2001 From: weiyu Date: Sun, 24 Apr 2022 14:19:27 +0800 Subject: [PATCH 13/80] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/center/center.component.ts | 2 +- .../components/vehicle/vehicle.component.ts | 36 ++++++++++--------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/app/routes/account/components/center/center.component.ts b/src/app/routes/account/components/center/center.component.ts index 3298034d..5c6caa5e 100644 --- a/src/app/routes/account/components/center/center.component.ts +++ b/src/app/routes/account/components/center/center.component.ts @@ -151,7 +151,7 @@ export class AccountComponentsCenterComponent implements OnInit { } this.defaultCompany = res if (res.projectId) { - this.getPayPw() + this.getPayPw() } }) } diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.ts b/src/app/routes/order-management/components/vehicle/vehicle.component.ts index 09e3ac81..535d606a 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.ts @@ -19,7 +19,7 @@ import { OrderManagementService } from '../../services/order-management.service' @Component({ selector: 'app-supply-management-vehicle', templateUrl: './vehicle.component.html', - styleUrls: ['../../../commom/less/commom-table.less','./vehicle.component.less'] + styleUrls: ['../../../commom/less/commom-table.less', './vehicle.component.less'] }) export class OrderManagementVehicleComponent extends BasicTableComponent implements OnInit { ui: SFUISchema = {}; @@ -113,10 +113,10 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme const params: any = Object.assign({}, this.sf?.value || this.paramsList); delete params._$expand; this.paramsList = params - Object.assign(requestOptions.body, { - ...a, - ...this.paramsList, - }); + Object.assign(requestOptions.body, { + ...a, + ...this.paramsList, + }); this.loading = true; return requestOptions; }; @@ -197,7 +197,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme type: 'string', title: '运单号', ui: { - placeholder: '最多100个单号,空号隔开', + placeholder: '最多100个单号,空号隔开', } }, resourceCode: { @@ -416,11 +416,13 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme text: '运费变更记录', click: _record => this.OpenPrice(_record), iif: item => - item.billStatus == '4' || - item.billStatus == '5' || - item.billStatus == '2' || - item.billStatus == '3' || - item.billStatus == '6', + item.billType !== '3' && ( + item.billStatus == '4' || + item.billStatus == '5' || + item.billStatus == '2' || + item.billStatus == '3' || + item.billStatus == '6' + ), acl: { ability: ['ORDER-VEHICLE-ChangeApplyList'] } }, // { @@ -585,8 +587,8 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme /** * 导入货源 */ - importGoodsSource() {} - audit(item: any) {} + importGoodsSource() { } + audit(item: any) { } /* * 审核关闭弹窗 @@ -870,8 +872,8 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme } }); } - // 导出 - exprot() { - this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportWholeList); - } + // 导出 + exprot() { + this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportWholeList); + } } From 15d2137ca8bda59fabf9b7c870215e7c08b37b05 Mon Sep 17 00:00:00 2001 From: weiyu Date: Sun, 24 Apr 2022 14:22:17 +0800 Subject: [PATCH 14/80] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../order-management/components/vehicle/vehicle.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.ts b/src/app/routes/order-management/components/vehicle/vehicle.component.ts index 535d606a..00f391e2 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.ts @@ -441,7 +441,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme { text: '变更运费', click: _record => this.updateFreight(_record), - iif: item => item.billStatus !== '1' && item.billStatus !== '6' && item.overallPaymentStatus != '2', + iif: item => item.billType !== '3' && item.billStatus !== '1' && item.billStatus !== '6' && item.overallPaymentStatus != '2', acl: { ability: ['ORDER-VEHICLE-FreightChangeWholeDetail'] } }, { From dbf161e65f7c9e44418ef03fe94086e5e0ef52ed Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Sun, 24 Apr 2022 14:48:45 +0800 Subject: [PATCH 15/80] edit --- .../dataindex/dataindex.component.html | 7 +- .../dataindex/dataindex.component.ts | 91 +++++++++++-------- .../invoiced-list/invoiced-list.component.ts | 16 ++++ src/styles/compact.less | 24 +++++ 4 files changed, 97 insertions(+), 41 deletions(-) diff --git a/src/app/routes/datatable/components/dataindex/dataindex.component.html b/src/app/routes/datatable/components/dataindex/dataindex.component.html index 1ad2da63..3c08cb1a 100644 --- a/src/app/routes/datatable/components/dataindex/dataindex.component.html +++ b/src/app/routes/datatable/components/dataindex/dataindex.component.html @@ -1,5 +1,3 @@ - -
- +
diff --git a/src/app/routes/datatable/components/dataindex/dataindex.component.ts b/src/app/routes/datatable/components/dataindex/dataindex.component.ts index 5a16a165..fb428f1e 100644 --- a/src/app/routes/datatable/components/dataindex/dataindex.component.ts +++ b/src/app/routes/datatable/components/dataindex/dataindex.component.ts @@ -19,6 +19,7 @@ import { GeometryLabelCfg } from '@antv/g2/lib/interface'; providers: [CurrencyPipe] }) export class DatatableDataindexComponent implements OnInit { + @ViewChild('AdvanceDeposit', { static: false }) AdvanceDeposit!: G2CustomComponent; @ViewChild('g2custom', { static: false }) g2custom!: G2CustomComponent; @ViewChild('RegionalPerforman', { static: false }) RegionalPerforman!: G2CustomComponent; @ViewChild('BillDirectProportion', { static: false }) BillDirectProportion!: G2CustomComponent; @@ -49,6 +50,7 @@ export class DatatableDataindexComponent implements OnInit { this.service.request(this.service.$api_total_advance_deposit).subscribe((res: DataTotalVO) => { if (res) { this.totalAdvanceDeposit = this.formatMiniAreaData(res); + this.initAreaMap(this.AdvanceDeposit['el'].nativeElement as any, []); } }); // 业绩量总额 @@ -179,7 +181,7 @@ export class DatatableDataindexComponent implements OnInit { .style({ fillOpacity: 1, stroke: 'white', - lineWidth: 8 + lineWidth: 4 }) .state({ active: { @@ -294,42 +296,57 @@ export class DatatableDataindexComponent implements OnInit { * @param el */ private initAreaMap(el: HTMLElement, datas: any[]): void { + const data = [ + { city: '冰岛(雷克雅未克)', type: '首都人口', value: 0.56 }, + { city: '冰岛(雷克雅未克)', type: '城市人口', value: 0.38 } + ]; + const chart = new Chart({ container: el, autoFit: true, - height: 500 + height: 45 }); - chart.data(datas); - chart.scale('Data', { - range: [0, 1], - tickCount: 10, - type: 'timeCat' + chart.data(data); + chart.legend(false); + chart.axis('city', false); + chart.axis('value', { + label: { + formatter: val => val + }, + title: null, + grid: null }); - chart.scale('sales', { - nice: true - }); - chart.axis('Data', false); - chart.axis('sales', false); + chart.coordinate('rect').transpose(); chart.tooltip({ - showCrosshairs: true + customItems: items => { + return []; + }, + showContent: true, + title: '1,968.08万' }); - - // chart.annotation().dataMarker({ - // position: ['2014-01', 1750], - // top: true, - // text: { - // content: '因政策调整导致销量下滑', - // style: { - // fontSize: 13 - // } - // }, - // line: { - // length: 30 - // } - // }); - - chart.line().position('Data*sales'); - chart.area().position('Data*sales'); + chart.interaction('active-region'); + chart + .interval() + .adjust('stack') + .position('city*value') + .color('type*city', (type: any, city: any) => { + if (type === '首都人口') { + return '#E60012'; + } + if (type === '城市人口') { + return '#EAEAEB'; + } + return '#EAEAEB'; + }) + .style('type', (type: any, city: any) => { + if (type === '首都人口') { + return { radius: [0, 0, 20, 20] }; + } + if (type === '城市人口') { + return { radius: [20, 20, 0, 0] }; + } + return {}; + }); chart.render(); } @@ -409,7 +426,7 @@ export class DatatableDataindexComponent implements OnInit { chart.data(data); // 设置坐标轴 chart.scale({ - y1: { alias: y1Title, min: 0, max: 1000000 }, + y1: { alias: y1Title, min: 0, max: 2000000000 }, y2: { alias: y2Title, min: 0, max: 1, formatter: val => (val * 100).toFixed(0) + '%' }, y3: { alias: y3Title, min: 0, max: 1, formatter: val => (val * 100).toFixed(0) + '%' } }); @@ -420,8 +437,8 @@ export class DatatableDataindexComponent implements OnInit { padding: [10, 0, 40, 0], items: [ { value: 'y1', name: y1Title, marker: { symbol: 'circle', style: { fill: '#E60012', r: 5, fontSize: 13 } } }, - { value: 'y3', name: y3Title, marker: { symbol: 'circle', style: { fill: '#6CBFFF', r: 5, fontSize: 13 } } }, - { value: 'y2', name: y2Title, marker: { symbol: 'circle', style: { fill: '#50D4AB', r: 5, fontSize: 13 } } } + { value: 'y2', name: y2Title, marker: { symbol: 'circle', style: { fill: '#FE7823', r: 5, fontSize: 13 } } }, + { value: 'y3', name: y3Title, marker: { symbol: 'circle', style: { fill: '#F7CFCE', r: 5, fontSize: 13 } } } ] }); chart.axis('y2', { @@ -440,16 +457,16 @@ export class DatatableDataindexComponent implements OnInit { .line() .position('x*y2') // .label('pre', val => ({ content: (val * 100).toFixed(0) + '%' })) - .color('#6CBFFF') + .color('#F7CFCE') .size(3); - chart.point().position('x*y2').color('#6CBFFF').size(3).shape('circle'); + chart.point().position('x*y2').color('#F7CFCE').size(3).shape('circle'); chart .line() .position('x*y3') // .label('pre2', val => ({ content: (val * 100).toFixed(0) + '%' })) - .color('#50D4AB') + .color('#FE7823') .size(3); - chart.point().position('x*y3').color('#50D4AB').size(3).shape('circle'); + chart.point().position('x*y3').color('#FE7823').size(3).shape('circle'); chart.interaction('active-region'); chart.removeInteraction('legend-filter'); // 自定义图例,移除默认的分类图例筛选交互 diff --git a/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.ts b/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.ts index ddc9df8a..f45918ab 100644 --- a/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.ts +++ b/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.ts @@ -258,6 +258,22 @@ export class InvoicedListComponent implements OnInit { expand: (value: boolean) => value } } + }, + invoicetype: { + type: 'string', + title: '发票类型', + enum: [ + { value: '', label: '全部' }, + { value: '1', label: '运输专用发票' } + ], + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + }, + default: '' } } }; diff --git a/src/styles/compact.less b/src/styles/compact.less index 1fb4892b..29e50138 100644 --- a/src/styles/compact.less +++ b/src/styles/compact.less @@ -109,4 +109,28 @@ h2 { padding: 12px 0px !important; margin : 0 0 0 16px !important; } +} + +.mini_area_title { + margin-bottom: 0px !important; + + .title { + font-size: 13px !important; + } + + .subtitle { + font-size: 12px !important; + } +} + +.g2-card__meta-wrap { + + .g2-card__total { + font-size : 24px !important; + margin-top: 0 !important; + } +} + +.g2-card__footer { + padding-top: 0; } \ No newline at end of file From d8e297a64809e72d43d686f6fb43657676252e6a Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Sun, 24 Apr 2022 14:55:54 +0800 Subject: [PATCH 16/80] edit --- .../components/express-info/express-info.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/routes/ticket-management/components/express-info/express-info.component.ts b/src/app/routes/ticket-management/components/express-info/express-info.component.ts index 6277ed0a..c8e49e8a 100644 --- a/src/app/routes/ticket-management/components/express-info/express-info.component.ts +++ b/src/app/routes/ticket-management/components/express-info/express-info.component.ts @@ -28,7 +28,7 @@ export class ExpressInfoComponent implements OnInit { } }, createTime: { - title: '创建时间', + title: '下单时间', type: 'string', ui: { widget: 'sl-from-to-search', @@ -87,9 +87,9 @@ export class ExpressInfoComponent implements OnInit { if (this.sf) { Object.assign(requestOptions.body, { ...this.sf.value, - createtime: { - start: this.sf.value.createtime?.[0] || null, - end: this.sf.value.createtime?.[1] || null + createTime: { + start: this.sf.value.createTime?.[0] || '', + end: this.sf.value.createTime?.[1] || '' } }); } From 77744a68b54c9663d8a555b3a14de9178be2ac7b Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Sun, 24 Apr 2022 15:28:35 +0800 Subject: [PATCH 17/80] edit --- .../invoice-detail.component.ts | 12 +++++-- .../invoice-requested-detail.component.ts | 8 +++-- .../services/business/shipper-base.service.ts | 31 +++++++++++++++++++ 3 files changed, 46 insertions(+), 5 deletions(-) diff --git a/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.ts b/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.ts index 766fe66f..b56088d4 100644 --- a/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.ts +++ b/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.ts @@ -172,9 +172,15 @@ export class InvoiceDetailComponent implements OnInit { title: '所属项目', ui: { widget: 'select', - placeholder: '请选择', + serverSearch: true, + searchDebounceTime: 300, + searchLoadingText: '搜索中...', allowClear: true, - asyncData: () => this.service.getEnterpriseProject({ id: this.ltdId }) + onSearch: (q: any) => this.service.getProjectList({ projectName: q, enterpriseId: this.headerInfo?.shipperId }) + // widget: 'select', + // placeholder: '请选择', + // allowClear: true, + // asyncData: () => this.service.getEnterpriseProject({ id: this.ltdId }) }, default: '' } @@ -303,7 +309,7 @@ export class InvoiceDetailComponent implements OnInit { width: 140, type: 'widget', className: 'text-right', - widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatnotax }) } + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatnotax }) } } ]; } diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts index f8f08999..a8f18617 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts @@ -284,10 +284,14 @@ export class InvoiceRequestedDetailComponent implements OnInit { default: '', ui: { widget: 'select', + serverSearch: true, + searchDebounceTime: 300, + searchLoadingText: '搜索中...', + allowClear: true, + onSearch: (q: any) => this.service.getProjectList({ projectName: q, enterpriseId: this.headerInfo?.shipperId }), visibleIf: { expand: (value: boolean) => value - }, - asyncData: () => this.service.getEnterpriseProject() + } } } } diff --git a/src/app/shared/services/business/shipper-base.service.ts b/src/app/shared/services/business/shipper-base.service.ts index 3a614d5b..bf46b2dd 100644 --- a/src/app/shared/services/business/shipper-base.service.ts +++ b/src/app/shared/services/business/shipper-base.service.ts @@ -26,6 +26,8 @@ export class ShipperBaseService extends BaseService { // 获取货主企业列表 public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList'; + // 批量获取项目信息 + public $api_get_project_list = '/api/mdc/cuc/enterpriseProject/getProjectList'; constructor(public injector: Injector) { super(injector); } @@ -247,6 +249,35 @@ export class ShipperBaseService extends BaseService { } } + /** + * 批量获取项目信息 + * @returns + */ + getProjectList(params = { projectName: '', enterpriseId: '' }, containerAll = false) { + let str = params.projectName.replace(/^\s+|\s+$/g, ''); + if (str) { + return this.request(this.$api_get_project_list, params) + .pipe( + map((res: any) => { + if (!res) { + return []; + } + const list = res.map((item: any) => { + return { label: item.projectName, value: item.id }; + }); + const obj = []; + if (containerAll) { + obj.push({ label: '全部', value: '' }); + } + return [...obj, ...list]; + }) + ) + .toPromise(); + } else { + return of([]); + } + } + /** * 获取结算客户 * @returns From 900fe4fca78caea0447783cb8164cc448d6213cb Mon Sep 17 00:00:00 2001 From: wangshiming Date: Sun, 24 Apr 2022 15:58:02 +0800 Subject: [PATCH 18/80] fix bug --- .../components/edit/edit.component.ts | 17 ++++++++++------- .../components/list/list.component.ts | 1 + 2 files changed, 11 insertions(+), 7 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 6b143413..bd01de45 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 @@ -16,6 +16,7 @@ export class ParterChannelSalesEditComponent implements OnInit { schema!: SFSchema; ui!: SFUISchema; i: any; + sts: any; type: any; record:any; currentOAItem:any; @@ -29,13 +30,15 @@ export class ParterChannelSalesEditComponent implements OnInit { ) {} ngOnInit(): void { - - this.service.request(this.service.$api_getChannelSalesInfo, {id:this.i?.id}).subscribe(res => { - if(res){ - this.record = res; - } - this.initSF(); - }); + if(!this.sts) { + this.service.request(this.service.$api_getChannelSalesInfo, {id:this.i?.id}).subscribe(res => { + if(res){ + this.record = res; + this.initSF(); + } + }); + } + this.initSF(); } initSF() { diff --git a/src/app/routes/partner/channel-sales/components/list/list.component.ts b/src/app/routes/partner/channel-sales/components/list/list.component.ts index ba7097ec..9c150c22 100644 --- a/src/app/routes/partner/channel-sales/components/list/list.component.ts +++ b/src/app/routes/partner/channel-sales/components/list/list.component.ts @@ -112,6 +112,7 @@ export class ParterChannelSalesListComponent implements OnInit { nzWidth:600, nzTitle: '新增', nzContent: ParterChannelSalesEditComponent, + nzComponentParams: {sts: 'add'} }); modalRef.afterClose.subscribe(res => { if (res) { From 355601c89ed195f5032d6df1c693d0675d396228 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Sun, 24 Apr 2022 16:49:55 +0800 Subject: [PATCH 19/80] fix bug --- proxy.conf.js | 4 ++-- .../withdrawals-detail.component.ts | 2 +- .../usercenter/services/usercenter.service.ts | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/proxy.conf.js b/proxy.conf.js index 8fd91df6..688f3a27 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-04-22 14:01:00 + * @LastEditTime : 2022-04-24 16:40:24 * @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/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts index b35e8a87..bbcb46cf 100644 --- a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts +++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts @@ -210,7 +210,7 @@ export class WithdrawalsDetailComponent implements OnInit { enum: [ {label: '全部', value: ''}, {label: '是', value: '1'}, - {label: '否', value: '2'} + {label: '否', value: '0'} ], ui: { widget: 'select', diff --git a/src/app/routes/usercenter/services/usercenter.service.ts b/src/app/routes/usercenter/services/usercenter.service.ts index 9b9c5d9f..b1890e82 100644 --- a/src/app/routes/usercenter/services/usercenter.service.ts +++ b/src/app/routes/usercenter/services/usercenter.service.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-11-29 15:22:34 - * @LastEditTime : 2022-04-09 14:54:17 + * @LastEditTime : 2022-04-24 16:49:05 * @LastEditors : Shiming * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath : \\tms-obc-web\\src\\app\\routes\\usercenter\\services\\usercenter.service.ts @@ -151,17 +151,17 @@ export class UsermanageService extends ShipperBaseService { $api_configPage = '/api/mdc/cuc/driver/list/configPage'; // 批量修改企业渠道 - $api_batchUpdateEnterpriceChannel = '/api/mdc/enterpriceRelLog/batchUpdateEnterpriceChannel'; + $api_batchUpdateEnterpriceChannel = '/api/mdc/enterpriseRelLog/batchUpdateEnterpriceChannel'; // 批量修改企业合伙人 - $api_batchUpdateEnterpricePartner = '/api/mdc/enterpriceRelLog/batchUpdateEnterpricePartner'; + $api_batchUpdateEnterpricePartner = '/api/mdc/enterpriseRelLog/batchUpdateEnterpricePartner'; // 渠道销售修改详情 - $api_partnerChannelUpdateDetaiList = '/api/mdc/enterpriceRelLog/partnerChannelUpdateDetaiList'; + $api_partnerChannelUpdateDetaiList = '/api/mdc/partnerChannelRelLog/partnerChannelUpdateDetaiList'; // 查询企业修改合伙人记录 - $api_findEnterpricePartnerRelLog = '/api/mdc/enterpriceRelLog/findEnterpricePartnerRelLog'; + $api_findEnterpricePartnerRelLog = '/api/mdc/enterpriseRelLog/findEnterpricePartnerRelLog'; // 查询企业修改渠道记录 - $api_findEnterpriceChannelRelLog = '/api/mdc/enterpriceRelLog/findEnterpriceChannelRelLog'; + $api_findEnterpriceChannelRelLog = '/api/mdc/enterpriseRelLog/findEnterpriceChannelRelLog'; // 查询企业合伙人渠道关系信息 - $api_getEnterpriceRel = '/api/mdc/enterpriceRelLog/getEnterpriceRel'; + $api_getEnterpriceRel = '/api/mdc/enterpriseRelLog/getEnterpriceRel'; // 员工列表 $api_getStaffList = '/api/mdc/cuc/userApp/getStaffList'; // 分配客服人员 From e6a8558eb1af5b0788977fd4fd51f709e5aa7257 Mon Sep 17 00:00:00 2001 From: weiyu Date: Sun, 24 Apr 2022 17:21:06 +0800 Subject: [PATCH 20/80] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../order-management/components/vehicle/vehicle.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.ts b/src/app/routes/order-management/components/vehicle/vehicle.component.ts index 535d606a..00f391e2 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.ts @@ -441,7 +441,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme { text: '变更运费', click: _record => this.updateFreight(_record), - iif: item => item.billStatus !== '1' && item.billStatus !== '6' && item.overallPaymentStatus != '2', + iif: item => item.billType !== '3' && item.billStatus !== '1' && item.billStatus !== '6' && item.overallPaymentStatus != '2', acl: { ability: ['ORDER-VEHICLE-FreightChangeWholeDetail'] } }, { From 06d9a862464eb2d4a13b5d7e03440e4506cef5fd Mon Sep 17 00:00:00 2001 From: wangshiming Date: Sun, 24 Apr 2022 17:44:41 +0800 Subject: [PATCH 21/80] fix bug --- .../components/list/list.component.ts | 44 ++++++++------- .../list/editPartner/editPartner.component.ts | 56 ++++++++++++++----- .../freight/list/list.component.html | 10 +++- .../components/freight/list/list.component.ts | 25 +++++++-- .../services/business/shipper-base.service.ts | 24 ++++++++ 5 files changed, 120 insertions(+), 39 deletions(-) diff --git a/src/app/routes/partner/level-config/components/list/list.component.ts b/src/app/routes/partner/level-config/components/list/list.component.ts index e079f0e7..3d4501b2 100644 --- a/src/app/routes/partner/level-config/components/list/list.component.ts +++ b/src/app/routes/partner/level-config/components/list/list.component.ts @@ -21,7 +21,7 @@ export class ParterLevelConfigListComponent implements OnInit { sf!: SFComponent; spuStatus = '1'; - data=[{name1:1111}] + data = [{ name1: 1111 }]; constructor( public router: Router, public ar: ActivatedRoute, @@ -45,21 +45,25 @@ export class ParterLevelConfigListComponent implements OnInit { properties: { gradeName: { type: 'string', - title: '等级姓名', + title: '等级姓名' }, stateLocked: { type: 'string', title: '状态', - enum:[{label:'启用',value:'1'},{label:'禁用',value:'0'}], - ui:{ - widget:'select', + enum: [ + { label: '全部', value: '' }, + { label: '启用', value: '1' }, + { label: '禁用', value: '0' } + ], + ui: { + widget: 'select' } - }, + } } }; this.ui = { '*': { - width:300, + width: 300, grid: { span: 12, gutter: 4 } } }; @@ -79,6 +83,10 @@ export class ParterLevelConfigListComponent implements OnInit { title: '创建时间', index: 'createTime' }, + { + title: '排序', + index: 'sortId' + }, { title: '启用时间', index: 'enableTime' @@ -87,7 +95,7 @@ export class ParterLevelConfigListComponent implements OnInit { title: '状态', index: 'stateLocked', format: (item: any) => { - return item.stateLocked ? '禁用':'启用' + return item.stateLocked ? '启用' : '禁用'; } }, { @@ -96,17 +104,17 @@ export class ParterLevelConfigListComponent implements OnInit { buttons: [ { text: '编辑', - click: (_record, _modal, _instance) => this.edit(_record), + click: (_record, _modal, _instance) => this.edit(_record) }, { text: '禁用', click: (_record, _modal, _instance) => this.stop(_record), - iif:(item)=>!item.stateLocked + iif: item => !item.stateLocked }, { text: '启用', click: (_record, _modal, _instance) => this.restart(_record), - iif:(item)=>item.stateLocked + iif: item => item.stateLocked } ] } @@ -115,7 +123,7 @@ export class ParterLevelConfigListComponent implements OnInit { add() { const modalRef = this.modalService.create({ - nzWidth:500, + nzWidth: 500, nzTitle: '新增', nzContent: ParterLevelConfigEditComponent, nzComponentParams: { type: this.spuStatus } @@ -130,7 +138,7 @@ export class ParterLevelConfigListComponent implements OnInit { // 编辑 edit(record: STData) { const modalRef = this.modalService.create({ - nzWidth:500, + nzWidth: 500, nzTitle: '编辑', nzContent: ParterLevelConfigEditComponent, nzComponentParams: { i: record, type: this.spuStatus } @@ -142,8 +150,8 @@ export class ParterLevelConfigListComponent implements OnInit { }); } - // 编辑 - view(record: STData) { + // 编辑 + view(record: STData) { const modalRef = this.modalService.create({ nzTitle: '查看', nzContent: ParterLevelConfigEditComponent, @@ -156,7 +164,7 @@ export class ParterLevelConfigListComponent implements OnInit { nzTitle: '启用确认', nzContent: `确定启用该账号吗?
`, nzOnOk: () => - this.service.request(this.service.$api_updatePartnerGradeConfig, {id:item.id}).subscribe(res => { + this.service.request(this.service.$api_updatePartnerGradeConfig, { id: item.id }).subscribe(res => { if (res) { this.service.msgSrv.success('启用成功!'); this.st.reload(); @@ -169,7 +177,7 @@ export class ParterLevelConfigListComponent implements OnInit { nzTitle: '禁用确认', nzContent: `确定禁用该账号吗?
`, nzOnOk: () => - this.service.request(this.service.$api_updatePartnerGradeConfig, {id:item.id}).subscribe(res => { + this.service.request(this.service.$api_updatePartnerGradeConfig, { id: item.id }).subscribe(res => { if (res) { this.service.msgSrv.success('禁用成功!'); this.st.reload(); @@ -185,6 +193,4 @@ export class ParterLevelConfigListComponent implements OnInit { this.sf.reset(); this.st.load(1); } - - } diff --git a/src/app/routes/usercenter/components/freight/list/editPartner/editPartner.component.ts b/src/app/routes/usercenter/components/freight/list/editPartner/editPartner.component.ts index a55f960b..1f55f50c 100644 --- a/src/app/routes/usercenter/components/freight/list/editPartner/editPartner.component.ts +++ b/src/app/routes/usercenter/components/freight/list/editPartner/editPartner.component.ts @@ -1,8 +1,8 @@ import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; -import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; +import { SFComponent, SFDateWidgetSchema, SFRadioWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { _HttpClient } from '@delon/theme'; -import { EAEnvironmentService } from '@shared'; +import { EAEnvironmentService, ShipperBaseService } from '@shared'; import differenceInCalendarDays from 'date-fns/differenceInCalendarDays'; import format from 'date-fns/format'; import { NzMessageService } from 'ng-zorro-antd/message'; @@ -19,8 +19,9 @@ import { NzModalRef } from 'ng-zorro-antd/modal'; }) export class EditPartnerComponentsAddComponent implements OnInit { @ViewChild('sf', { static: false }) sf!: SFComponent; - record: any = {}; i: any; + sts: any; + rows: any; schema: SFSchema = {}; detailData: any = {} ui: SFUISchema = {}; @@ -33,14 +34,18 @@ export class EditPartnerComponentsAddComponent implements OnInit { public service: UsermanageService, private envSrv: EAEnvironmentService, private modal: NzModalRef, + public shipperservice: ShipperBaseService ) { } ngOnInit(): void { - this.initDetailData() + if(this.sts == '2') { + this.initDetailData() + } this.initSF(); } initDetailData() { + const params = { id: this.i.id } @@ -55,18 +60,40 @@ export class EditPartnerComponentsAddComponent implements OnInit { initSF() { this.schema = { properties: { - channelId: { + // channelId: { + // type: 'string', + // title: '合伙人修改为', + // ui: { + // widget: 'radio', + // showRequired: true, + // } as SFRadioWidgetSchema, + // enum: [ + // { label: '全部可见', value: 1 }, + // { label: '合伙人可见', value: 2 }, + // { label: '销售渠道可见', value: 3 }, + // ], + // }, + enterpriceIds: { type: 'string', title: '合伙人修改为', ui: { - widget: 'radio', - showRequired: true, - } as SFRadioWidgetSchema, - enum: [ - { label: '全部可见', value: 1 }, - { label: '合伙人可见', value: 2 }, - { label: '销售渠道可见', value: 3 }, - ], + widget: 'select', + placeholder: '请选择', + allowClear: true, + visibleIf: { + _$expand: (value: boolean) => value + }, + asyncData: () => this.shipperservice.getNetworkenterpriceIds() + } + }, + settStartTime: { + title: '结算起算日期', + type: 'string', + ui: { + widget: 'sl-from-to', type: 'date', format: 'yyyy-MM-dd', visibleIf: { + _$expand: (value: boolean) => value, + }, + } as SFDateWidgetSchema, }, remark: { type: 'string', @@ -87,7 +114,8 @@ export class EditPartnerComponentsAddComponent implements OnInit { } as SFRadioWidgetSchema, enum: [ { label: '修改成功后立即生效', value: 1 }, - { label: 'CRM流程审核通过后生效', value: 2 } + { label: 'CRM流程审核后生效', value: 2 }, + { label: 'CRM流程审核通过后生效', value: 3 } ], }, }, 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 a6d0ea7c..f30b7df8 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.html +++ b/src/app/routes/usercenter/components/freight/list/list.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-02-11 15:08:47 + * @LastEditTime : 2022-04-24 17:13:51 * @FilePath : \\tms-obc-web\\src\\app\\routes\\usercenter\\components\\freight\\list\\list.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -33,7 +33,7 @@
- + @@ -72,4 +72,10 @@ +
+ +
+ + +
\ No newline at end of file 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 4653512b..f85f9951 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.ts +++ b/src/app/routes/usercenter/components/freight/list/list.component.ts @@ -125,13 +125,30 @@ export class FreightComponentsListComponent implements OnInit { } }); } - editPartner(record: any) { + get selectedRows() { + return this.st?.list.filter(item => item.checked) || []; + } + editPartner(record?: any) { + let status = 1 + if(record) { + status = 2 + } + if (this.selectedRows.length <= 0 && !record) { + this.service.msgSrv.error('请选择订单!'); + return; + } + let params: any[] = []; + this.selectedRows.forEach(item => { + params.push(item.id); + }); const modalRef = this.modal.create({ nzTitle: '修改合伙人', nzContent: EditPartnerComponentsAddComponent, nzWidth: 800, nzComponentParams: { - i: record + i: record, + sts: status, + rows: params }, nzFooter: null }); @@ -141,7 +158,7 @@ export class FreightComponentsListComponent implements OnInit { } }); } - editSale(record: any) { + editSale(record?: any) { const modalRef = this.modal.create({ nzTitle: '修改渠道销售', nzContent: EditSaleComponentsAddComponent, @@ -380,7 +397,7 @@ export class FreightComponentsListComponent implements OnInit { initST() { this.columns = [ - // { title: '', type: 'checkbox', className: 'text-center' }, + { title: '', type: 'checkbox', className: 'text-center' }, { title: '企业名称', render: 'enterpriseName', width: 350 }, { title: '统一社会信用代码', className: 'text-center', render: 'unifiedSocialCreditCode', width: 200 }, { diff --git a/src/app/shared/services/business/shipper-base.service.ts b/src/app/shared/services/business/shipper-base.service.ts index bf46b2dd..56d9efaa 100644 --- a/src/app/shared/services/business/shipper-base.service.ts +++ b/src/app/shared/services/business/shipper-base.service.ts @@ -169,6 +169,30 @@ export class ShipperBaseService extends BaseService { }) ); } + /** + * 获取网络货运人 + * @returns + */ + getNetworkenterpriceIds(params = {}, containerAll = false) { + return this.request(this.$api_get_network_freight_forwarder_list, params).pipe( + map((res: any) => { + if (!res) { + return []; + } + const list = res.map((item: any) => { + return { + label: item.enterpriseName, + value: item.enterpriseName + }; + }); + const obj = []; + if (containerAll) { + obj.push({ label: '全部', value: '' }); + } + return [...obj, ...list]; + }) + ); + } /** * 获取CRM客户 From 594f7bee0ea546b01d63d1594ad3b0be9dd39693 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Sun, 24 Apr 2022 17:47:48 +0800 Subject: [PATCH 22/80] edit --- src/app/layout/layout.module.ts | 4 +- src/app/layout/pro/pro.component.html | 3 +- .../basic-table/basic-table.component.ts | 44 ++++- src/app/routes/commom/less/commom-table.less | 44 +++-- .../components/bulk/bulk.component.html | 167 ++++++------------ .../components/bulk/bulk.component.ts | 156 ++++++---------- .../components/vehicle/vehicle.component.html | 73 ++++---- .../components/vehicle/vehicle.component.ts | 60 +++---- .../search-drawer.component.html | 14 ++ .../search-drawer.component.less | 0 .../search-drawer/search-drawer.component.ts | 55 ++++++ .../search-drawer/search-drawer.module.ts | 14 ++ .../search-drawer/search-drawer.service.ts | 20 +++ src/app/shared/shared.module.ts | 5 +- src/styles/theme.less | 4 + 15 files changed, 353 insertions(+), 310 deletions(-) create mode 100644 src/app/shared/components/search-drawer/search-drawer.component.html create mode 100644 src/app/shared/components/search-drawer/search-drawer.component.less create mode 100644 src/app/shared/components/search-drawer/search-drawer.component.ts create mode 100644 src/app/shared/components/search-drawer/search-drawer.module.ts create mode 100644 src/app/shared/components/search-drawer/search-drawer.service.ts diff --git a/src/app/layout/layout.module.ts b/src/app/layout/layout.module.ts index 3afd4206..a2961e91 100644 --- a/src/app/layout/layout.module.ts +++ b/src/app/layout/layout.module.ts @@ -27,6 +27,7 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip'; import { NzGridModule } from 'ng-zorro-antd/grid'; import { LayoutPassportComponent } from './passport/passport.component'; import { PRO_COMPONENTS } from './pro/index'; +import { SearchDrawerModule } from '../shared/components/search-drawer/search-drawer.module'; const COMPONENTS: Array> = [...PRO_COMPONENTS, LayoutPassportComponent]; @@ -57,7 +58,8 @@ const COMPONENTS: Array> = [...PRO_COMPONENTS, LayoutPassportComponent ThemeBtnModule, ScrollbarModule, NzGridModule, - NzMessageModule + NzMessageModule, + SearchDrawerModule ], declarations: COMPONENTS, exports: COMPONENTS diff --git a/src/app/layout/pro/pro.component.html b/src/app/layout/pro/pro.component.html index 94c8c60b..4193e6bc 100644 --- a/src/app/layout/pro/pro.component.html +++ b/src/app/layout/pro/pro.component.html @@ -37,4 +37,5 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/src/app/routes/commom/components/basic-table/basic-table.component.ts b/src/app/routes/commom/components/basic-table/basic-table.component.ts index 99def7f4..e5f964a7 100644 --- a/src/app/routes/commom/components/basic-table/basic-table.component.ts +++ b/src/app/routes/commom/components/basic-table/basic-table.component.ts @@ -1,14 +1,21 @@ -import { AfterViewInit, Component, OnInit } from '@angular/core'; -import { fromEvent } from 'rxjs'; +import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core'; +import { SFComponent, SFSchema } from '@delon/form'; +import { fromEvent, Subscription } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; +import { SearchDrawerService } from 'src/app/shared/components/search-drawer/search-drawer.service'; @Component({ template: '' }) -export class BasicTableComponent implements AfterViewInit { +export class BasicTableComponent implements AfterViewInit, OnDestroy { scrollY = '400px'; - constructor() {} + sf!: SFComponent; + sfValue: Record = {}; + drawer: Subscription[] = []; + schema: SFSchema = {}; + + constructor(public searchDrawerService: SearchDrawerService) {} ngAfterViewInit(): void { setTimeout(() => { @@ -21,6 +28,33 @@ export class BasicTableComponent implements AfterViewInit { }); } + ngOnDestroy(): void { + this.drawer.forEach(sub => sub.unsubscribe()); + } + + openDrawer() { + if (this.drawer?.length > 0) { + this.searchDrawerService.create(this.sfValue, this.schema); + } else { + const drawer = this.searchDrawerService.create(this.sfValue, this.schema); + this.drawer.push( + drawer.initEvent.subscribe(sf => { + if (sf) { + this.sf = sf; + } + }) + ); + this.drawer.push( + drawer.closeEvent.subscribe(res => { + this.sfValue = res; + if (res) { + this.search(); + } + }) + ); + } + } + getScrollY() { const windowHeight = window.innerHeight || Math.max(document.documentElement.clientHeight, document.body.clientHeight); const header = document.getElementsByTagName('layout-pro-header')?.[0]; @@ -37,4 +71,6 @@ export class BasicTableComponent implements AfterViewInit { this.scrollY = scrollY + 'px'; } } + + search() {} } diff --git a/src/app/routes/commom/less/commom-table.less b/src/app/routes/commom/less/commom-table.less index 1eb73d94..f3c6f14b 100644 --- a/src/app/routes/commom/less/commom-table.less +++ b/src/app/routes/commom/less/commom-table.less @@ -9,7 +9,7 @@ } .ant-tabs-tab { - margin: 0 0 0 16px; + margin : 0 0 0 16px; padding: 12px 0; } @@ -21,31 +21,51 @@ .ant-card-body { padding: 0; } + + .tab_header { + display : flex; + align-items: center; + + .page_title { + font-weight: bold; + font-size : 17px; + + .driver { + color : #ff4d4f; + margin-left : 17px; + margin-right: 6px; + } + } + + nz-tabset { + flex: 1; + } + } } .ant-table-pagination.ant-pagination { margin: 8px; } - .ant-table-thead > tr > th, - .ant-table-tbody > tr > td, - .ant-table tfoot > tr > th, - .ant-table tfoot > tr > td { + .ant-table-thead>tr>th, + .ant-table-tbody>tr>td, + .ant-table tfoot>tr>th, + .ant-table tfoot>tr>td { padding: 8px; } - .ant-table.ant-table-bordered > .ant-table-container { + .ant-table.ant-table-bordered>.ant-table-container { border-top: 0; } .ant-pagination-item { - min-width: 24px; - height: 24px; + min-width : 24px; + height : 24px; line-height: 21px; } .ant-pagination-total-text { - height: 24px; + height : 24px; line-height: 24px; } @@ -53,8 +73,8 @@ .ant-pagination-next, .ant-pagination-jump-prev, .ant-pagination-jump-next { - min-width: 24px; - height: 24px; + min-width : 24px; + height : 24px; line-height: 21px; } @@ -67,4 +87,4 @@ line-height: 21px; } } -} +} \ No newline at end of file diff --git a/src/app/routes/order-management/components/bulk/bulk.component.html b/src/app/routes/order-management/components/bulk/bulk.component.html index 1ea7f649..a2b6d182 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.html +++ b/src/app/routes/order-management/components/bulk/bulk.component.html @@ -9,32 +9,14 @@ * Copyright (C) 2022 huzhenhong. All rights reserved. --> - - + -
- -
- - -
- +
-
-
+ --> - - - - - - - - - - -
- +
+ + + + + + + + + + +
+ +
+ + [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false"> {{ item.freightPrice | currency }} @@ -76,16 +56,19 @@
卸 | {{ item?.unloadTime }}
-
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + item?.carNo : ''}}
+
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + + item?.carNo : ''}}
-
{{ item.settlementWeight ? item.settlementWeight + '吨/ ': ''}} {{ item.settlementVolume ? item.settlementVolume + '方 ': ''}}
+
{{ item.settlementWeight ? item.settlementWeight + '吨/ ': ''}} {{ item.settlementVolume ? + item.settlementVolume + '方 ': ''}}
-
{{ item?.payeeName }}{{ item?.payeePhone ? "/" + item?.payeePhone : '' }}
+
{{ item?.payeeName }}{{ item?.payeePhone ? "/" + + item?.payeePhone : '' }}
-
{{ item?.createUserName }}{{ item?.createUserPhone ? "/" + item?.createUserPhone : '' }}
+
{{ item?.createUserName }}{{ item?.createUserPhone ? "/" + item?.createUserPhone : '' }}
{{ item.billCode }} @@ -108,7 +91,8 @@

{{ data.expenseName }}:{{ data.price | currency }} - {{ data.expenseName }}:{{ (data.price * 100).toFixed(2) + '%' }} + {{ data.expenseName }}:{{ (data.price * 100).toFixed(2) + '%' + }} {{ data.paymentStatusLabel }}

@@ -117,25 +101,13 @@
- + - + [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"> {{ index + 1 }} @@ -155,14 +127,8 @@ - + @@ -172,30 +138,21 @@
- + [res]="{ reName: { list: 'data.list', total: 'data.total' } }"> {{ item.amountBeforeChange | currency }} - ¥{{ item.amountchangeValue | number: '0.2-2' }} + ¥{{ item.amountchangeValue | number: '0.2-2' + }} {{ item.amountAfterChange | currency }} -
变更原因:{{ ViewCause?.changeCause }}
-
拒绝原因:{{ ViewCause?.refuseCause }}
+
变更原因:{{ ViewCause?.changeCause }}
+
拒绝原因:{{ ViewCause?.refuseCause }}
注:附加费依据调整后的运输费用重新计算
@@ -204,13 +161,8 @@ - + @@ -239,26 +191,21 @@
-
已选择{{ selectedRows?.length || 0 }}条订单,确认批量签收吗? +
已选择{{ + selectedRows?.length || 0 }}条订单,确认批量签收吗?
签收后不可再修改运费,请确保运费等信息准确无误后,再进行签收。
-
- + +
-
+ \ No newline at end of file diff --git a/src/app/routes/order-management/components/bulk/bulk.component.ts b/src/app/routes/order-management/components/bulk/bulk.component.ts index 688a6796..aeccbc6d 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.ts +++ b/src/app/routes/order-management/components/bulk/bulk.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core'; import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { ModalHelper, _HttpClient } from '@delon/theme'; @@ -7,20 +7,20 @@ import { map } from 'rxjs/operators'; import { OrderManagementService } from '../../services/order-management.service'; import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component'; import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-receipt.component'; -import { of } from 'rxjs'; +import { of, Subscription } from 'rxjs'; import { ShipperBaseService } from '@shared'; import { Router, ActivatedRoute } from '@angular/router'; import { OneCarOrderCancelConfirmComponent } from '../../modal/vehicle/cancel-confirm/cancel-confirm.component'; +import { SearchDrawerService } from 'src/app/shared/components/search-drawer/search-drawer.service'; +import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component'; @Component({ selector: 'app-supply-management-bulk', templateUrl: './bulk.component.html', - styleUrls: ['./bulk.component.less'] + styleUrls: ['../../../commom/less/commom-table.less','./bulk.component.less'] }) -export class OrderManagementBulkComponent implements OnInit { - ui: SFUISchema = {}; +export class OrderManagementBulkComponent extends BasicTableComponent implements OnInit { uiView: SFUISchema = {}; - schema: SFSchema = {}; schemaView: SFSchema = {}; auditMany = false; isVisibleView = false; @@ -54,13 +54,17 @@ export class OrderManagementBulkComponent implements OnInit { GoingQuantity: 0, totalCount: 0 }; + constructor( public service: OrderManagementService, private modal: NzModalService, public shipperservice: ShipperBaseService, private router: Router, private ar: ActivatedRoute, - ) { } + public searchDrawerService: SearchDrawerService + ) { + super(searchDrawerService); + } /** * 查询参数 @@ -70,14 +74,14 @@ export class OrderManagementBulkComponent implements OnInit { if (this.resourceStatus) { a.billStatus = this.resourceStatus; } - const params: any = Object.assign({}, this.sf?.value || {}); + const params: any = Object.assign({}, this.sfValue || {}); delete params._$expand; return { ...a, ...params, createTime: { - start: this.sf?.value?.createTime?.[0] || '', - end: this.sf?.value?.createTime?.[1] || '' + start: this.sfValue?.createTime?.[0] || '', + end: this.sfValue?.createTime?.[1] || '' } }; } @@ -86,17 +90,17 @@ export class OrderManagementBulkComponent implements OnInit { if (this.resourceStatus) { a.billStatus = this.resourceStatus; } - const params: any = Object.assign({}, this.sf?.value || {}); + const params: any = Object.assign({}, this.sfValue || {}); delete params._$expand; console.log(params); - if (this.sf) { + if (this.sfValue) { Object.assign(requestOptions.body, { ...a, ...params, createTime: { - start: this.sf?.value?.createTime?.[0] || '', - end: this.sf?.value?.createTime?.[1] || '' + start: this.sfValue?.createTime?.[0] || '', + end: this.sfValue?.createTime?.[1] || '' } }); } @@ -104,8 +108,8 @@ export class OrderManagementBulkComponent implements OnInit { return requestOptions; }; afterRes = (data: any[], rawData?: any) => { - console.log(data) - this.loading = false + console.log(data); + this.loading = false; return data.map(item => ({ ...item, disabled: item.billStatus !== '4' @@ -119,6 +123,7 @@ export class OrderManagementBulkComponent implements OnInit { id: this.changeId }; } + search() { this.st?.load(); this.getGoodsSourceStatistical(); @@ -185,14 +190,14 @@ export class OrderManagementBulkComponent implements OnInit { type: 'string', title: '订单号', ui: { - placeholder: '最多100个单号,空号隔开', + placeholder: '最多100个单号,空号隔开' } }, wayBillCode: { type: 'string', title: '运单号', ui: { - placeholder: '最多100个单号,空号隔开', + placeholder: '最多100个单号,空号隔开' } }, resourceCode: { @@ -208,11 +213,8 @@ export class OrderManagementBulkComponent implements OnInit { searchDebounceTime: 300, searchLoadingText: '搜索中...', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - }, onSearch: (q: any) => { - let str = q.replace(/^\s+|\s+$/g, ""); + let str = q.replace(/^\s+|\s+$/g, ''); if (str) { return this.service .request(this.service.$api_enterpriceList, { enterpriseName: str }) @@ -233,55 +235,27 @@ export class OrderManagementBulkComponent implements OnInit { ui: { widget: 'select', placeholder: '请先选择货主', - visibleIf: { - _$expand: (value: boolean) => value - }, } as SFSelectWidgetSchema }, loadingPlace: { type: 'string', title: '装货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } }, dischargePlace: { type: 'string', title: '卸货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } }, driverName: { title: '承运司机', type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } }, carNo: { title: '车牌号', type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } }, carCaptainName: { title: '车队长', type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } }, paymentStatus: { title: '支付状态', @@ -290,9 +264,6 @@ export class OrderManagementBulkComponent implements OnInit { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, containsAllLabel: true, - visibleIf: { - _$expand: (value: boolean) => value - } } as SFSelectWidgetSchema }, createTime: { @@ -303,9 +274,6 @@ export class OrderManagementBulkComponent implements OnInit { mode: 'range', format: 'yyyy-MM-dd', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - } } as SFDateWidgetSchema }, riskStatus: { @@ -319,9 +287,6 @@ export class OrderManagementBulkComponent implements OnInit { ui: { widget: 'select', placeholder: '请选择', - visibleIf: { - _$expand: (value: boolean) => value - } } }, enterpriseInfoName: { @@ -331,9 +296,6 @@ export class OrderManagementBulkComponent implements OnInit { widget: 'select', placeholder: '请选择', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - }, asyncData: () => this.shipperservice.getNetworkEnterpriseName() } }, @@ -345,9 +307,6 @@ export class OrderManagementBulkComponent implements OnInit { widget: 'dict-select', params: { dictKey: 'service:type' }, containsAllLabel: true, - visibleIf: { - _$expand: (value: boolean) => value - } } as SFSelectWidgetSchema }, settlementBasis: { @@ -358,15 +317,11 @@ export class OrderManagementBulkComponent implements OnInit { containsAllLabel: true, params: { dictKey: 'goodresource:settlement:type' }, containAllLable: true, - visibleIf: { - _$expand: (value: boolean) => value - } } as SFSelectWidgetSchema } }, type: 'object' }; - this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; } /** * 初始化查询表单 @@ -493,7 +448,7 @@ export class OrderManagementBulkComponent implements OnInit { title: '结算数量', render: 'settlementWeight', width: '170px', - className: 'text-left', + className: 'text-left' // format: (item: any) => // `${item.settlementWeight || '0'}吨/ // ${item.settlementVolume || '0'}方` @@ -509,7 +464,7 @@ export class OrderManagementBulkComponent implements OnInit { title: '车队长', className: 'text-left', width: '180px', - render: 'payeeName', + render: 'payeeName' }, { title: '装卸货时间', @@ -533,27 +488,31 @@ export class OrderManagementBulkComponent implements OnInit { title: '操作', fixed: 'right', width: '130px', - className: 'text-left block-td', + className: 'text-center block-td', buttons: [ { text: '运费变更记录', click: _record => this.OpenPrice(_record), iif: item => - item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '6', - acl: { ability: ['ORDER-BULK-listChangeApply'] }, + item.billStatus == '4' || + item.billStatus == '5' || + item.billStatus == '2' || + item.billStatus == '3' || + item.billStatus == '6', + acl: { ability: ['ORDER-BULK-listChangeApply'] } }, { text: '查看评价', click: _record => this.viewEvaluate(_record), iif: item => item.billStatus == '5', - acl: { ability: ['ORDER-BULK-evaluation'] }, + acl: { ability: ['ORDER-BULK-evaluation'] } }, { text: '查看详情', click: (item: any) => { this.router.navigate(['./bulk-detail', item.id], { relativeTo: this.ar }); }, - acl: { ability: ['USERCENTER-FREIGHT-USER-view'] }, + acl: { ability: ['USERCENTER-FREIGHT-USER-view'] } }, { text: '变更运费', @@ -562,32 +521,36 @@ export class OrderManagementBulkComponent implements OnInit { const flag = _record.mybidDetailInfo.find((item: any) => item?.expenseCode === 'TRA' && item?.paymentStatus === '4'); return _record.billStatus !== '1' && _record.billStatus !== '6' && !flag; }, - acl: { ability: ['ORDER-BULK-FreightChangeBulkDetail'] }, + acl: { ability: ['ORDER-BULK-FreightChangeBulkDetail'] } }, { text: '确认签收', click: _record => this.confirmReceipt(_record), iif: item => item.billStatus == '4', - acl: { ability: ['VEHICLE-LIST-view'] }, + acl: { ability: ['VEHICLE-LIST-view'] } }, { text: '取消订单', click: _record => this.cancellation(_record), iif: item => - item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '1', - acl: { ability: ['ORDER-BULK-signBulkOrder'] }, + item.billStatus == '4' || + item.billStatus == '5' || + item.billStatus == '2' || + item.billStatus == '3' || + item.billStatus == '1', + acl: { ability: ['ORDER-BULK-signBulkOrder'] } }, { text: '申请退款', - click: (_record) => this.applyRefund(_record), + click: _record => this.applyRefund(_record), iif: item => item.isApplyForRefund, - acl: { ability: ['ORDER-VEHICLE-modificationOrder'] }, + acl: { ability: ['ORDER-VEHICLE-modificationOrder'] } }, { text: '修改订单', click: _record => this.changeOrder(_record), iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3', - acl: { ability: ['ORDER-BULK-BulkBillDetail'] }, + acl: { ability: ['ORDER-BULK-BulkBillDetail'] } } ] } @@ -663,27 +626,13 @@ export class OrderManagementBulkComponent implements OnInit { id: this.changeViewId }; } - /** - * 伸缩查询条件 - */ - expandToggle(): void { - this._$expand = !this._$expand; - this.sf?.setValue('/_$expand', this._$expand); - } - tabChange(item: any) { } - /** - * 重置表单 - */ - resetSF(): void { - this.sf.reset(); - this._$expand = false; - } + tabChange(item: any) {} /** * 导入货源 */ - importGoodsSource() { } - audit(item: any) { } + importGoodsSource() {} + audit(item: any) {} /* * 审核关闭弹窗 @@ -704,7 +653,7 @@ export class OrderManagementBulkComponent implements OnInit { /** * 审核通过按钮 */ - handleOK() { } + handleOK() {} OpenPrice(item: any) { this.changeId = item.id; this.isVisible = true; @@ -838,8 +787,8 @@ export class OrderManagementBulkComponent implements OnInit { this.router.navigate(['order-management/bulk-detailChange', value.id]); } /** -*申请退款 -*/ + *申请退款 + */ applyRefund(item: any) { const modalRef = this.modal.create({ nzTitle: '申请退款', @@ -852,7 +801,6 @@ export class OrderManagementBulkComponent implements OnInit { }); modalRef.afterClose.subscribe((res: boolean) => { if (res) { - this.resetSF; this.st.load(); } }); diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.html b/src/app/routes/order-management/components/vehicle/vehicle.component.html index 4780db3c..542019b6 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.html +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.html @@ -31,11 +31,11 @@ --> -
-
-
+ --> - + +
+
+ + +
+
+ +
+
-
- + + [loading]="false" [scroll]="{ x:'1200px',y:scrollY }" (change)="stChange($event)"> \ No newline at end of file diff --git a/src/app/routes/financial-management/components/payment-order/payment-order.component.ts b/src/app/routes/financial-management/components/payment-order/payment-order.component.ts index 21a19041..f096e39d 100644 --- a/src/app/routes/financial-management/components/payment-order/payment-order.component.ts +++ b/src/app/routes/financial-management/components/payment-order/payment-order.component.ts @@ -2,7 +2,9 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; +import { SearchDrawerService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; +import { BasicTableComponent } from 'src/app/routes/commom'; import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component'; import { TicketService } from 'src/app/routes/ticket-management/services/ticket.service'; import { FreightAccountService } from '../../services/freight-account.service'; @@ -10,23 +12,30 @@ import { FreightAccountService } from '../../services/freight-account.service'; @Component({ selector: 'app-payment-order', templateUrl: './payment-order.component.html', - styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less'] + styleUrls: ['../../../commom/less/commom-table.less'] }) -export class PaymentOrderComponent implements OnInit { +export class PaymentOrderComponent extends BasicTableComponent implements OnInit { @ViewChild('st', { static: true }) st!: STComponent; - @ViewChild('sf', { static: false }) - sf!: SFComponent; columns: STColumn[] = this.initST(); - searchSchema: SFSchema = this.initSF(); - - _$expand = false; + schema: SFSchema = this.initSF(); selectedRows: any[] = []; - constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {} + constructor( + public service: FreightAccountService, + private nzModalService: NzModalService, + private router: Router, + public searchDrawerService: SearchDrawerService + ) { + super(searchDrawerService); + } ngOnInit(): void {} + search() { + this.st?.load(1); + } + beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { let params = { ...this.sf.value }; @@ -68,31 +77,9 @@ export class PaymentOrderComponent implements OnInit { }); } - /** - * 重置表单 - */ - resetSF() { - this.sf.reset(); - this._$expand = false; - } - - /** - * 伸缩查询条件 - */ - expandToggle() { - this._$expand = !this._$expand; - this.sf?.setValue('/expand', this._$expand); - } - private initSF(): SFSchema { return { properties: { - expand: { - type: 'boolean', - ui: { - hidden: true - } - }, paycode: { type: 'string', title: '付款单号' @@ -135,10 +122,7 @@ export class PaymentOrderComponent implements OnInit { widget: 'dict-select', containsAllLabel: true, params: { dictKey: 'pay:mode' }, - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' } }, arto: { @@ -147,10 +131,7 @@ export class PaymentOrderComponent implements OnInit { ui: { widget: 'select', placeholder: '请选择', - allowClear: true, - visibleIf: { - expand: (value: boolean) => value - } + allowClear: true } }, billCode: { @@ -159,10 +140,7 @@ export class PaymentOrderComponent implements OnInit { ui: { widget: 'select', placeholder: '请选择', - allowClear: true, - visibleIf: { - expand: (value: boolean) => value - } + allowClear: true } }, payDate: { @@ -170,10 +148,7 @@ export class PaymentOrderComponent implements OnInit { type: 'string', ui: { widget: 'sl-from-to-search', - format: 'yyyy-MM-dd', - visibleIf: { - expand: (value: boolean) => value - } + format: 'yyyy-MM-dd' } as SFDateWidgetSchema }, payDate2: { @@ -181,20 +156,12 @@ export class PaymentOrderComponent implements OnInit { type: 'string', ui: { widget: 'sl-from-to-search', - format: 'yyyy-MM-dd', - visibleIf: { - expand: (value: boolean) => value - } + format: 'yyyy-MM-dd' } as SFDateWidgetSchema }, waybillCode: { type: 'string', - title: '运单号', - ui: { - visibleIf: { - expand: (value: boolean) => value - } - } + title: '运单号' }, // feeCode: { // type: 'string', @@ -210,20 +177,14 @@ export class PaymentOrderComponent implements OnInit { type: 'string', ui: { widget: 'sl-from-to-search', - format: 'yyyy-MM-dd', - visibleIf: { - expand: (value: boolean) => value - } + format: 'yyyy-MM-dd' } as SFDateWidgetSchema }, payRemarks: { type: 'string', title: '付款备注', ui: { - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' } } } @@ -233,9 +194,9 @@ export class PaymentOrderComponent implements OnInit { private initST(): STColumn[] { return [ { title: '', index: 'key', type: 'checkbox', fixed: 'left', className: 'text-center' }, - { title: '付款单号', index: 'payCode', type: 'link', width: 180 }, - { title: '网络货运人', index: 'ltdName', width: 180 }, - { title: '运单号', index: 'waybillCode', width: 180 }, + { title: '付款单号', index: 'payCode', className: 'text-left', type: 'link', width: 180 }, + { title: '网络货运人', index: 'ltdName', className: 'text-left', width: 180 }, + { title: '运单号', index: 'waybillCode', className: 'text-left', width: 180 }, // { title: '费用号', index: 'feeCode', width: 180 }, { title: '要求付款日期', index: 'payDate', type: 'date', className: 'text-center', width: 150 }, { diff --git a/src/app/routes/financial-management/components/payment-record/payment-record.component.html b/src/app/routes/financial-management/components/payment-record/payment-record.component.html index ecea67f6..a609c79b 100644 --- a/src/app/routes/financial-management/components/payment-record/payment-record.component.html +++ b/src/app/routes/financial-management/components/payment-record/payment-record.component.html @@ -1,14 +1,4 @@ - - + - + +
+ + + + + + + +
- - - - - - + +
+ + +
+
- + {{ item?.orderPaymentCode }}
{{ item?.paymentStatusLabel }}
diff --git a/src/app/routes/financial-management/components/payment-record/payment-record.component.less b/src/app/routes/financial-management/components/payment-record/payment-record.component.less deleted file mode 100644 index cd8c3436..00000000 --- a/src/app/routes/financial-management/components/payment-record/payment-record.component.less +++ /dev/null @@ -1,41 +0,0 @@ -:host::ng-deep { - .search-box { - .ant-card-body { - padding-bottom: 18px; - } - } - - .content-box { - .ant-card-body { - padding-top: 0; - } - } - - nz-range-picker { - width: 100%; - } - - .ant-tabs-tab-btn { - padding-left : 16px; - padding-right: 16px; - } - - .text-truncate { - white-space: normal; - } -} - -.expend-options { - margin-top: 0px; -} - - -@media (min-width: 1200px) { - .expend-options { - max-width: 400px; - position : absolute; - right : 0; - bottom : 25px; - } - -} \ No newline at end of file diff --git a/src/app/routes/financial-management/components/payment-record/payment-record.component.ts b/src/app/routes/financial-management/components/payment-record/payment-record.component.ts index 1442d8fd..8acbf17f 100644 --- a/src/app/routes/financial-management/components/payment-record/payment-record.component.ts +++ b/src/app/routes/financial-management/components/payment-record/payment-record.component.ts @@ -2,31 +2,39 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; +import { SearchDrawerService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; +import { BasicTableComponent } from 'src/app/routes/commom'; import { FreightAccountService } from '../../services/freight-account.service'; import { ClearingModalComponent } from '../abnormal-gold/clearing-modal/clearing-modal.component'; @Component({ selector: 'app-payment-record', templateUrl: './payment-record.component.html', - styleUrls: ['./payment-record.component.less'] + styleUrls: ['../../../commom/less/commom-table.less'] }) -export class PaymentRecordComponent implements OnInit { +export class PaymentRecordComponent extends BasicTableComponent implements OnInit { @ViewChild('st', { static: true }) st!: STComponent; - @ViewChild('sf', { static: false }) - sf!: SFComponent; columns: STColumn[] = this.initST(); - searchSchema: SFSchema = this.initSF(); - - _$expand = false; + schema: SFSchema = this.initSF(); paymentStatus: any = ''; - constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {} + constructor( + public service: FreightAccountService, + private nzModalService: NzModalService, + public searchDrawerService: SearchDrawerService + ) { + super(searchDrawerService); + } ngOnInit(): void {} + search() { + this.st?.load(1); + } + beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { Object.assign(requestOptions.body, { @@ -38,10 +46,10 @@ export class PaymentRecordComponent implements OnInit { handlerDate: { start: this.sf.value.handlerDate?.[0] || '', end: this.sf.value.handlerDate?.[1] || '' - }, - paymentStatus: this.paymentStatus || null + } }); } + Object.assign(requestOptions.body, { paymentStatus: this.paymentStatus || null }); return requestOptions; }; @@ -57,22 +65,6 @@ export class PaymentRecordComponent implements OnInit { }); } - /** - * 重置表单 - */ - resetSF() { - this.sf.reset(); - this._$expand = false; - } - - /** - * 伸缩查询条件 - */ - expandToggle() { - this._$expand = !this._$expand; - this.sf?.setValue('/expand', this._$expand); - } - private initSF(): SFSchema { return { properties: { @@ -109,10 +101,7 @@ export class PaymentRecordComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'service:type' }, - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' }, default: '' }, @@ -120,46 +109,34 @@ export class PaymentRecordComponent implements OnInit { type: 'string', title: '承运司机', ui: { - placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请输入' } }, driverLicensePlate: { type: 'string', title: '车牌号', ui: { - placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请输入' } }, captain: { type: 'string', title: '收款人', ui: { - placeholder: '请输入收款人姓名/手机号', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请输入收款人姓名/手机号' } }, isCaptain: { type: 'string', title: '车队长收款', enum: [ - {label: '全部', value: ''}, - {label: '是', value: '1'}, - {label: '否', value: '2'} + { label: '全部', value: '' }, + { label: '是', value: '1' }, + { label: '否', value: '2' } ], ui: { widget: 'select', - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' }, default: '' }, @@ -169,10 +146,7 @@ export class PaymentRecordComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'paybill:type' }, - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' }, default: '' }, @@ -183,10 +157,7 @@ export class PaymentRecordComponent implements OnInit { widget: 'sl-from-to-search', format: 'yyyy-MM-dd', placeholder: '请选择', - nzShowTime: true, - visibleIf: { - expand: (value: boolean) => value - } + nzShowTime: true } as SFDateWidgetSchema }, handlerDate: { @@ -196,10 +167,7 @@ export class PaymentRecordComponent implements OnInit { widget: 'sl-from-to-search', format: 'yyyy-MM-dd', placeholder: '请选择', - nzShowTime: true, - visibleIf: { - expand: (value: boolean) => value - } + nzShowTime: true } as SFDateWidgetSchema }, bankType: { @@ -212,10 +180,7 @@ export class PaymentRecordComponent implements OnInit { ], ui: { widget: 'select', - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' }, default: '' }, @@ -226,10 +191,7 @@ export class PaymentRecordComponent implements OnInit { widget: 'select', placeholder: '请选择', allowClear: true, - asyncData: () => this.service.getNetworkFreightForwarder(), - visibleIf: { - expand: (value: boolean) => value - } + asyncData: () => this.service.getNetworkFreightForwarder() } } } diff --git a/src/app/routes/financial-management/components/receipt-order/receipt-order.component.html b/src/app/routes/financial-management/components/receipt-order/receipt-order.component.html index 58f7732c..47ffbda4 100644 --- a/src/app/routes/financial-management/components/receipt-order/receipt-order.component.html +++ b/src/app/routes/financial-management/components/receipt-order/receipt-order.component.html @@ -1,14 +1,4 @@ - - + + +
-
+ --> - -
- + +
+
+ + +
+
+ +
+
+ + [loading]="false" [scroll]="{ x: '1200px',y:scrollY }" (change)="stChange($event)">
\ No newline at end of file diff --git a/src/app/routes/financial-management/components/receipt-order/receipt-order.component.ts b/src/app/routes/financial-management/components/receipt-order/receipt-order.component.ts index bf8006d6..e4c3ae26 100644 --- a/src/app/routes/financial-management/components/receipt-order/receipt-order.component.ts +++ b/src/app/routes/financial-management/components/receipt-order/receipt-order.component.ts @@ -2,30 +2,38 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; +import { SearchDrawerService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; -import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component'; +import { BasicTableComponent } from 'src/app/routes/commom'; import { FreightAccountService } from '../../services/freight-account.service'; @Component({ selector: 'app-receipt-order', templateUrl: './receipt-order.component.html', - styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less'] + styleUrls: ['../../../commom/less/commom-table.less'] }) -export class ReceiptOrderComponent implements OnInit { +export class ReceiptOrderComponent extends BasicTableComponent implements OnInit { @ViewChild('st', { static: true }) st!: STComponent; - @ViewChild('sf', { static: false }) - sf!: SFComponent; columns: STColumn[] = this.initST(); - searchSchema: SFSchema = this.initSF(); - - _$expand = false; + schema: SFSchema = this.initSF(); selectedRows: any[] = []; - constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {} + constructor( + public service: FreightAccountService, + private nzModalService: NzModalService, + private router: Router, + public searchDrawerService: SearchDrawerService + ) { + super(searchDrawerService); + } ngOnInit(): void {} + search() { + this.st?.load(1); + } + beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { Object.assign(requestOptions.body, { @@ -48,6 +56,7 @@ export class ReceiptOrderComponent implements OnInit { }); } } + this.selectedRows = []; return requestOptions; }; @@ -72,22 +81,6 @@ export class ReceiptOrderComponent implements OnInit { // }); } - /** - * 重置表单 - */ - resetSF() { - this.sf.reset(); - this._$expand = false; - } - - /** - * 伸缩查询条件 - */ - expandToggle() { - this._$expand = !this._$expand; - this.sf?.setValue('/expand', this._$expand); - } - private initSF(): SFSchema { return { properties: { @@ -128,10 +121,7 @@ export class ReceiptOrderComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'driverrecord:receive:type' }, - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' } }, brmmode: { @@ -140,10 +130,7 @@ export class ReceiptOrderComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'receive:mode' }, - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' } }, arto: { @@ -155,10 +142,7 @@ export class ReceiptOrderComponent implements OnInit { searchDebounceTime: 300, searchLoadingText: '搜索中...', allowClear: true, - onSearch: (q: any) => this.service.getEnterpriceList({ enterpriseName: q }), - visibleIf: { - expand: (value: boolean) => value - } + onSearch: (q: any) => this.service.getEnterpriceList({ enterpriseName: q }) } }, sts: { @@ -167,10 +151,7 @@ export class ReceiptOrderComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'write:off:status' }, - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' } }, brmdate: { @@ -178,10 +159,7 @@ export class ReceiptOrderComponent implements OnInit { type: 'string', ui: { widget: 'sl-from-to-search', - format: 'yyyy-MM-dd', - visibleIf: { - expand: (value: boolean) => value - } + format: 'yyyy-MM-dd' } as SFDateWidgetSchema }, createTime: { @@ -189,10 +167,7 @@ export class ReceiptOrderComponent implements OnInit { type: 'string', ui: { widget: 'sl-from-to-search', - format: 'yyyy-MM-dd', - visibleIf: { - expand: (value: boolean) => value - } + format: 'yyyy-MM-dd' } as SFDateWidgetSchema }, // billHCode: { @@ -219,10 +194,7 @@ export class ReceiptOrderComponent implements OnInit { type: 'string', title: '收款备注', ui: { - placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请输入' } } } diff --git a/src/app/routes/financial-management/components/recharge-record/recharge-record.component.html b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.html index 8c7c5d10..d0ed4c80 100644 --- a/src/app/routes/financial-management/components/recharge-record/recharge-record.component.html +++ b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.html @@ -1,5 +1,5 @@ - - + - + - + +
+ +
+ + +
+
+ [loading]="false" [scroll]="{ x:'1200px',y:scrollY }"> {{ item.transferBankOpenName }}
{{ item.transferBankCardNumber }}
diff --git a/src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts index f06bc8cb..3ab37b61 100644 --- a/src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts +++ b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts @@ -1,31 +1,36 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; +import { SearchDrawerService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; +import { BasicTableComponent } from 'src/app/routes/commom'; import { FreightAccountService } from '../../services/freight-account.service'; @Component({ selector: 'app-recharge-record', templateUrl: './recharge-record.component.html', - styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less'] + styleUrls: ['../../../commom/less/commom-table.less'] }) -export class RechargeRecordComponent implements OnInit { +export class RechargeRecordComponent extends BasicTableComponent implements OnInit { @ViewChild('st', { static: true }) st!: STComponent; - @ViewChild('sf', { static: false }) - sf!: SFComponent; columns: STColumn[] = this.initST(); - searchSchema: SFSchema = this.initSF(); + schema: SFSchema = this.initSF(); @ViewChild('remarkodal', { static: true }) remarkodal!: any; rechargeRemark = ''; - _$expand = false; - constructor(public service: FreightAccountService, private modal: NzModalService) {} + constructor(public service: FreightAccountService, private modal: NzModalService, public searchDrawerService: SearchDrawerService) { + super(searchDrawerService); + } ngOnInit(): void {} + search() { + this.st?.load(1); + } + beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { Object.assign(requestOptions.body, { ...this.sf.value }); @@ -70,22 +75,6 @@ export class RechargeRecordComponent implements OnInit { history.go(-1); } - /** - * 重置表单 - */ - resetSF() { - this.sf.reset(); - this._$expand = false; - } - - /** - * 伸缩查询条件 - */ - expandToggle() { - this._$expand = !this._$expand; - this.sf?.setValue('/expand', this._$expand); - } - exportList() { this.service.exportStart({ ...this.sf.value, pageSize: -1 }, this.service.$api_get_exportPageByOperator); } @@ -93,12 +82,6 @@ export class RechargeRecordComponent implements OnInit { private initSF(): SFSchema { return { properties: { - expand: { - type: 'boolean', - ui: { - hidden: true - } - }, rechargeNo: { type: 'string', title: '充值单号', @@ -137,9 +120,6 @@ export class RechargeRecordComponent implements OnInit { ui: { placeholder: '请输入', autocomplete: 'off', - visibleIf: { - expand: (value: boolean) => value - } } }, accountType: { @@ -154,9 +134,6 @@ export class RechargeRecordComponent implements OnInit { ui: { widget: 'select', placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } }, default: '' }, @@ -166,9 +143,6 @@ export class RechargeRecordComponent implements OnInit { ui: { widget: 'select', placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - }, allowClear: true, asyncData: () => this.service.getNetworkFreightForwarder() } @@ -184,9 +158,6 @@ export class RechargeRecordComponent implements OnInit { ui: { widget: 'select', placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } }, default: '' } diff --git a/src/app/routes/financial-management/components/transaction-flow/transaction-flow.component.html b/src/app/routes/financial-management/components/transaction-flow/transaction-flow.component.html index bd7fb2aa..84e9be34 100644 --- a/src/app/routes/financial-management/components/transaction-flow/transaction-flow.component.html +++ b/src/app/routes/financial-management/components/transaction-flow/transaction-flow.component.html @@ -1,4 +1,4 @@ - + - + +
+ +
+ + +
+
- - - + [loading]="false" [scroll]="{ x: '1200px',y:scrollY }">
\ No newline at end of file diff --git a/src/app/routes/financial-management/components/transaction-flow/transaction-flow.component.ts b/src/app/routes/financial-management/components/transaction-flow/transaction-flow.component.ts index 0e7987e9..ca397864 100644 --- a/src/app/routes/financial-management/components/transaction-flow/transaction-flow.component.ts +++ b/src/app/routes/financial-management/components/transaction-flow/transaction-flow.component.ts @@ -3,32 +3,29 @@ import { Component, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; +import { SearchDrawerService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; +import { BasicTableComponent } from 'src/app/routes/commom'; import { FreightAccountService } from '../../services/freight-account.service'; @Component({ selector: 'app-transaction-flow', templateUrl: './transaction-flow.component.html', - styleUrls: ['./transaction-flow.component.less'], - providers: [CurrencyPipe] + styleUrls: ['../../../commom/less/commom-table.less'] }) -export class TransactionFlowComponent { +export class TransactionFlowComponent extends BasicTableComponent { @ViewChild('st', { static: true }) st!: STComponent; - @ViewChild('sf', { static: false }) - sf!: SFComponent; columns: STColumn[] = this.initST(); - searchSchema: SFSchema = this.initSF(); + schema: SFSchema = this.initSF(); - _$expand = false; - - constructor( - public service: FreightAccountService, - private nzModalService: NzModalService, - private router: Router, - private currencyPipe: CurrencyPipe - ) {} + constructor(public service: FreightAccountService, public searchDrawerService: SearchDrawerService) { + super(searchDrawerService); + } + search() { + this.st?.load(1); + } beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { @@ -43,31 +40,10 @@ export class TransactionFlowComponent { return requestOptions; }; - /** - * 重置表单 - */ - resetSF() { - this.sf.reset(); - this._$expand = false; - } - - /** - * 伸缩查询条件 - */ - expandToggle() { - this._$expand = !this._$expand; - this.sf?.setValue('/expand', this._$expand); - } private initSF(): SFSchema { return { properties: { - expand: { - type: 'boolean', - ui: { - hidden: true - } - }, createTime: { title: '交易时间', type: 'string', @@ -96,9 +72,6 @@ export class TransactionFlowComponent { title: '订单号', ui: { placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } } }, tradeType: { @@ -120,9 +93,6 @@ export class TransactionFlowComponent { ui: { widget: 'select', placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } }, default: '' }, @@ -137,9 +107,6 @@ export class TransactionFlowComponent { ui: { widget: 'select', placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } }, default: '' }, @@ -155,9 +122,6 @@ export class TransactionFlowComponent { ui: { widget: 'select', placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } }, default: '' }, @@ -166,9 +130,6 @@ export class TransactionFlowComponent { title: '账户名称', ui: { placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } } }, projectId: { @@ -178,9 +139,6 @@ export class TransactionFlowComponent { widget: 'select', placeholder: '请选择', allowClear: true, - visibleIf: { - expand: (value: boolean) => value - }, asyncData: () => this.service.getEnterpriseProject() }, default: '' @@ -196,9 +154,6 @@ export class TransactionFlowComponent { ui: { widget: 'select', placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } }, default: '' }, @@ -209,9 +164,6 @@ export class TransactionFlowComponent { widget: 'select', placeholder: '请选择', allowClear: true, - visibleIf: { - expand: (value: boolean) => value - }, asyncData: () => this.service.getNetworkFreightForwarder() }, default: '' @@ -225,8 +177,8 @@ export class TransactionFlowComponent { { title: '交易时间', index: 'createTime', width: 180 }, { title: '流水号', index: 'transactionNumber', width: 180 }, { title: '交易类型', index: 'tradeTypeLabel', width: 120 }, - { title: '关联单号', index: 'businessNumber', width: 150 }, - { title: '订单号', index: 'orderSn', width: 150 }, + { title: '关联单号', index: 'businessNumber', width: 170 }, + { title: '订单号', index: 'orderSn', width: 170 }, { title: '账户类型', index: 'accountTypeLabel', width: 130 }, { title: '账户名称', index: 'roleName', width: 180 }, { title: '所属项目', index: 'projectName', width: 140 }, diff --git a/src/app/routes/financial-management/components/voucher-management/voucher-management.component.html b/src/app/routes/financial-management/components/voucher-management/voucher-management.component.html index 30ea85a7..88a9cc2c 100644 --- a/src/app/routes/financial-management/components/voucher-management/voucher-management.component.html +++ b/src/app/routes/financial-management/components/voucher-management/voucher-management.component.html @@ -1,4 +1,4 @@ - + + +
-
+ --> - + +
+ +
+ +
+
-
- -
+ + --> + [loading]="false" [scroll]="{ x:'1200px',y:scrollY }" (change)="stChange($event)">
\ No newline at end of file diff --git a/src/app/routes/financial-management/components/voucher-management/voucher-management.component.ts b/src/app/routes/financial-management/components/voucher-management/voucher-management.component.ts index 014bde06..76f4bb47 100644 --- a/src/app/routes/financial-management/components/voucher-management/voucher-management.component.ts +++ b/src/app/routes/financial-management/components/voucher-management/voucher-management.component.ts @@ -1,43 +1,36 @@ -/* - * @Description : - * @Version : 1.0 - * @Author : Shiming - * @Date : 2022-01-18 15:57:44 - * @LastEditors : Shiming - * @LastEditTime : 2022-04-09 16:36:42 - * @FilePath : \\tms-obc-web\\src\\app\\routes\\financial-management\\components\\voucher-management\\voucher-management.component.ts - * Copyright (C) 2022 huzhenhong. All rights reserved. - */ -import { CurrencyPipe } from '@angular/common'; import { Component, OnInit, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; +import { SearchDrawerService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; +import { BasicTableComponent } from 'src/app/routes/commom'; import { FreightAccountService } from '../../services/freight-account.service'; @Component({ selector: 'app-voucher-management', templateUrl: './voucher-management.component.html', - styleUrls: ['../../../commom/less/box.less'] + styleUrls: ['../../../commom/less/commom-table.less'] }) -export class VoucherManagementComponent implements OnInit { +export class VoucherManagementComponent extends BasicTableComponent implements OnInit { @ViewChild('st', { static: true }) st!: STComponent; - @ViewChild('sf', { static: false }) - sf!: SFComponent; @ViewChild('auditModal', { static: false }) auditModal!: any; columns: STColumn[] = this.initST(); - searchSchema: SFSchema = this.initSF(); - - _$expand = false; + schema: SFSchema = this.initSF(); selectedRows: any[] = []; - constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {} + constructor(public service: FreightAccountService, private router: Router, public searchDrawerService: SearchDrawerService) { + super(searchDrawerService); + } ngOnInit(): void {} + search() { + this.st?.load(1); + } + beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { Object.assign(requestOptions.body, { @@ -71,22 +64,6 @@ export class VoucherManagementComponent implements OnInit { } } - /** - * 重置表单 - */ - resetSF() { - this.sf.reset(); - this._$expand = false; - } - - /** - * 伸缩查询条件 - */ - expandToggle() { - this._$expand = !this._$expand; - this.sf?.setValue('/expand', this._$expand); - } - private initSF(): SFSchema { return { properties: { @@ -128,10 +105,7 @@ export class VoucherManagementComponent implements OnInit { title: '原始单号', ui: { autocomplete: 'off', - placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请输入' } }, sourceType: { @@ -155,10 +129,7 @@ export class VoucherManagementComponent implements OnInit { ], ui: { widget: 'select', - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' } }, createTime: { @@ -166,20 +137,14 @@ export class VoucherManagementComponent implements OnInit { type: 'string', ui: { widget: 'sl-from-to-search', - format: 'yyyy-MM-dd', - visibleIf: { - expand: (value: boolean) => value - } + format: 'yyyy-MM-dd' } as SFDateWidgetSchema }, remarks: { type: 'string', title: '凭证摘要', ui: { - placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请输入' } }, vctype: { @@ -188,10 +153,7 @@ export class VoucherManagementComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'credential:type' }, - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' }, default: '' }, @@ -211,20 +173,14 @@ export class VoucherManagementComponent implements OnInit { type: 'string', title: '借方金额', ui: { - placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请输入' } }, crmoney: { type: 'string', title: '贷方金额', ui: { - placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请输入' } }, vcltdid: { @@ -233,10 +189,7 @@ export class VoucherManagementComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'refund:apply:status' }, - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' } }, sts: { @@ -245,10 +198,7 @@ export class VoucherManagementComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'credential:status' }, - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' }, default: '' }, @@ -256,20 +206,14 @@ export class VoucherManagementComponent implements OnInit { type: 'string', title: 'NC凭证', ui: { - placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请输入' } }, vc2code: { type: 'string', title: '汇总凭证号', ui: { - placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请输入' } }, importnc: { @@ -278,10 +222,7 @@ export class VoucherManagementComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'refund:apply:status' }, - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' } }, isvc2: { @@ -294,10 +235,7 @@ export class VoucherManagementComponent implements OnInit { ], ui: { widget: 'select', - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' } } } diff --git a/src/app/routes/financial-management/components/voucher-summary/voucher-summary.component.html b/src/app/routes/financial-management/components/voucher-summary/voucher-summary.component.html index 5f5f53c7..7380f466 100644 --- a/src/app/routes/financial-management/components/voucher-summary/voucher-summary.component.html +++ b/src/app/routes/financial-management/components/voucher-summary/voucher-summary.component.html @@ -1,14 +1,4 @@ - - + + + -
+ --> - + +
+ +
+ + +
+
+ [loading]="false" [scroll]="{ x:'1200px',y:scrollY }" (change)="stChange($event)">
\ No newline at end of file diff --git a/src/app/routes/financial-management/components/voucher-summary/voucher-summary.component.ts b/src/app/routes/financial-management/components/voucher-summary/voucher-summary.component.ts index ca64fd91..029d31c7 100644 --- a/src/app/routes/financial-management/components/voucher-summary/voucher-summary.component.ts +++ b/src/app/routes/financial-management/components/voucher-summary/voucher-summary.component.ts @@ -3,36 +3,41 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; +import { SearchDrawerService } from '@shared'; import { DateHelperByDatePipe } from 'ng-zorro-antd/i18n'; import { NzModalService } from 'ng-zorro-antd/modal'; +import { BasicTableComponent } from 'src/app/routes/commom'; import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component'; import { FreightAccountService } from '../../services/freight-account.service'; @Component({ selector: 'app-voucher-summary', templateUrl: './voucher-summary.component.html', - styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less'] + styleUrls: ['../../../commom/less/commom-table.less'] }) -export class VoucherSummaryComponent implements OnInit { +export class VoucherSummaryComponent extends BasicTableComponent implements OnInit { @ViewChild('st', { static: true }) st!: STComponent; - @ViewChild('sf', { static: false }) - sf!: SFComponent; columns: STColumn[] = this.initST(); - searchSchema: SFSchema = this.initSF(); - - _$expand = false; + schema: SFSchema = this.initSF(); selectedRows: any[] = []; constructor( public service: FreightAccountService, private nzModalService: NzModalService, private router: Router, - private dateHelperByDatePipe: DateHelperByDatePipe - ) {} + private dateHelperByDatePipe: DateHelperByDatePipe, + public searchDrawerService: SearchDrawerService + ) { + super(searchDrawerService); + } ngOnInit(): void {} + search() { + this.st?.load(1); + } + beforeReq = (requestOptions: STRequestOptions) => { Object.assign(requestOptions.body, { isvc2: 1 }); if (this.sf) { @@ -72,22 +77,6 @@ export class VoucherSummaryComponent implements OnInit { }); } - /** - * 重置表单 - */ - resetSF() { - this.sf.reset(); - this._$expand = false; - } - - /** - * 伸缩查询条件 - */ - expandToggle() { - this._$expand = !this._$expand; - this.sf?.setValue('/expand', this._$expand); - } - exportList() { this.service.exportStart({ ...this.sf.value, pageSize: -1 }, this.service.$api_export_fico_vch_page); } @@ -133,10 +122,7 @@ export class VoucherSummaryComponent implements OnInit { title: '原始单号', ui: { autocomplete: 'off', - placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请输入' } }, sourceType: { @@ -144,10 +130,7 @@ export class VoucherSummaryComponent implements OnInit { title: '原始单类型', ui: { widget: 'select', - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' } }, createTime: { @@ -155,20 +138,14 @@ export class VoucherSummaryComponent implements OnInit { type: 'string', ui: { widget: 'sl-from-to-search', - format: 'yyyy-MM-dd', - visibleIf: { - expand: (value: boolean) => value - } + format: 'yyyy-MM-dd' } as SFDateWidgetSchema }, remarks: { type: 'string', title: '凭证摘要', ui: { - placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请输入' } }, vctype: { @@ -177,10 +154,7 @@ export class VoucherSummaryComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'credential:type' }, - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' }, default: '' }, @@ -190,30 +164,21 @@ export class VoucherSummaryComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'refund:apply:status' }, - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' } }, drmoney: { type: 'string', title: '借方金额', ui: { - placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请输入' } }, crmoney: { type: 'string', title: '贷方金额', ui: { - placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请输入' } }, vcltdid: { @@ -222,10 +187,7 @@ export class VoucherSummaryComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'refund:apply:status' }, - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' } }, sts: { @@ -234,30 +196,21 @@ export class VoucherSummaryComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'credential:status' }, - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' } }, feecode: { type: 'string', title: 'NC凭证', ui: { - placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请输入' } }, vccode: { type: 'string', title: '凭证号', ui: { - placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请输入' } }, s22t2ss: { @@ -266,10 +219,7 @@ export class VoucherSummaryComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'refund:apply:status' }, - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' } }, createt1im2e: { @@ -277,10 +227,7 @@ export class VoucherSummaryComponent implements OnInit { type: 'string', ui: { widget: 'sl-from-to-search', - format: 'yyyy-MM-dd', - visibleIf: { - expand: (value: boolean) => value - } + format: 'yyyy-MM-dd' } as SFDateWidgetSchema } } diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.html b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.html index a4db6171..8272131b 100644 --- a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.html +++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.html @@ -1,5 +1,5 @@ - - + - + - - - - - - - - - + +
+ + + + + + + + + +
@@ -60,12 +65,14 @@ totalCallNo }} 清空
+ +
+ [loading]="false" [scroll]="{ x:'1200px',y:scrollY }" (change)="stChange($event)"> {{ item.bankName }}
{{ item.bankCardNumber }}
diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts index 75a921ef..0c5b4c86 100644 --- a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts +++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts @@ -2,36 +2,45 @@ import { Component, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; +import { SearchDrawerService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; +import { BasicTableComponent } from 'src/app/routes/commom'; import { FreightAccountService } from '../../services/freight-account.service'; @Component({ selector: 'app-withdrawals-record', templateUrl: './withdrawals-record.component.html', - styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less'] + styleUrls: ['../../../commom/less/commom-table.less'] }) -export class WithdrawalsRecordComponent { +export class WithdrawalsRecordComponent extends BasicTableComponent { @ViewChild('st', { static: true }) st!: STComponent; - @ViewChild('sf', { static: false }) - sf!: SFComponent; @ViewChild('auditModal', { static: false }) auditModal!: any; columns: STColumn[] = this.initST(); - searchSchema: SFSchema = this.initSF(); - - _$expand = false; + schema: SFSchema = this.initSF(); selectedRows: any[] = []; totalCallNo = 0; refundStatus: any = ''; msg = ''; - constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {} + constructor( + public service: FreightAccountService, + private nzModalService: NzModalService, + private router: Router, + public searchDrawerService: SearchDrawerService + ) { + super(searchDrawerService); + } ngOnInit(): void {} + search() { + this.st?.load(1); + } + beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { Object.assign(requestOptions.body, { @@ -40,10 +49,12 @@ export class WithdrawalsRecordComponent { start: this.sf.value.createTime?.[0] || '', end: this.sf.value.createTime?.[1] || '' }, - refundStatus: this.refundStatus || null }); } delete requestOptions?.body?.expand; + this.selectedRows = []; + this.totalCallNo = 0; + Object.assign(requestOptions.body, { refundStatus: this.refundStatus || null }); return requestOptions; }; @@ -145,31 +156,9 @@ export class WithdrawalsRecordComponent { }); } - /** - * 重置表单 - */ - resetSF() { - this.sf.reset(); - this._$expand = false; - } - - /** - * 伸缩查询条件 - */ - expandToggle() { - this._$expand = !this._$expand; - this.sf?.setValue('/expand', this._$expand); - } - private initSF(): SFSchema { return { properties: { - expand: { - type: 'boolean', - ui: { - hidden: true - } - }, refundApplyCode: { type: 'string', title: '提现单号', @@ -209,10 +198,7 @@ export class WithdrawalsRecordComponent { ui: { widget: 'dict-select', params: { dictKey: 'bank:type' }, - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' } }, ltdId: { @@ -222,10 +208,7 @@ export class WithdrawalsRecordComponent { widget: 'select', placeholder: '请选择', allowClear: true, - asyncData: () => this.service.getNetworkFreightForwarder(), - visibleIf: { - expand: (value: boolean) => value - } + asyncData: () => this.service.getNetworkFreightForwarder() } }, bankType: { @@ -234,10 +217,7 @@ export class WithdrawalsRecordComponent { ui: { widget: 'dict-select', params: { dictKey: 'bankname:type' }, - placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请输入' } } } @@ -246,7 +226,7 @@ export class WithdrawalsRecordComponent { private initST(): STColumn[] { return [ - { title: '', index: 'key', type: 'checkbox' }, + { title: '', index: 'key', type: 'checkbox', className: 'text-center' }, { title: '提现时间', index: 'createTime', width: 180 }, { title: '提现单号', index: 'refundApplyCode', width: 120 }, { title: '网络货运人', index: 'ltdName', width: 140 }, diff --git a/src/app/routes/financial-management/financial-management.module.ts b/src/app/routes/financial-management/financial-management.module.ts index 76cafed5..e99c95d6 100644 --- a/src/app/routes/financial-management/financial-management.module.ts +++ b/src/app/routes/financial-management/financial-management.module.ts @@ -2,7 +2,6 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FreightAccountComponent } from './components/freight-account/freight-account.component'; import { DriverAccountComponent } from './components/driver-account/driver-account.component'; -import { RechargeRecordComponent } from './components/recharge-record/recharge-record.component'; import { WithdrawalsRecordComponent } from './components/withdrawals-record/withdrawals-record.component'; import { SharedModule } from '@shared'; import { FinancialManagementRoutingModule } from './financial-managemen-routing.module'; @@ -40,6 +39,7 @@ import { CwcBankCardManagementIndexComponent } from './components/bank-card-mana import { CwcBankCardManagementBindComponent } from './components/bank-card-management/bind/bind.component'; import { CwcBankCardManagementAddComponent } from './components/bank-card-management/add/add.component'; import { CwcAccountManagementWithdrawDepositComponent } from './components/platform-account/withdraw-deposit/withdraw-deposit.component'; +import { RechargeRecordComponent } from './components/recharge-record/recharge-record.component'; const ROUTESCOMPONENTS = [ FreightAccountComponent, diff --git a/src/app/shared/components/search-drawer/search-drawer.component.html b/src/app/shared/components/search-drawer/search-drawer.component.html index 070bb956..da6a8c17 100644 --- a/src/app/shared/components/search-drawer/search-drawer.component.html +++ b/src/app/shared/components/search-drawer/search-drawer.component.html @@ -8,7 +8,7 @@
- +
\ No newline at end of file From 3ffae048e2569d6eae538561fdcd973117f30dce Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Mon, 25 Apr 2022 19:33:20 +0800 Subject: [PATCH 48/80] edit --- .../advance-collection.component.html | 17 +++-- .../advance-collection.component.ts | 53 +++++++--------- .../refund-record.component.html | 36 +++++++---- .../refund-record/refund-record.component.ts | 62 ++++++------------- 4 files changed, 75 insertions(+), 93 deletions(-) diff --git a/src/app/routes/financial-management/components/advance-collection/advance-collection.component.html b/src/app/routes/financial-management/components/advance-collection/advance-collection.component.html index 065f29b2..74618239 100644 --- a/src/app/routes/financial-management/components/advance-collection/advance-collection.component.html +++ b/src/app/routes/financial-management/components/advance-collection/advance-collection.component.html @@ -1,4 +1,4 @@ - + - - + +
+ +
+ + +
+
+
\ No newline at end of file diff --git a/src/app/routes/financial-management/components/advance-collection/advance-collection.component.ts b/src/app/routes/financial-management/components/advance-collection/advance-collection.component.ts index 1462a5cd..334c030e 100644 --- a/src/app/routes/financial-management/components/advance-collection/advance-collection.component.ts +++ b/src/app/routes/financial-management/components/advance-collection/advance-collection.component.ts @@ -2,26 +2,37 @@ import { Component, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; +import { SearchDrawerService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; +import { BasicTableComponent } from 'src/app/routes/commom'; import { FreightAccountService } from '../../services/freight-account.service'; @Component({ selector: 'app-advance-collection', templateUrl: './advance-collection.component.html', - styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less'] + styleUrls: ['../../../commom/less/commom-table.less'] }) -export class AdvanceCollectionComponent { +export class AdvanceCollectionComponent extends BasicTableComponent { @ViewChild('st', { static: true }) st!: STComponent; - @ViewChild('sf', { static: false }) - sf!: SFComponent; - searchSchema: SFSchema = this.initSF(); + schema: SFSchema = this.initSF(); columns: STColumn[] = this.initST(); - _$expand = false; - constructor(public service: FreightAccountService, private router: Router, private modal: NzModalService) {} + constructor( + public service: FreightAccountService, + private router: Router, + public searchDrawerService: SearchDrawerService + ) { + super(searchDrawerService); + } + + ngOnInit(): void {} + + search() { + this.st?.load(1); + } beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { @@ -30,24 +41,8 @@ export class AdvanceCollectionComponent { return requestOptions; }; - /** - * 重置表单 - */ - resetSF() { - this.sf.reset(); - this._$expand = false; - } - - /** - * 伸缩查询条件 - */ - expandToggle() { - this._$expand = !this._$expand; - this.sf?.setValue('/expand', this._$expand); - } - exportList() { - this.service.exportStart( { ...this.sf.value, pageSize: -1 }, this.service.$api_get_reportYskBla,); + this.service.exportStart({ ...this.sf.value, pageSize: -1 }, this.service.$api_get_reportYskBla); } private initSF(): SFSchema { @@ -97,10 +92,7 @@ export class AdvanceCollectionComponent { enum: [{ label: '全部', value: null }], ui: { widget: 'select', - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' }, default: null }, @@ -114,10 +106,7 @@ export class AdvanceCollectionComponent { ], ui: { widget: 'select', - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请选择' }, default: null } diff --git a/src/app/routes/financial-management/components/refund-record/refund-record.component.html b/src/app/routes/financial-management/components/refund-record/refund-record.component.html index 251eff68..463ab740 100644 --- a/src/app/routes/financial-management/components/refund-record/refund-record.component.html +++ b/src/app/routes/financial-management/components/refund-record/refund-record.component.html @@ -1,4 +1,4 @@ - + - - - - - - - - + +
+ + + + + + + + +
+ [loading]="false" [scroll]="{ x:'1200px',y:scrollY }"> {{ item.orderRefundCode }}
{{ item.refundStatusLabel }}
@@ -42,7 +47,7 @@ - {{ bill.paymentApplicationCode }}
+ {{ bill.paymentApplicationCode }}
@@ -54,6 +59,13 @@
+ +
+ + +
+
+
diff --git a/src/app/routes/financial-management/components/refund-record/refund-record.component.ts b/src/app/routes/financial-management/components/refund-record/refund-record.component.ts index 6074f36b..70569f0b 100644 --- a/src/app/routes/financial-management/components/refund-record/refund-record.component.ts +++ b/src/app/routes/financial-management/components/refund-record/refund-record.component.ts @@ -2,32 +2,40 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; +import { SearchDrawerService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; +import { BasicTableComponent } from 'src/app/routes/commom'; import { FreightAccountService } from '../../services/freight-account.service'; @Component({ selector: 'app-refund-record', templateUrl: './refund-record.component.html', - styleUrls: ['../../../commom/less/box.less'] + styleUrls: ['../../../commom/less/commom-table.less'] }) -export class RefundRecordComponent implements OnInit { +export class RefundRecordComponent extends BasicTableComponent implements OnInit { @ViewChild('st', { static: true }) st!: STComponent; - @ViewChild('sf', { static: false }) - sf!: SFComponent; @ViewChild('auditModal', { static: false }) auditModal!: any; columns: STColumn[] = this.initST(); - searchSchema: SFSchema = this.initSF(); + schema: SFSchema = this.initSF(); - _$expand = false; refundStatus: any = ''; msg = ''; - constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {} + constructor( + public service: FreightAccountService, + private nzModalService: NzModalService, + public searchDrawerService: SearchDrawerService + ) { + super(searchDrawerService); + } ngOnInit(): void {} + search() { + this.st?.load(1); + } beforeReq = (requestOptions: STRequestOptions) => { Object.assign(requestOptions.body, { refundStatus: this.refundStatus || null }); @@ -120,22 +128,6 @@ export class RefundRecordComponent implements OnInit { }); } - /** - * 重置表单 - */ - resetSF() { - this.sf.reset(); - this._$expand = false; - } - - /** - * 伸缩查询条件 - */ - expandToggle() { - this._$expand = !this._$expand; - this.sf?.setValue('/expand', this._$expand); - } - private initSF(): SFSchema { return { properties: { @@ -177,9 +169,6 @@ export class RefundRecordComponent implements OnInit { type: 'string', title: '订单号', ui: { - visibleIf: { - expand: (value: boolean) => value - }, placeholder: '请输入' } }, @@ -187,19 +176,13 @@ export class RefundRecordComponent implements OnInit { type: 'string', title: '所属项目', ui: { - placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请输入' } }, resourceCode: { type: 'string', title: '货源号', ui: { - visibleIf: { - expand: (value: boolean) => value - }, placeholder: '请输入' } }, @@ -210,9 +193,6 @@ export class RefundRecordComponent implements OnInit { widget: 'sl-from-to-search', format: 'yyyy-MM-dd', placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - }, nzShowTime: true } as SFDateWidgetSchema }, @@ -223,10 +203,7 @@ export class RefundRecordComponent implements OnInit { widget: 'select', placeholder: '请选择', allowClear: true, - asyncData: () => this.service.getNetworkFreightForwarder(), - visibleIf: { - expand: (value: boolean) => value - } + asyncData: () => this.service.getNetworkFreightForwarder() } }, bankType: { @@ -235,10 +212,7 @@ export class RefundRecordComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'bankname:type' }, - placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } + placeholder: '请输入' } } } From 636a725c08ecd0225a8a5d0ad87e37cc6389fa03 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 25 Apr 2022 19:58:39 +0800 Subject: [PATCH 49/80] fix bug --- .../rebate-setting/add/add.component.html | 12 ++++---- .../rebate-setting/add/add.component.ts | 30 +++++++++++++++++-- .../services/rebate-management.service.ts | 4 ++- 3 files changed, 36 insertions(+), 10 deletions(-) diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html index 08f89e5b..8aa67c55 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html @@ -4,11 +4,11 @@ * @Author : Shiming * @Date : 2022-02-24 20:09:49 * @LastEditors : Shiming - * @LastEditTime : 2022-04-24 13:42:10 + * @LastEditTime : 2022-04-25 19:58:03 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> - + @@ -51,7 +51,7 @@ - + 1 2 3 @@ -61,17 +61,17 @@ - - + -
+
{ + console.log(res); + if(res) { + this.configName = res?.configName; + this.accountingRate = res?.accountingRate; + this.accountingRate = res?.accountingRate; + this.configType = res?.configType + ''; + this.tabelData = res?.partnerRebateConfigLineVOList; + this.partnerType = res?.partnerType + ''; + this.partnerPeopleList = res?.partnerListVOs; + this.priority = res?.priority + ''; + this.formData = res?.ruleDescription; + } + }) + } changePartner(value: any) { console.log(value); if (value == '3') { diff --git a/src/app/routes/partner/rebate-management/services/rebate-management.service.ts b/src/app/routes/partner/rebate-management/services/rebate-management.service.ts index fd12644c..b67abe19 100644 --- a/src/app/routes/partner/rebate-management/services/rebate-management.service.ts +++ b/src/app/routes/partner/rebate-management/services/rebate-management.service.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-03-10 11:19:00 * @LastEditors : Shiming - * @LastEditTime : 2022-03-29 11:26:38 + * @LastEditTime : 2022-04-25 19:23:25 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\services\\rebate-management.service.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -27,6 +27,8 @@ export class RebateManagementService extends BaseService { // 运营端查询合伙人返佣 public $api_get_getIncomeByBillpage = '/api/bpc/partnerIncomeHead/getIncomeByBillpage'; + // 获取返佣模板信息 + public $api_get_getPartnerRebateConfigInfo = '/api/mdc/rebateConfig/getPartnerRebateConfigInfo';   // 查询合伙人信息-分页 public $api_get_partner_page = '/api/mdc/partner/list/page'; constructor(public injector: Injector) { From 5b1d5d7ea874eaceb2d509f5dce169b483391230 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 10:21:05 +0800 Subject: [PATCH 50/80] fix bug --- .../components/edit/edit.component.ts | 4 + .../components/list/list.component.html | 11 ++ .../components/list/list.component.ts | 34 ++++-- .../components/config/config.component.html | 106 +++++++----------- .../components/config/config.component.ts | 71 +++--------- .../role-management/edit/edit.component.ts | 2 +- .../role-management/menu/menu.component.ts | 50 ++------- 7 files changed, 106 insertions(+), 172 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 bd01de45..1ae908ee 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 @@ -34,6 +34,10 @@ export class ParterChannelSalesEditComponent implements OnInit { this.service.request(this.service.$api_getChannelSalesInfo, {id:this.i?.id}).subscribe(res => { if(res){ this.record = res; + + // this.sf.getProperty('/employeeVO')!.schema.enum = res; + // this.sf.getProperty('/employeeVO')!.widget.reset(res); + // this.sf.setValue('/employeeVO', this.enterpriseProjectIds); this.initSF(); } }); diff --git a/src/app/routes/partner/channel-sales/components/list/list.component.html b/src/app/routes/partner/channel-sales/components/list/list.component.html index 589c32e9..8b7dd971 100644 --- a/src/app/routes/partner/channel-sales/components/list/list.component.html +++ b/src/app/routes/partner/channel-sales/components/list/list.component.html @@ -1,3 +1,13 @@ + -

货主端配置

-

图片配置

- - - - - -
可输入字符
- -
-
-

短信配置

+

提现手续费配置

- -

配置用户端登陆页注册帐号、修改密码、修改手机号时的短信内容

- + +
+ 按照提现金额收取 + + + %手续费 + +
+
+ +
+ 按照提现金额收取 + + + %手续费 + +
-

通知配置

+

合伙人提现配置

-
- - - +
+ + + + + + +
-

客服电话配置

+

客服电话配置

@@ -84,10 +86,6 @@

通知配置

- - - -
@@ -146,42 +144,24 @@
- +
- - - + + + - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-
+
+ + + + + + + + + +
\ No newline at end of file diff --git a/src/app/routes/partner/system-config/components/config/config.component.ts b/src/app/routes/partner/system-config/components/config/config.component.ts index 27a32a88..b7489b98 100644 --- a/src/app/routes/partner/system-config/components/config/config.component.ts +++ b/src/app/routes/partner/system-config/components/config/config.component.ts @@ -4,7 +4,7 @@ import { Observable, Observer } from 'rxjs'; import { ConfigService } from '../../services/config.service'; @Component({ - selector: 'app-config', + selector: 'app-parterl-config', templateUrl: './config.component.html', styleUrls: ['./config.component.less'] }) @@ -15,12 +15,17 @@ export class PartnerSystemConfigComponent implements OnInit { isEveryDay: false, isEveryWeek: false }; + personValue!: number; + enterpriseValue!: number; + auditValue!: number; + auditTime!: any; + auditTimeStatus: boolean = false tabs = [ { - name: '货主端配置' + name: '基础配置' }, { - name: '司机端配置' + name: '分享配置' } ]; selectedTab = 0; @@ -37,7 +42,6 @@ export class PartnerSystemConfigComponent implements OnInit { i: any; schema!: SFSchema; - schema2!: SFSchema; imageConfig = { widget: 'upload', @@ -64,61 +68,8 @@ export class PartnerSystemConfigComponent implements OnInit { } initSF() { + this.schema = { - properties: { - sysMinLogo: { - type: 'string', - title: '系统LOGO(大)', - // enum: [], - ui: { - ...this.imageConfig, - descriptionI18n: '大尺寸logo,支持JPG、PNG格式,文件小于2M(建议尺寸300*170px)。', - change: args => { - if (args.type === 'success') { - const avatar = this.getImageModel(args, 'sysMinLogo'); - this.sf?.setValue('/sysMinLogo', avatar); - this.i.sysMinLogo = avatar; - } - }, - beforeUpload: this.uploadBefore - } as SFUploadWidgetSchema - }, - sysMaxLogo: { - type: 'string', - title: '用户默认头像', - ui: { - ...this.imageConfig, - descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸60*60px)。', - change: args => { - if (args.type === 'success') { - const avatar = this.getImageModel(args, -1); - this.sf?.setValue('/sysMaxLogo', avatar); - this.i.sysMaxLogo = avatar; - } - }, - beforeUpload: this.uploadBefore - } as SFUploadWidgetSchema - }, - sysMaxLogo1: { - type: 'string', - title: '用户默认头像', - ui: { - ...this.imageConfig, - descriptionI18n: '支持JPG、PNG格式,文件小于5M(建议尺寸375*773px)。', - change: args => { - if (args.type === 'success') { - const avatar = this.getImageModel(args, -1); - this.sf?.setValue('/sysMaxLogo1', avatar); - this.i.sysMaxLogo1 = avatar; - } - }, - beforeUpload: this.uploadBefore - } as SFUploadWidgetSchema - }, - }, - required: ['sysMinLogo', 'sysMaxLogo', 'sysMaxLogo1'] - }; - this.schema2 = { properties: { sysMinLogo: { type: 'string', @@ -221,7 +172,11 @@ export class PartnerSystemConfigComponent implements OnInit { required: ['sysMinLogo', 'sysMaxLogo', 'sysMaxLogo1', 'sysMaxLogo2', 'sysMaxLogo3', 'sysMaxLogo4'] }; } + auditTimeChange(ss: any,value: any) { + console.log(value); + this.auditTimeStatus = true + } private uploadBefore = (file: any, fileList: any) => { return new Observable((observer: Observer) => { const isLt1M = file.size / 1024 / 1024 < 2; diff --git a/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts b/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts index b91344a8..9d00f002 100644 --- a/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts +++ b/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts @@ -83,7 +83,7 @@ console.log(this.params.infoUrl) close() { this.modal.destroy(); } - changeIF(value: boolean) { + changeIF(value: any) { console.log(value); console.log('54545'); this.changeValue = true diff --git a/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts b/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts index 8b031d24..4f6c67a5 100644 --- a/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts +++ b/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core'; -import { ModalHelper, _HttpClient } from '@delon/theme'; +import { _HttpClient } from '@delon/theme'; import { EAEnvironmentService } from '@shared'; import { NzTreeComponent } from 'ng-zorro-antd/tree'; import { SystemService } from '../../../services/system.service'; @@ -19,7 +19,6 @@ export class SettingMenuComponent implements OnInit, OnChanges { defaultCheckedKeys: any[] = []; functionList: any[] = []; allChecked = false; - changeIFT = false; indeterminate = true; @Input() type = 'edit'; @Input() source = ''; @@ -27,7 +26,6 @@ export class SettingMenuComponent implements OnInit, OnChanges { @Input() isAuthorityIdDTOList: any[] = []; @Input() authorityAssistId: any[] = []; @Input() roleId: any; - @Output() changeIF= new EventEmitter(); @Output() changeData = new EventEmitter(); constructor(public service: SystemService, private cdr: ChangeDetectorRef, private envSrv: EAEnvironmentService) {} ngOnChanges(changes: SimpleChanges): void { @@ -36,9 +34,9 @@ export class SettingMenuComponent implements OnInit, OnChanges { this.authority = this.isAuthorityIdDTOList || []; } } - if (changes.authorityAssistId) { - this.defaultCheckedKeys = [...this.authorityAssistId]; - } + // if (changes.authorityAssistId) { + // this.defaultCheckedKeys = [...this.authorityAssistId]; + // } } ngOnInit() { @@ -59,44 +57,25 @@ export class SettingMenuComponent implements OnInit, OnChanges { }); } addAuthority(origin: { id: any; all: any }, node: { buttonInfoList: any[] }, item?: { checked: any; functionButtonId: any }) { - console.log(origin); + console.log(origin,node); if (this.authority?.length && this.authority.filter(authItem => authItem.authorityId === origin.id).length) { // 判断此菜单权限是否已经存在权限列表中 // 当前操作菜单id存在权限列表里 this.authority.forEach(menuItem => { + console.log(menuItem); + console.log(item); if (menuItem.authorityId === origin.id) { menuItem.buttonAuthorityIds = menuItem.buttonAuthorityIds || []; // 防止属性不存在,给属性指定数据类型 if (item) { - this.changeIF.emit(true); - this.changeIFT = true - // 判断此菜单下是否已有此按钮权限 - // this.againGetBtn(id, origin); - const params = { - id: origin.id - }; - this.service.request(this.service.$api_getFunctionButtonInfo, params).subscribe(res => { - if (res) { - let origins: any = {}; - origins.buttonInfoList = res; - origins.all = false; - console.log(origins); - - // 判断此菜单下是否已有此按钮权限 - this.againGetBtn(origin.id, origins); - } - }); // 单选 if (item.checked) { if (menuItem.buttonAuthorityIds.indexOf(item.functionButtonId) === -1) { // 如果该按钮在数据权限数组中不存在 - console.log('不存在'); - menuItem.buttonAuthorityIds.push(item.functionButtonId); } } else { - console.log('存在'); if (menuItem.buttonAuthorityIds && menuItem.buttonAuthorityIds.length) { menuItem.buttonAuthorityIds.forEach((btnItem: any, index: any) => { if (btnItem === item.functionButtonId) { @@ -347,20 +326,9 @@ export class SettingMenuComponent implements OnInit, OnChanges { } // 再次请求,需要判断暂存权限数组是否已有此权限 againGetBtn(id: any, origin: any) { - console.log(id,origin); - - console.log(this.authority); - console.log(this.authority.length); - - if ((this.authority && this.authority.length !== 0)) { - console.log('1111'); - + if (this.authority && this.authority.length === 0) { const buttonAuthorityIds: any = []; - console.log(origin); - console.log(origin.checked); - if (origin.checked) { - origin.buttonInfoList.forEach((btnItem: { functionButtonId: any; checked: boolean }) => { btnItem.checked = true; buttonAuthorityIds.push(btnItem.functionButtonId); @@ -368,8 +336,6 @@ export class SettingMenuComponent implements OnInit, OnChanges { this.authority.push({ authorityId: origin.key, buttonAuthorityIds, isUpdateAuthority: 1 }); } } else { - console.log('22222'); - if (origin.checked) { //菜单勾选情况下 if (this.authority.some(item => item.authorityId === id)) { From a8a1d9ed65cc4d66d084d0a34703b310fbe92f70 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 10:59:33 +0800 Subject: [PATCH 51/80] fix bug --- .../components/edit/edit.component.ts | 23 +++++++++++++------ .../components/list/list.component.ts | 1 + .../rebate-setting/add/add.component.html | 18 +++++++-------- .../rebate-setting/add/add.component.ts | 8 +++++-- 4 files changed, 32 insertions(+), 18 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 1ae908ee..bd12ea3a 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 @@ -33,16 +33,25 @@ export class ParterChannelSalesEditComponent implements OnInit { if(!this.sts) { this.service.request(this.service.$api_getChannelSalesInfo, {id:this.i?.id}).subscribe(res => { if(res){ - this.record = res; - - // this.sf.getProperty('/employeeVO')!.schema.enum = res; - // this.sf.getProperty('/employeeVO')!.widget.reset(res); - // this.sf.setValue('/employeeVO', this.enterpriseProjectIds); - this.initSF(); + let value1 = Object.assign({}, res) + delete value1.employeeVO; + this.record = value1; + console.log(value1); + console.log(this.record); + + let value = res.employeeVO; + let yeeVO = {label: value.empName+"/"+value.empNo, value: value.empNo} + console.log(yeeVO); + + setTimeout(()=>{ + this.sf.getProperty('/employeeVO')!.schema.enum = [yeeVO]; + this.sf.getProperty('/employeeVO')!.widget.reset([yeeVO]); + }) + + this.initSF(); } }); } - this.initSF(); } initSF() { diff --git a/src/app/routes/partner/channel-sales/components/list/list.component.ts b/src/app/routes/partner/channel-sales/components/list/list.component.ts index 2a5a8db1..88b791a4 100644 --- a/src/app/routes/partner/channel-sales/components/list/list.component.ts +++ b/src/app/routes/partner/channel-sales/components/list/list.component.ts @@ -122,6 +122,7 @@ export class ParterChannelSalesListComponent implements OnInit { title: '操作', className: 'text-center', width: '120px', + fixed: 'right', buttons: [ { text: '编辑', diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html index 8aa67c55..0482f6e6 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-02-24 20:09:49 * @LastEditors : Shiming - * @LastEditTime : 2022-04-25 19:58:03 + * @LastEditTime : 2022-04-26 10:53:50 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -12,16 +12,16 @@ - + 固定结算费率配置 -  % +  % 业务量和管理费比例配置 - + @@ -36,7 +36,7 @@ 关联合伙人配置 - + @@ -51,7 +51,7 @@ - + 1 2 3 @@ -60,13 +60,13 @@ - - + - + diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts index d85611c3..71097915 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-03-21 09:26:45 * @LastEditors : Shiming - * @LastEditTime : 2022-04-25 19:56:41 + * @LastEditTime : 2022-04-26 10:58:58 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -67,6 +67,7 @@ export class ParterRebateManageMentAddComponent implements OnInit { { text: '移除', click: _record => this.delete(_record), + iif: ()=> this.hiden, acl: { ability: ['AbnormalAppear-reply'] } } ] @@ -78,7 +79,9 @@ export class ParterRebateManageMentAddComponent implements OnInit { ruleDescription: { type: 'string', title: '', + disabled: this.hiden, ui: { + widget: 'tinymce', loadingTip: 'loading...', config: { @@ -176,7 +179,8 @@ export class ParterRebateManageMentAddComponent implements OnInit { this.partnerType = res?.partnerType + ''; this.partnerPeopleList = res?.partnerListVOs; this.priority = res?.priority + ''; - this.formData = res?.ruleDescription; + this.formData = {ruleDescription: res?.ruleDescription}; + this.remarke = res.remark; } }) } From 019dd90757d63e3fc0818e3fe4ba3fc0fa42ba1d Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 11:06:31 +0800 Subject: [PATCH 52/80] fix bug --- .../rebate-setting/add/add.component.ts | 56 ++++++++++--------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts index 71097915..01389bd2 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-03-21 09:26:45 * @LastEditors : Shiming - * @LastEditTime : 2022-04-26 10:58:58 + * @LastEditTime : 2022-04-26 11:06:25 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -49,30 +49,7 @@ export class ParterRebateManageMentAddComponent implements OnInit { private modal: NzModalService, public shipperservice: ShipperBaseService ) {} - columns: STColumn[] = [ - { - title: '合伙人名称', - index: 'enterpriseName', - width: 180, - format: item => (item.partnerType ? `${item.enterpriseName || item.contactName}` : '') - }, - { title: '联系人', index: 'contactName', width: 150, format: item => (item.partnerType ? `${item.contactName}` : '') }, - { title: '手机号', index: 'contactMobile', className: 'text-center', width: 150 }, - { title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } }, - { - title: '操作', - width: '90px', - fixed: 'right', - buttons: [ - { - text: '移除', - click: _record => this.delete(_record), - iif: ()=> this.hiden, - acl: { ability: ['AbnormalAppear-reply'] } - } - ] - } - ]; + columns: STColumn[] =[] initSF(data?: any) { this.schema1 = { properties: { @@ -92,13 +69,40 @@ export class ParterRebateManageMentAddComponent implements OnInit { } } }; + this.columns= [ + { + title: '合伙人名称', + index: 'enterpriseName', + width: 180, + format: item => (item.partnerType ? `${item.enterpriseName || item.contactName}` : '') + }, + { title: '联系人', index: 'contactName', width: 150, format: item => (item.partnerType ? `${item.contactName}` : '') }, + { title: '手机号', index: 'contactMobile', className: 'text-center', width: 150 }, + { title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } }, + { + title: '操作', + width: '120px', + fixed: 'right', + buttons: [ + { + text: '移除', + click: _record => this.delete(_record), + iif: ()=> { + console.log(this.hiden); + return !this.hiden + }, + acl: { ability: ['AbnormalAppear-reply'] } + } + ] + } + ]; } ngOnInit() { console.log(this.ar.snapshot.queryParams.id); if(this.ar.snapshot?.queryParams?.id) { this.titleText= '查看' this.hiden= true - + this.initSF(); this.initData(this.ar.snapshot?.queryParams?.id); } this.addStatus = false; From 5cddd9a9566a06364d0915856664b3ecc1f6b681 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 11:07:18 +0800 Subject: [PATCH 53/80] fix bug --- .../components/rebate-setting/add/add.component.ts | 4 ++-- .../components/rebate-setting/rebate-setting.component.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts index 01389bd2..bddf0dca 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-03-21 09:26:45 * @LastEditors : Shiming - * @LastEditTime : 2022-04-26 11:06:25 + * @LastEditTime : 2022-04-26 11:04:46 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -81,7 +81,7 @@ export class ParterRebateManageMentAddComponent implements OnInit { { title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } }, { title: '操作', - width: '120px', + width: '90px', fixed: 'right', buttons: [ { diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts index 5e7828bc..49a1d8d0 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts @@ -120,7 +120,7 @@ export class ParterRebateManageMentSettingComponent implements OnInit { { title: '操作', fixed: 'right', - width: '90px', + width: '120px', className: 'text-left', buttons: [ { From 3b331b81f84d28ac8e7f3afed19a8d06908ddbf2 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 26 Apr 2022 13:27:09 +0800 Subject: [PATCH 54/80] edit --- .../platform-account-detail.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/routes/financial-management/components/platform-account/platform-account-detail/platform-account-detail.component.ts b/src/app/routes/financial-management/components/platform-account/platform-account-detail/platform-account-detail.component.ts index 43e46e5b..d2e4b20c 100644 --- a/src/app/routes/financial-management/components/platform-account/platform-account-detail/platform-account-detail.component.ts +++ b/src/app/routes/financial-management/components/platform-account/platform-account-detail/platform-account-detail.component.ts @@ -119,7 +119,7 @@ export class PlatformAccountDetailComponent implements OnInit { nzShowTime: true } as SFDateWidgetSchema }, - businessNumber: { + channelPaySn: { type: 'string', title: '流水号', ui: { From e40860dd6019eb008f9392977c45cac9edd2ba4b Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 13:46:53 +0800 Subject: [PATCH 55/80] fix bug --- .../components/edit/edit.component.ts | 161 ++++++++++++------ .../add-etp-partner.component.ts | 24 +-- .../add-personal-partner.component.ts | 42 ++--- 3 files changed, 121 insertions(+), 106 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 bd12ea3a..b5891ac0 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 @@ -1,8 +1,19 @@ import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { SFAutoCompleteWidgetSchema, SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; +import { + SFAutoCompleteWidgetSchema, + SFComponent, + SFRadioWidgetSchema, + SFSchema, + SFSchemaEnum, + SFSchemaEnumType, + SFSelectWidgetSchema, + SFTextareaWidgetSchema, + SFUISchema +} from '@delon/form'; import { _HttpClient } from '@delon/theme'; import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; +import { of } from 'rxjs'; import { map } from 'rxjs/operators'; import { AmapPoiPickerComponent } from 'src/app/shared/components/amap'; import { ChannelSalesService } from '../../services/channel-sales.service'; @@ -18,8 +29,8 @@ export class ParterChannelSalesEditComponent implements OnInit { i: any; sts: any; type: any; - record:any; - currentOAItem:any; + record: any; + currentOAItem: any; constructor( public http: _HttpClient, private cdr: ChangeDetectorRef, @@ -30,29 +41,39 @@ export class ParterChannelSalesEditComponent implements OnInit { ) {} ngOnInit(): void { - if(!this.sts) { - this.service.request(this.service.$api_getChannelSalesInfo, {id:this.i?.id}).subscribe(res => { - if(res){ - let value1 = Object.assign({}, res) - delete value1.employeeVO; - this.record = value1; - console.log(value1); - console.log(this.record); - - let value = res.employeeVO; - let yeeVO = {label: value.empName+"/"+value.empNo, value: value.empNo} - console.log(yeeVO); - - setTimeout(()=>{ - this.sf.getProperty('/employeeVO')!.schema.enum = [yeeVO]; - this.sf.getProperty('/employeeVO')!.widget.reset([yeeVO]); - }) - - this.initSF(); + this.initSF(); + if (!this.sts) { + this.service.request(this.service.$api_getChannelSalesInfo, { id: this.i?.id }).subscribe(res => { + const List: any = []; + if (res) { + let value1 = Object.assign({}, res); + delete value1.employeeVO; + console.log(value1); + console.log(this.record); + + let value = res.employeeVO; + console.log(value); + + List.push({ label: value.empName + '/' + value.empNo, value: value.empNo }); + console.log(List); + + 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.record = value1; } }); } - } initSF() { this.schema = { @@ -67,34 +88,67 @@ export class ParterChannelSalesEditComponent implements OnInit { type: 'string', maxLength: 12, ui: { - placeholder:'请输入' - } + placeholder: '请输入' + } }, phoneNumber: { title: '手机号', type: 'string', maxLength: 11, ui: { - placeholder:'请输入' - } + placeholder: '请输入' + } }, + // employeeVO: { + // title: '关联OA员工', + // type: 'string', + // ui: { + // widget: 'select', + // placeholder:'请选择', + // asyncData: (input:string) => this.service.request(this.service.$api_fuzzyQuery,{name:input}).pipe( + // map((res: any) => { + // return res.map((item:any)=>{ + // return {label: item.empName+"/"+item.empNo, value: item.empNo, obj: item} + // }) + // }) + // ), + // change:(item:any, org:any)=>{ + // this.currentOAItem = org.obj; + // } + // } as SFAutoCompleteWidgetSchema, + // }, employeeVO: { title: '关联OA员工', type: 'string', + maxLength: 30, ui: { - widget: 'autocomplete', - placeholder:'请选择', - asyncData: (input:string) => this.service.request(this.service.$api_fuzzyQuery,{name:input}).pipe( - map((res: any) => { - return res.map((item:any)=>{ - return {label: item.empName+"/"+item.empNo, value: item.empNo, obj: item} - }) - }) - ), - change:(item:any, org:any)=>{ + widget: 'select', + // serverSearch: true, + allowClear: true, + searchDebounceTime: 300, + searchLoadingText: '搜索中...', + onSearch: (q: any) => { + let str = q?.replace(/^\s+|\s+$/g, ''); + if (str) { + return this.service + .request(this.service.$api_fuzzyQuery, { name: str }) + .pipe(map(res => (res as any[]).map(i => ({ label: i.empName + '/' + i.empNo, value: i.empNo, obj: i } as SFSchemaEnum)))) + .toPromise(); + } else { + return of([]); + } + }, + // asyncData: (input:string) => this.service.request(this.service.$api_fuzzyQuery,{name:input}).pipe( + // map((res: any) => { + // return res.map((item:any)=>{ + // return {label: item.empName+"/"+item.empNo, value: item.empNo, obj: item} + // }) + // }) + // ), + change: (item: any, org: any) => { this.currentOAItem = org.obj; } - } as SFAutoCompleteWidgetSchema, + } as SFSelectWidgetSchema }, isAuthorization: { type: 'string', @@ -104,9 +158,9 @@ export class ParterChannelSalesEditComponent implements OnInit { { label: '是', value: '1' } ], ui: { - widget: 'radio', + widget: 'radio' } as SFRadioWidgetSchema, - default: '0', + default: '0' }, roleIds: { title: '', @@ -128,7 +182,7 @@ export class ParterChannelSalesEditComponent implements OnInit { ); }, visibleIf: { isAuthorization: (value: string) => value === '1' } - }, + } }, remark: { type: 'string', @@ -137,9 +191,9 @@ export class ParterChannelSalesEditComponent implements OnInit { ui: { widget: 'textarea', autosize: { minRows: 3, maxRows: 6 }, - placeholder:'请输入50字符' - } as SFTextareaWidgetSchema, - }, + placeholder: '请输入50字符' + } as SFTextareaWidgetSchema + } }, required: ['name', 'phoneNumber', 'employeeVO', 'roleIds', 'remark'] }; @@ -148,24 +202,25 @@ export class ParterChannelSalesEditComponent implements OnInit { spanLabelFixed: 150, grid: { span: 24 } }, - $isAuthorization:{ grid: { span: 12 }}, - $roleIds:{ spanLabelFixed: 10, grid: { span: 12 }}, - - + $isAuthorization: { grid: { span: 12 } }, + $roleIds: { spanLabelFixed: 10, grid: { span: 12 } } }; } close() { this.modalRef.destroy(); } - save() { + save() { this.sf.validator({ emitError: true }); - if(!this.sf.valid) return; - this.service.request(this.service.$api_save, { ...this.sf.value, employeeVO: this.currentOAItem}).subscribe(res => { + if (!this.sf.valid) return; + let params = { + ...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); this.modalRef.destroy(true); - } else { - this.service.msgSrv.error(res.msg); } }); } diff --git a/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.ts b/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.ts index 14efa97f..2ccfeb94 100644 --- a/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.ts +++ b/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.ts @@ -617,15 +617,8 @@ export class AddEtpPartnerComponent { } private setInfo(info: any) { - if (info.name) { this.sf.setValue('/adminUserInfo/name', info.name); - } - if (info.certificatePhotoFront) { this.sf.setValue('/adminUserInfo/certificatePhotoFront', info.certificatePhotoFront); - } - if (info.certificatePhotoFrontWatermark) { - console.log(this.sf.getProperty('/adminUserInfo/certificatePhotoFrontWatermark')); - this.sf.setValue('/adminUserInfo/certificatePhotoFrontWatermark', [ { uid: -1, @@ -635,11 +628,7 @@ export class AddEtpPartnerComponent { response: info.certificatePhotoFrontWatermark } ]); - } - if (info.certificatePhotoBack) { this.sf.setValue('/adminUserInfo/certificatePhotoBack', info.certificatePhotoBack); - } - if (info.certificatePhotoBackWatermark) { this.sf.setValue('/adminUserInfo/certificatePhotoBackWatermark', [ { uid: -1, @@ -649,18 +638,9 @@ export class AddEtpPartnerComponent { response: info.certificatePhotoBackWatermark } ]); - } - if (info.certificateNumber) { this.sf.setValue('/adminUserInfo/certificateNumber', info.certificateNumber); - } - if (info.validStartTime) { this.sf.setValue('/adminUserInfo/validStartTime', info.validStartTime); - } - if (info.validEndTime) { - this.sf.setValue('/adminUserInfo/validEndTime', info.validEndTime); - this.sf.setValue('/adminUserInfo/_isLoingDate', false); - } else { - this.sf.setValue('/adminUserInfo/_isLoingDate', true); - } + this.sf.setValue('/adminUserInfo/validEndTime', info?.validEndTime ? info?.validEndTime: null); + this.sf.setValue('/adminUserInfo/_isLoingDate', info?.validEndTime ? false: true); } } diff --git a/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.ts b/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.ts index d21416e3..c18550ef 100644 --- a/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.ts +++ b/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.ts @@ -339,50 +339,30 @@ export class AddPersonalPartnerComponent { } private setInfo(info: any) { - if (info.name) { - this.sf.setValue('/adminUserInfo/name', info.name); - } - if (info.certificatePhotoFront) { - this.sf.setValue('/adminUserInfo/certificatePhotoFront', info.certificatePhotoFront); - } - if (info.certificatePhotoFrontWatermark) { - console.log(this.sf.getProperty('/adminUserInfo/certificatePhotoFrontWatermark')); - + this.sf.setValue('/adminUserInfo/name', info?.name); + this.sf.setValue('/adminUserInfo/certificatePhotoFront', info?.certificatePhotoFront); this.sf.setValue('/adminUserInfo/certificatePhotoFrontWatermark', [ { uid: -1, name: '文件', status: 'done', - url: info.certificatePhotoFrontWatermark, - response: info.certificatePhotoFrontWatermark + url: info?.certificatePhotoFrontWatermark, + response: info?.certificatePhotoFrontWatermark } ]); - } - if (info.certificatePhotoBack) { - this.sf.setValue('/adminUserInfo/certificatePhotoBack', info.certificatePhotoBack); - } - if (info.certificatePhotoBackWatermark) { + this.sf.setValue('/adminUserInfo/certificatePhotoBack', info?.certificatePhotoBack); this.sf.setValue('/adminUserInfo/certificatePhotoBackWatermark', [ { uid: -1, name: '文件', status: 'done', - url: info.certificatePhotoBackWatermark, - response: info.certificatePhotoBackWatermark + url: info?.certificatePhotoBackWatermark, + response: info?.certificatePhotoBackWatermark } ]); - } - if (info.certificateNumber) { - this.sf.setValue('/adminUserInfo/certificateNumber', info.certificateNumber); - } - if (info.validStartTime) { - this.sf.setValue('/adminUserInfo/validStartTime', info.validStartTime); - } - if (info.validEndTime) { - this.sf.setValue('/adminUserInfo/validEndTime', info.validEndTime); - this.sf.setValue('/adminUserInfo/_isLoingDate', false); - } else { - this.sf.setValue('/adminUserInfo/_isLoingDate', true); - } + this.sf.setValue('/adminUserInfo/certificateNumber', info?.certificateNumber); + this.sf.setValue('/adminUserInfo/validStartTime', info?.validStartTime); + this.sf.setValue('/adminUserInfo/validEndTime', info?.validEndTime ? info?.validEndTime: null); + this.sf.setValue('/adminUserInfo/_isLoingDate', info?.validEndTime ? false: true); } } From 47a5dfedad1d4db072db281ac1dfbae8578c704f Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 14:05:17 +0800 Subject: [PATCH 56/80] fix bug --- .../components/edit/edit.component.ts | 36 ++++++++----------- .../rebate-setting/add/add.component.html | 4 +-- 2 files changed, 17 insertions(+), 23 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 b5891ac0..c563ff9b 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 @@ -48,28 +48,21 @@ export class ParterChannelSalesEditComponent implements OnInit { if (res) { let value1 = Object.assign({}, res); delete value1.employeeVO; - console.log(value1); - console.log(this.record); - let value = res.employeeVO; - console.log(value); - List.push({ label: value.empName + '/' + value.empNo, value: value.empNo }); - console.log(List); + setTimeout(() => { + if (this.sf) { + console.log(this.sf.getProperty('/employeeVO')!.schema); - 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); + } + if (value.empNo) { + this.sf.setValue('/employeeVO', value.empNo); + this.currentOAItem = value; + this.sf.setValue('/phoneNumber', res.telephone); + } + }) this.record = value1; } }); @@ -212,9 +205,10 @@ export class ParterChannelSalesEditComponent implements OnInit { } save() { this.sf.validator({ emitError: true }); + if (!this.sf.valid) return; - let params = { - ...this.sf.value + let params: any= { + ...this.sf.value, } delete params.telephone this.service.request(this.service.$api_save, { ...params, employeeVO: this.currentOAItem }).subscribe(res => { diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html index 0482f6e6..f0be7aff 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-02-24 20:09:49 * @LastEditors : Shiming - * @LastEditTime : 2022-04-26 10:53:50 + * @LastEditTime : 2022-04-26 14:04:41 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -61,7 +61,7 @@ - From dcbbf3cc890b8bee88cdef9061c2662765c41dec Mon Sep 17 00:00:00 2001 From: "xiaoxing.liu" Date: Tue, 26 Apr 2022 15:03:55 +0800 Subject: [PATCH 57/80] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../freight/list/list.component.html | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 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 0adfbf1d..f62797c1 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.html +++ b/src/app/routes/usercenter/components/freight/list/list.component.html @@ -1,5 +1,5 @@ @@ -58,11 +58,13 @@ {{ item.contacter }}
/{{item.mobile}}
- {{ item.partnerName }}
/{{item.promotersTelephone}} + {{ item.partnerName }}
/{{item.partnerMobile}}
- {{ item.promotersTelephone - || '添加' }} + + {{ item.channelName }}
{{ item.channelMobile }}
@@ -78,7 +80,9 @@
- - + +
-
\ No newline at end of file + From 1af572081d6a1c6de063276a94455a8d0a8e6a18 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 15:32:55 +0800 Subject: [PATCH 58/80] fix bug --- .../components/config/config.component.html | 362 ++++++++++-------- .../components/config/config.component.ts | 17 +- .../freight/list/detail/detail.component.html | 2 +- .../freight/list/detail/detail.component.ts | 6 +- 4 files changed, 215 insertions(+), 172 deletions(-) diff --git a/src/app/routes/partner/system-config/components/config/config.component.html b/src/app/routes/partner/system-config/components/config/config.component.html index 27c06f58..394af73c 100644 --- a/src/app/routes/partner/system-config/components/config/config.component.html +++ b/src/app/routes/partner/system-config/components/config/config.component.html @@ -1,167 +1,205 @@ -
-
-
    -
  • - {{ item.name }} -
  • -
-
- -
- -

提现手续费配置

-
-
- -
- 按照提现金额收取 - - - %手续费 - -
-
- -
- 按照提现金额收取 - - - %手续费 - -
-
-
-
-

合伙人提现配置

-
-
- - - - - - - - -
-
-

客服电话配置

-
-
- - - -
-
-
- - -

司机端配置

-

图片配置

- - - - - -
可输入字符
- -
-
-

短信配置

-
-
- -

配置用户端登陆页注册帐号、修改密码、修改手机号时的短信内容

- -
-
-
-

通知配置

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-

客服电话配置

-
-
- - - -
-
-

证件提醒配置

-
-
- - 距离到期时间 - - 天开始提醒,每隔 - - 天提醒一次 - -
-
-
- -
- - -
-
+
+
+
    +
  • + {{ item.name }} +
  • +
+ +
+ +

提现手续费配置

+
+
+ +
+ 按照提现金额收取 + + %手续费 +
+
+ +
+ 按照提现金额收取 + + %手续费 +
+
+
+
+

合伙人提现配置

+
+
+ + + + + + + +
+ + + + +
+
+
+ +
+
+
+

客服电话配置

+
+
+ + + +
+
+
+ + +

司机端配置

+

图片配置

+ + + + +
可输入字符
+ +
+
+

短信配置

+
+
+ +

配置用户端登陆页注册帐号、修改密码、修改手机号时的短信内容

+ +
+
+
+

通知配置

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+

客服电话配置

+
+
+ + + +
+
+

证件提醒配置

+
+
+ + 距离到期时间 + + 天开始提醒,每隔 + + 天提醒一次 + +
+
+
+ +
+ + +
+
+
- -
- - - - - - -
- - - - - - - - - + + +
+
+ + + +
+ -- +
+
+ -- +
+
+ +
+ + +
diff --git a/src/app/routes/partner/system-config/components/config/config.component.ts b/src/app/routes/partner/system-config/components/config/config.component.ts index b7489b98..3ee76370 100644 --- a/src/app/routes/partner/system-config/components/config/config.component.ts +++ b/src/app/routes/partner/system-config/components/config/config.component.ts @@ -20,6 +20,9 @@ export class PartnerSystemConfigComponent implements OnInit { auditValue!: number; auditTime!: any; auditTimeStatus: boolean = false + everyDay: boolean = false + time: Date | null = null; + defaultOpenValue = new Date(0, 0, 0, 0, 0, 0); tabs = [ { name: '基础配置' @@ -172,11 +175,6 @@ export class PartnerSystemConfigComponent implements OnInit { required: ['sysMinLogo', 'sysMaxLogo', 'sysMaxLogo1', 'sysMaxLogo2', 'sysMaxLogo3', 'sysMaxLogo4'] }; } - auditTimeChange(ss: any,value: any) { - console.log(value); - this.auditTimeStatus = true - - } private uploadBefore = (file: any, fileList: any) => { return new Observable((observer: Observer) => { const isLt1M = file.size / 1024 / 1024 < 2; @@ -196,7 +194,14 @@ export class PartnerSystemConfigComponent implements OnInit { observer.complete(); }); }; - + changeAuto(value: any) { + console.log(value); + if(value == '2') { + this.auditTimeStatus = true + } else { + this.auditTimeStatus = false + } + } private getImageModel(args: any, key: any) { return [ { diff --git a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html index 5f8491e0..42599f9b 100644 --- a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html +++ b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html @@ -422,7 +422,7 @@ {{ item.remark diff --git a/src/app/routes/usercenter/components/freight/list/detail/detail.component.ts b/src/app/routes/usercenter/components/freight/list/detail/detail.component.ts index 5a2dbc89..bd066e42 100644 --- a/src/app/routes/usercenter/components/freight/list/detail/detail.component.ts +++ b/src/app/routes/usercenter/components/freight/list/detail/detail.component.ts @@ -144,9 +144,9 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { }, className: 'text-center' }, - { title: '修改时间', render: 'mybidDetailInfo', className: 'text-center' }, - { title: '生效时间', index: 'eeffectiveTime', className: 'text-center' }, - { title: '操作人', index: 'approvalUser', className: 'text-center' } + { title: '修改时间', index: 'modifyTime', className: 'text-center' }, + { title: '生效时间', index: 'effectiveTime', className: 'text-center' }, + { title: '操作人', index: 'modifyUserId', className: 'text-center' } ]; } loadPartnerInfo(){ From d9dff2cbf7b673944143568c16fa6c488cadd6ce Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 26 Apr 2022 15:33:01 +0800 Subject: [PATCH 59/80] edit --- proxy.conf.js | 2 +- .../api-auth-modal.component.html | 15 +++ .../api-auth-modal.component.less | 17 +++ .../api-auth-modal.component.ts | 85 +++++++++++++++ .../organization-management.component.html | 51 +++++++++ .../organization-management.component.less | 17 +++ .../organization-management.component.ts | 96 ++++++++++++++++ .../organization-modal.component.html | 14 +++ .../organization-modal.component.less | 21 ++++ .../organization-modal.component.ts | 103 ++++++++++++++++++ .../role-management/menu/menu.component.html | 3 +- .../role-management/menu/menu.component.ts | 11 +- .../sys-setting/services/system.service.ts | 49 +++++++++ .../sys-setting/sys-setting-routing.module.ts | 2 + .../routes/sys-setting/sys-setting.module.ts | 11 +- 15 files changed, 487 insertions(+), 10 deletions(-) create mode 100644 src/app/routes/sys-setting/components/organization-management/api-auth-modal/api-auth-modal.component.html create mode 100644 src/app/routes/sys-setting/components/organization-management/api-auth-modal/api-auth-modal.component.less create mode 100644 src/app/routes/sys-setting/components/organization-management/api-auth-modal/api-auth-modal.component.ts create mode 100644 src/app/routes/sys-setting/components/organization-management/organization-management.component.html create mode 100644 src/app/routes/sys-setting/components/organization-management/organization-management.component.less create mode 100644 src/app/routes/sys-setting/components/organization-management/organization-management.component.ts create mode 100644 src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.html create mode 100644 src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.less create mode 100644 src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.ts diff --git a/proxy.conf.js b/proxy.conf.js index d9d60dfc..ff162fda 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -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/sys-setting/components/organization-management/api-auth-modal/api-auth-modal.component.html b/src/app/routes/sys-setting/components/organization-management/api-auth-modal/api-auth-modal.component.html new file mode 100644 index 00000000..1ac66921 --- /dev/null +++ b/src/app/routes/sys-setting/components/organization-management/api-auth-modal/api-auth-modal.component.html @@ -0,0 +1,15 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/app/routes/sys-setting/components/organization-management/api-auth-modal/api-auth-modal.component.less b/src/app/routes/sys-setting/components/organization-management/api-auth-modal/api-auth-modal.component.less new file mode 100644 index 00000000..d97b0abb --- /dev/null +++ b/src/app/routes/sys-setting/components/organization-management/api-auth-modal/api-auth-modal.component.less @@ -0,0 +1,17 @@ +:host { + ::ng-deep { + .box { + width : 100%; + margin: 0 auto; + } + + .sv__label { + display : inline-block; + float : left; + width : 120px; + color : #000; + font-size : 13px; + text-align: right; + } + } +} \ No newline at end of file diff --git a/src/app/routes/sys-setting/components/organization-management/api-auth-modal/api-auth-modal.component.ts b/src/app/routes/sys-setting/components/organization-management/api-auth-modal/api-auth-modal.component.ts new file mode 100644 index 00000000..d0465454 --- /dev/null +++ b/src/app/routes/sys-setting/components/organization-management/api-auth-modal/api-auth-modal.component.ts @@ -0,0 +1,85 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { SystemService } from '../../../services/system.service'; +import { SettingMenuComponent } from '../../role-management/menu/menu.component'; + +@Component({ + selector: 'app-api-auth-modal', + templateUrl: './api-auth-modal.component.html', + styleUrls: ['./api-auth-modal.component.less'] +}) +export class ApiAuthModalComponent implements OnInit { + @ViewChild('menu', { static: false }) + menu!: SettingMenuComponent; + roleInfoData: any = {}; + authorityAssistId: any[] = []; + params: any; + changeValue: boolean = false; + authority: any[] = []; + + loadingInfo = false; + constructor(private modal: NzModalRef, public service: SystemService) {} + + ngOnInit(): void { + if (this.params.id) { + this.getRoleInfo(); + } + } + getRoleInfo() { + this.loadingInfo = true; + this.service.request(this.params.infoUrl, { id: this.params.id }).subscribe( + res => { + if (res) { + this.roleInfoData = res; + } + this.loadingInfo = false; + }, + _ => (this.loadingInfo = false), + () => (this.loadingInfo = false) + ); + } + getData(res: { authority: any[]; authorityAssistId: any[] }) { + console.log('修改了'); + + this.authority = res.authority; + this.authorityAssistId = res.authorityAssistId; + } + close() { + this.modal.destroy(); + } + changeIF(value: any) { + this.changeValue = true; + } + sure() { + const auths = this.menu?.washTree(); + if (auths.authorityAssistId.length === 0) { + this.service.msgSrv.warning('请选择权限!'); + return; + } + const params: any = { + id: this.params.id, + ...this.roleInfoData, + authority: auths.authority, + authorityAssistId: auths.authorityAssistId + }; + + if (this.params.id === 0) { + delete params.id; + } + if (this.params?.type === 'freight') { + Object.assign(params, { enterpriseId: 0, enterpriseProjectId: 0 }); + } + this.loadingInfo = true; + this.service.request(this.params.updateUrl, params).subscribe( + res => { + if (res) { + this.service.msgSrv.success('编辑成功'); + this.modal.close(true); + } + this.loadingInfo = false; + }, + _ => (this.loadingInfo = false), + () => (this.loadingInfo = false) + ); + } +} diff --git a/src/app/routes/sys-setting/components/organization-management/organization-management.component.html b/src/app/routes/sys-setting/components/organization-management/organization-management.component.html new file mode 100644 index 00000000..530cdc09 --- /dev/null +++ b/src/app/routes/sys-setting/components/organization-management/organization-management.component.html @@ -0,0 +1,51 @@ + + +
+ +
+ + + + + + 角色名称 + 角色描述 + 创建人手机号 + 创建时间 + 操作 + + + + + + + + + {{ item.roleName }} + + {{ item.roleDescription }} + {{ item.link }} + + {{ item.createTime }} + + + 编辑 + + 删除 + + 新增子角色 +
+ + 配置接口权限 + + 配置数据权限 + + +
+
+ +
+
\ No newline at end of file diff --git a/src/app/routes/sys-setting/components/organization-management/organization-management.component.less b/src/app/routes/sys-setting/components/organization-management/organization-management.component.less new file mode 100644 index 00000000..b83ce9ee --- /dev/null +++ b/src/app/routes/sys-setting/components/organization-management/organization-management.component.less @@ -0,0 +1,17 @@ +:host { + ::ng-deep { + .pane-content-left { + padding-right: 12px; + + nz-select { + width: 100%; + margin-bottom: 1rem; + border-bottom: 2px solid #15408e; + } + } + .pane-content-right { + padding-left: 12px; + } + } + } + \ No newline at end of file diff --git a/src/app/routes/sys-setting/components/organization-management/organization-management.component.ts b/src/app/routes/sys-setting/components/organization-management/organization-management.component.ts new file mode 100644 index 00000000..2311e055 --- /dev/null +++ b/src/app/routes/sys-setting/components/organization-management/organization-management.component.ts @@ -0,0 +1,96 @@ +import { Component, OnInit } from '@angular/core'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { SystemService } from '../../services/system.service'; +import { ApiAuthModalComponent } from './api-auth-modal/api-auth-modal.component'; +import { OrganizationModalComponent } from './organization-modal/organization-modal.component'; + +@Component({ + selector: 'app-organization-management', + templateUrl: './organization-management.component.html', + styleUrls: ['./organization-management.component.less'] +}) +export class OrganizationManagementComponent implements OnInit { + mapOfExpandedData: { [key: string]: any[] } = {}; + listOfMapData: any[] = []; + + params: any = { + listUrl: this.service.$api_get_role_page, + deleteUrl: this.service.$api_dalete_role, + infoUrl: this.service.$api_getRoleInfo, + addUrl: this.service.$api_save_role, + updateUrl: this.service.$api_update_role, + title: '角色管理', + type: 'user' + }; + constructor(public service: SystemService, private modal: NzModalService) { + this.initData(); + } + + ngOnInit(): void {} + + initData(): void { + this.loadMemu(); + } + + loadMemu() { + this.service.request(this.service.$api_get_organization_role_list).subscribe(res => { + if (res) { + this.listOfMapData = res; + this.listOfMapData.forEach(item => { + this.mapOfExpandedData[item.key] = this.service.convertTreeToList(item); + }); + } + }); + } + + // changeMemu(key: number) { + // this.selectedPlatform = this.platforms[key]; + // this.loadMemu(this.selectedPlatform.appId); + // } + + menuAction(item?: any, parentId?: string) { + const modal = this.modal.create({ + nzContent: OrganizationModalComponent, + nzComponentParams: item + ? { params: { ...item, ...this.params }, parentId: item.parentId } + : { params: { id: 0, ...this.params }, parentId }, + nzFooter: null + }); + modal.afterClose.subscribe(res => { + if (res) { + this.loadMemu(); + } + }); + } + + configureAPIauth(item: any) { + const modal = this.modal.create({ + nzTitle: '接口权限配置', + nzContent: ApiAuthModalComponent, + nzWidth: 800, + nzComponentParams: { params: { ...item, ...this.params } }, + nzFooter: null + }); + modal.afterClose.subscribe(res => { + if (res) { + this.loadMemu(); + } + }); + } + + deleteAction(item: any) { + this.modal.error({ + nzTitle: '确认删除?', + nzClosable: false, + nzCancelText: '取消', + nzOnOk: () => { + this.service.request(this.params.deleteUrl, [item.id]).subscribe(res => { + if (res) { + this.service.msgSrv.success('删除角色成功'); + this.loadMemu(); + } + }); + } + }); + } +} diff --git a/src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.html b/src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.html new file mode 100644 index 00000000..1bc06855 --- /dev/null +++ b/src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.html @@ -0,0 +1,14 @@ + + + + + + + + \ No newline at end of file diff --git a/src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.less b/src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.less new file mode 100644 index 00000000..c5ab48f9 --- /dev/null +++ b/src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.less @@ -0,0 +1,21 @@ +:host { + ::ng-deep { + .box { + width : 100%; + margin: 0 auto; + } + + .sv__label { + display : inline-block; + float : left; + width : 120px; + color : #000; + font-size : 13px; + text-align: right; + } + + .ant-card-body { + padding: 0; + } + } +} \ No newline at end of file diff --git a/src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.ts b/src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.ts new file mode 100644 index 00000000..9ae8a8e7 --- /dev/null +++ b/src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.ts @@ -0,0 +1,103 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { SFComponent, SFSchema } from '@delon/form'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { SystemService } from '../../../services/system.service'; +import { SettingMenuComponent } from '../../role-management/menu/menu.component'; + +@Component({ + selector: 'app-organization-modal', + templateUrl: './organization-modal.component.html', + styleUrls: ['./organization-modal.component.less'] +}) +export class OrganizationModalComponent implements OnInit { + @ViewChild('sf', { static: false }) + sf!: SFComponent; + + roleInfoData: any = {}; + params: any; + schema!: SFSchema; + + parentId: string = ''; + + constructor(private modal: NzModalRef, public service: SystemService) {} + + ngOnInit(): void { + this.initSF(); + if (this.params.id) { + this.getRoleInfo(); + } + } + initSF() { + this.schema = { + properties: { + roleName: { + title: '角色名称', + type: 'string', + maxLength: 20, + ui: { + placeholder: '请输入角色名称' + } + }, + roleDescription: { + title: '角色描述', + type: 'string', + maxLength: 50, + ui: { + autosize: { minRows: 3 }, + hidden: this.params.lookType === 'detail', + placeholder: '请输入角色描述', + widget: 'textarea' + } + } + }, + required: ['roleName'] + }; + } + + getRoleInfo() { + this.service.request(this.params.infoUrl, { id: this.params.id }).subscribe(res => { + if (res) { + this.roleInfoData = res; + } + }); + } + close() { + this.modal.destroy(); + } + sure() { + if (!this.sf?.valid) { + this.service.msgSrv.warning('角色名称不能为空'); + return; + } + + const params: any = { + id: this.params.id, + ...this.sf.value, + authority: this.roleInfoData.authority, + authorityAssistId: this.roleInfoData.authorityAssistId, + parentId: this.parentId + }; + + if (this.params.id === 0) { + delete params.id; + } + if (this.params?.type === 'freight') { + Object.assign(params, { enterpriseId: 0, enterpriseProjectId: 0 }); + } + if (this.params.id) { + this.service.request(this.params.updateUrl, params).subscribe(res => { + if (res) { + this.service.msgSrv.success('编辑成功'); + this.modal.close(true); + } + }); + } else { + this.service.request(this.params.addUrl, params).subscribe(res => { + if (res) { + this.service.msgSrv.success('新增成功'); + this.modal.close(true); + } + }); + } + } +} diff --git a/src/app/routes/sys-setting/components/role-management/menu/menu.component.html b/src/app/routes/sys-setting/components/role-management/menu/menu.component.html index 9c6d6e48..c97e6e87 100644 --- a/src/app/routes/sys-setting/components/role-management/menu/menu.component.html +++ b/src/app/routes/sys-setting/components/role-management/menu/menu.component.html @@ -1,7 +1,8 @@
+ [nzCheckedKeys]="defaultCheckedKeys" [nzExpandedKeys]="defaultExpandedKeys" style="max-height: 600px; + overflow: auto;">
diff --git a/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts b/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts index 4f6c67a5..85c11d0c 100644 --- a/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts +++ b/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts @@ -57,15 +57,15 @@ export class SettingMenuComponent implements OnInit, OnChanges { }); } addAuthority(origin: { id: any; all: any }, node: { buttonInfoList: any[] }, item?: { checked: any; functionButtonId: any }) { - console.log(origin,node); - + console.log(origin, node); + if (this.authority?.length && this.authority.filter(authItem => authItem.authorityId === origin.id).length) { // 判断此菜单权限是否已经存在权限列表中 // 当前操作菜单id存在权限列表里 this.authority.forEach(menuItem => { console.log(menuItem); console.log(item); - + if (menuItem.authorityId === origin.id) { menuItem.buttonAuthorityIds = menuItem.buttonAuthorityIds || []; // 防止属性不存在,给属性指定数据类型 if (item) { @@ -253,12 +253,13 @@ export class SettingMenuComponent implements OnInit, OnChanges { const halfCheckedNode: any = this.nzTreeComponent.getHalfCheckedNodeList(); this.authorityAssistId = []; halfCheckedNode.forEach((item: { key: any }) => { - authorityMenu.push({ authorityId: item.key }); + authorityMenu.push({ authorityId: item.key, isUpdateAuthority: 0 }); tempAuthorityIdDTOListMenu.push(item.key); }); this.overWashTree(checkedNode, tempAuthorityIdDTOListMenu, authorityMenu); if (this.authority && this.authority.length) { this.authority.forEach(item => { + item.isUpdateAuthority = 1; if (tempAuthorityIdDTOListMenu.indexOf(item.authorityId) !== -1) { tempAuthorityIdDTOListMenu.forEach((oldItem, oldIndex) => { if (oldItem === item.authorityId) { @@ -318,7 +319,7 @@ export class SettingMenuComponent implements OnInit, OnChanges { origin.buttonInfoList = res; origin.all = false; console.log(origin); - + // 判断此菜单下是否已有此按钮权限 this.againGetBtn(id, origin); } diff --git a/src/app/routes/sys-setting/services/system.service.ts b/src/app/routes/sys-setting/services/system.service.ts index 33c7f6e6..85a266fe 100644 --- a/src/app/routes/sys-setting/services/system.service.ts +++ b/src/app/routes/sys-setting/services/system.service.ts @@ -8,6 +8,7 @@ */ import { Injectable, Injector } from '@angular/core'; import { BaseService } from 'src/app/shared/services'; +import { TreeNodeInterface } from '../../menu-manager/services/menu-manager.service'; @Injectable({ providedIn: 'root' @@ -45,6 +46,9 @@ export class SystemService extends BaseService { // 获取角色列表 $api_getAppRoleList = '/api/mdc/cuc/roleInfo/getRoleList'; + // 获取组织角色树列表 + $api_get_organization_role_list = '/api/mdc/cuc/roleInfo/getOrganizationRoleList'; + // 查询字典选项列表 $api_get_dict_page = '/api/mdc/pbc/dictItems/list/page'; // 根据id批量删除字典选项 @@ -191,4 +195,49 @@ export class SystemService extends BaseService { constructor(public injector: Injector) { super(injector); } + + collapse(array: TreeNodeInterface[], data: TreeNodeInterface, $event: boolean): void { + if (!$event) { + if (data.children) { + data.children.forEach(d => { + const target = array.find(a => a.key === d.key)!; + target.expand = false; + this.collapse(array, target, false); + }); + } else { + return; + } + } + } + + convertTreeToList(root: TreeNodeInterface): TreeNodeInterface[] { + const stack: TreeNodeInterface[] = []; + const array: TreeNodeInterface[] = []; + const hashMap = {}; + stack.push({ ...root, level: 0, expand: true }); + + while (stack.length !== 0) { + const node = stack.pop()!; + this.visitNode(node, hashMap, array); + if (node.children) { + for (let i = node.children.length - 1; i >= 0; i--) { + stack.push({ + ...node.children[i], + level: node.level! + 1, + expand: false, + parent: node + }); + } + } + } + + return array; + } + + visitNode(node: TreeNodeInterface, hashMap: { [key: string]: boolean }, array: TreeNodeInterface[]): void { + if (!hashMap[node.key]) { + hashMap[node.key] = true; + array.push(node); + } + } } diff --git a/src/app/routes/sys-setting/sys-setting-routing.module.ts b/src/app/routes/sys-setting/sys-setting-routing.module.ts index f0670f64..ea5ae5c4 100644 --- a/src/app/routes/sys-setting/sys-setting-routing.module.ts +++ b/src/app/routes/sys-setting/sys-setting-routing.module.ts @@ -26,11 +26,13 @@ import { InsuranceSetComponent } from './components/insurance-set/insurance-set. import { NetworkFreightNewComponent } from './components/network-freight/new/new.component'; import { NoTeManagementComponent } from './components/note-management/note-management.component'; import { SmsTemplateComponent } from './components/sms-template/sms-template.component'; +import { OrganizationManagementComponent } from './components/organization-management/organization-management.component'; const routes: Routes = [ { path: 'staff-management', component: StaffManagementComponent }, { path: 'role-management/user/:type', component: RoleManagementComponent }, { path: 'role-management/freight/:type', component: RoleManagementComponent }, + { path: 'organization-management', component: OrganizationManagementComponent }, { path: 'basic-setting', component: BasicSettingComponent }, { path: 'note-management', component: NoTeManagementComponent }, { path: 'basic-config', component: BasicConfigComponent }, diff --git a/src/app/routes/sys-setting/sys-setting.module.ts b/src/app/routes/sys-setting/sys-setting.module.ts index 2e1275c1..c7462e40 100644 --- a/src/app/routes/sys-setting/sys-setting.module.ts +++ b/src/app/routes/sys-setting/sys-setting.module.ts @@ -34,6 +34,9 @@ import { InsuranceSetComponent } from './components/insurance-set/insurance-set. import { NetworkFreightNewComponent } from './components/network-freight/new/new.component'; import { NoTeManagementComponent } from './components/note-management/note-management.component'; import { SmsTemplateComponent } from './components/sms-template/sms-template.component'; +import { OrganizationManagementComponent } from './components/organization-management/organization-management.component'; +import { OrganizationModalComponent } from './components/organization-management/organization-modal/organization-modal.component'; +import { ApiAuthModalComponent } from './components/organization-management/api-auth-modal/api-auth-modal.component'; const COMPONENTS = [ StaffManagementComponent, @@ -52,7 +55,8 @@ const COMPONENTS = [ AnnouncementMessageComponent, InsuranceSetComponent, NoTeManagementComponent, - SmsTemplateComponent + SmsTemplateComponent, + OrganizationManagementComponent ]; const NOTROUTECOMPONENTS = [ BuyerTranspowerComponent, @@ -61,10 +65,11 @@ const NOTROUTECOMPONENTS = [ AuditResonConfigActionModalComponent, CartConfigActionModalComponent, SettingRoleEditComponent, - SettingMenuComponent + SettingMenuComponent, + OrganizationModalComponent ]; @NgModule({ - declarations: [...COMPONENTS, ...NOTROUTECOMPONENTS], + declarations: [...COMPONENTS, ...NOTROUTECOMPONENTS, ApiAuthModalComponent], imports: [CommonModule, SysSettingRoutingModule, SharedModule, DynamicSettingModule] }) export class SysSettingModule {} From 359b34dcfaff022d8b55ba3b2f760cae718949e1 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 26 Apr 2022 15:36:41 +0800 Subject: [PATCH 60/80] edit --- .../organization-management.component.html | 8 ++++---- .../organization-management.component.ts | 4 ++-- .../organization-modal.component.html | 2 +- .../organization-modal/organization-modal.component.ts | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/app/routes/sys-setting/components/organization-management/organization-management.component.html b/src/app/routes/sys-setting/components/organization-management/organization-management.component.html index 530cdc09..5136196e 100644 --- a/src/app/routes/sys-setting/components/organization-management/organization-management.component.html +++ b/src/app/routes/sys-setting/components/organization-management/organization-management.component.html @@ -1,7 +1,7 @@
- +
- 角色名称 - 角色描述 + 组织名称 + 组织描述 创建人手机号 创建时间 操作 @@ -36,7 +36,7 @@ 删除 - 新增子角色 + 新增子组织
配置接口权限 diff --git a/src/app/routes/sys-setting/components/organization-management/organization-management.component.ts b/src/app/routes/sys-setting/components/organization-management/organization-management.component.ts index 2311e055..f9f7c9c3 100644 --- a/src/app/routes/sys-setting/components/organization-management/organization-management.component.ts +++ b/src/app/routes/sys-setting/components/organization-management/organization-management.component.ts @@ -19,7 +19,7 @@ export class OrganizationManagementComponent implements OnInit { infoUrl: this.service.$api_getRoleInfo, addUrl: this.service.$api_save_role, updateUrl: this.service.$api_update_role, - title: '角色管理', + title: '组织管理', type: 'user' }; constructor(public service: SystemService, private modal: NzModalService) { @@ -86,7 +86,7 @@ export class OrganizationManagementComponent implements OnInit { nzOnOk: () => { this.service.request(this.params.deleteUrl, [item.id]).subscribe(res => { if (res) { - this.service.msgSrv.success('删除角色成功'); + this.service.msgSrv.success('删除组织成功'); this.loadMemu(); } }); diff --git a/src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.html b/src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.html index 1bc06855..b5da33e8 100644 --- a/src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.html +++ b/src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.html @@ -1,5 +1,5 @@ diff --git a/src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.ts b/src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.ts index 9ae8a8e7..a9f765e1 100644 --- a/src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.ts +++ b/src/app/routes/sys-setting/components/organization-management/organization-modal/organization-modal.component.ts @@ -31,21 +31,21 @@ export class OrganizationModalComponent implements OnInit { this.schema = { properties: { roleName: { - title: '角色名称', + title: '组织名称', type: 'string', maxLength: 20, ui: { - placeholder: '请输入角色名称' + placeholder: '请输入组织名称' } }, roleDescription: { - title: '角色描述', + title: '组织描述', type: 'string', maxLength: 50, ui: { autosize: { minRows: 3 }, hidden: this.params.lookType === 'detail', - placeholder: '请输入角色描述', + placeholder: '请输入组织描述', widget: 'textarea' } } @@ -66,7 +66,7 @@ export class OrganizationModalComponent implements OnInit { } sure() { if (!this.sf?.valid) { - this.service.msgSrv.warning('角色名称不能为空'); + this.service.msgSrv.warning('组织名称不能为空'); return; } From 0034fb9512f42b90b89253133b3ea3f67dd01872 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 15:51:13 +0800 Subject: [PATCH 61/80] fix bug --- .../rebate-setting/add/add.component.html | 141 +++++++++++------- .../rebate-setting/add/add.component.ts | 3 +- .../components/config/config.component.html | 5 +- 3 files changed, 93 insertions(+), 56 deletions(-) diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html index f0be7aff..eed8266a 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html @@ -4,77 +4,110 @@ * @Author : Shiming * @Date : 2022-02-24 20:09:49 * @LastEditors : Shiming - * @LastEditTime : 2022-04-26 14:04:41 + * @LastEditTime : 2022-04-26 15:50:41 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> - + + + + - - + + - 固定结算费率配置 + 固定结算费率配置 -  % + +  % - 业务量和管理费比例配置 + 业务量和管理费比例配置 - - - - - + + + + + - -
- + +
+
- 关联合伙人配置 + 关联合伙人配置 - - - - - - - 添加 - - - + + + + + + + 添加 + + + - - - 1 - 2 - 3 - 4 - 5 - - + + + 1 + 2 + 3 + 4 + 5 + + - - - + + + + - - - + + + + - - -
- - -
+
+ + +
diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts index bddf0dca..052b5c3c 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-03-21 09:26:45 * @LastEditors : Shiming - * @LastEditTime : 2022-04-26 11:04:46 + * @LastEditTime : 2022-04-26 15:51:04 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -196,4 +196,5 @@ export class ParterRebateManageMentAddComponent implements OnInit { this.addStatus = false; } } + } diff --git a/src/app/routes/partner/system-config/components/config/config.component.html b/src/app/routes/partner/system-config/components/config/config.component.html index 394af73c..e942c052 100644 --- a/src/app/routes/partner/system-config/components/config/config.component.html +++ b/src/app/routes/partner/system-config/components/config/config.component.html @@ -170,7 +170,9 @@ -
+
+
+
--
+
From ba1c5115c07e74aec61f0c9e9d2aae57c280c635 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 26 Apr 2022 16:20:10 +0800 Subject: [PATCH 62/80] edit --- .../api-auth-modal.component.html | 4 +- .../menu-tree/menu-tree.component.html | 23 + .../menu-tree/menu-tree.component.less | 211 +++++++++ .../menu-tree/menu-tree.component.ts | 413 ++++++++++++++++++ .../routes/sys-setting/sys-setting.module.ts | 7 +- 5 files changed, 654 insertions(+), 4 deletions(-) create mode 100644 src/app/routes/sys-setting/components/organization-management/menu-tree/menu-tree.component.html create mode 100644 src/app/routes/sys-setting/components/organization-management/menu-tree/menu-tree.component.less create mode 100644 src/app/routes/sys-setting/components/organization-management/menu-tree/menu-tree.component.ts diff --git a/src/app/routes/sys-setting/components/organization-management/api-auth-modal/api-auth-modal.component.html b/src/app/routes/sys-setting/components/organization-management/api-auth-modal/api-auth-modal.component.html index 1ac66921..b92286ac 100644 --- a/src/app/routes/sys-setting/components/organization-management/api-auth-modal/api-auth-modal.component.html +++ b/src/app/routes/sys-setting/components/organization-management/api-auth-modal/api-auth-modal.component.html @@ -1,10 +1,10 @@ - - + diff --git a/src/app/routes/sys-setting/components/organization-management/menu-tree/menu-tree.component.html b/src/app/routes/sys-setting/components/organization-management/menu-tree/menu-tree.component.html new file mode 100644 index 00000000..1c6a27b8 --- /dev/null +++ b/src/app/routes/sys-setting/components/organization-management/menu-tree/menu-tree.component.html @@ -0,0 +1,23 @@ +
+
+ + +
+
+ + +
+ +
+ + +
+
+
+
+ \ No newline at end of file diff --git a/src/app/routes/sys-setting/components/organization-management/menu-tree/menu-tree.component.less b/src/app/routes/sys-setting/components/organization-management/menu-tree/menu-tree.component.less new file mode 100644 index 00000000..43eaee62 --- /dev/null +++ b/src/app/routes/sys-setting/components/organization-management/menu-tree/menu-tree.component.less @@ -0,0 +1,211 @@ +:host { + .toolbar-btn { + padding-left: 0; + } + + ::ng-deep { + .ant-checkbox-wrapper+.ant-checkbox-wrapper { + margin: 0; + } + + .listDiv { + cdk-virtual-scroll-viewport { + border: 1px solid rgba(242, 242, 240, 1); + } + + .selectedItem { + background: #e6f7ff; + + span { + a { + color: rgba(212, 72, 86, 1); + } + } + + ul>li>a>i { + color: rgba(212, 72, 86, 1); + } + } + + .listBottom { + height : 2.5rem; + overflow : hidden; + text-align : center; + background-color: rgba(245, 245, 245, 0.7); + + &:hover { + background-color: rgba(245, 245, 245, 1); + transition : all 1s; + } + } + } + + .ant-tabs-nav { + width : 100%; + margin: 0 !important; + } + + .buttons { + padding: 0; + + button { + display : block; + max-width: 10rem; + margin : 0.3rem 0.5rem 0 0; + } + + .ant-btn+.ant-btn:not(.ant-btn-link), + .ant-btn+nz-popconfirm, + nz-popconfirm+.ant-btn, + nz-popconfirm+nz-popconfirm, + .ant-btn+nz-button-group, + nz-button-group+.ant-btn, + .ant-btn+nz-dropdown, + nz-dropdown+.ant-btn, + nz-popconfirm+nz-button-group, + nz-button-group+nz-popconfirm { + margin-left: 0; + } + } + + .ant-tabs-bar { + margin: 0; + } + + // .ant-tree-node-selected { + // background: none !important; + // } + // .ant-tree-node-content-wrapper:hover { + // background: none; + // } + .ant-tree-node-content-wrapper { + width: 100%; + } + + .ant-tabs .ant-tabs-tabpane { + padding : 10px 10px 2px 10px; + background : #fdfdfd; + border-right : solid 1px #eee; + border-bottom: solid 1px #eee; + border-left : solid 1px #eee; + } + + // .ant-tabs-tab { + // width: 50%; + // text-align: center; + // } + // .ant-tabs-tab-arrow-show { + // display: none; + // } + ul { + margin : 0; + padding: 0; + } + } +} + +.firstStepBox { + width : 100%; + line-height: 50px; + text-align : center; + background : #f7f7f7; +} + +.itemBox { + width : 100%; + height : 50px; + padding : 0 0 0 60px; + color : #5f5f5f; + line-height: 50px; + cursor : pointer; + + &:hover { + background: #e6f7ff; + } +} + +.twoStepBox { + width : 100%; + line-height: 50px; + text-align : center; + background : #f7f7f7; + + span { + display: inline-block; + margin : 0 auto; + } + + >i { + float : right; + margin: 20px 20px 0 0; + } + + button { + float : right; + margin: 8px 20px 0 0; + } + + .blueFont { + color: #1890ff; + } +} + +.folder-desc i { + margin: 0 5px; +} + +.flexBox { + .titleBox { + display : flex; + justify-content: space-between; + + i { + margin: 0 8px; + } + } +} + +ul { + display: block; +} + +li { + line-height: 30px; + list-style : none; +} + +.dictData { + dl { + margin : 0; + padding: 0; + } + + dt { + margin : 0 0 5px 0; + padding : 3px 0; + color : #999; + font-weight : normal; + font-size : 13px; + border-bottom: solid 1px #eee; + } +} + +label { + color : #666; + font-size: 13px; +} + +.treeWrap { + display: flex; + width : 700px; + + .leftBox { + width : 40%; + // border-right: solid 1px #eee; + } + + .rightBox { + width : 60%; + padding: 0 0 0 20px; + } +} \ No newline at end of file diff --git a/src/app/routes/sys-setting/components/organization-management/menu-tree/menu-tree.component.ts b/src/app/routes/sys-setting/components/organization-management/menu-tree/menu-tree.component.ts new file mode 100644 index 00000000..51bc986d --- /dev/null +++ b/src/app/routes/sys-setting/components/organization-management/menu-tree/menu-tree.component.ts @@ -0,0 +1,413 @@ +import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core'; +import { EAEnvironmentService } from '@shared'; +import { NzTreeComponent } from 'ng-zorro-antd/tree'; +import { SystemService } from '../../../services/system.service'; + +@Component({ + selector: 'app-menu-tree', + templateUrl: './menu-tree.component.html', + styleUrls: ['./menu-tree.component.less'] +}) +export class MenuTreeComponent implements OnInit, OnChanges { + @ViewChild('nzTreeComponent', { static: false }) nzTreeComponent!: NzTreeComponent; + origin: any = { buttonInfoList: [], dictList: [] }; + node: any = {}; + authority: any[] = []; + defaultSelectedKeys: any[] = []; + defaultExpandedKeys: any[] = []; + defaultCheckedKeys: any[] = []; + functionList: any[] = []; + allChecked = false; + indeterminate = true; + @Input() type = 'edit'; + @Input() source = ''; + @Input() appId = this.envSrv.env.appId; + @Input() isAuthorityIdDTOList: any[] = []; + @Input() authorityAssistId: any[] = []; + @Input() roleId: any; + @Output() changeData = new EventEmitter(); + constructor(public service: SystemService, private cdr: ChangeDetectorRef, private envSrv: EAEnvironmentService) {} + ngOnChanges(changes: SimpleChanges): void { + if (changes.isAuthorityIdDTOList) { + if (this.type === 'edit') { + this.authority = this.isAuthorityIdDTOList || []; + } + } + } + + ngOnInit() { + this.getAllFunction(); + } + getAllFunction() { + this.service + .request(this.service.$api_getAllFunctionInfoByAppId, { appId: this.appId || this.envSrv.env.appId }, 'POST', true, 'FORM') + .subscribe(res => { + this.functionList = res; + this.authorityAssistId = [...this.authorityAssistId]; + this.cdr.detectChanges(); + }); + } + + addAuthority(origin: { id: any; all: any }, node: { buttonInfoList: any[] }, item?: { checked: any; functionButtonId: any }) { + console.log(origin, node); + + if (this.authority?.length && this.authority.filter(authItem => authItem.authorityId === origin.id).length) { + // 判断此菜单权限是否已经存在权限列表中 + // 当前操作菜单id存在权限列表里 + this.authority.forEach(menuItem => { + console.log(menuItem); + console.log(item); + + if (menuItem.authorityId === origin.id) { + menuItem.buttonAuthorityIds = menuItem.buttonAuthorityIds || []; // 防止属性不存在,给属性指定数据类型 + if (item) { + // 单选 + if (item.checked) { + if (menuItem.buttonAuthorityIds.indexOf(item.functionButtonId) === -1) { + // 如果该按钮在数据权限数组中不存在 + menuItem.buttonAuthorityIds.push(item.functionButtonId); + } + } else { + if (menuItem.buttonAuthorityIds && menuItem.buttonAuthorityIds.length) { + menuItem.buttonAuthorityIds.forEach((btnItem: any, index: any) => { + if (btnItem === item.functionButtonId) { + menuItem.buttonAuthorityIds.splice(index, 1); + } + }); + } + } + } else { + // 全选 + if (origin.all) { + node.buttonInfoList.forEach((nodeItem: { id: any; checked: boolean }) => { + if (menuItem.buttonAuthorityIds.indexOf(nodeItem.id) === -1) { + menuItem.buttonAuthorityIds.push(nodeItem.id); + nodeItem.checked = true; + } + }); + } else { + if (menuItem.buttonAuthorityIds && menuItem.buttonAuthorityIds.length) { + menuItem.buttonAuthorityIds = []; + node.buttonInfoList.forEach((nodeItem: { checked: boolean }) => { + nodeItem.checked = false; + }); + } + } + } + } + }); + } else { + // 数组为空的时候 + const buttonAuthorityIds = []; + if (item) { + // 全选 + buttonAuthorityIds.push(item.functionButtonId); + } else { + node.buttonInfoList.forEach((nodeItem: { id: any; checked: boolean; _isHalfChecked: boolean }) => { + if (origin.all) { + buttonAuthorityIds.push(nodeItem.id); + nodeItem.checked = true; + } + }); + } + const obj: any = { + authorityId: origin.id, + buttonAuthorityIds + }; + this.authority.push(obj); + } + this.checkTreeNode(node, origin); + } + + addDict(item: { checked: any; itemId: any; itemKey: any }, dictItem: { dictId: any }, origin: { id: any }, node: any) { + if (this.authority.length) { + // 判断此菜单权限是否已经存在权限列表中 + if (this.authority.filter(authItem => authItem.authorityId === origin.id).length) { + // 当前操作菜单id存在权限列表里 + this.authority.forEach((menuItem, menuIndex) => { + if (menuItem.authorityId === origin.id) { + menuItem.dataAuthority = menuItem.dataAuthority || []; // 防止属性不存在,给属性指定数据类型 + if (item.checked) { + if (menuItem.dataAuthority.filter((ele: { dictItemId: any }) => ele.dictItemId === item.itemId).length === 0) { + // 如果该按钮在数据权限数组中不存在 + menuItem.dataAuthority.push({ dictItemId: item.itemId, itemKey: item.itemKey, dictId: dictItem.dictId }); + } + } else { + if (menuItem.dataAuthority && menuItem.dataAuthority.length) { + menuItem.dataAuthority.forEach((btnItem: { dictItemId: any }, index: any) => { + if (btnItem.dictItemId === item.itemId) { + menuItem.dataAuthority.splice(index, 1); + } + }); + } + } + } + }); + } else { + // 当前操作菜单id不存在权限列表里 + const dataAuthority = []; + dataAuthority.push({ dictItemId: item.itemId, itemKey: item.itemKey, dictId: dictItem.dictId }); + const obj: any = { + authorityId: origin.id, + dataAuthority + }; + this.authority.push(obj); + } + } else { + // 数组为空的时候 + const dataAuthority = []; + dataAuthority.push({ dictItemId: item.itemId, itemKey: item.itemKey, dictId: dictItem.dictId }); + const obj: any = { + authorityId: origin.id, + dataAuthority + }; + this.authority.push(obj); + } + this.checkTreeNode(node, origin); + } + + checkTreeNode(node: any, origin: { id: any }) { + const checkedNode: any = this.nzTreeComponent.getCheckedNodeList(); + const allCheckedArr: any[] = []; + this.overTree(checkedNode, allCheckedArr); + this.authority.forEach(authItem => { + if (authItem.authorityId === origin.id) { + if ( + (authItem.buttonAuthorityIds && authItem.buttonAuthorityIds.length) || + (authItem.dataAuthority && authItem.dataAuthority.length) + ) { + if (allCheckedArr.indexOf(node.key) === -1) { + allCheckedArr.push(node.key); + } + } else { + if (allCheckedArr.indexOf(node.key) !== -1) { + allCheckedArr.forEach((ele, index) => { + if (ele === origin.id) { + allCheckedArr.splice(index, 1); + } + }); + } + } + } + }); + this.defaultCheckedKeys = allCheckedArr; + } + + overTree(children: any[], a: any[]) { + children.forEach(item => { + a.push(item.key); + if (item.isLeaf) { + return; + } + if (item.children && item.children.length) { + this.overTree(item.children, a); + } + }); + } + + addDisabledTree(arr: any[]) { + arr.forEach((item: any) => { + item.disableCheckbox = true; + if (item.isLeaf) { + return; + } + if (item.children && item.children.length) { + this.addDisabledTree(item.children); + } + }); + } + addDisabledLeafTree(arr: any[]) { + arr.forEach((item: any) => { + if (item.isLeaf) { + return; + } + item.disableCheckbox = true; + if (item.children && item.children.length) { + this.addDisabledLeafTree(item.children); + } + }); + } + nzEvent(event: any): void { + this.origin = event.node.origin; + this.node = event.node.origin; + if (!event.node.origin.isLeaf) { + event.node.isExpanded = !event.node.isExpanded; + } else { + this.initButtonList(event.node.key, event.node.origin); + // this.initDictList(event.node.key, event.node.origin); + } + } + + washTree() { + const authorityMenu: any[] = []; // this.authority + const tempAuthorityIdDTOListMenu: any[] = []; + const checkedNode: any = this.nzTreeComponent.getCheckedNodeList(); + const halfCheckedNode: any = this.nzTreeComponent.getHalfCheckedNodeList(); + this.authorityAssistId = []; + halfCheckedNode.forEach((item: { key: any }) => { + authorityMenu.push({ authorityId: item.key, isUpdateAuthority: 0 }); + tempAuthorityIdDTOListMenu.push(item.key); + }); + this.overWashTree(checkedNode, tempAuthorityIdDTOListMenu, authorityMenu); + if (this.authority && this.authority.length) { + this.authority.forEach(item => { + item.isUpdateAuthority = 1; + if (tempAuthorityIdDTOListMenu.indexOf(item.authorityId) !== -1) { + tempAuthorityIdDTOListMenu.forEach((oldItem, oldIndex) => { + if (oldItem === item.authorityId) { + authorityMenu[oldIndex] = item; + } + }); + } + }); + } + const result = { + authority: authorityMenu, + authorityAssistId: this.authorityAssistId + }; + this.changeData.emit(result); + return result; + } + overWashTree(children: any[], tempAuthorityIdDTOListMenu: any[], authorityMenu: any[]) { + children.forEach((item: any) => { + this.authorityAssistId.push(item.key); + tempAuthorityIdDTOListMenu.push(item.key); + authorityMenu.push({ authorityId: item.key, isUpdateAuthority: 1 }); + if (item.isLeaf) { + return; + } + if (item.children) { + this.overWashTree(item.children, tempAuthorityIdDTOListMenu, authorityMenu); + } + }); + } + + initButtonList(id: any, origin: any) { + if (origin.expanded) { + origin.children.forEach((item: any, index: number) => { + if (item.selected) { + if (origin.checked) { + this.authority.splice(index, 1); + const buttonAuthorityIds: any = []; + item.buttonInfoList.forEach((btnItem: any) => { + btnItem.checked = true; + buttonAuthorityIds.push(btnItem.functionButtonId); + }); + this.authority.push({ authorityId: origin.key, buttonAuthorityIds, isUpdateAuthority: 1 }); + } else { + this.authority.splice(index, 1); + item.buttonInfoList.forEach((btnItem: any) => { + btnItem.checked = false; + }); + } + } + }); + } + const params = { + id + }; + this.service.request(this.service.$api_getFunctionButtonInfo, params).subscribe(res => { + if (res) { + origin.buttonInfoList = res; + origin.all = false; + console.log(origin); + + // 判断此菜单下是否已有此按钮权限 + this.againGetBtn(id, origin); + } + }); + } + // 再次请求,需要判断暂存权限数组是否已有此权限 + againGetBtn(id: any, origin: any) { + if (this.authority && this.authority.length === 0) { + const buttonAuthorityIds: any = []; + if (origin.checked) { + origin.buttonInfoList.forEach((btnItem: { functionButtonId: any; checked: boolean }) => { + btnItem.checked = true; + buttonAuthorityIds.push(btnItem.functionButtonId); + }); + this.authority.push({ authorityId: origin.key, buttonAuthorityIds, isUpdateAuthority: 1 }); + } + } else { + if (origin.checked) { + //菜单勾选情况下 + if (this.authority.some(item => item.authorityId === id)) { + this.authority.forEach(item => { + if (item.authorityId === id) { + // 如果当前菜单Id存在权限列表里,并且等于暂存权限数组的Id + if (item.buttonAuthorityIds && item.buttonAuthorityIds.length) { + // 如果当前菜单Id权限数组不为空 + origin.buttonInfoList.forEach((btnItem: { functionButtonId: any; checked: boolean }) => { + // 判断已有权限id是否存在 + if (item.buttonAuthorityIds.indexOf(btnItem.functionButtonId) !== -1) { + btnItem.checked = true; + } else { + btnItem.checked = false; + } + }); + } + } + }); + } else { + this.authority.push({ authorityId: origin.key, buttonAuthorityIds: [], isUpdateAuthority: 1 }); + this.authority.forEach(item => { + origin.buttonInfoList.forEach((btnItem: { functionButtonId: any; checked: boolean }) => { + btnItem.checked = true; + item.buttonAuthorityIds.push(btnItem.functionButtonId); + }); + }); + } + } else { + // 菜单未勾选,要删除权限 + this.authority.forEach((item, index) => { + if (item.authorityId === id) { + // 如果当前菜单Id存在权限列表里,并且等于暂存权限数组的Id + this.authority.splice(index, 1); + origin.buttonInfoList.forEach((btnItem: { functionButtonId: any; checked: boolean }) => { + btnItem.checked = false; + }); + } + }); + } + } + } + + initDictList(id: any, origin: any) { + const params = { + id + }; + this.service.request(this.service.$api_getFunctionDataInfo, params).subscribe(res => { + if (res) { + origin.dictList = res; + // 判断此菜单下是否已有此按钮权限 + this.againGetDict(id, origin); + } + }); + } + // 再次请求,需要判断暂存权限数组是否已有此权限 + againGetDict(id: any, origin: any) { + if (this.authority.length === 0) { + return; + } + this.authority.forEach(item => { + if (item.authorityId === id) { + // 如果当前菜单Id等于暂存权限数组的Id + if (item.dataAuthority && item.dataAuthority.length) { + // 如果当前菜单Id权限数组不为空 + origin.dictList.forEach((ele: { dictItem: any[] }) => { + // 判断已有权限id是否存在 + ele.dictItem.forEach((dictItem: { itemId: any; checked: boolean; cheked: boolean }) => { + item.dataAuthority.forEach((dataItem: { dictItemId: any }) => { + if (dataItem.dictItemId === dictItem.itemId) { + dictItem.checked = true; + } else { + dictItem.cheked = false; + } + }); + }); + }); + } + } + }); + } +} diff --git a/src/app/routes/sys-setting/sys-setting.module.ts b/src/app/routes/sys-setting/sys-setting.module.ts index c7462e40..9e85ab05 100644 --- a/src/app/routes/sys-setting/sys-setting.module.ts +++ b/src/app/routes/sys-setting/sys-setting.module.ts @@ -37,6 +37,7 @@ import { SmsTemplateComponent } from './components/sms-template/sms-template.com import { OrganizationManagementComponent } from './components/organization-management/organization-management.component'; import { OrganizationModalComponent } from './components/organization-management/organization-modal/organization-modal.component'; import { ApiAuthModalComponent } from './components/organization-management/api-auth-modal/api-auth-modal.component'; +import { MenuTreeComponent } from './components/organization-management/menu-tree/menu-tree.component'; const COMPONENTS = [ StaffManagementComponent, @@ -66,10 +67,12 @@ const NOTROUTECOMPONENTS = [ CartConfigActionModalComponent, SettingRoleEditComponent, SettingMenuComponent, - OrganizationModalComponent + OrganizationModalComponent, + ApiAuthModalComponent, + MenuTreeComponent ]; @NgModule({ - declarations: [...COMPONENTS, ...NOTROUTECOMPONENTS, ApiAuthModalComponent], + declarations: [...COMPONENTS, ...NOTROUTECOMPONENTS], imports: [CommonModule, SysSettingRoutingModule, SharedModule, DynamicSettingModule] }) export class SysSettingModule {} From 9fd75c3dde9864ed3234a0ca4f4066b409fcfef2 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 16:46:46 +0800 Subject: [PATCH 63/80] fix bug --- .../rebate-setting/add/add.component.html | 9 +++-- .../rebate-setting/add/add.component.ts | 15 +------- .../rebate-table/rebate-table.component.html | 17 +++++---- .../rebate-table/rebate-table.component.ts | 37 ++++++------------- 4 files changed, 29 insertions(+), 49 deletions(-) diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html index eed8266a..1762a6cb 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-02-24 20:09:49 * @LastEditors : Shiming - * @LastEditTime : 2022-04-26 15:50:41 + * @LastEditTime : 2022-04-26 16:04:31 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -37,8 +37,11 @@
-
- +
+ +
+
+
diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts index 052b5c3c..fbf255c8 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-03-21 09:26:45 * @LastEditors : Shiming - * @LastEditTime : 2022-04-26 15:51:04 + * @LastEditTime : 2022-04-26 16:37:57 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -25,6 +25,7 @@ export class ParterRebateManageMentAddComponent implements OnInit { @ViewChild('table') table!: any; titleText :string= '新增'; tabelData: any; + tabelType: any; formData: any; addStatus: boolean = false; hiden: boolean = false; @@ -88,7 +89,6 @@ export class ParterRebateManageMentAddComponent implements OnInit { text: '移除', click: _record => this.delete(_record), iif: ()=> { - console.log(this.hiden); return !this.hiden }, acl: { ability: ['AbnormalAppear-reply'] } @@ -98,7 +98,6 @@ export class ParterRebateManageMentAddComponent implements OnInit { ]; } ngOnInit() { - console.log(this.ar.snapshot.queryParams.id); if(this.ar.snapshot?.queryParams?.id) { this.titleText= '查看' this.hiden= true @@ -128,14 +127,11 @@ export class ParterRebateManageMentAddComponent implements OnInit { this.partnerId = []; if (res) { if (Array.isArray(res)) { - console.log(res); - console.log(this.partnerPeopleList); this.partnerPeopleList = this.partnerPeopleList.concat(res); res.forEach((ele: any) => { this.partnerId.push(ele?.id); }); } else { - console.log(res); this.partnerPeopleList = this.partnerPeopleList.concat(res); this.partnerId.push(res?.id); } @@ -148,9 +144,6 @@ export class ParterRebateManageMentAddComponent implements OnInit { }); } save() { - console.log(this.partnerId); - console.log(this.partnerId.join(',')); - const params = { accountingRate: this.accountingRate, configName: this.configName, @@ -162,10 +155,8 @@ export class ParterRebateManageMentAddComponent implements OnInit { remarke: this.remarke, partnerType: this.partnerType }; - console.log(params); this.service.request(this.service.$api_save_rebateConfig, params).subscribe((res: any) => { if (res) { - console.log(res); this.service.msgSrv.success('新增成功!'); this.router.navigate(['/partner/rebate/setting']); } @@ -173,7 +164,6 @@ export class ParterRebateManageMentAddComponent implements OnInit { } initData(id:string) { this.service.request(this.service.$api_get_getPartnerRebateConfigInfo, {id: id}).subscribe((res: any) => { - console.log(res); if(res) { this.configName = res?.configName; this.accountingRate = res?.accountingRate; @@ -189,7 +179,6 @@ export class ParterRebateManageMentAddComponent implements OnInit { }) } changePartner(value: any) { - console.log(value); if (value == '3') { this.addStatus = true; } else { diff --git a/src/app/shared/components/rebate-table/rebate-table.component.html b/src/app/shared/components/rebate-table/rebate-table.component.html index f23994c1..36d3872c 100644 --- a/src/app/shared/components/rebate-table/rebate-table.component.html +++ b/src/app/shared/components/rebate-table/rebate-table.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-25 20:18:52 * @LastEditors : Shiming - * @LastEditTime : 2022-04-22 14:09:16 + * @LastEditTime : 2022-04-26 16:20:47 * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\rebate-table\\rebate-table.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -23,7 +23,7 @@ 初始业务量(万/月) 到达业务量(万/月) 管理费比例% - 操作 + 操作 @@ -37,8 +37,11 @@
- - + + + + +
@@ -72,11 +75,11 @@
- - + + - - diff --git a/src/app/shared/components/rebate-table/rebate-table.component.ts b/src/app/shared/components/rebate-table/rebate-table.component.ts index d2b3fa09..faf3a9e6 100644 --- a/src/app/shared/components/rebate-table/rebate-table.component.ts +++ b/src/app/shared/components/rebate-table/rebate-table.component.ts @@ -11,6 +11,7 @@ import { EventEmitter} from '@angular/core' }) export class RebateTableComponent implements OnInit { @Input() data: any =[]; + @Input() type: any; @Output() private dataChange: EventEmitter = new EventEmitter(); emit() { @@ -24,15 +25,13 @@ export class RebateTableComponent implements OnInit { constructor(public service: BaseService, private cdr: ChangeDetectorRef) {} ngOnInit(): void { - this.data = [ - { - gradeConfigId: '', - startAmount: 0, - endAmount: 0, - managementFeeRatio: 0, - } - ]; - this.loadData(); + if(this.type == '2') { + this.loadData(); + + } + console.log(this.type); + console.log(this.data); + this.changeendAmountAction(); } @@ -40,7 +39,7 @@ export class RebateTableComponent implements OnInit { this.service.request('/api/mdc/partnerGradeConfig/listPartnerGradeConfig').subscribe(res => { if (res) { console.log(res); - this.grage = res; + this.grage = res; this.cdr.detectChanges(); } }); @@ -70,6 +69,8 @@ export class RebateTableComponent implements OnInit { changeendAmountAction() { this.changeSub.pipe(debounceTime(500)).subscribe((res: string) => { if (res) { + console.log(res); + const paras = res.split(','); const num = Number(paras[0]); const i = Number(paras[1]); @@ -113,22 +114,6 @@ export class RebateTableComponent implements OnInit { this.data = [...newArr]; } - save() { - console.log(this.data) - let params= { - rebateConfigDTOS: this.data - } - console.log(params); - this.service.request('/api/mdc/cuc/rebateConfig/saveBatch', params).subscribe(res => { - if (res) { - console.log(res); - this.service.msgSrv.success('修改成功'); - this.loadData(); - } - }); - } - - /** * 遍历同步后置位公里数 * @param event 车长 From c9afdb19d4b6cb4754f279ea839f927b748da40b Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 16:52:20 +0800 Subject: [PATCH 64/80] fix bug --- .../rebate-setting/add/add.component.html | 6 +- .../rebate-table/rebate-table.component.ts | 55 +++++++++++-------- 2 files changed, 36 insertions(+), 25 deletions(-) diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html index 1762a6cb..e680165f 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-02-24 20:09:49 * @LastEditors : Shiming - * @LastEditTime : 2022-04-26 16:04:31 + * @LastEditTime : 2022-04-26 16:51:07 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -38,10 +38,10 @@
- +
- +
diff --git a/src/app/shared/components/rebate-table/rebate-table.component.ts b/src/app/shared/components/rebate-table/rebate-table.component.ts index faf3a9e6..179735ca 100644 --- a/src/app/shared/components/rebate-table/rebate-table.component.ts +++ b/src/app/shared/components/rebate-table/rebate-table.component.ts @@ -3,35 +3,55 @@ import { Subject } from 'rxjs'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit, Output, ViewChild } from '@angular/core'; import { BaseService } from '@shared'; import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; -import { EventEmitter} from '@angular/core' +import { EventEmitter } from '@angular/core'; @Component({ selector: 'app-rebate-table', templateUrl: './rebate-table.component.html', styleUrls: ['./rebate-table.component.less'] }) export class RebateTableComponent implements OnInit { - @Input() data: any =[]; + @Input() data: any = []; @Input() type: any; + @Input() hiden!: boolean; @Output() private dataChange: EventEmitter = new EventEmitter(); emit() { - this.dataChange.emit(this.data) + this.dataChange.emit(this.data); } headers: any[] = []; - gradeConfigId: string =''; + gradeConfigId: string = ''; grage: any[] = []; formatterDollar = (value: number): string => `${value}`; changeSub = new Subject(); constructor(public service: BaseService, private cdr: ChangeDetectorRef) {} ngOnInit(): void { - if(this.type == '2') { - this.loadData(); - + if (this.type == '2') { + this.loadData(); } + if (!this.hiden && this.type == '2') { + this.data = [ + { + gradeConfigId: '', + startAmount: 0, + endAmount: 0, + managementFeeRatio: 0, + } + ]; + } else if (!this.hiden && this.type == '1'){ + this.data = [ + { + gradeConfigId: 0, + startAmount: 0, + endAmount: 0, + managementFeeRatio: 0, + } + ]; + } + console.log(this.type); console.log(this.data); - + this.changeendAmountAction(); } @@ -39,21 +59,12 @@ export class RebateTableComponent implements OnInit { this.service.request('/api/mdc/partnerGradeConfig/listPartnerGradeConfig').subscribe(res => { if (res) { console.log(res); - this.grage = res; + this.grage = res; this.cdr.detectChanges(); } }); - // this.service.request('/api/mdc/pbc/sysConfigItem/findItemValueByItemKeys', [ - // "rebate.config.minrebatePrice" - // ]).subscribe(res => { - // if (res) { - // console.log(res); - // } - // }); } - - /** * 修改结束公里数 * @param event 车长 @@ -70,7 +81,7 @@ export class RebateTableComponent implements OnInit { this.changeSub.pipe(debounceTime(500)).subscribe((res: string) => { if (res) { console.log(res); - + const paras = res.split(','); const num = Number(paras[0]); const i = Number(paras[1]); @@ -79,7 +90,7 @@ export class RebateTableComponent implements OnInit { console.log(this.data[i].endAmount); this.data[i].endAmount = null; setTimeout(() => { - this.data[i].endAmount = this.data[i]?.startAmount + 1 ; + this.data[i].endAmount = this.data[i]?.startAmount + 1; }, 0); this.changeNextstartAmount(this.data[i]?.startAmount + 1, i + 1); return; @@ -99,7 +110,7 @@ export class RebateTableComponent implements OnInit { gradeConfigId: '', startAmount: 0, endAmount: 0, - managementFeeRatio: 0, + managementFeeRatio: 0 }); this.data = [...this.data]; } @@ -108,7 +119,7 @@ export class RebateTableComponent implements OnInit { deleteRow(index: number) { console.log(index); var newArr = this.data.concat(); - newArr.splice(this.data.length-1,1) + newArr.splice(this.data.length - 1, 1); // this.data = this.data.pop() console.log(newArr); this.data = [...newArr]; From 58d0023b4d5be257cd5f230d8c76d2e05626af6b Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 16:57:34 +0800 Subject: [PATCH 65/80] fix bug --- .../rebate-table/rebate-table.component.ts | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/src/app/shared/components/rebate-table/rebate-table.component.ts b/src/app/shared/components/rebate-table/rebate-table.component.ts index 179735ca..56dd0cee 100644 --- a/src/app/shared/components/rebate-table/rebate-table.component.ts +++ b/src/app/shared/components/rebate-table/rebate-table.component.ts @@ -1,8 +1,7 @@ import { debounceTime } from 'rxjs/operators'; import { Subject } from 'rxjs'; -import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit, Output, ViewChild } from '@angular/core'; +import { ChangeDetectorRef, Component, Input, OnInit, Output } from '@angular/core'; import { BaseService } from '@shared'; -import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; import { EventEmitter } from '@angular/core'; @Component({ selector: 'app-rebate-table', @@ -10,9 +9,9 @@ import { EventEmitter } from '@angular/core'; styleUrls: ['./rebate-table.component.less'] }) export class RebateTableComponent implements OnInit { - @Input() data: any = []; - @Input() type: any; - @Input() hiden!: boolean; + @Input() data: any = []; // 数据 + @Input() type: any; // 配置类型 1全部等级 2不同等级 + @Input() hiden!: boolean; // 判断新增/查看 @Output() private dataChange: EventEmitter = new EventEmitter(); emit() { @@ -29,6 +28,7 @@ export class RebateTableComponent implements OnInit { if (this.type == '2') { this.loadData(); } + // 新增-不同等级情况 if (!this.hiden && this.type == '2') { this.data = [ { @@ -38,6 +38,7 @@ export class RebateTableComponent implements OnInit { managementFeeRatio: 0, } ]; + // 新增-全部等级情况 } else if (!this.hiden && this.type == '1'){ this.data = [ { @@ -48,17 +49,12 @@ export class RebateTableComponent implements OnInit { } ]; } - - console.log(this.type); - console.log(this.data); - this.changeendAmountAction(); } loadData() { this.service.request('/api/mdc/partnerGradeConfig/listPartnerGradeConfig').subscribe(res => { if (res) { - console.log(res); this.grage = res; this.cdr.detectChanges(); } @@ -72,22 +68,17 @@ export class RebateTableComponent implements OnInit { */ changeendAmount(event: any, i: number) { if (event) { - console.log(event); - this.changeSub.next(`${event},${i}`); } } changeendAmountAction() { this.changeSub.pipe(debounceTime(500)).subscribe((res: string) => { if (res) { - console.log(res); - const paras = res.split(','); const num = Number(paras[0]); const i = Number(paras[1]); if (num <= this.data[i]?.startAmount) { - console.log(this.data[i].endAmount); this.data[i].endAmount = null; setTimeout(() => { this.data[i].endAmount = this.data[i]?.startAmount + 1; @@ -102,8 +93,6 @@ export class RebateTableComponent implements OnInit { } add() { - console.log(this.data); - const tem = this.data[this.data?.length - 1]; if (tem) { this.data.push({ @@ -117,11 +106,9 @@ export class RebateTableComponent implements OnInit { } deleteRow(index: number) { - console.log(index); var newArr = this.data.concat(); newArr.splice(this.data.length - 1, 1); // this.data = this.data.pop() - console.log(newArr); this.data = [...newArr]; } From d3e8365cf62668b56f47ccef932ccf07ec58ae91 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 16:59:05 +0800 Subject: [PATCH 66/80] fix bug --- .../components/rebate-table/rebate-table.component.html | 4 ++-- .../shared/components/rebate-table/rebate-table.component.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/shared/components/rebate-table/rebate-table.component.html b/src/app/shared/components/rebate-table/rebate-table.component.html index 36d3872c..c1ddf0d6 100644 --- a/src/app/shared/components/rebate-table/rebate-table.component.html +++ b/src/app/shared/components/rebate-table/rebate-table.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-25 20:18:52 * @LastEditors : Shiming - * @LastEditTime : 2022-04-26 16:20:47 + * @LastEditTime : 2022-04-26 16:58:41 * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\rebate-table\\rebate-table.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -41,7 +41,7 @@ - +
diff --git a/src/app/shared/components/rebate-table/rebate-table.component.ts b/src/app/shared/components/rebate-table/rebate-table.component.ts index 56dd0cee..0e6581fc 100644 --- a/src/app/shared/components/rebate-table/rebate-table.component.ts +++ b/src/app/shared/components/rebate-table/rebate-table.component.ts @@ -42,7 +42,7 @@ export class RebateTableComponent implements OnInit { } else if (!this.hiden && this.type == '1'){ this.data = [ { - gradeConfigId: 0, + gradeConfigId: '0', startAmount: 0, endAmount: 0, managementFeeRatio: 0, From e64feb0246e6118db6e8c0872830d9340344474f Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 19:50:36 +0800 Subject: [PATCH 67/80] fix bug --- .../rebate-setting/add/add.component.html | 4 +- .../components/config/config.component.html | 134 ++++++++++-------- .../components/config/config.component.less | 3 + .../components/config/config.component.ts | 83 ++++++++++- 4 files changed, 159 insertions(+), 65 deletions(-) diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html index e680165f..20a16e80 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-02-24 20:09:49 * @LastEditors : Shiming - * @LastEditTime : 2022-04-26 16:51:07 + * @LastEditTime : 2022-04-26 19:50:16 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -54,7 +54,7 @@ (ngModelChange)="changePartner(partnerType)" style="max-width: 400px; min-width: 200px" > - + diff --git a/src/app/routes/partner/system-config/components/config/config.component.html b/src/app/routes/partner/system-config/components/config/config.component.html index e942c052..413ced69 100644 --- a/src/app/routes/partner/system-config/components/config/config.component.html +++ b/src/app/routes/partner/system-config/components/config/config.component.html @@ -12,7 +12,7 @@

提现手续费配置

-
+
按照提现金额收取 @@ -20,7 +20,7 @@ %手续费
- +
按照提现金额收取

合伙人提现配置

-
+
@@ -45,25 +45,33 @@ -
- - - - -
-
-
- +
+ + + +
+ +
+ +
-

客服电话配置

+

客户定义配置

-
- - - -
+
+ 客户 + + 天内没有交易订单的视为“沉默客户” +
+
+ 客户 + + 天内没有交易订单的视为“沉默客户” +
+
+ 说明:交易订单指从司机已接单开始的订单。 +
@@ -90,7 +98,7 @@

短信配置

-
+

配置用户端登陆页注册帐号、修改密码、修改手机号时的短信内容

-
-
-
-

通知配置

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-

客服电话配置

-
-
- - - -
-
-

证件提醒配置

-
-
- - 距离到期时间 - - 天开始提醒,每隔 - - 天提醒一次 - -
-
+
diff --git a/src/app/routes/partner/system-config/components/config/config.component.ts b/src/app/routes/partner/system-config/components/config/config.component.ts index a7501487..bbac9eb1 100644 --- a/src/app/routes/partner/system-config/components/config/config.component.ts +++ b/src/app/routes/partner/system-config/components/config/config.component.ts @@ -1,8 +1,23 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { SFComponent, SFSchema, SFUploadWidgetSchema } from '@delon/form'; -import { Observable, Observer } from 'rxjs'; +import { NzUploadFile } from 'ng-zorro-antd/upload'; +import { Observable, Observer, of } from 'rxjs'; import { ConfigService } from '../../services/config.service'; - +import { apiConf } from '@conf/api.conf'; +const IMAGECONFIG = { + previewFile: (file: NzUploadFile) => of(file.url), + action: apiConf.waterFileUpload, + fileType: 'image/png,image/jpeg,image/jpg,image/gif', + fileSize: 5120, + limit: 1, + limitFileCount: 1, + resReName: 'data.fullFileWatermarkPath', + urlReName: 'data.fullFileWatermarkPath', + widget: 'upload', + name: 'multipartFile', + multiple: false, + listType: 'picture-card' +} as SFUploadWidgetSchema; @Component({ selector: 'app-parterl-config', templateUrl: './config.component.html', @@ -10,6 +25,7 @@ import { ConfigService } from '../../services/config.service'; }) export class PartnerSystemConfigComponent implements OnInit { @ViewChild('sf', { static: false }) sf!: SFComponent; + @ViewChild('sf2', { static: false }) sf2!: SFComponent; formDate: any = { isAudit: false, isEveryDay: false, @@ -62,21 +78,23 @@ export class PartnerSystemConfigComponent implements OnInit { i: any; schema!: SFSchema; + schema2!: SFSchema; - imageConfig = { - widget: 'upload', - action: `/scm/cms/cms/upload/multipartFile/fileModel`, - limit: 1, - limitFileCount: 1, - resReName: 'url', - urlReName: 'url', - data: { - appId: this.service.envSrv.getEnvironment().appId - }, - multiple: false, - listType: 'picture-card', - showRequired: true - }; + // IMAGECONFIG = { + // widget: 'upload', + // action: `/scm/cms/cms/upload/multipartFile/fileModel`, + // limit: 1, + // limitFileCount: 1, + // resReName: 'url', + // urlReName: 'url', + // data: { + // appId: this.service.envSrv.getEnvironment().appId + // }, + // multiple: false, + // listType: 'picture-card', + // showRequired: true + // }; + constructor(private service: ConfigService) {} ngOnInit() { @@ -155,105 +173,117 @@ export class PartnerSystemConfigComponent implements OnInit { this.schema = { properties: { - sysMinLogo: { + roadTransportPhoto: { title: '', type: 'string', ui: { hidden: true } }, + roadTransportPhotoWatermark: { type: 'string', - title: '系统LOGO(小)', - // enum: [], + title: '分享海报', ui: { - ...this.imageConfig, - descriptionI18n: '小尺寸logo,支持JPG、PNG格式,文件小于2M(建议尺寸32*32px)。', + ...IMAGECONFIG, + descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸 750px* 1624 px)。', change: args => { if (args.type === 'success') { - const avatar = this.getImageModel(args, 'sysMinLogo'); - this.sf?.setValue('/sysMinLogo', avatar); - this.i.sysMinLogo = avatar; + this.sf.setValue('/roadTransportPhoto', args.fileList[0].response.data.fullFilePath); } }, - beforeUpload: this.uploadBefore } as SFUploadWidgetSchema }, - sysMaxLogo: { + share: { title: '', type: 'string', ui: { hidden: true } }, + shareWatermark: { type: 'string', - title: '系统LOGO(大)', + title: '分享图', ui: { - ...this.imageConfig, - descriptionI18n: '小尺寸logo,支持JPG、PNG格式,文件小于2M(建议尺寸32*32px)。', + ...IMAGECONFIG, + descriptionI18n: '支持JPG、PNG格式,文件小于2M( 建议尺寸 856px * 688px)。', change: args => { if (args.type === 'success') { - const avatar = this.getImageModel(args, -1); - this.sf?.setValue('/sysMaxLogo', avatar); - this.i.sysMaxLogo = avatar; + this.sf.setValue('/share', args.fileList[0].response.data.fullFilePath); } }, - beforeUpload: this.uploadBefore } as SFUploadWidgetSchema }, - sysMaxLogo1: { + take: { title: '', type: 'string', ui: { hidden: true } }, + takeWatermark: { type: 'string', - title: '用户默认头像', + title: '受邀海报', ui: { - ...this.imageConfig, - descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸60*60px)。', + ...IMAGECONFIG, + descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸 750px* 1624 px)。', change: args => { if (args.type === 'success') { - const avatar = this.getImageModel(args, -1); - this.sf?.setValue('/sysMaxLogo1', avatar); - this.i.sysMaxLogo1 = avatar; + this.sf.setValue('/take', args.fileList[0].response.data.fullFilePath); } }, - beforeUpload: this.uploadBefore } as SFUploadWidgetSchema }, - sysMaxLogo2: { + complianceRemark: { + title: '分享文案', type: 'string', - title: '企业默认头像', + maxLength: 50, ui: { - ...this.imageConfig, - descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸60*60px)。', - change: args => { - if (args.type === 'success') { - const avatar = this.getImageModel(args, -1); - this.sf?.setValue('/sysMaxLogo2', avatar); - this.i.sysMaxLogo2 = avatar; - } - }, - beforeUpload: this.uploadBefore - } as SFUploadWidgetSchema - }, - sysMaxLogo3: { - type: 'string', - title: '货主PC端登陆页海报', - ui: { - ...this.imageConfig, - descriptionI18n: '支持JPG、PNG格式,文件小于5M(建议尺寸1920*630px)。', - change: args => { - if (args.type === 'success') { - const avatar = this.getImageModel(args, -1); - this.sf?.setValue('/sysMaxLogo3', avatar); - this.i.sysMaxLogo3 = avatar; - } - }, - beforeUpload: this.uploadBefore - } as SFUploadWidgetSchema - }, - sysMaxLogo4: { - type: 'string', - title: 'APP开屏海报', - ui: { - ...this.imageConfig, - descriptionI18n: '支持JPG、PNG格式,文件小于5M(建议尺寸375*773px)。', - change: args => { - if (args.type === 'success') { - const avatar = this.getImageModel(args, -1); - this.sf?.setValue('/sysMaxLogo4', avatar); - this.i.sysMaxLogo4 = avatar; - } - }, - beforeUpload: this.uploadBefore - } as SFUploadWidgetSchema - }, + placeholder: '请不要超过50个字', + widget: 'textarea', + autosize: { minRows: 3, maxRows: 6 } + } + } }, - required: ['sysMinLogo', 'sysMaxLogo', 'sysMaxLogo1', 'sysMaxLogo2', 'sysMaxLogo3', 'sysMaxLogo4'] + required: ['roadTransportPhotoWatermark', 'shareWatermark', 'takeWatermark', 'complianceRemark'] + }; + this.schema2 = { + properties: { + roadTransportPhoto: { title: '', type: 'string', ui: { hidden: true } }, + roadTransportPhotoWatermark: { + type: 'string', + title: '分享海报', + ui: { + ...IMAGECONFIG, + descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸750px* 1624 px)。', + change: args => { + if (args.type === 'success') { + this.sf2.setValue('/roadTransportPhoto', args.fileList[0].response.data.fullFilePath); + } + }, + } as SFUploadWidgetSchema + }, + share: { title: '', type: 'string', ui: { hidden: true } }, + shareWatermark: { + type: 'string', + title: '分享图', + ui: { + ...IMAGECONFIG, + descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸 856px * 688px)。', + change: args => { + if (args.type === 'success') { + this.sf2.setValue('/share', args.fileList[0].response.data.fullFilePath); + } + }, + } as SFUploadWidgetSchema + }, + take: { title: '', type: 'string', ui: { hidden: true } }, + takeWatermark: { + type: 'string', + title: '受邀海报', + ui: { + ...IMAGECONFIG, + descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸750px* 1624 px)。', + change: args => { + if (args.type === 'success') { + this.sf2.setValue('/take', args.fileList[0].response.data.fullFilePath); + } + }, + } as SFUploadWidgetSchema + }, + complianceRemark: { + title: '分享文案', + type: 'string', + maxLength: 50, + ui: { + placeholder: '请不要超过50个字', + widget: 'textarea', + autosize: { minRows: 3, maxRows: 6 } + } + } + }, + required: ['roadTransportPhotoWatermark', 'shareWatermark', 'takeWatermark', 'complianceRemark'] }; } private uploadBefore = (file: any, fileList: any) => { From 5969a77c6b6e64c1f5dd73dd96b9dbe6d85e6e08 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 20:27:08 +0800 Subject: [PATCH 70/80] fix bug --- .../routes/vehicle/components/list/detail/detail.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/routes/vehicle/components/list/detail/detail.component.ts b/src/app/routes/vehicle/components/list/detail/detail.component.ts index 9e729f83..69654d5e 100644 --- a/src/app/routes/vehicle/components/list/detail/detail.component.ts +++ b/src/app/routes/vehicle/components/list/detail/detail.component.ts @@ -28,7 +28,7 @@ export class VehicleComponentsListDetailComponent implements OnInit { modalName = ''; ui!: SFUISchema; columns!: STColumn[]; - uploadURl = apiConf.fileUpload; + uploadURl = apiConf.waterFileUpload; schema!: SFSchema; @ViewChild('sf', { static: false }) sf!: SFComponent; schema1!: SFSchema; @@ -219,7 +219,7 @@ export class VehicleComponentsListDetailComponent implements OnInit { changeUpload({ file, fileList, type }: any, key: string) { console.log({ file, fileList, type }); if (type === 'success') { - this.detailData[key] = file.response.data.fullFilePath; + this.detailData[key] = file.response.data.fullFileWatermarkPath; } } deleteImg(key: string) { From 3ffde89a2132a3be1068076604c3c4c76cf5d004 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 20:29:51 +0800 Subject: [PATCH 71/80] fix bug --- .../routes/vehicle/components/audit/detail/detail.component.ts | 1 + .../routes/vehicle/components/list/detail/detail.component.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/app/routes/vehicle/components/audit/detail/detail.component.ts b/src/app/routes/vehicle/components/audit/detail/detail.component.ts index 89ece581..5702d767 100644 --- a/src/app/routes/vehicle/components/audit/detail/detail.component.ts +++ b/src/app/routes/vehicle/components/audit/detail/detail.component.ts @@ -137,6 +137,7 @@ export class VehicleComponentsAuditDetailComponent implements OnInit, OnDestroy reset() { this.detailData = { ...this.tempalateData }; this.isEdit = false; + this.getDetailList(); } save() { diff --git a/src/app/routes/vehicle/components/list/detail/detail.component.ts b/src/app/routes/vehicle/components/list/detail/detail.component.ts index 69654d5e..62cb659d 100644 --- a/src/app/routes/vehicle/components/list/detail/detail.component.ts +++ b/src/app/routes/vehicle/components/list/detail/detail.component.ts @@ -247,6 +247,7 @@ export class VehicleComponentsListDetailComponent implements OnInit { reset() { this.detailData = { ...this.tempalateData }; this.isEdit = false; + this.getDetailList(); } save() { From 0b99448629da6795f560478d9a06eb3642c7f686 Mon Sep 17 00:00:00 2001 From: weiyu Date: Tue, 26 Apr 2022 20:38:37 +0800 Subject: [PATCH 72/80] =?UTF-8?q?=E5=8F=AF=E5=BC=80=E7=A5=A8=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../billing-order.component.html | 4 +- .../billing-order/billing-order.component.ts | 64 +++++++++---------- .../services/ticket.service.ts | 4 +- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/app/routes/ticket-management/components/billing-order/billing-order.component.html b/src/app/routes/ticket-management/components/billing-order/billing-order.component.html index 85530e83..3f494035 100644 --- a/src/app/routes/ticket-management/components/billing-order/billing-order.component.html +++ b/src/app/routes/ticket-management/components/billing-order/billing-order.component.html @@ -13,7 +13,7 @@ class="text-right"> - +