@@ -204,8 +204,7 @@ | |||
<view v-if="item.type === 10" style="width: 100%" :class="item.bg ? 'bg' : 'notbg'"> | |||
<view class="as-layout-horizontal" style="align-items: center"> | |||
<picker mode="region" @change="handleGetRegion($event, item)" :value="item.region" | |||
disabled> | |||
<picker mode="region" @change="handleGetRegion($event, item)" :value="item.region"> | |||
<view class="uni-input"> | |||
{{item.region?item.region[0]+item.region[1]+item.region[2]:""}} | |||
</view> | |||
@@ -236,7 +235,12 @@ | |||
<view class="divider" v-if="item.divider"></view> | |||
</view> | |||
</view> | |||
<view v-if="config.submitName=='申请换货'" class="message"> | |||
<view><text class="red">*</text>设备更换需将原设备寄回</view> | |||
<view>寄回信息:</view> | |||
<view>收件人:ETC售后 联系电话:18798751224(此电话仅用于ETC售后收取快递,如需咨询业务请致电4008008787)</view> | |||
<view>寄回地址:贵州省贵阳市云岩区普天广场11楼</view> | |||
</view> | |||
<view class="subBtn"> | |||
<submit-button :title="config ? config.submitName : '提交'" form-type="submit" | |||
@submit="formSubmit"></submit-button> | |||
@@ -707,4 +711,15 @@ | |||
color: #646464; | |||
font-size: 28rpx; | |||
} | |||
.red { | |||
color: red; | |||
margin-right: 10rpx; | |||
} | |||
.message { | |||
font-size: 30rpx; | |||
margin-top: 30rpx; | |||
padding: 0 20rpx; | |||
} | |||
</style> |
@@ -201,39 +201,46 @@ | |||
// query.in(this) | |||
query.select('.container').boundingClientRect((rect : any) => { | |||
if (rect) { | |||
// 获取图片信息 | |||
uni.getImageInfo({ | |||
src: src, | |||
success: (imgS) => { | |||
console.log('输出内容', imgS.width, imgS.height) | |||
// canvas.drawImage(img, 起始 x 坐标, 起始 y 坐标, 宽度, 高度, 绘制到 Canvas 的起始 x 坐标, 绘制到 Canvas 的起始 y 坐标, 裁剪后的宽度, 裁剪后的高度); | |||
context.drawImage(src, rect.left + 30, rect.top + 140, rect.width * 1.8, rect.height * 1.8, rect.left, rect.top, rect.width, rect.height); | |||
context.draw(false, () => { | |||
uni.canvasToTempFilePath({ | |||
canvasId: canvasId, | |||
x: rect.left, | |||
y: rect.top, | |||
width: rect.width, | |||
height: rect.height, | |||
destWidth: rect.width, | |||
destHeight: rect.height, | |||
success(res : any) { | |||
// res.tempFilePath 是转换后的图片路径 | |||
console.log(res.tempFilePath); | |||
res.tempImagePath = res.tempFilePath | |||
emit('confirmReturn', res) | |||
}, | |||
fail(err) { | |||
console.error('canvasToTempFilePath failed', err); | |||
} | |||
}, currentInstance.value) | |||
uni.getSystemInfo({ | |||
success: (res) => { | |||
console.log(res, '===============', res.windowHeight, res.windowWidth) | |||
// 获取图片信息 | |||
uni.getImageInfo({ | |||
src: src, | |||
success: (imgS) => { | |||
//((res.windowHeight - res.statusBarHeight) * 0.33) | |||
console.log('====', rect, '输出内容======', imgS.width, imgS.height) //140 1.8(res.windowHeight * 0.23) | |||
// canvas.drawImage(img, 起始 x 坐标, 起始 y 坐标, 宽度, 高度, 绘制到 Canvas 的起始 x 坐标, 绘制到 Canvas 的起始 y 坐标, 裁剪后的宽度, 裁剪后的高度); | |||
context.drawImage(src, imgS.width * 0.1, imgS.height * 0.3, rect.width * 2.2, rect.height * 2.2, rect.left, rect.top, rect.width, rect.height); | |||
context.draw(false, () => { | |||
uni.canvasToTempFilePath({ | |||
canvasId: canvasId, | |||
x: rect.left, | |||
y: rect.top, | |||
width: rect.width, | |||
height: rect.height, | |||
destWidth: rect.width, | |||
destHeight: rect.height, | |||
success(res : any) { | |||
// res.tempFilePath 是转换后的图片路径 | |||
console.log("是转换后的图片路径", res.tempFilePath); | |||
res.tempImagePath = res.tempFilePath | |||
emit('confirmReturn', res) | |||
}, | |||
fail(err) { | |||
console.error('canvasToTempFilePath failed', err); | |||
} | |||
}, currentInstance.value) | |||
}); | |||
}, | |||
fail: (error) => { | |||
console.error('获取图片信息失败', error); | |||
}, | |||
}); | |||
}, | |||
fail: (error) => { | |||
console.error('获取图片信息失败', error); | |||
}, | |||
}); | |||
} | |||
}) | |||
//把当前画布指定区域的内容导出生成指定大小的图片,并返回文件路径。在自定义组件下,第二个参数传入自定义组件实例,以操作组件内 <canvas> 组件。 |
@@ -4,7 +4,7 @@ | |||
import { reactive, ref, watch, nextTick, onMounted } from "vue"; | |||
import { request } from "@/utils/network/request.js"; | |||
import { stringToJson } from "@/utils/network/encryption"; | |||
import { onLoad, onUnload, onReachBottom, onPullDownRefresh } from "@dcloudio/uni-app"; | |||
import { onLoad, onUnload, onReachBottom, onPullDownRefresh, onShow } from "@dcloudio/uni-app"; | |||
import { getItem, StorageKeys, setItem } from "@/utils/storage"; | |||
import { hasLogin, msg, timesDiff } from "@/utils/utils"; | |||
import { orderList, appPage } from "@/utils/network/api"; | |||
@@ -77,7 +77,6 @@ export default function useOrderListItem(props) { | |||
} | |||
const changeTab = (tabOption) => { | |||
// setItem('tab', tabOption) | |||
console.log("tabOption", tabOption) | |||
tabName.value = tabOption | |||
refreshList(true) | |||
@@ -205,7 +204,11 @@ export default function useOrderListItem(props) { | |||
onReachBottom(() => { | |||
loadMore(); | |||
}); | |||
onShow(() => { | |||
console.log("一进页面就刷新") | |||
refreshList(true); | |||
}) | |||
return { | |||
config, | |||
params, |
@@ -77,7 +77,7 @@ | |||
affirmPassword: "",//再次输入密码 | |||
phone: "", //手机号 | |||
code: "", //验证码 | |||
pwdHint: "密码不少于10位,必须同时包含数字、大小写字母和特殊符号", | |||
pwdHint: "密码不少于10位,必须同时包含数字、大小写字母和特殊符号,不能使用3个连续字符", | |||
}); | |||
onLoad((options) => { | |||
phone.value = options.phone; |
@@ -67,7 +67,7 @@ | |||
affirmPassword: "",//再次输入密码 | |||
phone: "", //手机号 | |||
code: "", //验证码 | |||
pwdHint: "密码不少于10位,必须同时包含数字、大小写字母和特殊符号", | |||
pwdHint: "密码不少于10位,必须同时包含数字、大小写字母和特殊符号,不能使用3个连续字符", | |||
}); | |||
onLoad((options) => { | |||
phone.value = options.phone; |
@@ -43,7 +43,7 @@ | |||
affirmPassword: "",//再次输入密码 | |||
phone: "", //手机号 | |||
code: "", //验证码 | |||
pwdHint: "密码不少于10位,必须同时包含数字、大小写字母和特殊符号", | |||
pwdHint: "密码不少于10位,必须同时包含数字、大小写字母和特殊符号,不能使用3个连续字符", | |||
}); | |||
onLoad((options) => { |
@@ -89,9 +89,13 @@ | |||
username: "", //用户名 | |||
password: "", //密码 | |||
code: "", //验证码 | |||
back: 0, //从app扫码看协议过来 登录了 还需要回到手机号验证页面 0 是原本的登录 1 要回去的登录 | |||
}); | |||
onLoad(() => { | |||
onLoad((option) => { | |||
if (option.back == 1) { | |||
state.back = option.back | |||
} | |||
uni.$on("login", (data) => { | |||
state.username = data.phone; | |||
}); | |||
@@ -169,9 +173,15 @@ | |||
subscribeMessages(); | |||
msg("登录成功!"); | |||
uni.$emit("refreshOrder"); | |||
uni.switchTab({ | |||
url: '/pages/index/index' | |||
}) | |||
if (state.back == 1) { | |||
uni.navigateBack({ | |||
delta: 1 | |||
}) | |||
} else { | |||
uni.switchTab({ | |||
url: '/pages/index/index' | |||
}) | |||
} | |||
}); | |||
}); | |||
}; |
@@ -1,138 +1,134 @@ | |||
<!-- 注册第3步 --> | |||
<template> | |||
<view class="register-main"> | |||
<view class="title">请设置登录密码</view> | |||
<view class="hint">设置登录密码用于登录</view> | |||
<view class="hint1">密码</view> | |||
<view class="form-input"> | |||
<input | |||
class="input" | |||
v-model="state.password" | |||
placeholder="请输入密码" | |||
placeholder-class="form-placeholder" | |||
:password="state.isPwdType ? true : false" | |||
type="text" | |||
/> | |||
<image | |||
:src="`${$imgUrl}login/${ | |||
<view class="register-main"> | |||
<view class="title">请设置登录密码</view> | |||
<view class="hint">设置登录密码用于登录</view> | |||
<view class="hint1">密码</view> | |||
<view class="form-input"> | |||
<input class="input" v-model="state.password" placeholder="请输入密码" placeholder-class="form-placeholder" | |||
:password="state.isPwdType ? true : false" type="text" /> | |||
<image :src="`${$imgUrl}login/${ | |||
state.isPwdType ? 'icon_eye_close' : 'icon_eye_open' | |||
}.png`" | |||
class="eye" | |||
@click="state.isPwdType = !state.isPwdType" | |||
mode="aspectFill" | |||
></image> | |||
</view> | |||
<view class="hint4">{{ state.pwdHint }}</view> | |||
</view> | |||
<view class="btn"> | |||
<submit-button title="确认注册" @submit="doRegister"></submit-button> | |||
</view> | |||
}.png`" class="eye" @click="state.isPwdType = !state.isPwdType" mode="aspectFill"></image> | |||
</view> | |||
<view class="hint4">{{ state.pwdHint }}</view> | |||
</view> | |||
<view class="btn"> | |||
<submit-button title="确认注册" @submit="doRegister"></submit-button> | |||
</view> | |||
</template> | |||
<script setup lang="ts"> | |||
import { msg, confirm, checkStr } from "@/utils/utils"; | |||
import { reactive } from "vue"; | |||
import { onLoad } from "@dcloudio/uni-app"; | |||
import { request } from "@/utils/network/request"; | |||
import { regist } from "@/utils/network/api"; | |||
const state = reactive({ | |||
isPwdType: true, | |||
password: "", //密码 | |||
phone: "", //手机号 | |||
code: "", //验证码 | |||
pwdHint: "密码不少于10位,必须同时包含数字、大小写字母和特殊符号", | |||
}); | |||
onLoad((options) => { | |||
state.phone = options.phone; | |||
state.code = options.code; | |||
}); | |||
/* 注册 */ | |||
const doRegister = () => { | |||
if (!state.password) { | |||
msg("请输入密码"); | |||
return; | |||
} | |||
const options = { | |||
type: 2, | |||
data: { | |||
loginPass: state.password, | |||
mobile: state.phone, | |||
code: state.code, | |||
nickName: state.phone, | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(regist, options).then((res) => { | |||
confirm( | |||
"注册成功,请登录!", | |||
() => { | |||
uni.$emit("login", { phone: state.phone }); | |||
uni.navigateBack({ delta: 3 }); | |||
}, | |||
"提示", | |||
false | |||
); | |||
}); | |||
}; | |||
import { msg, confirm, checkStr } from "@/utils/utils"; | |||
import { reactive } from "vue"; | |||
import { onLoad } from "@dcloudio/uni-app"; | |||
import { request } from "@/utils/network/request"; | |||
import { regist } from "@/utils/network/api"; | |||
const state = reactive({ | |||
isPwdType: true, | |||
password: "", //密码 | |||
phone: "", //手机号 | |||
code: "", //验证码 | |||
pwdHint: "密码不少于10位,必须同时包含数字、大小写字母和特殊符号,不能使用3个连续字符", | |||
}); | |||
onLoad((options) => { | |||
state.phone = options.phone; | |||
state.code = options.code; | |||
}); | |||
/* 注册 */ | |||
const doRegister = () => { | |||
if (!state.password) { | |||
msg("请输入密码"); | |||
return; | |||
} | |||
const options = { | |||
type: 2, | |||
data: { | |||
loginPass: state.password, | |||
mobile: state.phone, | |||
code: state.code, | |||
nickName: state.phone, | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(regist, options).then((res) => { | |||
confirm( | |||
"注册成功,请登录!", | |||
() => { | |||
uni.$emit("login", { phone: state.phone }); | |||
uni.navigateBack({ delta: 3 }); | |||
}, | |||
"提示", | |||
false | |||
); | |||
}); | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.register-main { | |||
border-top: 1rpx solid #dcdcdc; | |||
padding: 78rpx 30rpx 50rpx; | |||
.title { | |||
font-size: 32rpx; | |||
color: #333333; | |||
font-weight: 600; | |||
} | |||
.hint { | |||
font-size: 24rpx; | |||
color: #999999; | |||
margin-top: 20rpx; | |||
} | |||
.hint1 { | |||
color: #333333; | |||
font-size: 28rpx; | |||
margin-top: 100rpx; | |||
font-weight: 600; | |||
} | |||
.hint4 { | |||
margin-top: 30rpx; | |||
font-size: 26rpx; | |||
color: #00b38b; | |||
} | |||
} | |||
.form-input { | |||
display: flex; | |||
flex-direction: row; | |||
align-items: center; | |||
height: 90rpx; | |||
margin-top: 30rpx; | |||
border-bottom: 1rpx solid #dcdcdc; | |||
color: #333333; | |||
.input { | |||
flex: 1; | |||
padding-right: 48rpx; | |||
font-size: 26rpx; | |||
background: transparent; | |||
} | |||
.eye { | |||
width: 48rpx; | |||
height: 48rpx; | |||
} | |||
} | |||
.form-placeholder { | |||
color: #999999; | |||
} | |||
.btn { | |||
margin: 150rpx 40rpx 0px; | |||
} | |||
</style> | |||
.register-main { | |||
border-top: 1rpx solid #dcdcdc; | |||
padding: 78rpx 30rpx 50rpx; | |||
.title { | |||
font-size: 32rpx; | |||
color: #333333; | |||
font-weight: 600; | |||
} | |||
.hint { | |||
font-size: 24rpx; | |||
color: #999999; | |||
margin-top: 20rpx; | |||
} | |||
.hint1 { | |||
color: #333333; | |||
font-size: 28rpx; | |||
margin-top: 100rpx; | |||
font-weight: 600; | |||
} | |||
.hint4 { | |||
margin-top: 30rpx; | |||
font-size: 26rpx; | |||
color: #00b38b; | |||
} | |||
} | |||
.form-input { | |||
display: flex; | |||
flex-direction: row; | |||
align-items: center; | |||
height: 90rpx; | |||
margin-top: 30rpx; | |||
border-bottom: 1rpx solid #dcdcdc; | |||
color: #333333; | |||
.input { | |||
flex: 1; | |||
padding-right: 48rpx; | |||
font-size: 26rpx; | |||
background: transparent; | |||
} | |||
.eye { | |||
width: 48rpx; | |||
height: 48rpx; | |||
} | |||
} | |||
.form-placeholder { | |||
color: #999999; | |||
} | |||
.btn { | |||
margin: 150rpx 40rpx 0px; | |||
} | |||
</style> |
@@ -173,10 +173,7 @@ | |||
}) | |||
const { changeTab, config, refreshList } = useOrderListItem(props); | |||
onShow(() => { | |||
refreshList(true); | |||
}) | |||
onLoad((option) => { | |||
// 一进来就调一遍 | |||
changeTab(state.tabActive) |
@@ -205,7 +205,7 @@ | |||
courierCompany: '', | |||
courierOrderId: '', | |||
receiveMethod: '1', | |||
postCode: '', | |||
postalCode: '', | |||
receiveMethodName: '邮寄', //0 --- 不邮寄 1 --- 邮寄 | |||
applyRes: '', | |||
defaultAddress: 2 | |||
@@ -274,7 +274,7 @@ | |||
form.consigneeTel = val.consigneeTel | |||
form.address = val.address | |||
form.region = val.region | |||
form.postCode = val.postalCode | |||
form.postalCode = val.postalCode | |||
form.defaultAddress = val.defaultAddress | |||
address.show = false | |||
console.log("form.address", form.region, form.address) | |||
@@ -397,7 +397,7 @@ | |||
form.consigneeTel = defaultAddress.consigneeTel | |||
form.address = defaultAddress.address | |||
form.region = defaultAddress.region | |||
form.postCode = defaultAddress.postalCode | |||
form.postalCode = defaultAddress.postalCode | |||
form.defaultAddress = defaultAddress.defaultAddress | |||
} | |||
console.log("form.address", form.address) | |||
@@ -427,7 +427,7 @@ | |||
consigneeTel: form.consigneeTel, | |||
address: form.address, | |||
region: form.region, | |||
postCode: form.postCode, | |||
postalCode: form.postalCode, | |||
applyRes: form.applyRes | |||
}; | |||
const options = { |
@@ -209,7 +209,7 @@ | |||
star: true, | |||
divider: true, | |||
hide: true, | |||
disabled: true, | |||
// disabled: true, | |||
}, | |||
{ | |||
title: "邮政编码:", |
@@ -207,7 +207,10 @@ | |||
"您申办的ETC订单已申请退货", | |||
() => { | |||
uni.$emit("refreshOrder"); | |||
uni.navigateBack(); | |||
// uni.navigateBack(); | |||
uni.switchTab({ | |||
url: "/pages/order/order" | |||
}) | |||
}, | |||
"申请成功", | |||
false |
@@ -35,7 +35,7 @@ | |||
<image v-else class="icon" :src="strReplace(state.form.vehNegImgUrl)"></image> | |||
</view> | |||
</view> | |||
<view class="picture-wrapper" @click="cardFileImageUpdate()"> | |||
<view class="picture-wrapper" @click="cardFileImageUpdate(1)"> | |||
<view class="bg"> | |||
<view class=""> | |||
<view class="name"> 车头照 </view> | |||
@@ -49,6 +49,32 @@ | |||
<image v-else class="icon" :src="strReplace(state.form.vehBodyUrl)"></image> | |||
</view> | |||
</view> | |||
<view class="uni-list tractor"> | |||
<radio-group @change="radioChange" v-if="state.form.type=='2'"> | |||
<text class="title">是否是牵引车</text> | |||
<label style="margin-right: 60rpx;" class="uni-list-cell uni-list-cell-pd " | |||
v-for="(item, index) in state.items" :key="item.value"> | |||
<radio :value="item.value" :checked="index === state.current" />{{item.name}} | |||
</label> | |||
</radio-group> | |||
</view> | |||
<!-- 货车 牵引车 需要传道路运输许可证--> | |||
<view class="picture-wrapper" v-if="state.form.type=='2' && state.form.tractorSign==1" | |||
@click="cardFileImageUpdate(2)"> | |||
<view class="bg"> | |||
<view class=""> | |||
<view class="name"> 道路运输许可证 </view> | |||
<view class="value"> 上传道路运输许可证 </view> | |||
<view class="tip"> | |||
<view class="tip-value"> 拍摄规范 </view> | |||
</view> | |||
</view> | |||
<image v-if="!state.form.roadTransportPermitPicUrl" class="icon" | |||
:src="`${$imgUrl}applyCard/chetou.png`"> | |||
</image> | |||
<image v-else class="icon" :src="strReplace(state.form.roadTransportPermitPicUrl)"></image> | |||
</view> | |||
</view> | |||
<view class="shibie-wrapper"> | |||
<view class="title"> 识别内容如下 </view> | |||
<view class=""> | |||
@@ -250,13 +276,17 @@ | |||
const camera = () => { | |||
state.phoneType = 0 | |||
} | |||
//提交车辆信息 | |||
const savaHandle = () => { | |||
if (!state.form.vehBodyUrl) { | |||
msg("请上传车头照"); | |||
return; | |||
} | |||
console.log("state.form.tractorSign", state.form.tractorSign, state.form.roadTransportPermitPicUrl) | |||
if (state.form.tractorSign == 1 && !state.form.roadTransportPermitPicUrl) { | |||
msg("请上传道路运输许可证"); | |||
return; | |||
} | |||
if (state.form.type == 1) { | |||
state.form.axleCount = 2; | |||
} else { | |||
@@ -329,6 +359,10 @@ | |||
msg("请上传车头照"); | |||
return; | |||
} | |||
if (state.form.tractorSign == 1 && !state.form.roadTransportPermitPicUrl) { | |||
msg("请上传道路运输许可证"); | |||
return; | |||
} | |||
if (state.form.type == 1) { | |||
state.form.axleCount = 2; | |||
} else { | |||
@@ -370,15 +404,20 @@ | |||
state.form.useUserTypeName = item.text; | |||
state.actionSheetShow = false; | |||
} | |||
//车头照图片上传 | |||
const cardFileImageUpdate = () => { | |||
//车头照图片上传 val 1 车头照 2 道路运输证 | |||
const cardFileImageUpdate = (val) => { | |||
uni.chooseImage({ | |||
count: 1, //只能选取一张照片 | |||
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有 | |||
sourceType: ["camera", "album"], //从相册选择 | |||
success: function (res) { | |||
uploadFile(res.tempFilePaths[0], "", "").then((data) => { | |||
state.form.vehBodyUrl = data; | |||
if (val == 1) { | |||
state.form.vehBodyUrl = data; | |||
} else { | |||
state.form.roadTransportPermitPicUrl = data; | |||
} | |||
}) | |||
}, | |||
}); | |||
@@ -408,7 +447,7 @@ | |||
issueDate: "请输入发证日期", //发证日期 | |||
vehPosImgUrl: "", //行驶证正面 | |||
vehNegImgUrl: "", //行驶证证反面 | |||
type: "0", //0,客车 1.货车 | |||
type: "0", //1,客车 2.货车 | |||
useUserType: 0, //车辆用户类型 | |||
useUserTypeName: "普通车", | |||
vehicleSign: 2, //前/后装标识 | |||
@@ -438,7 +477,9 @@ | |||
licenseIdNum: "", //经营许可证编号 | |||
vehBodyUrl: "", //车身照片 | |||
proxyUrl: "", //委托书地址 | |||
roadTransportPermitPicUrl: "", //道路运输许可证 | |||
opId: "", | |||
tractorSign: 0, //是否是牵引车 1 是 0 不是 | |||
}, | |||
vehiclePlateColor: undefined, | |||
orderId: "", | |||
@@ -448,15 +489,22 @@ | |||
outlineL: "", | |||
outlineW: "", | |||
outlineH: "", | |||
isSign: '', | |||
isEnableChangeOCRCarInfo: true, //申办时是否允许修改OCR识别出来的车辆信息数据 | |||
items: [{ | |||
value: '1', | |||
name: '是', | |||
}, | |||
{ | |||
value: '0', | |||
name: '否', | |||
checked: 'true' | |||
}], | |||
current: 1, | |||
}); | |||
onLoad((option : any) => { | |||
state.form.orderId = option.orderId; | |||
// state.type = option.type; | |||
state.form.type = option.type; | |||
state.vehiclePlateColor = option.vehiclePlateColor; | |||
state.isSign = option.isSign | |||
console.log("option", option) | |||
getGlobalParam(); | |||
if (option.type == 1) { | |||
@@ -660,6 +708,16 @@ | |||
const cancle = () => { | |||
state.isTakePhotoModeShow = false | |||
} | |||
const radioChange = (evt) => { | |||
console.log("evt.detail.value", evt.detail.value) | |||
for (let i = 0; i < state.items.length; i++) { | |||
if (state.items[i].value === evt.detail.value) { | |||
state.current = i; | |||
state.form.tractorSign = evt.detail.value; | |||
break; | |||
} | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
@@ -1017,4 +1075,17 @@ | |||
top: 0; | |||
z-index: 11111; | |||
} | |||
.tractor { | |||
font-size: 32rpx; | |||
margin-top: 40rpx; | |||
} | |||
.tractor .title { | |||
margin-right: 60rpx; | |||
} | |||
// .tractor .title .label { | |||
// margin-right: 40rpx !important; | |||
// } | |||
</style> |
@@ -401,7 +401,6 @@ | |||
showLoading: true, | |||
}; | |||
request(etcUserCardInfoSubmit, 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=${state.type}&isSign=${state.isSign}`, | |||
@@ -420,7 +419,6 @@ | |||
showLoading: true, | |||
}; | |||
request(etcUserCardInfoSubmit, 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=${state.type}&isSign=${state.isSign}`, |
@@ -56,6 +56,7 @@ | |||
<view class="tip"> | |||
<view class="tip-value"> 拍摄规范 </view> | |||
</view> | |||
<view class="down" @click="downAuthD">模板下载</view> | |||
</view> | |||
<image v-if="!state.form.proxyUrl" class="icon" :src="`${$imgUrl}applyCard/weituoshu.png`"> | |||
</image> | |||
@@ -404,6 +405,33 @@ | |||
const cancle = () => { | |||
state.isTakePhotoModeShow = false | |||
} | |||
const downAuthD = () => { | |||
uni.downloadFile({ | |||
url: "https://qtzl.etcjz.cn/default-bucket/20240311/单位委托书.docx", | |||
filePath: uni.env.USER_DATA_PATH + '/' + '单位委托书.docx', | |||
success(res) { | |||
const filePath = res.filePath | |||
uni.openDocument({ | |||
filePath: filePath, | |||
fileType: 'docx', | |||
showMenu: true, //关键点 | |||
success: function (res) { | |||
// msg("成功查看协议详情"); | |||
}, | |||
fail: function (err) { | |||
msg("打开文档失败"); | |||
} | |||
}); | |||
}, | |||
fail: function (err) { | |||
msg("下载文档失败"); | |||
console.log("err", err) | |||
}, | |||
complete(res) { | |||
} | |||
}) | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
@@ -586,4 +614,14 @@ | |||
top: 0; | |||
z-index: 11111; | |||
} | |||
.down { | |||
background-color: rgba(33, 190, 177, 0.2); | |||
color: #0a8f8a; | |||
border-radius: 10rpx; | |||
padding: 6rpx 10rpx; | |||
font-size: 28rpx; | |||
margin-top: 10rpx; | |||
width: 48%; | |||
} | |||
</style> |
@@ -1,159 +1,268 @@ | |||
<!-- 订单详情-确认收货 --> | |||
<template> | |||
<view class="card-box"> | |||
<view class="as-layout-horizontal as-gravity-center-start title"> | |||
<image :src="`${$imgUrl}order/icon-star-green.png`" class="icon"></image> | |||
<text class="txt-title">{{ state.orderInfo.productName }}</text> | |||
</view> | |||
<view style="border-bottom: 1px solid #dcdcdc" /> | |||
<!-- 订单信息 --> | |||
<view class="order-box"> | |||
<view class="order-item" v-for="(item, index) in state.list" :key="index"> | |||
<order-info-item | |||
:label="item.label" | |||
:value="item.value" | |||
></order-info-item> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="hint">请核对实收货物与上述货物编号是否一致!</view> | |||
<view class="btn"> | |||
<submit-button | |||
title="确认收货" | |||
@submit="$util.confirm('是否确认收到货?', confirmReceipt, '收货确认')" | |||
></submit-button> | |||
</view> | |||
<view class="card-box"> | |||
<view class="as-layout-horizontal as-gravity-center-start title"> | |||
<image :src="`${$imgUrl}order/icon-star-green.png`" class="icon"></image> | |||
<text class="txt-title">{{ state.orderInfo.productName }}</text> | |||
</view> | |||
<view style="border-bottom: 1px solid #dcdcdc" /> | |||
<!-- 订单信息 --> | |||
<view class="order-box"> | |||
<view class="order-item" v-for="(item, index) in state.list" :key="index"> | |||
<order-info-item :label="item.label" :value="item.value"></order-info-item> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="hint">请核对实收货物与上述货物编号是否一致!</view> | |||
<view class="btn"> | |||
<submit-button title="确认收货" @submit="$util.confirm('是否确认收到货?', confirmReceiptClick, '收货确认')"></submit-button> | |||
</view> | |||
</template> | |||
<script setup lang="ts"> | |||
import orderInfoItem from "./components/order-info-item"; | |||
import { reactive } from "vue"; | |||
import { onLoad } from "@dcloudio/uni-app"; | |||
import { request } from "@/utils/network/request.js"; | |||
import { msg, confirm, getOrderStatusName } from "@/utils/utils"; | |||
import { orderDetail, receiveOrder } from "@/utils/network/api"; | |||
import { getItem, StorageKeys } from "@/utils/storage"; | |||
import { stringToJson } from "@/utils/network/encryption"; | |||
const state = reactive({ | |||
//订单信息 | |||
orderInfo: {} as any, | |||
//显示订单信息 | |||
list: [ | |||
{ | |||
label: "订单编号:", | |||
value: "", | |||
}, | |||
{ | |||
label: "订单车牌:", | |||
value: "", | |||
}, | |||
{ | |||
label: "订单状态:", | |||
value: "", | |||
}, | |||
{ | |||
label: "发货卡号:", | |||
value: "", | |||
}, | |||
{ | |||
label: "发货签号:", | |||
value: "", | |||
}, | |||
], | |||
}); | |||
//确认收货 | |||
const confirmReceipt = (e) => { | |||
const options = { | |||
type: 2, | |||
data: { | |||
id: state.orderInfo.id, | |||
source: "WECHAT", | |||
opId: getItem(StorageKeys.OpenId), | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(receiveOrder, options).then((res) => { | |||
confirm( | |||
"您已完成订单收货", | |||
() => { | |||
uni.$emit("refreshOrder"); | |||
uni.navigateBack(); | |||
}, | |||
"收货完成", | |||
false | |||
); | |||
}); | |||
}; | |||
//获取订单详情 | |||
const getOrderDetails = (id) => { | |||
const options = { | |||
type: 2, | |||
data: { id: id }, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(orderDetail, options).then((res) => { | |||
state.orderInfo = stringToJson(res.bizContent); | |||
state.list[0].value = state.orderInfo.orderId; | |||
state.list[1].value = state.orderInfo.vehiclePlate; | |||
state.list[2].value = getOrderStatusName(state.orderInfo.orderStep); | |||
state.list[3].value = state.orderInfo.cardId ?state.orderInfo.cardId: ""; | |||
state.list[4].value = state.orderInfo.obuId ?state.orderInfo.obuId: ""; | |||
}); | |||
}; | |||
onLoad((options) => { | |||
getOrderDetails(options.id); | |||
}); | |||
import orderInfoItem from "./components/order-info-item"; | |||
import { reactive } from "vue"; | |||
import { onLoad, onUnload, onShow } from "@dcloudio/uni-app"; | |||
import { request } from "@/utils/network/request.js"; | |||
import { msg, confirm, getOrderStatusName, navTo } from "@/utils/utils"; | |||
import { orderDetail, receiveOrder } from "@/utils/network/api"; | |||
import { getItem, StorageKeys } from "@/utils/storage"; | |||
import { stringToJson } from "@/utils/network/encryption"; | |||
const bluetoothUtil = require("../../static/etcUtil/index.js"); | |||
const cmd = require("../../static/etcUtil/cmdConfig.js"); | |||
const tools = require("../../static/etcUtil/tools.js"); | |||
const state = reactive({ | |||
//订单信息 | |||
orderInfo: {} as any, | |||
//显示订单信息 | |||
list: [ | |||
{ | |||
label: "订单编号:", | |||
value: "", | |||
}, | |||
{ | |||
label: "订单车牌:", | |||
value: "", | |||
}, | |||
{ | |||
label: "订单状态:", | |||
value: "", | |||
}, | |||
{ | |||
label: "发货卡号:", | |||
value: "", | |||
}, | |||
{ | |||
label: "发货签号:", | |||
value: "", | |||
}, | |||
], | |||
readCardId: "",//蓝牙读取的 | |||
readObuId: "",//蓝牙读取的 | |||
}); | |||
onShow((option) => { | |||
uni.$on('bluetoothLink', res => { | |||
console.log(res); | |||
if (res.status) { | |||
getCardId() | |||
} | |||
}) | |||
}) | |||
/** | |||
* 获取卡号 读卡 | |||
*/ | |||
const getCardId = () => { | |||
console.log('======获取卡信息======') | |||
let cmdArr = [ | |||
cmd.HOME_DIRECTORY, | |||
//选择主目 | |||
cmd.APPLICATION_DIRECTORY, | |||
//选择文件1001--DF01联网收费应用目录 | |||
cmd.CMD_READBINARY, | |||
//15文件--卡片发行基本数据文件 | |||
cmd.CMD_GETBALANCE | |||
//钱包 | |||
]; | |||
tools.showLoadingAlert("正在执行指令"); | |||
bluetoothUtil.transCmd(cmdArr, "10", function (res) { | |||
tools.hideLoadingAlert(); | |||
//10:写卡 20:写OBU | |||
let str = res[2].substring(res[2].length - 4, res[2].length); | |||
let str3 = res[3].substring(res[3].length - 4, res[3].length); | |||
if (str == "9000" || str3 == "9000") { | |||
if (res[2].length > 86 || res[3] >= 12) { | |||
state.readCardId = res[2].substring(20, 40); //卡号 | |||
if (state.orderInfo.cardId != state.readCardId) { | |||
uni.showModal({ | |||
title: '提示', | |||
content: '卡号不一致,前往订单管理页面申请退货', | |||
showCancel: false, | |||
success: function (res) { | |||
if (res.confirm) { | |||
console.log('用户点击确定'); | |||
uni.switchTab({ | |||
url: "/pages/order/order" | |||
}) | |||
} else if (res.cancel) { | |||
console.log('用户点击取消'); | |||
} | |||
} | |||
}); | |||
} else { | |||
getObuId() | |||
} | |||
} else { | |||
console.error("CMD_READBINARY指令长度不符" + res[2]) | |||
tools.hideLoadingAlert(); | |||
} | |||
} | |||
tools.hideLoadingAlert(); | |||
}); | |||
}; | |||
/** | |||
* 获取OBU号 读OBU | |||
*/ | |||
const getObuId = () => { | |||
console.log('======获取OBU号======') | |||
let cmdArray = [cmd.HOME_DIRECTORY, cmd.OBU_SYSTEM_FILE, cmd.RANDOM_NUMBER]; | |||
tools.showLoadingAlert("正在执行指令"); | |||
bluetoothUtil.transCmd(cmdArray, "20", function (res) { | |||
tools.hideLoadingAlert(); | |||
var status = res[1].substring(res[1].length - 4, res[1].length); | |||
console.log('获取OBU号执行结果' + status, res) | |||
//第一次获取随机数 | |||
if (status == "9000") { | |||
state.readObuId = res[1].substring(20, 36); | |||
if (state.orderInfo.obuId != state.readObuId) { | |||
uni.showModal({ | |||
title: '提示', | |||
content: '签号不一致,前往订单管理页面申请退货', | |||
showCancel: false, | |||
success: function (res) { | |||
if (res.confirm) { | |||
console.log('用户点击确定'); | |||
uni.switchTab({ | |||
url: "/pages/order/order" | |||
}) | |||
} else if (res.cancel) { | |||
console.log('用户点击取消'); | |||
} | |||
} | |||
}); | |||
} else { | |||
// 确认收货 | |||
confirmReceipt() | |||
} | |||
} | |||
}); | |||
}; | |||
const confirmReceipt = () => { | |||
const options = { | |||
type: 2, | |||
data: { | |||
id: state.orderInfo.id, | |||
source: "WECHAT", | |||
opId: getItem(StorageKeys.OpenId), | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(receiveOrder, options).then((res) => { | |||
confirm( | |||
"您已完成订单收货", | |||
() => { | |||
uni.$emit("refreshOrder"); | |||
uni.navigateBack(); | |||
}, | |||
"收货完成", | |||
false | |||
); | |||
}); | |||
} | |||
onUnload(() => { | |||
//移除监听 | |||
uni.$off('bluetoothLink') | |||
}) | |||
//确认收货 | |||
const confirmReceiptClick = (e) => { | |||
navTo("/pages/bluetooth/bluetooth?routeType=5"); //去连接蓝牙 | |||
}; | |||
//获取订单详情 | |||
const getOrderDetails = (id) => { | |||
const options = { | |||
type: 2, | |||
data: { id: id }, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(orderDetail, options).then((res) => { | |||
state.orderInfo = stringToJson(res.bizContent); | |||
state.list[0].value = state.orderInfo.orderId; | |||
state.list[1].value = state.orderInfo.vehiclePlate; | |||
state.list[2].value = getOrderStatusName(state.orderInfo.orderStep); | |||
state.list[3].value = state.orderInfo.cardId ? state.orderInfo.cardId : ""; | |||
state.list[4].value = state.orderInfo.obuId ? state.orderInfo.obuId : ""; | |||
}); | |||
}; | |||
onLoad((options) => { | |||
getOrderDetails(options.id); | |||
}); | |||
</script> | |||
<style> | |||
page { | |||
background-color: #eef7f7; | |||
} | |||
page { | |||
background-color: #eef7f7; | |||
} | |||
</style> | |||
<style lang="scss" scoped> | |||
.card-box { | |||
background-color: white; | |||
border-radius: 20rpx; | |||
box-shadow: 0px 0px 6rpx 2rpx rgba(223, 223, 223, 0.3); | |||
margin: 30rpx; | |||
padding: 20rpx 0; | |||
.title { | |||
padding: 0 20rpx 20rpx; | |||
} | |||
.icon { | |||
width: 48rpx; | |||
height: 48rpx; | |||
margin-right: 10rpx; | |||
} | |||
.txt-title { | |||
font-size: 30rpx; | |||
color: #333333; | |||
} | |||
.order-box { | |||
padding: 0px 30rpx 10rpx; | |||
.order-item { | |||
padding: 28rpx 0px 0px; | |||
} | |||
} | |||
} | |||
.hint { | |||
font-size: 28rpx; | |||
color: #ff8000; | |||
margin-top: 60rpx; | |||
text-align: center; | |||
} | |||
.btn { | |||
margin: 500rpx 40rpx 50rpx; | |||
} | |||
</style> | |||
.card-box { | |||
background-color: white; | |||
border-radius: 20rpx; | |||
box-shadow: 0px 0px 6rpx 2rpx rgba(223, 223, 223, 0.3); | |||
margin: 30rpx; | |||
padding: 20rpx 0; | |||
.title { | |||
padding: 0 20rpx 20rpx; | |||
} | |||
.icon { | |||
width: 48rpx; | |||
height: 48rpx; | |||
margin-right: 10rpx; | |||
} | |||
.txt-title { | |||
font-size: 30rpx; | |||
color: #333333; | |||
} | |||
.order-box { | |||
padding: 0px 30rpx 10rpx; | |||
.order-item { | |||
padding: 28rpx 0px 0px; | |||
} | |||
} | |||
} | |||
.hint { | |||
font-size: 28rpx; | |||
color: #ff8000; | |||
margin-top: 60rpx; | |||
text-align: center; | |||
} | |||
.btn { | |||
margin: 500rpx 40rpx 50rpx; | |||
} | |||
</style> |
@@ -422,12 +422,16 @@ | |||
<view class="btn space" @click="gotoCheckLogistics(state.orderInfo)">查看物流</view> | |||
<view class="btn space" @click="gotoReturnOrder(state.orderInfo)">申请退货</view> | |||
<view class="btn-green" @click="gotoConfirmReceipt(state.orderInfo)">确认收货</view> | |||
<view class="btn space" @click.stop="closeOrder(state.orderInfo)" | |||
v-if="state.orderInfo.finishOrder">结束订单</view> | |||
</view> | |||
<!-- 待激活 --> | |||
<view v-if="state.orderInfo.orderStep == OrderStatus.待激活" class="btn-status"> | |||
<view class="btn space" @click="gotoReturnOrder(state.orderInfo)">申请退货</view> | |||
<view class="btn space" @click="gotoExchangeOrder(state.orderInfo)">申请换货</view> | |||
<view class="btn-green" @click="gotoActiveOrder(state.orderInfo)">去激活</view> | |||
<view class="btn space" @click.stop="closeOrder(state.orderInfo)" | |||
v-if="state.orderInfo.finishOrder">结束订单</view> | |||
</view> | |||
<!-- 订单已结束 --> | |||
<view v-if="state.orderInfo.orderStep == OrderStatus.已结束" class="btn-status"> | |||
@@ -494,7 +498,7 @@ | |||
//按钮跳转业务逻辑 | |||
const { gotoEditAddress, gotoCancelOrder, gotoEditUserOrUnitInfo, | |||
gotoConfirmReceipt, gotoCheckLogistics, gotoEvaluateProduct, | |||
gotoActiveOrder, gotoReturnOrder, gotoExchangeOrder, gotoPay, gotoOrderSign, gotoOrderDetailsPay, gotoEvaluateSalesman } = useOrderSkip(); | |||
gotoActiveOrder, gotoReturnOrder, gotoExchangeOrder, gotoPay, gotoOrderSign, gotoOrderDetailsPay, gotoEvaluateSalesman, closeOrder } = useOrderSkip(); | |||
//获取订单详情 | |||
@@ -507,6 +511,9 @@ | |||
} | |||
request(orderDetail, options).then((res) => { | |||
state.orderInfo = stringToJson(res.bizContent); | |||
// for(var i in state.orderInfo){ | |||
// if(state.orderInfo[i]) | |||
// } | |||
state.orderInfo.appraise = appraise; | |||
console.log("获取订单详情", state.orderInfo) | |||
//测试 |
@@ -305,9 +305,7 @@ | |||
agentIdVld: '', | |||
opId: '', | |||
orderSource: 'WECHAT', | |||
ownerName: "", //所有人 | |||
// ownerName: "", //所有人 | |||
character: "", //使用性质 | |||
register: "请输入注册日期", //注册日期 | |||
@@ -359,9 +357,6 @@ | |||
isEnableBook: true, //他人办理时是否上传委托书 | |||
isEnableInfo: true, //小程序信息带出 | |||
isEnableOCRData: true, //允许修改OCR识别出来的数据 | |||
changeColor: false, | |||
data: { | |||
transferLogs: [], | |||
@@ -383,15 +378,11 @@ | |||
text: '道路运输证经营范围除“货物专用运输 (集装 箱)"外,还有“普通货运”等其他项目的牵引车办理J2类型集装箱', | |||
value: 28, | |||
}], | |||
orderId: "", | |||
// type: undefined, //标记来源是否登录 1为未登录数据 - 需要新增地址 | |||
show: false, | |||
isMyPeopple: true, | |||
outlineL: "", | |||
outlineW: "", | |||
outlineH: "", | |||
isEnableChangeOCRCarInfo: false, //申办时是否允许修改OCR识别出来的车辆信息数据 | |||
// allData: {} | |||
businessType: "", | |||
}); | |||
const searchVehicleInfoQuery = () => { |
@@ -51,14 +51,14 @@ | |||
state.json = getRequest(q) | |||
console.log("state.json", state.json, getItem("mobile"), getItem("mobile") == state.json.phone) | |||
setItem('scanCode', state.json) | |||
if (!getItem("mobile")) { | |||
if (!getItem("openId")) { | |||
uni.showModal({ | |||
title: '提示', | |||
content: '您还未登录小程序,请先登录小程序', | |||
showCancel: false, | |||
success: function (res) { | |||
if (res.confirm) { | |||
navTo('/login/login') | |||
navTo(`/login/login?back=1`) | |||
} | |||
} | |||
}); |