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

This commit is contained in:
Taric Xin
2022-05-07 17:47:10 +08:00
14 changed files with 122 additions and 51 deletions

View File

@ -86,6 +86,8 @@ export class DatatableOperationtableComponent implements OnInit {
this.service.request(this.service.$api_operationalReportHistogram, params).subscribe(res => {
if (res) {
this.chartData = res
this.pillar.reRender()
this.curve.reRender()
if(flag) { // 除第一次加载外
this.pillar.reRender()
this.curve.reRender()

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2021-12-30 19:36:30
* @LastEditors : Shiming
* @LastEditTime : 2022-02-23 16:35:15
* @LastEditTime : 2022-05-07 17:33:01
* @FilePath : \\tms-obc-web\\src\\app\\routes\\financial-management\\components\\cost-management\\cost-management.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -50,11 +50,11 @@
</div> -->
<st #st [data]="service.$api_get_cost_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
[loading]="false" [scroll]="{ x: '2000px',y:scrollY }">
<ng-template st-row="armoeny" let-item let-index="index">
<!-- <ng-template st-row="armoeny" let-item let-index="index">
{{ item.armoeny | currency }}
</ng-template>
</ng-template> -->
<ng-template st-row="hrmoney" let-item let-index="index">
{{ item.hrmoney | currency }}
{{ item.armoeny ? (item.armoeny| currency ): '--' }} / {{ item.hrmoney? (item.hrmoney | currency) : '--'}}
</ng-template>
<ng-template st-row="artocode" let-item let-index="index"> {{ item.cnoCode }}/{{ item.cnoName }} </ng-template>
<ng-template st-row="hrpaymoney" let-item let-index="index">

View File

@ -252,8 +252,8 @@ export class CostManagementComponent extends BasicTableComponent implements OnIn
{ title: '结算客户', render: 'artocode', width: 200, className: 'text-left' },
{ title: '应收对象', index: 'artoname', width: 200, className: 'text-left' },
{ title: '应付对象', index: 'hrtoname', width: 200, className: 'text-left' },
{ title: '应收金额', render: 'armoeny', width: 150, className: 'text-right' },
{ title: '应付金额', render: 'hrmoney', width: 150, className: 'text-right' },
{ title: '应收/应付金额', render: 'hrmoney', width: 150, className: 'text-right' },
// { title: '应付金额', render: 'hrmoney', width: 150, className: 'text-right' },
{ title: '收/付款金额', render: 'hrpaymoney', width: 150, className: 'text-right' },
{ title: '开/收票金额', render: 'hrvatmoney', width: 150, className: 'text-right' },
{ title: '创建时间', index: 'createTime', type: 'date', width: 200, className: 'text-center' },

View File

@ -1,3 +1,13 @@
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-04-28 20:27:07
* @LastEditors : Shiming
* @LastEditTime : 2022-05-07 16:22:32
* @FilePath : \\tms-obc-web\\src\\app\\routes\\financial-management\\components\\voucher-summary\\voucher-summary.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<!-- <page-header-wrapper [title]="'凭证汇总'">
</page-header-wrapper>
@ -29,7 +39,8 @@
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl
[acl-ability]="['FINANCIAL-VOUCHER-list']">筛选</button>
<button nz-button nzDanger (click)='exportList()'> 导出</button>
<button nz-button nzDanger acl
[acl-ability]="['FINANCIAL-VOUCHER-SUMMARY-export']" (click)='exportList()'> 导出</button>
</div>
</div>
<st #st [data]="service.$api_get_fico_vch_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"

View File

@ -54,12 +54,24 @@ export class ParterRebateManageMentAddPartnerListComponent implements OnInit {
buttons: [
{
text: '添加',
iifBehavior: 'disabled',
iif: (item:any) => {
return this.filterArr(item)
},
click: _record => this.add(_record),
}
]
}
];
filterArr (item: { id: any; }) {
let real = true
this.i.forEach((element:any) => {
if(element.id == item.id) {
real = false
}
});
return real
}
get reqParams() {
// signStatus固定传20 代表签约完成 signStatus: 20
let params: any = { ...this.sf?.value, };
@ -78,6 +90,8 @@ export class ParterRebateManageMentAddPartnerListComponent implements OnInit {
) {}
ngOnInit(): void {
console.log(this.i);
this.initSF();
}
initSF() {

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-02-24 20:09:49
* @LastEditors : Shiming
* @LastEditTime : 2022-05-05 17:04:31
* @LastEditTime : 2022-05-07 15:42:10
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -58,7 +58,7 @@
<nz-option nzValue="2" nzLabel="新注册合伙人"></nz-option>
<nz-option nzValue="3" nzLabel="自定义合伙人"></nz-option>
</nz-select>
<span *ngIf="addStatus" style="padding-left: 15px; color: #0000ff" (click)="add()">添加</span>
<span *ngIf="addStatus" style="padding-left: 15px; color: #0000ff" (click)="add(this.partnerPeopleList)">添加</span>
<st
*ngIf="partnerPeopleList?.length > 0"
#st

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-03-21 09:26:45
* @LastEditors : Shiming
* @LastEditTime : 2022-05-05 14:04:53
* @LastEditTime : 2022-05-07 15:38:49
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -127,59 +127,70 @@ export class ParterRebateManageMentAddComponent implements OnInit {
if (res) {
if (Array.isArray(res)) {
this.partnerPeopleList = this.partnerPeopleList.concat(res);
this.partnerPeopleList = [...this.setArr(this.partnerPeopleList, 'id')];
res.forEach((ele: any) => {
this.partnerId.push(ele?.id);
});
} else {
this.partnerPeopleList = this.partnerPeopleList.concat(res);
this.partnerPeopleList = [...this.setArr(this.partnerPeopleList, 'id')];
this.partnerId.push(res?.id);
}
}
});
}
// 数组去重
setArr(arr: any[], id: string) {
let obj: any = {};
const arrays = arr.reduce((setArr, item) => {
obj[item[id]] ? '' : (obj[item[id]] = true && setArr.push(item));
return setArr;
}, []);
return arrays;
}
delete(item: any) {
this.partnerPeopleList = this.partnerPeopleList.filter((d: any, i: any) => {
return item.id != d.id;
});
}
save() {
if(!this.configName) {
if (!this.configName) {
this.service.msgSrv.warning('请输入配置名称!');
return
return;
}
if(!this.accountingRate) {
if (!this.accountingRate) {
this.service.msgSrv.warning('请输入固定结算费率!');
return
return;
}
if(!this.partnerType) {
if (!this.partnerType) {
this.service.msgSrv.warning('请选择合伙人范围!');
return
return;
}
if(!this.priority) {
if (!this.priority) {
this.service.msgSrv.warning('请选择优先级!');
return
return;
}
if(!this.sf?.value.ruleDescription) {
if (!this.sf?.value.ruleDescription) {
this.service.msgSrv.warning('请输入规则说明!');
return
return;
}
if(!this.remark) {
if (!this.remark) {
this.service.msgSrv.warning('请输入备注!');
return
return;
}
if(this.partnerType == '3' && this.partnerPeopleList?.length == 0) {
if (this.partnerType == '3' && this.partnerPeopleList?.length == 0) {
this.service.msgSrv.warning('请选择合伙人!');
return
return;
}
let real = false;
if(this.configType == '2') {
this.table.data.forEach((element: any) => {
if (element.startAmount > element.endAmount) {
real = true;
return;
}
});
}
if (this.configType == '2') {
this.table.data.forEach((element: any) => {
if (element.startAmount > element.endAmount) {
real = true;
return;
}
});
}
if (real) {
this.service.msgSrv.warning('初始业务量不能超过到达业务量!');
return;
@ -197,7 +208,7 @@ export class ParterRebateManageMentAddComponent implements OnInit {
partnerType: this.partnerType
};
console.log(params);
this.service.request(this.service.$api_save_rebateConfig, params).subscribe((res: any) => {
if (res) {
this.service.msgSrv.success('新增成功!');

View File

@ -39,7 +39,7 @@
name="loadName{{ idx }}" maxlength="30" placeholder="请输入联系人姓名" />
</nz-form-control>
<nz-form-control [nzSpan]="12" [nzErrorTip]="'请输入联系人电话'">
<input nz-input [(ngModel)]="data1.contractTelephone" maxlength="11"
<input nz-input [(ngModel)]="data1.contractTelephone" maxlength="11" (ngModelChange)="onChangePhone(data1.contractTelephone)"
formControlName="loadPhone{{ idx }}" name="loadPhone{{ idx }}" placeholder="请输入联系人电话" />
</nz-form-control>
</div>
@ -74,7 +74,7 @@
name="unloadAddress{{ idx }}" placeholder="请输入联系人姓名" />
</nz-form-control>
<nz-form-control [nzSpan]="12" [nzErrorTip]="'请输入联系人电话'">
<input nz-input [(ngModel)]="data2.contractTelephone"
<input nz-input [(ngModel)]="data2.contractTelephone" (ngModelChange)="onChangePhone(data2.contractTelephone)"
formControlName="unloadPhone{{ idx }}" name="unloadAddress{{ idx }}" maxlength="11"
placeholder="请输入联系人电话" />
</nz-form-control>

View File

@ -56,6 +56,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
maxTrainNumber: 99999,
maxFreight: 9999999
};
patternStr = `^((13[0-9])|(14[0-1,4-9])|(15([0-3,5-9]))|(17[0-8])|(18[0-9])|(19[0-3,5-9])|(16[2,5,6,7]))\\d{8}$`;
constructor(
private http: _HttpClient,
fb: FormBuilder,
@ -69,10 +70,10 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
this.validateForm1 = fb.group({
loadAddress0: [null, [Validators.required]],
loadName0: [null, [Validators.required]],
loadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]],
loadPhone0: [null, [Validators.required, Validators.pattern(this.patternStr)]],
unloadAddress0: [null, [Validators.required]],
unloadName0: [null, [Validators.required]],
unloadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]]
unloadPhone0: [null, [Validators.required, Validators.pattern(this.patternStr)]]
});
}
@ViewChild('sf1', { static: false }) sf1!: SFComponent;
@ -1170,4 +1171,17 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
}
});
}
onChangePhone(value: string): void {
console.log(value);
this.updateValue(value);
}
updateValue(value: string): void {
const reg = /^-?(0|[1-9][0-9]*)(\.[0-9]*)?$/;
// if ((!isNaN(+value) && reg.test(value)) || value === '' || value === '-') {
// this.value = value;
// }
// this.inputElement!.nativeElement.value = this.value;
// this.updateTitle();
}
}

View File

@ -17,7 +17,7 @@
<div class="card-title">装卸货信息<span class="tip-font">预计公里数:<em>{{ totalDistance }}km</em>,预计行程耗时:<em>{{ totalTime }}小时</em></span>
</div>
<form #ngForm="ngForm" nz-form role="form">
<form #ngForm="ngForm" [formGroup]="validateForm1" nz-form role="form">
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="10">
<div *ngFor="let data1 of startInfo; let idx = index">

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { NgForm } from '@angular/forms';
import { FormBuilder, FormGroup, Validators, FormControl, NgForm } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import {
SFComponent,
@ -28,7 +28,7 @@ import { SupplyManagementQrcodePageComponent } from '../qrcode-page/qrcode-page.
styleUrls: ['./bulk-release-publish.component.less']
})
export class SupplyManagementBulkReleasePublishComponent implements OnInit {
@ViewChild('ngForm')
validateForm1: FormGroup;
ngForm!: NgForm;
sf1data: any; // 货源单设置回显
sf3data: any; // 货源单设置回显
@ -50,6 +50,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
maxFreight: 9999999
}
shipperName = '';
patternStr = `^((13[0-9])|(14[0-1,4-9])|(15([0-3,5-9]))|(17[0-8])|(18[0-9])|(19[0-3,5-9])|(16[2,5,6,7]))\\d{8}$`;
// // 单位
startInfo: any[] = [];
endInfo: any[] = [];
@ -58,6 +59,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
freightTypeOptions: any;
constructor(
private http: _HttpClient,
fb: FormBuilder,
private modalService: NzModalService,
private settingSrv: SettingsService,
private service: SupplyManagementService,
@ -66,7 +68,14 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
private amapService: AmapService,
public shipperSrv: ShipperBaseService
) {
this.validateForm1 = fb.group({
loadAddress0: [null, [Validators.required]],
loadName0: [null, [Validators.required]],
loadPhone0: [null, [Validators.required, Validators.pattern(this.patternStr)]],
unloadAddress0: [null, [Validators.required]],
unloadName0: [null, [Validators.required]],
unloadPhone0: [null, [Validators.required, Validators.pattern(this.patternStr)]]
});
}
@ViewChild('sf1', { static: false }) sf1!: SFComponent;
schema1: SFSchema = {};

View File

@ -43,6 +43,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
intervalDays: 999,
maxTimes: 5
};
patternStr = `^((13[0-9])|(14[0-1,4-9])|(15([0-3,5-9]))|(17[0-8])|(18[0-9])|(19[0-3,5-9])|(16[2,5,6,7]))\\d{8}$`;
sf1data: any; // 货源单设置回显
sf3data: any; // 货源单设置回显
sf4data: any; // 货源单设置回显
@ -78,7 +79,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
) {
this.validateForm1 = fb.group({
loadingTime: [null, [Validators.required]],
unloadingTime: [null, [Validators.required]]
unloadingTime: [null, [Validators.required]],
});
this.envCache = this.eaCacheSrv.get(cacheConf.env);
}
@ -806,7 +807,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
});
this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]));
this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, [Validators.required, Validators.pattern(this.patternStr)]));
}
}
@ -862,7 +863,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(
`unloadPhone${controlId}`,
new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])
new FormControl(null, [Validators.required, Validators.pattern(this.patternStr)])
);
}
}
@ -1370,6 +1371,15 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.sf7.setValue('/toPay', this.sf7data.toPay);
this.sf7.setValue('/receiptPay', this.sf7data.receiptPay);
this.payChange();
// console.log('88888');
// this.validateForm1.reset();
// for (const key in this.validateForm1.controls) {
// if (this.validateForm1.controls.hasOwnProperty(key)) {
// this.validateForm1.controls[key].markAsPristine();
// this.validateForm1.controls[key].updateValueAndValidity();
// }
// }
}
// 选择地址

View File

@ -52,6 +52,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
totalTime = 0.0; //路程总时间
currentRate = 0; //实时计算的费率
shipperName = '';
patternStr = `^((13[0-9])|(14[0-1,4-9])|(15([0-3,5-9]))|(17[0-8])|(18[0-9])|(19[0-3,5-9])|(16[2,5,6,7]))\\d{8}$`;
constructor(
private http: _HttpClient,
fb: FormBuilder,
@ -67,10 +68,10 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
this.validateForm1 = fb.group({
loadAddress0: [null, [Validators.required]],
loadName0: [null, [Validators.required]],
loadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]],
loadPhone0: [null, [Validators.required, Validators.pattern(this.patternStr)]],
unloadAddress0: [null, [Validators.required]],
unloadName0: [null, [Validators.required]],
unloadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]],
unloadPhone0: [null, [Validators.required, Validators.pattern(this.patternStr)]],
loadingTime: [null, [Validators.required]],
unloadingTime: [null, [Validators.required]]
});
@ -609,7 +610,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
receiptUserPhone: {
type: 'string',
title: '联系电话',
format: 'mobile',
maxLength: 11,
ui: {
errors: {
@ -836,7 +836,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
});
this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]));
this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, [Validators.required, Validators.pattern(this.patternStr)]));
}
}
// 添加 删除发货卸货地址
@ -865,7 +865,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(
`unloadPhone${controlId}`,
new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])
new FormControl(null, [Validators.required, Validators.pattern(this.patternStr)])
);
}
}

View File

@ -31,7 +31,7 @@
</div>
</div>
<st #st [data]="service.$api_invoicedBillInfo_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
[loading]="false" [scroll]="{ x:'1200px' }">
[loading]="false" [scroll]="{ x:'1200px', y: scrollY }">
<ng-template st-row="serviceType" let-item let-index="index">
<span>{{item.billTypeLabel + item.serviceTypeLabel}}</span>
</ng-template>