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 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..253fd297 100644 --- a/src/app/routes/account/components/center/center.component.html +++ b/src/app/routes/account/components/center/center.component.html @@ -12,9 +12,9 @@
{{ infoData.phone }}
已绑定 - 未绑定 + style="color: #52c41a"> 已绑定 + 未绑定
@@ -30,19 +30,45 @@
定期更换密码有助于账号安全
- 已设置 - 未设置 + 已设置 + 未设置
修改
+ + + + +
+
+ + 支付密码 +
+
定期更换支付密码有助于账号安全
+
+ 已设置 + 未设置 +
+
+
+
+
设置
+
- + \ 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..5c6caa5e 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,32 @@ 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.getPayPw(); }); } + 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 +195,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/financial-management/components/platform-account/platform-account.component.ts b/src/app/routes/financial-management/components/platform-account/platform-account.component.ts index f54f0046..1cfb6a07 100644 --- a/src/app/routes/financial-management/components/platform-account/platform-account.component.ts +++ b/src/app/routes/financial-management/components/platform-account/platform-account.component.ts @@ -5,6 +5,7 @@ import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; import { NzModalService } from 'ng-zorro-antd/modal'; import { FreightAccountService } from '../../services/freight-account.service'; import { CwcBankCardManagementBindComponent } from '../bank-card-management/bind/bind.component'; +import { CwcAccountManagementWithdrawDepositComponent } from './withdraw-deposit/withdraw-deposit.component'; @Component({ selector: 'app-platform-account', @@ -192,12 +193,18 @@ export class PlatformAccountComponent implements OnInit { }) }, { - text: '绑定银行卡', - click: item => this.bindBankcard(item) + text: '提现', + click: item => this.withdraw(item), + iif: (_record) => _record.bankType !== '1' }, + // { + // text: '绑定银行卡', + // click: item => this.bindBankcard(item) + // }, { text: '查看银行卡', - click: item => this.viewBankcard(item) + click: item => this.viewBankcard(item), + iif: (_record) => _record.bankType !== '1' }, ] } @@ -239,4 +246,25 @@ export class PlatformAccountComponent implements OnInit { exportList() { this.service.exportStart({ ...this.sf.value, pageSize: -1 }, this.service.$api_get_exportPlatformAccountBalanceByOperator,); } + + // 提现 + withdraw(record: any) { + const modalRef = this.modal.create({ + nzTitle: '提现', + nzWidth: '35%', + nzContent: CwcAccountManagementWithdrawDepositComponent, + nzMaskClosable: false, + nzComponentParams: { + record + }, + nzFooter: null + }); + modalRef.afterClose.subscribe(res => { + if (res) { + // this.getSummary(); + // this.withdrawTable.refresh(); + } + }) + } + } diff --git a/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.html b/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.html new file mode 100644 index 00000000..79a7a3e2 --- /dev/null +++ b/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.html @@ -0,0 +1,39 @@ + + +
-
+
{{me.formProperty.value | currency}}
+
+ + +
+ +
+
+
+添加银行卡
+
+ + + + 全部提现 + + + + 忘记密码? + + + +
diff --git a/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.less b/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.less new file mode 100644 index 00000000..d4fad7b5 --- /dev/null +++ b/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.less @@ -0,0 +1,37 @@ +:host { + .bank-card-select-content { + padding: 5px; + border: 1px solid #ccc; + + .band-card-row { + display: flex; + align-items: center; + } + } + + .pay-way-group { + width: 100%; + margin-bottom: 5px; + + .bank-card-row { + display: flex; + align-items: center; + } + + .band-card { + border: 1px solid #e8e8e8; + + .pay-way-label { + width: 100%; + padding: 6px 10px; + } + } + + } + + .input-row { + width: 70%; + margin-right: 8px; + } + +} diff --git a/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.spec.ts b/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.spec.ts new file mode 100644 index 00000000..2d1f933a --- /dev/null +++ b/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { CwcAccountManagementWithdrawDepositComponent } from './withdraw-deposit.component'; + +describe('CwcAccountManagementWithdrawDepositComponent', () => { + let component: CwcAccountManagementWithdrawDepositComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [CwcAccountManagementWithdrawDepositComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CwcAccountManagementWithdrawDepositComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.ts b/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.ts new file mode 100644 index 00000000..ca2cb877 --- /dev/null +++ b/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.ts @@ -0,0 +1,288 @@ +import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; +import { Router } from '@angular/router'; +import { cacheConf } from '@conf/cache.conf'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; +import { EACacheService, EAEnvironmentService, ShipperBaseService } from '@shared'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { BankCardManagementService } from '../../../services/bank-card-management.service'; + +@Component({ + selector: 'app-cwc-withdraw-deposit', + templateUrl: './withdraw-deposit.component.html', + styleUrls: ['./withdraw-deposit.component.less'] +}) +export class CwcAccountManagementWithdrawDepositComponent implements OnInit { + accountBalance = 0; + minWithdrawAmount = 0; + minWithdrawFee: any = 0; + code = ''; + bankList: Array = []; + bankAccount = ''; + count = 0; + interval$: any; + ui: SFUISchema = {}; + i: any; + schema: SFSchema = {}; + totalGJ: any = 0.0; + cacFee: any = 0; + columns: STColumn[] = []; + totalBalance = 200; + bankCardList: Array = []; + cardNo = ''; + accountDetail: any = {}; + networkTransporterId = ''; + networkTransporterName = ''; + balanceObj: any = { + allBalance: 99999999 + }; + @ViewChild('st', { static: false }) st!: STComponent; + @ViewChild('sf', { static: false }) sf!: SFComponent; + @ViewChild('psd') psd!: ElementRef; + record: any; + bankType = '2'; + + constructor( + public service: BankCardManagementService, + private modal: NzModalRef, + private shipperSrv: ShipperBaseService, + public eaCacheSrv: EACacheService, + public envSrv: EAEnvironmentService, + public router: Router + ) { + this.networkTransporterId = this.eaCacheSrv.get(cacheConf.env)?.networkTransporterId; + } + + ngOnInit() { + this.initSF(); + this.getBankList(); + this.getProjectBalanceDetail(); + } + + + + + /** + * 初始化查询表单 + */ + initSF() { + this.schema = { + properties: { + ltdName: { + title: '网络货运人', + type: 'string', + default: this.record?.ltdName, + ui: { + widget: 'text', + } + }, + bankType: { + title: '银行', + type: 'string', + default: this.bankType, + enum: [ + { label: '浦发银行', value: '2' } + ], + ui: { + widget: 'select', + containsAllLabel: false, + showRequired: true, + change: (value: any) => { + // if (value && this.sf?.value?.ltdId) { + // const parmas = { bankType: value, ltdId: this.sf.getValue('/ltdId') }; + // this.getProjectBalanceDetail(parmas); + // } + } + } as SFSelectWidgetSchema + }, + availableBalance: { title: '可提现余额', type: 'string', ui: { showRequired: false, widget: 'custom' } }, + bankId: { + title: '提现至', + type: 'string', + ui: { + showRequired: true, widget: 'custom' + }, + }, + amount: { + title: '提现金额', + type: 'string', + ui: { + showRequired: true, + widget: 'custom', + validator: (val) => { + if (!val && val !== 0) { + return [{ keyword: 'required', message: '必填项' }]; + } else if (val > this.balanceObj.allBalance) { + return [{ keyword: 'required', message: '提现金额超过可提现余额' }]; + } + return []; + } + }, + + }, + payPsd: { + title: '支付密码', + type: 'string', + minLength: 6, + maxLength: 6, + ui: { widget: 'custom' }, + }, + payPassword: { + title: '', + type: 'string', + ui: { + hidden: true + } + } + }, + autocomplete: 'off', + required: ['bankType', 'payPsd'] + }; + this.ui = { + '*': { spanLabelFixed: 100, grid: { span: 18, gutter: 2 } }, + $addBankCard1: { + grid: { span: 24 } + }, + $addBankCard2: { + grid: { span: 24 } + } + }; + } + + save(value: any) { + if (this.sf.valid) { + const { amount, bankId, bankType, ltdName, payPassword } = value; + if (amount > this.balanceObj?.allBalance) { + this.service.msgSrv.warning('提现金额超过可提现余额!'); + return; + } + const params = { + amount, + bankId, + bankType, + ltdId: this.record.ltdId, + ltdName, + payPassword + }; + this.service.request(this.service.$api_apply_withdraw, { ...params }) + .subscribe(res => { + if (res) { + this.service.msgSrv.success('提现成功!'); + this.close(true); + } + }) + } + } + close(flag: boolean) { + this.modal.destroy(flag); + } + + + toAddBankPage() { + window.open(`/#/financial-management/bank-card-management/index?ltdId=${this.record?.ltdId}<dName=${this.record?.ltdName}`); + } + /** + * 全部提现 + */ + allWithdrawal() { + if (!this.sf.getValue('/availableBalance')) { + this.sf.setValue('/amount', ''); + return; + } + this.sf.setValue('/amount', this.balanceObj?.allBalance); + } + /** + * 跳转至忘记密码页 + */ + toForgetPsdPage() { + window.open('/#/account/edit-paypassword'); + } + + /** + * 切换银行卡 + */ + checkBankCard(e: any) { + this.sf.setValue('/bankId', e); + } + getBankList() { + this.service.request(this.service.$api_bank_card_list, { accountType: '3', roleId: this.record?.ltdId }).subscribe((res) => { + if (res) { + this.bankCardList = res; + } + }); + } + + /** + * 获取项目账户余额 + */ + getProjectBalanceDetail(params = {}) { + this.service.request(this.service.$api_get_account_available_balance, { bankType: this.bankType, ltdId: this.record?.ltdId }).subscribe(res => { + if (res) { + this.balanceObj = res; + this.sf.setValue('/availableBalance', res?.allBalance); + // this.sf.getProperty('/amount')?.updateValueAndValidity(); + } + }) + } + + keydown(e: any) { + if (e.keyCode == 37 || e.keyCode == 39) e.preventDefault(); + if (e.keyCode === 8) { + // const payPswVal = this.sf.getValue('/password'); + // this.sf.setValue('/password', payPswVal.substr(0, payPswVal.length - 1)); + } + + } + clickInput(e: any) { + this.psd.nativeElement.focus(); + } + changePsd(val: any) { + this.sf.setValue('/payPsd', val); + if (val || val !== '') { + const last = val.substr(val.length - 1); + const password = this.sf.getValue('/payPassword'); + const start = this.psd?.nativeElement.selectionStart; + if (last !== '•') { + this.sf.setValue('/payPassword', start !== 1 ? (password + last) : last); + } else { + this.sf.setValue('/payPassword', password.substr(0, val.length)); + } + const payPswVal = this.sf.getValue('/payPsd'); + this.sf.setValue('/payPsd', payPswVal.replace(/./g, "•")); + } else { + this.sf.setValue('/payPassword', ''); + } + + } + + /** + * 设置光标聚焦 + */ + setFocus() { + + const len = this.psd?.nativeElement.value.length; + this.setSelectionRange(this.psd?.nativeElement, len, len); //将光标定位到文本最后 + } + + /** + * 设置光标位置 + * @param input dom元素 + * @param selectionStart 起始位置 + * @param selectionEnd 结束位置 + */ + setSelectionRange(input: ElementRef | any, selectionStart: number, selectionEnd: number) { + if (input?.setSelectionRange) { + input.focus(); + input.setSelectionRange(selectionStart, selectionEnd); + } + else if (input.createTextRange) { + var range = input.createTextRange(); + range.collapse(true); + range.moveEnd('character', selectionEnd); + range.moveStart('character', selectionStart); + range.select(); + } + } + + +} diff --git a/src/app/routes/financial-management/financial-management.module.ts b/src/app/routes/financial-management/financial-management.module.ts index 63b99337..76cafed5 100644 --- a/src/app/routes/financial-management/financial-management.module.ts +++ b/src/app/routes/financial-management/financial-management.module.ts @@ -39,6 +39,7 @@ import { AbnormalGoldDetailComponent } from './components/abnormal-gold/abnormal import { CwcBankCardManagementIndexComponent } from './components/bank-card-management/index/index.component'; import { CwcBankCardManagementBindComponent } from './components/bank-card-management/bind/bind.component'; import { CwcBankCardManagementAddComponent } from './components/bank-card-management/add/add.component'; +import { CwcAccountManagementWithdrawDepositComponent } from './components/platform-account/withdraw-deposit/withdraw-deposit.component'; const ROUTESCOMPONENTS = [ FreightAccountComponent, @@ -74,7 +75,8 @@ const ROUTESCOMPONENTS = [ AbnormalGoldDetailComponent, CwcBankCardManagementIndexComponent, CwcBankCardManagementBindComponent, - CwcBankCardManagementAddComponent + CwcBankCardManagementAddComponent, + CwcAccountManagementWithdrawDepositComponent ]; const NOTROUTECOMPONENTS = [DriverAccountDetailComponent, FreightAccountDetailComponent, ClearingModalComponent]; diff --git a/src/app/routes/financial-management/services/bank-card-management.service.ts b/src/app/routes/financial-management/services/bank-card-management.service.ts index 65db517b..76faf71c 100644 --- a/src/app/routes/financial-management/services/bank-card-management.service.ts +++ b/src/app/routes/financial-management/services/bank-card-management.service.ts @@ -8,6 +8,8 @@ export class BankCardManagementService extends BaseService { $api_bank_card_list = `/api/fcc/bankInfoOBC/list/myBankInfo`; // 获取银行卡列表 $api_bank_card_del = `/api/fcc/bankInfoOBC/delete`; // 删除银行卡 $api_bank_card_add = `/api/fcc/bankInfoOBC/save`;//新增银行卡 + $api_get_account_available_balance = `/api/fcc/accountBalance/getWithdrawalAccountBalanceOperator`; //平台可提现金额查询 + $api_apply_withdraw = `/api/fcc/refundApplicationOBC/addAgreeRefund`; // 提现申请 constructor(public injector: Injector) { super(injector); } diff --git a/src/app/routes/order-management/components/bulk/bulk.component.html b/src/app/routes/order-management/components/bulk/bulk.component.html index bced8f7d..1ea7f649 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.html +++ b/src/app/routes/order-management/components/bulk/bulk.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-04-14 10:53:35 + * @LastEditTime : 2022-04-22 16:51:29 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk\\bulk.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -82,7 +82,7 @@
{{ item.settlementWeight ? item.settlementWeight + '吨/ ': ''}} {{ item.settlementVolume ? item.settlementVolume + '方 ': ''}}
-
{{ item?.payeeName }}{{ item?.payeePhone ? "/" + item?.payeePhone : '' }}
+
{{ item?.payeeName }}{{ item?.payeePhone ? "/" + item?.payeePhone : '' }}
{{ item?.createUserName }}{{ item?.createUserPhone ? "/" + item?.createUserPhone : '' }}
diff --git a/src/app/routes/order-management/components/bulk/bulk.component.ts b/src/app/routes/order-management/components/bulk/bulk.component.ts index 15ba339a..688a6796 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.ts +++ b/src/app/routes/order-management/components/bulk/bulk.component.ts @@ -509,8 +509,7 @@ export class OrderManagementBulkComponent implements OnInit { title: '车队长', className: 'text-left', width: '180px', - index: 'payeeName', - render: 'payeeName' + render: 'payeeName', }, { title: '装卸货时间', diff --git a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts index c3ddd93f..d8c217a8 100644 --- a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts +++ b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts @@ -547,8 +547,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { nzContent: `确认后单据不可修改,请谨慎操作。`, nzOnOk: () => { - this.service.downloadFile(this.service.$api_createBillTakeGoods,params) - this.service.downloadFile(this.service.$api_createBillDischargeGoods,params) + this.service.downloadFile(this.service.$api_createBillEsignGoods,params) this.service.msgSrv.success('生成成功!'); this.st?.reload() // this.getGoodsSourceStatistical(); diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html index 77591f60..1da90e5c 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-28 14:42:03 * @LastEditors : Shiming - * @LastEditTime : 2022-04-21 17:03:50 + * @LastEditTime : 2022-04-22 16:27:43 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.html b/src/app/routes/order-management/components/vehicle/vehicle.component.html index 35c07449..4780db3c 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.html +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-04-08 11:32:46 + * @LastEditTime : 2022-04-22 16:53:07 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle\\vehicle.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -95,7 +95,7 @@
{{ item?.driverName }}{{ item?.driverPhone ? '/' + item?.driverPhone : '' }}{{ item?.carNo ? '/' + item?.carNo : '' }}

-
{{ item?.payeeName ? item?.payeeName + '/' : ''}}{{ item?.payeePhone }}
+
车队长: {{ item?.payeeName ? item?.payeeName + '/' : ''}}{{ item?.payeePhone }}
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..00f391e2 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'] } }, // { @@ -439,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'] } }, { @@ -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); + } } diff --git a/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts b/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts index 80ec4a45..62a4719b 100644 --- a/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts +++ b/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts @@ -523,57 +523,29 @@ export class orderManagementVoucherViewComponent implements OnInit { 请等待${time}秒后自动关闭 ` }); - this.service.request(this.service.$api_createBillTakeGoods, [this.datas?.id]).subscribe(res => { + this.service.request(this.service.$api_createBillEsignGoods, [this.datas?.id]).subscribe(res => { if (res) { - switch (res[0]?.esignFlowStatus) { - case 1: - case '1': - setTimeout(() => { - this.service.request(this.service.$api_getBillTakeEsignFile, [this.datas?.id]).subscribe(res => { - if (res[0]?.esignFlowStatus == '2') { - } - }); - }, 9000); - return; - case 2: - return; - case '13': + res.forEach((element:any) => { + switch (element?.esignFlowStatus) { + case '1': + setTimeout(() => { + this.service.request(this.service.$api_getBillGoodsEsignFile, [this.datas?.id]).subscribe(res => { + if (res[0]?.esignFlowStatus == '2') { + this.service.msgSrv.success('生成电子单据成功!'); + this.modal.destroy(true); + } + }); + }, 9000); + return; default: - this.service.msgSrv.error('电子装货单签署异常!'); + this.service.msgSrv.error('签署异常!'); modal.destroy(); - return; - } + return; + } + }); + } else { - this.service.msgSrv.error('电子装货单签署异常!'); - modal.destroy(); - } - }); - this.service.request(this.service.$api_createBillDischargeGoods, [this.datas?.id]).subscribe(res => { - if (res) { - switch (res[0]?.esignFlowStatus) { - case 1: - case '1': - setTimeout(() => { - this.service.request(this.service.$api_getBillDischargeEsignFile, [this.datas?.id]).subscribe(res => { - if (res[0]?.esignFlowStatus == '2') { - this.service.msgSrv.success('生成电子单据成功!'); - this.modal.destroy(true); - } - }); - modal.destroy(); - }, 9000); - - return; - case 2: - modal.destroy(); - return; - default: - this.service.msgSrv.error('电子卸货单签署异常!'); - modal.destroy(); - return; - } - } else { - this.service.msgSrv.error('电子卸货单签署异常!'); + this.service.msgSrv.error('签署异常!'); modal.destroy(); } }); diff --git a/src/app/routes/order-management/modal/vehicle/modify-captain/modify-captain.component.ts b/src/app/routes/order-management/modal/vehicle/modify-captain/modify-captain.component.ts index 845db74c..7e3ab9d6 100644 --- a/src/app/routes/order-management/modal/vehicle/modify-captain/modify-captain.component.ts +++ b/src/app/routes/order-management/modal/vehicle/modify-captain/modify-captain.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-30 14:45:39 * @LastEditors : Shiming - * @LastEditTime : 2022-03-24 10:28:48 + * @LastEditTime : 2022-04-22 16:31:57 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\modify-captain\\modify-captain.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -44,7 +44,8 @@ export class VehicleModifyCaptainComponent implements OnInit { mobile: { type: 'string', title: '车队长手机号', - maxLength: 11 + maxLength: 11, + default: '' } }, required: ['mobile'] @@ -103,18 +104,20 @@ export class VehicleModifyCaptainComponent implements OnInit { if (res) { this.modal.destroy(); this.service.msgSrv.success('修改成功'); - } else { - this.service.msgSrv.error(res?.msg); } }); } initDate() { + let phone = this.sf?.value.mobile.replace(/^\s*|\s*$/g,"") + if(!phone) { + this.service.msgSrv.error('请输入手机号!'); + return + } const params = { fetchBank: 1, ...this.sf?.value }; this.service.request(this.service.$api_get_getCarCaptainByMobile, params).subscribe((res: any) => { - console.log(res); if (res) { this.dataList = [res]; } diff --git a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html index ad50faeb..b37da5ec 100644 --- a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html +++ b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html @@ -4,13 +4,13 @@ * @Author : Shiming * @Date : 2022-02-22 13:53:29 * @LastEditors : Shiming - * @LastEditTime : 2022-03-08 15:01:14 + * @LastEditTime : 2022-04-22 16:27:40 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. -->
- + diff --git a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.less b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.less index ae775710..529639f7 100644 --- a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.less +++ b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.less @@ -1,11 +1,10 @@ +/* stylelint-disable order/properties-order */ :host { - ::ng-deep { - // .mapBox { - // iframe, canvas { - // width: 400px !important; - // } - // } - - } - - } \ No newline at end of file + .map_st2 { + position: absolute; + top: 20px; + right: 49px; + height: 350px; + width: 360px; + } +} diff --git a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts index 0b5c1dff..30bd5b74 100644 --- a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts +++ b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts @@ -4,21 +4,12 @@ * @Author : Shiming * @Date : 2022-02-22 13:53:29 * @LastEditors : Shiming - * @LastEditTime : 2022-03-08 16:11:58 + * @LastEditTime : 2022-04-22 16:24:06 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ -import { Component, OnInit, ViewChild } from '@angular/core'; -import { STColumn } from '@delon/abc/st'; -import { - SFComponent, - SFCustomWidgetSchema, - SFNumberWidgetSchema, - SFRadioWidgetSchema, - SFSchema, - SFTextareaWidgetSchema, - SFUISchema -} from '@delon/form'; +import { Component, OnInit } from '@angular/core'; +import { STColumn, STComponent } from '@delon/abc/st'; import format from 'date-fns/format'; import { _HttpClient } from '@delon/theme'; import { NzMessageService } from 'ng-zorro-antd/message'; @@ -37,9 +28,11 @@ export class OneCarOrderViewtrackComponent implements OnInit { mapList: any[] = []; //地图点位数据组 addressItems: any[] = []; //打点地址数据组 logColumns2: STColumn[] = [ - { title: '时间', index: 'parkBte' }, - { title: '地点', index: 'parkAdr' } + { title: '时间', index: 'parkBte', width: 120, className: 'text-center' }, + { title: '地点', index: 'parkAdr',width: 120,className: 'text-center' } ]; + pois: any[] = []; + constructor( private modalRef: NzModalRef, private modal: NzModalService, @@ -56,31 +49,58 @@ export class OneCarOrderViewtrackComponent implements OnInit { } // 获取车辆轨迹 getTrajectory() { - this.service.request(this.service.$api_get_getTrajectory, { id: this.i?.id }).subscribe(res => { + this.service.request(this.service.$api_get_getWholeBillDetail, { id: this.i.id }).subscribe(res => { + if (res) { + this.pois = [ + { + markerLabel: '装', + color: 'blue', + position: [res.startingPoint.longitude, res.startingPoint.latitude], + title: `发货地:${res.startingPoint.province}${res.startingPoint.city}${res.startingPoint.area || ''}${ + res.startingPoint.detailedAddress + }`, + time: '计划出发时间:' + res.loadPlanTime + }, + { + markerLabel: '卸', + color: 'red', + position: [res.endPoint.longitude, res.endPoint.latitude], + title: `卸货地:${res.endPoint.province}${res.endPoint.city}${res.endPoint.area}${res.endPoint.detailedAddress}`, + time: '计划卸货时间:' + res.unloadPlanTime + } + ]; + } + }); + this.service.request(this.service.$api_get_getTrajectory, { id: this.i.id }).subscribe(res => { if (res) { const points = res.trackArray; let list: any[] = []; points?.forEach((item: any) => { list.push({ - name: item.hgt, + name: `${item.spd}`, lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], time: item.gtm }); }); this.mapList = list; - this.addressItems = res.parkAdr; - if (this.addressItems && this.addressItems.length > 0) { - this.addressItems.forEach(item => { + const addressItems: any[] = res.parkArray; + if (addressItems?.length > 0) { + addressItems.forEach(item => { item.parkBte = this.getLocalTime(item.parkBte); }); + this.addressItems = [...addressItems]; + } else { + this.addressItems = []; } + console.log(this.addressItems); + } }); } // 获取司机轨迹 getDriverTrajectory() { - this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.i?.id }).subscribe(res => { + this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.i.id }).subscribe(res => { if (res) { const points = res.tracks; let list: any[] = []; @@ -91,7 +111,7 @@ export class OneCarOrderViewtrackComponent implements OnInit { time: item.gtm }); }); - this.mapList = list; + this.mapList = list || []; const addressItems = [...res.tracks]; if (addressItems) { addressItems.forEach(item => { diff --git a/src/app/routes/order-management/services/order-management.service.ts b/src/app/routes/order-management/services/order-management.service.ts index 3df90939..087d7a70 100644 --- a/src/app/routes/order-management/services/order-management.service.ts +++ b/src/app/routes/order-management/services/order-management.service.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-03 15:31:52 * @LastEditors : Shiming - * @LastEditTime : 2022-04-22 10:54:29 + * @LastEditTime : 2022-04-22 17:14:39 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\services\\order-management.service.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -163,8 +163,8 @@ export class OrderManagementService extends ShipperBaseService { // 异常预警 public $api_getAbnormalWarningByBillId = '/api/sdc/abnormalWarning/getAbnormalWarningByBillId'; - // 生成卸货单 - public $api_createBillDischargeGoods = '/api/sdc/billOperate/createBillDischargeGoods'; + // 获取电子提/卸货单签章附件 + public $api_getBillGoodsEsignFile = '/api/sdc/billOperate/getBillGoodsEsignFile'; // 生成提货单 public $api_createBillTakeGoods = '/api/sdc/billOperate/createBillTakeGoods'; // 生成卸货单-页面展示 @@ -217,6 +217,8 @@ export class OrderManagementService extends ShipperBaseService { public $api_getBillDischargeGoods = `/api/sdc/billOperate/getBillDischargeGoods`; // 预览提货单 public $api_getBillTakeGoods = `/api/sdc/billOperate/getBillTakeGoods`; + // 生成提/卸货单 + public $api_createBillEsignGoods = `/api/sdc/billOperate/createBillEsignGoods`; // // 生成卸货单 // public $api_createBillDischargeGoods = `/api/sdc/billOperate/createBillDischargeGoods`; 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; } } } diff --git a/src/app/routes/supply-management/components/bulk/bulk.component.ts b/src/app/routes/supply-management/components/bulk/bulk.component.ts index 9e90a8f6..894d5a0c 100644 --- a/src/app/routes/supply-management/components/bulk/bulk.component.ts +++ b/src/app/routes/supply-management/components/bulk/bulk.component.ts @@ -42,7 +42,7 @@ export class SupplyManagementBulkComponent implements OnInit { private modal: NzModalService, private router: Router, public shipperservice: ShipperBaseService - ) {} + ) { } ngOnInit(): void { this.initSF(); @@ -335,7 +335,7 @@ export class SupplyManagementBulkComponent implements OnInit { { text: '二维码', click: _record => this.assignedQrcode(_record), - iif: item => item.resourceStatus == 1 + iif: item => item.resourceStatus == 1 && item.serviceType === '1' }, { text: '修改单价', @@ -565,7 +565,7 @@ export class SupplyManagementBulkComponent implements OnInit { } }); } - userAction() {} + userAction() { } // 导出 exportFire() { this.service.exportStart(this.reqParams, this.service.$api_asyncExportBulkList); 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 06e3616b..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 @@ -2,6 +2,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 7073d001..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,12 +18,19 @@ 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: { + type: 'string', + title: '模板名称', + ui: { placeholder: '请输入模板名称' } + }, templateCode: { type: 'string', title: '模板编码', @@ -37,27 +44,32 @@ export class SmsTemplateComponent implements OnInit { } }; - editSchema: SFSchema = { - properties: { - templateCode: { - 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: '必填项'} } + } }, - templateContent: { - type: 'string', - title: '模板内容', - ui: { placeholder: '请输入模板内容' } - }, - templateName: { - type: 'string', - title: '模板名称', - ui: { placeholder: '请输入模板名称' } - } + required: ['templateName','templateCode','templateContent'] } } columns: STColumn[] = [ + { title: '模板名称', className: 'text-center', index: 'templateName' }, { title: '模板编码', className: 'text-center', index: 'templateCode' }, { title: '模板内容', className: 'text-center', index: 'templateContent' }, // { @@ -83,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) { @@ -94,6 +108,9 @@ 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; } @@ -111,9 +128,17 @@ export class SmsTemplateComponent implements OnInit { this.visible = false; } + add() { + this.isEdit = false; + this.editSchema!.properties!.templateCode.readOnly = false; + this.sfEdit?.refreshSchema(); + this.tempData = {}; + this.isVisible = true; + } + 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 3cafec0a..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 @@ -9,7 +9,7 @@
- +
- +
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..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 @@ -27,7 +27,7 @@ export class TaxManagementInvoiceReportingComponent implements OnInit { { name: '异常', value: '4' }, { name: '全部', value: '' } ]; - selectedIndex = ''; //选择的项目 + selectedIndex = '1'; //选择的项目 serviceTel = ''; constructor( public service: TaxManagementService, @@ -50,7 +50,7 @@ export class TaxManagementInvoiceReportingComponent implements OnInit { * 查询参数 */ get reqParams() { - const params = Object.assign({}, this.sf?.value || {}); + const params = Object.assign({}, this.sf?.value || {}, { uploadSts: this.selectedIndex }); delete params._$expand; return { ...params }; } @@ -213,9 +213,12 @@ export class TaxManagementInvoiceReportingComponent implements OnInit { { title: '发票号码', index: 'invoiceno', - render: 'invoiceNO', className: 'text-center', width: '150px', + type: 'link', + click: item => { + window.open(`/#/ticket/invoice-list/detail/${item.vatinvHId}?type=${item.invoiceType}`, '_blank', 'noopener') + } }, { title: '发票代码', index: 'invoiceno2', className: 'text-center', width: '150px', }, { @@ -224,14 +227,24 @@ export class TaxManagementInvoiceReportingComponent implements OnInit { className: 'text-center', width: '180px', }, - { title: '购买方企业名称', index: 'artoname', render: 'artoname', className: 'text-center', width: '200px' }, + { + title: '购买方企业名称', index: 'artoname', className: 'text-center', width: '200px', type: 'link', + click: item => { + window.open(`/#/usercenter/freight/list/detail/${item.ltdId}`, '_blank', 'noopener') + } + }, { title: '购买方统一社会信用代码', index: 'artotaxno', className: 'text-center', width: '200px' }, - { title: '订单号', index: 'billHCode', render: 'billHCode', className: 'text-center', width: '120px' }, + { + title: '订单号', index: 'billHCode', className: 'text-center', width: '120px', type: 'link', + click: item => { + window.open(`/#/order-management/vehicle/vehicle-detail/${item.ltdId}`, '_blank', 'noopener') + } + }, { title: '货物名称', index: 'goodsinfo', className: 'text-center', width: '180px' }, { 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' }, ]; } @@ -247,17 +260,18 @@ export class TaxManagementInvoiceReportingComponent implements OnInit { this.openWainingModal('请选择需要撤回的数据'); return; } - let params: any[] = []; + let ids: any[] = []; this.selectedRows.forEach(item => { - params.push(item.id); + ids.push(item.id); }); + this.modal.confirm({ nzTitle: '撤回提示', nzContent: ' 撤回后可以重新上传,重新上传会覆盖已上传数据,确定要撤回?', nzOkText: '确定', nzCancelText: '取消', nzOnOk: () => { - this.service.request(this.service.$api_get_recessionTaxOrder, params).subscribe((res: any) => { + this.service.request(this.service.$api_invoiceUpload_withdraw, { ids }).subscribe((res: any) => { if (res) { this.service.msgSrv.success('撤销成功'); this.search(); @@ -322,6 +336,8 @@ export class TaxManagementInvoiceReportingComponent implements OnInit { console.log(item); this.selectedIndex = item?.value || ''; + console.log(this.selectedIndex); + setTimeout(() => { this.st.load(); }) @@ -380,7 +396,7 @@ export class TaxManagementInvoiceReportingComponent implements OnInit { * 异步导出 */ export() { - this.service.exportStart(this.sf?.value, this.service.$api_async_export_order_reporting_list); + this.service.exportStart(this.reqParams, this.service.$api_invoiceUpload_export); } openWainingModal(content: string, title = '提示') { diff --git a/src/app/routes/tax-management/services/tax-management.service.ts b/src/app/routes/tax-management/services/tax-management.service.ts index 51f7cc45..ee087615 100644 --- a/src/app/routes/tax-management/services/tax-management.service.ts +++ b/src/app/routes/tax-management/services/tax-management.service.ts @@ -56,7 +56,12 @@ export class TaxManagementService extends ShipperBaseService { $api_async_export_order_reporting_list = ``; // 导出订单上报 $api_get_upload_setting = ``; // 修改上传设置 $api_upload_setting_save = ``; // 修改上传设置 + // 获取发票上传列表 $api_getInvoiceReport_page = '/api/sdc/invoiceUploadInfo/list/page'; + // 发票上传列表导出 + $api_invoiceUpload_export = '/api/sdc/invoiceUploadInfo/reportList'; + // 发票上传撤回 + $api_invoiceUpload_withdraw = '/api/sdc/invoiceUploadInfo/withdraw'; constructor(public injector: Injector) { super(injector); } diff --git a/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.ts b/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.ts index c3c7c253..c9a2a049 100644 --- a/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.ts +++ b/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.ts @@ -208,6 +208,8 @@ export class ETCInvoicedLogsComponent implements OnInit { className: 'text-right font-weight-bold', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.totalAmount }) } }, + { title: '进站时间', index: 'trafficStartTime', type: 'date', width: 150 }, + { title: '出站时间', index: 'trafficEndTime', type: 'date', width: 150 }, { title: '交易时间', index: 'exTime', type: 'date', width: 150 }, { title: '开票日期', index: 'invoiceMakeTime', type: 'date', width: 150 }, { title: '销售方', index: 'sellerName', width: 150 }, diff --git a/src/app/routes/usercenter/components/freight/list/list.component.ts b/src/app/routes/usercenter/components/freight/list/list.component.ts index 4df4f161..4653512b 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.ts +++ b/src/app/routes/usercenter/components/freight/list/list.component.ts @@ -409,7 +409,7 @@ export class FreightComponentsListComponent implements OnInit { }, { title: '业务员', className: 'text-center', render: 'promotersTelephone', width: 150 }, { title: '合伙人', className: 'text-center', render: 'partnerName', width: 150 }, - { title: '客服人员', className: 'text-center', render: 'customerServiceId', width: 150 }, + { title: '客服人员', className: 'text-center', index: 'customerServiceIdLabel', width: 150 }, { title: '网络货运人', className: 'text-center', index: 'netTranName', width: 180 }, { title: '注册渠道', diff --git a/src/app/routes/vehicle/components/audit/detail/detail.component.html b/src/app/routes/vehicle/components/audit/detail/detail.component.html index eb678c6f..608a8bb0 100644 --- a/src/app/routes/vehicle/components/audit/detail/detail.component.html +++ b/src/app/routes/vehicle/components/audit/detail/detail.component.html @@ -1,5 +1,5 @@ - + - + - + *ngIf="detailData?.approvalStatus === 10 || detailData?.approvalStatus === '10'" + >驳回 + @@ -41,14 +46,17 @@ - - + - 车辆基础信息 - + 车辆基础信息 - + @@ -57,25 +65,46 @@ [nzShowArrow]="isEdit" [nzDisabled]="!isEdit"> --> - + - + - + - + @@ -84,23 +113,38 @@ + *ngTemplateOutlet=" + uploadTemplate; + context: { image: detailData?.carFrontPhotoWatermark, key: 'carFrontPhotoWatermark', hover: 'PhotoWatermark2' } + " + > - 行驶证信息 + 行驶证信息 - + - + @@ -108,12 +152,24 @@ - + - + @@ -121,16 +177,32 @@ - + - + - + @@ -139,64 +211,127 @@ - + - + - + + *ngTemplateOutlet=" + uploadTemplate; + context: { image: detailData?.certificatePhotoFrontWatermark, key: 'certificatePhotoFrontWatermark', hover: 'FrontWatermark' } + " + > + *ngTemplateOutlet=" + uploadTemplate; + context: { image: detailData?.certificatePhotoBackWatermark, key: 'certificatePhotoBackWatermark', hover: 'BackWatermark' } + " + > - 道路运输证信息 + 道路运输证信息 - + - + - + - + + *ngTemplateOutlet=" + uploadTemplate; + context: { image: detailData?.roadTransportPhotoWatermark, key: 'roadTransportPhotoWatermark', hover: 'Watermark' } + " + > - 认证司机 + 认证司机 - +
未上传 @@ -210,7 +345,6 @@ -
@@ -218,30 +352,42 @@ {{ detailData?.carNo }} - +
- +
上传
-
- +
+
-
+
- \ No newline at end of file + diff --git a/src/app/routes/vehicle/components/audit/detail/detail.component.ts b/src/app/routes/vehicle/components/audit/detail/detail.component.ts index 5e17a8f8..89ece581 100644 --- a/src/app/routes/vehicle/components/audit/detail/detail.component.ts +++ b/src/app/routes/vehicle/components/audit/detail/detail.component.ts @@ -61,10 +61,10 @@ export class VehicleComponentsAuditDetailComponent implements OnInit, OnDestroy initST() { this.columns = [ - { title: '司机姓名', index: 'name', className: 'text-center' }, - { title: '司机手机号', index: 'mobile', className: 'text-center' }, - { title: '身份证号', index: 'idCardNo', className: 'text-center' }, - { title: '挂靠协议', render: 'auditStatusEnum', className: 'text-center' }, + { title: '司机姓名', index: 'name', width: 150, className: 'text-center' }, + { title: '司机手机号', index: 'mobile', width: 200,className: 'text-center' }, + { title: '身份证号', index: 'idCardNo', width: 200, className: 'text-center' }, + { title: '挂靠协议', render: 'auditStatusEnum', width: 100,className: 'text-center' }, { title: '车主申明/挂靠协议', fixed: 'right', diff --git a/src/app/routes/vehicle/components/list/detail/detail.component.html b/src/app/routes/vehicle/components/list/detail/detail.component.html index 56a65d87..f868a506 100644 --- a/src/app/routes/vehicle/components/list/detail/detail.component.html +++ b/src/app/routes/vehicle/components/list/detail/detail.component.html @@ -8,11 +8,10 @@ - -
+ +
- + @@ -23,45 +22,76 @@ - 车辆基础信息 + 车辆基础信息 - + - + - + - + - + - + @@ -71,7 +101,11 @@ + *ngTemplateOutlet=" + uploadTemplate; + context: { image: detailData?.carFrontPhotoWatermark, key: 'carFrontPhotoWatermark', hover: 'PhotoWatermark2' } + " + > @@ -79,33 +113,62 @@ - 行驶证信息 + 行驶证信息 - + - + - + - + - + @@ -113,17 +176,33 @@ - + - + - + @@ -132,68 +211,130 @@ - + - + - + + *ngTemplateOutlet=" + uploadTemplate; + context: { image: detailData?.certificatePhotoFrontWatermark, key: 'certificatePhotoFrontWatermark', hover: 'FrontWatermark' } + " + > + *ngTemplateOutlet=" + uploadTemplate; + context: { image: detailData?.certificatePhotoBackWatermark, key: 'certificatePhotoBackWatermark', hover: 'BackWatermark' } + " + > - 道路运输证信息 + 道路运输证信息 - + - + - + - + + *ngTemplateOutlet=" + uploadTemplate; + context: { image: detailData?.roadTransportPhotoWatermark, key: 'roadTransportPhotoWatermark', hover: 'Watermark' } + " + > - 认证司机 + 认证司机 - +
未上传 @@ -208,8 +349,13 @@ - + @@ -219,9 +365,7 @@
-
- 暂无评价内容 -
+
暂无评价内容
@@ -232,23 +376,35 @@ - +
上传
-
- +
+
-
+
- \ No newline at end of file + diff --git a/src/app/routes/vehicle/components/list/detail/detail.component.ts b/src/app/routes/vehicle/components/list/detail/detail.component.ts index 6cdb9990..9e729f83 100644 --- a/src/app/routes/vehicle/components/list/detail/detail.component.ts +++ b/src/app/routes/vehicle/components/list/detail/detail.component.ts @@ -89,9 +89,10 @@ export class VehicleComponentsListDetailComponent implements OnInit { } initST() { this.columns = [ - { title: '司机姓名', index: 'name', width: 300, className: 'text-center' }, - { title: '司机手机号', index: 'mobile', width: 300, className: 'text-center' }, - { title: '挂靠协议', render: 'auditStatusEnum', className: 'text-center' }, + { title: '司机姓名', index: 'name', width: 150, className: 'text-center' }, + { title: '司机手机号', index: 'mobile', width: 200, className: 'text-center' }, + { title: '身份证号', index: 'idCardNo',width: 200, className: 'text-center' }, + { title: '挂靠协议', render: 'auditStatusEnum', width: 100,className: 'text-center' }, { title: '录入人员', index: 'saveUser', className: 'text-center' }, { title: '车主申明/挂靠协议', 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 diff --git a/src/app/shared/widget/dict-select/dict-select.widget.ts b/src/app/shared/widget/dict-select/dict-select.widget.ts index d8906295..fced5406 100644 --- a/src/app/shared/widget/dict-select/dict-select.widget.ts +++ b/src/app/shared/widget/dict-select/dict-select.widget.ts @@ -39,6 +39,6 @@ export class DictSelectWidget extends ControlWidget implements OnInit { } reset(value: any) { - this.setValue(value); + if (value) this.setValue(value); } } diff --git a/src/assets/images/wallet.svg b/src/assets/images/wallet.svg new file mode 100644 index 00000000..d1cc7990 --- /dev/null +++ b/src/assets/images/wallet.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file