批量审核
This commit is contained in:
@ -1,14 +1,16 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-15 13:17:42
|
||||
* @LastEditTime: 2022-01-04 11:10:46
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\routes\order-management\modal\vehicle\update-freight\update-freight.component.html
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-29 14:51:07
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-18 17:23:25
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\modify-rate\\modify-rate.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
<nz-alert nzType="info" [nzMessage]="'已选择' + data?.ids?.length + '已选择条订单'" nzShowIcon></nz-alert>
|
||||
<sf style="margin-top: 15px;" #sf mode="edit" [schema]="schema" [ui]="ui" button="none"></sf>
|
||||
<sf style="margin-top: 15px" #sf mode="edit" [schema]="schema" [ui]="ui" button="none"></sf>
|
||||
<div class="modal-footer">
|
||||
<button nz-button type="button" (click)="close()">关闭</button>
|
||||
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)" >确定</button>
|
||||
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)">确定</button>
|
||||
</div>
|
||||
|
||||
@ -1,24 +1,16 @@
|
||||
import { preloaderFinished } from '@delon/theme';
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 14:03:07
|
||||
* @LastEditTime: 2022-01-04 11:21:29
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\update-freight\update-freight.component.ts
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-29 14:51:07
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-18 17:23:46
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\modify-rate\\modify-rate.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
|
||||
import { Component, Input, OnInit, ViewChild } from '@angular/core';
|
||||
import {
|
||||
SFComponent,
|
||||
SFCustomWidgetSchema,
|
||||
SFNumberWidgetSchema,
|
||||
SFRadioWidgetSchema,
|
||||
SFSchema,
|
||||
SFSelectWidgetSchema,
|
||||
SFTextareaWidgetSchema,
|
||||
SFUISchema
|
||||
} from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { SFComponent, SFNumberWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { OrderManagementService } from '../../../services/order-management.service';
|
||||
@ -41,7 +33,7 @@ export class VehicleModifyRateComponent implements OnInit {
|
||||
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
console.log(this.data)
|
||||
console.log(this.data);
|
||||
this.initSF();
|
||||
}
|
||||
initSF() {
|
||||
@ -53,9 +45,9 @@ export class VehicleModifyRateComponent implements OnInit {
|
||||
ui: {
|
||||
unit: '%',
|
||||
widgetWidth: 200,
|
||||
precision: 2,
|
||||
precision: 2
|
||||
} as SFNumberWidgetSchema
|
||||
},
|
||||
}
|
||||
},
|
||||
required: ['additionalRate']
|
||||
};
|
||||
@ -68,23 +60,22 @@ export class VehicleModifyRateComponent implements OnInit {
|
||||
}
|
||||
|
||||
save(value: any): void {
|
||||
if(!this.sf.value?.additionalRate) {
|
||||
this.service.msgSrv.warning('请填写附加费!')
|
||||
if (!this.sf.value?.additionalRate) {
|
||||
this.service.msgSrv.warning('请填写附加费!');
|
||||
return;
|
||||
}
|
||||
console.log(this.sf.value)
|
||||
console.log(this.sf.value);
|
||||
const params = {
|
||||
ids: this.data?.ids,
|
||||
...this.sf.value
|
||||
|
||||
};
|
||||
console.log(params)
|
||||
console.log(params);
|
||||
this.service.request(this.service.$api_set_updateAdditionalRateBatch, params).subscribe((res: any) => {
|
||||
if (res) {
|
||||
this.modal.close(true);
|
||||
this.service.msgSrv.success('变更运费成功');
|
||||
} else {
|
||||
this.service.msgSrv.error(res?.msg)
|
||||
this.service.msgSrv.error(res?.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -92,5 +83,4 @@ export class VehicleModifyRateComponent implements OnInit {
|
||||
close(): void {
|
||||
this.modal.destroy();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user