request(businessApi, options).then((res) => { | request(businessApi, options).then((res) => { | ||||
const data = stringToJson(res.bizContent); | const data = stringToJson(res.bizContent); | ||||
// state.listData = []; | |||||
state.listData = [...stringToJson(res.bizContent).data, ...state.listData] | state.listData = [...stringToJson(res.bizContent).data, ...state.listData] | ||||
// state.listData = data.data | |||||
state.total = data.data.length | state.total = data.data.length | ||||
console.log("业务完成日志", state.listData, state.pageNo,) | console.log("业务完成日志", state.listData, state.pageNo,) | ||||
}); | }); |
办理成功 | 办理成功 | ||||
</view> | </view> | ||||
<view class=""> | <view class=""> | ||||
您办理的卡签挂失业务已完成 | |||||
您办理的{{state.successTip}}业务已完成 | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
</template> | </template> | ||||
<script setup lang="ts"> | <script setup lang="ts"> | ||||
import { reactive } from "vue" | |||||
import { | |||||
onLoad | |||||
} from "@dcloudio/uni-app"; | |||||
const state = reactive({ | |||||
successTip: "" //成功提示 | |||||
}); | |||||
onLoad((option) => { | |||||
console.log("option.successTip", option.successTip) | |||||
state.successTip = option.successTip | |||||
}) | |||||
const submit = () => { | const submit = () => { | ||||
let routes = getCurrentPages(); | let routes = getCurrentPages(); | ||||
uni.navigateBack({ | uni.navigateBack({ | ||||
left: 50%; | left: 50%; | ||||
transform: translate(-50%); | transform: translate(-50%); | ||||
} | } | ||||
</style> | |||||
</style> |
} from "@/utils/utils" | } from "@/utils/utils" | ||||
import { | import { | ||||
onLoad, | onLoad, | ||||
onUnload | |||||
onUnload, | |||||
onShow | |||||
} from "@dcloudio/uni-app"; | } from "@dcloudio/uni-app"; | ||||
import { | import { | ||||
request | request | ||||
} from "@/utils/network/encryption"; | } from "@/utils/network/encryption"; | ||||
const state = reactive({ | const state = reactive({ | ||||
id: "", | |||||
data: { | data: { | ||||
cardStatus: undefined, | cardStatus: undefined, | ||||
obuStatus: undefined, | obuStatus: undefined, | ||||
} | |||||
}, | |||||
successTip: "" //成功提示 | |||||
}); | }); | ||||
const flag = reactive([]) | const flag = reactive([]) | ||||
const type = ref('') | const type = ref('') | ||||
/*视图进入后操作*/ | /*视图进入后操作*/ | ||||
onLoad((option) => { | |||||
queryOrderDetail(option.id).then((val: any) => { | |||||
onShow(() => { | |||||
queryOrderDetail(state.id).then((val : any) => { | |||||
state.data = val | state.data = val | ||||
}) | }) | ||||
}) | |||||
onLoad((option) => { | |||||
state.id = option.id | |||||
/*监听手机号验证后的回调*/ | /*监听手机号验证后的回调*/ | ||||
uni.$on('queryCardlossStatus', function(type) { | |||||
queryCardlossStatusType(type.type).then((val: any) => { | |||||
uni.$on('queryCardlossStatus', function (type) { | |||||
console.log("1111", type) | |||||
queryCardlossStatusType(type.type).then((val : any) => { | |||||
console.log("val", val) | |||||
navTo( | navTo( | ||||
`/subpackage/after-sale/card-loss-reporting/card-result` | |||||
`/subpackage/after-sale/card-loss-reporting/card-result?successTip=${type.successTip}` | |||||
) | ) | ||||
}); | }); | ||||
}) | }) | ||||
showModelAction('卡签解挂', '请确认是否执行卡签解挂操作', 6) | showModelAction('卡签解挂', '请确认是否执行卡签解挂操作', 6) | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
const showModelAction = (title, content, type) => { | const showModelAction = (title, content, type) => { | ||||
uni.showModal({ | uni.showModal({ | ||||
title: title, | title: title, | ||||
content: content, | content: content, | ||||
success: function(res) { | |||||
success: function (res) { | |||||
if (res.confirm) { | if (res.confirm) { | ||||
navTo( | navTo( | ||||
`/subpackage/after-sale/card-loss-reporting/cardloss?type=${type}&&mobile=${state.data.customerTel}` | |||||
`/subpackage/after-sale/card-loss-reporting/cardloss?type=${type}&&mobile=${state.data.customerTel}&&successTip=${title}` | |||||
) | ) | ||||
} | } | ||||
reject(error); | reject(error); | ||||
}); | }); | ||||
} | } | ||||
const queryCardlossStatusType = (val: any) => { | |||||
const queryCardlossStatusType = (val : any) => { | |||||
var data = { | var data = { | ||||
cardId: state.data.cardId, | cardId: state.data.cardId, | ||||
obuId: state.data.obuId, | obuId: state.data.obuId, | ||||
line-height: 80rpx; | line-height: 80rpx; | ||||
} | } | ||||
} | } | ||||
</style> | |||||
</style> |
mobile: "", | mobile: "", | ||||
code: '', | code: '', | ||||
type: undefined, | type: undefined, | ||||
successTip: "" | |||||
}); | }); | ||||
//倒计时时常 | //倒计时时常 | ||||
}; | }; | ||||
onLoad((options) => { | onLoad((options) => { | ||||
console.log("optionsssss", options) | |||||
form.type = options.type | form.type = options.type | ||||
form.mobile = options.mobile | form.mobile = options.mobile | ||||
form.successTip = options.successTip | |||||
}); | }); | ||||
const getCode = () => { | const getCode = () => { | ||||
.then((res) => { | .then((res) => { | ||||
uni.$emit('queryCardlossStatus', { | uni.$emit('queryCardlossStatus', { | ||||
type: form.type | |||||
type: form.type, | |||||
successTip: form.successTip | |||||
}) | }) | ||||
uni.navigateBack() | uni.navigateBack() | ||||
}) | }) |
<view class="title"> 识别内容如下 </view> | <view class="title"> 识别内容如下 </view> | ||||
<u-form label-width="200" :model="state.form" ref="uForm"> | <u-form label-width="200" :model="state.form" ref="uForm"> | ||||
<u-form-item label="车牌号"> | <u-form-item label="车牌号"> | ||||
<u-input v-model="state.form.vehicleId" /> | |||||
<u-input v-model="state.form.vehicleId" @input="getVehiclePlate" /> | |||||
</u-form-item> | </u-form-item> | ||||
<u-form-item label="车牌颜色"> | <u-form-item label="车牌颜色"> | ||||
<u-input v-model="state.form.caridCorlor" type="select" @click="show1 = true" /> | <u-input v-model="state.form.caridCorlor" type="select" @click="show1 = true" /> | ||||
}, | }, | ||||
orderId: "", | orderId: "", | ||||
isMyPeopple: true, | isMyPeopple: true, | ||||
buchongData: { | |||||
conmpany: "李某一", | |||||
type: "居民身份证", | |||||
card: "23728347626342332", | |||||
phone: "", | |||||
}, | |||||
actionSheetList: [{ | actionSheetList: [{ | ||||
label: "蓝色", | label: "蓝色", | ||||
value: '0', | value: '0', | ||||
proxyUrl: "", //委托书 | proxyUrl: "", //委托书 | ||||
} | } | ||||
}); | }); | ||||
const getVehiclePlate = (e) => { | |||||
console.log("车牌号", e) | |||||
state.FormData.vehiclePlate = e | |||||
}; | |||||
const savaHandle = () => { | const savaHandle = () => { | ||||
if (state.FormData.idcardFrontImgUrl && state.FormData.idcardBacktImgUrl) { | if (state.FormData.idcardFrontImgUrl && state.FormData.idcardBacktImgUrl) { | ||||
if (state.FormData.vehPosImgUrl && state.FormData.vehNegImgUrl) { | if (state.FormData.vehPosImgUrl && state.FormData.vehNegImgUrl) { | ||||
if (state.FormData.peopleVehicleImgUrl) { | if (state.FormData.peopleVehicleImgUrl) { | ||||
if (state.FormData.vehiclePlate && state.FormData.vehiclePlatecolor) { | |||||
if (state.FormData.vehiclePlate && state.FormData.vehiclePlatecolor.toString()) { | |||||
state.FormData.vehiclePlatecolor = Number(state.FormData.vehiclePlatecolor) | state.FormData.vehiclePlatecolor = Number(state.FormData.vehiclePlatecolor) | ||||
let data = JSON.stringify(state.FormData) | let data = JSON.stringify(state.FormData) | ||||
navTo(`/subpackage/after-sale/rescind-carId/verification?fromData=${data}`); | navTo(`/subpackage/after-sale/rescind-carId/verification?fromData=${data}`); | ||||
icon: "none" | icon: "none" | ||||
}) | }) | ||||
} | } | ||||
console.log(JSON.stringify(state.FormData)); | console.log(JSON.stringify(state.FormData)); | ||||
// var data = state.form | // var data = state.form | ||||
// const options = { | // const options = { |
<template> | <template> | ||||
<view class="formBox"> | <view class="formBox"> | ||||
<!-- <view class="from_item"> | |||||
<text class="label">账号验证</text> | |||||
<input type="text" placeholder="输入验证码" v-model="model1.uname" placeholder-style="color:#000"> | |||||
</view> --> | |||||
<view class="from_item"> | <view class="from_item"> | ||||
<text class="label">手机号码</text> | <text class="label">手机号码</text> | ||||
<input type="number" placeholder="" v-model="model1.mobile" placeholder-style="color:#000" maxlength="11"> | |||||
<input type="number" placeholder="请输入手机号码" v-model="model1.mobile" placeholder-style="color:#9a9a9a" | |||||
maxlength="11"> | |||||
</view> | </view> | ||||
<view class="from_item"> | <view class="from_item"> | ||||
<text class="label">验证码</text> | <text class="label">验证码</text> | ||||
<input type="text" placeholder="请输入验证码" v-model="model1.code" placeholder-style="color:#000"> | |||||
<input type="text" placeholder="请输入验证码" v-model="model1.code" placeholder-style="color:#9a9a9a"> | |||||
<text class="btn" @click="getCode" v-if="waitTime==0">获取验证码</text> | <text class="btn" @click="getCode" v-if="waitTime==0">获取验证码</text> | ||||
<text class="btn" v-else>{{waitTime}}</text> | <text class="btn" v-else>{{waitTime}}</text> | ||||
</view> | </view> | ||||
font-size: 32rpx; | font-size: 32rpx; | ||||
font-family: Microsoft YaHei; | font-family: Microsoft YaHei; | ||||
font-weight: 400; | font-weight: 400; | ||||
color: #333333; | |||||
color: #9a9a9a; | |||||
line-height: 58rpx; | line-height: 58rpx; | ||||
border-bottom: 1rpx solid #DCDCDC; | border-bottom: 1rpx solid #DCDCDC; | ||||
margin-top: 50rpx; | margin-top: 50rpx; |
return; | return; | ||||
} | } | ||||
if (!state.form.department) { | if (!state.form.department) { | ||||
msg('请输入部门名称'); | |||||
return; | |||||
} | |||||
if (!state.form.userIdNum) { | |||||
msg('请输入社会信用代码'); | msg('请输入社会信用代码'); | ||||
return; | return; | ||||
} | } | ||||
} | } | ||||
//如果未登录||新用户 | //如果未登录||新用户 | ||||
// if (!getItem('openId')) { | |||||
let data = { | |||||
userType: "ENTERPRISE", | |||||
idNum: state.form.userIdNum, | |||||
idType: state.form.userIdType, | |||||
mobile: state.form.tel, | |||||
userName: state.form.userName, | |||||
gender: 'UNKOWN', | |||||
certifyChannel: "BAIDUOCR", | |||||
address: state.form.address, | |||||
agentIdNum: state.form.agentIdNum, | |||||
agentIdType: state.form.agentIdType, | |||||
agentName: state.form.agentName, | |||||
department: state.form.department, | |||||
userIdImgUrl: state.form.posImgUrl, | |||||
userIdImgBase64: "", | |||||
} | |||||
const options = { | |||||
type: 2, | |||||
data: data, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(register, options).then((res) => { | |||||
let result = stringToJson(res.bizContent); | |||||
if (result.accessToken && result.openId) { | |||||
setItem('token', result.accessToken) | |||||
setItem('openId', result.openId) | |||||
state.form.opId = result.openId; | |||||
let data = state.form; | |||||
const options = { | |||||
type: 2, | |||||
data: data, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(etcCompanyCardInfoSubmit, options).then((res) => { | |||||
// let result = stringToJson(res.bizContent); | |||||
console.log(res); | |||||
uni.redirectTo({ | |||||
url: `/subpackage/orders/car-release?orderId=${state.orderId}&vehiclePlateColor=${state.vehiclePlateColor}&type=1&isSign=${state.isSign}`, | |||||
}); | |||||
}); | |||||
if (!getItem('openId')) { | |||||
let data = { | |||||
userType: "ENTERPRISE", | |||||
idNum: state.form.userIdNum, | |||||
idType: state.form.userIdType, | |||||
mobile: state.form.tel, | |||||
userName: state.form.userName, | |||||
gender: 'UNKOWN', | |||||
certifyChannel: "BAIDUOCR", | |||||
address: state.form.address, | |||||
agentIdNum: state.form.agentIdNum, | |||||
agentIdType: state.form.agentIdType, | |||||
agentName: state.form.agentName, | |||||
department: state.form.department, | |||||
userIdImgUrl: state.form.posImgUrl, | |||||
userIdImgBase64: "", | |||||
} | } | ||||
}) | |||||
const options = { | |||||
type: 2, | |||||
data: data, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(register, options).then((res) => { | |||||
let result = stringToJson(res.bizContent); | |||||
if (result.accessToken && result.openId) { | |||||
setItem('token', result.accessToken) | |||||
setItem('openId', result.openId) | |||||
state.form.opId = result.openId; | |||||
let data = state.form; | |||||
const options = { | |||||
type: 2, | |||||
data: data, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(etcCompanyCardInfoSubmit, options).then((res) => { | |||||
// let result = stringToJson(res.bizContent); | |||||
console.log(res); | |||||
uni.redirectTo({ | |||||
url: `/subpackage/orders/car-release?orderId=${state.orderId}&vehiclePlateColor=${state.vehiclePlateColor}&type=1&isSign=${state.isSign}`, | |||||
}); | |||||
}); | |||||
} | |||||
}) | |||||
// }else{ | |||||
// var data = state.form; | |||||
// const options = { | |||||
// type: 2, | |||||
// data: data, | |||||
// method: "POST", | |||||
// showLoading: true, | |||||
// }; | |||||
// request(etcCompanyCardInfoSubmit, options).then((res) => { | |||||
// const data = stringToJson(res.bizContent); | |||||
// uni.redirectTo({ | |||||
// url: `/subpackage/orders/car-release?orderId=${state.orderId}&&vehiclePlateColor=${state.vehiclePlateColor}&isSign=${state.isSign}`, | |||||
// }); | |||||
// }); | |||||
// } | |||||
} else { | |||||
var data = state.form; | |||||
const options = { | |||||
type: 2, | |||||
data: data, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(etcCompanyCardInfoSubmit, options).then((res) => { | |||||
const data = stringToJson(res.bizContent); | |||||
uni.redirectTo({ | |||||
url: `/subpackage/orders/car-release?orderId=${state.orderId}&&vehiclePlateColor=${state.vehiclePlateColor}&isSign=${state.isSign}`, | |||||
}); | |||||
}); | |||||
} | |||||
}; | }; | ||||