浏览代码

Merge remote-tracking branch 'origin/master'

yxb
skx 1年前
父节点
当前提交
945ff7d0fe

+ 72
- 55
subpackage/after-sale/rescind-carId/rescind-carId-select.vue 查看文件

@@ -1,5 +1,5 @@
<template>
<!-- <view class="content-wrap">
<!-- <view class="content-wrap">
<view @click="tabChange(true)">
<view :class="state.isMyPeopple ? 'big' : 'nomal'"> 本人车辆 </view>
<view :class="state.isMyPeopple ? 'tip' : ''"> </view>
@@ -138,6 +138,20 @@
<image v-else class="icon" :src="strReplace(state.FormData.commitmentUrl)"></image>
</view>
</view>
<view class="picture-wrapper" @click="cardFileImageUpdate(3)">
<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.FormData.proxyUrl" class="icon" :src="`${$imgUrl}applyCard/weituoshu.png`">
</image>
<image v-else class="icon" :src="strReplace(state.FormData.proxyUrl)"></image>
</view>
</view>
<view class="shibie-wrapper">
<view class="title"> 识别内容如下 </view>
<u-form label-width="200" :model="state.form" ref="uForm">
@@ -288,6 +302,7 @@
ownNegImgUrl: "", //车主证件反面图片
agreementId: "", //签约编号
channelId: "5201018892300000001",
proxyUrl: "", //委托书
},
orderId: "",
isMyPeopple: true,
@@ -298,44 +313,44 @@
phone: "",
},
actionSheetList: [{
label: "蓝色",
value: '0',
}, {
label: "黄色",
value: 1,
},
{
label: "黑色",
value: 2,
},
{
label: "白色",
value: 3,
},
{
label: "渐变绿色",
value: 4,
},
{
label: "黄绿双拼色",
value: 5,
},
{
label: "蓝白渐变色",
value: 6,
},
{
label: "未确定",
value: 9,
},
{
label: "绿色",
value: 11,
},
{
label: "红色",
value: 12,
},
label: "蓝色",
value: '0',
}, {
label: "黄色",
value: 1,
},
{
label: "黑色",
value: 2,
},
{
label: "白色",
value: 3,
},
{
label: "渐变绿色",
value: 4,
},
{
label: "黄绿双拼色",
value: 5,
},
{
label: "蓝白渐变色",
value: 6,
},
{
label: "未确定",
value: 9,
},
{
label: "绿色",
value: 11,
},
{
label: "红色",
value: 12,
},
],
FormData: {
vehiclePlate: '',
@@ -348,7 +363,8 @@
peopleVehicleImgUrl: '',
commitmentUrl: '',
mobile: '',
code: ''
code: '',
proxyUrl: "", //委托书
}
});
const savaHandle = () => {
@@ -356,7 +372,7 @@
if (state.FormData.vehPosImgUrl && state.FormData.vehNegImgUrl) {
if (state.FormData.peopleVehicleImgUrl) {
if (state.FormData.vehiclePlate && state.FormData.vehiclePlatecolor) {
state.FormData.vehiclePlatecolor=Number(state.FormData.vehiclePlatecolor)
state.FormData.vehiclePlatecolor = Number(state.FormData.vehiclePlatecolor)
let data = JSON.stringify(state.FormData)
navTo(`/subpackage/after-sale/rescind-carId/verification?fromData=${data}`);
} else {
@@ -402,7 +418,7 @@
// })
};

const selectConfirm = (item: any) => {
const selectConfirm = (item : any) => {
console.log(item);
state.FormData.vehiclePlatecolor = item[0].value
state.form.caridCorlor = item[0].label
@@ -413,7 +429,7 @@
count: 1, //只能选取一张照片
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
sourceType: ["camera", "album"], //从相册选择
success: function(res) {
success: function (res) {
pathToBase64(res.tempFilePaths[0])
.then((path) => {
var data = {
@@ -431,13 +447,15 @@
console.log(data, "didid");
if (val == 1) {
state.FormData.peopleVehicleImgUrl = data.data.url;
} else {
} else if (val == 2) {
state.FormData.commitmentUrl = data.data.url;
} else if (val == 3) {
state.FormData.proxyUrl = data.data.url;
}

});
})
.catch((error) => {});
.catch((error) => { });
},
});
};
@@ -473,18 +491,18 @@
// tmerValidity: "",
// };
// };
onLoad((option: any) => {
onLoad((option : any) => {
state.form.orderId = option.orderId;
state.orderId = option.orderId;
});

const cardDbImageOcr = (val: any) => {
const cardDbImageOcr = (val : any) => {
var imageType = val;
uni.chooseImage({
count: 1, //只能选取一张照片
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
sourceType: ["camera", "album"], //从相册选择
success: function(res) {
success: function (res) {
pathToBase64(res.tempFilePaths[0])
.then((path) => {
var data = {
@@ -529,19 +547,19 @@
}
});
})
.catch((error) => {});
.catch((error) => { });
},
});
};
//orc接口调用
const cardImageOcr = (val: any) => {
const cardImageOcr = (val : any) => {
console.log("点击了");
var imageType = val;
uni.chooseImage({
count: 1, //只能选取一张照片
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
sourceType: ["camera", "album"], //从相册选择
success: function(res) {
success: function (res) {
console.log(res);
pathToBase64(res.tempFilePaths[0])
.then((path) => {
@@ -581,11 +599,11 @@
}
});
})
.catch((error) => {});
.catch((error) => { });
},
});
};
//替换图片地址
const strReplace = (str : string) => {
console.log(str)
@@ -597,7 +615,6 @@
</script>

<style lang="scss" scoped>
.title {
font-size: 35rpx;
font-family: Microsoft YaHei;
@@ -819,4 +836,4 @@
margin-bottom: 60rpx;
}
}
</style>
</style>

+ 7
- 6
subpackage/after-sale/rescind-carId/verification.vue 查看文件

@@ -53,7 +53,8 @@
peopleVehicleImgUrl: '',
commitmentUrl: '',
mobile: '',
code: ''
code: '',
proxyUrl: "", //委托书
})
let waitTime = ref(0)
const getCode = () => {
@@ -61,10 +62,10 @@
if (model1.mobile) {
sendCodeApi()
codeInterval()
}else{
} else {
uni.showToast({
title: '请输入手机号',
icon:'none'
icon: 'none'
});
}

@@ -97,7 +98,7 @@
request(sendCode, options)
.then((res) => {
let data = stringToJson(res.bizContent)
console.log(data,"#################");
console.log(data, "#################");
if (data.info == "成功.") {
console.log('######################CCCCCCCCCCCCCCCCC');
}
@@ -150,7 +151,7 @@
model1.vehNegImgUrl = data.vehNegImgUrl
model1.peopleVehicleImgUrl = data.peopleVehicleImgUrl
model1.commitmentUrl = data.commitmentUrl
model1.proxyUrl = data.proxyUrl
})
</script>

@@ -223,4 +224,4 @@
line-height: 80rpx;
}
}
</style>
</style>

+ 6
- 3
subpackage/orders/interestsList.vue 查看文件

@@ -121,8 +121,11 @@ s<template>
};
console.log("optionss", optionss);
request(addProduct, optionss).then((res) => {
uni.navigateTo({
url: `/subpackage/orders/order_payment?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}&&data=${items}&&isValueCard=${state.detailsObj.isValueCard}`,
// uni.navigateTo({
// url: `/subpackage/orders/order_payment?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}&&data=${items}&&isValueCard=${state.detailsObj.isValueCard}`,
// });
uni.redirectTo({
url: `/subpackage/orders/product-detail?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}&&data=${items}&&isValueCard=${state.detailsObj.isValueCard}`,
});
});

@@ -251,7 +254,7 @@ s<template>
});
} else if (data.userState === "NORMAL") {
msg("已开通车主服务");
uni.navigateTo({
url: `/subpackage/orders/product-detail?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}&&data=${items}`,
});

+ 15
- 15
subpackage/orders/order_payment.vue 查看文件

@@ -62,7 +62,7 @@
CardBillPayStatus,
wechatPayConfigId,
aliPayConfigId,
obtainUserId,
obtainUserId,
getOpenidApi,
orderDetail

@@ -70,7 +70,7 @@
import { request } from "@/utils/network/request.js";
import { stringToJson } from "@/utils/network/encryption";
import { fileURL } from "@/datas/fileURL.js";
import navBgCar from "./components/nav-bg-car1";
import navBgCar from "./components/nav-bg-car5";
import navBar from "@/components/nav-bar/nav-bar2.vue";
import { getItem, StorageKeys, setItem } from "@/utils/storage.ts";
import { msg } from "@/utils/utils";
@@ -161,7 +161,7 @@
// uni.request({
// url: `https://api.weixin.qq.com/sns/jscode2session?appid=${wechatAppID}&secret=${wechatSecret}&js_code=${e.code}&grant_type=authorization_code`,
// success: (res : any) => {
const options1 = {
type: 2,
data: {
@@ -173,7 +173,7 @@
request(getOpenidApi, options1).then((res) => {
const result = stringToJson(res.bizContent);
const openidData = stringToJson(result.data);
console.log("获取openId",openidData)
console.log("获取openId", openidData)
const options = {
type: 2,
data: {
@@ -448,23 +448,23 @@
});
};
const gotoEditUserOrUnitInfo = () => {
if (state.isValueCard != 1) {
uni.redirectTo({
url: `/subpackage/orders/release-products?orderId=${state.orderId}`,
});
} else {
uni.switchTab({
url: "/pages/order/order"
})
}
if (state.isValueCard != 1) {
uni.redirectTo({
url: `/subpackage/orders/release-products?orderId=${state.orderId}`,
});
} else {
uni.switchTab({
url: "/pages/order/order"
})
}
}
const state = reactive({
isValueCard: 1, //卡的类型
radiolist1: [], //选择卡的数据列表
choiceCardShow: false, //选择卡的弹出框
isSign: '',
id:"",
id: "",
orderId: "",
userType: 1, //1 个人 2单位
type: 0, //0 客车 1货车

+ 164
- 39
subpackage/orders/product-detail.vue 查看文件

@@ -2,7 +2,7 @@
<navBar title="产品详情"></navBar>
<navBgCar></navBgCar>
<view class="content-wrap">
<view class="ul-item">
<!-- <view class="ul-item">
<image style="width: 100%; height: 170rpx; background-color: #eeeeee"
:src="`${$imgUrl}applyCard/product-bg.png`"></image>
<view class="item-value">
@@ -15,9 +15,9 @@
¥:{{state.detailsObj.product.oncePrice * 0.01}}
</view>
</view>
</view>
<view style="margin: 20rpx 0 10rpx 20rpx;font-size: 32rpx;">加购权益列表</view>
<view class="add_all">
</view> -->
<!-- <view style="margin: 20rpx 0 10rpx 20rpx;font-size: 32rpx;">加购权益列表</view> -->
<!-- <view class="add_all">
<uni-swipe-action>
<uni-swipe-action-item class="del_item" v-for="(item,index) in state.list"
:right-options="state.options2" :show="item.isOpened" :auto-close="false" @change="change"
@@ -39,19 +39,25 @@
</uni-swipe-action-item>

</uni-swipe-action>
</view>
</view> -->

<view class="value-wrapper">
<view class="flex">
<view class="flex" v-for="(item,index) in state.dataArray">
<view class="title"> {{item.payName}} </view>
<view class="value">
{{ "¥" + item.fee * 0.01 }}
</view>
</view>
<!-- <view class="flex">
<view class="title"> 产品金额 </view>
<view class="value">
{{ "¥" + state.detailsObj.product.oncePrice * 0.01 }}
</view>
</view>
<view class="flex">
</view> -->
<!-- <view class="flex">
<view class="title"> 加购权益 </view>
<view class="value">{{ "¥" + state.productMoney }} </view>
</view>
</view> -->
<view class="flex">
<view class="title"> 运费 </view>
<view class="value"> ¥0.00 </view>
@@ -70,10 +76,15 @@
{{ "¥" + state.allMoney }}
</view>
</view>
<!-- <view class="as-layout-horizontal as-gravity-center">
<checkbox value="cb" />请先阅读并同意

<view class="as-layout-horizontal agreement">
<checkbox-group @change="checkboxChange">
<checkbox :checked="state.checked" style="transform: scale(0.8)" />我已阅读并同意
</checkbox-group>
<a style="color:#007AFF;text-decoration: underline;">《ETC客户协议》</a>
</view> -->
<a style="color:#007AFF;text-decoration: underline;">《风险提示告知书》</a>
</view>
</view>

<view class="action">
@@ -97,7 +108,9 @@
import {
etcQueryProduct,
addProduct,
getOpenidApi
getOpenidApi,
getAgreementApi,
PAYDETECTION
} from "@/utils/network/api.js";
import {
request
@@ -133,23 +146,30 @@
const savaHandle = () => {
console.log("state.productId.length", state.productId.length)
//判断是否有加购权益
if (state.productId.length > 0) {
queryAddProduct();
}
uni.showModal({
// title: '提示',
content: '确定支付',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
wxPayment();
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
// if (state.productId.length > 0) {
// queryAddProduct();
// }
// uni.showModal({
// // title: '提示',
// content: '确定支付',
// success: function (res) {
// if (res.confirm) {
// console.log('用户点击确定');
// wxPayment();
// } else if (res.cancel) {
// console.log('用户点击取消');
// }
// }
// });
// msg("确定绑定权益产品");
// wxPayment();
if (state.checked) {
uni.navigateTo({
url: `/subpackage/orders/order_payment?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}&&isValueCard=${state.isValueCard}`,
});
} else {
msg("请勾选协议");
}
};

//获取微信小程序openid
@@ -246,20 +266,21 @@
};
onLoad((option : any) => {
state.orderId = option.orderId;
state.isValueCard = option.isValueCard;

// state.clientFee = option.clientFee / 100;
state.id = option.id;
getOpenID();
const data = JSON.parse(decodeURIComponent(option.data));
for (var i = 0; i < data.length; i++) {
data['isOpened'] = 'node';
state.productMoney += data[i]['discountPrice'] / 100;
state.productId.push(data[i]['equityId'])
}


state.list = data;
queryDetailsData();

queryAgreement();
// const data = JSON.parse(decodeURIComponent(option.data));
// for (var i = 0; i < data.length; i++) {
// data['isOpened'] = 'node';
// state.productMoney += data[i]['discountPrice'] / 100;
// state.productId.push(data[i]['equityId'])
// }
// state.list = data;
// queryDetailsData();
refresh();
});

const state = reactive({
@@ -284,6 +305,9 @@
messageText: '这是一条成功提示',
value: '',
detailsObj: '',
isValueCard: "",
dataArray: [],
checked: false
});
const bindClick = (i) => {
console.log(i);
@@ -355,6 +379,99 @@
state.allMoney = (parseFloat(state.detailsObj.product.oncePrice * 0.01) + parseFloat(state.productMoney)).toFixed(2)
});
}
// 查协议
const queryAgreement = () => {
const options = {
type: 2,
data: {
orderId: state.orderId, //订单编号
},
method: "POST",
showLoading: true,
};
request(getAgreementApi, options).then((res) => {
let data = stringToJson(res.bizContent);
console.log("查协议", data)
});
}
const checkboxChange = (e) => {
state.checked = !state.checked;
console.log(state.checked);
};
const refresh = () => {
let source = ""
// #ifdef MP-ALIPAY
source = "ALI"
// #endif
// #ifdef MP-WEIXIN
source = "WECHAT"
// getOpenID();
// #endif
var data = {
orderId: state.orderId,
source: source //请求方来源
};
const options = {
type: 2,
data: data,
method: "POST",
showLoading: true,
};
console.log("输出内容", options);
request(PAYDETECTION, options).then((res) => {
// console.log(res.bizContent);
const data = stringToJson(res.bizContent);
console.log(data);
// console.log(typeof(data));
// if (data.paymentStatus == 'ALLSUCCESS') {
// gotoEditUserOrUnitInfo()
// }
state.dataArray = data.datas;
// HANDLE("办理费",1){},
// MARGIN("保证金",2){},
// PRESTORE("预存金",3){},
// EQUITY("权益费",4){},
for (let i = 0; i < state.dataArray.length; i++) {
if (state.dataArray[i].payType === 'HANDLE') {
state.dataArray[i].payName = '办理费'
} else if (state.dataArray[i].payType === 'MARGIN') {
state.dataArray[i].payName = '保证金'
} else if (state.dataArray[i].payType === 'PRESTORE') {
state.dataArray[i].payName = '预存金'
} else if (state.dataArray[i].payType === 'EQUITY') {
state.dataArray[i].payName = '权益费'
} else {
state.dataArray[i].payName = '未知费'
}
// SUCCESS("支付成功",1){},
// PAYING("支付中",2){},
// FAILED("支付失败",3){},
// UNPAY("未支付",4){},
// CLOSED("已关闭",5){},
// CANCELED("已撤销",6){},
// REFUND("转入退费",7){},
if (state.dataArray[i].payStatus === 'SUCCESS') {
state.dataArray[i].payStatusName = '已支付'
} else if (state.dataArray[i].payStatus === 'PAYING') {
state.dataArray[i].payStatusName = '支付中'
} else if (state.dataArray[i].payStatus === 'FAILED') {
state.dataArray[i].payStatusName = '支付失败'
} else if (state.dataArray[i].payStatus === 'UNPAY') {
state.dataArray[i].payStatusName = '未支付'
} else if (state.dataArray[i].payStatus === 'CLOSED') {
state.dataArray[i].payStatusName = '已关闭'
} else if (state.dataArray[i].payStatus === 'CANCELED') {
state.dataArray[i].payStatusName = '已撤销'
} else if (state.dataArray[i].payStatus === 'REFUND') {
state.dataArray[i].payStatusName = '转入退费'
} else {
state.dataArray[i].payStatusName = '未知'
}
state.allMoney += state.dataArray[i]["fee"] * 0.01
}
console.log("state.dataArray", state.dataArray)
});
}
</script>

<style lang="scss" scoped>
@@ -513,4 +630,12 @@
.price {
color: white;
}

.agreement {
font-size: 30rpx;
display: flex;
flex-wrap: wrap;
margin-top: 20rpx;
align-items: center;
}
</style>

+ 3
- 2
utils/network/api.js 查看文件

@@ -1,6 +1,7 @@
/* 接口中常量 */
// export const URL = "192.168.100.63";
export const URL = "trial.etcjz.cn";
// export const URL = "qtzl.etcjz.cn";
/**
* 配置信息,针对不同的平台进行配置
*/
@@ -15,7 +16,6 @@ export const envs = {
production: {
// baseUrl: "http://192.168.124.6:8087",
// baseUrl: "http://222.85.144.89:19002",
// baseUrl: "http://192.168.100.158:8085/html/",
// baseUrl: "https://qtzl.etcjz.cn",
baseUrl: "https://trial.etcjz.cn",
// baseUrl: "http://192.168.100.158:8085",
@@ -243,4 +243,5 @@ export const PAYMENTORDERAPPLY = "377421d6ed4f48a29575aa126838a4d2" //CSMSN-订
export const businessApi = "b275644e586b447791eede4ad6a41640" //业务完成日志
export const inventoryEquipmentApi = "5570160d4b8d46408664b6c289de6b57" //库存设备统计
export const getOpenidApi = "53c0698b512a44539ea05cc88157e68b" //获取微信小程序openid
export const getOpenidApi = "53c0698b512a44539ea05cc88157e68b" //获取微信小程序openid
export const getAgreementApi = "32a9d99a781a4bf2af29a46d903702bd" //根据订单编号获取渠道产品的补充协议

正在加载...
取消
保存