This commit is contained in:
wangshiming
2022-02-14 10:06:21 +08:00
parent 6fba1aeb13
commit df5b4ad0ad
9 changed files with 72 additions and 29 deletions

View File

@ -473,7 +473,7 @@ export class OrderManagementBulkComponent implements OnInit {
{ {
text: '变更运费 ', text: '变更运费 ',
click: _record => this.updateFreight(_record), click: _record => this.updateFreight(_record),
iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' iif: item => item.billStatus !== '1' && item.billStatus !== '6' && item.overallPaymentStatus != '2'
}, },
{ {
text: '确认签收 ', text: '确认签收 ',

View File

@ -424,7 +424,7 @@ resourceStatus: any;
{ {
text: '变更运费 ', text: '变更运费 ',
click: (_record) => this.updateFreight(_record), click: (_record) => this.updateFreight(_record),
iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3', iif: item => item.billStatus !== '1' && item.billStatus !== '6' && item.overallPaymentStatus != '2',
}, },
{ {
text: '确认签收 ', text: '确认签收 ',

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2021-12-15 13:17:42 * @Date : 2021-12-15 13:17:42
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-02-11 11:06:40 * @LastEditTime : 2022-02-14 09:34:18
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\update-freight\\update-freight.component.ts * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\update-freight\\update-freight.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -126,6 +126,7 @@ export class VehicleUpdateFreightComponent implements OnInit {
this.service.msgSrv.error('请填写必填项!'); this.service.msgSrv.error('请填写必填项!');
return; return;
} }
console.log(this.getParams())
this.service.request(this.service.$api_get_insertFreightChangeWhole, this.getParams()).subscribe(res => { this.service.request(this.service.$api_get_insertFreightChangeWhole, this.getParams()).subscribe(res => {
if (res) { if (res) {
this.modal.destroy(true); this.modal.destroy(true);

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,6 @@
<button nz-button nzType="primary" (click)="add()">新增公里数</button> <button nz-button nzType="primary" (click)="add()">新增公里数</button>
<button class="ml-md" nz-button nzType="primary" (click)="save()">保存</button> <button class="ml-md" nz-button nzType="primary" (click)="save()">保存</button>
</div> </div>
<nz-table #groupingTable [nzData]="data" nzBordered nzSize="small" [nzFrontPagination]="false" <nz-table #groupingTable [nzData]="data" nzBordered nzSize="small" [nzFrontPagination]="false"
[nzScroll]="{ x: '1200px' }" [nzShowPagination]="false" class="ml-xl" style="max-width: 1100px;"> [nzScroll]="{ x: '1200px' }" [nzShowPagination]="false" class="ml-xl" style="max-width: 1100px;">
<thead> <thead>

View File

@ -1,3 +1,13 @@
/*
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-25 16:03:45
* @LastEditors : Shiming
* @LastEditTime : 2022-02-11 17:12:52
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\dynamic-setting\\freight-table\\freight-table.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { BaseService } from '@shared'; import { BaseService } from '@shared';

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-25 20:18:52 * @Date : 2022-01-25 20:18:52
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-02-09 14:57:23 * @LastEditTime : 2022-02-14 09:49:45
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\insurance-table\\insurance-table.component.html * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\insurance-table\\insurance-table.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
@ -14,28 +14,28 @@
<button nz-button nzType="primary" (click)="add()">新增公里数</button> <button nz-button nzType="primary" (click)="add()">新增公里数</button>
<button class="ml-md" nz-button nzType="primary" (click)="save()">保存</button> <button class="ml-md" nz-button nzType="primary" (click)="save()">保存</button>
</div> </div>
<div>
<sf #sf [schema]="schema" [formData]="sfdata" [button]="'none'" [ui]="ui">
<ng-template sf-template="freightPrice" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="addOnAfterTemplate">
<nz-input-number [(ngModel)]="price" [nzMin]="0" style="width: 100%"></nz-input-number>
</nz-input-group>
<ng-template #addOnAfterTemplate>
<span ></span>
</ng-template>
</ng-template>
</sf>
</div>
<nz-table #groupingTable [nzData]="data" nzBordered nzSize="small" [nzFrontPagination]="false" <nz-table #groupingTable [nzData]="data" nzBordered nzSize="small" [nzFrontPagination]="false"
[nzScroll]="{ x: '1200px' }" [nzShowPagination]="false" class="ml-xl" style="max-width: 1100px;"> [nzScroll]="{ x: '1200px' }" [nzShowPagination]="false" class="ml-xl" style="max-width: 1100px;">
<thead> <thead>
<tr> <tr>
<th rowspan="2" nzWidth="250px" nzAlign="center" nzLeft>险种</th> <th rowspan="2" nzWidth="250px" nzAlign="center" nzLeft>险种</th>
<!-- <th rowspan="2" nzWidth="130px" nzAlign="center">计算方式</th> -->
<th nzWidth="220px" nzAlign="center" >普货-基本险</th> <th nzWidth="220px" nzAlign="center" >普货-基本险</th>
<th nzWidth="220px" nzAlign="center" >普货-综合险</th> <th nzWidth="220px" nzAlign="center" >普货-综合险</th>
<th rowspan="2" nzWidth="60px" nzAlign="center" nzRight>操作</th> <th rowspan="2" nzWidth="60px" nzAlign="center" nzRight>操作</th>
</tr> </tr>
<!-- <tr>
<th nzWidth="220px" nzAlign="center" *ngFor="let item of headers;let i = index">
<div style="display: flex;align-items: center;justify-content: space-between;">
<label style="width: 65px;text-align: right;"> {{item.startLength}}</label>
<label>-</label>
<nz-input-number [ngModel]="item.endLength" (ngModelChange)="changeEndLength($event,i)"
[nzMin]="0" [nzFormatter]="formatterDollar" nzSize="small" class="mr-sm" disabled>
</nz-input-number>
</div>
</th>
</tr> -->
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let item of groupingTable.data;let i = index"> <tr *ngFor="let item of groupingTable.data;let i = index">
@ -55,7 +55,6 @@
</div> </div>
</td> </td>
<!-- <td nzWidth="130px" nzAlign="center">{{computeMode[item.computeMode] }}</td> -->
<td nzWidth="220px" nzAlign="center" > <td nzWidth="220px" nzAlign="center" >
<div style="display: flex;align-items: center;justify-content: center;" > <div style="display: flex;align-items: center;justify-content: center;" >
<nz-input-number [(ngModel)]="item.baseInsuranceRate" [nzMin]="0" nzSize="small" style="width: 55px;" <nz-input-number [(ngModel)]="item.baseInsuranceRate" [nzMin]="0" nzSize="small" style="width: 55px;"

View File

@ -1,7 +1,8 @@
import { debounceTime } from 'rxjs/operators'; import { debounceTime } from 'rxjs/operators';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
import { BaseService } from '@shared'; import { BaseService } from '@shared';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
@Component({ @Component({
selector: 'app-insurance-table', selector: 'app-insurance-table',
@ -11,15 +12,22 @@ import { BaseService } from '@shared';
export class InsuranceTableComponent implements OnInit { export class InsuranceTableComponent implements OnInit {
data: any[] = []; data: any[] = [];
headers: any[] = []; headers: any[] = [];
sfdata: any; // 货源单设置回显
@ViewChild('sf', { static: false }) sf!: SFComponent;
schema: SFSchema = {};
ui!: SFUISchema;
formatterDollar = (value: number): string => `${value} (含)`; formatterDollar = (value: number): string => `${value} (含)`;
price: number = 0;
changeSub = new Subject<string>(); changeSub = new Subject<string>();
constructor(public service: BaseService, private cdr: ChangeDetectorRef) {} constructor(public service: BaseService, private cdr: ChangeDetectorRef) {}
ngOnInit(): void { ngOnInit(): void {
this.loadData(); this.loadData();
this.initSF()
this.changeEndKmAction(); this.changeEndKmAction();
this.price = 1000
} }
loadData() { loadData() {
@ -31,7 +39,31 @@ export class InsuranceTableComponent implements OnInit {
} }
}); });
} }
initSF() {
this.schema = {
properties: {
freightPrice: {
type: 'string',
title: '单票投保最低保费',
ui: {
widget: 'custom',
placeholder: '请输入',
errors: { required: '请填写' }
}
},
},
required: ['freightPrice']
};
this.ui = {
'*': {
spanLabelFixed: 140,
grid: { span: 24 }
},
$freightPrice: {
grid: { span: 8 }
},
};
}
/** /**
* 修改结束车长 * 修改结束车长
* @param event 车长 * @param event 车长
@ -111,6 +143,8 @@ export class InsuranceTableComponent implements OnInit {
save() { save() {
console.log(this.data); console.log(this.data);
console.log(this.price);
console.log(this.sf.value);
// this.service.request('/api/mdc/cuc/freightConfig/saveBatch', this.data).subscribe(res => { // this.service.request('/api/mdc/cuc/freightConfig/saveBatch', this.data).subscribe(res => {
// if (res) { // if (res) {
// console.log(res); // console.log(res);

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-25 20:23:54 * @Date : 2022-01-25 20:23:54
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-02-09 14:57:05 * @LastEditTime : 2022-02-11 17:20:49
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\insurance-table\\insurance-table.module.ts * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\insurance-table\\insurance-table.module.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -15,17 +15,18 @@ import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
import { NzTableModule } from 'ng-zorro-antd/table'; import { NzTableModule } from 'ng-zorro-antd/table';
import { InsuranceTableComponent } from './insurance-table.component'; import { InsuranceTableComponent } from './insurance-table.component';
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm'; import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
import { SHARED_ZORRO_MODULES } from '../../shared-zorro.module';
const COMPONENTS = [InsuranceTableComponent]; import { SHARED_DELON_MODULES } from '../../shared-delon.module';
const COMPONENTS = [InsuranceTableComponent,];
const COMPONENTSs = [ const COMPONENTSs = [
NzTableModule, NzTableModule,
NzInputNumberModule, NzInputNumberModule,
NzPopconfirmModule NzPopconfirmModule,
]; ];
@NgModule({ @NgModule({
declarations: COMPONENTS, declarations: COMPONENTS,
imports: [CommonModule, FormsModule,COMPONENTSs], imports: [CommonModule, FormsModule,COMPONENTSs,SHARED_ZORRO_MODULES, SHARED_DELON_MODULES],
exports: COMPONENTS exports: COMPONENTS
}) })
export class InsuranceTableModule {} export class InsuranceTableModule {}