车辆对接
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-15 13:17:42
|
||||
* @LastEditTime: 2021-12-21 14:50:54
|
||||
* @LastEditTime: 2021-12-22 19:19: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\vehicle\confir-receipt\confir-receipt.component.ts
|
||||
@ -61,10 +61,24 @@ export class VehicleConfirReceiptComponent implements OnInit {
|
||||
}
|
||||
|
||||
save(): void {
|
||||
this.service.request(this.service.$api_get_signWholeOrder, {id: this.i?.id}).subscribe((res: any) => {
|
||||
let imgList : any= [];
|
||||
if(this.listImagUrls.length > 0) {
|
||||
this.listImagUrls.forEach((res :any) => {
|
||||
if(res.url) {
|
||||
imgList.push(res.url)
|
||||
}
|
||||
})
|
||||
}
|
||||
console.log(imgList)
|
||||
const params = {
|
||||
id: this.i?.id,
|
||||
filePathList: imgList,
|
||||
}
|
||||
this.service.request(this.service.$api_get_signWholeOrder, params).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
if(res) {
|
||||
this.service.msgSrv.success('确认签收成功!')
|
||||
this.modal.destroy();
|
||||
} else {
|
||||
this.service.msgSrv.error(res.msg)
|
||||
}
|
||||
@ -101,16 +115,6 @@ export class VehicleConfirReceiptComponent implements OnInit {
|
||||
});
|
||||
};
|
||||
initData() {
|
||||
// if (this.i?.receiptCertificate?.length > 0) {
|
||||
// this.i?.receiptCertificate.forEach((element: any) => {
|
||||
// const image = {
|
||||
// url: element,
|
||||
// status: 'done',
|
||||
// uid: '-1'
|
||||
// };
|
||||
// this.listImagUrls.push(image);
|
||||
// });
|
||||
// }
|
||||
// 大宗
|
||||
this.service.request(this.service.$api_get_getWholeSignForDetail, {id: this.i?.id}).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
@ -129,6 +133,16 @@ export class VehicleConfirReceiptComponent implements OnInit {
|
||||
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.service.request(this.service.$api_getUserDetailByAppUserId, {id: this.dataInfo?.payeeId}).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
this.payeeList = res;
|
||||
@ -176,15 +190,16 @@ export class VehicleConfirReceiptComponent implements OnInit {
|
||||
case 'uploading':
|
||||
break;
|
||||
case 'done':
|
||||
const resData = info.file.response.data;
|
||||
const arr = [
|
||||
{
|
||||
url: resData.fullFilePath,
|
||||
status: 'done',
|
||||
uid: '-1'
|
||||
let fileList = [...info.fileList];
|
||||
// 2. Read from response and show file link
|
||||
console.log(fileList)
|
||||
fileList = fileList.map((file: any) => {
|
||||
if (file.response) {
|
||||
file.url = file.response.data.fullFilePath;
|
||||
}
|
||||
];
|
||||
this.listImagUrls = arr;
|
||||
return file;
|
||||
});
|
||||
console.log(this.listImagUrls)
|
||||
break;
|
||||
case 'error':
|
||||
this.service.msgSrv.error('网络错误');
|
||||
|
||||
Reference in New Issue
Block a user