批量审核
This commit is contained in:
@ -1,11 +1,14 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 14:03:07
|
||||
* @LastEditTime: 2022-01-12 14:01:33
|
||||
* @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.html
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-14 15:02:52
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-18 17:20:49
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\bulk\\confir-receipt\\confir-receipt.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
|
||||
<nz-alert
|
||||
style="padding-bottom: 15px;"
|
||||
nzType="warning"
|
||||
|
||||
@ -1,29 +1,20 @@
|
||||
import { preloaderFinished } from '@delon/theme';
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 14:03:07
|
||||
* @LastEditTime: 2022-01-18 16:34:59
|
||||
* @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-14 15:02:52
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-18 17:20:58
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\bulk\\confir-receipt\\confir-receipt.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import {
|
||||
SFComponent,
|
||||
SFCustomWidgetSchema,
|
||||
SFNumberWidgetSchema,
|
||||
SFRadioWidgetSchema,
|
||||
SFSchema,
|
||||
SFSelectWidgetSchema,
|
||||
SFTextareaWidgetSchema,
|
||||
SFUISchema
|
||||
} from '@delon/form';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { OrderManagementService } from '../../../services/order-management.service';
|
||||
import { NzUploadChangeParam, NzUploadFile } from 'ng-zorro-antd/upload';
|
||||
import { Observable, Observer } from 'rxjs';
|
||||
import { OrderManagementService } from '../../../services/order-management.service';
|
||||
function getBase64(file: File): Promise<string | ArrayBuffer | null> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const reader = new FileReader();
|
||||
@ -38,9 +29,9 @@ function getBase64(file: File): Promise<string | ArrayBuffer | null> {
|
||||
styleUrls: ['./confir-receipt.component.less']
|
||||
})
|
||||
export class ConfirReceiptComponent implements OnInit {
|
||||
i:any;
|
||||
Status:any;
|
||||
detailList:any;
|
||||
i: any;
|
||||
Status: any;
|
||||
detailList: any;
|
||||
data: any = {};
|
||||
driverList: any;
|
||||
payeeList: any;
|
||||
@ -48,63 +39,63 @@ export class ConfirReceiptComponent implements OnInit {
|
||||
listImagUrls: any[] = [];
|
||||
previewImage1 = '';
|
||||
previewVisible1 = false;
|
||||
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient, public service: OrderManagementService) {}
|
||||
constructor(
|
||||
private modal: NzModalRef,
|
||||
private msgSrv: NzMessageService,
|
||||
public http: _HttpClient,
|
||||
public service: OrderManagementService
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initData()
|
||||
this.initData();
|
||||
}
|
||||
|
||||
save(): void {
|
||||
// 大宗
|
||||
console.log(this.listImagUrls)
|
||||
let imgList : any= [];
|
||||
if(this.listImagUrls.length > 0) {
|
||||
this.listImagUrls.forEach((res :any) => {
|
||||
if(res.url) {
|
||||
imgList.push(res.url)
|
||||
console.log(this.listImagUrls);
|
||||
let imgList: any = [];
|
||||
if (this.listImagUrls.length > 0) {
|
||||
this.listImagUrls.forEach((res: any) => {
|
||||
if (res.url) {
|
||||
imgList.push(res.url);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
console.log(imgList)
|
||||
console.log(imgList);
|
||||
const params = {
|
||||
id: this.i?.id,
|
||||
filePathList: imgList,
|
||||
}
|
||||
console.log(params)
|
||||
filePathList: imgList
|
||||
};
|
||||
console.log(params);
|
||||
this.service.request(this.service.$api_get_signBulkOrder, params).subscribe((res: any) => {
|
||||
console.log(res.success)
|
||||
if(res) {
|
||||
this.service.msgSrv.success('确认签收成功!')
|
||||
console.log(res.success);
|
||||
if (res) {
|
||||
this.service.msgSrv.success('确认签收成功!');
|
||||
this.modal.destroy(true);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
initData() {
|
||||
// 大宗
|
||||
this.service.request(this.service.$api_get_getBulkSignForDetail, {id: this.i?.id}).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
this.detailList = res;
|
||||
let arr : any= []
|
||||
res.filePathList.forEach((element: any, index: any) => {
|
||||
console.log(index)
|
||||
arr.push( {
|
||||
this.service.request(this.service.$api_get_getBulkSignForDetail, { id: this.i?.id }).subscribe((res: any) => {
|
||||
console.log(res);
|
||||
this.detailList = res;
|
||||
let arr: any = [];
|
||||
res.filePathList.forEach((element: any, index: any) => {
|
||||
console.log(index);
|
||||
arr.push({
|
||||
url: element,
|
||||
status: 'done',
|
||||
uid: index
|
||||
})
|
||||
});
|
||||
this.listImagUrls = arr;
|
||||
})
|
||||
|
||||
|
||||
|
||||
});
|
||||
this.listImagUrls = arr;
|
||||
});
|
||||
}
|
||||
close(): void {
|
||||
this.modal.destroy(true);
|
||||
}
|
||||
userAction() {
|
||||
|
||||
}
|
||||
userAction() {}
|
||||
handlePreview1 = async (file: NzUploadFile) => {
|
||||
if (!file.url && !file.preview) {
|
||||
file.preview = await getBase64(file.originFileObj!);
|
||||
@ -119,14 +110,14 @@ export class ConfirReceiptComponent implements OnInit {
|
||||
case 'done':
|
||||
let fileList = [...info.fileList];
|
||||
// 2. Read from response and show file link
|
||||
console.log(fileList)
|
||||
console.log(fileList);
|
||||
fileList = fileList.map((file: any) => {
|
||||
if (file.response) {
|
||||
file.url = file.response.data.fullFilePath;
|
||||
}
|
||||
return file;
|
||||
});
|
||||
console.log(this.listImagUrls)
|
||||
console.log(this.listImagUrls);
|
||||
break;
|
||||
case 'error':
|
||||
this.service.msgSrv.error('网络错误');
|
||||
|
||||
@ -1,20 +1,22 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 14:03:07
|
||||
* @LastEditTime: 2022-01-17 17:02:31
|
||||
* @LastEditors: your name
|
||||
* @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.html
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-14 14:03:07
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-18 17:21:21
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\bulk\\update-freight\\update-freight.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
<sf #sf [schema]="schema" [ui]="{ '*': { spanLabelFixed: 90, grid: { span: 24 } } }" [button]="'none'"> </sf>
|
||||
<nz-divider style="margin-top: 0"></nz-divider>
|
||||
<div>
|
||||
<p style="font-size: 16px">
|
||||
<span style="font-weight: bolder"
|
||||
>总运费:<span style="color: #dc112a">{{ data.totalFreight |currency }}</span></span
|
||||
>总运费:<span style="color: #dc112a">{{ data.totalFreight | currency }}</span></span
|
||||
>
|
||||
</p>
|
||||
<p style="margin-bottom: 0"> 运输费:{{ data.freight |currency }},附加费:{{ data.surcharge |currency}}</p>
|
||||
<p style="margin-bottom: 0"> 运输费:{{ data.freight | currency }},附加费:{{ data.surcharge | currency }}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button nz-button type="button" (click)="close()">关闭</button>
|
||||
|
||||
@ -1,17 +1,15 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-14 14:03:07
|
||||
* @LastEditTime: 2022-01-17 17:02:25
|
||||
* @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-14 14:03:07
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-18 17:21:33
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\bulk\\update-freight\\update-freight.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
import { Component, Input, OnInit, ViewChild } from '@angular/core';
|
||||
import {
|
||||
SFComponent, SFNumberWidgetSchema, SFSchema,
|
||||
SFSelectWidgetSchema,
|
||||
SFStringWidgetSchema, SFTextWidgetSchema
|
||||
} from '@delon/form';
|
||||
import { SFComponent, SFNumberWidgetSchema, SFSchema, SFSelectWidgetSchema, SFStringWidgetSchema, SFTextWidgetSchema } from '@delon/form';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { OrderManagementService } from '../../../services/order-management.service';
|
||||
@ -29,7 +27,7 @@ export class UpdateFreightComponent implements OnInit {
|
||||
data: any;
|
||||
|
||||
calculateSub!: Subscription;
|
||||
constructor(private service: OrderManagementService,private modal: NzModalRef, ) {}
|
||||
constructor(private service: OrderManagementService, private modal: NzModalRef) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.schema = this.initSF(this.data);
|
||||
@ -47,8 +45,8 @@ export class UpdateFreightComponent implements OnInit {
|
||||
freightPrice: {
|
||||
type: 'number',
|
||||
title: '运费单价',
|
||||
minimum:0,
|
||||
maximum:99999,
|
||||
minimum: 0,
|
||||
maximum: 99999,
|
||||
ui: {
|
||||
addOnAfter: data.freightTypeLabel,
|
||||
placeholder: '请输入',
|
||||
@ -107,8 +105,8 @@ export class UpdateFreightComponent implements OnInit {
|
||||
type: 'number',
|
||||
title: '装货重量',
|
||||
default: data.acceptWeight,
|
||||
minimum:0,
|
||||
maximum:99999,
|
||||
minimum: 0,
|
||||
maximum: 99999,
|
||||
ui: {
|
||||
unit: '吨',
|
||||
placeholder: '请输入',
|
||||
@ -123,8 +121,8 @@ export class UpdateFreightComponent implements OnInit {
|
||||
type: 'number',
|
||||
title: '装货体积',
|
||||
default: data.acceptVolume,
|
||||
minimum:0,
|
||||
maximum:99999,
|
||||
minimum: 0,
|
||||
maximum: 99999,
|
||||
ui: {
|
||||
unit: '吨',
|
||||
placeholder: '请输入',
|
||||
@ -139,8 +137,8 @@ export class UpdateFreightComponent implements OnInit {
|
||||
type: 'number',
|
||||
title: '卸货重量',
|
||||
default: data.settlementWeight,
|
||||
minimum:0,
|
||||
maximum:99999,
|
||||
minimum: 0,
|
||||
maximum: 99999,
|
||||
ui: {
|
||||
unit: '吨',
|
||||
placeholder: '请输入',
|
||||
@ -155,8 +153,8 @@ export class UpdateFreightComponent implements OnInit {
|
||||
type: 'number',
|
||||
title: '卸货体积',
|
||||
default: data.settlementVolume,
|
||||
minimum:0,
|
||||
maximum:99999,
|
||||
minimum: 0,
|
||||
maximum: 99999,
|
||||
ui: {
|
||||
unit: '吨',
|
||||
placeholder: '请输入',
|
||||
@ -207,10 +205,10 @@ export class UpdateFreightComponent implements OnInit {
|
||||
}
|
||||
|
||||
save(value: any): void {
|
||||
if(!this.sf.valid){
|
||||
if (!this.sf.valid) {
|
||||
this.sf.validator({ emitError: true });
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.service.request(this.service.$api_change_bulk, { billId: this.data.billId, ...this.sf.value }).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('变更运费成功');
|
||||
|
||||
Reference in New Issue
Block a user