车辆对接

This commit is contained in:
wangshiming
2022-01-12 10:52:46 +08:00
parent bb5006f723
commit 7465b4f643
5 changed files with 134 additions and 55 deletions

View File

@ -14,15 +14,13 @@ import { OrderManagementService } from '../../services/order-management.service'
})
export class OrderManagementComplaintDetailComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sfView', { static: false }) sfView!: SFComponent;
ui: SFUISchema = {};
uiView: SFUISchema = {};
isVisibleRE = false;
channelId: any;
schema: SFSchema = {};
// abnormalReason = [
// '司机装货轨迹异常',
// '司机卸货轨迹异常',
// '车辆装货轨迹异常',
// '司机位置未移动或运输途中未打开APP',
// '运单轨迹严重异常'
// ]
schemaView: SFSchema = {};
i: any;
datailList: any;
id: string = '';
@ -35,13 +33,32 @@ export class OrderManagementComplaintDetailComponent implements OnInit {
{
this.getDetail(this.id);
this.initSF();
this.initSTAudit()
}
}
initSTAudit() {
this.schemaView = {
properties: {
handleResult: {
title: '处理结果',
type: 'string',
maxLength: 50,
ui: {
placeholder: '最多不超过50字',
widget: 'textarea',
autosize: { minRows: 3, maxRows: 6 }
},
},
},
required: ['handleResult']
};
this.uiView = { '*': { spanLabelFixed: 110, grid: { span: 24 } } };
}
initSF() {
this.schema = {
properties: {
complaintCause: {
complaintCauseLabel: {
title: '投诉原因',
type: 'string',
maxLength: 30,
@ -124,5 +141,73 @@ export class OrderManagementComplaintDetailComponent implements OnInit {
goBack() {
window.history.go(-1)
}
/*
* 审核关闭弹窗
view: 1
浮动费用: 0
查看评价: 3
*/
handleCancel(type: string) {
const paramsa = {
...this.sfView.value,
handleStatus: 0,
id: this.channelId
}
this.service.request(this.service.$api_get_dealWithComplaint, paramsa).subscribe((res: any) =>{
console.log(res)
if(res) {
this.service.msgSrv.success('已拒绝!')
this.isVisibleRE = false
this.getDetail(this.id);
} else{
this.service.msgSrv.error(res?.msg)
}
})
this.isVisibleRE = false
}
Cancel() {
this.isVisibleRE = false
}
handleCancel2() {
const paramsa = {
id: this.channelId
}
this.service.request(this.service.$api_get_canelComplaint, paramsa).subscribe((res: any) =>{
console.log(res)
if(res) {
this.service.msgSrv.success('已拒绝!')
this.isVisibleRE = false
this.getDetail(this.id);
} else{
this.service.msgSrv.error(res?.msg)
}
})
this.isVisibleRE = false
}
/**
* 审核通过按钮
*/
handleOK() {
const paramsa = {
...this.sfView.value,
handleStatus: 1,
id: this.channelId
}
this.service.request(this.service.$api_get_dealWithComplaint, paramsa).subscribe((res: any) =>{
console.log(res)
if(res) {
this.service.msgSrv.success('已通过!')
this.isVisibleRE = false
this.getDetail(this.id);
} else{
this.service.msgSrv.error(res?.msg)
}
})
}
viewEvaluate() {
this.isVisibleRE = true
this.channelId = this.id;
}
}