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/proxy.conf.js b/proxy.conf.js index 8fd91df6..a3308533 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 17:51:09 * @FilePath : \\tms-obc-web\\proxy.conf.js * Copyright (C) 2022 huzhenhong. All rights reserved. */ 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/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/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/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/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/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/receipts-audit/receipts-audit.component.html b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.html index cabacf83..74e950e6 100644 --- a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.html +++ b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.html @@ -1,4 +1,4 @@ -billCode - + -
- +
+ +
+
+ + + +
- - - -
- -
-
- - - - -
-
- + --> - - - - - - -
- +
+ + + + + + +
+ +
+ + [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false"> {{ item.freightPrice | currency }} @@ -79,12 +58,13 @@ billCode - {{ item.billCode }} - {{ item.billCode }} - {{ item.billCode }} + {{ + item.billCode }} + {{ + item.billCode }} + {{ + item.billCode }}
{{item?.billStatusLabel}}
- {{item?.resourceTypeLabel}}{{item?.serviceTypeLabel === item?.resourceTypeLabel ? '':item?.serviceTypeLabel}} + {{item?.resourceTypeLabel}}{{item?.serviceTypeLabel === item?.resourceTypeLabel ? + '':item?.serviceTypeLabel}}
@@ -131,7 +116,20 @@ billCode - + -
- +
+ +
+
+ + + +
- - - -
- -
-
- - - - -
-
- + --> - - - - - - - - -
- +
+ + + + + + + + +
+ +
+ + [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false"> - {{ item.billCode }} - {{ item.billCode }} - {{ item.billCode }} + {{ + item.billCode }} + {{ item.billCode + }} + {{ + item.billCode }}
{{ item?.representationsStatusLabel }}
- {{item?.billTypeLabel}}{{item?.billTypeLabel === item?.serviceTypeLabel ? '' : item?.serviceTypeLabel}} + {{item?.billTypeLabel}}{{item?.billTypeLabel === item?.serviceTypeLabel ? '' : + item?.serviceTypeLabel}}
@@ -96,7 +81,8 @@
-
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + item?.carNo : ''}}
+
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + + item?.carNo : ''}}
@@ -113,7 +99,7 @@

货物名称:{{ i?.goodsName }}

-

重量/体积:{{ i?.weight ? i?.weight + '吨' : '' }}{{ i?.volume ? "/" + i?.volume + '方' : ''}}

+

重量/体积:{{ i?.weight ? i?.weight + '吨' : '' }}{{ i?.volume ? "/" + i?.volume + '方' : ''}}

车型/车长:{{ i?.carModelLabel }} {{ i?.carLengthLabel ? "/" + i?.carLengthLabel : ''}}

@@ -121,14 +107,8 @@
- + @@ -139,7 +119,10 @@ -
- +
+ + +
- + \ No newline at end of file diff --git a/src/app/routes/order-management/components/risk/risk.component.less b/src/app/routes/order-management/components/risk/risk.component.less index 987664d0..e69de29b 100644 --- a/src/app/routes/order-management/components/risk/risk.component.less +++ b/src/app/routes/order-management/components/risk/risk.component.less @@ -1,13 +0,0 @@ - - :host { - p{ - margin-bottom: 0 - } - .left_btn { - width: 50px; - height: 32px; - padding-left: 8px; - line-height:32px; - background-color: #d7d7d7; - } - } \ No newline at end of file diff --git a/src/app/routes/order-management/components/risk/risk.component.ts b/src/app/routes/order-management/components/risk/risk.component.ts index 400d1fb0..1188e06e 100644 --- a/src/app/routes/order-management/components/risk/risk.component.ts +++ b/src/app/routes/order-management/components/risk/risk.component.ts @@ -4,21 +4,20 @@ import { Component, 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'; -import { ShipperBaseService } from '@shared'; +import { SearchDrawerService, ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { of } from 'rxjs'; import { map } from 'rxjs/operators'; import { OrderManagementService } from '../../services/order-management.service'; +import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component'; @Component({ selector: 'app-supply-management-risk', templateUrl: './risk.component.html', - styleUrls: ['./risk.component.less'] + styleUrls: ['../../../commom/less/commom-table.less', './risk.component.less'] }) -export class OrderManagementRiskComponent implements OnInit { - ui: SFUISchema = {}; +export class OrderManagementRiskComponent extends BasicTableComponent implements OnInit { uiView: SFUISchema = {}; - schema: SFSchema = {}; schemaView: SFSchema = {}; auditMany = false; loading: boolean = true; @@ -26,7 +25,6 @@ export class OrderManagementRiskComponent implements OnInit { auditIdR: any; isVisibleRE = false; resourceStatus: any; - _$expand = false; @ViewChild('st') private readonly st!: STComponent; @ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sfView', { static: false }) sfView!: SFComponent; @@ -41,8 +39,11 @@ export class OrderManagementRiskComponent implements OnInit { public service: OrderManagementService, public shipperservice: ShipperBaseService, private modal: NzModalService, - public router: Router - ) { } + public router: Router, + public searchDrawerService: SearchDrawerService + ) { + super(searchDrawerService); + } /** * 查询参数 @@ -50,7 +51,7 @@ export class OrderManagementRiskComponent implements OnInit { get reqParams() { const a: any = {}; if (this.resourceStatus) { - a.representationsStatus = this.resourceStatus + a.representationsStatus = this.resourceStatus; } const params: any = Object.assign({}, this.sf?.value || {}); delete params._$expand; @@ -59,14 +60,14 @@ export class OrderManagementRiskComponent implements OnInit { ...params, createTime: { start: this.sf?.value?.createTime?.[0] || '', - end: this.sf?.value?.createTime?.[1] || '', - }, + end: this.sf?.value?.createTime?.[1] || '' + } }; } beforeReq = (requestOptions: STRequestOptions) => { const a: any = {}; if (this.resourceStatus) { - a.representationsStatus = this.resourceStatus + a.representationsStatus = this.resourceStatus; } const params: any = Object.assign({}, this.sf?.value || {}); delete params._$expand; @@ -76,51 +77,51 @@ export class OrderManagementRiskComponent implements OnInit { ...params, createTime: { start: this.sf?.value?.createTime?.[0] || '', - end: this.sf?.value?.createTime?.[1] || '', - }, + end: this.sf?.value?.createTime?.[1] || '' + } }); } this.loading = true; 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.representationsStatus !== '2' + disabled: item.representationsStatus !== '2' })); }; search() { this.st?.load(1); - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical(); } get selectedRows() { return this.st?.list.filter(item => item.checked) || []; } ngOnInit(): void { - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical(); this.initSF(); this.initST(); } getGoodsSourceStatistical() { this.service.request(this.service.$api_get_listStatisticalStatus, this.reqParams).subscribe(res => { if (res) { - res.forEach((element: any) => { - console.log(element.representationsStatus); - if(element.representationsStatus === '1') { - this.tabs.stayQuantity = element.quantity - } else if (element.representationsStatus == '4') { - this.tabs.cancelQuantity = element.quantity - } else if (element.representationsStatus == '3') { - this.tabs.receivedQuantity = element.quantity - }else if (element.representationsStatus == '2') { - this.tabs.underwayQuantity = element.quantity - } - }); - console.log(this.tabs) + res.forEach((element: any) => { + console.log(element.representationsStatus); + if (element.representationsStatus === '1') { + this.tabs.stayQuantity = element.quantity; + } else if (element.representationsStatus == '4') { + this.tabs.cancelQuantity = element.quantity; + } else if (element.representationsStatus == '3') { + this.tabs.receivedQuantity = element.quantity; + } else if (element.representationsStatus == '2') { + this.tabs.underwayQuantity = element.quantity; + } + }); + console.log(this.tabs); } - }) + }); } /** * 初始化查询表单 @@ -146,48 +147,23 @@ export class OrderManagementRiskComponent implements OnInit { }, loadingPlace: { type: 'string', - title: '装货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + title: '装货地' }, dischargePlace: { type: 'string', - title: '卸货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + title: '卸货地' }, driverName: { title: '承运司机', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + type: 'string' }, carNo: { title: '车牌号', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + type: 'string' }, payeeName: { type: 'string', - title: '车队长', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + title: '车队长' }, wayBillType: { title: '运单类型', @@ -195,10 +171,7 @@ export class OrderManagementRiskComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'bill:type' }, - containsAllLabel: true, - visibleIf: { - _$expand: (value: boolean) => value - } + containsAllLabel: true } as SFSelectWidgetSchema }, shipperAppUserName: { @@ -210,11 +183,8 @@ export class OrderManagementRiskComponent 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 }) @@ -223,7 +193,7 @@ export class OrderManagementRiskComponent implements OnInit { } else { return of([]); } - }, + } } as SFSelectWidgetSchema }, enterpriseInfoId: { @@ -233,11 +203,8 @@ export class OrderManagementRiskComponent implements OnInit { widget: 'select', placeholder: '请选择', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value, - }, - asyncData: () => this.shipperservice.getNetworkFreightForwarder(), - }, + asyncData: () => this.shipperservice.getNetworkFreightForwarder() + } }, createTime: { title: '创建时间', @@ -246,16 +213,12 @@ export class OrderManagementRiskComponent implements OnInit { widget: 'date', mode: 'range', format: 'yyyy-MM-dd', - allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - } + allowClear: true } as SFDateWidgetSchema } }, type: 'object' }; - this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; } /** @@ -347,14 +310,14 @@ export class OrderManagementRiskComponent implements OnInit { { text: '审核', click: _record => this.audit(_record), - iif: item => item.representationsStatus == '2' , - acl: { ability: ['ORDER-RISK-audit'] }, + iif: item => item.representationsStatus == '2', + acl: { ability: ['ORDER-RISK-audit'] } }, { text: '详情', click: _record => this.viewEvaluate(_record), - iif: item => item.representationsStatus !== '1' , - acl: { ability: ['ORDER-RISK-riskDetail'] }, + iif: item => item.representationsStatus !== '1', + acl: { ability: ['ORDER-RISK-riskDetail'] } } ] } @@ -419,30 +382,10 @@ export class OrderManagementRiskComponent implements OnInit { this.uiView = { '*': { spanLabelFixed: 110, grid: { span: 24 } } }; } - /** - * 查询字段个数 - */ - get queryFieldCount(): number { - return Object.keys(this.schema?.properties || {}).length; - } - /** - * 伸缩查询条件 - */ - expandToggle(): void { - this._$expand = !this._$expand; - this.sf?.setValue('/_$expand', this._$expand); - } + tabChange(item: any) { console.log(item); } - /** - * 重置表单 - */ - resetSF(): void { - this.sf.reset(); - this._$expand = false; - } - selectChange(e: number) { this.resourceStatus = e; @@ -454,7 +397,7 @@ export class OrderManagementRiskComponent implements OnInit { /** * 导入货源 */ - importGoodsSource() { } + importGoodsSource() {} /* * 审核关闭弹窗 @@ -472,20 +415,20 @@ export class OrderManagementRiskComponent implements OnInit { idList.push(item.id); }); } else { - idList.push(this.sfView.value.id) + idList.push(this.sfView.value.id); } const parms = { ids: idList, auditRemark: this.sfView.value.representationsCause, representationsStatus: 3, - auditStatus: 2, + auditStatus: 2 }; this.service.request(this.service.$api_get_listRisk_audit, parms).subscribe(res => { if (res) { this.service.msgSrv.success('审核通过成功!'); this.isVisibleRE = false; this.st?.load(1); - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical(); } }); } @@ -499,7 +442,7 @@ export class OrderManagementRiskComponent implements OnInit { idList.push(item.id); }); } else { - idList.push(this.sfView.value.id) + idList.push(this.sfView.value.id); } if (!this.sfView.value.representationsCause) { this.service.msgSrv.error('拒绝原因为空!'); @@ -509,14 +452,14 @@ export class OrderManagementRiskComponent implements OnInit { ids: idList, auditRemark: this.sfView.value.representationsCause, representationsStatus: 4, - auditStatus: 3, + auditStatus: 3 }; this.service.request(this.service.$api_get_listRisk_audit, parms).subscribe(res => { if (res) { this.service.msgSrv.success('审核拒绝成功!'); this.isVisibleRE = false; this.st?.load(1); - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical(); } }); } @@ -531,7 +474,7 @@ export class OrderManagementRiskComponent implements OnInit { this.isVisibleRE = true; } else { if (this.selectedRows.length <= 0) { - this.service.msgSrv.error('请选择订单!') + this.service.msgSrv.error('请选择订单!'); return; } else { this.initSTAudit(2); @@ -545,8 +488,8 @@ export class OrderManagementRiskComponent implements OnInit { viewEvaluate(item: any) { this.router.navigate(['/order-management/risk-detail', item.id]); } - // 导出 - exprot() { - this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportRiskBillList); - } + // 导出 + exprot() { + this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportRiskBillList); + } } 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 @@ --> -
-
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/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] || '' } }); } 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/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/app/routes/usercenter/components/freight/list/detail/detail.component.html b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html index cfd71b20..5f8491e0 100644 --- a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html +++ b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html @@ -369,7 +369,7 @@ 合伙人信息 - {{partnerInfo.partnerEnterpriseName}} + {{partnerInfo.partnerContactName}} 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..0adfbf1d 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 @@
- + @@ -57,6 +57,9 @@ {{ item.contacter }}
/{{item.mobile}}
+ + {{ item.partnerName }}
/{{item.promotersTelephone}} +
{{ item.promotersTelephone || '添加' }} @@ -72,4 +75,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..162ddc2b 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 }, { @@ -407,7 +424,7 @@ export class FreightComponentsListComponent implements OnInit { enum: { 10: '整车发货', 20: '大宗发货' }, width: 140 }, - { title: '业务员', className: 'text-center', render: 'promotersTelephone', width: 150 }, + { title: '渠道销售', className: 'text-center', render: 'promotersTelephone', width: 150 }, { title: '合伙人', className: 'text-center', render: 'partnerName', width: 150 }, { title: '客服人员', className: 'text-center', index: 'customerServiceIdLabel', width: 150 }, { title: '网络货运人', className: 'text-center', index: 'netTranName', width: 180 }, 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'; // 分配客服人员 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/components/search-drawer/index.ts b/src/app/shared/components/search-drawer/index.ts new file mode 100644 index 00000000..7129b4d9 --- /dev/null +++ b/src/app/shared/components/search-drawer/index.ts @@ -0,0 +1,3 @@ +export * from './search-drawer.component'; +export * from './search-drawer.module'; +export * from './search-drawer.service'; \ No newline at end of file diff --git a/src/app/shared/components/search-drawer/search-drawer.component.html b/src/app/shared/components/search-drawer/search-drawer.component.html new file mode 100644 index 00000000..070bb956 --- /dev/null +++ b/src/app/shared/components/search-drawer/search-drawer.component.html @@ -0,0 +1,14 @@ + +
+ + +
+ +
+ + + +
+
+
\ No newline at end of file diff --git a/src/app/shared/components/search-drawer/search-drawer.component.less b/src/app/shared/components/search-drawer/search-drawer.component.less new file mode 100644 index 00000000..e69de29b diff --git a/src/app/shared/components/search-drawer/search-drawer.component.ts b/src/app/shared/components/search-drawer/search-drawer.component.ts new file mode 100644 index 00000000..0cce05f1 --- /dev/null +++ b/src/app/shared/components/search-drawer/search-drawer.component.ts @@ -0,0 +1,55 @@ +import { AfterViewInit, Component, OnInit, ViewChild } from '@angular/core'; +import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; +import { Subject } from 'rxjs'; +import { SearchDrawerService } from './search-drawer.service'; + +@Component({ + selector: 'app-search-drawer', + templateUrl: './search-drawer.component.html', + styleUrls: ['./search-drawer.component.less'] +}) +export class SearchDrawerComponent implements OnInit, AfterViewInit { + @ViewChild('sf', { static: false }) sf!: SFComponent; + ui: SFUISchema = { '*': { spanLabelFixed: 95, grid: { span: 24, gutter: 4 } } }; + schema!: SFSchema; + + loading = true; + + defaultValue = {}; + + constructor(public service: SearchDrawerService) {} + ngAfterViewInit(): void {} + + ngOnInit(): void { + this.service.createEvent.subscribe(({ defaultValue, newSchema, newUI }) => { + if (defaultValue) { + this.defaultValue = defaultValue; + } + if (newSchema) { + this.schema = newSchema; + if (this.sf) { + this.sf.refreshSchema(newSchema, newUI); + this.sf.reset(); + } + this.service.visible = true; + } + setTimeout(() => { + this.service.initEvent.next(this.sf); + }, 500); + }); + } + + resetSF(): void { + this.sf.reset(); + } + + search() { + if (this.sf) { + this.service.closeEvent.next(this.sf.value); + } + } + + destroy() { + this.service.visible = false; + } +} diff --git a/src/app/shared/components/search-drawer/search-drawer.module.ts b/src/app/shared/components/search-drawer/search-drawer.module.ts new file mode 100644 index 00000000..08746cc8 --- /dev/null +++ b/src/app/shared/components/search-drawer/search-drawer.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { SHARED_DELON_MODULES } from '../../shared-delon.module'; +import { SHARED_ZORRO_MODULES } from '../../shared-zorro.module'; +import { SearchDrawerComponent } from './search-drawer.component'; +import { FormsModule } from '@angular/forms'; +import { DelonACLModule } from '@delon/acl'; + +@NgModule({ + declarations: [SearchDrawerComponent], + imports: [CommonModule, FormsModule, DelonACLModule, ...SHARED_DELON_MODULES, ...SHARED_ZORRO_MODULES], + exports: [SearchDrawerComponent] +}) +export class SearchDrawerModule {} diff --git a/src/app/shared/components/search-drawer/search-drawer.service.ts b/src/app/shared/components/search-drawer/search-drawer.service.ts new file mode 100644 index 00000000..6201c006 --- /dev/null +++ b/src/app/shared/components/search-drawer/search-drawer.service.ts @@ -0,0 +1,20 @@ +import { Injectable } from '@angular/core'; +import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; +import { Subject } from 'rxjs'; + +@Injectable({ + providedIn: 'root' +}) +export class SearchDrawerService { + closeEvent = new Subject(); + createEvent = new Subject(); + initEvent = new Subject(); + + visible = false; + constructor() {} + + create(defaultValue: Record, newSchema?: SFSchema, newUI?: SFUISchema) { + this.createEvent.next({ defaultValue, newSchema, newUI }); + return this; + } +} diff --git a/src/app/shared/index.ts b/src/app/shared/index.ts index 7ea8c70d..11bf70b7 100644 --- a/src/app/shared/index.ts +++ b/src/app/shared/index.ts @@ -22,6 +22,7 @@ export * from './components/dynamic-setting'; export * from './components/singlepage-setting'; export * from './components/insurance-table/index'; export * from './components/rebate-table/index'; +export * from './components/search-drawer'; // Utils export * from './utils'; diff --git a/src/app/shared/services/business/shipper-base.service.ts b/src/app/shared/services/business/shipper-base.service.ts index 3a614d5b..56d9efaa 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); } @@ -167,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客户 @@ -247,6 +273,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 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..18f62bd9 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -37,7 +37,10 @@ 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'; +import { SearchDrawerComponent } from './components/search-drawer/search-drawer.component'; +import { SearchDrawerModule } from './components/search-drawer/search-drawer.module'; const MODULES = [ AddressModule, @@ -53,6 +56,8 @@ const MODULES = [ ImageListModule, PipeModule, rebateTableModule, + CaptchaModule, + SearchDrawerModule, ...PRO_SHARED_MODULES ]; // #endregion @@ -90,4 +95,4 @@ const SHAREDCOMPONENTS = [LogisticsTimeLineComponent, DictSelectComponent, Accou ], declarations: SHAREDCOMPONENTS }) -export class SharedModule { } +export class SharedModule {} 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 diff --git a/src/styles/theme.less b/src/styles/theme.less index ae6c6f8c..f5667bf2 100644 --- a/src/styles/theme.less +++ b/src/styles/theme.less @@ -19,3 +19,7 @@ // .page-header__title { // display: none; // } + +.ant-btn { + border-radius: 4px; +} \ No newline at end of file