@@ -1,5 +1,5 @@ | |||
import {navTo,msg} from "@/utils/utils" | |||
import {cancelCancel} from "@/utils/network/api.js"; | |||
import {cancelCancel,customerInfoChangeCancel,vehicleInfoChangeCancel,changeCardObuViewCancel} from "@/utils/network/api.js"; | |||
import {requestNew} from "@/utils/network/request.js"; | |||
// 售后更换设备去支付 | |||
@@ -10,21 +10,49 @@ export const pay=(orderId,orderType)=>{ | |||
} | |||
// 注销 待支付 取消订单 | |||
export const signout=(orderId,orderType)=>{ | |||
var api="" | |||
var data={} | |||
if(orderType=='VEHICLEINFOCHANGE'){ | |||
api=vehicleInfoChangeCancel | |||
data= { | |||
orderId: orderId | |||
} | |||
}else if(orderType=='SIGNOUT'){ | |||
api=cancelCancel | |||
data= { | |||
orderId: orderId | |||
} | |||
}else if(orderType=='EXCHANGE_CARD' || orderType=='EXCHANGE_OBU' || orderType=='EXCHANGE_ALL'){ | |||
api=changeCardObuViewCancel | |||
data= { | |||
id: orderId | |||
} | |||
}else if(orderType=='CUSTOMERINFOCHANGE'){ | |||
api=customerInfoChangeCancel | |||
data= { | |||
orderId: orderId | |||
} | |||
} | |||
let options = { | |||
type: 2, | |||
data: { | |||
orderId: orderId | |||
}, //请求参数 | |||
data:data, //请求参数 | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
//调用方式 | |||
requestNew(cancelCancel, options).then((res) => { | |||
msg('取消成功') | |||
requestNew(api, options).then((res) => { | |||
msg("取消成功", { | |||
'duration': 2000 | |||
}) | |||
setTimeout(() => { | |||
uni.navigateBack({ | |||
delta:2 | |||
}) | |||
}, 2000) | |||
}) | |||
.catch((err) => { | |||
console.log(err, '错误'); |
@@ -165,22 +165,21 @@ import { deviceType } from "@/utils/network/difference"; | |||
source = "WECHAT" | |||
// #endif | |||
var data={} | |||
if(state.type=="5"){ | |||
if(state.type=="36"){ | |||
data = { | |||
deviceStatus:[1,2,3,4,5,6,7],//挂失解挂设备状态 | |||
}; | |||
}else if(state.type=="5"){ | |||
data = { | |||
opId: getItem(StorageKeys.OpenId), | |||
loginSource:getItem("loginSource"), | |||
deviceStatus:[1,6],//挂失解挂设备状态 | |||
}; | |||
}else if(state.type=="8"){ | |||
data = { | |||
opId: getItem(StorageKeys.OpenId), | |||
loginSource:getItem("loginSource"), | |||
deviceStatus:[2],//解除挂起 | |||
}; | |||
}else{ | |||
data = { | |||
opId: getItem(StorageKeys.OpenId), | |||
loginSource:getItem("loginSource"), | |||
}; | |||
} | |||
@@ -64,7 +64,8 @@ | |||
// VEHICLE_TYPE_NOTMATCH("车型不符",6){}, | |||
// CARD_BALANCE_INSUFFICIENT("储值卡余额不足",7){}, | |||
for (var i = 0; i < getData.length; i++) { | |||
if (getData[i]['status'] == '1' && (getData[i]['type'] == 4 || getData[i]['type'] == 5 || getData[i]['type'] == 6 || getData[i]['type'] == 7)) { | |||
// if (getData[i]['status'] == 1 && (getData[i]['type'] == 4 || getData[i]['type'] == 5 || getData[i]['type'] == 6 || getData[i]['type'] == 7)) { | |||
if (getData[i]['status'] == 1) { | |||
newData.push(getData[i]) | |||
} | |||
} |
@@ -8,10 +8,13 @@ | |||
<view><text>订单ID:</text><text>{{state.params['orderNo']}}</text></view> | |||
<view><text>业务类型:</text><text>{{state.params['businessTypeC']}}</text></view> | |||
<view><text>用户名称:</text><text>{{state.params['customerName']}}</text></view> | |||
<view><text>审核状态:</text><text>{{state.params['statusC']}}</text></view> | |||
<view><text>审核状态:</text><text>{{state.params['auditStatusStr']}}</text></view> | |||
<view><text>订单状态:</text><text>{{state.params['orderStatusStr']}}</text></view> | |||
<view><text>订单阶段:</text><text>{{state.params['orderStepStr']}}</text></view> | |||
<view v-if="state.params['orderStepValue']"><text>订单状态:</text><text>{{state.params['orderStepValue']}}</text></view> | |||
<view v-if="state.params['reason']"><text>原因:</text><text>{{state.params['reason']}}</text></view> | |||
<view><text>申请时间:</text><text>{{state.params['insertTime']}}</text></view> | |||
<view><text>申请时间:</text><text>{{state.params['applyTime']}}</text></view> | |||
<view v-if="state.params['auditTime']"><text>审核时间:</text><text>{{state.params['auditTime']}}</text></view> | |||
<view v-if="state.params['address']"><text>邮寄地址:</text><text>{{state.params['address']}}</text></view> | |||
<view class="btns"> | |||
<view class="btn btn-primary" v-if="state.params['orderStep']=='WAIT_PAY'" @click="pay(state.params['orderNo'],state.params['orderType'])">支付</view> | |||
@@ -21,7 +24,9 @@ | |||
<view class="btn btn-primary" @click="activateSH(state.params)">去激活</view> | |||
</view> | |||
<!-- 注销 待支付 取消订单 --> | |||
<view class="btn btn-primary" v-if="state.params['orderStep']=='WAIT_PAY' && state.params['orderType']=='SIGNOUT'" @click="signout(state.params['orderNo'])">取消</view> | |||
<view class="btn btn-primary" v-if="(state.params['orderStep']=='WAIT_PAY' || state.params['orderStep']=='AUDIT') && state.params['orderType']=='SIGNOUT'" @click="signout(state.params['orderNo'],state.params['orderType'])">取消</view> | |||
<!-- 待审核 取消 (卡签挂失没有) --> | |||
<view class="btn btn-primary" v-if="state.params['orderStep']=='AUDIT' && (state.params['orderType']=='CUSTOMERINFOCHANGE' || state.params['orderType']=='VEHICLEINFOCHANGE' || state.params['orderType']=='EXCHANGE_CARD' || state.params['orderType']=='EXCHANGE_OBU'|| state.params['orderType']=='EXCHANGE_ALL')" @click="signout(state.params['id'],state.params['orderType'])">取消</view> | |||
</view> | |||
</view> | |||
</view> | |||
@@ -32,18 +37,86 @@ | |||
import { reactive } from "vue"; | |||
import { onLoad } from "@dcloudio/uni-app"; | |||
import { pay,signout,gotoConfirmReceiptSH,activateSH,gotoExchangeOrder } from "@/composables/afterSale.js"; | |||
import { vehicleInfoChangeView,cancelView,changeCardObuView,changeCardObuViewAfter,cardObuLossView,customerInfoChangeView} from "@/utils/network/api.js"; | |||
import {requestNew } from "@/utils/network/request.js"; | |||
import {vehiclePlateColor,getVehiclePlateColorPai } from "@/datas/vehiclePlateColor"; | |||
import { getItem, StorageKeys } from "@/utils/storage"; | |||
const state = reactive({ | |||
params: {}, //上一个页面传递过来的参数 | |||
promoteName: "", //产品名称 | |||
promoteId: "",//产品编号 | |||
tableData: [], | |||
paramsdData:{}, | |||
businessRange:[] | |||
}); | |||
onLoad((options) => { | |||
state.params = JSON.parse(decodeURIComponent(options.params)) | |||
console.log("options.promoteId", state.params) | |||
let getBusiness = getItem('key')['BUSINESSAPP_TYPE']; | |||
for (var k = 0; k < getBusiness.length; k++) { | |||
let obj = {}; | |||
obj['value'] = getBusiness[k]['code'] | |||
obj['text'] = getBusiness[k]['name'] | |||
state.businessRange.push(obj) | |||
} | |||
state.paramsdData = JSON.parse(decodeURIComponent(options.params)) | |||
search(state.paramsdData.orderType) | |||
console.log("options.promoteId", state.paramsdData) | |||
}) | |||
const search = (orderType) => { | |||
// 车辆信息变更-VEHICLEINFOCHANGE | |||
// 用户信息变更-CUSTOMERINFOCHANGE | |||
// 注销-SIGNOUT | |||
// 单卡挂失-CARDLOSS 单签挂失-OBULOSS 卡签挂失-CARDOBULOSS | |||
// 设备更换(换卡签-卡-EXCHANGE_CARD 换卡签-签-EXCHANGE_OBU 换卡签-卡签-EXCHANGE_ALL) | |||
var api="" | |||
var data={} | |||
if(orderType=='VEHICLEINFOCHANGE'){ | |||
api=vehicleInfoChangeView | |||
data={ | |||
orderNo: state.paramsdData.orderNo | |||
} | |||
}else if(orderType=='SIGNOUT'){ | |||
api=cancelView | |||
data={ | |||
id: state.paramsdData.id | |||
} | |||
}else if(orderType=='EXCHANGE_CARD' || orderType=='EXCHANGE_OBU' || orderType=='EXCHANGE_ALL'){ | |||
api=changeCardObuViewAfter | |||
data={ | |||
id: state.paramsdData.id | |||
} | |||
}else if(orderType=='CARDLOSS' || orderType=='OBULOSS' || orderType=='CARDOBULOSS'){ | |||
api=cardObuLossView | |||
data={ | |||
id: state.paramsdData.id | |||
} | |||
}else if(orderType=='CUSTOMERINFOCHANGE'){ | |||
api=customerInfoChangeView | |||
data={ | |||
id: state.paramsdData.id | |||
} | |||
} | |||
const options = { | |||
type: 2, | |||
data: data, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
requestNew(api, options).then((res) => { | |||
console.log("res==",res) | |||
for (var i in res) { | |||
res['vehiclePlateColorC']=getVehiclePlateColorPai(res['vehiclePlateColor']) | |||
for (var m = 0; m < state.businessRange.length; m++) { | |||
if (res['orderType'] == state.businessRange[m]['value']) { | |||
res['businessTypeC'] = state.businessRange[m]['text'] | |||
break; | |||
} | |||
} | |||
} | |||
state.params=res | |||
}) | |||
} | |||
</script> | |||
<style scoped> |
@@ -6,6 +6,11 @@ | |||
<uni-data-select v-model="state.businessTypeVal" :localdata="state.businessRange" | |||
@change="changeBusiness" :clear="false"></uni-data-select> | |||
</view> | |||
<view class="item last"> | |||
<text>状态:</text> | |||
<uni-data-select v-model="state.status" :localdata="state.statusArr" | |||
@change="changeStatus" :clear="false"></uni-data-select> | |||
</view> | |||
<view class="example-body"> | |||
<uni-datetime-picker v-model="state.range" type="daterange" /> | |||
<button size="mini" style="color: #ffffff; | |||
@@ -77,7 +82,7 @@ | |||
state.vehiclePlateColorArr.push(obj2) | |||
} | |||
// 审核状态 | |||
let getStatusArr = getItem('key')['AUDIT_STATUS']; | |||
let getStatusArr = getItem('key')['AUDIT_STATUS_BUSINESS_NEW']; | |||
for (var k = 0; k < getStatusArr.length; k++) { | |||
let obj1 = {}; | |||
obj1['value'] = getStatusArr[k]['code'] | |||
@@ -85,7 +90,7 @@ | |||
state.statusArr.push(obj1) | |||
} | |||
// 业务类型 | |||
let getBusiness = getItem('key')['BUSINESS_TYPE']; | |||
let getBusiness = getItem('key')['BUSINESSAPP_TYPE']; | |||
for (var k = 0; k < getBusiness.length; k++) { | |||
let obj = {}; | |||
obj['value'] = getBusiness[k]['code'] | |||
@@ -94,7 +99,7 @@ | |||
} | |||
state.vehiclePlate = option.vehiclePlate | |||
state.vehiclePlateColor = option.vehiclePlateColor | |||
// search(1) | |||
console.log("state.businessRange",state.businessRange,state.statusArr) | |||
}) | |||
const changeColor = (e) => { | |||
@@ -120,10 +125,10 @@ | |||
var data = { | |||
vehiclePlate: state.vehiclePlate, | |||
vehiclePlateColor: state.vehiclePlateColor, | |||
status: state.status, | |||
orderStep: state.status, | |||
businessType: state.businessTypeVal, | |||
startTime: state.range[0] ? state.range[0] + '00:00:00' : state.range[0], | |||
endTime: state.range[1] ? state.range[1] + '00:00:00' : state.range[1], | |||
startTime: state.range[0] ? state.range[0] + ' 00:00:00' : state.range[0], | |||
endTime: state.range[1] ? state.range[1] + ' 00:00:00' : state.range[1], | |||
pageNo: state.pageNo, | |||
pageSize: state.pageSize, | |||
}; | |||
@@ -146,13 +151,13 @@ | |||
for (var i = 0; i < getData.length; i++) { | |||
getData[i]['vehiclePlateColorC'] = getVehiclePlateColorPai(getData[i]['vehiclePlateColor']) | |||
if (getData[i]['status'] == 'AUDIT') { | |||
getData[i]['statusC'] = "审核中" | |||
getData[i]['statusC'] = "待审核" | |||
} else if (getData[i]['status'] == 'FAIL') { | |||
getData[i]['statusC'] = "未通过" | |||
getData[i]['statusC'] = "审核不通过" | |||
} else if (getData[i]['status'] == 'COMPLETE') { | |||
getData[i]['statusC'] = "审核通过" | |||
}else if (getData[i]['status'] == 'NO_AUDIT') { | |||
getData[i]['statusC'] = "机审" | |||
getData[i]['statusC'] = "系统审核" | |||
} | |||
console.log("state.businessRange",state.businessRange) | |||
for (var m = 0; m < state.businessRange.length; m++) { | |||
@@ -202,7 +207,6 @@ | |||
padding: 0 20rpx 20rpx 20rpx; | |||
box-sizing: border-box; | |||
z-index: 999999; | |||
height: 170rpx; | |||
} | |||
.content { | |||
@@ -224,7 +228,7 @@ | |||
.uni-container { | |||
margin: 50rpx 0; | |||
margin-top: 180rpx; | |||
margin-top: 250rpx; | |||
} | |||
/deep/.uni-table-th, |
@@ -280,8 +280,16 @@ export const getUserMsg = "/iaw/api/userInfoQuery/queryIdNum" //通过opneId查 | |||
export const orderExchange = '/iaw/issue/order/replaceGoodsFill'; //订单申请换货 | |||
export const orderReturn = '/iaw/issue/order/refundGoodsApply'; //订单申请退货 | |||
// 业务审核进度查询 | |||
export const generalAuditQuery= "/iaw/api/afterSale/generalAudit/query" //业务审核查询 | |||
export const generalAuditQuery= "/iaw/api/afterSale/generalAudit/queryApp" //业务审核查询 | |||
export const generalAuditListVehicle= "/iaw/api/afterSale/generalAudit/listVehicle" //业务审核查询车辆列表 | |||
export const vehicleInfoChangeView= "/iaw/aftersale/vehicleInfoChange/view" //业务审核查询详情 车辆信息变更 | |||
export const vehicleInfoChangeCancel= "/iaw/aftersale/vehicleInfoChange/cancel" //业务审核取消 车辆信息变更 | |||
export const cancelView= "/iaw/aftersale/cancel/view" //业务审核查询详情 注销 | |||
export const changeCardObuViewAfter= "/iaw/api/afterSale/changeCardObu/view" //业务审核查询详情 设备更换 | |||
export const changeCardObuViewCancel= "/iaw/api/afterSale/changeCardObu/cancel" //业务审核取消 设备更换 | |||
export const cardObuLossView= "/iaw/api/afterSale/cardObuLoss/view" //业务审核查询详情 卡签挂失 | |||
export const customerInfoChangeView= "/iaw/aftersale/customerInfoChange/view" //业务审核查询详情 用户信息变更 | |||
export const customerInfoChangeCancel= "/iaw/aftersale/customerInfoChange/cancel" //业务审核取消 用户信息变更 | |||
// ocr | |||
export const idCardOcr= "/iaw/ocr/idCardOcr" //身份证OCR识别 | |||
export const vehicleLicenseOcr= "/iaw/ocr/vehicleLicenseOcr" //车辆行驶证OCR识别 |