edit
This commit is contained in:
		@ -14,7 +14,10 @@
 | 
			
		||||
                <h2 style="font-weight: 800;">{{selectedTab?.name}}</h2>
 | 
			
		||||
                <div nz-row nzGutter="8">
 | 
			
		||||
                    <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 *ngSwitchCase="1">
 | 
			
		||||
                                    <nz-input-group [nzAddOnAfter]="item.remark?.afterLable" style="width: 155px;"
 | 
			
		||||
@ -61,24 +64,7 @@
 | 
			
		||||
                                </ng-container>
 | 
			
		||||
                            </ng-container>
 | 
			
		||||
 | 
			
		||||
                            <!-- <ng-container *ngFor="let item of item.extend">
 | 
			
		||||
                                <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>
 | 
			
		||||
                        </se> -->
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
            </nz-card>
 | 
			
		||||
 | 
			
		||||
@ -5,10 +5,11 @@ import { SHARED_ZORRO_MODULES } from '../../shared-zorro.module';
 | 
			
		||||
import { SHARED_DELON_MODULES } from '../../shared-delon.module';
 | 
			
		||||
import { FormsModule } from '@angular/forms';
 | 
			
		||||
import { DynamicSettingModalComponent } from './dynamic-setting-modal/dynamic-setting-modal.component';
 | 
			
		||||
 | 
			
		||||
import { FreightTableComponent } from './freight-table/freight-table.component';
 | 
			
		||||
const COMPONENTS = [DynamicSettingH5Component, DynamicSettingModalComponent, FreightTableComponent];
 | 
			
		||||
@NgModule({
 | 
			
		||||
  declarations: [DynamicSettingH5Component, DynamicSettingModalComponent],
 | 
			
		||||
  declarations: [...COMPONENTS],
 | 
			
		||||
  imports: [CommonModule, FormsModule, SHARED_ZORRO_MODULES, SHARED_DELON_MODULES],
 | 
			
		||||
  exports: [DynamicSettingH5Component]
 | 
			
		||||
  exports: [...COMPONENTS]
 | 
			
		||||
})
 | 
			
		||||
export class DynamicSettingModule {}
 | 
			
		||||
 | 
			
		||||
@ -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>
 | 
			
		||||
@ -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);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user