From 01a6f77138dcdaec38cfb7ff0405df3e8ec93d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Wed, 20 Apr 2022 14:06:11 +0800 Subject: [PATCH 01/24] - --- .gitignore | 1 + .husky/_/husky.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 .gitignore create mode 100644 .husky/_/husky.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..08b25532 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/.husky/_/husky.sh b/.husky/_/husky.sh new file mode 100644 index 00000000..ca2720e0 --- /dev/null +++ b/.husky/_/husky.sh @@ -0,0 +1,30 @@ +#!/bin/sh +if [ -z "$husky_skip_init" ]; then + debug () { + [ "$HUSKY_DEBUG" = "1" ] && echo "husky (debug) - $1" + } + + readonly hook_name="$(basename "$0")" + debug "starting $hook_name..." + + if [ "$HUSKY" = "0" ]; then + debug "HUSKY env variable is set to 0, skipping hook" + exit 0 + fi + + if [ -f ~/.huskyrc ]; then + debug "sourcing ~/.huskyrc" + . ~/.huskyrc + fi + + export readonly husky_skip_init=1 + sh -e "$0" "$@" + exitCode="$?" + + if [ $exitCode != 0 ]; then + echo "husky - $hook_name hook exited with code $exitCode (error)" + exit $exitCode + fi + + exit 0 +fi From f7752b939e6659b1238ef6c79ecfcc7030de0d0c Mon Sep 17 00:00:00 2001 From: weiyu Date: Thu, 21 Apr 2022 10:00:29 +0800 Subject: [PATCH 02/24] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../invoice-reporting/invoice-reporting.component.html | 4 ++++ .../invoice-reporting/invoice-reporting.component.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.html b/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.html index 3cafec0a..cd79aaa1 100644 --- a/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.html +++ b/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.html @@ -46,6 +46,10 @@ 增值税专用发票 + + 有效 + 作废 +
{{item?.orderAmount | currency }}
diff --git a/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.ts b/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.ts index 304974d5..a823f12c 100644 --- a/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.ts +++ b/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.ts @@ -231,7 +231,7 @@ export class TaxManagementInvoiceReportingComponent implements OnInit { { title: '价税合计', index: 'vatmoney', className: 'text-center', width: '180px' }, { title: '开票日期', index: 'invoicedate', className: 'text-center', width: '180px' }, { title: '发票所属月份', index: 'invoicemonth', className: 'text-center', width: '250px' }, - { title: '发票状态', index: 'sts', className: 'text-center', width: '200px' }, + { title: '发票状态', index: 'sts', render:'sts', className: 'text-center', width: '200px' }, { title: '上传日期', index: 'uoloadDate', className: 'text-center', width: '200px' }, ]; } From 092daa83e230928b0e6b017a527b7134ae121e00 Mon Sep 17 00:00:00 2001 From: weiyu Date: Thu, 21 Apr 2022 15:33:57 +0800 Subject: [PATCH 03/24] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../invoice-reporting.component.html | 4 ++-- .../invoice-reporting.component.ts | 15 +++++++++------ .../services/tax-management.service.ts | 5 +++++ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.html b/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.html index cd79aaa1..c8ef14e3 100644 --- a/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.html +++ b/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.html @@ -9,7 +9,7 @@
- +
- + diff --git a/src/app/routes/sys-setting/components/sms-template/sms-template.component.ts b/src/app/routes/sys-setting/components/sms-template/sms-template.component.ts index 60295812..ea80d563 100644 --- a/src/app/routes/sys-setting/components/sms-template/sms-template.component.ts +++ b/src/app/routes/sys-setting/components/sms-template/sms-template.component.ts @@ -21,6 +21,7 @@ export class SmsTemplateComponent implements OnInit { visible = false; isVisible = false; tempData = {}; + isEdit = false; searchSchema: SFSchema = { properties: { @@ -52,7 +53,8 @@ export class SmsTemplateComponent implements OnInit { templateCode: { type: 'string', title: '模板编码', - ui: { placeholder: '请输入模板编码' } + readOnly: this.isEdit ? true : false, + ui: { placeholder: '请输入模板编码', } }, templateContent: { type: 'string', @@ -100,6 +102,7 @@ export class SmsTemplateComponent implements OnInit { edit(item: any) { // console.log(item); + this.isEdit = true; this.tempData = item; this.isVisible = true; } @@ -117,6 +120,12 @@ export class SmsTemplateComponent implements OnInit { this.visible = false; } + add() { + this.isEdit = false; + this.tempData = {}; + this.isVisible = true; + } + handleOk(): void { const value = this.sfEdit.value; const { id, templateCode, templateName, templateContent } = value diff --git a/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.html b/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.html index 3ed4ee8f..d308c5e6 100644 --- a/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.html +++ b/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.html @@ -34,12 +34,6 @@ 上传中 上传异常 - - {{item.artoname}} - - - {{item.billHCode}} - 增值税专用发票 From 49e38901a3d7af66b14d9f12f652056321974a1c Mon Sep 17 00:00:00 2001 From: weiyu Date: Fri, 22 Apr 2022 10:11:56 +0800 Subject: [PATCH 07/24] =?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/sms-template/sms-template.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/routes/sys-setting/components/sms-template/sms-template.component.ts b/src/app/routes/sys-setting/components/sms-template/sms-template.component.ts index ea80d563..00a68bbe 100644 --- a/src/app/routes/sys-setting/components/sms-template/sms-template.component.ts +++ b/src/app/routes/sys-setting/components/sms-template/sms-template.component.ts @@ -53,7 +53,7 @@ export class SmsTemplateComponent implements OnInit { templateCode: { type: 'string', title: '模板编码', - readOnly: this.isEdit ? true : false, + readOnly: this.isEdit, ui: { placeholder: '请输入模板编码', } }, templateContent: { @@ -103,6 +103,8 @@ export class SmsTemplateComponent implements OnInit { edit(item: any) { // console.log(item); this.isEdit = true; + this.editSchema!.properties!.templateCode.readOnly = true; + this.sfEdit?.refreshSchema(); this.tempData = item; this.isVisible = true; } @@ -122,6 +124,8 @@ export class SmsTemplateComponent implements OnInit { add() { this.isEdit = false; + this.editSchema!.properties!.templateCode.readOnly = false; + this.sfEdit?.refreshSchema(); this.tempData = {}; this.isVisible = true; } From 488d6f7e697ba8dd33fff604af909ac6c5b15365 Mon Sep 17 00:00:00 2001 From: weiyu Date: Fri, 22 Apr 2022 17:28:03 +0800 Subject: [PATCH 08/24] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../routes/account/account-routing.module.ts | 12 +- src/app/routes/account/account.module.ts | 4 +- .../components/center/center.component.html | 47 +++- .../components/center/center.component.less | 2 +- .../components/center/center.component.ts | 28 +++ .../edit-paypassword.component.html | 171 +++++++++++++ .../edit-paypassword.component.less | 93 +++++++ .../edit-paypassword.component.spec.ts | 23 ++ .../edit-paypassword.component.ts | 237 ++++++++++++++++++ .../account/services/account.service.ts | 9 + .../sms-template/sms-template.component.html | 2 +- .../sms-template/sms-template.component.ts | 48 ++-- .../invoice-reporting.component.html | 2 +- .../invoice-reporting.component.ts | 2 +- .../components/captcha/captcha.module.ts | 11 + src/app/shared/components/captcha/index.ts | 1 + src/app/shared/shared-third.module.ts | 1 + src/app/shared/shared.module.ts | 2 + 18 files changed, 657 insertions(+), 38 deletions(-) create mode 100644 src/app/routes/account/components/edit-paypassword/edit-paypassword.component.html create mode 100644 src/app/routes/account/components/edit-paypassword/edit-paypassword.component.less create mode 100644 src/app/routes/account/components/edit-paypassword/edit-paypassword.component.spec.ts create mode 100644 src/app/routes/account/components/edit-paypassword/edit-paypassword.component.ts create mode 100644 src/app/shared/components/captcha/captcha.module.ts diff --git a/src/app/routes/account/account-routing.module.ts b/src/app/routes/account/account-routing.module.ts index 8a7ce180..bfc01865 100644 --- a/src/app/routes/account/account-routing.module.ts +++ b/src/app/routes/account/account-routing.module.ts @@ -12,6 +12,7 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { AccountComponentsCenterComponent } from './components/center/center.component'; +import { AccountComponentsEditPayPasswordComponent } from './components/edit-paypassword/edit-paypassword.component' const routes: Routes = [ { path: '', redirectTo: 'center', pathMatch: 'full' }, @@ -21,7 +22,16 @@ const routes: Routes = [ data: { title: '账户中心' } - } + }, + { + path: 'edit-paypassword', + component: AccountComponentsEditPayPasswordComponent, + data: { + title: '修改支付密码', + titleI18n: 'app.my.edit.paypassword', + // guard: {ability: ['accountcenter-editpaypassword']} + }, + }, ]; @NgModule({ diff --git a/src/app/routes/account/account.module.ts b/src/app/routes/account/account.module.ts index 96606efa..8253c4dc 100644 --- a/src/app/routes/account/account.module.ts +++ b/src/app/routes/account/account.module.ts @@ -15,11 +15,13 @@ import { AccountRoutingModule } from './account-routing.module'; import { AccountComponentsCenterComponent } from './components/center/center.component'; import { AccountComponentsEditNameComponent } from './components/edit-name/edit-name.component'; import { AccountComponentsCenterEditComponent } from './components/edit-password/edit-password.component'; +import { AccountComponentsEditPayPasswordComponent } from './components/edit-paypassword/edit-paypassword.component' const COMPONENTS = [ AccountComponentsCenterComponent, AccountComponentsEditNameComponent, - AccountComponentsCenterEditComponent + AccountComponentsCenterEditComponent, + AccountComponentsEditPayPasswordComponent ]; const COMPONENTS_NOROUNT = [AccountComponentsEditNameComponent]; diff --git a/src/app/routes/account/components/center/center.component.html b/src/app/routes/account/components/center/center.component.html index d9df68c0..63524689 100644 --- a/src/app/routes/account/components/center/center.component.html +++ b/src/app/routes/account/components/center/center.component.html @@ -10,11 +10,11 @@ 手机号码/账号
{{ infoData.phone }}
-
+
已绑定 - 未绑定 + style="color: #52c41a"> 已绑定 + 未绑定
@@ -30,19 +30,44 @@
定期更换密码有助于账号安全
- 已设置 - 未设置 + 已设置 + 未设置
+ + + +
+
+ + 支付密码 +
+
定期更换支付密码有助于账号安全
+
+ 已设置 + 未设置 +
+
+
+
+ +
- + \ No newline at end of file diff --git a/src/app/routes/account/components/center/center.component.less b/src/app/routes/account/components/center/center.component.less index 96f8b59c..1df38e55 100644 --- a/src/app/routes/account/components/center/center.component.less +++ b/src/app/routes/account/components/center/center.component.less @@ -17,7 +17,7 @@ right: 20px; } .item-btn { - width: 28px; + width: 36px; text-align: center; } .li-label { diff --git a/src/app/routes/account/components/center/center.component.ts b/src/app/routes/account/components/center/center.component.ts index 713b106b..504529c6 100644 --- a/src/app/routes/account/components/center/center.component.ts +++ b/src/app/routes/account/components/center/center.component.ts @@ -53,6 +53,8 @@ export class AccountComponentsCenterComponent implements OnInit { }, ]; idx: any = 0; + defaultCompany: any = {}; + ifHasPayPw = false; constructor(public service: AccountService, private modal: ModalHelper, private http: _HttpClient, private router: Router, private modalService: NzModalService,) {} ngOnInit() { @@ -136,9 +138,31 @@ export class AccountComponentsCenterComponent implements OnInit { getInfo() { this.service.http.post(this.service.$api_get_current_user_info).subscribe((res) => { this.infoData = res.data; + this.getDeafaultCompany(); }); } + getDeafaultCompany() { + this.service.request(this.service.$api_getUserDefaultEnterpriseProject).subscribe(res => { + if (res === null) { + this.router.navigate(['/changeproject']); + return; + } + this.defaultCompany = res + if (res.projectId) { + this.getPayPw() + } + }) + } + + getPayPw() { + this.service.request(this.service.$api_isUserVerifyPassword, {}).subscribe(res => { + this.ifHasPayPw = res + }) + } + + + edit(tpye: string) { if (tpye === 'phone') { const modalRef = this.modalService.create({ @@ -170,6 +194,10 @@ export class AccountComponentsCenterComponent implements OnInit { } }); } + + if (tpye === 'payPassword') { + this.router.navigate(['/account/edit-paypassword']); + } // if (tpye === 'info') { // this.router.navigate(['/account/editInfo'], { // queryParams: { realName: this.infoData.realName, certificateNumber: this.infoData.certificateNumber }, diff --git a/src/app/routes/account/components/edit-paypassword/edit-paypassword.component.html b/src/app/routes/account/components/edit-paypassword/edit-paypassword.component.html new file mode 100644 index 00000000..c985b970 --- /dev/null +++ b/src/app/routes/account/components/edit-paypassword/edit-paypassword.component.html @@ -0,0 +1,171 @@ + + + + + + +
+
+
+ + + + + + + + + + + {{ index + 1 }} + + +
+ +
+
+ + + + + + +
+ +
+
+
+ +
+
+ + 设置支付密码 + + + + + + + + + + + + + + + + 请输入支付密码! + + 6位数字,不能为连续数字或者相同数字(如123456、111111) + + + + + + 重复支付密码 + + + + + + + + + + + + + + + + 请输入确认密码! + 两次输入的密码不一致! + + + + + + + + +
+
+
+
+ +
+

密码设置成功

+

请牢记您的新支付密码,3秒后自动跳转至个人中心...

+ +
+
+
+
+
+
+
+ + + + 获取验证码 + + + + {{ count > 0 ? '请等待' + count + 's' : ('app.register.get-verification-code') }} + + + diff --git a/src/app/routes/account/components/edit-paypassword/edit-paypassword.component.less b/src/app/routes/account/components/edit-paypassword/edit-paypassword.component.less new file mode 100644 index 00000000..229e8a87 --- /dev/null +++ b/src/app/routes/account/components/edit-paypassword/edit-paypassword.component.less @@ -0,0 +1,93 @@ +:host { + ::ng-deep { + page-grid { + background-color: #f0f3f7; + + div.container { + width: 80%; + margin: 0 auto; + padding: 30px 1rem 1rem; + } + } + + .ant-steps-item-process .ant-steps-item-icon { + background-color: #3370ff; + border-color: #3370ff; + } + + .ant-steps-item-finish > .ant-steps-item-container > .ant-steps-item-icon { + background: #3370ff; + } + + .ant-steps-dot .ant-steps-item-icon, + .ant-steps-dot.ant-steps-small .ant-steps-item-icon { + width: 32px; + height: 32px; + margin-left: 55px; + line-height: 32px; + border: 1px solid rgba(0, 0, 0, 0.25); + } + + // 文本 + .ant-steps-item-wait .ant-steps-item-icon > .ant-steps-icon { + color: #000; + } + + // 连接线 + .ant-steps-dot .ant-steps-item-tail, + .ant-steps-dot.ant-steps-small .ant-steps-item-tail { + top: 12px; + margin: 0 0 0 90px; + } + + .ant-steps-item-wait > .ant-steps-item-container > .ant-steps-item-tail::after { + background-color: rgba(0, 0, 0, 0.25); + } + + .ant-steps-dot .ant-steps-item-process .ant-steps-item-icon, + .ant-steps-dot.ant-steps-small .ant-steps-item-process .ant-steps-item-icon { + width: 32px; + height: 32px; + line-height: 32px; + } + + .ant-steps-item-process > .ant-steps-item-container > .ant-steps-item-tail::after { + background-color: rgba(0, 0, 0, 0.25); + } + + .ant-steps-dot .ant-steps-item-tail::after, + .ant-steps-dot.ant-steps-small .ant-steps-item-tail::after { + width: calc(100% - 62px); + height: 1.5px; + margin-left: 12px; + } + } +} + +.success-card { + text-align: center; + + .card-icon { + display: flex; + align-items: center; + justify-content: center; + width: 36px; + height: 36px; + margin: auto; + background-color: #52c41a; + border-radius: 50%; + } + + .card-title { + margin: 14px 0 0; + font-weight: bold; + font-size: 16px; + text-align: center; + } + + .card-descr { + margin: 8px 0 0; + font-size: 14px; + text-align: center; + } +} diff --git a/src/app/routes/account/components/edit-paypassword/edit-paypassword.component.spec.ts b/src/app/routes/account/components/edit-paypassword/edit-paypassword.component.spec.ts new file mode 100644 index 00000000..d3ce290b --- /dev/null +++ b/src/app/routes/account/components/edit-paypassword/edit-paypassword.component.spec.ts @@ -0,0 +1,23 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { AccountComponentsEditPayPasswordComponent } from './edit-paypassword.component'; + +describe('AccountComponentsEditPayPasswordComponent', () => { + let component: AccountComponentsEditPayPasswordComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [AccountComponentsEditPayPasswordComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AccountComponentsEditPayPasswordComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/account/components/edit-paypassword/edit-paypassword.component.ts b/src/app/routes/account/components/edit-paypassword/edit-paypassword.component.ts new file mode 100644 index 00000000..881603c4 --- /dev/null +++ b/src/app/routes/account/components/edit-paypassword/edit-paypassword.component.ts @@ -0,0 +1,237 @@ +import { AfterViewInit, Component, Inject, OnInit, Optional, ViewChild } from '@angular/core'; +import { FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { ReuseTabService } from '@delon/abc/reuse-tab'; +import { DA_SERVICE_TOKEN, ITokenService } from '@delon/auth'; +import { SFComponent, SFSchema, SFTextareaWidgetSchema, SFTextWidgetSchema, SFUISchema } from '@delon/form'; +import { SettingsService } from '@delon/theme'; +import { CaptchaComponent } from 'src/app/shared/components/captcha'; + +import { AccountService } from '../../services/account.service'; + +@Component({ + selector: 'app-account-components-edit-password', + templateUrl: './edit-paypassword.component.html', + styleUrls: ['./edit-paypassword.component.less'], +}) +export class AccountComponentsEditPayPasswordComponent implements OnInit, AfterViewInit { + @ViewChild('dun', { static: false }) + private dun!: CaptchaComponent; + + step: 0 | 1 | 2 = 0; + + step1Schema!: SFSchema; + ui!: SFUISchema; + @ViewChild('step1sf', { static: false }) + step1sf!: SFComponent; + + phone: string; + + formGroup3!: FormGroup; + confirmPasswordValidator!: ValidatorFn; + + isShowPwd = false; + isShowConfirmPwd = false; + + count = 0; + interval$: any; + + constructor( + private fb: FormBuilder, + public service: AccountService, + private route: ActivatedRoute, + private settingService: SettingsService, + private router: Router, + @Inject(ReuseTabService) + private reuseTabService: ReuseTabService, + @Optional() + @Inject(DA_SERVICE_TOKEN) + private tokenService: ITokenService, + ) { + this.phone = route.snapshot.queryParams.phone; + } + + ngAfterViewInit(): void { + this.dun.init(); + } + + ngOnInit() { + if (this.phone) { + this.initStep1SF(); + } else { + this.service.http.post(this.service.$api_get_current_user_info).subscribe((res) => { + if (res) { + this.phone = res.data?.phone; + this.initStep1SF(); + } + }); + } + + this.confirmPasswordValidator = (control) => { + if (!control.value) { + return { error: true, required: true }; + } else if (control.value !== this.formGroup3.controls.passWord.value) { + return { passWordTo: true, error: true }; + } + return {}; + }; + + this.formGroup3 = this.fb.group({ + passWord: [ + null, + [ + Validators.required, + Validators.maxLength(6), + Validators.minLength(6), + Validators.pattern('([\\d]){6,6}'), + this.blurTestPw + + ], + ], + passWordTo: [null, [this.confirmPasswordValidator, Validators.required, Validators.maxLength(6), Validators.minLength(6)]], + voucher: [null, [Validators.required]], + }); + } + + initStep1SF() { + this.step1Schema = { + properties: { + phone: { + title: '手机号', + type: 'string', + ui: { + widget: 'text', + defaultText: this.phone.toString(), + } as SFTextWidgetSchema, + }, + smsVerifyCode: { + type: 'string', + title: '验证码', + ui: { + widget: 'custom', + errors: { + required: '请输入验证码', + }, + } as SFTextareaWidgetSchema, + }, + }, + required: ['smsVerifyCode'], + }; + + this.ui = { + '*': { spanLabelFixed: 90, grid: { span: 16, gutter: 4 } }, + }; + } + + nextStep() { + if (this.step1sf.valid) { + this.service.request(this.service.$api_get_verifyPhone, this.step1sf.value).subscribe((res) => { + if (res) { + this.formGroup3.patchValue(res, { onlySelf: true }); + this.step = 1; + this.count = 0; + clearInterval(this.interval$); + } + }); + } + } + + formSubmit() { + for (const i in this.formGroup3.controls) { + if (true) { + this.formGroup3.controls[i].markAsDirty(); + this.formGroup3.controls[i].updateValueAndValidity(); + } + } + + if (this.formGroup3.valid) { + const param = Object.assign({}, this.formGroup3.value); + this.service.http.post(this.service.$api_voucherUpdatePayPassword, param).subscribe((res) => { + if (res.success === true) { + this.step++; + setTimeout(() => { + // this.settingService.setUser({}); + // // 清空路由复用信息 + // this.reuseTabService.clear(); + // // 设置用户Token信息 + // this.tokenService.clear(); + this.router.navigate(['/account/center']); + }, 3000); + } + }); + } + } + + getMsgCode() { + if (this.phone) { + this.getCode(`${this.service.$api_get_msg_code}`); + } else { + this.service.request(this.service.$api_get_current_user_info).subscribe((res) => { + this.phone = res.phone; + this.getCode(`${this.service.$api_get_msg_code}`); + }); + } + } + goBack() { + window.history.go(-1); + } + getCode(url: string, params?: any) { + this.service.http.post(url, null, params).subscribe((res) => { + // code==503046 弹出网易盾 + if (res.success && res.data.code === '1') { + this.service.msgSrv.success('发送成功'); + this.codeCountDown(); + } else if (res.data.code === '503046') { + this.dun.popUp(); + } else { + this.service.msgSrv.success(res.sendResult); + } + }); + } + /* code倒计时 */ + codeCountDown() { + this.count = 59; + this.interval$ = setInterval(() => { + this.count -= 1; + if (this.count <= 0) { + clearInterval(this.interval$); + } + }, 1000); + } + /* 网易盾验证通过 */ + captchaDone(validate: any) { + this.codeCountDown(); + } + + validateConfirmPassword(): void { + + setTimeout(() => this.formGroup3.controls.passWordTo.updateValueAndValidity()); + } + // blurTestPw(){ + // const reg = /[^\d]/g + // const val: any = this.formGroup3.controls.passWord.value + // if(val.length === 6) { + // const pattern = /([\d])\1{2,}/g + // const pattern2 = /(?:(?:0(?=1)|1(?=2)|2(?=3)|3(?=4)|4(?=5)|5(?=6)|6(?=7)|7(?=8)|8(?=9)){5}|(?:9(?=8)|8(?=7)|7(?=6)|6(?=5)|5(?=4)|4(?=3)|3(?=2)|2(?=1)|1(?=0)){5})\d/g + // if(pattern.test(val) || pattern2.test(val)){ + // return false + // } else { + // return true + // } + // } else { + // return false + // } + // } + blurTestPw = (control: FormControl): { [s: string]: boolean } => { + if (!control.value) { + return { required: true }; + } else if (control.value.length === 6) { + const pattern = /([\d])\1{2,}/g + const pattern2 = /(?:(?:0(?=1)|1(?=2)|2(?=3)|3(?=4)|4(?=5)|5(?=6)|6(?=7)|7(?=8)|8(?=9)){5}|(?:9(?=8)|8(?=7)|7(?=6)|6(?=5)|5(?=4)|4(?=3)|3(?=2)|2(?=1)|1(?=0)){5})\d/g + if(pattern.test(control.value) || pattern2.test(control.value)){ + return { confirm: true, error: true }; + } + } + return {}; + }; +} diff --git a/src/app/routes/account/services/account.service.ts b/src/app/routes/account/services/account.service.ts index 69608398..a7911ee7 100644 --- a/src/app/routes/account/services/account.service.ts +++ b/src/app/routes/account/services/account.service.ts @@ -36,6 +36,15 @@ export class AccountService extends BaseService { $api_set_voucherUpdatePhone = `/api/mdc/cuc/userBasicInfo/forgetPassword/voucherUpdatePhone`; // 凭证修改密码 $api_set_phoneUpdatePassword = `/api/mdc/cuc/userBasicInfo/phoneUpdatePassword`; + // 凭证修改设置身份密码 + $api_voucherUpdatePayPassword = '/api/mdc/cuc/userVerify/forgetPassword/voucherUpdatePassword'; + // 根据当前登录用户绑定的手机号码获取短信验证码 + public $api_get_msg_code = `/api/mdc/pbc/smsSend/getSmVerificationCodeByToken`; + // 用户下默认企业项目 + $api_getUserDefaultEnterpriseProject = '/api/mdc/cuc/enterpriseProject/getUserDefaultEnterpriseProject'; + // 当前登录用户是否设置用户验证密码 + $api_isUserVerifyPassword = '/api/mdc/cuc/userVerify/isUserVerifyPassword'; + constructor(public injector: Injector) { super(injector); } diff --git a/src/app/routes/sys-setting/components/sms-template/sms-template.component.html b/src/app/routes/sys-setting/components/sms-template/sms-template.component.html index dbe3cff1..2b413ab5 100644 --- a/src/app/routes/sys-setting/components/sms-template/sms-template.component.html +++ b/src/app/routes/sys-setting/components/sms-template/sms-template.component.html @@ -24,7 +24,7 @@ - + diff --git a/src/app/routes/sys-setting/components/sms-template/sms-template.component.ts b/src/app/routes/sys-setting/components/sms-template/sms-template.component.ts index 00a68bbe..43d1df9c 100644 --- a/src/app/routes/sys-setting/components/sms-template/sms-template.component.ts +++ b/src/app/routes/sys-setting/components/sms-template/sms-template.component.ts @@ -1,5 +1,5 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { AfterViewInit, ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFSchema } from '@delon/form'; @@ -18,11 +18,12 @@ export class SmsTemplateComponent implements OnInit { sf!: SFComponent; @ViewChild('sfEdit', { static: false }) sfEdit!: SFComponent; + editSchema!: SFSchema; visible = false; isVisible = false; tempData = {}; isEdit = false; - + searchSchema: SFSchema = { properties: { templateName: { @@ -43,24 +44,27 @@ export class SmsTemplateComponent implements OnInit { } }; - editSchema: SFSchema = { - properties: { - templateName: { - type: 'string', - title: '模板名称', - ui: { placeholder: '请输入模板名称' } + initSF() { + this.editSchema = { + properties: { + templateName: { + type: 'string', + title: '模板名称', + ui: { placeholder: '请输入模板名称', errors: { require: '必填项'} } + }, + templateCode: { + type: 'string', + title: '模板编码', + readOnly: this.isEdit, + ui: { placeholder: '请输入模板编码', errors: { require: '必填项'} } + }, + templateContent: { + type: 'string', + title: '模板内容', + ui: { placeholder: '请输入模板内容', errors: { require: '必填项'} } + } }, - templateCode: { - type: 'string', - title: '模板编码', - readOnly: this.isEdit, - ui: { placeholder: '请输入模板编码', } - }, - templateContent: { - type: 'string', - title: '模板内容', - ui: { placeholder: '请输入模板内容' } - } + required: ['templateName','templateCode','templateContent'] } } @@ -91,7 +95,9 @@ export class SmsTemplateComponent implements OnInit { constructor(public service: SystemService, private nzModalService: NzModalService, private route: ActivatedRoute) { } - ngOnInit(): void { } + ngOnInit(): void { + this.initSF(); + } beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { @@ -132,7 +138,7 @@ export class SmsTemplateComponent implements OnInit { handleOk(): void { const value = this.sfEdit.value; - const { id, templateCode, templateName, templateContent } = value + const { id, templateCode, templateName, templateContent } = value; const params = { id, templateCode, diff --git a/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.html b/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.html index d308c5e6..010dee32 100644 --- a/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.html +++ b/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.html @@ -53,6 +53,6 @@ {{ selectedRows.length }} 条数据 - + diff --git a/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.ts b/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.ts index 0ecf8e6f..49955f8a 100644 --- a/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.ts +++ b/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.ts @@ -217,7 +217,7 @@ export class TaxManagementInvoiceReportingComponent implements OnInit { width: '150px', type: 'link', click: item => { - window.open(`/#/ticket/invoice-list/detail/${item.invoiceno}`, '_blank', 'noopener') + window.open(`/#/ticket/invoice-list/detail/${item.vatinvHId}?type=${item.invoiceType}`, '_blank', 'noopener') } }, { title: '发票代码', index: 'invoiceno2', className: 'text-center', width: '150px', }, diff --git a/src/app/shared/components/captcha/captcha.module.ts b/src/app/shared/components/captcha/captcha.module.ts new file mode 100644 index 00000000..9ed79a1c --- /dev/null +++ b/src/app/shared/components/captcha/captcha.module.ts @@ -0,0 +1,11 @@ +import { NgModule } from '@angular/core'; + +import { CaptchaComponent } from './captcha.component'; + +const COMPONENTS = [CaptchaComponent]; + +@NgModule({ + declarations: COMPONENTS, + exports: COMPONENTS +}) +export class CaptchaModule {} diff --git a/src/app/shared/components/captcha/index.ts b/src/app/shared/components/captcha/index.ts index b2c67294..b1fe7443 100644 --- a/src/app/shared/components/captcha/index.ts +++ b/src/app/shared/components/captcha/index.ts @@ -1,2 +1,3 @@ export * from './captcha.component'; export * from './dun.helper'; +export * from './captcha.module'; diff --git a/src/app/shared/shared-third.module.ts b/src/app/shared/shared-third.module.ts index e8a2dec2..f3a7b8a7 100644 --- a/src/app/shared/shared-third.module.ts +++ b/src/app/shared/shared-third.module.ts @@ -5,6 +5,7 @@ import { apiConf } from '@conf/api.conf'; import { NgxTinymceModule } from 'ngx-tinymce'; import { environment } from '@env/environment'; + const TinyMce = NgxTinymceModule.forRoot({ baseURL: 'assets/tinymce/', config: { diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 51dd9bca..705f6cc8 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -37,6 +37,7 @@ import { ImageListModule } from './components/imagelist'; import { DictSelectComponent } from './components/dict-select'; import { PipeModule } from './pipes'; import { AccountDetailComponent } from './components/account-detail/account-detail.component'; +import { CaptchaModule } from './components/captcha'; import { rebateTableModule } from './components/rebate-table'; const MODULES = [ @@ -53,6 +54,7 @@ const MODULES = [ ImageListModule, PipeModule, rebateTableModule, + CaptchaModule, ...PRO_SHARED_MODULES ]; // #endregion From fcb26a90848be8c5bdcab244f123b149daab5924 Mon Sep 17 00:00:00 2001 From: weiyu Date: Fri, 22 Apr 2022 17:29:08 +0800 Subject: [PATCH 09/24] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../routes/account/components/center/center.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/routes/account/components/center/center.component.html b/src/app/routes/account/components/center/center.component.html index 63524689..7181d388 100644 --- a/src/app/routes/account/components/center/center.component.html +++ b/src/app/routes/account/components/center/center.component.html @@ -10,7 +10,7 @@ 手机号码/账号
{{ infoData.phone }}
-
+
已绑定 - +
From e2e744bcd2483f9d427d999f734cb779118e3312 Mon Sep 17 00:00:00 2001 From: weiyu Date: Sun, 24 Apr 2022 11:10:59 +0800 Subject: [PATCH 10/24] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/routes/account/components/center/center.component.html | 3 ++- src/app/routes/account/components/center/center.component.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/routes/account/components/center/center.component.html b/src/app/routes/account/components/center/center.component.html index 7181d388..253fd297 100644 --- a/src/app/routes/account/components/center/center.component.html +++ b/src/app/routes/account/components/center/center.component.html @@ -40,7 +40,8 @@ - + +
diff --git a/src/app/routes/account/components/center/center.component.ts b/src/app/routes/account/components/center/center.component.ts index 504529c6..3298034d 100644 --- a/src/app/routes/account/components/center/center.component.ts +++ b/src/app/routes/account/components/center/center.component.ts @@ -138,7 +138,8 @@ export class AccountComponentsCenterComponent implements OnInit { getInfo() { this.service.http.post(this.service.$api_get_current_user_info).subscribe((res) => { this.infoData = res.data; - this.getDeafaultCompany(); + // this.getDeafaultCompany(); + this.getPayPw(); }); } From 64371322e3d28883507dbe0d5500d60d3dc2229d Mon Sep 17 00:00:00 2001 From: wangshiming Date: Sun, 24 Apr 2022 13:43:23 +0800 Subject: [PATCH 11/24] 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 12/24] =?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 13/24] =?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 14/24] 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 15/24] 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 16/24] 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 17/24] 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 18/24] 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 06d9a862464eb2d4a13b5d7e03440e4506cef5fd Mon Sep 17 00:00:00 2001 From: wangshiming Date: Sun, 24 Apr 2022 17:44:41 +0800 Subject: [PATCH 19/24] 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 20/24] 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 @@ --> -
-