Explorar el Código

续步选择卡类型

yxb
DESKTOP-2IO5MST\huting hace 2 años
padre
commit
ca0be70a2a

+ 9
- 2
composables/order/useOrderSkip.ts Ver fichero

import { msg, navTo } from "@/utils/utils"; import { msg, navTo } from "@/utils/utils";
import { OrderStatus } from "@/datas/enum"; import { OrderStatus } from "@/datas/enum";
import { OrderTypes } from "@/datas/enum"; import { OrderTypes } from "@/datas/enum";
import { getItem, setItem } from "@/utils/storage";


export default function useOrderSkip() { export default function useOrderSkip() {


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


url = orderInfo.userType === 'PERSONAL_USER' ? '/subpackage/orders/opening-account-people' : '/subpackage/orders/opening-account-unit'; url = orderInfo.userType === 'PERSONAL_USER' ? '/subpackage/orders/opening-account-people' : '/subpackage/orders/opening-account-unit';
} else if (orderInfo.orderStep === OrderStatus["完成个人/单位信息上传"]) { } else if (orderInfo.orderStep === OrderStatus["完成个人/单位信息上传"]) {
url = '/subpackage/orders/car-release'; url = '/subpackage/orders/car-release';
} else if (orderInfo.orderStep === OrderStatus.完成车辆信息上传) {
} else if (orderInfo.orderStep === OrderStatus.完成车辆信息上传 && orderInfo.isValueCard != 2) {
url = `/subpackage/orders/release-products`; url = `/subpackage/orders/release-products`;
} else if (orderInfo.orderStep === OrderStatus.完成车辆信息上传 && orderInfo.isValueCard == 2) {
url = `/subpackage/orders/interestsList?orderId=${orderInfo.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`;
// uni.redirectTo({
// url: `/subpackage/orders/choice-product?orderId=${val.orderId}`,
// });
} else { } else {
url = `/subpackage/orders/essential-information`; url = `/subpackage/orders/essential-information`;
} }
console.log("url", url)
navTo(`${url}?orderId=${orderInfo.orderId}&clientFee=${orderInfo.amount}&id=${orderInfo.productId}&vehiclePlateColor=${orderInfo.vehiclePlateColor}&fromOrder=true&type=${orderInfo.type}&userType=${orderInfo.userType === 'PERSONAL_USER' ? '1' : '2'}`); navTo(`${url}?orderId=${orderInfo.orderId}&clientFee=${orderInfo.amount}&id=${orderInfo.productId}&vehiclePlateColor=${orderInfo.vehiclePlateColor}&fromOrder=true&type=${orderInfo.type}&userType=${orderInfo.userType === 'PERSONAL_USER' ? '1' : '2'}`);
} }



+ 6
- 1
pages/order/components/order-list-item-new.vue Ver fichero

<view class="btn btn-primary" @click.stop="gotoEditUserOrUnitInfo(item)">继续申请</view> <view class="btn btn-primary" @click.stop="gotoEditUserOrUnitInfo(item)">继续申请</view>
</view> </view>

<!-- 待支付 --> <!-- 待支付 -->
<view class="btns" v-if="item.orderStep == OrderStatus.待支付1"> <view class="btns" v-if="item.orderStep == OrderStatus.待支付1">
<view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view> <view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view>
<view class="btn btn-normal" @click.stop="gotoCheckLogistics(item)">查看物流</view> <view class="btn btn-normal" @click.stop="gotoCheckLogistics(item)">查看物流</view>
<view class="btn btn-primary" @click.stop="gotoConfirmReceipt(item)">确认收货</view> <view class="btn btn-primary" @click.stop="gotoConfirmReceipt(item)">确认收货</view>
</view> </view>
<!-- '已支付' = 5,
'已申请-退货' = 13,
'退款中' = 15,
'退款成功' = 16,
'退货成功' = 17,
'换货-设备已回收' = 18, -->
</template> </template>
</view> </view>



+ 2
- 1
pages/order/components/order-list-item.vue Ver fichero

<!-- 列表 --> <!-- 列表 -->
<block v-for="(item,index) in ordersList" :key="index"> <block v-for="(item,index) in ordersList" :key="index">
<!-- 新办订单 --> <!-- 新办订单 -->
<order-list-item-new :item="item" v-if="item.orderType == 'ISSUE'" />
<!-- v-if="item.orderType == 'ISSUE'" -->
<order-list-item-new :item="item" />
<!-- 卡签同时更换/更换卡/更换签订单 --> <!-- 卡签同时更换/更换卡/更换签订单 -->
<!-- <order-list-item-card-sign :item="item" <!-- <order-list-item-card-sign :item="item"
v-else-if="item.orderType == OrderTypes.同时换卡换签 || item.orderType == 'REPLACEMENT_CARD' v-else-if="item.orderType == OrderTypes.同时换卡换签 || item.orderType == 'REPLACEMENT_CARD'

+ 12
- 4
subpackage/orders/car-release.vue Ver fichero

}&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`, }&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`,
}); });
} else { } else {
// uni.redirectTo({
// url: `/subpackage/orders/release-products?orderId=${state.form.orderId
// }&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`,
// });
uni.redirectTo({ uni.redirectTo({
// url: `/subpackage/orders/choice-product?orderId=${state.form.orderId}`,
url: `/subpackage/orders/release-products?orderId=${state.form.orderId
}&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`,
url: `/subpackage/orders/sign-up?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`,
}); });
} }
}else{ }else{
// 不签约 // 不签约
// uni.redirectTo({
// url: `/subpackage/orders/sign-up?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`,
// });
uni.redirectTo({ uni.redirectTo({
url: `/subpackage/orders/sign-up?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`,
url:`/subpackage/orders/interestsList?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`
}); });
// uni.redirectTo({
// url: `/subpackage/orders/release-products?orderId=${state.form.orderId}&clientFee=${getItem('clientFee')}&&id=${getItem('productId')}`,
// });
} }
} }
}); });

+ 36
- 5
subpackage/orders/choice-product.vue Ver fichero

</view> </view>
<view class="bottomTip"> 到底啦!敬请期待其他产品! </view> <view class="bottomTip"> 到底啦!敬请期待其他产品! </view>
</view> </view>
<u-popup mode="center" v-model="state.choiceCardShow">
<u-popup mode="center" v-model="state.choiceCardShow" closeable>
<view class="squire"> <view class="squire">
<u-radio-group>
<u-radio :customStyle="{marginBottom: '8px'}" activeColor="#2CE242"
<!-- <view class="mask-close">
<image :src="fileURL + 'image/index/icon-close.png'" class="icon-closed" @click="closeMask"></image>
</view> -->
<view class="mask-title" :style="{ '--color': color }">选择卡的类型</view>
<u-radio-group wrap>
<u-radio :customStyle="{marginBottom: '8px'}" activeColor="#2CE242"
v-for="(item, index) in state.radiolist1" :key="index" :label="item.disabled" :name="item.name" v-for="(item, index) in state.radiolist1" :key="index" :label="item.disabled" :name="item.name"
@change="radioChange"> @change="radioChange">
{{item.name}}
<view style="width: 100%;display: flex;align-items: center;margin-bottom: 30rpx;">
<image
style="width: 200rpx; height: 100rpx; border-radius: 20rpx;margin-right: 20rpx;"
:src="`${$imgUrl}applyCard/product-bg.png`"
mode="aspectFill"
></image>
{{item.name}}
</view>
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</view> </view>
</script> </script>


<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .u-radio{
display: flex !important;
align-items: center !important;
float: none !important;
}
::v-deep .u-icon__icon{ ::v-deep .u-icon__icon{
top: -4px !important; top: -4px !important;
} }
border-radius: 10rpx; border-radius: 10rpx;
} }
.squire{ .squire{
padding: 20rpx;
padding: 30rpx 30rpx 30rpx 50rpx;
} }
.mask-close {
text-align: right;
}
.icon-closed {
width: 48rpx;
height: 48rpx;
}
.mask-title {
text-align: center;
font-size: 32rpx;
color: $uni-text-color-black;
margin-bottom: 50rpx;
margin-top: 50rpx;
}
</style> </style>

+ 13
- 4
subpackage/orders/essential-information.vue Ver fichero

}; };
//订单状态舔砖 //订单状态舔砖
const orderStepGoActon = (val: any) => { const orderStepGoActon = (val: any) => {
console.log(val);
console.log("订单状态舔砖",val);
//完成填写基本信息 //完成填写基本信息
if (val.orderStep === 1) { if (val.orderStep === 1) {
if (state.data.userType === 1) { if (state.data.userType === 1) {
url: `/subpackage/orders/car-release?orderId=${val.orderId}&&vehiclePlateColor=${val.vehiclePlateColor}`, url: `/subpackage/orders/car-release?orderId=${val.orderId}&&vehiclePlateColor=${val.vehiclePlateColor}`,
}); });
} else if (val.orderStep === 3) { } else if (val.orderStep === 3) {
uni.redirectTo({
url: `/subpackage/orders/choice-product?orderId=${val.orderId}`,
});
uni.redirectTo({
url: `/subpackage/orders/choice-product?orderId=${val.orderId}`,
});
// if(val.isValueCard==2){
// uni.redirectTo({
// url:`/subpackage/orders/interestsList?orderId=${val.orderId}&&clientFee=${val.product.clientFee}&&id=${val.productId}`
// });
// }else{
// uni.redirectTo({
// url: `/subpackage/orders/choice-product?orderId=${val.orderId}`,
// });
// }
}else if (val.orderStep === 4) { }else if (val.orderStep === 4) {
uni.redirectTo({ uni.redirectTo({
url: `/subpackage/orders/product-detail?orderId=${val.orderId}&&clientFee=${val.product.clientFee}&&id=${val.productId}`, url: `/subpackage/orders/product-detail?orderId=${val.orderId}&&clientFee=${val.product.clientFee}&&id=${val.productId}`,

+ 14
- 2
subpackage/orders/interestsList.vue Ver fichero

</view> </view>
</view> </view>
</view> </view>
<button type="default" class="button" @click="savaHandle()">
<!-- <button type="default" class="button" @click="savaHandle()">
开通服务 开通服务
</button> -->
<button type="default" class="button" @click="addInterestsList()">
加购权益
</button> </button>
</view> </view>
</template> </template>
state.id = option.id; state.id = option.id;
console.log("option", option) console.log("option", option)
}) })
const addInterestsList=()=>{
state.choiceValueComplete = [];
for (var i = 0; i < state.choiceValue.length; i++) {
state.choiceValueComplete.push(state.list[state.choiceValue[i]])
}
let items = encodeURIComponent(JSON.stringify(state.choiceValueComplete));
uni.navigateTo({
url: `/subpackage/orders/product-detail?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}&&data=${items}`,
});
}
const getList = (id) => { const getList = (id) => {
const options = { const options = {
type: 2, type: 2,

+ 2
- 2
subpackage/orders/order-details-new.vue Ver fichero

request(orderDetail, options).then((res) => { request(orderDetail, options).then((res) => {
state.orderInfo = stringToJson(res.bizContent); state.orderInfo = stringToJson(res.bizContent);
state.orderInfo.appraise = appraise; state.orderInfo.appraise = appraise;
console.log("state.orderInfo",state.orderInfo)
//测试 //测试
// state.orderInfo.orderStep = OrderStatus.待激活; // state.orderInfo.orderStep = OrderStatus.待激活;
}) })
//是否有售后信息 //是否有售后信息
const isHaveAfterSaleInfo = () =>{ const isHaveAfterSaleInfo = () =>{
if(isBlank(state.orderInfo.orderInfoExt.returnMode ?state.orderInfo.orderInfoExt.returnMode: null) && isBlank(state.orderInfo.orderInfoExt.exchangeMode ?state.orderInfo.orderInfoExt.exchangeMode: null)){
if(isBlank(state.orderInfo.orderInfoExt ?state.orderInfo.orderInfoExt.returnMode: null) && isBlank(state.orderInfo.orderInfoExt ?state.orderInfo.orderInfoExt.exchangeMode: null)){
return false; return false;
} }
return true; return true;

+ 1
- 1
subpackage/orders/product-detail.vue Ver fichero

</view> </view>
</view> </view>
</view> </view>
加购权益列表
<view style="margin: 20rpx 0 10rpx 20rpx;font-size: 32rpx;">加购权益列表</view>
<view class="add_all"> <view class="add_all">
<uni-swipe-action> <uni-swipe-action>
<uni-swipe-action-item class="del_item" v-for="(item,index) in state.list" <uni-swipe-action-item class="del_item" v-for="(item,index) in state.list"

+ 10
- 7
subpackage/orders/sign-up.vue Ver fichero

</view> </view>
</view> </view>
<view class="action"> <view class="action">
<!-- <button type="default" class="button" @click="savaHandle()">
<button type="default" class="button" @click="savaHandle()">
开通服务 开通服务
</button> -->
<button type="default" class="button" @click="addInterestsList()">
</button>
<!-- <button type="default" class="button" @click="addInterestsList()">
加购权益 加购权益
</button>
</button> -->
</view> </view>
</template> </template>


}); });
} else if (data.userState === "NORMAL") { } else if (data.userState === "NORMAL") {
msg("已开通车主服务"); msg("已开通车主服务");
uni.navigateTo({
url: `/subpackage/orders/product-detail?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}`,
});
// uni.navigateTo({
// url: `/subpackage/orders/product-detail?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}`,
// });
uni.navigateTo({
url:`/subpackage/orders/interestsList?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}`
});
} else if (data.userState === "PAUSED") { } else if (data.userState === "PAUSED") {
msg("已暂停车主服务"); msg("已暂停车主服务");
return; return;

+ 1
- 0
utils/network/request.js Ver fichero



//请求 //请求
export function request(code, options = {}) { export function request(code, options = {}) {
// request(code,options)
//公参 //公参
const Common = { const Common = {
agentId: "52010106004", agentId: "52010106004",

Cargando…
Cancelar
Guardar