wq 2 лет назад
Родитель
Сommit
b4fff42ee3

+ 3
- 1
composables/order/useOrderSkip.ts Просмотреть файл

@@ -7,10 +7,12 @@ export default function useOrderSkip() {

//根据订单类型 跳转到不同的订单详情页面
const gotoOrderDetails = (orderInfo) => {
console.log('输出内容=====',orderInfo.orderType)
if (orderInfo.orderType === 'ISSUE') {
navTo(`/subpackage/orders/order-details-new?id=${orderInfo.id}&appraise=${orderInfo.appraise}`);

} else if (orderInfo.orderType == OrderTypes.同时换卡换签 || orderInfo.orderType == 'REPLACEMENT_CARD' || orderInfo.orderType == 'REPLACEMENT_SIGNATURE') {
} else if (orderInfo.orderType == OrderTypes.同时换卡换签 ||
orderInfo.orderType == 'REPLACEMENT_CARD' || orderInfo.orderType == 'REPLACEMENT_SIGNATURE') {
navTo(`/subpackage/orders/order-details-card-sign?id=${orderInfo.id}&orType=${orderInfo.orderType}`);

} else if (orderInfo.orderType === 'SUPPLEMENT_OBU') {

+ 30
- 28
pages/index/index.vue Просмотреть файл

@@ -6,13 +6,14 @@
<swiper class="swiper" circular :indicator-dots="swiper.indicatorDots" :autoplay="swiper.autoplay"
:interval="swiper.interval" :duration="swiper.duration" indicator-active-color="rgba(0, 179, 139, 1)"
:easing-function="swiper.easing">
<block v-if="state.swiperList.length >0" v-for="item in state.swiperList"
:key="item.id" >
<swiper-item class="swiper-item" @click="gotoLink(item)" >
<image :src="item.imgUrl?strReplace(item.imgUrl):fileURL + 'image/index/banner-1.png'" mode="widthFix"></image>
<block v-if="state.swiperList.length >0" v-for="item in state.swiperList" :key="item.id">
<swiper-item class="swiper-item" @click="gotoLink(item)">
<image :src="item.imgUrl?strReplace(item.imgUrl):fileURL + 'image/index/banner-1.png'"
mode="widthFix"></image>
</swiper-item>
</block>
<block v-else><swiper-item class="swiper-item">
<block v-else>
<swiper-item class="swiper-item">
<image :src="fileURL + 'image/index/banner-1.png'" mode="widthFix"></image>
</swiper-item>
</block>
@@ -61,7 +62,8 @@
<view class="text">设备遗失</view>
</view>
<!-- <view class="item-box" @click="$util.navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select',true)"> -->
<view class="item-box" @click="$util.navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select',true)">
<view class="item-box"
@click="$util.navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select',true)">
<view class="item item-6">
<image :src="fileURL + 'image/index/item-6.png'" />
</view>
@@ -91,14 +93,14 @@
<view class="express-lane">
<view class="title">快速办理通道</view>
<view class="lane">
<view class="lane-item lane-1" :style="{ '--background': bgOrange }" @click="showMask(0)">
<view class="lane-item lane-1" :style="{ '--background': bgOrange }" @click="showMask(1)">
<image :src="fileURL + 'image/index/icon-car.png'"></image>
<view class="text">
<text class="head">客车通道</text>
<text class="decribe">业务内容简介</text>
</view>
</view>
<view class="lane-item lane-2" :style="{ '--background': bgBlue }" @click="showMask(1)">
<view class="lane-item lane-2" :style="{ '--background': bgBlue }" @click="showMask(2)">
<image :src="fileURL + 'image/index/icon-truck.png'"></image>
<view class="text">
<text class="head">货车通道</text>
@@ -201,7 +203,7 @@
</view>
</view>
</view>
</template>

<script setup lang="ts">
@@ -244,7 +246,7 @@
navTo,
confirm
} from "@/utils/utils";
const bgOrange = `url(${fileURL}image/index/bg-orange.png) center center no-repeat`;
const bgBlue = `url(${fileURL}image/index/bg-blue.png) center center no-repeat`;
const list = reactive(["您有一条待办事项,还未办理完成"])
@@ -256,8 +258,8 @@
easing: "easeInOutCubic"
})
const state = reactive({
type: 0,//0客车 1货车
userType: 1,//1个人 2单位
type: 0, //0客车 1货车
userType: 1, //1个人 2单位
notice: "",
swiperList: [],
noticeList: [
@@ -326,14 +328,14 @@
});
onLoad(() => {
getInfo()
quanKeyAction().then((val : any) => {
quanKeyAction().then((val: any) => {
setItem('key', val.dictTypeAndItem)
})
})

onMounted(() => {
uni.getSystemInfo({
success: (e : any) => {
success: (e: any) => {
// console.log(e.statusBarHeight);
statusBarHeight.value = e.statusBarHeight;
}
@@ -381,10 +383,10 @@

//调用方式
request(querySwiper, options).then((res) => {
console.log(stringToJson(res.bizContent));
const data = stringToJson(res.bizContent)
state.swiperList = data.swipers ?? []
})
console.log(stringToJson(res.bizContent));
const data = stringToJson(res.bizContent)
state.swiperList = data.swipers ?? []
})
.catch((err) => {
console.log(err);
});
@@ -392,8 +394,8 @@
};

//轮播跳转
const gotoLink = (item:any) => {
console.log("555555555555555555",item);
const gotoLink = (item: any) => {
console.log("555555555555555555", item);
};

//办理流程tab选择
@@ -417,7 +419,7 @@
};

//全量枚举值查询
const quanKeyAction = (val : any) => {
const quanKeyAction = (val: any) => {
var data = {

};
@@ -441,8 +443,8 @@
}


const toCreatOrder = (val : number) => {
console.log(typeof (val));
const toCreatOrder = (val: number) => {
console.log(typeof(val));
state.userType = val;
// if (val === 1) {
// // navTo(`/applyCard/essential-information?type=${state.type}&&userType=${state.userType}`)
@@ -459,8 +461,8 @@
closeMask();
};

const showMask = (val : any) => {
state.type = val;//0 客车 1货车
const showMask = (val: any) => {
state.type = val; //1 客车 2货车
isShowMask.value = true;
};

@@ -493,9 +495,9 @@
console.log(err);
});
}
//替换图片地址
const strReplace = (str : string) => {
const strReplace = (str: string) => {
return str.replace('192.168.100.63:8087', envs[process.env.NODE_ENV].baseUrl)
}
</script>
@@ -920,4 +922,4 @@
padding: 55rpx 30rpx 30rpx;
}
}
</style>
</style>

+ 2
- 1
pages/order/components/order-list-item.vue Просмотреть файл

@@ -30,7 +30,8 @@
<!-- 单位账户充值开户订单 -->
<order-list-item-recharge :item="item" v-else-if="item.orderType == 'EXCHANGE_CARD_TYPE'" />
</block>
<uni-load-more :status="params.status" iconType="snow" :icon-size="16" :content-text="config.contentTxt" v-if="ordersList.length > 0"/>
<uni-load-more :status="params.status" iconType="snow" :icon-size="16" :content-text="config.contentTxt"
v-if="ordersList.length > 0"/>
</template>
</template>


+ 4
- 4
subpackage/applyCard/opening-account-people.vue Просмотреть файл

@@ -51,10 +51,10 @@
<u-input v-model="state.form.userName" placeholder='请输入姓名' />
</u-form-item>

<u-form-item label="性别">
<!-- <u-form-item label="性别">
<u-input placeholder='请选择性别' v-model="state.form.gender" @click="userGenderAction()"
type="select" />
</u-form-item>
</u-form-item> -->
<u-form-item label="身份证号">
<u-input placeholder='请输入身份证' type="idcard" v-model="state.form.userIdNum" />
</u-form-item>
@@ -123,9 +123,9 @@
<u-form-item label="姓名">
<u-input inputAlign="right" placeholder='请输入姓名' v-model="state.form.userName" />
</u-form-item>
<u-form-item label="性别">
<!-- <u-form-item label="性别">
<u-input inputAlign="right" placeholder='请选择性别' v-model="state.form.gender" type="select" />
</u-form-item>
</u-form-item> -->
<u-form-item label="身份证号">
<u-input inputAlign="right" placeholder='请输入身份证号' v-model="state.form.userIdNum" />
</u-form-item>

+ 145
- 140
subpackage/applyCard/product-detail.vue Просмотреть файл

@@ -16,37 +16,36 @@
</view>
</view>
</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"
@click="bindClick(index)"
>
<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"
@click="bindClick(index)">
<view class="content-box">
<view v-if='item.children' style="display: inline-block;">
<image :class="item.isShow?'imageChange':'imageDefault'" @click="changeIsShow(index)" src="../../static/image/icon-back.png" alt="" srcset=""></image>
<image :class="item.isShow?'imageChange':'imageDefault'" @click="changeIsShow(index)"
src="../../static/image/icon-back.png" alt="" srcset=""></image>
</view>
<text class="content-text" @tap="setOpened">{{item.productName}}
&nbsp;¥{{item.discountPrice * 0.01}}</text>
<view v-if="item.isShow" class="children" v-for="(itemChild,index) in item.children"
:key='index'>
<view>
<text>{{itemChild.productName}}</text>&nbsp;&nbsp;<text>{{itemChild.discountPrice * 0.01}}</text>
</view>
</view>
<text class="content-text" @tap="setOpened">{{item.productName}} &nbsp;¥{{item.discountPrice * 0.01}}</text>
<view v-if="item.isShow" class="children" v-for="(itemChild,index) in item.children" :key='index'>
<view><text>{{itemChild.productName}}</text>&nbsp;&nbsp;<text>{{itemChild.discountPrice * 0.01}}</text></view>
</view>
</view>
</uni-swipe-action-item>

</uni-swipe-action>
</view>
<view class="value-wrapper">
<view class="flex">
<view class="title"> 产品金额 </view>
<view class="value">
{{ "¥" + state.clientFee }}
{{ "¥" + state.detailsObj.product.oncePrice * 0.01 }}
</view>
</view>
<view class="flex">
@@ -72,13 +71,13 @@
</view>
</view>
</view>
<view class="action">
<button type="default" class="button" @click="savaHandle()">
{{ "确认办理:¥" + state.allMoney }}
</button>
</view>
</view>
</template>

@@ -88,10 +87,12 @@
onShow
} from "@dcloudio/uni-app";
import {
reactive,ref
reactive,
ref
} from "vue";
import {
etcQueryProduct,addProduct
etcQueryProduct,
addProduct
} from "@/utils/network/api.js";
import {
request
@@ -123,26 +124,25 @@
msg
} from "@/utils/utils";
const imgURL = `${fileURL}image/`;
const savaHandle = () => {
console.log("state.productId.length",state.productId.length)
if(state.productId.length>0){
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('用户点击取消');
}
}
uni.showModal({
// title: '提示',
content: '确定支付',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
wxPayment();
} else if (res.cancel) {
console.log('用户点击取消');
}
});
}else{
wxPayment();
}
}
});
// msg("确定绑定权益产品");
// wxPayment();
};
@@ -156,7 +156,7 @@
url: `https://api.weixin.qq.com/sns/jscode2session?appid=${wechatAppID}&secret=${wechatSecret}&js_code=${e.code}&grant_type=authorization_code`,
success: (res: any) => {
state.openid = res.data.openid;
console.log("state.openid",state.openid);
console.log("state.openid", state.openid);
},
});
},
@@ -192,7 +192,7 @@
checkOrder();
},
fail: function(err) {
checkOrder();
// checkOrder();
confirm(err, () => {}, "支付失败", false);
},
});
@@ -223,22 +223,20 @@
};
onLoad((option: any) => {
state.orderId = option.orderId;
state.clientFee = option.clientFee / 100;
// 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;
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.allMoney=(state.productMoney+state.clientFee).toFixed(2)
state.list=data;
console.log("data",option)
console.log("数组",JSON.parse(decodeURIComponent(option.data)))
queryDetailsData();
state.list = data;
queryDetailsData();

});

const state = reactive({
@@ -247,96 +245,92 @@
clientFee: undefined,
id: "",
options2: [{
text: '删除',
style: {
backgroundColor: '#F56C6C'
}
text: '删除',
style: {
backgroundColor: '#F56C6C'
}
],
}],
isOpened: 'none',
list:[],
productMoney:0,
allMoney:0,
productId:[],
list: [],
productMoney: 0,
allMoney: 0,
productId: [],
// 弹框
type: 'center',
msgType: 'success',
messageText: '这是一条成功提示',
value: '',
detailsObj:'',
detailsObj: '',
});
const bindClick=(i)=>{
const bindClick = (i) => {
console.log(i);
uni.showToast({
title: "删除成功",
icon: 'none'
});
state.list.splice(i,1);
state.productMoney=0;
state.productId=[];
for(var k=0;k<state.list.length;k++){
state.productMoney+=state.list[k]['discountPrice'] / 100
state.list.splice(i, 1);
state.productMoney = 0;
state.productId = [];
for (var k = 0; k < state.list.length; k++) {
state.productMoney += state.list[k]['discountPrice'] / 100
state.productId.push(state.list[k]['equityId'])
}
state.allMoney=(state.productMoney+state.clientFee).toFixed(2)
console.log("state.productId",state.productId)
state.allMoney = (state.productMoney + state.clientFee).toFixed(2)
console.log("state.productId", state.productId)
};
const setOpened=()=> {
if (state.isOpened === 'none') {
state.isOpened = 'right';
return;
}
if (state.isOpened === 'left') {
state.isOpened = 'right';
return;
}
if (state.isOpened === 'right') {
state.isOpened = 'none';
return;
}
}
const change=(e)=> {
state.isOpened = e;
console.log('返回:', e);
}
// 加购权益产品接口
const queryAddProduct=()=>{
console.log("state.openid",state.openid);
const options = {
type: 2,
data: {
orderId: state.orderId, //订单编号
openId: state.openid, //操作人 id
equityId: state.productId.toString() , //权益Id
totalAmount: state.allMoney * 100, //总金额
isRepeatPurchase:0
},
method: "POST",
showLoading: true,
};
request(addProduct, options).then((res) => {
// msg("加购权益成功。");
});
const setOpened = () => {
if (state.isOpened === 'none') {
state.isOpened = 'right';
return;
}
const changeIsShow = (index) =>{
console.log(index,state.list[index]['isShow'],!state.list[index]['isShow'])
state.list[index]['isShow']=!state.list[index]['isShow']
console.log("state.list",state.list)
if (state.isOpened === 'left') {
state.isOpened = 'right';
return;
}
const queryDetailsData=()=>{
const options = {
type: 2,
data: {
orderId: state.orderId, //订单编号
},
method: "POST",
showLoading: true,
};
request(queryDetails, options).then((res) => {
state.detailsObj=stringToJson(res.bizContent);
console.log("sdd",stringToJson(res.bizContent))
});
if (state.isOpened === 'right') {
state.isOpened = 'none';
return;
}
}
const change = (e) => {
state.isOpened = e;
}
// 加购权益产品接口
const queryAddProduct = () => {
console.log("state.openid", state.openid);
const options = {
type: 2,
data: {
orderId: state.orderId, //订单编号
openId: state.openid, //操作人 id
equityId: state.productId.toString(), //权益Id
totalAmount: state.allMoney * 100, //总金额
isRepeatPurchase: 0
},
method: "POST",
showLoading: true,
};
request(addProduct, options).then((res) => {});
}
const changeIsShow = (index) => {
console.log(index, state.list[index]['isShow'], !state.list[index]['isShow'])
state.list[index]['isShow'] = !state.list[index]['isShow']
console.log("state.list", state.list)
}
const queryDetailsData = () => {
const options = {
type: 2,
data: {
orderId: state.orderId, //订单编号
},
method: "POST",
showLoading: true,
};
request(queryDetails, options).then((res) => {
state.detailsObj = stringToJson(res.bizContent);
state.allMoney = (parseFloat(state.detailsObj.product.oncePrice * 0.01) + parseFloat(state.productMoney)).toFixed(2)
});
}
</script>

<style lang="scss" scoped>
@@ -413,6 +407,7 @@

.content {
width: 48%;

.title {
font-size: 32rpx;
font-family: Microsoft YaHei;
@@ -439,10 +434,12 @@
}
}
}
.del_item{

.del_item {
background-color: rgb(41, 199, 207) !important;
}
.content-box{

.content-box {
background-color: rgb(41, 199, 207);
line-height: 80rpx;
color: white;
@@ -451,37 +448,45 @@
padding: 20rpx;
box-sizing: border-box;
}
::v-deep.uni-swipe_button-text{

::v-deep.uni-swipe_button-text {
font-size: 30rpx !important;
}

::v-deep.uni-swipe_button-group {
font-size: 28rpx !important;
}
.add_all{

.add_all {
width: 95%;
margin: 0 auto;
}
.uni-swipe_box{

.uni-swipe_box {
margin-bottom: 16rpx !important;
}

::v-deep.uni-swipe {
margin-bottom: 16rpx !important;
}
.imageDefault{
height: 40rpx;
width: 40rpx;
transform: rotate(270deg);
margin-right: 12rpx;
color: white;

.imageDefault {
height: 40rpx;
width: 40rpx;
transform: rotate(270deg);
margin-right: 12rpx;
color: white;
}
.imageChange{
height: 40rpx;
width: 40rpx;
transform: rotate(90deg);
margin-right: 12rpx;
color: white;

.imageChange {
height: 40rpx;
width: 40rpx;
transform: rotate(90deg);
margin-right: 12rpx;
color: white;
}
.price{

.price {
color: white;
}
</style>

+ 1
- 1
subpackage/orders/order-details-new.vue Просмотреть файл

@@ -358,7 +358,7 @@
<view class="btn-green" @click="gotoEditAddress(state.orderInfo)">修改地址</view>
</view>
<!-- 待支付 -->
<view v-if="state.orderInfo.orderStep == OrderStatus.待支付" class="btn-status">
<view v-if="state.orderInfo.orderStep == OrderStatus.待支付1 || state.orderInfo.orderStep == OrderStatus.待支付2 || state.orderInfo.orderStep == OrderStatus.待支付3" class="btn-status">
<view class="btn space" @click="gotoCancelOrder(state.orderInfo)">取消订单</view>
<view class="btn-green width-num-1" @click="gotoPay(state.orderInfo)">支付</view>
</view>

+ 2
- 2
utils/network/api.js Просмотреть файл

@@ -6,8 +6,8 @@ export const URL = "192.168.100.63";
export const envs = {
//开发环境配置
development: {
// baseUrl: "192.168.100.63:8087",
baseUrl: "222.85.144.89:19002",
baseUrl: "192.168.100.63:8087",
// baseUrl: "222.85.144.89:19002",
},
//生产环境配置
production: {

Загрузка…
Отмена
Сохранить