This commit is contained in:
Taric Xin
2022-01-25 10:55:47 +08:00
parent 66177af625
commit ec2e1516f4
8 changed files with 73 additions and 27 deletions

View File

@ -30,7 +30,7 @@ export class AuthGuard implements CanActivate, CanActivateChild {
} }
console.log(route); console.log(route);
return this.baseService.request('/api/mdc/cuc/user/getUserDetail', { link: route }).pipe( return this.baseService.request('/api/mdc/cuc/functionButton/getPermissionsCodeoByLink', { link: route }).pipe(
map(_ => { map(_ => {
this.srv.setAbility(auths); this.srv.setAbility(auths);
this.menuService.resume(); this.menuService.resume();

View File

@ -20,7 +20,7 @@ export class BasicSettingComponent implements OnInit {
} }
getTypeList() { getTypeList() {
this.service.request(this.service.$api_get_config_tree, { configFullKey: 'sys.config' }).subscribe((res: Array<any>) => { this.service.request(this.service.$api_get_config_tree, { configFullKey: 'sys.config', extendType: 0 }).subscribe((res: Array<any>) => {
if (res?.length > 0) { if (res?.length > 0) {
const typeData = res.find(config => config.configFullKey === 'sys.config'); const typeData = res.find(config => config.configFullKey === 'sys.config');
if (typeData) { if (typeData) {
@ -50,7 +50,6 @@ export class BasicSettingComponent implements OnInit {
} }
saveAction(params: any) { saveAction(params: any) {
this.service.request(this.service.$api_update_config_batch, params).subscribe(res => { this.service.request(this.service.$api_update_config_batch, params).subscribe(res => {
if (res) { if (res) {
this.service.msgSrv.success('修改配置成功'); this.service.msgSrv.success('修改配置成功');

View File

@ -74,11 +74,11 @@ export class RequestedInvoiceModalComponent implements OnInit {
{ title: '承运司机', index: 'driverinfo', width: 170 }, { title: '承运司机', index: 'driverinfo', width: 170 },
{ {
title: '总费用', title: '总费用',
index: 'vatmoney', index: 'billkpmoney',
width: 90, width: 90,
type: 'widget', type: 'widget',
className: 'text-right', className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatmoney }) } widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.billkpmoney }) }
}, },
{ {
title: '运输费', title: '运输费',

View File

@ -14,7 +14,10 @@
<h2 style="font-weight: 800;">{{selectedTab?.name}}</h2> <h2 style="font-weight: 800;">{{selectedTab?.name}}</h2>
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="labelWidth"> <div nz-col nzSpan="24" se-container [labelWidth]="labelWidth">
<se [label]="item.name" *ngFor="let item of configList" col="1"> <se col="1">
<app-freight-table></app-freight-table>
</se>
<!-- <se [label]="item.name" *ngFor="let item of configList" col="1">
<ng-container [ngSwitch]="item.itemType"> <ng-container [ngSwitch]="item.itemType">
<ng-container *ngSwitchCase="1"> <ng-container *ngSwitchCase="1">
<nz-input-group [nzAddOnAfter]="item.remark?.afterLable" style="width: 155px;" <nz-input-group [nzAddOnAfter]="item.remark?.afterLable" style="width: 155px;"
@ -61,24 +64,7 @@
</ng-container> </ng-container>
</ng-container> </ng-container>
<!-- <ng-container *ngFor="let item of item.extend"> </se> -->
<ng-container [ngSwitch]="item">
<ng-container *ngSwitchCase="1">
<button nz-button nzType="default">配置网络货运</button>
</ng-container>
<ng-container *ngSwitchCase="2">
<button nz-button nzType="default">配置货主</button>
</ng-container>
<ng-container *ngSwitchCase="3">
<button nz-button nzType="default">配置司机</button>
</ng-container>
<ng-container *ngSwitchCase="4">
<button nz-button nzType="default">配置车队长</button>
</ng-container>
<ng-container *ngSwitchDefault></ng-container>
</ng-container>
</ng-container> -->
</se>
</div> </div>
</div> </div>
</nz-card> </nz-card>

View File

@ -5,10 +5,11 @@ import { SHARED_ZORRO_MODULES } from '../../shared-zorro.module';
import { SHARED_DELON_MODULES } from '../../shared-delon.module'; import { SHARED_DELON_MODULES } from '../../shared-delon.module';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { DynamicSettingModalComponent } from './dynamic-setting-modal/dynamic-setting-modal.component'; import { DynamicSettingModalComponent } from './dynamic-setting-modal/dynamic-setting-modal.component';
import { FreightTableComponent } from './freight-table/freight-table.component';
const COMPONENTS = [DynamicSettingH5Component, DynamicSettingModalComponent, FreightTableComponent];
@NgModule({ @NgModule({
declarations: [DynamicSettingH5Component, DynamicSettingModalComponent], declarations: [...COMPONENTS],
imports: [CommonModule, FormsModule, SHARED_ZORRO_MODULES, SHARED_DELON_MODULES], imports: [CommonModule, FormsModule, SHARED_ZORRO_MODULES, SHARED_DELON_MODULES],
exports: [DynamicSettingH5Component] exports: [...COMPONENTS]
}) })
export class DynamicSettingModule {} export class DynamicSettingModule {}

View File

@ -0,0 +1,22 @@
<nz-table #groupingTable [nzData]="data" nzBordered nzSize="small" [nzFrontPagination]="false"
[nzScroll]="{ x: '500px' }" [nzShowPagination]="false">
<thead>
<tr>
<th nzWidth="200px" nzAlign="center">公里数</th>
<th nzWidth="130px" nzAlign="center">计算方式</th>
<th nzWidth="200px" nzAlign="center" *ngFor="let item of headers">车长(米)</th>
<th nzWidth="60px" nzAlign="center" nzRight>操作</th>
</tr>
<tr>
</tr>
</thead>
<tbody>
<tr *ngFor="let item of groupingTable.data">
<td nzWidth="200px" nzAlign="center">{{ item.startKm }} - {{ item.endKm }}</td>
<td nzWidth="130px" nzAlign="center">{{ item.computeMode }}</td>
<td nzWidth="200px" nzAlign="center" *ngFor="let node of item.configValue">最高{{ node.maxPrice }} 预警{{
node.ewPrice }}</td>
<td nzWidth="60px" nzAlign="center" nzRight>删除</td>
</tr>
</tbody>
</nz-table>

View File

@ -0,0 +1,38 @@
import { Component, OnInit } from '@angular/core';
import { BaseService } from '@shared';
@Component({
selector: 'app-freight-table',
templateUrl: './freight-table.component.html',
styleUrls: ['./freight-table.component.less']
})
export class FreightTableComponent implements OnInit {
data: any[] = [];
headers: any[] = [];
constructor(public service: BaseService) {}
ngOnInit(): void {
this.loadHeaders();
this.loadData();
}
loadHeaders() {
this.service.request('/api/mdc/cuc/freightConfigItem/list').subscribe(res => {
if (res) {
this.headers = res;
}
});
}
loadData() {
this.service.request('/api/mdc/cuc/freightConfig/list').subscribe(res => {
if (res) {
this.data = res;
}
});
}
changeEndLength(event: any, i: number) {
console.log(event, i);
}
}