Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop

This commit is contained in:
潘晓云
2022-04-25 09:33:59 +08:00
64 changed files with 1676 additions and 878 deletions

30
.husky/_/husky.sh Normal file
View File

@ -0,0 +1,30 @@
#!/bin/sh
if [ -z "$husky_skip_init" ]; then
debug () {
[ "$HUSKY_DEBUG" = "1" ] && echo "husky (debug) - $1"
}
readonly hook_name="$(basename "$0")"
debug "starting $hook_name..."
if [ "$HUSKY" = "0" ]; then
debug "HUSKY env variable is set to 0, skipping hook"
exit 0
fi
if [ -f ~/.huskyrc ]; then
debug "sourcing ~/.huskyrc"
. ~/.huskyrc
fi
export readonly husky_skip_init=1
sh -e "$0" "$@"
exitCode="$?"
if [ $exitCode != 0 ]; then
echo "husky - $hook_name hook exited with code $exitCode (error)"
exit $exitCode
fi
exit 0
fi

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-18 09:51:21 * @Date : 2022-01-18 09:51:21
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-04-22 14:01:00 * @LastEditTime : 2022-04-24 17:51:09
* @FilePath : \\tms-obc-web\\proxy.conf.js * @FilePath : \\tms-obc-web\\proxy.conf.js
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */

View File

@ -27,6 +27,7 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
import { NzGridModule } from 'ng-zorro-antd/grid'; import { NzGridModule } from 'ng-zorro-antd/grid';
import { LayoutPassportComponent } from './passport/passport.component'; import { LayoutPassportComponent } from './passport/passport.component';
import { PRO_COMPONENTS } from './pro/index'; import { PRO_COMPONENTS } from './pro/index';
import { SearchDrawerModule } from '../shared/components/search-drawer/search-drawer.module';
const COMPONENTS: Array<Type<any>> = [...PRO_COMPONENTS, LayoutPassportComponent]; const COMPONENTS: Array<Type<any>> = [...PRO_COMPONENTS, LayoutPassportComponent];
@ -57,7 +58,8 @@ const COMPONENTS: Array<Type<any>> = [...PRO_COMPONENTS, LayoutPassportComponent
ThemeBtnModule, ThemeBtnModule,
ScrollbarModule, ScrollbarModule,
NzGridModule, NzGridModule,
NzMessageModule NzMessageModule,
SearchDrawerModule
], ],
declarations: COMPONENTS, declarations: COMPONENTS,
exports: COMPONENTS exports: COMPONENTS

View File

@ -38,3 +38,4 @@
</div> </div>
<ng-template #settingHost></ng-template> <ng-template #settingHost></ng-template>
<theme-btn></theme-btn> <theme-btn></theme-btn>
<app-search-drawer></app-search-drawer>

View File

@ -12,6 +12,7 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
import { AccountComponentsCenterComponent } from './components/center/center.component'; import { AccountComponentsCenterComponent } from './components/center/center.component';
import { AccountComponentsEditPayPasswordComponent } from './components/edit-paypassword/edit-paypassword.component'
const routes: Routes = [ const routes: Routes = [
{ path: '', redirectTo: 'center', pathMatch: 'full' }, { path: '', redirectTo: 'center', pathMatch: 'full' },
@ -21,7 +22,16 @@ const routes: Routes = [
data: { data: {
title: '账户中心' title: '账户中心'
} }
} },
{
path: 'edit-paypassword',
component: AccountComponentsEditPayPasswordComponent,
data: {
title: '修改支付密码',
titleI18n: 'app.my.edit.paypassword',
// guard: {ability: ['accountcenter-editpaypassword']}
},
},
]; ];
@NgModule({ @NgModule({

View File

@ -15,11 +15,13 @@ import { AccountRoutingModule } from './account-routing.module';
import { AccountComponentsCenterComponent } from './components/center/center.component'; import { AccountComponentsCenterComponent } from './components/center/center.component';
import { AccountComponentsEditNameComponent } from './components/edit-name/edit-name.component'; import { AccountComponentsEditNameComponent } from './components/edit-name/edit-name.component';
import { AccountComponentsCenterEditComponent } from './components/edit-password/edit-password.component'; import { AccountComponentsCenterEditComponent } from './components/edit-password/edit-password.component';
import { AccountComponentsEditPayPasswordComponent } from './components/edit-paypassword/edit-paypassword.component'
const COMPONENTS = [ const COMPONENTS = [
AccountComponentsCenterComponent, AccountComponentsCenterComponent,
AccountComponentsEditNameComponent, AccountComponentsEditNameComponent,
AccountComponentsCenterEditComponent AccountComponentsCenterEditComponent,
AccountComponentsEditPayPasswordComponent
]; ];
const COMPONENTS_NOROUNT = [AccountComponentsEditNameComponent]; const COMPONENTS_NOROUNT = [AccountComponentsEditNameComponent];

View File

@ -12,9 +12,9 @@
<div nz-col [nzSpan]="10">{{ infoData.phone }}</div> <div nz-col [nzSpan]="10">{{ infoData.phone }}</div>
<div nz-col [nzSpan]="10"> <div nz-col [nzSpan]="10">
<span *ngIf="infoData.phone; else elsePhone"><i nz-icon [nzType]="'check-circle'" [nzTheme]="'fill'" <span *ngIf="infoData.phone; else elsePhone"><i nz-icon [nzType]="'check-circle'" [nzTheme]="'fill'"
style="color: #52c41a"></i> 已绑定</span> style="color: #52c41a"></i> 已绑定</span>
<ng-template #elsePhone><i nz-icon [nzType]="'question-circle'" [nzTheme]="'fill'" <ng-template #elsePhone><i nz-icon [nzType]="'question-circle'" [nzTheme]="'fill'"
style="color: #ccc"></i> 未绑定</ng-template> style="color: #ccc"></i> 未绑定</ng-template>
</div> </div>
</div> </div>
</nz-list-item-meta-title> </nz-list-item-meta-title>
@ -30,18 +30,44 @@
</div> </div>
<div nz-col [nzSpan]="10">定期更换密码有助于账号安全</div> <div nz-col [nzSpan]="10">定期更换密码有助于账号安全</div>
<div nz-col [nzSpan]="10"> <div nz-col [nzSpan]="10">
<span *ngIf="infoData.isPwd; else elsePwd" <span *ngIf="infoData.isPwd; else elsePwd"><i nz-icon [nzType]="'check-circle'" [nzTheme]="'fill'"
><i nz-icon [nzType]="'check-circle'" [nzTheme]="'fill'" style="color: #52c41a"></i> 已设置</span style="color: #52c41a"></i> 已设置</span>
> <ng-template #elsePwd><i nz-icon [nzType]="'question-circle'" [nzTheme]="'fill'"
<ng-template #elsePwd style="color: #ccc"></i> 未设置</ng-template>
><i nz-icon [nzType]="'question-circle'" [nzTheme]="'fill'" style="color: #ccc"></i> 未设置</ng-template
>
</div> </div>
</div> </div>
</nz-list-item-meta-title> </nz-list-item-meta-title>
</nz-list-item-meta> </nz-list-item-meta>
<div class="item-btn"><a (click)="edit('password')">修改</a></div> <div class="item-btn"><a (click)="edit('password')">修改</a></div>
</nz-list-item> </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-list>
</nz-card> </nz-card>

View File

@ -17,7 +17,7 @@
right: 20px; right: 20px;
} }
.item-btn { .item-btn {
width: 28px; width: 36px;
text-align: center; text-align: center;
} }
.li-label { .li-label {

View File

@ -53,6 +53,8 @@ export class AccountComponentsCenterComponent implements OnInit {
}, },
]; ];
idx: any = 0; idx: any = 0;
defaultCompany: any = {};
ifHasPayPw = false;
constructor(public service: AccountService, private modal: ModalHelper, private http: _HttpClient, private router: Router, private modalService: NzModalService,) {} constructor(public service: AccountService, private modal: ModalHelper, private http: _HttpClient, private router: Router, private modalService: NzModalService,) {}
ngOnInit() { ngOnInit() {
@ -136,9 +138,32 @@ export class AccountComponentsCenterComponent implements OnInit {
getInfo() { getInfo() {
this.service.http.post(this.service.$api_get_current_user_info).subscribe((res) => { this.service.http.post(this.service.$api_get_current_user_info).subscribe((res) => {
this.infoData = res.data; 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) { edit(tpye: string) {
if (tpye === 'phone') { if (tpye === 'phone') {
const modalRef = this.modalService.create({ 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') { // if (tpye === 'info') {
// this.router.navigate(['/account/editInfo'], { // this.router.navigate(['/account/editInfo'], {
// queryParams: { realName: this.infoData.realName, certificateNumber: this.infoData.certificateNumber }, // queryParams: { realName: this.infoData.realName, certificateNumber: this.infoData.certificateNumber },

View File

@ -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>

View File

@ -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;
}
}

View File

@ -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();
});
});

View File

@ -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 {};
};
}

View File

@ -36,6 +36,15 @@ export class AccountService extends BaseService {
$api_set_voucherUpdatePhone = `/api/mdc/cuc/userBasicInfo/forgetPassword/voucherUpdatePhone`; $api_set_voucherUpdatePhone = `/api/mdc/cuc/userBasicInfo/forgetPassword/voucherUpdatePhone`;
// 凭证修改密码 // 凭证修改密码
$api_set_phoneUpdatePassword = `/api/mdc/cuc/userBasicInfo/phoneUpdatePassword`; $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) { constructor(public injector: Injector) {
super(injector); super(injector);
} }

View File

@ -1,14 +1,21 @@
import { AfterViewInit, Component, OnInit } from '@angular/core'; import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core';
import { fromEvent } from 'rxjs'; import { SFComponent, SFSchema } from '@delon/form';
import { fromEvent, Subscription } from 'rxjs';
import { debounceTime } from 'rxjs/operators'; import { debounceTime } from 'rxjs/operators';
import { SearchDrawerService } from 'src/app/shared/components/search-drawer/search-drawer.service';
@Component({ @Component({
template: '' template: ''
}) })
export class BasicTableComponent implements AfterViewInit { export class BasicTableComponent implements AfterViewInit, OnDestroy {
scrollY = '400px'; scrollY = '400px';
constructor() {} sf!: SFComponent;
sfValue: Record<string, any> = {};
drawer: Subscription[] = [];
schema: SFSchema = {};
constructor(public searchDrawerService: SearchDrawerService) {}
ngAfterViewInit(): void { ngAfterViewInit(): void {
setTimeout(() => { 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() { getScrollY() {
const windowHeight = window.innerHeight || Math.max(document.documentElement.clientHeight, document.body.clientHeight); const windowHeight = window.innerHeight || Math.max(document.documentElement.clientHeight, document.body.clientHeight);
const header = document.getElementsByTagName('layout-pro-header')?.[0]; const header = document.getElementsByTagName('layout-pro-header')?.[0];
@ -37,4 +71,6 @@ export class BasicTableComponent implements AfterViewInit {
this.scrollY = scrollY + 'px'; this.scrollY = scrollY + 'px';
} }
} }
search() {}
} }

View File

@ -9,7 +9,7 @@
} }
.ant-tabs-tab { .ant-tabs-tab {
margin: 0 0 0 16px; margin : 0 0 0 16px;
padding: 12px 0; padding: 12px 0;
} }
@ -21,31 +21,51 @@
.ant-card-body { .ant-card-body {
padding: 0; 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 { .ant-table-pagination.ant-pagination {
margin: 8px; margin: 8px;
} }
.ant-table-thead > tr > th, .ant-table-thead>tr>th,
.ant-table-tbody > tr > td, .ant-table-tbody>tr>td,
.ant-table tfoot > tr > th, .ant-table tfoot>tr>th,
.ant-table tfoot > tr > td { .ant-table tfoot>tr>td {
padding: 8px; padding: 8px;
} }
.ant-table.ant-table-bordered > .ant-table-container { .ant-table.ant-table-bordered>.ant-table-container {
border-top: 0; border-top: 0;
} }
.ant-pagination-item { .ant-pagination-item {
min-width: 24px; min-width : 24px;
height: 24px; height : 24px;
line-height: 21px; line-height: 21px;
} }
.ant-pagination-total-text { .ant-pagination-total-text {
height: 24px; height : 24px;
line-height: 24px; line-height: 24px;
} }
@ -53,8 +73,8 @@
.ant-pagination-next, .ant-pagination-next,
.ant-pagination-jump-prev, .ant-pagination-jump-prev,
.ant-pagination-jump-next { .ant-pagination-jump-next {
min-width: 24px; min-width : 24px;
height: 24px; height : 24px;
line-height: 21px; line-height: 21px;
} }

View File

@ -1,5 +1,3 @@
<!-- 页头 -->
<page-header-wrapper [title]="'数据报表'"></page-header-wrapper>
<div nz-row [nzGutter]="16"> <div nz-row [nzGutter]="16">
<div nz-col class="gutter-row" [nzSpan]="6"> <div nz-col class="gutter-row" [nzSpan]="6">
<g2-card [title]="AdvanceDepositTitle" [bordered]="true" [total]="totalAdvanceDeposit?.totalAmount || '¥ 0.00万'" <g2-card [title]="AdvanceDepositTitle" [bordered]="true" [total]="totalAdvanceDeposit?.totalAmount || '¥ 0.00万'"
@ -11,9 +9,10 @@
</p> </p>
</ng-template> </ng-template>
<ng-template #AdvanceDepositFooter> <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)"> (clickItem)="handleClick($event)">
</g2-mini-area> </g2-mini-area> -->
</ng-template> </ng-template>
</g2-card> </g2-card>
</div> </div>

View File

@ -19,6 +19,7 @@ import { GeometryLabelCfg } from '@antv/g2/lib/interface';
providers: [CurrencyPipe] providers: [CurrencyPipe]
}) })
export class DatatableDataindexComponent implements OnInit { export class DatatableDataindexComponent implements OnInit {
@ViewChild('AdvanceDeposit', { static: false }) AdvanceDeposit!: G2CustomComponent;
@ViewChild('g2custom', { static: false }) g2custom!: G2CustomComponent; @ViewChild('g2custom', { static: false }) g2custom!: G2CustomComponent;
@ViewChild('RegionalPerforman', { static: false }) RegionalPerforman!: G2CustomComponent; @ViewChild('RegionalPerforman', { static: false }) RegionalPerforman!: G2CustomComponent;
@ViewChild('BillDirectProportion', { static: false }) BillDirectProportion!: 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) => { this.service.request(this.service.$api_total_advance_deposit).subscribe((res: DataTotalVO) => {
if (res) { if (res) {
this.totalAdvanceDeposit = this.formatMiniAreaData(res); this.totalAdvanceDeposit = this.formatMiniAreaData(res);
this.initAreaMap(this.AdvanceDeposit['el'].nativeElement as any, []);
} }
}); });
// 业绩量总额 // 业绩量总额
@ -179,7 +181,7 @@ export class DatatableDataindexComponent implements OnInit {
.style({ .style({
fillOpacity: 1, fillOpacity: 1,
stroke: 'white', stroke: 'white',
lineWidth: 8 lineWidth: 4
}) })
.state({ .state({
active: { active: {
@ -294,42 +296,57 @@ export class DatatableDataindexComponent implements OnInit {
* @param el * @param el
*/ */
private initAreaMap(el: HTMLElement, datas: any[]): void { private initAreaMap(el: HTMLElement, datas: any[]): void {
const data = [
{ city: '冰岛(雷克雅未克)', type: '首都人口', value: 0.56 },
{ city: '冰岛(雷克雅未克)', type: '城市人口', value: 0.38 }
];
const chart = new Chart({ const chart = new Chart({
container: el, container: el,
autoFit: true, autoFit: true,
height: 500 height: 45
}); });
chart.data(datas); chart.data(data);
chart.scale('Data', { chart.legend(false);
range: [0, 1], chart.axis('city', false);
tickCount: 10, chart.axis('value', {
type: 'timeCat' label: {
formatter: val => val
},
title: null,
grid: null
}); });
chart.scale('sales', { chart.coordinate('rect').transpose();
nice: true
});
chart.axis('Data', false);
chart.axis('sales', false);
chart.tooltip({ chart.tooltip({
showCrosshairs: true customItems: items => {
return [];
},
showContent: true,
title: '1,968.08万'
}); });
chart.interaction('active-region');
// chart.annotation().dataMarker({ chart
// position: ['2014-01', 1750], .interval()
// top: true, .adjust('stack')
// text: { .position('city*value')
// content: '因政策调整导致销量下滑', .color('type*city', (type: any, city: any) => {
// style: { if (type === '首都人口') {
// fontSize: 13 return '#E60012';
// } }
// }, if (type === '城市人口') {
// line: { return '#EAEAEB';
// length: 30 }
// } return '#EAEAEB';
// }); })
.style('type', (type: any, city: any) => {
chart.line().position('Data*sales'); if (type === '首都人口') {
chart.area().position('Data*sales'); return { radius: [0, 0, 20, 20] };
}
if (type === '城市人口') {
return { radius: [20, 20, 0, 0] };
}
return {};
});
chart.render(); chart.render();
} }
@ -409,7 +426,7 @@ export class DatatableDataindexComponent implements OnInit {
chart.data(data); chart.data(data);
// 设置坐标轴 // 设置坐标轴
chart.scale({ 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) + '%' }, 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) + '%' } 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], padding: [10, 0, 40, 0],
items: [ items: [
{ value: 'y1', name: y1Title, marker: { symbol: 'circle', style: { fill: '#E60012', r: 5, fontSize: 13 } } }, { 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: '#FE7823', r: 5, fontSize: 13 } } },
{ value: 'y2', name: y2Title, marker: { symbol: 'circle', style: { fill: '#50D4AB', r: 5, fontSize: 13 } } } { value: 'y3', name: y3Title, marker: { symbol: 'circle', style: { fill: '#F7CFCE', r: 5, fontSize: 13 } } }
] ]
}); });
chart.axis('y2', { chart.axis('y2', {
@ -440,16 +457,16 @@ export class DatatableDataindexComponent implements OnInit {
.line() .line()
.position('x*y2') .position('x*y2')
// .label('pre', val => ({ content: (val * 100).toFixed(0) + '%' })) // .label('pre', val => ({ content: (val * 100).toFixed(0) + '%' }))
.color('#6CBFFF') .color('#F7CFCE')
.size(3); .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 chart
.line() .line()
.position('x*y3') .position('x*y3')
// .label('pre2', val => ({ content: (val * 100).toFixed(0) + '%' })) // .label('pre2', val => ({ content: (val * 100).toFixed(0) + '%' }))
.color('#50D4AB') .color('#FE7823')
.size(3); .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.interaction('active-region');
chart.removeInteraction('legend-filter'); // 自定义图例,移除默认的分类图例筛选交互 chart.removeInteraction('legend-filter'); // 自定义图例,移除默认的分类图例筛选交互

View File

@ -210,7 +210,7 @@ export class WithdrawalsDetailComponent implements OnInit {
enum: [ enum: [
{label: '全部', value: ''}, {label: '全部', value: ''},
{label: '是', value: '1'}, {label: '是', value: '1'},
{label: '否', value: '2'} {label: '否', value: '0'}
], ],
ui: { ui: {
widget: 'select', widget: 'select',

View File

@ -9,32 +9,14 @@
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
<!-- 搜索表单 --> <!-- 搜索表单 -->
<page-header-wrapper [title]="''"> </page-header-wrapper> <!-- <nz-card>
<nz-card>
<div nz-row nzGutter="8"> <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"> <div nz-col [nzSpan]="_$expand ? 24 : 18">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf> <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
</div> </div>
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand"> <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 nz-button nzType="primary" [nzLoading]="loading" (click)="openDrawer()" acl
>查询</button [acl-ability]="['ORDER-BULK-search']">筛选</button>
>
<button nz-button nzType="primary" [disabled]="loading" (click)="exprot()">导出</button> <button nz-button nzType="primary" [disabled]="loading" (click)="exprot()">导出</button>
<button nz-button [disabled]="loading" (click)="resetSF()">重置</button> <button nz-button [disabled]="loading" (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()"> <button nz-button nzType="link" (click)="expandToggle()">
@ -42,32 +24,30 @@
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button> </button>
</div> </div>
</ng-container>
</div> </div>
</nz-card> </nz-card> -->
<nz-card> <nz-card class="table-box">
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate"> <div class="tab_header">
<nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab> <label class="page_title">
<nz-tab [nzTitle]="'待接单(' + tabs?.receivedQuantity + ')'"></nz-tab> <label class="driver">|</label>
<nz-tab [nzTitle]="'待发车(' + tabs?.stayQuantity + ')'"></nz-tab> 大宗订单</label>
<nz-tab [nzTitle]="'运输中(' + tabs?.GoingQuantity + ')'"></nz-tab> <nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'待签收(' + tabs?.signQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab>
<nz-tab [nzTitle]="'已完成(' + tabs?.compolatelQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'待接单(' + tabs?.receivedQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'已取消(' + tabs?.cancelQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'待发车(' + tabs?.stayQuantity + ')'"></nz-tab>
</nz-tabset> <nz-tab [nzTitle]="'运输中(' + tabs?.GoingQuantity + ')'"></nz-tab>
<div style="margin-top: 15px"> <nz-tab [nzTitle]="'待签收(' + tabs?.signQuantity + ')'"></nz-tab>
<st <nz-tab [nzTitle]="'已完成(' + tabs?.compolatelQuantity + ')'"></nz-tab>
#st <nz-tab [nzTitle]="'已取消(' + tabs?.cancelQuantity + ')'"></nz-tab>
[bordered]="true" </nz-tabset>
[scroll]="{ x: '2000px' }" </div>
[data]="service.$api_get_listBulkPage"
[columns]="columns" <div>
[req]="{ process: beforeReq }" <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}" [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] }" [loading]="false">
[loading]="false"
>
<ng-template st-row="freightPrice" let-item let-index="index"> <ng-template st-row="freightPrice" let-item let-index="index">
{{ item.freightPrice | currency }} {{ item.freightPrice | currency }}
</ng-template> </ng-template>
@ -76,16 +56,19 @@
<div *ngIf="item?.unloadTime">卸 | {{ item?.unloadTime }}</div> <div *ngIf="item?.unloadTime">卸 | {{ item?.unloadTime }}</div>
</ng-template> </ng-template>
<ng-template st-row="driverName" let-item let-index="index"> <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>
<ng-template st-row="settlementWeight" let-item let-index="index"> <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>
<ng-template st-row="payeeName" let-item let-index="index"> <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>
<ng-template st-row="createUserName" let-item let-index="index"> <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>
<ng-template st-row="billCode" let-item let-index="index"> <ng-template st-row="billCode" let-item let-index="index">
<a [routerLink]="'bulk-detail/' + item.id">{{ item.billCode }}</a> <a [routerLink]="'bulk-detail/' + item.id">{{ item.billCode }}</a>
@ -108,7 +91,8 @@
<div *ngIf="item.mybidDetailInfo.length > 0"> <div *ngIf="item.mybidDetailInfo.length > 0">
<p *ngFor="let data of item.mybidDetailInfo"> <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 | 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> <span *ngIf="data.paymentStatusLabel" style="color: #f59a63">{{ data.paymentStatusLabel }}</span>
</p> </p>
</div> </div>
@ -117,25 +101,13 @@
</div> </div>
</nz-card> </nz-card>
<nz-modal <nz-modal [(nzVisible)]="isVisible" [nzWidth]="600" [nzFooter]="nzModalFooter" nzTitle="运费变更记录" (nzOnOk)="handleOK()"
[(nzVisible)]="isVisible" (nzOnCancel)="handleCancel('0')">
[nzWidth]="600"
[nzFooter]="nzModalFooter"
nzTitle="运费变更记录"
(nzOnOk)="handleOK()"
(nzOnCancel)="handleCancel('0')"
>
<ng-container *nzModalContent> <ng-container *nzModalContent>
<st <st #stFloat size="small" [bordered]="true" [data]="service.$api_get_listChangeApply" [columns]="columnsFloat"
#stFloat
size="small"
[bordered]="true"
[data]="service.$api_get_listChangeApply"
[columns]="columnsFloat"
[req]="{ process: beforeReq }" [req]="{ process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}" [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"> <ng-template st-row="order" let-item let-index="index">
{{ index + 1 }} {{ index + 1 }}
</ng-template> </ng-template>
@ -155,14 +127,8 @@
</ng-template> </ng-template>
</nz-modal> </nz-modal>
<nz-modal <nz-modal [(nzVisible)]="isVisibleView" [nzWidth]="600" [nzFooter]="nzModalFooterview" nzTitle="查看"
[(nzVisible)]="isVisibleView" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel('1')">
[nzWidth]="600"
[nzFooter]="nzModalFooterview"
nzTitle="查看"
(nzOnOk)="handleOK()"
(nzOnCancel)="handleCancel('1')"
>
<ng-container *nzModalContent> <ng-container *nzModalContent>
<sf #sfView [schema]="schemaView" [ui]="uiView" [formData]="ViewCause" [compact]="true" [button]="'none'"> <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"> <ng-template sf-template="no" let-me let-ui="uiView" let-schema="schemaView">
@ -172,30 +138,21 @@
</div> </div>
</ng-template> </ng-template>
</sf> </sf>
<st <st #stFloatView multiSort size="small" [bordered]="true" [data]="service.$api_getChangeRecordBulkDetail"
#stFloatView
multiSort
size="small"
[bordered]="true"
[data]="service.$api_getChangeRecordBulkDetail"
[columns]="columnsFloatView" [columns]="columnsFloatView"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: changeViewParams }" [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"> <ng-template st-row="amountBeforeChange" let-item let-index="index">
{{ item.amountBeforeChange | currency }} {{ item.amountBeforeChange | currency }}
</ng-template> </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"> <ng-template st-row="amountAfterChange" let-item let-index="index">
{{ item.amountAfterChange | currency }} {{ item.amountAfterChange | currency }}
</ng-template> </ng-template>
</st> </st>
<div <div><span>变更原因:{{ ViewCause?.changeCause }}</span></div>
><span>变更原因:{{ ViewCause?.changeCause }}</span></div <div><span>拒绝原因:{{ ViewCause?.refuseCause }}</span></div>
>
<div
><span>拒绝原因:{{ ViewCause?.refuseCause }}</span></div
>
<div><span>注:附加费依据调整后的运输费用重新计算</span></div> <div><span>注:附加费依据调整后的运输费用重新计算</span></div>
</ng-container> </ng-container>
<ng-template #nzModalFooterview> <ng-template #nzModalFooterview>
@ -204,13 +161,8 @@
</ng-template> </ng-template>
</nz-modal> </nz-modal>
<nz-modal <nz-modal [(nzVisible)]="isVisibleEvaluate" [nzWidth]="600" [nzFooter]="nzModalFooterEvaluate" (nzOnOk)="handleOK()"
[(nzVisible)]="isVisibleEvaluate" (nzOnCancel)="handleCancel('2')">
[nzWidth]="600"
[nzFooter]="nzModalFooterEvaluate"
(nzOnOk)="handleOK()"
(nzOnCancel)="handleCancel('2')"
>
<ng-container *nzModalContent> <ng-container *nzModalContent>
<nz-tabset> <nz-tabset>
<nz-tab nzTitle="货主评价"> <nz-tab nzTitle="货主评价">
@ -239,25 +191,20 @@
<ng-template #enable> <ng-template #enable>
<div class="ant-popover-message"> <div class="ant-popover-message">
<i nz-icon nzType="info-circle" nzTheme="fill"></i> <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" <div class="ant-popover-message-title ng-star-inserted self-ant-popover-title" style="font-size: 16px">已选择{{
>已选择{{ selectedRows?.length || 0 }}条订单,确认批量签收吗? selectedRows?.length || 0 }}条订单,确认批量签收吗?
</div> </div>
<div class="ant-popover-message-title ng-star-inserted"> 签收后不可再修改运费,请确保运费等信息准确无误后,再进行签收。 </div> <div class="ant-popover-message-title ng-star-inserted"> 签收后不可再修改运费,请确保运费等信息准确无误后,再进行签收。 </div>
</div> </div>
</ng-template> </ng-template>
<ng-template #extraTemplate> <ng-template #extraTemplate>
<div *ngIf="resourceStatus == 4"> <div class="mr-sm">
<button <button nz-button nzDanger [nzLoading]="loading" (click)="openDrawer()" acl
nz-button [acl-ability]="['ORDER-BULK-search']">筛选</button>
nzType="primary" <button nz-button nzDanger [disabled]="loading" (click)="exprot()">导出</button>
nzGhost <button *ngIf="resourceStatus == 4" nz-button nzType="primary" nzGhost nz-popconfirm [nzPopconfirmTitle]="enable"
nz-popconfirm (nzOnConfirm)="userAction()" nzPopconfirmPlacement="bottomRight" acl
[nzPopconfirmTitle]="enable" [acl-ability]="['ORDER-BULK-batchSignBulkOrder']">
(nzOnConfirm)="userAction()"
nzPopconfirmPlacement="bottomRight"
acl
[acl-ability]="['ORDER-BULK-batchSignBulkOrder']"
>
批量签收 批量签收
</button> </button>
</div> </div>

View File

@ -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 { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme'; import { ModalHelper, _HttpClient } from '@delon/theme';
@ -7,20 +7,20 @@ import { map } from 'rxjs/operators';
import { OrderManagementService } from '../../services/order-management.service'; import { OrderManagementService } from '../../services/order-management.service';
import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component'; import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component';
import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-receipt.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 { ShipperBaseService } from '@shared';
import { Router, ActivatedRoute } from '@angular/router'; import { Router, ActivatedRoute } from '@angular/router';
import { OneCarOrderCancelConfirmComponent } from '../../modal/vehicle/cancel-confirm/cancel-confirm.component'; 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({ @Component({
selector: 'app-supply-management-bulk', selector: 'app-supply-management-bulk',
templateUrl: './bulk.component.html', templateUrl: './bulk.component.html',
styleUrls: ['./bulk.component.less'] styleUrls: ['../../../commom/less/commom-table.less','./bulk.component.less']
}) })
export class OrderManagementBulkComponent implements OnInit { export class OrderManagementBulkComponent extends BasicTableComponent implements OnInit {
ui: SFUISchema = {};
uiView: SFUISchema = {}; uiView: SFUISchema = {};
schema: SFSchema = {};
schemaView: SFSchema = {}; schemaView: SFSchema = {};
auditMany = false; auditMany = false;
isVisibleView = false; isVisibleView = false;
@ -54,13 +54,17 @@ export class OrderManagementBulkComponent implements OnInit {
GoingQuantity: 0, GoingQuantity: 0,
totalCount: 0 totalCount: 0
}; };
constructor( constructor(
public service: OrderManagementService, public service: OrderManagementService,
private modal: NzModalService, private modal: NzModalService,
public shipperservice: ShipperBaseService, public shipperservice: ShipperBaseService,
private router: Router, private router: Router,
private ar: ActivatedRoute, private ar: ActivatedRoute,
) { } public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
/** /**
* 查询参数 * 查询参数
@ -70,14 +74,14 @@ export class OrderManagementBulkComponent implements OnInit {
if (this.resourceStatus) { if (this.resourceStatus) {
a.billStatus = this.resourceStatus; a.billStatus = this.resourceStatus;
} }
const params: any = Object.assign({}, this.sf?.value || {}); const params: any = Object.assign({}, this.sfValue || {});
delete params._$expand; delete params._$expand;
return { return {
...a, ...a,
...params, ...params,
createTime: { createTime: {
start: this.sf?.value?.createTime?.[0] || '', start: this.sfValue?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '' end: this.sfValue?.createTime?.[1] || ''
} }
}; };
} }
@ -86,17 +90,17 @@ export class OrderManagementBulkComponent implements OnInit {
if (this.resourceStatus) { if (this.resourceStatus) {
a.billStatus = this.resourceStatus; a.billStatus = this.resourceStatus;
} }
const params: any = Object.assign({}, this.sf?.value || {}); const params: any = Object.assign({}, this.sfValue || {});
delete params._$expand; delete params._$expand;
console.log(params); console.log(params);
if (this.sf) { if (this.sfValue) {
Object.assign(requestOptions.body, { Object.assign(requestOptions.body, {
...a, ...a,
...params, ...params,
createTime: { createTime: {
start: this.sf?.value?.createTime?.[0] || '', start: this.sfValue?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '' end: this.sfValue?.createTime?.[1] || ''
} }
}); });
} }
@ -104,8 +108,8 @@ export class OrderManagementBulkComponent implements OnInit {
return requestOptions; return requestOptions;
}; };
afterRes = (data: any[], rawData?: any) => { afterRes = (data: any[], rawData?: any) => {
console.log(data) console.log(data);
this.loading = false this.loading = false;
return data.map(item => ({ return data.map(item => ({
...item, ...item,
disabled: item.billStatus !== '4' disabled: item.billStatus !== '4'
@ -119,6 +123,7 @@ export class OrderManagementBulkComponent implements OnInit {
id: this.changeId id: this.changeId
}; };
} }
search() { search() {
this.st?.load(); this.st?.load();
this.getGoodsSourceStatistical(); this.getGoodsSourceStatistical();
@ -185,14 +190,14 @@ export class OrderManagementBulkComponent implements OnInit {
type: 'string', type: 'string',
title: '订单号', title: '订单号',
ui: { ui: {
placeholder: '最多100个单号空号隔开', placeholder: '最多100个单号空号隔开'
} }
}, },
wayBillCode: { wayBillCode: {
type: 'string', type: 'string',
title: '运单号', title: '运单号',
ui: { ui: {
placeholder: '最多100个单号空号隔开', placeholder: '最多100个单号空号隔开'
} }
}, },
resourceCode: { resourceCode: {
@ -208,11 +213,8 @@ export class OrderManagementBulkComponent implements OnInit {
searchDebounceTime: 300, searchDebounceTime: 300,
searchLoadingText: '搜索中...', searchLoadingText: '搜索中...',
allowClear: true, allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
},
onSearch: (q: any) => { onSearch: (q: any) => {
let str = q.replace(/^\s+|\s+$/g, ""); let str = q.replace(/^\s+|\s+$/g, '');
if (str) { if (str) {
return this.service return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: str }) .request(this.service.$api_enterpriceList, { enterpriseName: str })
@ -233,55 +235,27 @@ export class OrderManagementBulkComponent implements OnInit {
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请先选择货主', placeholder: '请先选择货主',
visibleIf: {
_$expand: (value: boolean) => value
},
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
loadingPlace: { loadingPlace: {
type: 'string', type: 'string',
title: '装货地', title: '装货地',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
dischargePlace: { dischargePlace: {
type: 'string', type: 'string',
title: '卸货地', title: '卸货地',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
driverName: { driverName: {
title: '承运司机', title: '承运司机',
type: 'string', type: 'string',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
carNo: { carNo: {
title: '车牌号', title: '车牌号',
type: 'string', type: 'string',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
carCaptainName: { carCaptainName: {
title: '车队长', title: '车队长',
type: 'string', type: 'string',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
paymentStatus: { paymentStatus: {
title: '支付状态', title: '支付状态',
@ -290,9 +264,6 @@ export class OrderManagementBulkComponent implements OnInit {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'overall:payment:status' }, params: { dictKey: 'overall:payment:status' },
containsAllLabel: true, containsAllLabel: true,
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
createTime: { createTime: {
@ -303,9 +274,6 @@ export class OrderManagementBulkComponent implements OnInit {
mode: 'range', mode: 'range',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
allowClear: true, allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFDateWidgetSchema } as SFDateWidgetSchema
}, },
riskStatus: { riskStatus: {
@ -319,9 +287,6 @@ export class OrderManagementBulkComponent implements OnInit {
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value
}
} }
}, },
enterpriseInfoName: { enterpriseInfoName: {
@ -331,9 +296,6 @@ export class OrderManagementBulkComponent implements OnInit {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
allowClear: true, allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
},
asyncData: () => this.shipperservice.getNetworkEnterpriseName() asyncData: () => this.shipperservice.getNetworkEnterpriseName()
} }
}, },
@ -345,9 +307,6 @@ export class OrderManagementBulkComponent implements OnInit {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'service:type' }, params: { dictKey: 'service:type' },
containsAllLabel: true, containsAllLabel: true,
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
settlementBasis: { settlementBasis: {
@ -358,15 +317,11 @@ export class OrderManagementBulkComponent implements OnInit {
containsAllLabel: true, containsAllLabel: true,
params: { dictKey: 'goodresource:settlement:type' }, params: { dictKey: 'goodresource:settlement:type' },
containAllLable: true, containAllLable: true,
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
} }
}, },
type: 'object' type: 'object'
}; };
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
} }
/** /**
* 初始化查询表单 * 初始化查询表单
@ -493,7 +448,7 @@ export class OrderManagementBulkComponent implements OnInit {
title: '结算数量', title: '结算数量',
render: 'settlementWeight', render: 'settlementWeight',
width: '170px', width: '170px',
className: 'text-left', className: 'text-left'
// format: (item: any) => // format: (item: any) =>
// `${item.settlementWeight || '0'}吨/ // `${item.settlementWeight || '0'}吨/
// ${item.settlementVolume || '0'}方` // ${item.settlementVolume || '0'}方`
@ -509,7 +464,7 @@ export class OrderManagementBulkComponent implements OnInit {
title: '车队长', title: '车队长',
className: 'text-left', className: 'text-left',
width: '180px', width: '180px',
render: 'payeeName', render: 'payeeName'
}, },
{ {
title: '装卸货时间', title: '装卸货时间',
@ -533,27 +488,31 @@ export class OrderManagementBulkComponent implements OnInit {
title: '操作', title: '操作',
fixed: 'right', fixed: 'right',
width: '130px', width: '130px',
className: 'text-left block-td', className: 'text-center block-td',
buttons: [ buttons: [
{ {
text: '运费变更记录', text: '运费变更记录',
click: _record => this.OpenPrice(_record), click: _record => this.OpenPrice(_record),
iif: item => iif: item =>
item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '6', item.billStatus == '4' ||
acl: { ability: ['ORDER-BULK-listChangeApply'] }, item.billStatus == '5' ||
item.billStatus == '2' ||
item.billStatus == '3' ||
item.billStatus == '6',
acl: { ability: ['ORDER-BULK-listChangeApply'] }
}, },
{ {
text: '查看评价', text: '查看评价',
click: _record => this.viewEvaluate(_record), click: _record => this.viewEvaluate(_record),
iif: item => item.billStatus == '5', iif: item => item.billStatus == '5',
acl: { ability: ['ORDER-BULK-evaluation'] }, acl: { ability: ['ORDER-BULK-evaluation'] }
}, },
{ {
text: '查看详情', text: '查看详情',
click: (item: any) => { click: (item: any) => {
this.router.navigate(['./bulk-detail', item.id], { relativeTo: this.ar }); this.router.navigate(['./bulk-detail', item.id], { relativeTo: this.ar });
}, },
acl: { ability: ['USERCENTER-FREIGHT-USER-view'] }, acl: { ability: ['USERCENTER-FREIGHT-USER-view'] }
}, },
{ {
text: '变更运费', text: '变更运费',
@ -562,32 +521,36 @@ export class OrderManagementBulkComponent implements OnInit {
const flag = _record.mybidDetailInfo.find((item: any) => item?.expenseCode === 'TRA' && item?.paymentStatus === '4'); const flag = _record.mybidDetailInfo.find((item: any) => item?.expenseCode === 'TRA' && item?.paymentStatus === '4');
return _record.billStatus !== '1' && _record.billStatus !== '6' && !flag; return _record.billStatus !== '1' && _record.billStatus !== '6' && !flag;
}, },
acl: { ability: ['ORDER-BULK-FreightChangeBulkDetail'] }, acl: { ability: ['ORDER-BULK-FreightChangeBulkDetail'] }
}, },
{ {
text: '确认签收', text: '确认签收',
click: _record => this.confirmReceipt(_record), click: _record => this.confirmReceipt(_record),
iif: item => item.billStatus == '4', iif: item => item.billStatus == '4',
acl: { ability: ['VEHICLE-LIST-view'] }, acl: { ability: ['VEHICLE-LIST-view'] }
}, },
{ {
text: '取消订单', text: '取消订单',
click: _record => this.cancellation(_record), click: _record => this.cancellation(_record),
iif: item => iif: item =>
item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '1', item.billStatus == '4' ||
acl: { ability: ['ORDER-BULK-signBulkOrder'] }, item.billStatus == '5' ||
item.billStatus == '2' ||
item.billStatus == '3' ||
item.billStatus == '1',
acl: { ability: ['ORDER-BULK-signBulkOrder'] }
}, },
{ {
text: '申请退款', text: '申请退款',
click: (_record) => this.applyRefund(_record), click: _record => this.applyRefund(_record),
iif: item => item.isApplyForRefund, iif: item => item.isApplyForRefund,
acl: { ability: ['ORDER-VEHICLE-modificationOrder'] }, acl: { ability: ['ORDER-VEHICLE-modificationOrder'] }
}, },
{ {
text: '修改订单', text: '修改订单',
click: _record => this.changeOrder(_record), click: _record => this.changeOrder(_record),
iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3', 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 id: this.changeViewId
}; };
} }
/** tabChange(item: any) {}
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
tabChange(item: any) { }
/**
* 重置表单
*/
resetSF(): void {
this.sf.reset();
this._$expand = false;
}
/** /**
* 导入货源 * 导入货源
*/ */
importGoodsSource() { } importGoodsSource() {}
audit(item: any) { } audit(item: any) {}
/* /*
* 审核关闭弹窗 * 审核关闭弹窗
@ -704,7 +653,7 @@ export class OrderManagementBulkComponent implements OnInit {
/** /**
* 审核通过按钮 * 审核通过按钮
*/ */
handleOK() { } handleOK() {}
OpenPrice(item: any) { OpenPrice(item: any) {
this.changeId = item.id; this.changeId = item.id;
this.isVisible = true; this.isVisible = true;
@ -838,8 +787,8 @@ export class OrderManagementBulkComponent implements OnInit {
this.router.navigate(['order-management/bulk-detailChange', value.id]); this.router.navigate(['order-management/bulk-detailChange', value.id]);
} }
/** /**
*申请退款 *申请退款
*/ */
applyRefund(item: any) { applyRefund(item: any) {
const modalRef = this.modal.create({ const modalRef = this.modal.create({
nzTitle: '申请退款', nzTitle: '申请退款',
@ -852,7 +801,6 @@ export class OrderManagementBulkComponent implements OnInit {
}); });
modalRef.afterClose.subscribe((res: boolean) => { modalRef.afterClose.subscribe((res: boolean) => {
if (res) { if (res) {
this.resetSF;
this.st.load(); this.st.load();
} }
}); });

View File

@ -1,4 +1,4 @@
billCode<!-- <!--
* @Description : * @Description :
* @Version : 1.0 * @Version : 1.0
* @Author : Shiming * @Author : Shiming
@ -9,61 +9,40 @@ billCode<!--
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
<!-- 搜索表单 --> <!-- 搜索表单 -->
<page-header-wrapper [title]="''"> </page-header-wrapper> <!-- <page-header-wrapper [title]="''"> </page-header-wrapper>
<nz-card> <nz-card>
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">
<!-- 查询字段小于或等于3个时不显示伸缩按钮 --> <div nz-col [nzSpan]="_$expand ? 24 : 18">
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4"> <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
<sf </div>
#sf <div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
[schema]="schema" <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="search()" acl
[ui]="ui" [acl-ability]="['ORDER-RECEIPTS-search']">查询</button>
[mode]="'search'" <button nz-button nzType="primary" [disabled]="false" (click)="exprot()">导出</button>
[disabled]="!sf?.valid" <button nz-button [disabled]="false" (click)="resetSF()">重置</button>
[loading]="false" <button nz-button nzType="link" (click)="expandToggle()">
(formSubmit)="st?.load(1)" {{ !_$expand ? '展开' : '收起' }}
(formReset)="resetSF()" <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
></sf> </button>
</div> </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> </div>
</nz-card> </nz-card> -->
<nz-card> <nz-card class="table-box">
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate"> <div class="tab_header">
<nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab> <label class="page_title"> <label class="driver">|</label> 单据审核</label>
<nz-tab [nzTitle]="'待审核(' + tabs?.receivedQuantity + ')'"></nz-tab> <nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'已审核(' + tabs?.stayQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab>
</nz-tabset> <nz-tab [nzTitle]="'待审核(' + tabs?.receivedQuantity + ')'"></nz-tab>
<div style="margin-top: 15px"> <nz-tab [nzTitle]="'已审核(' + tabs?.stayQuantity + ')'"></nz-tab>
<st </nz-tabset>
#st </div>
[bordered]="true"
[scroll]="{ x: '2000px' }" <div>
[data]="service.$api_get_billExamine_page" <st #st [bordered]="true" [scroll]="{ x: '2000px',y:scrollY }" [data]="service.$api_get_billExamine_page"
[columns]="columns" [columns]="columns" [req]="{ process: beforeReq }"
[req]="{ process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}" [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] }" [loading]="false">
[loading]="false"
>
<ng-template st-row="freightPrice" let-item let-index="index"> <ng-template st-row="freightPrice" let-item let-index="index">
{{ item.freightPrice | currency }} {{ item.freightPrice | currency }}
</ng-template> </ng-template>
@ -79,12 +58,13 @@ billCode<!--
</ng-template> </ng-template>
<ng-template st-row="unloadingLadingBillFilePath" let-item let-index="index"> <ng-template st-row="unloadingLadingBillFilePath" let-item let-index="index">
<div class="imgBox"> <div class="imgBox">
<div *ngIf="item.unloadingLadingBillFilePath"> <div *ngIf="item.unloadingLadingBillFilePath">
<app-imagelist style="width: 40px" [imgList]="[item.unloadingLadingBillFilePath]"> </app-imagelist> <app-imagelist style="width: 40px" [imgList]="[item.unloadingLadingBillFilePath]"> </app-imagelist>
</div> </div>
<div *ngIf="item.unloadingPeopleVehiclesGoodsFilePath"> <div *ngIf="item.unloadingPeopleVehiclesGoodsFilePath">
<app-imagelist style="width: 40px" [imgList]="[item.unloadingPeopleVehiclesGoodsFilePath]"> </app-imagelist> <app-imagelist style="width: 40px" [imgList]="[item.unloadingPeopleVehiclesGoodsFilePath]">
</div> </app-imagelist>
</div>
</div> </div>
</ng-template> </ng-template>
<ng-template st-row="loadingTime" let-item let-index="index"> <ng-template st-row="loadingTime" let-item let-index="index">
@ -92,21 +72,26 @@ billCode<!--
<div *ngIf="item?.unloadingTime">卸 | {{ item?.unloadingTime }}</div> <div *ngIf="item?.unloadingTime">卸 | {{ item?.unloadingTime }}</div>
</ng-template> </ng-template>
<ng-template st-row="driverName" let-item let-index="index"> <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>
<ng-template st-row="payeeName" let-item let-index="index"> <ng-template st-row="payeeName" let-item let-index="index">
<div> {{ item?.payeeName }}{{item?.payeePhone ? "/" + item?.payeePhone : '' }} </div> <div> {{ item?.payeeName }}{{item?.payeePhone ? "/" + item?.payeePhone : '' }} </div>
</ng-template> </ng-template>
<ng-template st-row="billCode" let-item let-index="index"> <ng-template st-row="billCode" let-item let-index="index">
<!-- <div>{{ item.billCode }}</div> --> <!-- <div>{{ item.billCode }}</div> -->
<a *ngIf="item.resourceType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{ item.billCode }}</a> <a *ngIf="item.resourceType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{
<a *ngIf="item.resourceType == '2'" [routerLink]="'/order-management/bulk/bulk-detail/' + item.id">{{ item.billCode }}</a> item.billCode }}</a>
<a *ngIf="item.resourceType == '3'" [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> <div>
<span>{{item?.billStatusLabel}}</span> <span>{{item?.billStatusLabel}}</span>
</div> </div>
<div> <div>
<span >{{item?.resourceTypeLabel}}{{item?.serviceTypeLabel === item?.resourceTypeLabel ? '':item?.serviceTypeLabel}}</span> <span>{{item?.resourceTypeLabel}}{{item?.serviceTypeLabel === item?.resourceTypeLabel ?
'':item?.serviceTypeLabel}}</span>
</div> </div>
</ng-template> </ng-template>
<ng-template st-row="goodsName" let-item let-index="index"> <ng-template st-row="goodsName" let-item let-index="index">
@ -131,7 +116,20 @@ billCode<!--
<ng-template #extraTemplate> <ng-template #extraTemplate>
<div> <div>
<button nz-button nzType="primary" (click)="sign('1')" acl [acl-ability]="['ORDER-RECEIPTS-billAuditPassBatch']"> 批量通过 </button> <button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl
<button nz-button nzType="primary" (click)="sign1('1')" acl [acl-ability]="['ORDER-RECEIPTS- electronicBilling']"> 批量生成电子单据 </button> [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> </div>
</ng-template> </ng-template>

View File

@ -1,22 +1,3 @@
p{
:host { margin-bottom: 0
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;
}
}
}
}

View File

@ -8,25 +8,23 @@ import { OrderManagementService } from '../../services/order-management.service'
import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component'; import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component';
import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-receipt.component'; import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-receipt.component';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { ShipperBaseService } from '@shared'; import { SearchDrawerService, ShipperBaseService } from '@shared';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { orderManagementVoucherViewComponent } from '../../modal/audit/voucher-view/voucher-view.component'; import { orderManagementVoucherViewComponent } from '../../modal/audit/voucher-view/voucher-view.component';
import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component';
@Component({ @Component({
selector: 'app-order-management-receipts-audit', selector: 'app-order-management-receipts-audit',
templateUrl: './receipts-audit.component.html', 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 { export class OrderManagementReceiptsAuditComponent extends BasicTableComponent implements OnInit {
ui: SFUISchema = {};
uiView: SFUISchema = {}; uiView: SFUISchema = {};
schema: SFSchema = {};
schemaView: SFSchema = {}; schemaView: SFSchema = {};
auditMany = false; auditMany = false;
isVisibleView = false; isVisibleView = false;
isVisibleEvaluate = false; isVisibleEvaluate = false;
isVisible = false; isVisible = false;
_$expand = false;
@ViewChild('st') private readonly st!: STComponent; @ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sf', { static: false }) sf!: SFComponent;
columns: STColumn[] = []; columns: STColumn[] = [];
@ -41,8 +39,11 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
public service: OrderManagementService, public service: OrderManagementService,
private modal: NzModalService, private modal: NzModalService,
public shipperservice: ShipperBaseService, public shipperservice: ShipperBaseService,
private router: Router private router: Router,
) { } public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
/** /**
* 查询参数 * 查询参数
@ -73,21 +74,21 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
if (this.sf) { if (this.sf) {
Object.assign(requestOptions.body, { Object.assign(requestOptions.body, {
...a, ...a,
...params, ...params,
createTime: { createTime: {
start: this.sf?.value?.createTime?.[0] || '', start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '' end: this.sf?.value?.createTime?.[1] || ''
} }
}); });
} }
this.loading = true; this.loading = true;
return requestOptions; return requestOptions;
}; };
afterRes = (data: any[], rawData?: any) => { afterRes = (data: any[], rawData?: any) => {
console.log(data) console.log(data);
this.loading = false this.loading = false;
return data.map(item => ({ return data.map(item => ({
...item, ...item
// disabled: item.billStatus !== '4' // disabled: item.billStatus !== '4'
})); }));
}; };
@ -105,7 +106,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
totalCount: 0 totalCount: 0
}; };
const params: any = Object.assign({}, this.reqParams || {}); const params: any = Object.assign({}, this.reqParams || {});
delete params.auditStatus delete params.auditStatus;
this.service.request(this.service.$api_get_getAuditStatistical, params).subscribe(res => { this.service.request(this.service.$api_get_getAuditStatistical, params).subscribe(res => {
if (res) { if (res) {
let totalCount = 0; let totalCount = 0;
@ -173,7 +174,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
_$expand: (value: boolean) => value _$expand: (value: boolean) => value
}, },
onSearch: (q: any) => { onSearch: (q: any) => {
let str =q.replace(/^\s+|\s+$/g,""); let str = q.replace(/^\s+|\s+$/g, '');
if (str) { if (str) {
return this.service return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: str }) .request(this.service.$api_enterpriceList, { enterpriseName: str })
@ -196,7 +197,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
placeholder: '请先选择货主', placeholder: '请先选择货主',
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value _$expand: (value: boolean) => value
}, }
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
loadingPlace: { loadingPlace: {
@ -298,12 +299,12 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
loadingDocuments: { loadingDocuments: {
type: 'string', type: 'string',
title: '装卸货凭证', title: '装卸货凭证',
enum:[ enum: [
{label: '全部',value: ''}, { label: '全部', value: '' },
{label: '无装卸货凭证',value: '1'}, { label: '无装卸货凭证', value: '1' },
{label: '装卸货凭证齐全',value: '2'}, { label: '装卸货凭证齐全', value: '2' },
{label: '只有装货凭证',value: '3'}, { label: '只有装货凭证', value: '3' },
{label: '只有卸货凭证',value: '4'}, { label: '只有卸货凭证', value: '4' }
], ],
ui: { ui: {
widget: 'select', widget: 'select',
@ -311,13 +312,12 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
allowClear: true, allowClear: true,
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value _$expand: (value: boolean) => value
}, }
} }
}, }
}, },
type: 'object' type: 'object'
}; };
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
} }
/** /**
@ -397,27 +397,27 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
{ {
text: '生成电子单据', text: '生成电子单据',
click: _record => this.generate(_record, 2), click: _record => this.generate(_record, 2),
iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath, iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath,
acl: { ability: ['ORDER-RECEIPTS-electronicBillingOne'] }, acl: { ability: ['ORDER-RECEIPTS-electronicBillingOne'] }
}, },
{ {
text: '通过', text: '通过',
click: _record => this.sign(_record), click: _record => this.sign(_record),
iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath, iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath,
acl: { ability: ['ORDER-RECEIPTS-billAuditPassBatch'] }, acl: { ability: ['ORDER-RECEIPTS-billAuditPassBatch'] }
}, },
{ {
text: '修改', text: '修改',
click: _record => this.modification(_record), click: _record => this.modification(_record),
iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath, iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath,
acl: { ability: ['ORDER-RECEIPTS-updateBillExamine'] }, acl: { ability: ['ORDER-RECEIPTS-updateBillExamine'] }
}, },
{ {
text: '查看凭证', text: '查看凭证',
click: _record => this.generate(_record, 3), click: _record => this.generate(_record, 3),
iif: item => item?.loadingElectronicsLadingBillFilePath && item?.unloadingElectronicsLadingBillFilePath, 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 { get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length; return Object.keys(this.schema?.properties || {}).length;
} }
/** tabChange(item: any) {}
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
tabChange(item: any) { }
/**
* 重置表单
*/
resetSF(): void {
this.sf.reset();
this._$expand = false;
}
/** /**
* 导入货源 * 导入货源
*/ */
importGoodsSource() { } importGoodsSource() {}
audit(item: any) { } audit(item: any) {}
/** /**
* 审核通过按钮 * 审核通过按钮
*/ */
handleOK() { } handleOK() {}
OpenPrice(item: any) { OpenPrice(item: any) {
this.isVisible = true; this.isVisible = true;
} }
@ -471,7 +457,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
}); });
modalRef.afterClose.subscribe((result: any) => { modalRef.afterClose.subscribe((result: any) => {
this.st.load(1); this.st.load(1);
this.getGoodsSourceStatistical() this.getGoodsSourceStatistical();
}); });
} }
// 生成电子单据 // 生成电子单据
@ -491,31 +477,31 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
nzFooter: null nzFooter: null
}); });
modalRef.afterClose.subscribe((result: any) => { modalRef.afterClose.subscribe((result: any) => {
if(result) { if (result) {
this.st.load(); this.st.load();
this.getGoodsSourceStatistical() this.getGoodsSourceStatistical();
} }
}); });
} }
// 通过 // 通过
sign(item?: any) { sign(item?: any) {
let params: any = [] let params: any = [];
let text = ''; let text = '';
if (item === '1') { if (item === '1') {
if (this.selectedRows.length <= 0) { if (this.selectedRows.length <= 0) {
this.service.msgSrv.error('请选择订单!') this.service.msgSrv.error('请选择订单!');
return return;
} }
this.selectedRows.forEach(ite => { this.selectedRows.forEach(ite => {
params.push(ite.id); params.push(ite.id);
}); });
text = `<b>已选择${this.selectedRows.length}条订单,确认批量通过审核吗?</b>` text = `<b>已选择${this.selectedRows.length}条订单,确认批量通过审核吗?</b>`;
} else { } else {
text = `<b>确认通过审核吗?</b>` text = `<b>确认通过审核吗?</b>`;
params.push(item.id); params.push(item.id);
} }
console.log(this.selectedRows) console.log(this.selectedRows);
console.log(params) console.log(params);
this.modal.confirm({ this.modal.confirm({
nzTitle: text, nzTitle: text,
nzContent: `<b>通过后不可修改,可以再生成电子单据。</b>`, nzContent: `<b>通过后不可修改,可以再生成电子单据。</b>`,
@ -535,8 +521,8 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
// 批量生成电子单据 // 批量生成电子单据
sign1(item?: any) { sign1(item?: any) {
if (this.selectedRows?.length <= 0) { if (this.selectedRows?.length <= 0) {
this.service.msgSrv.error('请选择订单!') this.service.msgSrv.error('请选择订单!');
return return;
} }
let params: any[] = []; let params: any[] = [];
this.selectedRows.forEach(item => { this.selectedRows.forEach(item => {
@ -545,17 +531,16 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
this.modal.confirm({ this.modal.confirm({
nzTitle: `<b>已选择${this.selectedRows.length}条订单,确认批量生成电子单据吗?</b>`, nzTitle: `<b>已选择${this.selectedRows.length}条订单,确认批量生成电子单据吗?</b>`,
nzContent: `<b>确认后单据不可修改,请谨慎操作。</b>`, nzContent: `<b>确认后单据不可修改,请谨慎操作。</b>`,
nzOnOk: () => nzOnOk: () => {
{ this.service.downloadFile(this.service.$api_createBillEsignGoods, params);
this.service.downloadFile(this.service.$api_createBillEsignGoods,params) this.service.msgSrv.success('生成成功!');
this.service.msgSrv.success('生成成功!'); this.st?.reload();
this.st?.reload()
// this.getGoodsSourceStatistical(); // this.getGoodsSourceStatistical();
} }
}) });
} }
// 获取所属项目 // 获取所属项目
getRegionCode(regionCode: any) { getRegionCode(regionCode: any) {
console.log(regionCode); console.log(regionCode);
return this.service return this.service
.request(this.service.$api_get_enterprise_project, { id: regionCode }) .request(this.service.$api_get_enterprise_project, { id: regionCode })
@ -575,8 +560,8 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
// } // }
}); });
} }
// 导出 // 导出
exprot() { exprot() {
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportExamineBillList); this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportExamineBillList);
} }
} }

View File

@ -9,61 +9,42 @@
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
<!-- 搜索表单 --> <!-- 搜索表单 -->
<page-header-wrapper [title]="''"> </page-header-wrapper> <!-- <page-header-wrapper [title]="''"> </page-header-wrapper>
<nz-card> <nz-card>
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">
<!-- 查询字段小于或等于3个时不显示伸缩按钮 --> <div nz-col [nzSpan]="_$expand ? 24 : 18">
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4"> <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
<sf </div>
#sf <div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right">
[schema]="schema" <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="search()" acl
[ui]="ui" [acl-ability]="['ORDER-RISK-search']">查询</button>
[mode]="'search'" <button nz-button nzType="primary" [disabled]="false" (click)="exprot()">导出</button>
[disabled]="!sf?.valid" <button nz-button [disabled]="false" (click)="resetSF()">重置</button>
[loading]="false" <button nz-button nzType="link" (click)="expandToggle()">
(formSubmit)="search()" {{ !_$expand ? '展开' : '收起' }}
(formReset)="resetSF()" <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
></sf> </button>
</div> </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> </div>
</nz-card> </nz-card> -->
<nz-card> <nz-card class="table-box">
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate"> <div class="tab_header">
<nz-tab [nzTitle]="'全部'"></nz-tab> <label class="page_title"> <label class="driver">|</label> 风险单管理</label>
<nz-tab [nzTitle]="'待申诉(' + tabs?.stayQuantity + ')'"></nz-tab> <nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'申诉中(' + tabs?.underwayQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'全部'"></nz-tab>
<nz-tab [nzTitle]="'申诉成功(' + tabs?.receivedQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'申诉(' + tabs?.stayQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'申诉失败(' + tabs?.cancelQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'申诉(' + tabs?.underwayQuantity + ')'"></nz-tab>
</nz-tabset> <nz-tab [nzTitle]="'申诉成功(' + tabs?.receivedQuantity + ')'"></nz-tab>
<div style="margin-top: 15px"> <nz-tab [nzTitle]="'申诉失败(' + tabs?.cancelQuantity + ')'"></nz-tab>
<st </nz-tabset>
#st </div>
[bordered]="true"
[scroll]="{ x: '2000px' }" <div>
[data]="service.$api_get_listRiskPage" <st #st [bordered]="true" [scroll]="{ x: '2000px',y:scrollY }" [data]="service.$api_get_listRiskPage" [columns]="columns"
[columns]="columns"
[req]="{ process: beforeReq }" [req]="{ process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}" [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] }" [loading]="false">
[loading]="false"
>
<!-- <ng-template st-row="billCode" let-item let-index="index"> <!-- <ng-template st-row="billCode" let-item let-index="index">
<a [routerLink]="'/order-management/risk-detail/' + item.id">{{ item.billCode }}</a> <a [routerLink]="'/order-management/risk-detail/' + item.id">{{ item.billCode }}</a>
<div> <div>
@ -75,14 +56,18 @@
</ng-template> --> </ng-template> -->
<ng-template st-row="billCode" let-item let-index="index"> <ng-template st-row="billCode" let-item let-index="index">
<!-- <div>{{ item.billCode }}</div> --> <!-- <div>{{ item.billCode }}</div> -->
<a *ngIf="item.billType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{ item.billCode }}</a> <a *ngIf="item.billType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{
<a *ngIf="item.billType == '2'" [routerLink]="'/order-management/bulk/bulk-detail/' + item.id">{{ item.billCode }}</a> item.billCode }}</a>
<a *ngIf="item.billType == '3'" [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> <div>
<span>{{ item?.representationsStatusLabel }}</span> <span>{{ item?.representationsStatusLabel }}</span>
</div> </div>
<div> <div>
<span >{{item?.billTypeLabel}}{{item?.billTypeLabel === item?.serviceTypeLabel ? '' : item?.serviceTypeLabel}}</span> <span>{{item?.billTypeLabel}}{{item?.billTypeLabel === item?.serviceTypeLabel ? '' :
item?.serviceTypeLabel}}</span>
</div> </div>
</ng-template> </ng-template>
<ng-template st-row="timeer" let-item let-index="index"> <ng-template st-row="timeer" let-item let-index="index">
@ -96,7 +81,8 @@
</div> </div>
</ng-template> </ng-template>
<ng-template st-row="driverName" let-item let-index="index"> <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>
<ng-template st-row="payeeName" let-item> <ng-template st-row="payeeName" let-item>
<div *ngIf="item?.driverId !== item?.payeeId"> <div *ngIf="item?.driverId !== item?.payeeId">
@ -113,7 +99,7 @@
<ng-template st-row="goodsInfoVOList" let-item let-index="index"> <ng-template st-row="goodsInfoVOList" let-item let-index="index">
<div *ngFor="let i of item?.goodsInfoVOList"> <div *ngFor="let i of item?.goodsInfoVOList">
<p>货物名称:{{ i?.goodsName }}</p> <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> <p>车型/车长:{{ i?.carModelLabel }} {{ i?.carLengthLabel ? "/" + i?.carLengthLabel : ''}}</p>
</div> </div>
</ng-template> </ng-template>
@ -121,14 +107,8 @@
</div> </div>
</nz-card> </nz-card>
<nz-modal <nz-modal [(nzVisible)]="isVisibleRE" [nzWidth]="600" [nzFooter]="nzModalFooterview2" (nzOnOk)="handleOK()" nzTitle="审核"
[(nzVisible)]="isVisibleRE" (nzOnCancel)="handleCancel()">
[nzWidth]="600"
[nzFooter]="nzModalFooterview2"
(nzOnOk)="handleOK()"
nzTitle="审核"
(nzOnCancel)="handleCancel()"
>
<ng-container *nzModalContent> <ng-container *nzModalContent>
<sf #sfView [schema]="schemaView" [ui]="uiView" [compact]="true" [button]="'none'"> </sf> <sf #sfView [schema]="schemaView" [ui]="uiView" [compact]="true" [button]="'none'"> </sf>
</ng-container> </ng-container>
@ -139,7 +119,10 @@
</nz-modal> </nz-modal>
<ng-template #extraTemplate> <ng-template #extraTemplate>
<div> <div class="mr-sm">
<button nz-button nzType="primary" (click)="audit()" acl [acl-ability]="['ORDER-RISK-batchAudit']"> 批量审核 </button> <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> </div>
</ng-template> </ng-template>

View File

@ -1,13 +0,0 @@
:host {
p{
margin-bottom: 0
}
.left_btn {
width: 50px;
height: 32px;
padding-left: 8px;
line-height:32px;
background-color: #d7d7d7;
}
}

View File

@ -4,21 +4,20 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st'; import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme'; import { ModalHelper, _HttpClient } from '@delon/theme';
import { ShipperBaseService } from '@shared'; import { SearchDrawerService, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { OrderManagementService } from '../../services/order-management.service'; import { OrderManagementService } from '../../services/order-management.service';
import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component';
@Component({ @Component({
selector: 'app-supply-management-risk', selector: 'app-supply-management-risk',
templateUrl: './risk.component.html', templateUrl: './risk.component.html',
styleUrls: ['./risk.component.less'] styleUrls: ['../../../commom/less/commom-table.less', './risk.component.less']
}) })
export class OrderManagementRiskComponent implements OnInit { export class OrderManagementRiskComponent extends BasicTableComponent implements OnInit {
ui: SFUISchema = {};
uiView: SFUISchema = {}; uiView: SFUISchema = {};
schema: SFSchema = {};
schemaView: SFSchema = {}; schemaView: SFSchema = {};
auditMany = false; auditMany = false;
loading: boolean = true; loading: boolean = true;
@ -26,7 +25,6 @@ export class OrderManagementRiskComponent implements OnInit {
auditIdR: any; auditIdR: any;
isVisibleRE = false; isVisibleRE = false;
resourceStatus: any; resourceStatus: any;
_$expand = false;
@ViewChild('st') private readonly st!: STComponent; @ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sfView', { static: false }) sfView!: SFComponent; @ViewChild('sfView', { static: false }) sfView!: SFComponent;
@ -41,8 +39,11 @@ export class OrderManagementRiskComponent implements OnInit {
public service: OrderManagementService, public service: OrderManagementService,
public shipperservice: ShipperBaseService, public shipperservice: ShipperBaseService,
private modal: NzModalService, 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() { get reqParams() {
const a: any = {}; const a: any = {};
if (this.resourceStatus) { if (this.resourceStatus) {
a.representationsStatus = this.resourceStatus a.representationsStatus = this.resourceStatus;
} }
const params: any = Object.assign({}, this.sf?.value || {}); const params: any = Object.assign({}, this.sf?.value || {});
delete params._$expand; delete params._$expand;
@ -59,14 +60,14 @@ export class OrderManagementRiskComponent implements OnInit {
...params, ...params,
createTime: { createTime: {
start: this.sf?.value?.createTime?.[0] || '', start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '', end: this.sf?.value?.createTime?.[1] || ''
}, }
}; };
} }
beforeReq = (requestOptions: STRequestOptions) => { beforeReq = (requestOptions: STRequestOptions) => {
const a: any = {}; const a: any = {};
if (this.resourceStatus) { if (this.resourceStatus) {
a.representationsStatus = this.resourceStatus a.representationsStatus = this.resourceStatus;
} }
const params: any = Object.assign({}, this.sf?.value || {}); const params: any = Object.assign({}, this.sf?.value || {});
delete params._$expand; delete params._$expand;
@ -76,16 +77,16 @@ export class OrderManagementRiskComponent implements OnInit {
...params, ...params,
createTime: { createTime: {
start: this.sf?.value?.createTime?.[0] || '', start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '', end: this.sf?.value?.createTime?.[1] || ''
}, }
}); });
} }
this.loading = true; this.loading = true;
return requestOptions; return requestOptions;
}; };
afterRes = (data: any[], rawData?: any) => { afterRes = (data: any[], rawData?: any) => {
console.log(data) console.log(data);
this.loading = false this.loading = false;
return data.map(item => ({ return data.map(item => ({
...item, ...item,
disabled: item.representationsStatus !== '2' disabled: item.representationsStatus !== '2'
@ -93,34 +94,34 @@ export class OrderManagementRiskComponent implements OnInit {
}; };
search() { search() {
this.st?.load(1); this.st?.load(1);
this.getGoodsSourceStatistical() this.getGoodsSourceStatistical();
} }
get selectedRows() { get selectedRows() {
return this.st?.list.filter(item => item.checked) || []; return this.st?.list.filter(item => item.checked) || [];
} }
ngOnInit(): void { ngOnInit(): void {
this.getGoodsSourceStatistical() this.getGoodsSourceStatistical();
this.initSF(); this.initSF();
this.initST(); this.initST();
} }
getGoodsSourceStatistical() { getGoodsSourceStatistical() {
this.service.request(this.service.$api_get_listStatisticalStatus, this.reqParams).subscribe(res => { this.service.request(this.service.$api_get_listStatisticalStatus, this.reqParams).subscribe(res => {
if (res) { if (res) {
res.forEach((element: any) => { res.forEach((element: any) => {
console.log(element.representationsStatus); console.log(element.representationsStatus);
if(element.representationsStatus === '1') { if (element.representationsStatus === '1') {
this.tabs.stayQuantity = element.quantity this.tabs.stayQuantity = element.quantity;
} else if (element.representationsStatus == '4') { } else if (element.representationsStatus == '4') {
this.tabs.cancelQuantity = element.quantity this.tabs.cancelQuantity = element.quantity;
} else if (element.representationsStatus == '3') { } else if (element.representationsStatus == '3') {
this.tabs.receivedQuantity = element.quantity this.tabs.receivedQuantity = element.quantity;
}else if (element.representationsStatus == '2') { } else if (element.representationsStatus == '2') {
this.tabs.underwayQuantity = element.quantity this.tabs.underwayQuantity = element.quantity;
} }
}); });
console.log(this.tabs) console.log(this.tabs);
} }
}) });
} }
/** /**
* 初始化查询表单 * 初始化查询表单
@ -146,48 +147,23 @@ export class OrderManagementRiskComponent implements OnInit {
}, },
loadingPlace: { loadingPlace: {
type: 'string', type: 'string',
title: '装货地', title: '装货地'
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
dischargePlace: { dischargePlace: {
type: 'string', type: 'string',
title: '卸货地', title: '卸货地'
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
driverName: { driverName: {
title: '承运司机', title: '承运司机',
type: 'string', type: 'string'
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
carNo: { carNo: {
title: '车牌号', title: '车牌号',
type: 'string', type: 'string'
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
payeeName: { payeeName: {
type: 'string', type: 'string',
title: '车队长', title: '车队长'
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
wayBillType: { wayBillType: {
title: '运单类型', title: '运单类型',
@ -195,10 +171,7 @@ export class OrderManagementRiskComponent implements OnInit {
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'bill:type' }, params: { dictKey: 'bill:type' },
containsAllLabel: true, containsAllLabel: true
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
shipperAppUserName: { shipperAppUserName: {
@ -210,11 +183,8 @@ export class OrderManagementRiskComponent implements OnInit {
searchDebounceTime: 300, searchDebounceTime: 300,
searchLoadingText: '搜索中...', searchLoadingText: '搜索中...',
allowClear: true, allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
},
onSearch: (q: any) => { onSearch: (q: any) => {
let str =q.replace(/^\s+|\s+$/g,""); let str = q.replace(/^\s+|\s+$/g, '');
if (str) { if (str) {
return this.service return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: str }) .request(this.service.$api_enterpriceList, { enterpriseName: str })
@ -223,7 +193,7 @@ export class OrderManagementRiskComponent implements OnInit {
} else { } else {
return of([]); return of([]);
} }
}, }
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
enterpriseInfoId: { enterpriseInfoId: {
@ -233,11 +203,8 @@ export class OrderManagementRiskComponent implements OnInit {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
allowClear: true, allowClear: true,
visibleIf: { asyncData: () => this.shipperservice.getNetworkFreightForwarder()
_$expand: (value: boolean) => value, }
},
asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
},
}, },
createTime: { createTime: {
title: '创建时间', title: '创建时间',
@ -246,16 +213,12 @@ export class OrderManagementRiskComponent implements OnInit {
widget: 'date', widget: 'date',
mode: 'range', mode: 'range',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
allowClear: true, allowClear: true
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFDateWidgetSchema } as SFDateWidgetSchema
} }
}, },
type: 'object' type: 'object'
}; };
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
} }
/** /**
@ -347,14 +310,14 @@ export class OrderManagementRiskComponent implements OnInit {
{ {
text: '审核', text: '审核',
click: _record => this.audit(_record), click: _record => this.audit(_record),
iif: item => item.representationsStatus == '2' , iif: item => item.representationsStatus == '2',
acl: { ability: ['ORDER-RISK-audit'] }, acl: { ability: ['ORDER-RISK-audit'] }
}, },
{ {
text: '详情', text: '详情',
click: _record => this.viewEvaluate(_record), click: _record => this.viewEvaluate(_record),
iif: item => item.representationsStatus !== '1' , iif: item => item.representationsStatus !== '1',
acl: { ability: ['ORDER-RISK-riskDetail'] }, acl: { ability: ['ORDER-RISK-riskDetail'] }
} }
] ]
} }
@ -419,30 +382,10 @@ export class OrderManagementRiskComponent implements OnInit {
this.uiView = { '*': { spanLabelFixed: 110, grid: { span: 24 } } }; 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) { tabChange(item: any) {
console.log(item); console.log(item);
} }
/**
* 重置表单
*/
resetSF(): void {
this.sf.reset();
this._$expand = false;
}
selectChange(e: number) { selectChange(e: number) {
this.resourceStatus = e; 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); idList.push(item.id);
}); });
} else { } else {
idList.push(this.sfView.value.id) idList.push(this.sfView.value.id);
} }
const parms = { const parms = {
ids: idList, ids: idList,
auditRemark: this.sfView.value.representationsCause, auditRemark: this.sfView.value.representationsCause,
representationsStatus: 3, representationsStatus: 3,
auditStatus: 2, auditStatus: 2
}; };
this.service.request(this.service.$api_get_listRisk_audit, parms).subscribe(res => { this.service.request(this.service.$api_get_listRisk_audit, parms).subscribe(res => {
if (res) { if (res) {
this.service.msgSrv.success('审核通过成功!'); this.service.msgSrv.success('审核通过成功!');
this.isVisibleRE = false; this.isVisibleRE = false;
this.st?.load(1); this.st?.load(1);
this.getGoodsSourceStatistical() this.getGoodsSourceStatistical();
} }
}); });
} }
@ -499,7 +442,7 @@ export class OrderManagementRiskComponent implements OnInit {
idList.push(item.id); idList.push(item.id);
}); });
} else { } else {
idList.push(this.sfView.value.id) idList.push(this.sfView.value.id);
} }
if (!this.sfView.value.representationsCause) { if (!this.sfView.value.representationsCause) {
this.service.msgSrv.error('拒绝原因为空!'); this.service.msgSrv.error('拒绝原因为空!');
@ -509,14 +452,14 @@ export class OrderManagementRiskComponent implements OnInit {
ids: idList, ids: idList,
auditRemark: this.sfView.value.representationsCause, auditRemark: this.sfView.value.representationsCause,
representationsStatus: 4, representationsStatus: 4,
auditStatus: 3, auditStatus: 3
}; };
this.service.request(this.service.$api_get_listRisk_audit, parms).subscribe(res => { this.service.request(this.service.$api_get_listRisk_audit, parms).subscribe(res => {
if (res) { if (res) {
this.service.msgSrv.success('审核拒绝成功!'); this.service.msgSrv.success('审核拒绝成功!');
this.isVisibleRE = false; this.isVisibleRE = false;
this.st?.load(1); this.st?.load(1);
this.getGoodsSourceStatistical() this.getGoodsSourceStatistical();
} }
}); });
} }
@ -531,7 +474,7 @@ export class OrderManagementRiskComponent implements OnInit {
this.isVisibleRE = true; this.isVisibleRE = true;
} else { } else {
if (this.selectedRows.length <= 0) { if (this.selectedRows.length <= 0) {
this.service.msgSrv.error('请选择订单!') this.service.msgSrv.error('请选择订单!');
return; return;
} else { } else {
this.initSTAudit(2); this.initSTAudit(2);
@ -545,8 +488,8 @@ export class OrderManagementRiskComponent implements OnInit {
viewEvaluate(item: any) { viewEvaluate(item: any) {
this.router.navigate(['/order-management/risk-detail', item.id]); this.router.navigate(['/order-management/risk-detail', item.id]);
} }
// 导出 // 导出
exprot() { exprot() {
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportRiskBillList); this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportRiskBillList);
} }
} }

View File

@ -31,11 +31,11 @@
</nz-card> --> </nz-card> -->
<nz-card class="table-box"> <nz-card class="table-box">
<div style="display: flex;align-items: center;"> <div class="tab_header">
<label style="font-weight: bold;font-size: 17px;"> <label class="page_title">
<label style="color: #ff4d4f;margin-left: 17px;margin-right: 6px;">|</label> <label class="driver">|</label>
整车订单</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?.totalCount + ')'"></nz-tab>
<nz-tab [nzTitle]="'待接单(' + tabs?.receivedQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'待接单(' + tabs?.receivedQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'待发车(' + tabs?.stayQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'待发车(' + tabs?.stayQuantity + ')'"></nz-tab>
@ -69,7 +69,7 @@
</div> </div>
</ng-template> </ng-template>
<ng-template st-row="createUserName" let-item let-index="index"> <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>
<!-- <ng-template st-row="mybidDetailInfo" let-item let-index="index"> <!-- <ng-template st-row="mybidDetailInfo" let-item let-index="index">
<div *ngIf="item.mybidDetailInfo.length > 0"> <div *ngIf="item.mybidDetailInfo.length > 0">
@ -83,7 +83,8 @@
<div *ngIf="item.mybidDetailInfo.length > 0"> <div *ngIf="item.mybidDetailInfo.length > 0">
<p *ngFor="let data of item.mybidDetailInfo"> <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 | 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> <span *ngIf="data.paymentStatusLabel" style="color: #f59a63">{{ data.paymentStatusLabel }}</span>
</p> </p>
</div> </div>
@ -94,8 +95,10 @@
</div> </div>
</ng-template> </ng-template>
<ng-template st-row="driverName" let-item let-index="index"> <ng-template st-row="driverName" let-item let-index="index">
<div> {{ item?.driverName }}{{ item?.driverPhone ? '/' + item?.driverPhone : '' }}{{ item?.carNo ? '/' + item?.carNo : '' }} </div><br /> <div> {{ item?.driverName }}{{ item?.driverPhone ? '/' + item?.driverPhone : '' }}{{ item?.carNo ? '/' +
<div *ngIf="item.payeeName !== item.driverName">车队长: {{ item?.payeeName ? item?.payeeName + '/' : ''}}{{ item?.payeePhone }} </div> item?.carNo : '' }} </div><br />
<div *ngIf="item.payeeName !== item.driverName">车队长: {{ item?.payeeName ? item?.payeeName + '/' : ''}}{{
item?.payeePhone }} </div>
</ng-template> </ng-template>
<ng-template st-row="loadingTime" let-item let-index="index"> <ng-template st-row="loadingTime" let-item let-index="index">
@ -177,35 +180,31 @@
</ng-template> </ng-template>
</nz-modal> </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> <ng-template #extraTemplate>
<div> <div class="mr-sm">
<button nz-button nzType="primary" (click)="modifyRate()" acl <button nz-button nzDanger (click)="openDrawer()" class="mr-sm">筛选</button>
[acl-ability]="['ORDER-VEHICLE-modificationAdditional']"> 修改附加费率 </button> <button nz-button nzDanger [disabled]="loading" (click)="exprot()">导出</button>
<button nz-button nzType="primary" (click)="modifyFreightPeople()" acl <button nz-button nz-dropdown [nzDropdownMenu]="menu" nzPlacement="bottomLeft">
[acl-ability]="['ORDER-VEHICLE-modificationNetworkFreight']"> 修改网络货运人 </button> 更多<i nz-icon nzType="down" nzTheme="outline"></i></button>
<button nz-button nzType="primary" (click)="modifycaptain()" acl <nz-dropdown-menu #menu="nzDropdownMenu">
[acl-ability]="['ORDER-VEHICLE-modificationCarCaptain']"> 修改车队长 </button> <ul nz-menu>
<button *ngIf="resourceStatus == 4" nz-button nzType="primary" nzGhost nz-popconfirm [nzPopconfirmTitle]="enable" <li nz-menu-item acl [acl-ability]="['ORDER-VEHICLE-modificationAdditional']" (click)="modifyRate()">
(nzOnConfirm)="userAction()" nzPopconfirmPlacement="bottomRight" acl 修改附加费率
[acl-ability]="['ORDER-VEHICLE-batchSignWholeOrder']"> </li>
批量签收 <li nz-menu-item acl [acl-ability]="['ORDER-VEHICLE-modificationNetworkFreight']"
</button> (click)="modifyFreightPeople()">
<button nz-button nzType="primary" [disabled]="loading" (click)="exprot()">导出</button> 修改网络货运人
<button nz-button nzType="primary" (click)="visible=true;" class="mr-sm">筛选</button> </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> </div>
</ng-template> </ng-template>
<ng-template #enable> <ng-template #enable>

View File

@ -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 { Router, ActivatedRoute } from '@angular/router';
import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st'; import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ShipperBaseService } from '@shared'; import { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal'; 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 { debounceTime, map } from 'rxjs/operators';
import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component'; 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 { OneCarOrderCancelConfirmComponent } from '../../modal/vehicle/cancel-confirm/cancel-confirm.component';
import { VehicleConfirReceiptComponent } from '../../modal/vehicle/confir-receipt/confir-receipt.component'; import { VehicleConfirReceiptComponent } from '../../modal/vehicle/confir-receipt/confir-receipt.component';
import { VehicleFreightPeopleComponent } from '../../modal/vehicle/freight-people/freight-people.component'; import { VehicleFreightPeopleComponent } from '../../modal/vehicle/freight-people/freight-people.component';
@ -19,11 +20,9 @@ import { OrderManagementService } from '../../services/order-management.service'
@Component({ @Component({
selector: 'app-supply-management-vehicle', selector: 'app-supply-management-vehicle',
templateUrl: './vehicle.component.html', 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 { export class OrderManagementVehicleComponent extends BasicTableComponent implements OnInit {
ui: SFUISchema = {};
schema: SFSchema = {};
auditMany = false; auditMany = false;
isVisibleView = false; isVisibleView = false;
isVisibleEvaluate = false; isVisibleEvaluate = false;
@ -39,7 +38,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
@ViewChild('st') private readonly st!: STComponent; @ViewChild('st') private readonly st!: STComponent;
@ViewChild('stFloat') private readonly stFloat!: STComponent; @ViewChild('stFloat') private readonly stFloat!: STComponent;
@ViewChild('stFloatView') private readonly stFloatView!: STComponent; @ViewChild('stFloatView') private readonly stFloatView!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent; @ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
columns: STColumn[] = []; columns: STColumn[] = [];
columnsFloat: STColumn[] = []; columnsFloat: STColumn[] = [];
@ -56,7 +54,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
two: '2', two: '2',
three: '2', three: '2',
id: 2 id: 2
}, }
]; ];
tabs = { tabs = {
cancelQuantity: 0, cancelQuantity: 0,
@ -69,15 +67,15 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
}; };
resourceStatus: any; resourceStatus: any;
visible = false;
constructor( constructor(
public service: OrderManagementService, public service: OrderManagementService,
private modal: NzModalService, private modal: NzModalService,
public shipperservice: ShipperBaseService, public shipperservice: ShipperBaseService,
public router: Router, 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) { if (this.resourceStatus) {
a.billStatus = 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; delete params._$expand;
return { return {
...a, ...a,
...params, ...params
}; };
} }
beforeReq = (requestOptions: STRequestOptions) => { beforeReq = (requestOptions: STRequestOptions) => {
@ -110,13 +108,13 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
if (this.resourceStatus) { if (this.resourceStatus) {
a.billStatus = 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; delete params._$expand;
this.paramsList = params this.paramsList = params;
Object.assign(requestOptions.body, { Object.assign(requestOptions.body, {
...a, ...a,
...this.paramsList, ...this.paramsList
}); });
this.loading = true; this.loading = true;
return requestOptions; return requestOptions;
}; };
@ -197,7 +195,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
type: 'string', type: 'string',
title: '运单号', title: '运单号',
ui: { ui: {
placeholder: '最多100个单号空号隔开', placeholder: '最多100个单号空号隔开'
} }
}, },
resourceCode: { resourceCode: {
@ -234,7 +232,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
title: '所属项目', title: '所属项目',
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请先选择货主', placeholder: '请先选择货主'
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
loadingPlace: { loadingPlace: {
@ -284,7 +282,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
createTime: { createTime: {
type: 'string', type: 'string',
title: '创建时间', 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: { riskStatus: {
type: 'string', type: 'string',
@ -342,7 +340,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
}, },
type: 'object' type: 'object'
}; };
this.ui = { '*': { spanLabelFixed: 95, grid: { span: 24, gutter: 4 } } };
} }
/** /**
@ -416,11 +413,12 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
text: '运费变更记录', text: '运费变更记录',
click: _record => this.OpenPrice(_record), click: _record => this.OpenPrice(_record),
iif: item => iif: item =>
item.billStatus == '4' || item.billType !== '3' &&
item.billStatus == '5' || (item.billStatus == '4' ||
item.billStatus == '2' || item.billStatus == '5' ||
item.billStatus == '3' || item.billStatus == '2' ||
item.billStatus == '6', item.billStatus == '3' ||
item.billStatus == '6'),
acl: { ability: ['ORDER-VEHICLE-ChangeApplyList'] } acl: { ability: ['ORDER-VEHICLE-ChangeApplyList'] }
}, },
// { // {
@ -439,7 +437,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
{ {
text: '变更运费', text: '变更运费',
click: _record => this.updateFreight(_record), 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'] } acl: { ability: ['ORDER-VEHICLE-FreightChangeWholeDetail'] }
}, },
{ {
@ -558,23 +556,9 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
get queryFieldCount(): number { get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length; return Object.keys(this.schema?.properties || {}).length;
} }
/**
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
tabChange(item: any) { tabChange(item: any) {
console.log(item); console.log(item);
} }
/**
* 重置表单
*/
resetSF(): void {
this.sf.reset();
this._$expand = false;
}
selectChange(e: number) { selectChange(e: number) {
this.resourceStatus = e; this.resourceStatus = e;
this.initST(); this.initST();
@ -769,7 +753,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
}); });
modalRef.afterClose.subscribe((res: boolean) => { modalRef.afterClose.subscribe((res: boolean) => {
if (res) { if (res) {
this.resetSF;
this.st.load(); this.st.load();
this.getGoodsSourceStatistical(); this.getGoodsSourceStatistical();
} }
@ -847,7 +830,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
}); });
modalRef.afterClose.subscribe((res: boolean) => { modalRef.afterClose.subscribe((res: boolean) => {
if (res) { if (res) {
this.resetSF;
this.st.load(); this.st.load();
} }
}); });
@ -870,8 +852,8 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
} }
}); });
} }
// 导出 // 导出
exprot() { exprot() {
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportWholeList); this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportWholeList);
} }
} }

View File

@ -16,6 +16,7 @@ export class ParterChannelSalesEditComponent implements OnInit {
schema!: SFSchema; schema!: SFSchema;
ui!: SFUISchema; ui!: SFUISchema;
i: any; i: any;
sts: any;
type: any; type: any;
record:any; record:any;
currentOAItem:any; currentOAItem:any;
@ -29,13 +30,15 @@ export class ParterChannelSalesEditComponent implements OnInit {
) {} ) {}
ngOnInit(): void { ngOnInit(): void {
if(!this.sts) {
this.service.request(this.service.$api_getChannelSalesInfo, {id:this.i?.id}).subscribe(res => { this.service.request(this.service.$api_getChannelSalesInfo, {id:this.i?.id}).subscribe(res => {
if(res){ if(res){
this.record = res; this.record = res;
} this.initSF();
this.initSF(); }
}); });
}
this.initSF();
} }
initSF() { initSF() {

View File

@ -112,6 +112,7 @@ export class ParterChannelSalesListComponent implements OnInit {
nzWidth:600, nzWidth:600,
nzTitle: '新增', nzTitle: '新增',
nzContent: ParterChannelSalesEditComponent, nzContent: ParterChannelSalesEditComponent,
nzComponentParams: {sts: 'add'}
}); });
modalRef.afterClose.subscribe(res => { modalRef.afterClose.subscribe(res => {
if (res) { if (res) {

View File

@ -21,7 +21,7 @@ export class ParterLevelConfigListComponent implements OnInit {
sf!: SFComponent; sf!: SFComponent;
spuStatus = '1'; spuStatus = '1';
data=[{name1:1111}] data = [{ name1: 1111 }];
constructor( constructor(
public router: Router, public router: Router,
public ar: ActivatedRoute, public ar: ActivatedRoute,
@ -45,21 +45,25 @@ export class ParterLevelConfigListComponent implements OnInit {
properties: { properties: {
gradeName: { gradeName: {
type: 'string', type: 'string',
title: '等级姓名', title: '等级姓名'
}, },
stateLocked: { stateLocked: {
type: 'string', type: 'string',
title: '状态', title: '状态',
enum:[{label:'启用',value:'1'},{label:'禁用',value:'0'}], enum: [
ui:{ { label: '全部', value: '' },
widget:'select', { label: '启用', value: '1' },
{ label: '禁用', value: '0' }
],
ui: {
widget: 'select'
} }
}, }
} }
}; };
this.ui = { this.ui = {
'*': { '*': {
width:300, width: 300,
grid: { span: 12, gutter: 4 } grid: { span: 12, gutter: 4 }
} }
}; };
@ -79,6 +83,10 @@ export class ParterLevelConfigListComponent implements OnInit {
title: '创建时间', title: '创建时间',
index: 'createTime' index: 'createTime'
}, },
{
title: '排序',
index: 'sortId'
},
{ {
title: '启用时间', title: '启用时间',
index: 'enableTime' index: 'enableTime'
@ -87,7 +95,7 @@ export class ParterLevelConfigListComponent implements OnInit {
title: '状态', title: '状态',
index: 'stateLocked', index: 'stateLocked',
format: (item: any) => { format: (item: any) => {
return item.stateLocked ? '用':'用' return item.stateLocked ? '用' : '用';
} }
}, },
{ {
@ -96,17 +104,17 @@ export class ParterLevelConfigListComponent implements OnInit {
buttons: [ buttons: [
{ {
text: '编辑', text: '编辑',
click: (_record, _modal, _instance) => this.edit(_record), click: (_record, _modal, _instance) => this.edit(_record)
}, },
{ {
text: '禁用', text: '禁用',
click: (_record, _modal, _instance) => this.stop(_record), click: (_record, _modal, _instance) => this.stop(_record),
iif:(item)=>!item.stateLocked iif: item => !item.stateLocked
}, },
{ {
text: '启用', text: '启用',
click: (_record, _modal, _instance) => this.restart(_record), 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() { add() {
const modalRef = this.modalService.create({ const modalRef = this.modalService.create({
nzWidth:500, nzWidth: 500,
nzTitle: '新增', nzTitle: '新增',
nzContent: ParterLevelConfigEditComponent, nzContent: ParterLevelConfigEditComponent,
nzComponentParams: { type: this.spuStatus } nzComponentParams: { type: this.spuStatus }
@ -130,7 +138,7 @@ export class ParterLevelConfigListComponent implements OnInit {
// 编辑 // 编辑
edit(record: STData) { edit(record: STData) {
const modalRef = this.modalService.create({ const modalRef = this.modalService.create({
nzWidth:500, nzWidth: 500,
nzTitle: '编辑', nzTitle: '编辑',
nzContent: ParterLevelConfigEditComponent, nzContent: ParterLevelConfigEditComponent,
nzComponentParams: { i: record, type: this.spuStatus } 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({ const modalRef = this.modalService.create({
nzTitle: '查看', nzTitle: '查看',
nzContent: ParterLevelConfigEditComponent, nzContent: ParterLevelConfigEditComponent,
@ -156,7 +164,7 @@ export class ParterLevelConfigListComponent implements OnInit {
nzTitle: '<i>启用确认</i>', nzTitle: '<i>启用确认</i>',
nzContent: `<b>确定启用该账号吗?</br>`, nzContent: `<b>确定启用该账号吗?</br>`,
nzOnOk: () => 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) { if (res) {
this.service.msgSrv.success('启用成功!'); this.service.msgSrv.success('启用成功!');
this.st.reload(); this.st.reload();
@ -169,7 +177,7 @@ export class ParterLevelConfigListComponent implements OnInit {
nzTitle: '<i>禁用确认</i>', nzTitle: '<i>禁用确认</i>',
nzContent: `<b>确定禁用该账号吗?</br>`, nzContent: `<b>确定禁用该账号吗?</br>`,
nzOnOk: () => 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) { if (res) {
this.service.msgSrv.success('禁用成功!'); this.service.msgSrv.success('禁用成功!');
this.st.reload(); this.st.reload();
@ -185,6 +193,4 @@ export class ParterLevelConfigListComponent implements OnInit {
this.sf.reset(); this.sf.reset();
this.st.load(1); this.st.load(1);
} }
} }

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-02-24 20:09:49 * @Date : 2022-02-24 20:09:49
* @LastEditors : Shiming * @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 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->

View File

@ -8,16 +8,14 @@
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
import { ModalHelper } from '@delon/theme';
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; import { SFComponent, SFSchema } from '@delon/form';
import { processSingleSort, ShipperBaseService } from '@shared'; import { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { RebateManagementService } from '../../../services/rebate-management.service'; import { RebateManagementService } from '../../../services/rebate-management.service';
import { ParterRebateManageMentAddPartnerListComponent } from '../add-partnerlist/add-partnerlist.component'; import { ParterRebateManageMentAddPartnerListComponent } from '../add-partnerlist/add-partnerlist.component';
import { inRange } from '@delon/util';
@Component({ @Component({
selector: 'app-parter-channel-rebate-management-add', selector: 'app-parter-channel-rebate-management-add',
styleUrls: ['./add.component.less'], styleUrls: ['./add.component.less'],
@ -35,7 +33,7 @@ export class ParterRebateManageMentAddComponent implements OnInit {
partnerPeopleList: any = []; partnerPeopleList: any = [];
configType = '1'; configType = '1';
precision = 2; precision = 2;
partnerId :Array<string> =[]; partnerId: Array<string> = [];
inputValue = ''; inputValue = '';
@ViewChild('st', { static: true }) @ViewChild('st', { static: true })
st!: STComponent; st!: STComponent;
@ -59,15 +57,17 @@ export class ParterRebateManageMentAddComponent implements OnInit {
{ title: '手机号', index: 'contactMobile', className: 'text-center', width: 150 }, { title: '手机号', index: 'contactMobile', className: 'text-center', width: 150 },
{ title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } }, { title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } },
{ {
title: '操作', width: '90px', fixed: 'right', title: '操作',
width: '90px',
fixed: 'right',
buttons: [ buttons: [
{ {
text: '移除', text: '移除',
click: _record => this.delete(_record), click: _record => this.delete(_record),
acl: { ability: ['AbnormalAppear-reply'] } acl: { ability: ['AbnormalAppear-reply'] }
}, }
] ]
}, }
]; ];
initSF(data?: any) { initSF(data?: any) {
this.schema1 = { this.schema1 = {
@ -79,16 +79,16 @@ export class ParterRebateManageMentAddComponent implements OnInit {
widget: 'tinymce', widget: 'tinymce',
loadingTip: 'loading...', loadingTip: 'loading...',
config: { config: {
height: 500, height: 500
} }
}, }
// default: data?.agreementContent || '' // default: data?.agreementContent || ''
} }
} }
}; };
} }
ngOnInit() { ngOnInit() {
this.addStatus =false this.addStatus = false;
this.initSF(); this.initSF();
} }
goBack() { goBack() {
@ -97,64 +97,64 @@ export class ParterRebateManageMentAddComponent implements OnInit {
/** /**
*合伙人选择 *合伙人选择
*/ */
add(item?: any) { add(item?: any) {
const modalRef = this.modal.create({ const modalRef = this.modal.create({
nzTitle: '合伙人选择', nzTitle: '合伙人选择',
nzWidth: 1000, nzWidth: 1000,
nzContent: ParterRebateManageMentAddPartnerListComponent, nzContent: ParterRebateManageMentAddPartnerListComponent,
nzComponentParams: { nzComponentParams: {
i: item, i: item
}, },
nzFooter: null nzFooter: null
}); });
modalRef.afterClose.subscribe((res: any) => { modalRef.afterClose.subscribe((res: any) => {
this.partnerId = []; this.partnerId = [];
if (res) { if (res) {
if(Array.isArray(res)) { if (Array.isArray(res)) {
console.log(res); console.log(res);
console.log(this.partnerPeopleList); console.log(this.partnerPeopleList);
this.partnerPeopleList = this.partnerPeopleList.concat(res); this.partnerPeopleList = this.partnerPeopleList.concat(res);
res.forEach((ele: any) => { res.forEach((ele: any) => {
this.partnerId.push(ele?.id); this.partnerId.push(ele?.id);
}) });
} else { } else {
console.log(res); console.log(res);
this.partnerPeopleList = this.partnerPeopleList.concat(res); this.partnerPeopleList = this.partnerPeopleList.concat(res);
this.partnerId.push(res?.id); this.partnerId.push(res?.id);
} }
} }
}); });
} }
delete(item: any) { delete(item: any) {
this.partnerPeopleList = this.partnerPeopleList.filter((d:any, i: any) => { this.partnerPeopleList = this.partnerPeopleList.filter((d: any, i: any) => {
return item.id != d.id return item.id != d.id;
}); });
} }
save () { save() {
const params = { const params = {
accountingRate: this.accountingRate, accountingRate: this.accountingRate,
configName: this.configName, configName: this.configName,
configType: this.configType, configType: this.configType,
rebateConfigLineDTO: this.table.data, rebateConfigLineDTO: this.table.data,
priority: this.priority,// 优先级 priority: this.priority, // 优先级
partnerId: this.partnerId.join(','), partnerId: this.partnerId.join(','),
ruleDescription: this.sf.value.ruleDescription, ruleDescription: this.sf.value.ruleDescription,
remarke: this.remarke, remarke: this.remarke,
partnerType: this.partnerType partnerType: this.partnerType
} };
console.log(params); console.log(params);
this.service.request(this.service.$api_save_rebateConfig, params).subscribe((res: any) => { this.service.request(this.service.$api_save_rebateConfig, params).subscribe((res: any) => {
if(res) { if (res) {
console.log(res); console.log(res);
this.service.msgSrv.success('新增成功!') this.service.msgSrv.success('新增成功!');
this.router.navigate(['/partner/rebate/setting']) this.router.navigate(['/partner/rebate/setting']);
} }
}) });
} }
changePartner(value: any) { changePartner(value: any) {
console.log(value); console.log(value);
if(value) { if (value) {
this.addStatus = true this.addStatus = true;
} }
} }
} }

View File

@ -335,7 +335,7 @@ export class SupplyManagementBulkComponent implements OnInit {
{ {
text: '二维码', text: '二维码',
click: _record => this.assignedQrcode(_record), 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: '修改单价', text: '修改单价',

View File

@ -2,6 +2,7 @@
<nz-card> <nz-card>
<div class="filter-wrap"> <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> <button nz-button nzType="primary" (click)="open()"><i nz-icon nzType="plus" nzTheme="outline"></i>筛选</button>
</div> </div>
<st #st [data]="this.service.$api_smsTemplate_page " [columns]="columns" [req]="{ process: beforeReq }" <st #st [data]="this.service.$api_smsTemplate_page " [columns]="columns" [req]="{ process: beforeReq }"
@ -23,7 +24,7 @@
</ng-template> </ng-template>
</nz-drawer> </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> <ng-container *nzModalContent>
<sf #sfEdit [formData]="tempData" [schema]="editSchema" [ui]="{ '*': { spanLabelFixed: 90,grid: { span: 24 } }}" [compact]="true" <sf #sfEdit [formData]="tempData" [schema]="editSchema" [ui]="{ '*': { spanLabelFixed: 90,grid: { span: 24 } }}" [compact]="true"
[button]="'none'"></sf> [button]="'none'"></sf>

View File

@ -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 { ActivatedRoute } from '@angular/router';
import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st'; import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFSchema } from '@delon/form'; import { SFComponent, SFSchema } from '@delon/form';
@ -18,12 +18,19 @@ export class SmsTemplateComponent implements OnInit {
sf!: SFComponent; sf!: SFComponent;
@ViewChild('sfEdit', { static: false }) @ViewChild('sfEdit', { static: false })
sfEdit!: SFComponent; sfEdit!: SFComponent;
editSchema!: SFSchema;
visible = false; visible = false;
isVisible = false; isVisible = false;
tempData = {}; tempData = {};
isEdit = false;
searchSchema: SFSchema = { searchSchema: SFSchema = {
properties: { properties: {
templateName: {
type: 'string',
title: '模板名称',
ui: { placeholder: '请输入模板名称' }
},
templateCode: { templateCode: {
type: 'string', type: 'string',
title: '模板编码', title: '模板编码',
@ -37,27 +44,32 @@ export class SmsTemplateComponent implements OnInit {
} }
}; };
editSchema: SFSchema = { initSF() {
properties: { this.editSchema = {
templateCode: { properties: {
type: 'string', templateName: {
title: '模板编码', type: 'string',
ui: { placeholder: '请输入模板编码' } 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: { required: ['templateName','templateCode','templateContent']
type: 'string',
title: '模板内容',
ui: { placeholder: '请输入模板内容' }
},
templateName: {
type: 'string',
title: '模板名称',
ui: { placeholder: '请输入模板名称' }
}
} }
} }
columns: STColumn[] = [ columns: STColumn[] = [
{ title: '模板名称', className: 'text-center', index: 'templateName' },
{ title: '模板编码', className: 'text-center', index: 'templateCode' }, { title: '模板编码', className: 'text-center', index: 'templateCode' },
{ title: '模板内容', className: 'text-center', index: 'templateContent' }, { 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) { constructor(public service: SystemService, private nzModalService: NzModalService, private route: ActivatedRoute) {
} }
ngOnInit(): void { } ngOnInit(): void {
this.initSF();
}
beforeReq = (requestOptions: STRequestOptions) => { beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) { if (this.sf) {
@ -94,6 +108,9 @@ export class SmsTemplateComponent implements OnInit {
edit(item: any) { edit(item: any) {
// console.log(item); // console.log(item);
this.isEdit = true;
this.editSchema!.properties!.templateCode.readOnly = true;
this.sfEdit?.refreshSchema();
this.tempData = item; this.tempData = item;
this.isVisible = true; this.isVisible = true;
} }
@ -111,9 +128,17 @@ export class SmsTemplateComponent implements OnInit {
this.visible = false; this.visible = false;
} }
add() {
this.isEdit = false;
this.editSchema!.properties!.templateCode.readOnly = false;
this.sfEdit?.refreshSchema();
this.tempData = {};
this.isVisible = true;
}
handleOk(): void { handleOk(): void {
const value = this.sfEdit.value; const value = this.sfEdit.value;
const { id, templateCode, templateName, templateContent } = value const { id, templateCode, templateName, templateContent } = value;
const params = { const params = {
id, id,
templateCode, templateCode,

View File

@ -9,7 +9,7 @@
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand"> <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 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)="resetSF()">导出</button> <button nz-button (click)="export()">导出</button>
<button nz-button nzType="link" (click)="expandToggle()"> <button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }} {{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
@ -27,25 +27,20 @@
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10,20, 50, 100] }" [loading]="service.http.loading"> [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> --> <!-- <a (click)="viewAuditResult(item)" *ngIf="item?.billStatus === '2'">{{item?.billStatusLabel}}</a> -->
<span *ngIf="item?.uploadSts == '1'">待上传</span> <span *ngIf="item?.uploadSts == '1'">待上传</span>
<span *ngIf="item?.uploadSts == '3'">已上传</span> <span *ngIf="item?.uploadSts == '3'">已上传</span>
<span *ngIf="item?.uploadSts == '2'">上传中</span> <span *ngIf="item?.uploadSts == '2'">上传中</span>
<span *ngIf="item?.uploadSts == '4'" style="color: red;" (click)="unnormal(item)">上传异常</span> <span *ngIf="item?.uploadSts == '4'" style="color: red;" (click)="unnormal(item)">上传异常</span>
</ng-template> </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"> <ng-template st-row="invoiceType" let-item let-index="index">
<span>增值税专用发票</span> <span>增值税专用发票</span>
</ng-template> </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"> <ng-template st-row="orderAmount" let-item let-index="index">
<div class="text-right">{{item?.orderAmount | currency }}</div> <div class="text-right">{{item?.orderAmount | currency }}</div>
</ng-template> </ng-template>
@ -58,6 +53,6 @@
<strong class="text-red">{{ selectedRows.length }}</strong> 条数据 <strong class="text-red">{{ selectedRows.length }}</strong> 条数据
</div> </div>
<button *ngIf="selectedIndex === '1' || selectedIndex === '4'" nz-button nzType="primary" (click)="upload()">上传</button> <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> </div>
</ng-template> </ng-template>

View File

@ -27,7 +27,7 @@ export class TaxManagementInvoiceReportingComponent implements OnInit {
{ name: '异常', value: '4' }, { name: '异常', value: '4' },
{ name: '全部', value: '' } { name: '全部', value: '' }
]; ];
selectedIndex = ''; //选择的项目 selectedIndex = '1'; //选择的项目
serviceTel = ''; serviceTel = '';
constructor( constructor(
public service: TaxManagementService, public service: TaxManagementService,
@ -50,7 +50,7 @@ export class TaxManagementInvoiceReportingComponent implements OnInit {
* 查询参数 * 查询参数
*/ */
get reqParams() { get reqParams() {
const params = Object.assign({}, this.sf?.value || {}); const params = Object.assign({}, this.sf?.value || {}, { uploadSts: this.selectedIndex });
delete params._$expand; delete params._$expand;
return { ...params }; return { ...params };
} }
@ -213,9 +213,12 @@ export class TaxManagementInvoiceReportingComponent implements OnInit {
{ {
title: '发票号码', title: '发票号码',
index: 'invoiceno', index: 'invoiceno',
render: 'invoiceNO',
className: 'text-center', className: 'text-center',
width: '150px', 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', }, { title: '发票代码', index: 'invoiceno2', className: 'text-center', width: '150px', },
{ {
@ -224,14 +227,24 @@ export class TaxManagementInvoiceReportingComponent implements OnInit {
className: 'text-center', className: 'text-center',
width: '180px', 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: '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: 'goodsinfo', className: 'text-center', width: '180px' },
{ title: '价税合计', index: 'vatmoney', className: 'text-center', width: '180px' }, { title: '价税合计', index: 'vatmoney', className: 'text-center', width: '180px' },
{ title: '开票日期', index: 'invoicedate', className: 'text-center', width: '180px' }, { title: '开票日期', index: 'invoicedate', className: 'text-center', width: '180px' },
{ title: '发票所属月份', index: 'invoicemonth', className: 'text-center', width: '250px' }, { 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' }, { title: '上传日期', index: 'uoloadDate', className: 'text-center', width: '200px' },
]; ];
} }
@ -247,17 +260,18 @@ export class TaxManagementInvoiceReportingComponent implements OnInit {
this.openWainingModal('请选择需要撤回的数据'); this.openWainingModal('请选择需要撤回的数据');
return; return;
} }
let params: any[] = []; let ids: any[] = [];
this.selectedRows.forEach(item => { this.selectedRows.forEach(item => {
params.push(item.id); ids.push(item.id);
}); });
this.modal.confirm({ this.modal.confirm({
nzTitle: '撤回提示', nzTitle: '撤回提示',
nzContent: ' 撤回后可以重新上传,重新上传会覆盖已上传数据,确定要撤回?', nzContent: ' 撤回后可以重新上传,重新上传会覆盖已上传数据,确定要撤回?',
nzOkText: '确定', nzOkText: '确定',
nzCancelText: '取消', nzCancelText: '取消',
nzOnOk: () => { 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) { if (res) {
this.service.msgSrv.success('撤销成功'); this.service.msgSrv.success('撤销成功');
this.search(); this.search();
@ -322,6 +336,8 @@ export class TaxManagementInvoiceReportingComponent implements OnInit {
console.log(item); console.log(item);
this.selectedIndex = item?.value || ''; this.selectedIndex = item?.value || '';
console.log(this.selectedIndex);
setTimeout(() => { setTimeout(() => {
this.st.load(); this.st.load();
}) })
@ -380,7 +396,7 @@ export class TaxManagementInvoiceReportingComponent implements OnInit {
* 异步导出 * 异步导出
*/ */
export() { 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 = '提示') { openWainingModal(content: string, title = '提示') {

View File

@ -56,7 +56,12 @@ export class TaxManagementService extends ShipperBaseService {
$api_async_export_order_reporting_list = ``; // 导出订单上报 $api_async_export_order_reporting_list = ``; // 导出订单上报
$api_get_upload_setting = ``; // 修改上传设置 $api_get_upload_setting = ``; // 修改上传设置
$api_upload_setting_save = ``; // 修改上传设置 $api_upload_setting_save = ``; // 修改上传设置
// 获取发票上传列表
$api_getInvoiceReport_page = '/api/sdc/invoiceUploadInfo/list/page'; $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) { constructor(public injector: Injector) {
super(injector); super(injector);
} }

View File

@ -28,7 +28,7 @@ export class ExpressInfoComponent implements OnInit {
} }
}, },
createTime: { createTime: {
title: '创建时间', title: '下单时间',
type: 'string', type: 'string',
ui: { ui: {
widget: 'sl-from-to-search', widget: 'sl-from-to-search',
@ -87,9 +87,9 @@ export class ExpressInfoComponent implements OnInit {
if (this.sf) { if (this.sf) {
Object.assign(requestOptions.body, { Object.assign(requestOptions.body, {
...this.sf.value, ...this.sf.value,
createtime: { createTime: {
start: this.sf.value.createtime?.[0] || null, start: this.sf.value.createTime?.[0] || '',
end: this.sf.value.createtime?.[1] || null end: this.sf.value.createTime?.[1] || ''
} }
}); });
} }

View File

@ -172,9 +172,15 @@ export class InvoiceDetailComponent implements OnInit {
title: '所属项目', title: '所属项目',
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', serverSearch: true,
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
allowClear: true, 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: '' default: ''
} }

View File

@ -284,10 +284,14 @@ export class InvoiceRequestedDetailComponent implements OnInit {
default: '', default: '',
ui: { ui: {
widget: 'select', widget: 'select',
serverSearch: true,
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
allowClear: true,
onSearch: (q: any) => this.service.getProjectList({ projectName: q, enterpriseId: this.headerInfo?.shipperId }),
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
}, }
asyncData: () => this.service.getEnterpriseProject()
} }
} }
} }

View File

@ -258,6 +258,22 @@ export class InvoicedListComponent implements OnInit {
expand: (value: boolean) => value expand: (value: boolean) => value
} }
} }
},
invoicetype: {
type: 'string',
title: '发票类型',
enum: [
{ value: '', label: '全部' },
{ value: '1', label: '运输专用发票' }
],
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
},
default: ''
} }
} }
}; };

View File

@ -369,7 +369,7 @@
<sv-container col="3" class="mt16"> <sv-container col="3" class="mt16">
<sv-title>合伙人信息</sv-title> <sv-title>合伙人信息</sv-title>
<sv label="合伙人名称"> <sv label="合伙人名称">
{{partnerInfo.partnerEnterpriseName}} {{partnerInfo.partnerContactName}}
</sv> </sv>
<sv label="手机号"> <sv label="手机号">
<input nz-input type="text" [(ngModel)]="partnerInfo.partnerContactMobile" [readonly]="!isEdit" <input nz-input type="text" [(ngModel)]="partnerInfo.partnerContactMobile" [readonly]="!isEdit"

View File

@ -116,7 +116,7 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy {
className: 'text-center' className: 'text-center'
}, },
{ title: '修改时间', render: 'modifyTime', 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' }, { title: '操作人', render: 'approvalUser', className: 'text-center' },
]; ];

View File

@ -1,8 +1,8 @@
import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core'; import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router'; 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 { _HttpClient } from '@delon/theme';
import { EAEnvironmentService } from '@shared'; import { EAEnvironmentService, ShipperBaseService } from '@shared';
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays'; import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
import format from 'date-fns/format'; import format from 'date-fns/format';
import { NzMessageService } from 'ng-zorro-antd/message'; import { NzMessageService } from 'ng-zorro-antd/message';
@ -19,8 +19,9 @@ import { NzModalRef } from 'ng-zorro-antd/modal';
}) })
export class EditPartnerComponentsAddComponent implements OnInit { export class EditPartnerComponentsAddComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sf', { static: false }) sf!: SFComponent;
record: any = {};
i: any; i: any;
sts: any;
rows: any;
schema: SFSchema = {}; schema: SFSchema = {};
detailData: any = {} detailData: any = {}
ui: SFUISchema = {}; ui: SFUISchema = {};
@ -33,14 +34,18 @@ export class EditPartnerComponentsAddComponent implements OnInit {
public service: UsermanageService, public service: UsermanageService,
private envSrv: EAEnvironmentService, private envSrv: EAEnvironmentService,
private modal: NzModalRef, private modal: NzModalRef,
public shipperservice: ShipperBaseService
) { } ) { }
ngOnInit(): void { ngOnInit(): void {
this.initDetailData() if(this.sts == '2') {
this.initDetailData()
}
this.initSF(); this.initSF();
} }
initDetailData() { initDetailData() {
const params = { const params = {
id: this.i.id id: this.i.id
} }
@ -55,18 +60,40 @@ export class EditPartnerComponentsAddComponent implements OnInit {
initSF() { initSF() {
this.schema = { this.schema = {
properties: { 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', type: 'string',
title: '合伙人修改为', title: '合伙人修改为',
ui: { ui: {
widget: 'radio', widget: 'select',
showRequired: true, placeholder: '请选择',
} as SFRadioWidgetSchema, allowClear: true,
enum: [ visibleIf: {
{ label: '全部可见', value: 1 }, _$expand: (value: boolean) => value
{ label: '合伙人可见', value: 2 }, },
{ label: '销售渠道可见', value: 3 }, 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: { remark: {
type: 'string', type: 'string',
@ -87,7 +114,8 @@ export class EditPartnerComponentsAddComponent implements OnInit {
} as SFRadioWidgetSchema, } as SFRadioWidgetSchema,
enum: [ enum: [
{ label: '修改成功后立即生效', value: 1 }, { label: '修改成功后立即生效', value: 1 },
{ label: 'CRM流程审核通过后生效', value: 2 } { label: 'CRM流程审核后生效', value: 2 },
{ label: 'CRM流程审核通过后生效', value: 3 }
], ],
}, },
}, },

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-12 10:52:50 * @Date : 2022-01-12 10:52:50
* @LastEditors : Shiming * @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 * @FilePath : \\tms-obc-web\\src\\app\\routes\\usercenter\\components\\freight\\list\\list.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
@ -33,7 +33,7 @@
</div> </div>
</div> </div>
</nz-card> </nz-card>
<nz-card> <nz-card [nzExtra]="extraTemplate" >
<!-- 数据列表 --> <!-- 数据列表 -->
<!-- [data]="service.$api_get_supplier_page" --> <!-- [data]="service.$api_get_supplier_page" -->
@ -57,6 +57,9 @@
<ng-template st-row="contacter" let-item let-index="index"> <ng-template st-row="contacter" let-item let-index="index">
{{ item.contacter }}<br>/{{item.mobile}} {{ item.contacter }}<br>/{{item.mobile}}
</ng-template> </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"> <ng-template st-row="promotersTelephone" let-item let-index="index">
<a acl [acl-ability]="['USERCENTER-FREIGHT-LIST-salesman']" (click)="addPromoter(item)">{{ item.promotersTelephone <a acl [acl-ability]="['USERCENTER-FREIGHT-LIST-salesman']" (click)="addPromoter(item)">{{ item.promotersTelephone
|| '添加' }}</a> || '添加' }}</a>
@ -73,3 +76,9 @@
</div> </div>
</div> </div>
</ng-template> </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>

View File

@ -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({ const modalRef = this.modal.create({
nzTitle: '修改合伙人', nzTitle: '修改合伙人',
nzContent: EditPartnerComponentsAddComponent, nzContent: EditPartnerComponentsAddComponent,
nzWidth: 800, nzWidth: 800,
nzComponentParams: { nzComponentParams: {
i: record i: record,
sts: status,
rows: params
}, },
nzFooter: null nzFooter: null
}); });
@ -141,7 +158,7 @@ export class FreightComponentsListComponent implements OnInit {
} }
}); });
} }
editSale(record: any) { editSale(record?: any) {
const modalRef = this.modal.create({ const modalRef = this.modal.create({
nzTitle: '修改渠道销售', nzTitle: '修改渠道销售',
nzContent: EditSaleComponentsAddComponent, nzContent: EditSaleComponentsAddComponent,
@ -380,7 +397,7 @@ export class FreightComponentsListComponent implements OnInit {
initST() { initST() {
this.columns = [ this.columns = [
// { title: '', type: 'checkbox', className: 'text-center' }, { title: '', type: 'checkbox', className: 'text-center' },
{ title: '企业名称', render: 'enterpriseName', width: 350 }, { title: '企业名称', render: 'enterpriseName', width: 350 },
{ title: '统一社会信用代码', className: 'text-center', render: 'unifiedSocialCreditCode', width: 200 }, { title: '统一社会信用代码', className: 'text-center', render: 'unifiedSocialCreditCode', width: 200 },
{ {
@ -407,7 +424,7 @@ export class FreightComponentsListComponent implements OnInit {
enum: { 10: '整车发货', 20: '大宗发货' }, enum: { 10: '整车发货', 20: '大宗发货' },
width: 140 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', render: 'partnerName', width: 150 },
{ title: '客服人员', className: 'text-center', index: 'customerServiceIdLabel', width: 150 }, { title: '客服人员', className: 'text-center', index: 'customerServiceIdLabel', width: 150 },
{ title: '网络货运人', className: 'text-center', index: 'netTranName', width: 180 }, { title: '网络货运人', className: 'text-center', index: 'netTranName', width: 180 },

View File

@ -1,7 +1,7 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-11-29 15:22:34 * @Date: 2021-11-29 15:22:34
* @LastEditTime : 2022-04-09 14:54:17 * @LastEditTime : 2022-04-24 16:49:05
* @LastEditors : Shiming * @LastEditors : Shiming
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @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 * @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_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'; $api_getStaffList = '/api/mdc/cuc/userApp/getStaffList';
// 分配客服人员 // 分配客服人员

View 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 {}

View File

@ -1,2 +1,3 @@
export * from './captcha.component'; export * from './captcha.component';
export * from './dun.helper'; export * from './dun.helper';
export * from './captcha.module';

View File

@ -0,0 +1,3 @@
export * from './search-drawer.component';
export * from './search-drawer.module';
export * from './search-drawer.service';

View File

@ -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>

View File

@ -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;
}
}

View File

@ -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 {}

View File

@ -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;
}
}

View File

@ -22,6 +22,7 @@ export * from './components/dynamic-setting';
export * from './components/singlepage-setting'; export * from './components/singlepage-setting';
export * from './components/insurance-table/index'; export * from './components/insurance-table/index';
export * from './components/rebate-table/index'; export * from './components/rebate-table/index';
export * from './components/search-drawer';
// Utils // Utils
export * from './utils'; export * from './utils';

View File

@ -26,6 +26,8 @@ export class ShipperBaseService extends BaseService {
// 获取货主企业列表 // 获取货主企业列表
public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList'; public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList';
// 批量获取项目信息
public $api_get_project_list = '/api/mdc/cuc/enterpriseProject/getProjectList';
constructor(public injector: Injector) { constructor(public injector: Injector) {
super(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客户 * 获取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 * @returns

View File

@ -5,6 +5,7 @@ import { apiConf } from '@conf/api.conf';
import { NgxTinymceModule } from 'ngx-tinymce'; import { NgxTinymceModule } from 'ngx-tinymce';
import { environment } from '@env/environment'; import { environment } from '@env/environment';
const TinyMce = NgxTinymceModule.forRoot({ const TinyMce = NgxTinymceModule.forRoot({
baseURL: 'assets/tinymce/', baseURL: 'assets/tinymce/',
config: { config: {

View File

@ -37,7 +37,10 @@ import { ImageListModule } from './components/imagelist';
import { DictSelectComponent } from './components/dict-select'; import { DictSelectComponent } from './components/dict-select';
import { PipeModule } from './pipes'; import { PipeModule } from './pipes';
import { AccountDetailComponent } from './components/account-detail/account-detail.component'; import { AccountDetailComponent } from './components/account-detail/account-detail.component';
import { CaptchaModule } from './components/captcha';
import { rebateTableModule } from './components/rebate-table'; 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 = [ const MODULES = [
AddressModule, AddressModule,
@ -53,6 +56,8 @@ const MODULES = [
ImageListModule, ImageListModule,
PipeModule, PipeModule,
rebateTableModule, rebateTableModule,
CaptchaModule,
SearchDrawerModule,
...PRO_SHARED_MODULES ...PRO_SHARED_MODULES
]; ];
// #endregion // #endregion
@ -90,4 +95,4 @@ const SHAREDCOMPONENTS = [LogisticsTimeLineComponent, DictSelectComponent, Accou
], ],
declarations: SHAREDCOMPONENTS declarations: SHAREDCOMPONENTS
}) })
export class SharedModule { } export class SharedModule {}

View File

@ -110,3 +110,27 @@ h2 {
margin : 0 0 0 16px !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;
}

View File

@ -19,3 +19,7 @@
// .page-header__title { // .page-header__title {
// display: none; // display: none;
// } // }
.ant-btn {
border-radius: 4px;
}