Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -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<Type<any>> = [...PRO_COMPONENTS, LayoutPassportComponent];
|
||||
|
||||
@ -57,7 +58,8 @@ const COMPONENTS: Array<Type<any>> = [...PRO_COMPONENTS, LayoutPassportComponent
|
||||
ThemeBtnModule,
|
||||
ScrollbarModule,
|
||||
NzGridModule,
|
||||
NzMessageModule
|
||||
NzMessageModule,
|
||||
SearchDrawerModule
|
||||
],
|
||||
declarations: COMPONENTS,
|
||||
exports: COMPONENTS
|
||||
|
||||
@ -37,4 +37,5 @@
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #settingHost></ng-template>
|
||||
<theme-btn></theme-btn>
|
||||
<theme-btn></theme-btn>
|
||||
<app-search-drawer></app-search-drawer>
|
||||
@ -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({
|
||||
|
||||
@ -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];
|
||||
|
||||
|
||||
@ -12,9 +12,9 @@
|
||||
<div nz-col [nzSpan]="10">{{ infoData.phone }}</div>
|
||||
<div nz-col [nzSpan]="10">
|
||||
<span *ngIf="infoData.phone; else elsePhone"><i nz-icon [nzType]="'check-circle'" [nzTheme]="'fill'"
|
||||
style="color: #52c41a"></i> 已绑定</span>
|
||||
<ng-template #elsePhone><i nz-icon [nzType]="'question-circle'" [nzTheme]="'fill'"
|
||||
style="color: #ccc"></i> 未绑定</ng-template>
|
||||
style="color: #52c41a"></i> 已绑定</span>
|
||||
<ng-template #elsePhone><i nz-icon [nzType]="'question-circle'" [nzTheme]="'fill'"
|
||||
style="color: #ccc"></i> 未绑定</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
</nz-list-item-meta-title>
|
||||
@ -30,19 +30,45 @@
|
||||
</div>
|
||||
<div nz-col [nzSpan]="10">定期更换密码有助于账号安全</div>
|
||||
<div nz-col [nzSpan]="10">
|
||||
<span *ngIf="infoData.isPwd; else elsePwd"
|
||||
><i nz-icon [nzType]="'check-circle'" [nzTheme]="'fill'" style="color: #52c41a"></i> 已设置</span
|
||||
>
|
||||
<ng-template #elsePwd
|
||||
><i nz-icon [nzType]="'question-circle'" [nzTheme]="'fill'" style="color: #ccc"></i> 未设置</ng-template
|
||||
>
|
||||
<span *ngIf="infoData.isPwd; else elsePwd"><i nz-icon [nzType]="'check-circle'" [nzTheme]="'fill'"
|
||||
style="color: #52c41a"></i> 已设置</span>
|
||||
<ng-template #elsePwd><i nz-icon [nzType]="'question-circle'" [nzTheme]="'fill'"
|
||||
style="color: #ccc"></i> 未设置</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
</nz-list-item-meta-title>
|
||||
</nz-list-item-meta>
|
||||
<div class="item-btn"><a (click)="edit('password')">修改</a></div>
|
||||
</nz-list-item>
|
||||
<!-- <nz-list-item *ngIf="defaultCompany.enterpriseId"> -->
|
||||
<nz-list-item>
|
||||
<nz-list-item-meta>
|
||||
<nz-list-item-meta-title>
|
||||
<div nz-row [nzGutter]="16">
|
||||
<div nz-col [nzSpan]="4" class="li-label">
|
||||
<!-- <svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1"
|
||||
width="19px" height="23px">
|
||||
<g transform="matrix(1 0 0 1 -345 -324 )">
|
||||
<path
|
||||
d="M 15.6123766269722 8.00244105491571 C 15.6119034283768 8.00244105491571 15.6114302297875 8.00244117202714 15.61095703125 8.00244140625 L 15.197197265625 8.00244140625 C 15.1815563889208 8.00244140625 15.168876953125 7.98976197045419 15.168876953125 7.97412109375 L 15.168876953125 5.885498046875 C 15.1737779288544 4.39846216264915 14.595081789561 2.96885593837806 13.55716796875 1.9039453125 C 12.7321123508105 1.05143460529325 11.655620403345 0.485695706108903 10.485546875 0.2896875 C 6.987421875 -0.313818359375 3.801953125 2.4227734375 3.801953125 5.97130859375 L 3.801953125 7.97412109375 C 3.801953125 7.98976197045419 3.78927368920419 8.00244140625 3.7736328125 8.00244140625 L 3.407451171875 8.00244140625 C 1.80531036111513 8.00259780422134 0.50660155486636 9.3014334003565 0.506601562499998 10.90357421875 L 0.506601562499998 19.88734375 C 0.506601562499998 21.489282355869 1.80522937670661 22.7879101700756 3.40716796875 22.7879101700756 L 15.579521484375 22.78791015625 C 17.1817432795434 22.7879101700756 18.48037109375 21.489282355869 18.48037109375 19.8873437638256 L 18.48037109375 10.874970703125 C 18.4803734804811 10.8734601705268 18.4803746738472 10.8719496362745 18.4803746738472 10.8704391017907 C 18.4803746738472 9.28648751795714 17.1963282108058 8.00244105491571 15.6123766269722 8.00244105491571 Z M 5.165859375 7.97412109375 L 5.16416015625 5.885498046875 C 5.16416015625 3.28484375 6.8866015625 1.56580078125 9.484140625 1.56580078125 C 10.7585546875 1.56580078125 11.718046875 1.963984375 12.583798828125 2.85494140625 C 13.430859375 3.72720703125 13.8035546875 4.66234375 13.8035546875 5.88521484375 L 13.8035546875 7.97412109375 C 13.8035546875 7.98976197045419 13.7908752517042 8.00244140625 13.775234375 8.00244140625 L 5.1941796875 8.00244140625 C 5.17853881079581 8.00244140625 5.165859375 7.98976197045419 5.165859375 7.97412109375 Z M 17.1215625 19.9156640625 L 17.1249609375 19.9156640625 C 17.1249609375 20.926982421875 16.622275390625 21.429384765625 15.61095703125 21 L 3.4111328125 21 C 2.55948707595672 21.429384765625 1.869091796875 20.7389894865433 1.869091796875 19.88734375 L 1.869091796875 11.115126953125 C 1.869091796875 10.1483643640389 2.65280772341387 9.3646484375 3.6195703125 9.3646484375 L 15.579521484375 9.3646484375 C 16.4311672209183 9.3646484375 17.1215625 10.0550437165817 17.1215625 10.906689453125 L 17.1215625 19.9156640625 Z "
|
||||
fill-rule="nonzero" fill="#3370ff" stroke="none" transform="matrix(1 0 0 1 345 324 )" />
|
||||
</g>
|
||||
</svg> -->
|
||||
<span class="icon iconfont icon-mima" style="color: #aaa"></span> 支付密码
|
||||
</div>
|
||||
<div nz-col [nzSpan]="10">定期更换支付密码有助于账号安全</div>
|
||||
<div nz-col [nzSpan]="10">
|
||||
<span *ngIf="ifHasPayPw; else elsePwd"><i nz-icon [nzType]="'check-circle'" [nzTheme]="'fill'"
|
||||
style="color: #52c41a"></i> 已设置</span>
|
||||
<ng-template #elsePwd><i nz-icon [nzType]="'question-circle'" [nzTheme]="'fill'"
|
||||
style="color: #ccc"></i> 未设置</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
</nz-list-item-meta-title>
|
||||
</nz-list-item-meta>
|
||||
<div class="item-btn"><a (click)="edit('payPassword')">设置</a></div>
|
||||
</nz-list-item>
|
||||
</nz-list>
|
||||
|
||||
</nz-card>
|
||||
</div>
|
||||
</div>
|
||||
@ -17,7 +17,7 @@
|
||||
right: 20px;
|
||||
}
|
||||
.item-btn {
|
||||
width: 28px;
|
||||
width: 36px;
|
||||
text-align: center;
|
||||
}
|
||||
.li-label {
|
||||
|
||||
@ -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 },
|
||||
|
||||
@ -0,0 +1,171 @@
|
||||
<page-header-wrapper [title]="''" [logo]="logo">
|
||||
<ng-template #logo>
|
||||
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
|
||||
<i nz-icon nzType="left" nzTheme="outline"></i>
|
||||
</button>
|
||||
</ng-template>
|
||||
</page-header-wrapper>
|
||||
<nz-card>
|
||||
<div class="container">
|
||||
<div>
|
||||
<div style="display: flex; align-items: center; min-height: 150px">
|
||||
<nz-steps [nzCurrent]="step" style="display: contents" [nzProgressDot]="progressTemplate">
|
||||
<nz-step nzTitle="安全验证"></nz-step>
|
||||
<nz-step nzTitle="重设密码"></nz-step>
|
||||
<nz-step nzTitle="完成"></nz-step>
|
||||
</nz-steps>
|
||||
<ng-template #progressTemplate let-dot let-status="status" let-index="index">
|
||||
<ng-container *ngIf="status === 'finish'; else finshTemplate">
|
||||
<i nz-icon nzType="check" nzTheme="outline" style="color: #fff"></i>
|
||||
</ng-container>
|
||||
<ng-template #finshTemplate>
|
||||
{{ index + 1 }}
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</div>
|
||||
<nz-card [nzBordered]="false">
|
||||
<div style="width: 480px; margin: 0 auto" [ngSwitch]="step.toString()">
|
||||
<div *ngSwitchCase="0">
|
||||
<sf #step1sf *ngIf="step1Schema" [schema]="step1Schema" button="none" [layout]="'horizontal'">
|
||||
<ng-template sf-template="smsVerifyCode" let-smsVerifyCode let-ui="ui" let-schema="schema">
|
||||
<nz-input-group [nzSuffix]="suffixTemplateInfo">
|
||||
<input
|
||||
type="text"
|
||||
maxlength="6"
|
||||
nz-input
|
||||
placeholder="请输入验证码"
|
||||
[ngModel]="smsVerifyCode.formProperty.value"
|
||||
(ngModelChange)="smsVerifyCode.setValue($event)"
|
||||
/>
|
||||
</nz-input-group>
|
||||
</ng-template>
|
||||
<div nz-col [nzPush]="5">
|
||||
<button
|
||||
nz-button
|
||||
type="submit"
|
||||
nzType="primary"
|
||||
(click)="nextStep()"
|
||||
[disabled]="!step1sf.valid"
|
||||
[nzLoading]="service.http.loading"
|
||||
>
|
||||
下一步
|
||||
</button>
|
||||
</div>
|
||||
</sf>
|
||||
</div>
|
||||
|
||||
<div *ngSwitchCase="1">
|
||||
<form nz-form [formGroup]="formGroup3" class="myForm">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="6" nzRequired nzFor="passWord">设置支付密码</nz-form-label>
|
||||
<nz-form-control nzSpan="18" [nzErrorTip]="passwordErrorTpl">
|
||||
<nz-input-group [nzSuffix]="pwdIconEye">
|
||||
<input
|
||||
nz-input
|
||||
[type]="isShowPwd ? 'text' : 'password'"
|
||||
formControlName="passWord"
|
||||
minlength="6"
|
||||
maxlength="6"
|
||||
(ngModelChange)="validateConfirmPassword()"
|
||||
placeholder="请输入支付密码"
|
||||
/>
|
||||
</nz-input-group>
|
||||
<ng-template #pwdIconEye>
|
||||
<span (click)="isShowPwd = !isShowPwd">
|
||||
<ng-container *ngIf="isShowPwd; else showPwdTempalte">
|
||||
<i nz-icon nzType="eye" nzTheme="outline"></i>
|
||||
</ng-container>
|
||||
<ng-template #showPwdTempalte>
|
||||
<i nz-icon nzType="eye-invisible" nzTheme="outline"></i>
|
||||
</ng-template>
|
||||
</span>
|
||||
</ng-template>
|
||||
<ng-template #passwordErrorTpl let-control>
|
||||
<ng-container *ngIf="control.hasError('required')"> 请输入支付密码! </ng-container>
|
||||
<ng-container *ngIf="control.hasError('minlength') || control.hasError('pattern') || control.hasError('confirm')">
|
||||
6位数字,不能为连续数字或者相同数字(如123456、111111)
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="6" nzRequired nzFor="passWordTo">重复支付密码</nz-form-label>
|
||||
<nz-form-control nzSpan="18" nzDisableAutoTips [nzErrorTip]="confirmPasswordErrorTpl">
|
||||
<nz-input-group [nzSuffix]="confirmPwdIconEye">
|
||||
<input
|
||||
nz-input
|
||||
[type]="isShowConfirmPwd ? 'text' : 'password'"
|
||||
formControlName="passWordTo"
|
||||
minlength="6"
|
||||
maxlength="6"
|
||||
(ngModelChange)="validateConfirmPassword()"
|
||||
placeholder="请输入支付密码"
|
||||
/>
|
||||
</nz-input-group>
|
||||
<ng-template #confirmPwdIconEye>
|
||||
<span (click)="isShowConfirmPwd = !isShowConfirmPwd">
|
||||
<ng-container *ngIf="isShowConfirmPwd; else showConfirmPwdTempalte">
|
||||
<i nz-icon nzType="eye" nzTheme="outline"></i>
|
||||
</ng-container>
|
||||
<ng-template #showConfirmPwdTempalte>
|
||||
<i nz-icon nzType="eye-invisible" nzTheme="outline"></i>
|
||||
</ng-template>
|
||||
</span>
|
||||
</ng-template>
|
||||
<ng-template #confirmPasswordErrorTpl let-control>
|
||||
<ng-container *ngIf="control.hasError('required')"> 请输入确认密码! </ng-container>
|
||||
<ng-container *ngIf="control.hasError('passWordTo')"> 两次输入的密码不一致! </ng-container>
|
||||
</ng-template>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-control nzSpan="18" nzOffset="6">
|
||||
<button
|
||||
[disabled]="!formGroup3.valid"
|
||||
[nzLoading]="service.http.loading"
|
||||
nz-button
|
||||
nzType="primary"
|
||||
(click)="formSubmit()"
|
||||
style="width: 74px"
|
||||
>
|
||||
确认
|
||||
</button>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</form>
|
||||
</div>
|
||||
<div *ngSwitchCase="2" class="success-card">
|
||||
<div class="card-icon">
|
||||
<i nz-icon nzType="check" nzTheme="outline" style="color: #fff; font-size: 20px"></i>
|
||||
</div>
|
||||
<p class="card-title">密码设置成功</p>
|
||||
<p class="card-descr">请牢记您的新支付密码,3秒后自动跳转至个人中心...</p>
|
||||
<!-- <button
|
||||
nz-button
|
||||
type="button"
|
||||
nzType="primary"
|
||||
nzSize="large"
|
||||
class="mt-lg"
|
||||
style="font-size: 14px"
|
||||
[routerLink]="['/passport/login']"
|
||||
>
|
||||
立即登录
|
||||
</button> -->
|
||||
</div>
|
||||
<div *ngSwitchDefault></div>
|
||||
</div>
|
||||
</nz-card>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<ng-template #suffixTemplateInfo>
|
||||
<ng-container *ngIf="count < 1; else intervalTemplate">
|
||||
<span class="msg-btn" style="color: #3370ff; cursor: pointer" (click)="getMsgCode()">获取验证码</span>
|
||||
</ng-container>
|
||||
<ng-template #intervalTemplate>
|
||||
<!-- {{ count > 0 ? '请等待' + count + 's' : ('app.register.get-verification-code' | translate) }} -->
|
||||
{{ count > 0 ? '请等待' + count + 's' : ('app.register.get-verification-code') }}
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
<app-captcha #dun [phone]="phone" (done)="captchaDone($event)"></app-captcha>
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
@ -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<AccountComponentsEditPayPasswordComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [AccountComponentsEditPayPasswordComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(AccountComponentsEditPayPasswordComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -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 {};
|
||||
};
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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<string, any> = {};
|
||||
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() {}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,3 @@
|
||||
<!-- 页头 -->
|
||||
<page-header-wrapper [title]="'数据报表'"></page-header-wrapper>
|
||||
<div nz-row [nzGutter]="16">
|
||||
<div nz-col class="gutter-row" [nzSpan]="6">
|
||||
<g2-card [title]="AdvanceDepositTitle" [bordered]="true" [total]="totalAdvanceDeposit?.totalAmount || '¥ 0.00万'"
|
||||
@ -11,9 +9,10 @@
|
||||
</p>
|
||||
</ng-template>
|
||||
<ng-template #AdvanceDepositFooter>
|
||||
<g2-mini-area line color="#cceafe" height="45" [data]="totalAdvanceDeposit?.list || []"
|
||||
<g2-custom #AdvanceDeposit delay="100"></g2-custom>
|
||||
<!-- <g2-mini-area line color="#cceafe" height="45" [data]="totalAdvanceDeposit?.list || []"
|
||||
(clickItem)="handleClick($event)">
|
||||
</g2-mini-area>
|
||||
</g2-mini-area> -->
|
||||
</ng-template>
|
||||
</g2-card>
|
||||
</div>
|
||||
|
||||
@ -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'); // 自定义图例,移除默认的分类图例筛选交互
|
||||
|
||||
@ -210,7 +210,7 @@ export class WithdrawalsDetailComponent implements OnInit {
|
||||
enum: [
|
||||
{label: '全部', value: ''},
|
||||
{label: '是', value: '1'},
|
||||
{label: '否', value: '2'}
|
||||
{label: '否', value: '0'}
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
|
||||
@ -9,32 +9,14 @@
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
<!-- 搜索表单 -->
|
||||
<page-header-wrapper [title]="''"> </page-header-wrapper>
|
||||
<nz-card>
|
||||
<!-- <nz-card>
|
||||
<div nz-row nzGutter="8">
|
||||
<!-- 查询字段小于或等于3个时,不显示伸缩按钮 -->
|
||||
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
|
||||
<sf
|
||||
#sf
|
||||
[schema]="schema"
|
||||
[ui]="ui"
|
||||
[mode]="'search'"
|
||||
[disabled]="!sf?.valid"
|
||||
[loading]="false"
|
||||
(formSubmit)="st?.load(1)"
|
||||
(formReset)="resetSF()"
|
||||
></sf>
|
||||
</div>
|
||||
|
||||
<!-- 查询字段大于3个时,根据展开状态调整布局 -->
|
||||
<ng-container *ngIf="queryFieldCount > 4">
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 18">
|
||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
|
||||
<button nz-button nzType="primary" [nzLoading]="loading" (click)="search()" acl [acl-ability]="['ORDER-BULK-search']"
|
||||
>查询</button
|
||||
>
|
||||
<button nz-button nzType="primary" [nzLoading]="loading" (click)="openDrawer()" acl
|
||||
[acl-ability]="['ORDER-BULK-search']">筛选</button>
|
||||
<button nz-button nzType="primary" [disabled]="loading" (click)="exprot()">导出</button>
|
||||
<button nz-button [disabled]="loading" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
@ -42,32 +24,30 @@
|
||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||
</button>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</nz-card>
|
||||
</nz-card> -->
|
||||
|
||||
<nz-card>
|
||||
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
|
||||
<nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待接单(' + tabs?.receivedQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待发车(' + tabs?.stayQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'运输中(' + tabs?.GoingQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待签收(' + tabs?.signQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'已完成(' + tabs?.compolatelQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'已取消(' + tabs?.cancelQuantity + ')'"></nz-tab>
|
||||
</nz-tabset>
|
||||
<div style="margin-top: 15px">
|
||||
<st
|
||||
#st
|
||||
[bordered]="true"
|
||||
[scroll]="{ x: '2000px' }"
|
||||
[data]="service.$api_get_listBulkPage"
|
||||
[columns]="columns"
|
||||
[req]="{ process: beforeReq }"
|
||||
<nz-card class="table-box">
|
||||
<div class="tab_header">
|
||||
<label class="page_title">
|
||||
<label class="driver">|</label>
|
||||
大宗订单</label>
|
||||
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
|
||||
<nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待接单(' + tabs?.receivedQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待发车(' + tabs?.stayQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'运输中(' + tabs?.GoingQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待签收(' + tabs?.signQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'已完成(' + tabs?.compolatelQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'已取消(' + tabs?.cancelQuantity + ')'"></nz-tab>
|
||||
</nz-tabset>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<st #st [bordered]="true" [scroll]="{ x: '2000px',y:scrollY }" [data]="service.$api_get_listBulkPage"
|
||||
[columns]="columns" [req]="{ process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="false"
|
||||
>
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false">
|
||||
<ng-template st-row="freightPrice" let-item let-index="index">
|
||||
{{ item.freightPrice | currency }}
|
||||
</ng-template>
|
||||
@ -76,16 +56,19 @@
|
||||
<div *ngIf="item?.unloadTime">卸 | {{ item?.unloadTime }}</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="driverName" let-item let-index="index">
|
||||
<div> {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + item?.carNo : ''}} </div>
|
||||
<div> {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" +
|
||||
item?.carNo : ''}} </div>
|
||||
</ng-template>
|
||||
<ng-template st-row="settlementWeight" let-item let-index="index">
|
||||
<div> {{ item.settlementWeight ? item.settlementWeight + '吨/ ': ''}} {{ item.settlementVolume ? item.settlementVolume + '方 ': ''}}</div>
|
||||
<div> {{ item.settlementWeight ? item.settlementWeight + '吨/ ': ''}} {{ item.settlementVolume ?
|
||||
item.settlementVolume + '方 ': ''}}</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="payeeName" let-item let-index="index">
|
||||
<div *ngIf="item.payeeName !== item.driverName"> {{ item?.payeeName }}{{ item?.payeePhone ? "/" + item?.payeePhone : '' }} </div>
|
||||
<div *ngIf="item.payeeName !== item.driverName"> {{ item?.payeeName }}{{ item?.payeePhone ? "/" +
|
||||
item?.payeePhone : '' }} </div>
|
||||
</ng-template>
|
||||
<ng-template st-row="createUserName" let-item let-index="index">
|
||||
<div> {{ item?.createUserName }}{{ item?.createUserPhone ? "/" + item?.createUserPhone : '' }} </div>
|
||||
<div> {{ item?.createUserName }}{{ item?.createUserPhone ? "/" + item?.createUserPhone : '' }} </div>
|
||||
</ng-template>
|
||||
<ng-template st-row="billCode" let-item let-index="index">
|
||||
<a [routerLink]="'bulk-detail/' + item.id">{{ item.billCode }}</a>
|
||||
@ -108,7 +91,8 @@
|
||||
<div *ngIf="item.mybidDetailInfo.length > 0">
|
||||
<p *ngFor="let data of item.mybidDetailInfo">
|
||||
<span *ngIf="data.expenseCode !== 'FL'">{{ data.expenseName }}:{{ data.price | currency }}</span>
|
||||
<span *ngIf="data.expenseCode === 'FL'" >{{ data.expenseName }}:{{ (data.price * 100).toFixed(2) + '%' }}</span>
|
||||
<span *ngIf="data.expenseCode === 'FL'">{{ data.expenseName }}:{{ (data.price * 100).toFixed(2) + '%'
|
||||
}}</span>
|
||||
<span *ngIf="data.paymentStatusLabel" style="color: #f59a63">{{ data.paymentStatusLabel }}</span>
|
||||
</p>
|
||||
</div>
|
||||
@ -117,25 +101,13 @@
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-modal
|
||||
[(nzVisible)]="isVisible"
|
||||
[nzWidth]="600"
|
||||
[nzFooter]="nzModalFooter"
|
||||
nzTitle="运费变更记录"
|
||||
(nzOnOk)="handleOK()"
|
||||
(nzOnCancel)="handleCancel('0')"
|
||||
>
|
||||
<nz-modal [(nzVisible)]="isVisible" [nzWidth]="600" [nzFooter]="nzModalFooter" nzTitle="运费变更记录" (nzOnOk)="handleOK()"
|
||||
(nzOnCancel)="handleCancel('0')">
|
||||
<ng-container *nzModalContent>
|
||||
<st
|
||||
#stFloat
|
||||
size="small"
|
||||
[bordered]="true"
|
||||
[data]="service.$api_get_listChangeApply"
|
||||
[columns]="columnsFloat"
|
||||
<st #stFloat size="small" [bordered]="true" [data]="service.$api_get_listChangeApply" [columns]="columnsFloat"
|
||||
[req]="{ process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
>
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }">
|
||||
<ng-template st-row="order" let-item let-index="index">
|
||||
{{ index + 1 }}
|
||||
</ng-template>
|
||||
@ -155,14 +127,8 @@
|
||||
</ng-template>
|
||||
</nz-modal>
|
||||
|
||||
<nz-modal
|
||||
[(nzVisible)]="isVisibleView"
|
||||
[nzWidth]="600"
|
||||
[nzFooter]="nzModalFooterview"
|
||||
nzTitle="查看"
|
||||
(nzOnOk)="handleOK()"
|
||||
(nzOnCancel)="handleCancel('1')"
|
||||
>
|
||||
<nz-modal [(nzVisible)]="isVisibleView" [nzWidth]="600" [nzFooter]="nzModalFooterview" nzTitle="查看"
|
||||
(nzOnOk)="handleOK()" (nzOnCancel)="handleCancel('1')">
|
||||
<ng-container *nzModalContent>
|
||||
<sf #sfView [schema]="schemaView" [ui]="uiView" [formData]="ViewCause" [compact]="true" [button]="'none'">
|
||||
<ng-template sf-template="no" let-me let-ui="uiView" let-schema="schemaView">
|
||||
@ -172,30 +138,21 @@
|
||||
</div>
|
||||
</ng-template>
|
||||
</sf>
|
||||
<st
|
||||
#stFloatView
|
||||
multiSort
|
||||
size="small"
|
||||
[bordered]="true"
|
||||
[data]="service.$api_getChangeRecordBulkDetail"
|
||||
<st #stFloatView multiSort size="small" [bordered]="true" [data]="service.$api_getChangeRecordBulkDetail"
|
||||
[columns]="columnsFloatView"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: changeViewParams }"
|
||||
[res]="{ reName: { list: 'data.list', total: 'data.total' } }"
|
||||
>
|
||||
[res]="{ reName: { list: 'data.list', total: 'data.total' } }">
|
||||
<ng-template st-row="amountBeforeChange" let-item let-index="index">
|
||||
{{ item.amountBeforeChange | currency }}
|
||||
</ng-template>
|
||||
<ng-template st-row="amountchangeValue" let-item let-index="index"> ¥{{ item.amountchangeValue | number: '0.2-2' }} </ng-template>
|
||||
<ng-template st-row="amountchangeValue" let-item let-index="index"> ¥{{ item.amountchangeValue | number: '0.2-2'
|
||||
}} </ng-template>
|
||||
<ng-template st-row="amountAfterChange" let-item let-index="index">
|
||||
{{ item.amountAfterChange | currency }}
|
||||
</ng-template>
|
||||
</st>
|
||||
<div
|
||||
><span>变更原因:{{ ViewCause?.changeCause }}</span></div
|
||||
>
|
||||
<div
|
||||
><span>拒绝原因:{{ ViewCause?.refuseCause }}</span></div
|
||||
>
|
||||
<div><span>变更原因:{{ ViewCause?.changeCause }}</span></div>
|
||||
<div><span>拒绝原因:{{ ViewCause?.refuseCause }}</span></div>
|
||||
<div><span>注:附加费依据调整后的运输费用重新计算</span></div>
|
||||
</ng-container>
|
||||
<ng-template #nzModalFooterview>
|
||||
@ -204,13 +161,8 @@
|
||||
</ng-template>
|
||||
</nz-modal>
|
||||
|
||||
<nz-modal
|
||||
[(nzVisible)]="isVisibleEvaluate"
|
||||
[nzWidth]="600"
|
||||
[nzFooter]="nzModalFooterEvaluate"
|
||||
(nzOnOk)="handleOK()"
|
||||
(nzOnCancel)="handleCancel('2')"
|
||||
>
|
||||
<nz-modal [(nzVisible)]="isVisibleEvaluate" [nzWidth]="600" [nzFooter]="nzModalFooterEvaluate" (nzOnOk)="handleOK()"
|
||||
(nzOnCancel)="handleCancel('2')">
|
||||
<ng-container *nzModalContent>
|
||||
<nz-tabset>
|
||||
<nz-tab nzTitle="货主评价">
|
||||
@ -239,26 +191,21 @@
|
||||
<ng-template #enable>
|
||||
<div class="ant-popover-message">
|
||||
<i nz-icon nzType="info-circle" nzTheme="fill"></i>
|
||||
<div class="ant-popover-message-title ng-star-inserted self-ant-popover-title" style="font-size: 16px"
|
||||
>已选择{{ selectedRows?.length || 0 }}条订单,确认批量签收吗?
|
||||
<div class="ant-popover-message-title ng-star-inserted self-ant-popover-title" style="font-size: 16px">已选择{{
|
||||
selectedRows?.length || 0 }}条订单,确认批量签收吗?
|
||||
</div>
|
||||
<div class="ant-popover-message-title ng-star-inserted"> 签收后不可再修改运费,请确保运费等信息准确无误后,再进行签收。 </div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #extraTemplate>
|
||||
<div *ngIf="resourceStatus == 4">
|
||||
<button
|
||||
nz-button
|
||||
nzType="primary"
|
||||
nzGhost
|
||||
nz-popconfirm
|
||||
[nzPopconfirmTitle]="enable"
|
||||
(nzOnConfirm)="userAction()"
|
||||
nzPopconfirmPlacement="bottomRight"
|
||||
acl
|
||||
[acl-ability]="['ORDER-BULK-batchSignBulkOrder']"
|
||||
>
|
||||
<div class="mr-sm">
|
||||
<button nz-button nzDanger [nzLoading]="loading" (click)="openDrawer()" acl
|
||||
[acl-ability]="['ORDER-BULK-search']">筛选</button>
|
||||
<button nz-button nzDanger [disabled]="loading" (click)="exprot()">导出</button>
|
||||
<button *ngIf="resourceStatus == 4" nz-button nzType="primary" nzGhost nz-popconfirm [nzPopconfirmTitle]="enable"
|
||||
(nzOnConfirm)="userAction()" nzPopconfirmPlacement="bottomRight" acl
|
||||
[acl-ability]="['ORDER-BULK-batchSignBulkOrder']">
|
||||
批量签收
|
||||
</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
billCode<!--
|
||||
<!--
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
@ -9,61 +9,40 @@ billCode<!--
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
<!-- 搜索表单 -->
|
||||
<page-header-wrapper [title]="''"> </page-header-wrapper>
|
||||
<!-- <page-header-wrapper [title]="''"> </page-header-wrapper>
|
||||
<nz-card>
|
||||
<div nz-row nzGutter="8">
|
||||
<!-- 查询字段小于或等于3个时,不显示伸缩按钮 -->
|
||||
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
|
||||
<sf
|
||||
#sf
|
||||
[schema]="schema"
|
||||
[ui]="ui"
|
||||
[mode]="'search'"
|
||||
[disabled]="!sf?.valid"
|
||||
[loading]="false"
|
||||
(formSubmit)="st?.load(1)"
|
||||
(formReset)="resetSF()"
|
||||
></sf>
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 18">
|
||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="search()" acl
|
||||
[acl-ability]="['ORDER-RECEIPTS-search']">查询</button>
|
||||
<button nz-button nzType="primary" [disabled]="false" (click)="exprot()">导出</button>
|
||||
<button nz-button [disabled]="false" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- 查询字段大于3个时,根据展开状态调整布局 -->
|
||||
<ng-container *ngIf="queryFieldCount > 4">
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 18">
|
||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="search()" acl [acl-ability]="['ORDER-RECEIPTS-search']"
|
||||
>查询</button
|
||||
>
|
||||
<button nz-button nzType="primary" [disabled]="false" (click)="exprot()">导出</button>
|
||||
<button nz-button [disabled]="false" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||
</button>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</nz-card>
|
||||
</nz-card> -->
|
||||
|
||||
<nz-card>
|
||||
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
|
||||
<nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待审核(' + tabs?.receivedQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'已审核(' + tabs?.stayQuantity + ')'"></nz-tab>
|
||||
</nz-tabset>
|
||||
<div style="margin-top: 15px">
|
||||
<st
|
||||
#st
|
||||
[bordered]="true"
|
||||
[scroll]="{ x: '2000px' }"
|
||||
[data]="service.$api_get_billExamine_page"
|
||||
[columns]="columns"
|
||||
[req]="{ process: beforeReq }"
|
||||
<nz-card class="table-box">
|
||||
<div class="tab_header">
|
||||
<label class="page_title"> <label class="driver">|</label> 单据审核</label>
|
||||
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
|
||||
<nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待审核(' + tabs?.receivedQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'已审核(' + tabs?.stayQuantity + ')'"></nz-tab>
|
||||
</nz-tabset>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<st #st [bordered]="true" [scroll]="{ x: '2000px',y:scrollY }" [data]="service.$api_get_billExamine_page"
|
||||
[columns]="columns" [req]="{ process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="false"
|
||||
>
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false">
|
||||
<ng-template st-row="freightPrice" let-item let-index="index">
|
||||
{{ item.freightPrice | currency }}
|
||||
</ng-template>
|
||||
@ -79,12 +58,13 @@ billCode<!--
|
||||
</ng-template>
|
||||
<ng-template st-row="unloadingLadingBillFilePath" let-item let-index="index">
|
||||
<div class="imgBox">
|
||||
<div *ngIf="item.unloadingLadingBillFilePath">
|
||||
<app-imagelist style="width: 40px" [imgList]="[item.unloadingLadingBillFilePath]"> </app-imagelist>
|
||||
</div>
|
||||
<div *ngIf="item.unloadingPeopleVehiclesGoodsFilePath">
|
||||
<app-imagelist style="width: 40px" [imgList]="[item.unloadingPeopleVehiclesGoodsFilePath]"> </app-imagelist>
|
||||
</div>
|
||||
<div *ngIf="item.unloadingLadingBillFilePath">
|
||||
<app-imagelist style="width: 40px" [imgList]="[item.unloadingLadingBillFilePath]"> </app-imagelist>
|
||||
</div>
|
||||
<div *ngIf="item.unloadingPeopleVehiclesGoodsFilePath">
|
||||
<app-imagelist style="width: 40px" [imgList]="[item.unloadingPeopleVehiclesGoodsFilePath]">
|
||||
</app-imagelist>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="loadingTime" let-item let-index="index">
|
||||
@ -92,21 +72,26 @@ billCode<!--
|
||||
<div *ngIf="item?.unloadingTime">卸 | {{ item?.unloadingTime }}</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="driverName" let-item let-index="index">
|
||||
<div> {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : ''}}{{ item?.carNo ? "/" + item?.carNo : '' }} </div>
|
||||
<div> {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : ''}}{{ item?.carNo ? "/" +
|
||||
item?.carNo : '' }} </div>
|
||||
</ng-template>
|
||||
<ng-template st-row="payeeName" let-item let-index="index">
|
||||
<div> {{ item?.payeeName }}{{item?.payeePhone ? "/" + item?.payeePhone : '' }} </div>
|
||||
</ng-template>
|
||||
<ng-template st-row="billCode" let-item let-index="index">
|
||||
<!-- <div>{{ item.billCode }}</div> -->
|
||||
<a *ngIf="item.resourceType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{ item.billCode }}</a>
|
||||
<a *ngIf="item.resourceType == '2'" [routerLink]="'/order-management/bulk/bulk-detail/' + item.id">{{ item.billCode }}</a>
|
||||
<a *ngIf="item.resourceType == '3'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{ item.billCode }}</a>
|
||||
<a *ngIf="item.resourceType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{
|
||||
item.billCode }}</a>
|
||||
<a *ngIf="item.resourceType == '2'" [routerLink]="'/order-management/bulk/bulk-detail/' + item.id">{{
|
||||
item.billCode }}</a>
|
||||
<a *ngIf="item.resourceType == '3'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{
|
||||
item.billCode }}</a>
|
||||
<div>
|
||||
<span>{{item?.billStatusLabel}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span >{{item?.resourceTypeLabel}}{{item?.serviceTypeLabel === item?.resourceTypeLabel ? '':item?.serviceTypeLabel}}</span>
|
||||
<span>{{item?.resourceTypeLabel}}{{item?.serviceTypeLabel === item?.resourceTypeLabel ?
|
||||
'':item?.serviceTypeLabel}}</span>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="goodsName" let-item let-index="index">
|
||||
@ -131,7 +116,20 @@ billCode<!--
|
||||
|
||||
<ng-template #extraTemplate>
|
||||
<div>
|
||||
<button nz-button nzType="primary" (click)="sign('1')" acl [acl-ability]="['ORDER-RECEIPTS-billAuditPassBatch']"> 批量通过 </button>
|
||||
<button nz-button nzType="primary" (click)="sign1('1')" acl [acl-ability]="['ORDER-RECEIPTS- electronicBilling']"> 批量生成电子单据 </button>
|
||||
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl
|
||||
[acl-ability]="['ORDER-RECEIPTS-search']">查询</button>
|
||||
<button nz-button nzDanger [disabled]="false" (click)="exprot()">导出</button>
|
||||
<button nz-button nz-dropdown [nzDropdownMenu]="menu" nzPlacement="bottomLeft">
|
||||
更多<i nz-icon nzType="down" nzTheme="outline"></i></button>
|
||||
<nz-dropdown-menu #menu="nzDropdownMenu">
|
||||
<ul nz-menu>
|
||||
<li nz-menu-item (click)="sign('1')" acl [acl-ability]="['ORDER-RECEIPTS-billAuditPassBatch']">
|
||||
批量通过
|
||||
</li>
|
||||
<li nz-menu-item a(click)="sign1('1')" acl [acl-ability]="['ORDER-RECEIPTS- electronicBilling']">
|
||||
批量生成电子单据
|
||||
</li>
|
||||
</ul>
|
||||
</nz-dropdown-menu>
|
||||
</div>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
@ -1,22 +1,3 @@
|
||||
|
||||
:host {
|
||||
p{
|
||||
margin-bottom: 0
|
||||
}
|
||||
.left_btn {
|
||||
width: 50px;
|
||||
height: 32px;
|
||||
padding-left: 8px;
|
||||
line-height:32px;
|
||||
background-color: #d7d7d7;
|
||||
}
|
||||
::ng-deep {
|
||||
.imgBox {
|
||||
display: flex;
|
||||
img {
|
||||
width: 60px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p{
|
||||
margin-bottom: 0
|
||||
}
|
||||
@ -8,25 +8,23 @@ 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 { ShipperBaseService } from '@shared';
|
||||
import { SearchDrawerService, ShipperBaseService } from '@shared';
|
||||
import { Router } from '@angular/router';
|
||||
import { orderManagementVoucherViewComponent } from '../../modal/audit/voucher-view/voucher-view.component';
|
||||
import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-order-management-receipts-audit',
|
||||
templateUrl: './receipts-audit.component.html',
|
||||
styleUrls: ['./receipts-audit.component.less']
|
||||
styleUrls: ['../../../commom/less/commom-table.less', './receipts-audit.component.less']
|
||||
})
|
||||
export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
ui: SFUISchema = {};
|
||||
export class OrderManagementReceiptsAuditComponent extends BasicTableComponent implements OnInit {
|
||||
uiView: SFUISchema = {};
|
||||
schema: SFSchema = {};
|
||||
schemaView: SFSchema = {};
|
||||
auditMany = false;
|
||||
isVisibleView = false;
|
||||
isVisibleEvaluate = false;
|
||||
isVisible = false;
|
||||
_$expand = false;
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
columns: STColumn[] = [];
|
||||
@ -41,8 +39,11 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
public service: OrderManagementService,
|
||||
private modal: NzModalService,
|
||||
public shipperservice: ShipperBaseService,
|
||||
private router: Router
|
||||
) { }
|
||||
private router: Router,
|
||||
public searchDrawerService: SearchDrawerService
|
||||
) {
|
||||
super(searchDrawerService);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
@ -73,22 +74,22 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
...a,
|
||||
...params,
|
||||
createTime: {
|
||||
start: this.sf?.value?.createTime?.[0] || '',
|
||||
end: this.sf?.value?.createTime?.[1] || ''
|
||||
}
|
||||
...params,
|
||||
createTime: {
|
||||
start: this.sf?.value?.createTime?.[0] || '',
|
||||
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.billStatus !== '4'
|
||||
...item
|
||||
// disabled: item.billStatus !== '4'
|
||||
}));
|
||||
};
|
||||
get selectedRows() {
|
||||
@ -105,7 +106,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
totalCount: 0
|
||||
};
|
||||
const params: any = Object.assign({}, this.reqParams || {});
|
||||
delete params.auditStatus
|
||||
delete params.auditStatus;
|
||||
this.service.request(this.service.$api_get_getAuditStatistical, params).subscribe(res => {
|
||||
if (res) {
|
||||
let totalCount = 0;
|
||||
@ -173,7 +174,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
_$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 })
|
||||
@ -196,7 +197,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
placeholder: '请先选择货主',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
loadingPlace: {
|
||||
@ -298,12 +299,12 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
loadingDocuments: {
|
||||
type: 'string',
|
||||
title: '装卸货凭证',
|
||||
enum:[
|
||||
{label: '全部',value: ''},
|
||||
{label: '无装卸货凭证',value: '1'},
|
||||
{label: '装卸货凭证齐全',value: '2'},
|
||||
{label: '只有装货凭证',value: '3'},
|
||||
{label: '只有卸货凭证',value: '4'},
|
||||
enum: [
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '无装卸货凭证', value: '1' },
|
||||
{ label: '装卸货凭证齐全', value: '2' },
|
||||
{ label: '只有装货凭证', value: '3' },
|
||||
{ label: '只有卸货凭证', value: '4' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
@ -311,13 +312,12 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
allowClear: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
type: 'object'
|
||||
};
|
||||
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
|
||||
}
|
||||
|
||||
/**
|
||||
@ -397,27 +397,27 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
{
|
||||
text: '生成电子单据',
|
||||
click: _record => this.generate(_record, 2),
|
||||
iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath,
|
||||
acl: { ability: ['ORDER-RECEIPTS-electronicBillingOne'] },
|
||||
iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath,
|
||||
acl: { ability: ['ORDER-RECEIPTS-electronicBillingOne'] }
|
||||
},
|
||||
{
|
||||
text: '通过',
|
||||
click: _record => this.sign(_record),
|
||||
iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath,
|
||||
acl: { ability: ['ORDER-RECEIPTS-billAuditPassBatch'] },
|
||||
iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath,
|
||||
acl: { ability: ['ORDER-RECEIPTS-billAuditPassBatch'] }
|
||||
},
|
||||
{
|
||||
text: '修改',
|
||||
click: _record => this.modification(_record),
|
||||
iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath,
|
||||
acl: { ability: ['ORDER-RECEIPTS-updateBillExamine'] },
|
||||
iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath,
|
||||
acl: { ability: ['ORDER-RECEIPTS-updateBillExamine'] }
|
||||
},
|
||||
{
|
||||
text: '查看凭证',
|
||||
click: _record => this.generate(_record, 3),
|
||||
iif: item => item?.loadingElectronicsLadingBillFilePath && item?.unloadingElectronicsLadingBillFilePath,
|
||||
acl: { ability: ['ORDER-RECEIPTS-view'] },
|
||||
},
|
||||
acl: { ability: ['ORDER-RECEIPTS-view'] }
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
@ -428,32 +428,18 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
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) { }
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF(): void {
|
||||
this.sf.reset();
|
||||
this._$expand = false;
|
||||
}
|
||||
tabChange(item: any) {}
|
||||
|
||||
/**
|
||||
* 导入货源
|
||||
*/
|
||||
importGoodsSource() { }
|
||||
audit(item: any) { }
|
||||
importGoodsSource() {}
|
||||
audit(item: any) {}
|
||||
|
||||
/**
|
||||
* 审核通过按钮
|
||||
*/
|
||||
handleOK() { }
|
||||
handleOK() {}
|
||||
OpenPrice(item: any) {
|
||||
this.isVisible = true;
|
||||
}
|
||||
@ -471,7 +457,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
});
|
||||
modalRef.afterClose.subscribe((result: any) => {
|
||||
this.st.load(1);
|
||||
this.getGoodsSourceStatistical()
|
||||
this.getGoodsSourceStatistical();
|
||||
});
|
||||
}
|
||||
// 生成电子单据
|
||||
@ -491,31 +477,31 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
nzFooter: null
|
||||
});
|
||||
modalRef.afterClose.subscribe((result: any) => {
|
||||
if(result) {
|
||||
if (result) {
|
||||
this.st.load();
|
||||
this.getGoodsSourceStatistical()
|
||||
this.getGoodsSourceStatistical();
|
||||
}
|
||||
});
|
||||
}
|
||||
// 通过
|
||||
sign(item?: any) {
|
||||
let params: any = []
|
||||
let params: any = [];
|
||||
let text = '';
|
||||
if (item === '1') {
|
||||
if (this.selectedRows.length <= 0) {
|
||||
this.service.msgSrv.error('请选择订单!')
|
||||
return
|
||||
this.service.msgSrv.error('请选择订单!');
|
||||
return;
|
||||
}
|
||||
this.selectedRows.forEach(ite => {
|
||||
params.push(ite.id);
|
||||
});
|
||||
text = `<b>已选择${this.selectedRows.length}条订单,确认批量通过审核吗?</b>`
|
||||
text = `<b>已选择${this.selectedRows.length}条订单,确认批量通过审核吗?</b>`;
|
||||
} else {
|
||||
text = `<b>确认通过审核吗?</b>`
|
||||
text = `<b>确认通过审核吗?</b>`;
|
||||
params.push(item.id);
|
||||
}
|
||||
console.log(this.selectedRows)
|
||||
console.log(params)
|
||||
console.log(this.selectedRows);
|
||||
console.log(params);
|
||||
this.modal.confirm({
|
||||
nzTitle: text,
|
||||
nzContent: `<b>通过后不可修改,可以再生成电子单据。</b>`,
|
||||
@ -535,8 +521,8 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
// 批量生成电子单据
|
||||
sign1(item?: any) {
|
||||
if (this.selectedRows?.length <= 0) {
|
||||
this.service.msgSrv.error('请选择订单!')
|
||||
return
|
||||
this.service.msgSrv.error('请选择订单!');
|
||||
return;
|
||||
}
|
||||
let params: any[] = [];
|
||||
this.selectedRows.forEach(item => {
|
||||
@ -545,17 +531,16 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
this.modal.confirm({
|
||||
nzTitle: `<b>已选择${this.selectedRows.length}条订单,确认批量生成电子单据吗?</b>`,
|
||||
nzContent: `<b>确认后单据不可修改,请谨慎操作。</b>`,
|
||||
nzOnOk: () =>
|
||||
{
|
||||
this.service.downloadFile(this.service.$api_createBillEsignGoods,params)
|
||||
this.service.msgSrv.success('生成成功!');
|
||||
this.st?.reload()
|
||||
nzOnOk: () => {
|
||||
this.service.downloadFile(this.service.$api_createBillEsignGoods, params);
|
||||
this.service.msgSrv.success('生成成功!');
|
||||
this.st?.reload();
|
||||
// this.getGoodsSourceStatistical();
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
// 获取所属项目
|
||||
getRegionCode(regionCode: any) {
|
||||
// 获取所属项目
|
||||
getRegionCode(regionCode: any) {
|
||||
console.log(regionCode);
|
||||
return this.service
|
||||
.request(this.service.$api_get_enterprise_project, { id: regionCode })
|
||||
@ -575,8 +560,8 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
// }
|
||||
});
|
||||
}
|
||||
// 导出
|
||||
exprot() {
|
||||
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportExamineBillList);
|
||||
}
|
||||
// 导出
|
||||
exprot() {
|
||||
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportExamineBillList);
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,61 +9,42 @@
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
<!-- 搜索表单 -->
|
||||
<page-header-wrapper [title]="''"> </page-header-wrapper>
|
||||
<!-- <page-header-wrapper [title]="''"> </page-header-wrapper>
|
||||
<nz-card>
|
||||
<div nz-row nzGutter="8">
|
||||
<!-- 查询字段小于或等于3个时,不显示伸缩按钮 -->
|
||||
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
|
||||
<sf
|
||||
#sf
|
||||
[schema]="schema"
|
||||
[ui]="ui"
|
||||
[mode]="'search'"
|
||||
[disabled]="!sf?.valid"
|
||||
[loading]="false"
|
||||
(formSubmit)="search()"
|
||||
(formReset)="resetSF()"
|
||||
></sf>
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 18">
|
||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="search()" acl
|
||||
[acl-ability]="['ORDER-RISK-search']">查询</button>
|
||||
<button nz-button nzType="primary" [disabled]="false" (click)="exprot()">导出</button>
|
||||
<button nz-button [disabled]="false" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- 查询字段大于3个时,根据展开状态调整布局 -->
|
||||
<ng-container *ngIf="queryFieldCount > 4">
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 18">
|
||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="search()" acl [acl-ability]="['ORDER-RISK-search']">查询</button>
|
||||
<button nz-button nzType="primary" [disabled]="false" (click)="exprot()">导出</button>
|
||||
<button nz-button [disabled]="false" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||
</button>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</nz-card>
|
||||
</nz-card> -->
|
||||
|
||||
<nz-card>
|
||||
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
|
||||
<nz-tab [nzTitle]="'全部'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待申诉(' + tabs?.stayQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'申诉中(' + tabs?.underwayQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'申诉成功(' + tabs?.receivedQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'申诉失败(' + tabs?.cancelQuantity + ')'"></nz-tab>
|
||||
</nz-tabset>
|
||||
<div style="margin-top: 15px">
|
||||
<st
|
||||
#st
|
||||
[bordered]="true"
|
||||
[scroll]="{ x: '2000px' }"
|
||||
[data]="service.$api_get_listRiskPage"
|
||||
[columns]="columns"
|
||||
<nz-card class="table-box">
|
||||
<div class="tab_header">
|
||||
<label class="page_title"> <label class="driver">|</label> 风险单管理</label>
|
||||
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
|
||||
<nz-tab [nzTitle]="'全部'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待申诉(' + tabs?.stayQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'申诉中(' + tabs?.underwayQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'申诉成功(' + tabs?.receivedQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'申诉失败(' + tabs?.cancelQuantity + ')'"></nz-tab>
|
||||
</nz-tabset>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<st #st [bordered]="true" [scroll]="{ x: '2000px',y:scrollY }" [data]="service.$api_get_listRiskPage" [columns]="columns"
|
||||
[req]="{ process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="false"
|
||||
>
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false">
|
||||
<!-- <ng-template st-row="billCode" let-item let-index="index">
|
||||
<a [routerLink]="'/order-management/risk-detail/' + item.id">{{ item.billCode }}</a>
|
||||
<div>
|
||||
@ -75,14 +56,18 @@
|
||||
</ng-template> -->
|
||||
<ng-template st-row="billCode" let-item let-index="index">
|
||||
<!-- <div>{{ item.billCode }}</div> -->
|
||||
<a *ngIf="item.billType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{ item.billCode }}</a>
|
||||
<a *ngIf="item.billType == '2'" [routerLink]="'/order-management/bulk/bulk-detail/' + item.id">{{ item.billCode }}</a>
|
||||
<a *ngIf="item.billType == '3'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{ item.billCode }}</a>
|
||||
<a *ngIf="item.billType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{
|
||||
item.billCode }}</a>
|
||||
<a *ngIf="item.billType == '2'" [routerLink]="'/order-management/bulk/bulk-detail/' + item.id">{{ item.billCode
|
||||
}}</a>
|
||||
<a *ngIf="item.billType == '3'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{
|
||||
item.billCode }}</a>
|
||||
<div>
|
||||
<span>{{ item?.representationsStatusLabel }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span >{{item?.billTypeLabel}}{{item?.billTypeLabel === item?.serviceTypeLabel ? '' : item?.serviceTypeLabel}}</span>
|
||||
<span>{{item?.billTypeLabel}}{{item?.billTypeLabel === item?.serviceTypeLabel ? '' :
|
||||
item?.serviceTypeLabel}}</span>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="timeer" let-item let-index="index">
|
||||
@ -96,7 +81,8 @@
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="driverName" let-item let-index="index">
|
||||
<div> {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + item?.carNo : ''}} </div>
|
||||
<div> {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" +
|
||||
item?.carNo : ''}} </div>
|
||||
</ng-template>
|
||||
<ng-template st-row="payeeName" let-item>
|
||||
<div *ngIf="item?.driverId !== item?.payeeId">
|
||||
@ -113,7 +99,7 @@
|
||||
<ng-template st-row="goodsInfoVOList" let-item let-index="index">
|
||||
<div *ngFor="let i of item?.goodsInfoVOList">
|
||||
<p>货物名称:{{ i?.goodsName }}</p>
|
||||
<p>重量/体积:{{ i?.weight ? i?.weight + '吨' : '' }}{{ i?.volume ? "/" + i?.volume + '方' : ''}}</p>
|
||||
<p>重量/体积:{{ i?.weight ? i?.weight + '吨' : '' }}{{ i?.volume ? "/" + i?.volume + '方' : ''}}</p>
|
||||
<p>车型/车长:{{ i?.carModelLabel }} {{ i?.carLengthLabel ? "/" + i?.carLengthLabel : ''}}</p>
|
||||
</div>
|
||||
</ng-template>
|
||||
@ -121,14 +107,8 @@
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-modal
|
||||
[(nzVisible)]="isVisibleRE"
|
||||
[nzWidth]="600"
|
||||
[nzFooter]="nzModalFooterview2"
|
||||
(nzOnOk)="handleOK()"
|
||||
nzTitle="审核"
|
||||
(nzOnCancel)="handleCancel()"
|
||||
>
|
||||
<nz-modal [(nzVisible)]="isVisibleRE" [nzWidth]="600" [nzFooter]="nzModalFooterview2" (nzOnOk)="handleOK()" nzTitle="审核"
|
||||
(nzOnCancel)="handleCancel()">
|
||||
<ng-container *nzModalContent>
|
||||
<sf #sfView [schema]="schemaView" [ui]="uiView" [compact]="true" [button]="'none'"> </sf>
|
||||
</ng-container>
|
||||
@ -139,7 +119,10 @@
|
||||
</nz-modal>
|
||||
|
||||
<ng-template #extraTemplate>
|
||||
<div>
|
||||
<button nz-button nzType="primary" (click)="audit()" acl [acl-ability]="['ORDER-RISK-batchAudit']"> 批量审核 </button>
|
||||
<div class="mr-sm">
|
||||
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl
|
||||
[acl-ability]="['ORDER-RISK-search']">筛选</button>
|
||||
<button nz-button nzDanger [disabled]="false" (click)="exprot()">导出</button>
|
||||
<button nz-button nzType="primary" (click)="audit()" acl [acl-ability]="['ORDER-RISK-batchAudit']"> 批量审核 </button>
|
||||
</div>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
@ -1,13 +0,0 @@
|
||||
|
||||
:host {
|
||||
p{
|
||||
margin-bottom: 0
|
||||
}
|
||||
.left_btn {
|
||||
width: 50px;
|
||||
height: 32px;
|
||||
padding-left: 8px;
|
||||
line-height:32px;
|
||||
background-color: #d7d7d7;
|
||||
}
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,11 +31,11 @@
|
||||
</nz-card> -->
|
||||
|
||||
<nz-card class="table-box">
|
||||
<div style="display: flex;align-items: center;">
|
||||
<label style="font-weight: bold;font-size: 17px;">
|
||||
<label style="color: #ff4d4f;margin-left: 17px;margin-right: 6px;">|</label>
|
||||
<div class="tab_header">
|
||||
<label class="page_title">
|
||||
<label class="driver">|</label>
|
||||
整车订单</label>
|
||||
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate" style="flex: 1;">
|
||||
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate" >
|
||||
<nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待接单(' + tabs?.receivedQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待发车(' + tabs?.stayQuantity + ')'"></nz-tab>
|
||||
@ -69,7 +69,7 @@
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="createUserName" let-item let-index="index">
|
||||
<div> {{ item?.createUserName }}{{ item?.createUserPhone ? "/" + item?.createUserPhone : '' }} </div>
|
||||
<div> {{ item?.createUserName }}{{ item?.createUserPhone ? "/" + item?.createUserPhone : '' }} </div>
|
||||
</ng-template>
|
||||
<!-- <ng-template st-row="mybidDetailInfo" let-item let-index="index">
|
||||
<div *ngIf="item.mybidDetailInfo.length > 0">
|
||||
@ -83,7 +83,8 @@
|
||||
<div *ngIf="item.mybidDetailInfo.length > 0">
|
||||
<p *ngFor="let data of item.mybidDetailInfo">
|
||||
<span *ngIf="data.expenseCode !== 'FL'">{{ data.expenseName }}:{{ data.price | currency }}</span>
|
||||
<span *ngIf="data.expenseCode === 'FL'" >{{ data.expenseName }}:{{ (data.price * 100).toFixed(2) + '%' }}</span>
|
||||
<span *ngIf="data.expenseCode === 'FL'">{{ data.expenseName }}:{{ (data.price * 100).toFixed(2) + '%'
|
||||
}}</span>
|
||||
<span *ngIf="data.paymentStatusLabel" style="color: #f59a63">{{ data.paymentStatusLabel }}</span>
|
||||
</p>
|
||||
</div>
|
||||
@ -94,10 +95,12 @@
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="driverName" let-item let-index="index">
|
||||
<div> {{ item?.driverName }}{{ item?.driverPhone ? '/' + item?.driverPhone : '' }}{{ item?.carNo ? '/' + item?.carNo : '' }} </div><br />
|
||||
<div *ngIf="item.payeeName !== item.driverName">车队长: {{ item?.payeeName ? item?.payeeName + '/' : ''}}{{ item?.payeePhone }} </div>
|
||||
<div> {{ item?.driverName }}{{ item?.driverPhone ? '/' + item?.driverPhone : '' }}{{ item?.carNo ? '/' +
|
||||
item?.carNo : '' }} </div><br />
|
||||
<div *ngIf="item.payeeName !== item.driverName">车队长: {{ item?.payeeName ? item?.payeeName + '/' : ''}}{{
|
||||
item?.payeePhone }} </div>
|
||||
</ng-template>
|
||||
|
||||
|
||||
<ng-template st-row="loadingTime" let-item let-index="index">
|
||||
<div *ngIf="item?.loadingTime">装 | {{ item?.loadingTime }}</div>
|
||||
<div *ngIf="item?.unloadingTime">卸 | {{ item?.unloadingTime }}</div>
|
||||
@ -177,35 +180,31 @@
|
||||
</ng-template>
|
||||
</nz-modal>
|
||||
|
||||
<nz-drawer [nzBodyStyle]="{ overflow: 'auto' }" [nzMaskClosable]="false" [nzWidth]="420" [nzVisible]="visible"
|
||||
[nzMaskClosable]="true" nzTitle="筛选" [nzFooter]="footerTpl" (nzOnClose)="visible=false">
|
||||
<div *nzDrawerContent>
|
||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||
</div>
|
||||
<ng-template #footerTpl>
|
||||
<div style="float: right">
|
||||
<button nz-button (click)="visible=false">关闭</button>
|
||||
<button nz-button [disabled]="loading" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="primary" (click)="search();;">搜索</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
</nz-drawer>
|
||||
|
||||
<ng-template #extraTemplate>
|
||||
<div>
|
||||
<button nz-button nzType="primary" (click)="modifyRate()" acl
|
||||
[acl-ability]="['ORDER-VEHICLE-modificationAdditional']"> 修改附加费率 </button>
|
||||
<button nz-button nzType="primary" (click)="modifyFreightPeople()" acl
|
||||
[acl-ability]="['ORDER-VEHICLE-modificationNetworkFreight']"> 修改网络货运人 </button>
|
||||
<button nz-button nzType="primary" (click)="modifycaptain()" acl
|
||||
[acl-ability]="['ORDER-VEHICLE-modificationCarCaptain']"> 修改车队长 </button>
|
||||
<button *ngIf="resourceStatus == 4" nz-button nzType="primary" nzGhost nz-popconfirm [nzPopconfirmTitle]="enable"
|
||||
(nzOnConfirm)="userAction()" nzPopconfirmPlacement="bottomRight" acl
|
||||
[acl-ability]="['ORDER-VEHICLE-batchSignWholeOrder']">
|
||||
批量签收
|
||||
</button>
|
||||
<button nz-button nzType="primary" [disabled]="loading" (click)="exprot()">导出</button>
|
||||
<button nz-button nzType="primary" (click)="visible=true;" class="mr-sm">筛选</button>
|
||||
<div class="mr-sm">
|
||||
<button nz-button nzDanger (click)="openDrawer()" class="mr-sm">筛选</button>
|
||||
<button nz-button nzDanger [disabled]="loading" (click)="exprot()">导出</button>
|
||||
<button nz-button nz-dropdown [nzDropdownMenu]="menu" nzPlacement="bottomLeft">
|
||||
更多<i nz-icon nzType="down" nzTheme="outline"></i></button>
|
||||
<nz-dropdown-menu #menu="nzDropdownMenu">
|
||||
<ul nz-menu>
|
||||
<li nz-menu-item acl [acl-ability]="['ORDER-VEHICLE-modificationAdditional']" (click)="modifyRate()">
|
||||
修改附加费率
|
||||
</li>
|
||||
<li nz-menu-item acl [acl-ability]="['ORDER-VEHICLE-modificationNetworkFreight']"
|
||||
(click)="modifyFreightPeople()">
|
||||
修改网络货运人
|
||||
</li>
|
||||
<li nz-menu-item acl [acl-ability]="['ORDER-VEHICLE-modificationCarCaptain']" (click)="modifycaptain()">
|
||||
修改车队长
|
||||
</li>
|
||||
<li *ngIf="resourceStatus == 4" nz-menu-item nz-popconfirm [nzPopconfirmTitle]="enable"
|
||||
(nzOnConfirm)="userAction()" nzPopconfirmPlacement="bottomRight" acl
|
||||
[acl-ability]="['ORDER-VEHICLE-batchSignWholeOrder']">
|
||||
批量签收
|
||||
</li>
|
||||
</ul>
|
||||
</nz-dropdown-menu>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #enable>
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { fromEvent, of } from 'rxjs';
|
||||
import { fromEvent, of, Subscription } from 'rxjs';
|
||||
import { debounceTime, map } from 'rxjs/operators';
|
||||
import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component';
|
||||
import { SearchDrawerService } from 'src/app/shared/components/search-drawer/search-drawer.service';
|
||||
import { OneCarOrderCancelConfirmComponent } from '../../modal/vehicle/cancel-confirm/cancel-confirm.component';
|
||||
import { VehicleConfirReceiptComponent } from '../../modal/vehicle/confir-receipt/confir-receipt.component';
|
||||
import { VehicleFreightPeopleComponent } from '../../modal/vehicle/freight-people/freight-people.component';
|
||||
@ -19,11 +20,9 @@ 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 = {};
|
||||
schema: SFSchema = {};
|
||||
auditMany = false;
|
||||
isVisibleView = false;
|
||||
isVisibleEvaluate = false;
|
||||
@ -39,7 +38,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('stFloat') private readonly stFloat!: STComponent;
|
||||
@ViewChild('stFloatView') private readonly stFloatView!: STComponent;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
|
||||
columns: STColumn[] = [];
|
||||
columnsFloat: STColumn[] = [];
|
||||
@ -56,7 +54,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
two: '2',
|
||||
three: '2',
|
||||
id: 2
|
||||
},
|
||||
}
|
||||
];
|
||||
tabs = {
|
||||
cancelQuantity: 0,
|
||||
@ -69,15 +67,15 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
};
|
||||
resourceStatus: any;
|
||||
|
||||
visible = false;
|
||||
constructor(
|
||||
public service: OrderManagementService,
|
||||
private modal: NzModalService,
|
||||
public shipperservice: ShipperBaseService,
|
||||
public router: Router,
|
||||
public ar: ActivatedRoute
|
||||
public ar: ActivatedRoute,
|
||||
public searchDrawerService: SearchDrawerService
|
||||
) {
|
||||
super();
|
||||
super(searchDrawerService);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -98,11 +96,11 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
if (this.resourceStatus) {
|
||||
a.billStatus = this.resourceStatus;
|
||||
}
|
||||
const params: any = Object.assign({}, this.sf?.value || this.paramsList);
|
||||
const params: any = Object.assign({}, this.sfValue || this.paramsList);
|
||||
delete params._$expand;
|
||||
return {
|
||||
...a,
|
||||
...params,
|
||||
...params
|
||||
};
|
||||
}
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
@ -110,13 +108,13 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
if (this.resourceStatus) {
|
||||
a.billStatus = this.resourceStatus;
|
||||
}
|
||||
const params: any = Object.assign({}, this.sf?.value || this.paramsList);
|
||||
const params: any = Object.assign({}, this.sfValue || this.paramsList);
|
||||
delete params._$expand;
|
||||
this.paramsList = params
|
||||
Object.assign(requestOptions.body, {
|
||||
...a,
|
||||
...this.paramsList,
|
||||
});
|
||||
this.paramsList = params;
|
||||
Object.assign(requestOptions.body, {
|
||||
...a,
|
||||
...this.paramsList
|
||||
});
|
||||
this.loading = true;
|
||||
return requestOptions;
|
||||
};
|
||||
@ -197,7 +195,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
type: 'string',
|
||||
title: '运单号',
|
||||
ui: {
|
||||
placeholder: '最多100个单号,空号隔开',
|
||||
placeholder: '最多100个单号,空号隔开'
|
||||
}
|
||||
},
|
||||
resourceCode: {
|
||||
@ -234,7 +232,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
title: '所属项目',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请先选择货主',
|
||||
placeholder: '请先选择货主'
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
loadingPlace: {
|
||||
@ -284,7 +282,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
createTime: {
|
||||
type: 'string',
|
||||
title: '创建时间',
|
||||
ui: { widget: 'sl-from-to', type: 'date', format: 'yyyy-MM-dd' } as SFDateWidgetSchema,
|
||||
ui: { widget: 'sl-from-to', type: 'date', format: 'yyyy-MM-dd' } as SFDateWidgetSchema
|
||||
},
|
||||
riskStatus: {
|
||||
type: 'string',
|
||||
@ -342,7 +340,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
},
|
||||
type: 'object'
|
||||
};
|
||||
this.ui = { '*': { spanLabelFixed: 95, grid: { span: 24, gutter: 4 } } };
|
||||
}
|
||||
|
||||
/**
|
||||
@ -416,11 +413,12 @@ 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 +437,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'] }
|
||||
},
|
||||
{
|
||||
@ -558,23 +556,9 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
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;
|
||||
this.initST();
|
||||
@ -769,7 +753,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
});
|
||||
modalRef.afterClose.subscribe((res: boolean) => {
|
||||
if (res) {
|
||||
this.resetSF;
|
||||
this.st.load();
|
||||
this.getGoodsSourceStatistical();
|
||||
}
|
||||
@ -847,7 +830,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
});
|
||||
modalRef.afterClose.subscribe((res: boolean) => {
|
||||
if (res) {
|
||||
this.resetSF;
|
||||
this.st.load();
|
||||
}
|
||||
});
|
||||
@ -870,8 +852,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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,6 +16,7 @@ export class ParterChannelSalesEditComponent implements OnInit {
|
||||
schema!: SFSchema;
|
||||
ui!: SFUISchema;
|
||||
i: any;
|
||||
sts: any;
|
||||
type: any;
|
||||
record:any;
|
||||
currentOAItem:any;
|
||||
@ -29,13 +30,15 @@ export class ParterChannelSalesEditComponent implements OnInit {
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
this.service.request(this.service.$api_getChannelSalesInfo, {id:this.i?.id}).subscribe(res => {
|
||||
if(res){
|
||||
this.record = res;
|
||||
}
|
||||
this.initSF();
|
||||
});
|
||||
if(!this.sts) {
|
||||
this.service.request(this.service.$api_getChannelSalesInfo, {id:this.i?.id}).subscribe(res => {
|
||||
if(res){
|
||||
this.record = res;
|
||||
this.initSF();
|
||||
}
|
||||
});
|
||||
}
|
||||
this.initSF();
|
||||
|
||||
}
|
||||
initSF() {
|
||||
|
||||
@ -112,6 +112,7 @@ export class ParterChannelSalesListComponent implements OnInit {
|
||||
nzWidth:600,
|
||||
nzTitle: '新增',
|
||||
nzContent: ParterChannelSalesEditComponent,
|
||||
nzComponentParams: {sts: 'add'}
|
||||
});
|
||||
modalRef.afterClose.subscribe(res => {
|
||||
if (res) {
|
||||
|
||||
@ -21,7 +21,7 @@ export class ParterLevelConfigListComponent implements OnInit {
|
||||
sf!: SFComponent;
|
||||
spuStatus = '1';
|
||||
|
||||
data=[{name1:1111}]
|
||||
data = [{ name1: 1111 }];
|
||||
constructor(
|
||||
public router: Router,
|
||||
public ar: ActivatedRoute,
|
||||
@ -45,21 +45,25 @@ export class ParterLevelConfigListComponent implements OnInit {
|
||||
properties: {
|
||||
gradeName: {
|
||||
type: 'string',
|
||||
title: '等级姓名',
|
||||
title: '等级姓名'
|
||||
},
|
||||
stateLocked: {
|
||||
type: 'string',
|
||||
title: '状态',
|
||||
enum:[{label:'启用',value:'1'},{label:'禁用',value:'0'}],
|
||||
ui:{
|
||||
widget:'select',
|
||||
enum: [
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '启用', value: '1' },
|
||||
{ label: '禁用', value: '0' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select'
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
width:300,
|
||||
width: 300,
|
||||
grid: { span: 12, gutter: 4 }
|
||||
}
|
||||
};
|
||||
@ -79,6 +83,10 @@ export class ParterLevelConfigListComponent implements OnInit {
|
||||
title: '创建时间',
|
||||
index: 'createTime'
|
||||
},
|
||||
{
|
||||
title: '排序',
|
||||
index: 'sortId'
|
||||
},
|
||||
{
|
||||
title: '启用时间',
|
||||
index: 'enableTime'
|
||||
@ -87,7 +95,7 @@ export class ParterLevelConfigListComponent implements OnInit {
|
||||
title: '状态',
|
||||
index: 'stateLocked',
|
||||
format: (item: any) => {
|
||||
return item.stateLocked ? '禁用':'启用'
|
||||
return item.stateLocked ? '启用' : '禁用';
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -96,17 +104,17 @@ export class ParterLevelConfigListComponent implements OnInit {
|
||||
buttons: [
|
||||
{
|
||||
text: '编辑',
|
||||
click: (_record, _modal, _instance) => this.edit(_record),
|
||||
click: (_record, _modal, _instance) => this.edit(_record)
|
||||
},
|
||||
{
|
||||
text: '禁用',
|
||||
click: (_record, _modal, _instance) => this.stop(_record),
|
||||
iif:(item)=>!item.stateLocked
|
||||
iif: item => !item.stateLocked
|
||||
},
|
||||
{
|
||||
text: '启用',
|
||||
click: (_record, _modal, _instance) => this.restart(_record),
|
||||
iif:(item)=>item.stateLocked
|
||||
iif: item => item.stateLocked
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -115,7 +123,7 @@ export class ParterLevelConfigListComponent implements OnInit {
|
||||
|
||||
add() {
|
||||
const modalRef = this.modalService.create({
|
||||
nzWidth:500,
|
||||
nzWidth: 500,
|
||||
nzTitle: '新增',
|
||||
nzContent: ParterLevelConfigEditComponent,
|
||||
nzComponentParams: { type: this.spuStatus }
|
||||
@ -130,7 +138,7 @@ export class ParterLevelConfigListComponent implements OnInit {
|
||||
// 编辑
|
||||
edit(record: STData) {
|
||||
const modalRef = this.modalService.create({
|
||||
nzWidth:500,
|
||||
nzWidth: 500,
|
||||
nzTitle: '编辑',
|
||||
nzContent: ParterLevelConfigEditComponent,
|
||||
nzComponentParams: { i: record, type: this.spuStatus }
|
||||
@ -142,8 +150,8 @@ export class ParterLevelConfigListComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
// 编辑
|
||||
view(record: STData) {
|
||||
// 编辑
|
||||
view(record: STData) {
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '查看',
|
||||
nzContent: ParterLevelConfigEditComponent,
|
||||
@ -156,7 +164,7 @@ export class ParterLevelConfigListComponent implements OnInit {
|
||||
nzTitle: '<i>启用确认</i>',
|
||||
nzContent: `<b>确定启用该账号吗?</br>`,
|
||||
nzOnOk: () =>
|
||||
this.service.request(this.service.$api_updatePartnerGradeConfig, {id:item.id}).subscribe(res => {
|
||||
this.service.request(this.service.$api_updatePartnerGradeConfig, { id: item.id }).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('启用成功!');
|
||||
this.st.reload();
|
||||
@ -169,7 +177,7 @@ export class ParterLevelConfigListComponent implements OnInit {
|
||||
nzTitle: '<i>禁用确认</i>',
|
||||
nzContent: `<b>确定禁用该账号吗?</br>`,
|
||||
nzOnOk: () =>
|
||||
this.service.request(this.service.$api_updatePartnerGradeConfig, {id:item.id}).subscribe(res => {
|
||||
this.service.request(this.service.$api_updatePartnerGradeConfig, { id: item.id }).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('禁用成功!');
|
||||
this.st.reload();
|
||||
@ -185,6 +193,4 @@ export class ParterLevelConfigListComponent implements OnInit {
|
||||
this.sf.reset();
|
||||
this.st.load(1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -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.
|
||||
-->
|
||||
|
||||
@ -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<string> =[];
|
||||
partnerId: Array<string> = [];
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -335,7 +335,7 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
{
|
||||
text: '二维码',
|
||||
click: _record => this.assignedQrcode(_record),
|
||||
iif: item => item.resourceStatus == 1 && item.serviceType === '1'
|
||||
iif: item => item.resourceStatus == 1 && item.serviceType === '1' && !(item.resourceType === '2' && item.serviceType === '2')
|
||||
},
|
||||
{
|
||||
text: '修改单价',
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
<nz-card>
|
||||
<div class="filter-wrap">
|
||||
<button nz-button nzType="primary" (click)="add()">新增</button>
|
||||
<button nz-button nzType="primary" (click)="open()"><i nz-icon nzType="plus" nzTheme="outline"></i>筛选</button>
|
||||
</div>
|
||||
<st #st [data]="this.service.$api_smsTemplate_page " [columns]="columns" [req]="{ process: beforeReq }"
|
||||
@ -23,7 +24,7 @@
|
||||
</ng-template>
|
||||
</nz-drawer>
|
||||
|
||||
<nz-modal [(nzVisible)]="isVisible" nzTitle="编辑" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
|
||||
<nz-modal [(nzVisible)]="isVisible" [nzTitle]="!isEdit?'新增':'编辑'" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()" [nzOkDisabled]="!sfEdit?.valid">
|
||||
<ng-container *nzModalContent>
|
||||
<sf #sfEdit [formData]="tempData" [schema]="editSchema" [ui]="{ '*': { spanLabelFixed: 90,grid: { span: 24 } }}" [compact]="true"
|
||||
[button]="'none'"></sf>
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
|
||||
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="isLoading && st.loading" (click)="search()" >查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
<button nz-button (click)="resetSF()">导出</button>
|
||||
<button nz-button (click)="export()">导出</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||
@ -27,25 +27,20 @@
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10,20, 50, 100] }" [loading]="service.http.loading">
|
||||
<ng-template st-row="putStatus" let-item let-index="index">
|
||||
<ng-template st-row="uploadSts" let-item let-index="index">
|
||||
<!-- <a (click)="viewAuditResult(item)" *ngIf="item?.billStatus === '2'">{{item?.billStatusLabel}}</a> -->
|
||||
<span *ngIf="item?.uploadSts == '1'">待上传</span>
|
||||
<span *ngIf="item?.uploadSts == '3'">已上传</span>
|
||||
<span *ngIf="item?.uploadSts == '2'">上传中</span>
|
||||
<span *ngIf="item?.uploadSts == '4'" style="color: red;" (click)="unnormal(item)">上传异常</span>
|
||||
</ng-template>
|
||||
<ng-template st-row="invoiceNO" let-item let-index="index">
|
||||
<a href="/">{{item.invoiceno}}</a>
|
||||
</ng-template>
|
||||
<ng-template st-row="artoname" let-item let-index="index">
|
||||
<a href="/">{{item.artoname}}</a>
|
||||
</ng-template>
|
||||
<ng-template st-row="billHCode" let-item let-index="index">
|
||||
<a href="/">{{item.billHCode}}</a>
|
||||
</ng-template>
|
||||
<ng-template st-row="invoiceType" let-item let-index="index">
|
||||
<span>增值税专用发票</span>
|
||||
</ng-template>
|
||||
<ng-template st-row="sts" let-item let-index="index">
|
||||
<span *ngIf="item.sts==='1'">有效</span>
|
||||
<span *ngIf="item.sts==='2'">作废</span>
|
||||
</ng-template>
|
||||
<ng-template st-row="orderAmount" let-item let-index="index">
|
||||
<div class="text-right">{{item?.orderAmount | currency }}</div>
|
||||
</ng-template>
|
||||
@ -58,6 +53,6 @@
|
||||
<strong class="text-red">{{ selectedRows.length }}</strong> 条数据
|
||||
</div>
|
||||
<button *ngIf="selectedIndex === '1' || selectedIndex === '4'" nz-button nzType="primary" (click)="upload()">上传</button>
|
||||
<button *ngIf="selectedIndex === '2' || selectedIndex === '3'" nz-button nzType="primary" (click)="recall()">撤回</button>
|
||||
<button *ngIf="selectedIndex === '3'" nz-button nzType="primary" (click)="recall()">撤回</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
@ -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 = '提示') {
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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] || ''
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -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 }) }
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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: ''
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -369,7 +369,7 @@
|
||||
<sv-container col="3" class="mt16">
|
||||
<sv-title>合伙人信息</sv-title>
|
||||
<sv label="合伙人名称">
|
||||
{{partnerInfo.partnerEnterpriseName}}
|
||||
{{partnerInfo.partnerContactName}}
|
||||
</sv>
|
||||
<sv label="手机号">
|
||||
<input nz-input type="text" [(ngModel)]="partnerInfo.partnerContactMobile" [readonly]="!isEdit"
|
||||
|
||||
@ -116,7 +116,7 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy {
|
||||
className: 'text-center'
|
||||
},
|
||||
{ title: '修改时间', render: 'modifyTime', className: 'text-center' },
|
||||
{ title: '生效时间', render: 'effectiveTime', className: 'text-center' },
|
||||
{ title: '生效时间', index: 'effectiveTime', className: 'text-center' },
|
||||
{ title: '操作人', render: 'approvalUser', className: 'text-center' },
|
||||
|
||||
];
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { SFComponent, SFDateWidgetSchema, SFRadioWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { EAEnvironmentService } from '@shared';
|
||||
import { EAEnvironmentService, ShipperBaseService } from '@shared';
|
||||
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
|
||||
import format from 'date-fns/format';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
@ -19,8 +19,9 @@ import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
})
|
||||
export class EditPartnerComponentsAddComponent implements OnInit {
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
record: any = {};
|
||||
i: any;
|
||||
sts: any;
|
||||
rows: any;
|
||||
schema: SFSchema = {};
|
||||
detailData: any = {}
|
||||
ui: SFUISchema = {};
|
||||
@ -33,14 +34,18 @@ export class EditPartnerComponentsAddComponent implements OnInit {
|
||||
public service: UsermanageService,
|
||||
private envSrv: EAEnvironmentService,
|
||||
private modal: NzModalRef,
|
||||
public shipperservice: ShipperBaseService
|
||||
) { }
|
||||
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initDetailData()
|
||||
if(this.sts == '2') {
|
||||
this.initDetailData()
|
||||
}
|
||||
this.initSF();
|
||||
}
|
||||
initDetailData() {
|
||||
|
||||
const params = {
|
||||
id: this.i.id
|
||||
}
|
||||
@ -55,18 +60,40 @@ export class EditPartnerComponentsAddComponent implements OnInit {
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
channelId: {
|
||||
// channelId: {
|
||||
// type: 'string',
|
||||
// title: '合伙人修改为',
|
||||
// ui: {
|
||||
// widget: 'radio',
|
||||
// showRequired: true,
|
||||
// } as SFRadioWidgetSchema,
|
||||
// enum: [
|
||||
// { label: '全部可见', value: 1 },
|
||||
// { label: '合伙人可见', value: 2 },
|
||||
// { label: '销售渠道可见', value: 3 },
|
||||
// ],
|
||||
// },
|
||||
enterpriceIds: {
|
||||
type: 'string',
|
||||
title: '合伙人修改为',
|
||||
ui: {
|
||||
widget: 'radio',
|
||||
showRequired: true,
|
||||
} as SFRadioWidgetSchema,
|
||||
enum: [
|
||||
{ label: '全部可见', value: 1 },
|
||||
{ label: '合伙人可见', value: 2 },
|
||||
{ label: '销售渠道可见', value: 3 },
|
||||
],
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
asyncData: () => this.shipperservice.getNetworkenterpriceIds()
|
||||
}
|
||||
},
|
||||
settStartTime: {
|
||||
title: '结算起算日期',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'sl-from-to', type: 'date', format: 'yyyy-MM-dd', visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
} as SFDateWidgetSchema,
|
||||
},
|
||||
remark: {
|
||||
type: 'string',
|
||||
@ -87,7 +114,8 @@ export class EditPartnerComponentsAddComponent implements OnInit {
|
||||
} as SFRadioWidgetSchema,
|
||||
enum: [
|
||||
{ label: '修改成功后立即生效', value: 1 },
|
||||
{ label: 'CRM流程审核通过后生效', value: 2 }
|
||||
{ label: 'CRM流程审核后生效', value: 2 },
|
||||
{ label: 'CRM流程审核通过后生效', value: 3 }
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
@ -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 @@
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
<nz-card [nzExtra]="extraTemplate" >
|
||||
<!-- 数据列表 -->
|
||||
<!-- [data]="service.$api_get_supplier_page" -->
|
||||
|
||||
@ -57,6 +57,9 @@
|
||||
<ng-template st-row="contacter" let-item let-index="index">
|
||||
{{ item.contacter }}<br>/{{item.mobile}}
|
||||
</ng-template>
|
||||
<ng-template st-row="partnerName" let-item let-index="index">
|
||||
{{ item.partnerName }}<br>/{{item.promotersTelephone}}
|
||||
</ng-template>
|
||||
<ng-template st-row="promotersTelephone" let-item let-index="index">
|
||||
<a acl [acl-ability]="['USERCENTER-FREIGHT-LIST-salesman']" (click)="addPromoter(item)">{{ item.promotersTelephone
|
||||
|| '添加' }}</a>
|
||||
@ -72,4 +75,10 @@
|
||||
</se>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #extraTemplate>
|
||||
<div>
|
||||
<button nz-button nzType="primary" (click)="editPartner()" acl [acl-ability]="['ORDER-RISK-batchAudit']"> 修改合伙人 </button>
|
||||
<button nz-button nzType="primary" (click)="editSale()" acl [acl-ability]="['ORDER-RISK-batchAudit']"> 修改渠道销售 </button>
|
||||
</div>
|
||||
</ng-template>
|
||||
@ -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 },
|
||||
|
||||
@ -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';
|
||||
// 分配客服人员
|
||||
|
||||
11
src/app/shared/components/captcha/captcha.module.ts
Normal file
11
src/app/shared/components/captcha/captcha.module.ts
Normal file
@ -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 {}
|
||||
@ -1,2 +1,3 @@
|
||||
export * from './captcha.component';
|
||||
export * from './dun.helper';
|
||||
export * from './captcha.module';
|
||||
|
||||
3
src/app/shared/components/search-drawer/index.ts
Normal file
3
src/app/shared/components/search-drawer/index.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export * from './search-drawer.component';
|
||||
export * from './search-drawer.module';
|
||||
export * from './search-drawer.service';
|
||||
@ -0,0 +1,14 @@
|
||||
<nz-drawer [nzBodyStyle]="{ overflow: 'auto' }" [nzMaskClosable]="false" [nzWidth]="420" [nzVisible]="service.visible"
|
||||
[nzMaskClosable]="true" nzTitle="筛选" [nzFooter]="footerTpl" (nzOnClose)="destroy()">
|
||||
<div *nzDrawerContent>
|
||||
<sf *ngIf="schema" #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'" [formData]="defaultValue">
|
||||
</sf>
|
||||
</div>
|
||||
<ng-template #footerTpl>
|
||||
<div style="float: right">
|
||||
<button nz-button (click)="destroy()">关闭</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="primary" (click)="search();;">搜索</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
</nz-drawer>
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
@ -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 {}
|
||||
@ -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<any>();
|
||||
createEvent = new Subject<any>();
|
||||
initEvent = new Subject<any>();
|
||||
|
||||
visible = false;
|
||||
constructor() {}
|
||||
|
||||
create(defaultValue: Record<string, any>, newSchema?: SFSchema, newUI?: SFUISchema) {
|
||||
this.createEvent.next({ defaultValue, newSchema, newUI });
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -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';
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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: {
|
||||
|
||||
@ -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 {}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
@ -19,3 +19,7 @@
|
||||
// .page-header__title {
|
||||
// display: none;
|
||||
// }
|
||||
|
||||
.ant-btn {
|
||||
border-radius: 4px;
|
||||
}
|
||||
Reference in New Issue
Block a user