批量审核

This commit is contained in:
wangshiming
2022-01-18 17:44:03 +08:00
parent a8a9565b40
commit 8bf3a60425
94 changed files with 2205 additions and 2001 deletions

View File

@ -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"

View File

@ -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('网络错误');

View File

@ -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>

View File

@ -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('变更运费成功');

View File

@ -1,27 +1,22 @@
/*
* @Author: your name
* @Date: 2021-12-21 10:14:52
* @LastEditTime: 2022-01-18 16:35:03
* @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\cancel\cancel.component.ts
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2021-12-21 10:14:52
* @LastEditors : Shiming
* @LastEditTime : 2022-01-18 17:21:43
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\cancel\\cancel.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { Component, OnInit, ViewChild } from '@angular/core';
import {
SFComponent,
SFCustomWidgetSchema,
SFNumberWidgetSchema,
SFRadioWidgetSchema,
SFSchema,
SFComponent, SFSchema,
SFTextareaWidgetSchema,
SFUISchema
} from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
import { OrderManagementService } from '../../../services/order-management.service';
@Component({
selector: 'app-order-management-cancel',
templateUrl: './cancel.component.html'
@ -36,7 +31,7 @@ export class OneCarOrderCancelComponent implements OnInit {
ngOnInit(): void {
this.initSF();
console.log(this.i.billStatusLabel)
console.log(this.i.billStatusLabel);
}
initSF() {
this.schema = {

View File

@ -1,10 +1,12 @@
<!--
* @Author: your name
* @Date: 2021-12-15 13:17:42
* @LastEditTime: 2022-01-12 14:04:38
* @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\confir-receipt\confir-receipt.component.html
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2021-12-15 13:17:42
* @LastEditors : Shiming
* @LastEditTime : 2022-01-18 17:21:57
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\confir-receipt\\confir-receipt.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<nz-alert
style="padding-bottom: 15px"
@ -18,10 +20,10 @@
<st #st [widthMode]="{ type: 'strict' }" [data]="costDetail" [columns]="columns" bordered="true" [page]="{ show: false }"></st>
</sv>
<sv label="司机车辆">
<div>{{dataInfo?.driverName}} / {{dataInfo?.driverPhone}}/ {{dataInfo?.carNo}}</div>
<div>{{ dataInfo?.driverName }} / {{ dataInfo?.driverPhone }}/ {{ dataInfo?.carNo }}</div>
</sv>
<sv label="收款人">
<div>{{dataInfo?.payeeName}} / {{dataInfo?.payeePhone}}</div>
<div>{{ dataInfo?.payeeName }} / {{ dataInfo?.payeePhone }}</div>
</sv>
<sv label="回单凭证">
<nz-upload

View File

@ -1,30 +1,21 @@
/*
* @Author: your name
* @Date: 2021-12-15 13:17:42
* @LastEditTime: 2022-01-18 16:35:11
* @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\confir-receipt\confir-receipt.component.ts
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2021-12-15 13:17:42
* @LastEditors : Shiming
* @LastEditTime : 2022-01-18 17:22:10
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\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 { NzUploadChangeParam, NzUploadFile } from 'ng-zorro-antd/upload';
import { Component, OnInit } from '@angular/core';
import { STColumn } from '@delon/abc/st';
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 { STColumn } from '@delon/abc/st';
import { OrderManagementService } from '../../../services/order-management.service';
function getBase64(file: File): Promise<string | ArrayBuffer | null> {
return new Promise((resolve, reject) => {
const reader = new FileReader();
@ -40,47 +31,52 @@ function getBase64(file: File): Promise<string | ArrayBuffer | null> {
})
export class VehicleConfirReceiptComponent implements OnInit {
record: any = {};
i:any;
Status: any
costDetail: any // 费用明细
i: any;
Status: any;
costDetail: any; // 费用明细
columns!: STColumn[];
previewVisible1 = false;
dataInfo: any;
detailList: any
detailList: any;
data: any = {};
previewImage1 = '';
listImagUrls: any[] = [];
payeeList: any;
driverList: any;
carList: any;
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.initST()
this.initData()
this.initST();
this.initData();
}
save(): void {
let imgList : any= [];
if(this.listImagUrls.length > 0) {
this.listImagUrls.forEach((res :any) => {
if(res.url) {
imgList.push(res.url)
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,
}
filePathList: imgList
};
this.service.request(this.service.$api_get_signWholeOrder, params).subscribe((res: any) => {
console.log(res)
if(res) {
this.service.msgSrv.success('确认签收成功!')
console.log(res);
if (res) {
this.service.msgSrv.success('确认签收成功!');
this.modal.destroy();
}
})
});
}
handlePreview1 = async (file: NzUploadFile) => {
if (!file.url && !file.preview) {
@ -92,7 +88,7 @@ export class VehicleConfirReceiptComponent implements OnInit {
close(): void {
this.modal.destroy();
}
beforeUpload = (file: NzUploadFile, _fileList: NzUploadFile[]) => {
return new Observable((observer: Observer<boolean>) => {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/gif' || file.type === 'image/bmp';
@ -114,35 +110,35 @@ export class VehicleConfirReceiptComponent implements OnInit {
};
initData() {
// 大宗
this.service.request(this.service.$api_get_getWholeSignForDetail, {id: this.i?.id}).subscribe((res: any) => {
console.log(res)
this.dataInfo = res;
const cost: any = {}
res.mybidDetailInfo.forEach((element: any) => {
if(element.expenseName === "预付" || element.expenseCode === 'PRE') {
cost.PRE = element.price
} else if(element.expenseName === "到付" || element.expenseCode === 'RECE') {
cost.RECE = element.price
} else if(element.expenseName === "回单付" || element.expenseCode === 'BACK') {
cost.BACK = element.price
} else if(element.expenseName === "油卡" || element.expenseCode === 'OIL') {
cost.OIL = element.price
} else if(element.expenseName === "总费用") {
cost.traiPrice = element.price
}
});
let arr : any= []
res.filePathList.forEach((element: any, index: any) => {
console.log(index)
arr.push( {
this.service.request(this.service.$api_get_getWholeSignForDetail, { id: this.i?.id }).subscribe((res: any) => {
console.log(res);
this.dataInfo = res;
const cost: any = {};
res.mybidDetailInfo.forEach((element: any) => {
if (element.expenseName === '预付' || element.expenseCode === 'PRE') {
cost.PRE = element.price;
} else if (element.expenseName === '到付' || element.expenseCode === 'RECE') {
cost.RECE = element.price;
} else if (element.expenseName === '回单付' || element.expenseCode === 'BACK') {
cost.BACK = element.price;
} else if (element.expenseName === '油卡' || element.expenseCode === 'OIL') {
cost.OIL = element.price;
} else if (element.expenseName === '总费用') {
cost.traiPrice = element.price;
}
});
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.costDetail = [cost];
})
});
this.listImagUrls = arr;
this.costDetail = [cost];
});
}
initST() {
@ -169,7 +165,7 @@ export class VehicleConfirReceiptComponent implements OnInit {
}
];
}
handleChange1(info: NzUploadChangeParam): void {
switch (info.file.status) {
case 'uploading':
@ -177,19 +173,18 @@ export class VehicleConfirReceiptComponent 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('网络错误');
break;
}
}
}

View File

@ -1,13 +1,15 @@
<!--
* @Author: your name
* @Date: 2021-12-15 13:17:42
* @LastEditTime: 2021-12-29 20:23:18
* @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 16:48:16
* @LastEditors : Shiming
* @LastEditTime : 2022-01-18 17:22:24
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\freight-people\\freight-people.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)" [disabled]="sf?.valid">确定</button>

View File

@ -1,19 +1,19 @@
import { Params } from '@angular/router';
/*
* @Author: your name
* @Date: 2021-12-14 14:03:07
* @LastEditTime: 2022-01-17 16:20:06
* @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 16:48:16
* @LastEditors : Shiming
* @LastEditTime : 2022-01-18 17:22:37
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\freight-people\\freight-people.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { Component, Input, OnInit, ViewChild } from '@angular/core';
import {SFComponent, SFNumberWidgetSchema, SFSchema, SFUISchema} from '@delon/form';
import { Component, OnInit, ViewChild } from '@angular/core';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { ShipperBaseService } from '@shared';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { OrderManagementService } from '../../../services/order-management.service';
import { ShipperBaseService } from '@shared';
@Component({
selector: 'app-order-management-vehicle-freight-people',
@ -33,11 +33,11 @@ export class VehicleFreightPeopleComponent implements OnInit {
private modal: NzModalRef,
private msgSrv: NzMessageService,
public service: OrderManagementService,
public shipperservice: ShipperBaseService,
) {}
public shipperservice: ShipperBaseService
) {}
ngOnInit(): void {
console.log(this.data)
console.log(this.data);
this.initSF();
}
initSF() {
@ -50,12 +50,12 @@ export class VehicleFreightPeopleComponent implements OnInit {
widget: 'select',
placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value,
_$expand: (value: boolean) => value
},
allowClear: true,
asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
},
},
asyncData: () => this.shipperservice.getNetworkFreightForwarder()
}
}
},
required: ['enterpriseInfoName']
};
@ -68,12 +68,12 @@ export class VehicleFreightPeopleComponent implements OnInit {
}
save(value: any): void {
console.log(this.sf.value)
console.log(this.sf.value);
const params = {
billIds: this.data?.ids,
enterpriseInfoId: this.sf.value?.enterpriseInfoName
};
console.log(params)
console.log(params);
this.service.request(this.service.$api_set_updateEnterpriseInfoBatch, params).subscribe((res: any) => {
if (res) {
this.modal.destroy();
@ -85,5 +85,4 @@ export class VehicleFreightPeopleComponent implements OnInit {
close(): void {
this.modal.destroy();
}
}

View File

@ -1,45 +1,38 @@
<!--
* @Author: your name
* @Date: 2021-12-15 13:17:42
* @LastEditTime: 2022-01-05 16:38:21
* @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 17:27:37
* @LastEditors : Shiming
* @LastEditTime : 2022-01-18 17:22:55
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\modify-captain\\modify-captain.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<nz-alert nzType="info" [nzMessage]="'已选择' + data?.ids?.length + '条订单,未认证司机不可设置为车队长合同单车队长需绑定收款账户'" nzShowIcon></nz-alert>
<nz-alert
nzType="info"
[nzMessage]="'已选择' + data?.ids?.length + '条订单,未认证司机不可设置为车队长合同单车队长需绑定收款账户'"
nzShowIcon
></nz-alert>
<div nz-row>
<div nz-col [nzSpan]="16">
<sf style="margin-top: 15px;" #sf mode="edit" [schema]="schema" [ui]="ui" button='none'>
</sf>
</div>
<div nz-col [nzSpan]="1" style="margin-top: 15px;" >
<button style="display: inline-block;" nz-button nzType="primary" (click)="initDate()">搜索</button>
<sf style="margin-top: 15px" #sf mode="edit" [schema]="schema" [ui]="ui" button="none"> </sf>
</div>
<div nz-col [nzSpan]="1" style="margin-top: 15px">
<button style="display: inline-block" nz-button nzType="primary" (click)="initDate()">搜索</button>
</div>
</div>
<st #st
[data]="dataList"
[columns]="Columns"
[loadingDelay]="500"
>
<st #st [data]="dataList" [columns]="Columns" [loadingDelay]="500">
<ng-template st-row="avatar" let-item let-index="index">
<img style="height: 20px;" [src]="item?.avatar" alt="">
<img style="height: 20px" [src]="item?.avatar" alt="" />
</ng-template>
<ng-template st-row="bankList" let-item let-index="index">
<nz-select [(ngModel)]="bankData" style="width: 200px;">
<nz-option
*ngFor="let i of item.bankList"
[nzLabel]="i.bankCardNumber"
[nzValue]="i.id"
></nz-option>
<nz-select [(ngModel)]="bankData" style="width: 200px">
<nz-option *ngFor="let i of item.bankList" [nzLabel]="i.bankCardNumber" [nzValue]="i.id"></nz-option>
</nz-select>
</ng-template>
<ng-template st-row="paymentMethodRate" let-item let-index="index">
<input nz-input [ngModel]="item?.paymentMethodRate" (ngModelChange)="st.setRow(index, { paymentMethodRate: $event })" />
<input nz-input [ngModel]="item?.paymentMethodRate" (ngModelChange)="st.setRow(index, { paymentMethodRate: $event })" />
</ng-template>
</st>
<!-- <div class="modal-footer">
<button nz-button type="button" (click)="close()">关闭</button>
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [disabled]="sf.valid">确定</button>
</div> -->
</st>

View File

@ -1,14 +1,16 @@
/*
* @Author: your name
* @Date: 2021-12-14 14:03:07
* @LastEditTime: 2022-01-05 16:27:22
* @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-30 14:45:39
* @LastEditors : Shiming
* @LastEditTime : 2022-01-18 17:23:11
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\modify-captain\\modify-captain.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { Component, Input, OnInit, ViewChild } from '@angular/core';
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import {SFComponent, SFNumberWidgetSchema, SFSchema, SFUISchema} from '@delon/form';
import { SFComponent, 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';
@ -23,16 +25,16 @@ export class VehicleModifyCaptainComponent implements OnInit {
@ViewChild('st', { static: false }) st!: STComponent;
schema: SFSchema = {};
ui: SFUISchema = {};
Columns: STColumn[] =[]
Columns: STColumn[] = [];
aggreechecked = false;
dataList: any =[]
dataList: any = [];
data: any;
bankData: any;
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService, ) {}
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService) {}
ngOnInit(): void {
console.log(this.data)
console.log(this.data);
this.initSF();
this.initST();
}
@ -43,7 +45,7 @@ export class VehicleModifyCaptainComponent implements OnInit {
type: 'string',
title: '车队长手机号',
maxLength: 11
},
}
},
required: ['mobile']
};
@ -56,9 +58,9 @@ export class VehicleModifyCaptainComponent implements OnInit {
}
initST() {
this.Columns = [
{ title: '司机头像', render: 'avatar',width: '120px', },
{ title: '司机姓名', index: 'name' ,width: '120px',},
{
{ title: '司机头像', render: 'avatar', width: '120px' },
{ title: '司机姓名', index: 'name', width: '120px' },
{
title: '实名认证状态',
className: 'text-center',
index: 'certificationStatus',
@ -68,11 +70,11 @@ export class VehicleModifyCaptainComponent implements OnInit {
'-1': { text: '未提交', color: 'warning' },
'0': { text: '待审核', color: 'warning' },
'1': { text: '通过', color: 'success' },
'2': { text: '驳回', color: 'error' },
},
'2': { text: '驳回', color: 'error' }
}
},
{ title: '收款账户',width: '200px', render: 'bankList' },
{
{ title: '收款账户', width: '200px', render: 'bankList' },
{
title: '操作',
width: '120px',
className: 'text-center',
@ -80,19 +82,18 @@ export class VehicleModifyCaptainComponent implements OnInit {
{
text: '设置',
click: item => {
this.set(item)
this.set(item);
}
}
]
}
];
}
set(value: any): void {
console.log(this.st?._data)
console.log(this.data)
console.log(value)
console.log(this.bankData)
];
}
set(value: any): void {
console.log(this.st?._data);
console.log(this.data);
console.log(value);
console.log(this.bankData);
const params = {
billIds: this.data?.ids,
carCaptainId: value.id,
@ -110,12 +111,12 @@ export class VehicleModifyCaptainComponent implements OnInit {
initDate() {
const params = {
fetchBank: 1,
...this.sf?.value,
...this.sf?.value
};
this.service.request(this.service.$api_get_getCarCaptainByMobile, params).subscribe((res: any) => {
console.log(res)
console.log(res);
if (res) {
this.dataList = [res]
this.dataList = [res];
}
});
}

View File

@ -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>

View File

@ -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();
}
}

View File

@ -1,29 +1,30 @@
<!--
* @Author: your name
* @Date: 2021-12-14 15:53:03
* @LastEditTime: 2021-12-20 19:53:23
* @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\sure-depart\sure-depart.component.html
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2021-12-15 13:17:42
* @LastEditors : Shiming
* @LastEditTime : 2022-01-18 17:23:52
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\sure-arrive\\sure-arrive.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="formData" button="none">
<ng-template sf-template="weight" let-me let-ui="ui" let-schema="schema">
<div style="display: flex;">
<nz-input-number [(ngModel)]="data.weight" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
<div class="left_btn"></div>
<div style="display: flex">
<nz-input-number [(ngModel)]="data.weight" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
<div class="left_btn"></div>
</div>
</ng-template>
</ng-template>
<ng-template sf-template="volume" let-me let-ui="ui" let-schema="schema">
<div style="display: flex;">
<nz-input-number [(ngModel)]="data.volume" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
<div class="left_btn"></div>
<div style="display: flex">
<nz-input-number [(ngModel)]="data.volume" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
<div class="left_btn"></div>
</div>
</ng-template>
</ng-template>
</sf>
<div class="modal-footer">
<button nz-button type="button" (click)="close()">关闭</button>
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [nzLoading]="http.loading"
>确认到车</button
>
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [nzLoading]="http.loading">确认到车</button>
</div>

View File

@ -1,29 +1,30 @@
<!--
* @Author: your name
* @Date: 2021-12-14 15:53:03
* @LastEditTime: 2021-12-21 18:55:37
* @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\sure-depart\sure-depart.component.html
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2021-12-15 13:17:42
* @LastEditors : Shiming
* @LastEditTime : 2022-01-18 17:24:01
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\sure-depart\\sure-depart.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="i" button="none">
<ng-template sf-template="weight" let-me let-ui="ui" let-schema="schema">
<div style="display: flex;">
<nz-input-number [(ngModel)]="data.weight" [nzMin]="1" [nzMax]="999999" [nzStep]="1"></nz-input-number>
<div class="left_btn"></div>
<div style="display: flex">
<nz-input-number [(ngModel)]="data.weight" [nzMin]="1" [nzMax]="999999" [nzStep]="1"></nz-input-number>
<div class="left_btn"></div>
</div>
</ng-template>
</ng-template>
<ng-template sf-template="volume" let-me let-ui="ui" let-schema="schema">
<div style="display: flex;">
<nz-input-number [(ngModel)]="data.volume" [nzMin]="1" [nzMax]="999999" [nzStep]="1"></nz-input-number>
<div class="left_btn"></div>
<div style="display: flex">
<nz-input-number [(ngModel)]="data.volume" [nzMin]="1" [nzMax]="999999" [nzStep]="1"></nz-input-number>
<div class="left_btn"></div>
</div>
</ng-template>
</ng-template>
</sf>
<div class="modal-footer">
<button nz-button type="button" (click)="close()">关闭</button>
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [nzLoading]="http.loading"
>确认发车</button
>
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [nzLoading]="http.loading">确认发车</button>
</div>

View File

@ -1,11 +1,14 @@
<!--
* @Author: your name
* @Date: 2021-12-15 13:17:42
* @LastEditTime: 2022-01-17 14:52:34
* @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-15 13:17:42
* @LastEditors : Shiming
* @LastEditTime : 2022-01-18 17:24:08
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\update-freight\\update-freight.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<sf #sf mode="edit" [schema]="schema" [ui]="ui" button="none"></sf>
<nz-divider></nz-divider>
<div>
@ -13,7 +16,7 @@
<span style="font-weight: bolder"
>总运费:<span style="color: #dc112a">{{ data.totalFreight | currency }}</span></span
>
(运输费:{{ data.freight | currency }},附加费:{{ data.surcharge | currency}}
(运输费:{{ data.freight | currency }},附加费:{{ data.surcharge | currency }}
</p>
<p>
<label nz-checkbox [(ngModel)]="aggreechecked">确认已阅读并知晓<a>《变更协议》</a></label>

View File

@ -1,28 +1,19 @@
import { preloaderFinished } from '@delon/theme';
/*
* @Author: your name
* @Date: 2021-12-14 14:03:07
* @LastEditTime: 2022-01-13 15:26:14
* @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-15 13:17:42
* @LastEditors : Shiming
* @LastEditTime : 2022-01-18 17:24:18
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\update-freight\\update-freight.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, SFTextareaWidgetSchema, 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';
import { Subscription } from 'rxjs';
import { OrderManagementService } from '../../../services/order-management.service';
@Component({
selector: 'app-order-management-vehicle-update-freight',
@ -58,8 +49,8 @@ export class VehicleUpdateFreightComponent implements OnInit {
type: 'number',
title: '预付',
default: info.prePay?.price || 0,
minimum:0,
maximum:99999,
minimum: 0,
maximum: 99999,
readOnly: info.prePay?.paymentStatus === '2' || info.prePay?.paymentStatus === '4',
ui: {
prefix: '¥',
@ -72,8 +63,8 @@ export class VehicleUpdateFreightComponent implements OnInit {
type: 'number',
title: '到付',
default: info.toPay?.price || 0,
minimum:0,
maximum:99999,
minimum: 0,
maximum: 99999,
readOnly: info.toPay?.paymentStatus === '2' || info.toPay?.paymentStatus === '4',
ui: {
prefix: '¥',
@ -86,7 +77,7 @@ export class VehicleUpdateFreightComponent implements OnInit {
// type: 'number',
// title: '油卡',
// default: 0.0,
// minimum:0,
// minimum:0,
// readOnly: this.i.oilCardPayStatus === '1' || this.i.oilCardPayStatus === '3',
// ui: {
// prefix: '¥',
@ -98,9 +89,9 @@ export class VehicleUpdateFreightComponent implements OnInit {
receiptPay: {
type: 'number',
title: '回单付',
maximum:99999,
maximum: 99999,
default: info.receiptPay?.price || 0,
minimum:0,
minimum: 0,
readOnly: info.receiptPay?.paymentStatus === '2' || info.receiptPay?.paymentStatus === '4',
ui: {
prefix: '¥',
@ -130,7 +121,7 @@ export class VehicleUpdateFreightComponent implements OnInit {
}
save(value: any): void {
if(!this.sf.valid) {
if (!this.sf.valid) {
this.service.msgSrv.error('请填写必填项!');
return;
}