import { gotoAgainUseOrderApi, finishUseOrderApi } from "@/utils/network/api.js"; | import { gotoAgainUseOrderApi, finishUseOrderApi } from "@/utils/network/api.js"; | ||||
import { stringToJson } from "@/utils/network/encryption.js"; | import { stringToJson } from "@/utils/network/encryption.js"; | ||||
import { jump } from "@/datas/9901Jump.js"; | import { jump } from "@/datas/9901Jump.js"; | ||||
import { agencyId } from "@/utils/network/difference"; | |||||
import { deviceType } from "@/utils/network/difference"; | |||||
export default function useOrderSkip() { | export default function useOrderSkip() { | ||||
const gotoOrderDetailsPay = (orderInfo) => { | const gotoOrderDetailsPay = (orderInfo) => { | ||||
// #ifdef MP-WEIXIN | // #ifdef MP-WEIXIN | ||||
console.log("********555555555555**********", orderInfo.orderStep, OrderStatus["已支付/待签约"]); | console.log("********555555555555**********", orderInfo.orderStep, OrderStatus["已支付/待签约"]); | ||||
let url = ''; | let url = ''; | ||||
if (orderInfo.orderStep == OrderStatus.完成填写基本信息 || orderInfo.orderStep == OrderStatus.待支付3) { | if (orderInfo.orderStep == OrderStatus.完成填写基本信息 || orderInfo.orderStep == OrderStatus.待支付3) { | ||||
if (orderInfo.agencyId == agencyId) { | |||||
if (orderInfo.deviceType == deviceType) { | |||||
const params = encodeURIComponent(JSON.stringify(orderInfo)) | const params = encodeURIComponent(JSON.stringify(orderInfo)) | ||||
jump("10", params) | jump("10", params) | ||||
} else { | } else { | ||||
} else if (orderInfo.orderStep === OrderStatus.待加购权益) { | } else if (orderInfo.orderStep === OrderStatus.待加购权益) { | ||||
navTo(`/subpackage/orders/interestsList?orderId=${orderInfo.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`); | navTo(`/subpackage/orders/interestsList?orderId=${orderInfo.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`); | ||||
} else if (orderInfo.orderStep === OrderStatus["完成车辆信息上传/待支付"]) { | } else if (orderInfo.orderStep === OrderStatus["完成车辆信息上传/待支付"]) { | ||||
if (orderInfo.agencyId == agencyId) { | |||||
if (orderInfo.deviceType == deviceType) { | |||||
const params = encodeURIComponent(JSON.stringify(orderInfo)) | const params = encodeURIComponent(JSON.stringify(orderInfo)) | ||||
jump("11", params) | jump("11", params) | ||||
} else { | } else { | ||||
} else if (orderInfo.orderStep === OrderStatus["审核不通过"]) { //修改资料 | } else if (orderInfo.orderStep === OrderStatus["审核不通过"]) { //修改资料 | ||||
url = '/subpackage/orders/changeInformation'; | url = '/subpackage/orders/changeInformation'; | ||||
} else if (orderInfo.orderStep === OrderStatus["已支付/待签约"]) { //修改资料 | } else if (orderInfo.orderStep === OrderStatus["已支付/待签约"]) { //修改资料 | ||||
if (orderInfo.agencyId == agencyId) { | |||||
if (orderInfo.deviceType == deviceType) { | |||||
const params = encodeURIComponent(JSON.stringify(orderInfo)) | const params = encodeURIComponent(JSON.stringify(orderInfo)) | ||||
jump("12", params) | jump("12", params) | ||||
} else { | } else { | ||||
//申请退货 | //申请退货 | ||||
const gotoReturnOrder = (orderInfo : any) => { | const gotoReturnOrder = (orderInfo : any) => { | ||||
if (orderInfo.agencyId == agencyId) { | |||||
if (orderInfo.deviceType == deviceType) { | |||||
const params = encodeURIComponent(JSON.stringify(orderInfo)) | const params = encodeURIComponent(JSON.stringify(orderInfo)) | ||||
jump("8", params) | jump("8", params) | ||||
} else { | } else { | ||||
//申请换货 | //申请换货 | ||||
const gotoExchangeOrder = (orderInfo : any) => { | const gotoExchangeOrder = (orderInfo : any) => { | ||||
if (orderInfo.agencyId == agencyId) { | |||||
if (orderInfo.deviceType == deviceType) { | |||||
const params = encodeURIComponent(JSON.stringify(orderInfo)) | const params = encodeURIComponent(JSON.stringify(orderInfo)) | ||||
jump("7", params) | jump("7", params) | ||||
} else { | } else { | ||||
} | } | ||||
//申请补货 | //申请补货 | ||||
const gotoReplenishmentOrder = (orderInfo : any) => { | const gotoReplenishmentOrder = (orderInfo : any) => { | ||||
if (orderInfo.agencyId == agencyId) { | |||||
if (orderInfo.deviceType == deviceType) { | |||||
const params = encodeURIComponent(JSON.stringify(orderInfo)) | const params = encodeURIComponent(JSON.stringify(orderInfo)) | ||||
jump("9", params) | jump("9", params) | ||||
} | } | ||||
//去激活订单 | //去激活订单 | ||||
const gotoActiveOrder = (orderInfo : any) => { | const gotoActiveOrder = (orderInfo : any) => { | ||||
if (orderInfo.agencyId == agencyId) { | |||||
if (orderInfo.deviceType == deviceType) { | |||||
const params = encodeURIComponent(JSON.stringify(orderInfo)) | const params = encodeURIComponent(JSON.stringify(orderInfo)) | ||||
jump("14", params) | jump("14", params) | ||||
} else { | } else { | ||||
} | } | ||||
//去签约 | //去签约 | ||||
const gotoOrderSign = (orderInfo : any) => { | const gotoOrderSign = (orderInfo : any) => { | ||||
if (orderInfo.agencyId == agencyId) { | |||||
if (orderInfo.deviceType == deviceType) { | |||||
const params = encodeURIComponent(JSON.stringify(orderInfo)) | const params = encodeURIComponent(JSON.stringify(orderInfo)) | ||||
jump("12", params) | jump("12", params) | ||||
} else { | } else { | ||||
} | } | ||||
//异地-邮寄地址填写 | //异地-邮寄地址填写 | ||||
const gotoAddressOrder=(orderInfo:any)=>{ | const gotoAddressOrder=(orderInfo:any)=>{ | ||||
if (orderInfo.agencyId == agencyId) { | |||||
if (orderInfo.deviceType == deviceType) { | |||||
const params = encodeURIComponent(JSON.stringify(orderInfo)) | const params = encodeURIComponent(JSON.stringify(orderInfo)) | ||||
jump("13", params) | jump("13", params) | ||||
} | } |
let handleType="" | let handleType="" | ||||
let orderType="" | let orderType="" | ||||
let afterType="" | let afterType="" | ||||
let accountType="" | |||||
let carType="" | |||||
if(type=="15" ){ | if(type=="15" ){ | ||||
// 7. accountType 1 个人 2企业 | |||||
// 8. carType 0 客车 1 货车 | |||||
accountType=data.userType | |||||
carType=data.type=='1'?0:1 | |||||
console.log("accountType",accountType,carType) | |||||
redirectUrl=`/pages/order/order` | |||||
} | |||||
if(type=="10" || type=="11" || type=="12"|| type=="13"){ | |||||
redirectUrl="/pages/order/order" | redirectUrl="/pages/order/order" | ||||
handleType="continuation" | |||||
} | } | ||||
if(type=="14" || type=="10" || type=="11" || type=="12"|| type=="13"){ | |||||
// 售后激活 更换卡签 | |||||
if(type=="14" && (data['orderType']=='EXCHANGE_CARD' || data['orderType']=='EXCHANGE_OBU' || data['orderType']=='EXCHANGE_ALL')){ | |||||
afterType=3 | |||||
orderType=2 | |||||
handleType="aftersale" | |||||
redirectUrl="/pages/order/order" | |||||
}else{ | |||||
// 14 正常激活 | |||||
redirectUrl="/pages/order/order" | redirectUrl="/pages/order/order" | ||||
handleType="continuation" | handleType="continuation" | ||||
} | } | ||||
if(type=="7" || type=="8" || type=="9"){ | if(type=="7" || type=="8" || type=="9"){ | ||||
redirectUrl="/pages/order/order" | redirectUrl="/pages/order/order" | ||||
handleType="aftersale" | handleType="aftersale" | ||||
} | } | ||||
// 售后业务 | // 售后业务 | ||||
if(type=="2" || type=="3"|| type=="4" || type=="5"|| type=="6"){ | if(type=="2" || type=="3"|| type=="4" || type=="5"|| type=="6"){ | ||||
redirectUrl="/pages/service/service" | |||||
redirectUrl="/pages/index/index" | |||||
handleType="aftersale" | handleType="aftersale" | ||||
if(data['after']){ | if(data['after']){ | ||||
orderType=2 | orderType=2 | ||||
// 重新激活 | // 重新激活 | ||||
if(type=="1"){ | if(type=="1"){ | ||||
handleType="reactivate" | handleType="reactivate" | ||||
redirectUrl="/pages/service/service" | |||||
redirectUrl="/pages/index/index" | |||||
} | } | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url:`plugin://issuer-plugin/login?redirectUrl=${redirectUrl}&plateNum=${data.vehicleId?data.vehicleId:""}&handleType=${handleType}&orderNo=${data.orderId?data.orderId:""}&orderType=${orderType}&afterType=${afterType}` | |||||
url:`plugin://issuer-plugin/login?redirectUrl=${redirectUrl}&plateNum=${data.vehicleId?data.vehicleId:""}&handleType=${handleType}&orderNo=${data.orderId?data.orderId:""}&orderType=${orderType}&afterType=${afterType}&accountType=${accountType}&carType=${carType}` | |||||
}) | }) | ||||
"requiredPrivateInfos": ["chooseLocation", "getLocation", "chooseAddress"], | "requiredPrivateInfos": ["chooseLocation", "getLocation", "chooseAddress"], | ||||
"plugins": { | "plugins": { | ||||
"issuer-plugin": { | "issuer-plugin": { | ||||
"version": "dev-442e4ff301000c311d271e67449f871a", | |||||
"version": "dev-6124a94c780bba48fa11c972bcca2c98", | |||||
"provider": "wxa2d9acdd1054e69b" | "provider": "wxa2d9acdd1054e69b" | ||||
} | } | ||||
} | } |
</view> | </view> | ||||
<!-- 待激活 --> | <!-- 待激活 --> | ||||
<view class="btns" v-else-if="item.orderStep == OrderStatus.待激活"> | <view class="btns" v-else-if="item.orderStep == OrderStatus.待激活"> | ||||
<view class="btn btn-normal" @click.stop="gotoReturnOrder(item)" v-if="item.applyReturn">申请退货</view> | <view class="btn btn-normal" @click.stop="gotoReturnOrder(item)" v-if="item.applyReturn">申请退货</view> | ||||
<view class="btn btn-normal" @click.stop="gotoExchangeOrder(item)">申请换货</view> | <view class="btn btn-normal" @click.stop="gotoExchangeOrder(item)">申请换货</view> | ||||
<view class="btn btn-normal" @click.stop="gotoReplenishmentOrder(item)" v-if="item.agencyId==agencyId">申请补货</view> | |||||
<view class="btn btn-normal" @click.stop="gotoReplenishmentOrder(item)" v-if="item.deviceType==deviceType">申请补货</view> | |||||
<view class="btn btn-primary" @click.stop="gotoActiveOrder(item)">去激活</view> | <view class="btn btn-primary" @click.stop="gotoActiveOrder(item)">去激活</view> | ||||
<view class="btn btn-primary" @click.stop="closeOrder(item)" v-if="item.finishOrder">结束订单</view> | <view class="btn btn-primary" @click.stop="closeOrder(item)" v-if="item.finishOrder">结束订单</view> | ||||
</view> | </view> | ||||
<!-- ORDER_STEP_31(31, "异地-售前退货"), | |||||
ORDER_STEP_32(32, "异地-售前退货后确认收货"), | |||||
ORDER_STEP_33(33, "异地-售前换货"), | |||||
ORDER_STEP_34(34, "异地-售前换货后确认收货"), --> | |||||
<view class="btns" v-else-if="item.orderStep == 31"> | |||||
<view class="btn btn-primary" @click.stop="gotoReturnOrder(item)" >退货</view> | |||||
</view> | |||||
<view class="btns" v-else-if="item.orderStep==33"> | |||||
<view class="btn btn-primary" @click.stop="gotoExchangeOrder(item)">换货</view> | |||||
</view> | |||||
<!-- 已完成 售后订单不允许评价产品,储值卡转记账卡除外--> | <!-- 已完成 售后订单不允许评价产品,储值卡转记账卡除外--> | ||||
<!-- 发行产品 isProduct=0; 业务员 isStaff=0; 权益 isEquity=0 业务服务 isService=0; --> | <!-- 发行产品 isProduct=0; 业务员 isStaff=0; 权益 isEquity=0 业务服务 isService=0; --> | ||||
<view class="btns" | <view class="btns" | ||||
<view class="btn btn-primary" @click.stop="gotoAgainUseOrder(item)">再次使用订单</view> | <view class="btn btn-primary" @click.stop="gotoAgainUseOrder(item)">再次使用订单</view> | ||||
</view> | </view> | ||||
<!-- 异地-邮寄地址填写 --> | <!-- 异地-邮寄地址填写 --> | ||||
<view class="btns" v-else-if="item.orderStep == OrderStatus.邮寄地址填写 && item.agencyId==agencyId"> | |||||
<view class="btns" v-else-if="item.orderStep == OrderStatus.邮寄地址填写 && item.deviceType==deviceType"> | |||||
<view class="btn btn-primary" @click.stop="gotoAddressOrder(item)">邮寄地址填写</view> | <view class="btn btn-primary" @click.stop="gotoAddressOrder(item)">邮寄地址填写</view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<script lang="ts" setup> | <script lang="ts" setup> | ||||
import popupActiveOrder from "./popup-active-order.vue"; | import popupActiveOrder from "./popup-active-order.vue"; | ||||
import useOrderSkip from "@/composables/order/useOrderSkip"; | import useOrderSkip from "@/composables/order/useOrderSkip"; | ||||
import { agencyId } from "@/utils/network/difference"; | |||||
import { deviceType } from "@/utils/network/difference"; | |||||
import { | import { | ||||
getOrderStatusName, | getOrderStatusName, | ||||
msg, | msg, |
import { getItem, StorageKeys, setItem } from "@/utils/storage"; | import { getItem, StorageKeys, setItem } from "@/utils/storage"; | ||||
import { stringToJson } from "@/utils/network/encryption"; | import { stringToJson } from "@/utils/network/encryption"; | ||||
import { jump } from "@/datas/9901Jump.js"; | import { jump } from "@/datas/9901Jump.js"; | ||||
import { agencyId } from "@/utils/network/difference"; | |||||
import { deviceType } from "@/utils/network/difference"; | |||||
const state = reactive({ | const state = reactive({ | ||||
list: [], | list: [], | ||||
type: "",//1 OBU重新激活 2 卡签注销 3 更换设备 4卡签续期 5挂失解挂 6增补设备 | type: "",//1 OBU重新激活 2 卡签注销 3 更换设备 4卡签续期 5挂失解挂 6增补设备 | ||||
console.log(item.cardId); | console.log(item.cardId); | ||||
flag.value = i | flag.value = i | ||||
// 判断9901 | // 判断9901 | ||||
if (item.agencyId == agencyId) { | |||||
if (item.deviceType == deviceType) { | |||||
// OBU重新激活跳转 | // OBU重新激活跳转 | ||||
const params = encodeURIComponent(JSON.stringify(item)) | const params = encodeURIComponent(JSON.stringify(item)) | ||||
if(state.type=="5"){ | if(state.type=="5"){ |
<navBar title="选择产品" :scrollTop="scrollTop"></navBar> | <navBar title="选择产品" :scrollTop="scrollTop"></navBar> | ||||
<navBgCar></navBgCar> | <navBgCar></navBgCar> | ||||
<view class="content-value"> | <view class="content-value"> | ||||
<view v-for="(item, index) in state.dataArray" :key="index"> | |||||
<view v-for="(item, index) in state.dataArray" :key="index" > | |||||
<view :style="`background-color:${bgc}`" style="border-radius: 16rpx;padding: 20rpx;margin-top: 20rpx;"> | <view :style="`background-color:${bgc}`" style="border-radius: 16rpx;padding: 20rpx;margin-top: 20rpx;"> | ||||
<view class="title" style="display: flex;flex-direction: row;justify-content: flex-start;"> | <view class="title" style="display: flex;flex-direction: row;justify-content: flex-start;"> | ||||
<view style="font-weight: bold;margin-right: 10rpx;font-size: 18px;"> | <view style="font-weight: bold;margin-right: 10rpx;font-size: 18px;"> | ||||
setItem("promoteId", val.promoteId); | setItem("promoteId", val.promoteId); | ||||
state.isSign = val.isSign; | state.isSign = val.isSign; | ||||
state.signAgencyId = val['releaseProductStandards']['signAgencyId']; | |||||
state.signAgencyId = val['releaseProductStandards']['deviceType']; | |||||
state.equityId = val.releaseProductStandards.equityList[idx].equityId; | state.equityId = val.releaseProductStandards.equityList[idx].equityId; | ||||
// 产品金额+权益金额 | // 产品金额+权益金额 | ||||
state.fee = Number(val.fee) + Number(val.releaseProductStandards.equityList[idx].discountPrice); | state.fee = Number(val.fee) + Number(val.releaseProductStandards.equityList[idx].discountPrice); | ||||
console.log("state.isValueCard", state.isValueCard) | console.log("state.isValueCard", state.isValueCard) | ||||
setItem("isValueCard", state.isValueCard); | setItem("isValueCard", state.isValueCard); | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: `/subpackage/orders/interestsList?equityId=${val.releaseProductStandards.equityList[idx].equityId}&promoteId=${val['promoteId']}&userType=${state.userType}&type=${state.type}&isValueCard=${state.isValueCard}&fee=${state.fee}&signAgencyId=${val['releaseProductStandards']['signAgencyId']}`, | |||||
url: `/subpackage/orders/interestsList?equityId=${val.releaseProductStandards.equityList[idx].equityId}&promoteId=${val['promoteId']}&userType=${state.userType}&type=${state.type}&isValueCard=${state.isValueCard}&fee=${state.fee}&signAgencyId=${val['releaseProductStandards']['deviceType']}`, | |||||
}); | }); | ||||
} else { | } else { | ||||
state.radiolist1 = []; | state.radiolist1 = []; |
getItem, | getItem, | ||||
setItem | setItem | ||||
} from "@/utils/storage"; | } from "@/utils/storage"; | ||||
import { deviceType } from "@/utils/network/difference"; | |||||
const state = reactive({ | const state = reactive({ | ||||
openid: "", | openid: "", | ||||
equityId: "", | equityId: "", | ||||
state.signAgencyId = option.signAgencyId; | state.signAgencyId = option.signAgencyId; | ||||
}) | }) | ||||
const addInterestsList = () => { | const addInterestsList = () => { | ||||
if(state.signAgencyId=="52010102041"){ | |||||
jump("15","") | |||||
// uni.navigateTo({ | |||||
// url:`plugin://issuer-plugin/login?wxOpenId=${getItem("QYorder").openid}&type=1` | |||||
// }) | |||||
console.log("state.signAgencyId",state.signAgencyId,deviceType) | |||||
if(state.signAgencyId==deviceType){ | |||||
let obj={ | |||||
type:state.type, | |||||
userType:state.userType, | |||||
} | |||||
const params = encodeURIComponent(JSON.stringify(obj)) | |||||
jump("15",params) | |||||
}else{ | }else{ | ||||
if (state.changeCardType == "1") { | if (state.changeCardType == "1") { | ||||
navTo( | navTo( |
data: { | data: { | ||||
id: state.orderInfo.id, | id: state.orderInfo.id, | ||||
source: "WECHAT", | source: "WECHAT", | ||||
opId: getItem(StorageKeys.OpenId), | |||||
opId: getItem(StorageKeys.OpenId) | |||||
}, | }, | ||||
method: "POST", | method: "POST", | ||||
showLoading: true, | showLoading: true, |
<view class="btn-green" @click.stop="closeOrder(state.orderInfo)" | <view class="btn-green" @click.stop="closeOrder(state.orderInfo)" | ||||
v-if="state.orderInfo.finishOrder">结束订单</view> | v-if="state.orderInfo.finishOrder">结束订单</view> | ||||
</view> | </view> | ||||
<!-- 订单已结束 --> | <!-- 订单已结束 --> | ||||
<view v-if="state.orderInfo.orderStep == OrderStatus.已结束 && state.orderInfo.isUseAgain" | <view v-if="state.orderInfo.orderStep == OrderStatus.已结束 && state.orderInfo.isUseAgain" | ||||
class="btn-status"> | class="btn-status"> | ||||
<view class="btn-green" @click.stop="gotoAgainUseOrder(state.orderInfo)">再次使用订单</view> | <view class="btn-green" @click.stop="gotoAgainUseOrder(state.orderInfo)">再次使用订单</view> | ||||
</view> | </view> | ||||
<!-- 异地-邮寄地址填写 --> | <!-- 异地-邮寄地址填写 --> | ||||
<view v-if="state.orderInfo.orderStep == OrderStatus.邮寄地址填写 && state.orderInfo.agencyId==agencyId" | |||||
<view v-if="state.orderInfo.orderStep == OrderStatus.邮寄地址填写 && state.orderInfo.deviceType==deviceType" | |||||
class="btn-status"> | class="btn-status"> | ||||
<view class="btn-green" @click.stop="gotoAddressOrder(state.orderInfo)">邮寄地址填写</view> | <view class="btn-green" @click.stop="gotoAddressOrder(state.orderInfo)">邮寄地址填写</view> | ||||
</view> | </view> | ||||
<!-- 异地开始 --> | |||||
<view v-if="state.orderInfo.orderStep == 31" class="btn-status"> | |||||
<view class="btn btn-green" @click="gotoReturnOrder(state.orderInfo)">退货</view> | |||||
</view> | |||||
<view v-if="state.orderInfo.orderStep == 33" class="btn-status"> | |||||
<view class="btn btn-green" @click="gotoExchangeOrder(state.orderInfo)">换货</view> | |||||
</view> | |||||
<!-- 异地结束--> | |||||
<!-- 订单完成 --> | <!-- 订单完成 --> | ||||
<view v-if="state.isWeiXin==1"> | <view v-if="state.isWeiXin==1"> | ||||
<view | <view | ||||
import useOrderSkip from "@/composables/order/useOrderSkip"; | import useOrderSkip from "@/composables/order/useOrderSkip"; | ||||
import { getETCStatusName, getOBUStatusName, msg, getOrderTypeName, getCarTypeName, getOrderTime, isBlank, timesDiff } from "@/utils/utils"; | import { getETCStatusName, getOBUStatusName, msg, getOrderTypeName, getCarTypeName, getOrderTime, isBlank, timesDiff } from "@/utils/utils"; | ||||
import { OrderStatus } from "@/datas/enum"; | import { OrderStatus } from "@/datas/enum"; | ||||
import {agencyId} from "@/utils/network/difference"; | |||||
import {deviceType} from "@/utils/network/difference"; | |||||
const state = reactive({ | const state = reactive({ | ||||
orderInfo: { | orderInfo: { | ||||
orderInfoExt: {} | orderInfoExt: {} |
// #endif | // #endif | ||||
// 9901渠道 | // 9901渠道 | ||||
export const agencyId = "52010106004" | |||||
export const deviceType = "TYMY9901" |