@@ -1,10 +1,10 @@ | |||
/** | |||
* 订单列表业务逻辑 | |||
*/ | |||
import { reactive, ref, watch, nextTick, onMounted } from "vue"; | |||
import { reactive, ref, watch, nextTick} from "vue"; | |||
import {requestNew } from "@/utils/network/request.js"; | |||
import {onReachBottom, onPullDownRefresh, onShow } from "@dcloudio/uni-app"; | |||
import { getItem, StorageKeys, setItem } from "@/utils/storage"; | |||
import { getItem, StorageKeys} from "@/utils/storage"; | |||
import { hasLogin, msg, timesDiff } from "@/utils/utils"; | |||
import { queryPage} from "@/utils/network/api"; | |||
import { PageData } from "@/datas/enum"; |
@@ -16,10 +16,10 @@ export default function useOrderSkip() { | |||
} else { | |||
// #ifdef MP-WEIXIN | |||
// navTo(`/subpackage/orders/order_payment?orderId=${orderInfo.orderId}&isValueCard=${orderInfo.isValueCard}&vehicleId=${orderInfo.vehicleId}`); | |||
navTo(`/subpackage/orders/product-detail?orderId=${orderInfo.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}&&isValueCard=${getItem("isValueCard")}&&vehicleId=${orderInfo.vehicleId}`); | |||
navTo(`/subpackage/orders/product-detail?orderId=${orderInfo.orderNo}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}&&isValueCard=${getItem("isValueCard")}&&vehicleId=${orderInfo.vehicleId}`); | |||
// #endif | |||
// #ifdef MP-ALIPAY | |||
navTo(`/subpackage/orders/order_payment?orderId=${orderInfo.orderId}&isValueCard=${orderInfo.isValueCard}&vehicleId=${orderInfo.vehicleId}`); | |||
navTo(`/subpackage/orders/order_payment?orderId=${orderInfo.orderNo}&isValueCard=${orderInfo.isValueCard}&vehicleId=${orderInfo.vehicleId}`); | |||
// #endif | |||
} | |||
} |
@@ -27,7 +27,7 @@ | |||
reactive, | |||
} from "vue"; | |||
import { | |||
onLoad | |||
onShow | |||
} from "@dcloudio/uni-app"; | |||
import { | |||
fileURL, fileURLList | |||
@@ -60,7 +60,7 @@ | |||
searchVal: '', //input输入值 | |||
newArr: [] | |||
}); | |||
onLoad(() => { | |||
onShow(() => { | |||
console.log("1") | |||
if (!hasLogin()) { | |||
console.log("2") |
@@ -153,26 +153,15 @@ | |||
ref | |||
} from "vue"; | |||
import { | |||
onLoad, | |||
onShow | |||
onLoad | |||
} from "@dcloudio/uni-app"; | |||
import { | |||
etcOcrCard, | |||
etcUserCardInfoSubmit, | |||
fileUpload, | |||
etcCarOcrCard, | |||
envs, | |||
} from "@/utils/network/api.js"; | |||
import { | |||
request | |||
} from "@/utils/network/request.js"; | |||
import { | |||
getItem | |||
} from "@/utils/storage.ts" | |||
import { | |||
stringToJson | |||
} from "@/utils/network/encryption"; | |||
import navBar from "@/components/nav-bar/nav-bar2.vue"; | |||
import viewfinder from "@/components/viewfinder.vue" | |||
import { | |||
navTo, strReplace, uploadFile |
@@ -14,18 +14,12 @@ | |||
</template> | |||
<script setup lang="ts"> | |||
import navBar from "./components/nav-bar.vue" | |||
import { | |||
ref, | |||
reactive | |||
} from "vue"; | |||
import { | |||
navTo | |||
} from "@/utils/utils" | |||
import { | |||
onLoad, | |||
onShow | |||
} from "@dcloudio/uni-app"; | |||
const carid = ref('') |
@@ -1,98 +0,0 @@ | |||
<template> | |||
<view class="selectCar-box"> | |||
<view class="item" v-for="(item,i) in list" :key="i"> | |||
<view class="iten-left"> | |||
<image :src="`${$imgUrl}che.png`" mode="aspectFill"></image> | |||
<text>{{item.name}}</text> | |||
</view> | |||
<view class="choose-item" @click="choose(i,item)"> | |||
<view class="active" v-if="flag==i"> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script lang="ts" setup> | |||
import {reactive,ref} from"vue" | |||
import {navTo} from "@/utils/utils" | |||
const list=reactive([ | |||
{name:"A12345"}, | |||
{name:"B12345"}, | |||
{name:"C12345"}, | |||
]) | |||
const flag=ref('0') | |||
const choose=(i,item)=>{ | |||
flag.value=i | |||
console.log("选择得数据",item); | |||
navTo('/subpackage/after-sale/card-deactivation-activation/deactivation-activation-confirm') | |||
} | |||
</script> | |||
<style> | |||
page { | |||
width: 100%; | |||
height: 100%; | |||
background-color: #EEF7F7; | |||
} | |||
</style> | |||
<style lang="scss" scoped> | |||
.selectCar-box { | |||
// width: 100%; | |||
height: 100%; | |||
padding: 30rpx; | |||
.item { | |||
padding: 20rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
align-items: center; | |||
height: 240rpx; | |||
background: #FFFFFF; | |||
box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8); | |||
border-radius: 20rpx; | |||
margin-bottom: 30rpx; | |||
.iten-left { | |||
display: flex; | |||
align-items: center; | |||
image { | |||
width: 150rpx; | |||
height: 90rpx; | |||
} | |||
text { | |||
margin-left: 20rpx; | |||
font-size: 32rpx; | |||
font-family: Noto Sans S Chinese; | |||
font-weight: 400; | |||
color: #333333; | |||
} | |||
} | |||
.choose-item{ | |||
width: 44rpx; | |||
height: 44rpx; | |||
background: #FFFFFF; | |||
border: 2rpx solid #00B38B; | |||
border-radius: 50%; | |||
margin-right: 20rpx; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
box-sizing: content-box; | |||
} | |||
.active{ | |||
width: 34rpx; | |||
height: 34rpx; | |||
background: #00B38B; | |||
border-radius: 50%; | |||
} | |||
} | |||
} | |||
</style> |
@@ -25,8 +25,7 @@ | |||
navTo | |||
} from "@/utils/utils" | |||
import { | |||
onLoad, | |||
onShow | |||
onLoad | |||
} from "@dcloudio/uni-app"; | |||
import { | |||
stringToJson |
@@ -128,7 +128,6 @@ | |||
display: flex; | |||
justify-content: space-between; | |||
align-items: center; | |||
// height: 130rpx; | |||
background: #ffffff; | |||
box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8); | |||
border-radius: 20rpx; |
@@ -0,0 +1,517 @@ | |||
<!-- 申请换货 --> | |||
<template> | |||
<view class="box"> | |||
<form-builder :config="config" :formData="state.formData" @submit="submit" @addressInfo="addressInfo" | |||
@radioChange="radioChange" @handleGetRegion="handleGetRegion" /> | |||
</view> | |||
</template> | |||
<script setup lang="ts"> | |||
import { reactive } from "vue"; | |||
import { onLoad } from "@dcloudio/uni-app"; | |||
import { confirm, getOrderStatusName } from "@/utils/utils"; | |||
import {requestNew } from "@/utils/network/request"; | |||
import { | |||
commQueryCourier, | |||
orderDetailQuery, | |||
orderExchange, | |||
outletList, | |||
} from "@/utils/network/api"; | |||
import { getItem, StorageKeys } from "@/utils/storage"; | |||
const config = { | |||
submitName: "申请换货", | |||
titleWidth: 160, | |||
}; | |||
const state = reactive({ | |||
address:"", | |||
//订单信息 | |||
orderInfo: {} as any, | |||
//网点信息 | |||
outlets: [], | |||
//换货类型: MAIL-线上-邮寄 SELF-线上-自提 OFFLINE-线下 | |||
exchangeMode: "SELF", | |||
formData: [ | |||
{ | |||
title: "订单编号:", | |||
inputType: "number", | |||
type: 2, | |||
value: "id", | |||
hint: "订单编号", | |||
disabled: true, | |||
divider: true, | |||
}, | |||
{ | |||
title: "订单车牌号:", | |||
type: 2, | |||
value: "vehiclePlate", | |||
hint: "订单车牌号", | |||
disabled: true, | |||
divider: true, | |||
}, | |||
{ | |||
title: "订单状态:", | |||
type: 2, | |||
value: "orderStep", | |||
hint: "订单状态", | |||
disabled: true, | |||
divider: true, | |||
}, | |||
{ | |||
title: "换货方式:", | |||
type: 7, | |||
value: "exchangeMode", | |||
exchangeMode: "ON_LINE", | |||
star: true, | |||
required: true, | |||
divider: true, | |||
emptyHint: "请选择换货方式", | |||
itemData: [ | |||
{ | |||
checked: true, | |||
value: "ON_LINE", | |||
name: "线上", | |||
}, | |||
// 取消线下网点退货,隐藏对应模式,不要删除,后期可能还会重提业务修改 | |||
// { | |||
// checked: false, | |||
// value: "OFFLINE", | |||
// name: "线下", | |||
// }, | |||
], | |||
}, | |||
/* 区别-线上方式 */ | |||
{ | |||
title: "物流公司:", | |||
type: 4, | |||
value: "exchangeLogisticsCompany", | |||
required: true, | |||
star: true, | |||
hint: "请输入", | |||
divider: true, | |||
itemData: [], | |||
hide: false, | |||
emptyHint: "请选择物流公司", | |||
mode: "search", | |||
searchPickerVisible: false, | |||
}, | |||
{ | |||
title: "物流单号:", | |||
type: 2, | |||
value: "exchangeLogisticsNumber", | |||
required: true, | |||
maxlength: 20, | |||
hint: "请输入", | |||
emptyHint: "请输入物流单号", | |||
star: true, | |||
divider: true, | |||
hide: false, | |||
}, | |||
{ | |||
title: "收货方式:", | |||
type: 7, | |||
value: "exchangeRgMode", | |||
required: true, | |||
star: true, | |||
divider: true, | |||
itemData: [ | |||
// { | |||
// checked: false, | |||
// value: "SELF", | |||
// name: "营业点自提", | |||
// }, | |||
{ | |||
checked: false, | |||
value: "MAIL", | |||
name: "邮寄", | |||
}, | |||
], | |||
hide: false, | |||
emptyHint: "请选择收货方式", | |||
}, | |||
/* 线上-营业点自提 */ | |||
{ | |||
title: "自提网点:", | |||
type: 4, | |||
value: "exchangeRgNetworkName", | |||
required: true, | |||
star: true, | |||
hint: "请输入", | |||
divider: true, | |||
hide: true, | |||
itemData: [], | |||
emptyHint: "请选择自提网点", | |||
mode: "search", | |||
searchPickerVisible: false, | |||
}, | |||
/* 线上-邮寄 */ | |||
{ | |||
title: "收件人地址:", | |||
type: 2, | |||
value: "address", | |||
maxlength: 50, | |||
hint: " ", | |||
disabled: true, | |||
divider: true, | |||
btn: true, | |||
btnTitle: "获取微信地址", | |||
btnType: "address", | |||
hide: true, | |||
}, | |||
{ | |||
title: "姓名:", | |||
type: 2, | |||
value: "consignee", | |||
maxlength: 20, | |||
required: true, | |||
hint: "请输入", | |||
emptyHint: "请输入收件人姓名", | |||
star: true, | |||
divider: true, | |||
hide: true, | |||
}, | |||
{ | |||
title: "电话:", | |||
type: 2, | |||
value: "consigneeTel", | |||
required: true, | |||
inputType: "number", | |||
maxlength: 11, | |||
hint: "请输入", | |||
emptyHint: "请输入收件人电话", | |||
star: true, | |||
divider: true, | |||
hide: true, | |||
}, | |||
{ | |||
title: "地区:", | |||
type: 10, | |||
value: "region", | |||
required: true, | |||
hint: "选择省/市/区", | |||
emptyHint: "请选择收件人所在地区", | |||
star: true, | |||
divider: true, | |||
hide: true, | |||
}, | |||
{ | |||
title: "详细地址:", | |||
type: 2, | |||
value: "address", | |||
maxlength: 100, | |||
required: true, | |||
hint: "街道门牌、楼层房间号等信息", | |||
emptyHint: "请输入收件人详细地址", | |||
star: true, | |||
divider: true, | |||
hide: true, | |||
// disabled: true, | |||
}, | |||
{ | |||
title: "邮政编码:", | |||
type: 2, | |||
value: "postalCode", | |||
inputType: "number", | |||
maxlength: 20, | |||
hint: "请输入邮政编码", | |||
emptyHint: "请输入邮政编码", | |||
divider: true, | |||
hide: true, | |||
}, | |||
/* 区别-线下方式 */ | |||
{ | |||
title: "换货网点:", | |||
type: 4, | |||
value: "exchangeNetworkName", | |||
required: true, | |||
star: true, | |||
hint: "请输入", | |||
divider: true, | |||
itemData: ["1"], | |||
hide: true, | |||
emptyHint: "请选择换货网点", | |||
mode: "search", | |||
searchPickerVisible: false, | |||
}, | |||
{ | |||
title: "换货原因:", | |||
required: true, | |||
type: 5, | |||
vertical: 2, | |||
value: "exchangeReason", | |||
maxlength: 50, | |||
bg: true, | |||
star: true, | |||
hint: "请输入换货原因,限制50字以内", | |||
emptyHint: "请输入换货原因", | |||
}, | |||
], | |||
}); | |||
/* 获取订单详情 */ | |||
const getOrderDetails = (id) => { | |||
const options = { | |||
type: 2, | |||
data: { id: id }, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
requestNew(orderDetailQuery, options).then((res) => { | |||
//回显订单信息 | |||
console.log("回显订单信息",res) | |||
state.orderInfo = res.data; | |||
state.formData[0].hint = state.orderInfo.orderNo; | |||
state.formData[1].hint = state.orderInfo.vehiclePlate; | |||
state.formData[2].hint = getOrderStatusName(state.orderInfo.orderStep); | |||
//回显收件人地址 | |||
state.formData[9][state.formData[9].value] = | |||
state.orderInfo.orderInfoExt.consignee; | |||
state.formData[10][state.formData[10].value] = | |||
state.orderInfo.orderInfoExt.consigneeTel; | |||
state.formData[11][state.formData[11].value] = | |||
state.orderInfo.orderInfoExt.regionList.slice(0, 3); | |||
state.formData[12][state.formData[12].value] = | |||
state.orderInfo.orderInfoExt.address; | |||
state.formData[13][state.formData[13].value] = | |||
state.orderInfo.orderInfoExt.postalCode; | |||
}); | |||
}; | |||
/* 获取所有的快递公司 */ | |||
const getLogisticsList = () => { | |||
const options = { | |||
type: 2, | |||
data: {}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
requestNew(commQueryCourier, options).then((res) => { | |||
const data =res; | |||
state.formData[4].itemData = data; | |||
}); | |||
}; | |||
/* 获取换货网点 */ | |||
const getOutletList = () => { | |||
const options = { | |||
type: 2, | |||
data: {}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
requestNew(outletList, options).then((res) => { | |||
state.outlets = res; | |||
let nameList = []; | |||
state.outlets.map((item) => { | |||
nameList.push(item.name); | |||
}); | |||
state.formData[7].itemData = nameList; | |||
state.formData[14].itemData = nameList; | |||
console.log("获取换货网点", state.outlets, nameList) | |||
}); | |||
}; | |||
//radio改变 | |||
const radioChange = (e : any, item : any) => { | |||
console.log("e", e, item) | |||
if (item.value === "exchangeMode") { | |||
//退货方式 | |||
state.exchangeMode = | |||
item.exchangeMode === "ON_LINE" ? state.formData[6][state.formData[6].value] ? state.formData[6][state.formData[6].value] : "SELF" | |||
: item.exchangeMode; | |||
} else if (item.value === "exchangeRgMode") { | |||
//收货方式 | |||
state.exchangeMode = item.exchangeRgMode; | |||
console.log("item", item, state.exchangeMode) | |||
} | |||
state.formData[4].hide = state.exchangeMode === "OFFLINE" ? true : false; | |||
state.formData[5].hide = state.exchangeMode === "OFFLINE" ? true : false; | |||
// state.formData[6].hide = state.exchangeMode === "OFFLINE" ? true : false; | |||
for (let i = 7; i < 15; i++) { | |||
state.formData[i].hide = true; | |||
} | |||
if (state.exchangeMode === "MAIL") { | |||
//MAIL-线上-邮寄 | |||
for (let i = 9; i < 14; i++) { | |||
state.formData[i].hide = false; | |||
} | |||
// #ifdef MP-ALIPAY | |||
state.formData[8].btnTitle = "获取支付宝地址" | |||
// #endif | |||
// #ifdef MP-WEIXIN | |||
state.formData[8].btnTitle = "获取微信地址" | |||
// #endif | |||
} else if (state.exchangeMode === "SELF") { | |||
//SELF-线上-营业点自提 | |||
// state.formData[7].hide = false; | |||
state.formData[4].hide = true; | |||
state.formData[5].hide = true; | |||
state.formData[14].hide = false; | |||
console.log("1111111111111111111111111111") | |||
} else if (state.exchangeMode === "OFFLINE") { | |||
//OFFLINE-线下 | |||
state.formData[14].hide = false; | |||
state.formData[6].itemData = [ | |||
{ | |||
checked: false, | |||
value: "SELF", | |||
name: "营业点自提", | |||
}, | |||
] | |||
} | |||
if (item.exchangeMode == "ON_LINE") { | |||
state.formData[14].hide = true; | |||
state.formData[6].itemData = [ | |||
{ | |||
checked: false, | |||
value: "MAIL", | |||
name: "邮寄", | |||
}, | |||
] | |||
for (let i = 9; i < 14; i++) { | |||
state.formData[i].hide = false; | |||
} | |||
} | |||
console.log("全部数据", state.formData) | |||
}; | |||
//地址改变 | |||
const addressInfo = (content : any) => { | |||
console.log("content", `${content.provinceName}${content.cityName}${content.countyName}`) | |||
// #ifdef MP-ALIPAY | |||
state.formData[9][state.formData[9].value] = content.fullname; | |||
state.formData[10][state.formData[10].value] = content.mobilePhone; | |||
let arr = []; | |||
arr.push(content.prov) | |||
arr.push(content.city) | |||
arr.push(content.area) | |||
state.formData[11][ | |||
state.formData[11].value | |||
] = arr; | |||
const addressArr = content.address.split("-") | |||
state.formData[12][state.formData[12].value] = addressArr[3]; | |||
// #endif | |||
// #ifdef MP-WEIXIN | |||
state.formData[9][state.formData[9].value] = content.userName; | |||
state.formData[10][state.formData[10].value] = content.telNumber; | |||
let arr = []; | |||
arr.push(content.provinceName) | |||
arr.push(content.cityName) | |||
arr.push(content.countyName) | |||
state.formData[11][ | |||
state.formData[11].value | |||
] = arr; | |||
state.formData[12][state.formData[12].value] = content.detailInfo; | |||
state.formData[13][state.formData[13].value] = content.postalCode; | |||
// #endif | |||
}; | |||
//提交换货申请 | |||
const submit = (e : any) => { | |||
if (e.exchangeMode == "OFFLINE") { | |||
for (var k = 0; k < state.outlets.length; k++) { | |||
if (e.exchangeNetworkName == state.outlets[k]['name']) { | |||
e['exchangeNetworkId'] = state.outlets[k]['servicehallId'] | |||
e['exchangeRgNetworkId'] = state.outlets[k]['servicehallId'] | |||
console.log("e.exchangeRgNetworkName", e.exchangeNetworkName, e['exchangeNetworkId']) | |||
break; | |||
} | |||
} | |||
} else { | |||
for (var k = 0; k < state.outlets.length; k++) { | |||
if (e.exchangeRgNetworkName == state.outlets[k]['name']) { | |||
e['exchangeNetworkId'] = state.outlets[k]['servicehallId'] | |||
e['exchangeRgNetworkId'] = state.outlets[k]['servicehallId'] | |||
console.log("e.exchangeRgNetworkName", e.exchangeRgNetworkName, e['exchangeNetworkId']) | |||
break; | |||
} | |||
} | |||
} | |||
console.log("是否确认换货", e) | |||
confirm( | |||
"是否确认换货?", | |||
() => { | |||
const curOutletName = | |||
e.exchangeMode === "ON_LINE" | |||
? e.exchangeRgNetworkName | |||
: e.exchangeNetworkName; | |||
const curOutlet = state.outlets.find((out) => out.name === curOutletName); | |||
const curRegin = e.region == null ? null : e.region; | |||
const options = { | |||
type: 2, | |||
data: { | |||
id: state.orderInfo.id, | |||
exchangeMode: e.exchangeMode, | |||
exchangeNetworkId: e.exchangeNetworkId, | |||
exchangeNetworkName: e.exchangeRgNetworkName ? e.exchangeRgNetworkName : e.exchangeNetworkName, //换货网点 | |||
exchangeRgMode: e.exchangeMode == "ON_LINE" ? 'MAIL' : "SELF", | |||
exchangeRgNetworkId: e.exchangeRgNetworkId, | |||
exchangeRgNetworkName: e.exchangeRgNetworkName ? e.exchangeRgNetworkName : e.exchangeNetworkName, //自提网点 | |||
exchangeLogisticsCompany: e.exchangeLogisticsCompany, | |||
exchangeLogisticsNumber: e.exchangeLogisticsNumber, | |||
exchangeReason: e.exchangeReason, | |||
consignee: e.consignee, | |||
consigneeTel: e.consigneeTel, | |||
region: curRegin ? `${curRegin[0]}${curRegin[1]}${curRegin[2]}` : "", | |||
address: e.address, | |||
postalCode: e.postalCode, | |||
opId: getItem(StorageKeys.OpenId), | |||
goodsAddress:state.address | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
console.log("提交数据", options); | |||
requestNew(orderExchange, options).then((res) => { | |||
confirm( | |||
"您申办的ETC订单已申请换货,待审核,请到【查询服务】的【业务审核查询】查看进度", | |||
() => { | |||
uni.$emit("refreshOrder"); | |||
uni.navigateBack({ | |||
delta: 2 | |||
}) | |||
}, | |||
"申请成功", | |||
false | |||
); | |||
}); | |||
}, | |||
"换货确认", | |||
true | |||
); | |||
}; | |||
onLoad((option) => { | |||
console.log(option);//id是申请的接口获取的id | |||
getOrderDetails(option.orderId); | |||
getLogisticsList(); | |||
getOutletList(); | |||
state.address=option.address | |||
}); | |||
</script> | |||
<style> | |||
page { | |||
background-color: #f3f3f3; | |||
padding-bottom: 30rpx; | |||
} | |||
</style> | |||
<style lang="scss" scoped> | |||
.box { | |||
margin: 20rpx 0rpx; | |||
background-color: white; | |||
padding: 0 20rpx 20rpx; | |||
} | |||
</style> |
@@ -43,9 +43,6 @@ | |||
import { | |||
onLoad | |||
} from "@dcloudio/uni-app"; | |||
import { | |||
getMailingAddress | |||
} from "@/subpackage/orders/js/publicRequest"; | |||
// 表单数据 | |||
const form = reactive({ | |||
orderId: '', | |||
@@ -109,7 +106,7 @@ | |||
const submit = () => { | |||
if (form.applyType) { | |||
console.log('验证通过', form); | |||
navTo(`/subpackage/orders/apply-ex-goods?orderId=${oldId.value}&address=${state.address}`) //测试用 | |||
navTo(`/subpackage/orders/apply-ex-goods?orderId=${form.orderId}&applyType=${form.applyType}`) //测试用 | |||
} else { | |||
uni.showToast({ | |||
title: "请选择申请类型", | |||
@@ -122,10 +119,6 @@ | |||
form.orderId = option.orderId | |||
oldId.value = option.id | |||
console.log(form,option.id); | |||
getMailingAddress(option.orderId,option.id).then((address) => { | |||
console.log("address",address) | |||
state.address=address | |||
}) | |||
}); | |||
</script> | |||
@@ -9,8 +9,8 @@ | |||
<script setup lang="ts"> | |||
import { reactive } from "vue"; | |||
import { onLoad } from "@dcloudio/uni-app"; | |||
import { msg, confirm, getOrderStatusName } from "@/utils/utils"; | |||
import { request,requestNew } from "@/utils/network/request"; | |||
import { confirm, getOrderStatusName } from "@/utils/utils"; | |||
import {requestNew } from "@/utils/network/request"; | |||
import { commQueryCourier, orderReturn, outletList } from "@/utils/network/api"; | |||
import { getItem, StorageKeys } from "@/utils/storage"; | |||
import { | |||
@@ -208,13 +208,13 @@ | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(orderReturn, options).then((res) => { | |||
requestNew(orderReturn, options).then((res) => { | |||
confirm( | |||
"您申办的ETC订单已申请退货,待审核,请到【查询服务】的【业务审核查询】查看进度", | |||
() => { | |||
uni.$emit("refreshOrder"); | |||
uni.switchTab({ | |||
url: "/pages/order/order" | |||
uni.navigateBack({ | |||
delta: 1 | |||
}) | |||
}, | |||
"申请成功", | |||
@@ -238,10 +238,10 @@ | |||
//获取退货网点 | |||
getOutletList(); | |||
getMailingAddress(state.orderInfo.orderId,state.orderInfo.id).then((address) => { | |||
console.log("address",address) | |||
config.address=address | |||
}) | |||
// getMailingAddress(state.orderInfo.orderId,state.orderInfo.id).then((address) => { | |||
// console.log("address",address) | |||
// config.address=address | |||
// }) | |||
}); | |||
</script> | |||
@@ -105,6 +105,10 @@ | |||
} | |||
const savaHandle = (val, idx) => { | |||
console.log("vAL", val) | |||
// 1不能点击 0可以点击 权益置灰 弹出提示 | |||
if(val.equityList[0]['isClick']==1){ | |||
} | |||
setItem("clientFee", val.clientFee); | |||
// setItem("promoteId", val.promoteId); | |||
@@ -22,7 +22,7 @@ | |||
</view> | |||
</view> | |||
</view> | |||
<view class="action-btn"> 签约 </view> | |||
<view class="action-btn"> 去签约 </view> | |||
</view> | |||
</view> | |||
</view> | |||
@@ -114,7 +114,7 @@ | |||
{ | |||
bg: imgURL + "applyCard/product-bg.png", | |||
icon: imgURL + "applyCard/wechat.png", | |||
title: "微信支付", | |||
title: "微信签约", | |||
// tip: "服务费是每笔交易金额的0.05%", | |||
tag1: "微信代付", | |||
tag2: "微信便捷支付", |
@@ -126,11 +126,8 @@ | |||
getItem | |||
} from "@/utils/storage.ts" | |||
import { | |||
etcCarCardInfoSubmit, | |||
etcCarOcrCard, | |||
fileUpload, | |||
createCarInfo, | |||
envs | |||
createCarInfo | |||
} from "@/utils/network/api.js"; | |||
import { | |||
request |
@@ -140,6 +140,7 @@ | |||
let singleEquityId = ref('') | |||
let couponAgencyType = ref('') | |||
let equityId = ref('') | |||
let purchasedEquityId = ref('') | |||
let couponId = ref('') | |||
let exchangeCodes: any = ref([]) | |||
let alonePurchaseData: any = ref([]) | |||
@@ -151,7 +152,7 @@ | |||
singleEquityId.value = options.singleEquityId | |||
couponAgencyType.value = options.couponAgencyType | |||
equityId.value = options.equityId | |||
purchasedEquityId.value = options.purchasedEquityId | |||
loadExchangeCodes(); | |||
}) | |||
@@ -165,7 +166,8 @@ | |||
singleEquityId: singleEquityId.value, | |||
equityId: equityId.value, | |||
couponAgencyType: couponAgencyType.value, | |||
couponId: couponId.value | |||
couponId: couponId.value, | |||
purchasedEquityId:purchasedEquityId.value | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
@@ -270,10 +272,10 @@ | |||
// "&couponAgencyType=" + couponAgencyType.value + "&couponId=" + couponId.value, | |||
// }) | |||
// } | |||
console.log("item",item) | |||
uni.navigateTo({ | |||
url: '/subpackage/service/equityInfo/equityInfo?singleEquityId=' + singleEquityId.value + | |||
"&couponAgencyType=" + couponAgencyType.value + "&couponId=" + couponId.value, | |||
url: '/subpackage/service/equityInfo/equityInfo?singleEquityId=' + item.singleEquityId + | |||
"&couponAgencyType=" + couponAgencyType.value + "&couponId=" + item.couponId, | |||
}) | |||
} | |||
@@ -13,17 +13,18 @@ | |||
import { | |||
onLoad | |||
} from '@dcloudio/uni-app' | |||
import { singleEquityDetailNew } from "@/utils/network/api.js"; | |||
import { singleEquityDetail } from "@/utils/network/api.js"; | |||
let richText = ref('') | |||
let singleEquityId = ref('') | |||
let couponAgencyType = ref('') | |||
let couponId = ref('') | |||
onLoad((options) => { | |||
console.log("参数",options) | |||
singleEquityId.value = options.singleEquityId | |||
couponAgencyType.value = options.couponAgencyType | |||
//卡券渠道类型获取单项权益列表 | |||
requestNew(singleEquityDetailNew, { | |||
requestNew(singleEquityDetail, { | |||
type: 2, | |||
data: { | |||
singleEquityId: singleEquityId.value |
@@ -7,7 +7,7 @@ | |||
<view style="display: flex;justify-content: flex-end;margin-top: 6rpx;"> | |||
<!-- 是否支付 1-已支付,2-未支付支付,3-已取消,4-已下单,未支付 --> | |||
<text class="btn" v-if="item.isPay==2" | |||
@click.stop="chooseBuy(item.equityId)">去支付</text> | |||
@click.stop="equityPaymentOrderRequest(item.id)">去支付</text> | |||
</view> | |||
</view> | |||
</view> | |||
@@ -59,30 +59,31 @@ | |||
function onClick(singId: any) { | |||
uni.navigateTo({ | |||
url: '/subpackage/service/equity/equity?singleEquityId=' + singId.singleEquityId + | |||
'&couponAgencyType=' + singId.couponAgencyType + '&couponId=' + singId.couponId + '&equityId=' + singId.equityId, | |||
}) | |||
} | |||
const chooseBuy = (equityId) => { | |||
const options = { | |||
type: 2, | |||
data: { | |||
"openId": getItem(StorageKeys.OpenId), | |||
"equityId": equityId | |||
}, | |||
method: 'POST', | |||
showLoading: true, | |||
} | |||
// 权益购买入参有个属性是type:1,代表查询是否已经买过了权益,返回的数据中hasData:true表示买过了,如果hasData:false表示没买过。type:2,表示购买 | |||
requestNew(equitypurchase, options).then((res) => { | |||
const data = res; | |||
console.log("购买2", data) | |||
state.id = data.id | |||
// 权益支付下单 | |||
equityPaymentOrderRequest() | |||
'&couponAgencyType=' + singId.couponAgencyType + '&couponId=' + singId.couponId + '&equityId=' + singId.equityId+ '&purchasedEquityId=' + singId.eporderId, | |||
}) | |||
} | |||
// const chooseBuy = (equityId) => { | |||
// const options = { | |||
// type: 2, | |||
// data: { | |||
// "openId": getItem(StorageKeys.OpenId), | |||
// "equityId": equityId | |||
// }, | |||
// method: 'POST', | |||
// showLoading: true, | |||
// } | |||
// // 权益购买入参有个属性是type:1,代表查询是否已经买过了权益,返回的数据中hasData:true表示买过了,如果hasData:false表示没买过。type:2,表示购买 | |||
// requestNew(equitypurchase, options).then((res) => { | |||
// const data = res; | |||
// console.log("购买2", data) | |||
// state.id = data.id | |||
// // 权益支付下单 | |||
// equityPaymentOrderRequest() | |||
// }) | |||
// } | |||
// 权益支付下单 | |||
const equityPaymentOrderRequest = () => { | |||
const equityPaymentOrderRequest = (id) => { | |||
state.id =id | |||
// #ifdef MP-WEIXIN | |||
uni.login({ | |||
provider: "weixin", | |||
@@ -96,18 +97,16 @@ | |||
showLoading: true, | |||
}; | |||
requestNew(getOpenId, options1).then((res) => { | |||
console.log("state.id",state.id) | |||
console.log("state.id",res) | |||
console.log("state.id",id) | |||
const result = res; | |||
const openidData = stringToJson(result.data); | |||
console.log("openidData",openidData) | |||
const options = { | |||
type: 2, | |||
data: { | |||
id: state.id, | |||
id: id, | |||
payType: "EQUITY", | |||
wxOpenid: openidData.openid, | |||
// openId: openidData.openid, | |||
}, | |||
method: 'POST', | |||
showLoading: true, |
@@ -98,8 +98,6 @@ export const cancelOrderNew = "7fba19ba5d354c0ea5c443f9b5c66cdf"; //取消订单 | |||
export const receiveOrder = "155"; //订单完成收货 | |||
// export const getLogistics = "30"; //获取所有的快递公司信息 | |||
export const editOrderAddr = '164'; //订单修改收货地址 | |||
export const orderReturn = '165'; //订单申请退货 | |||
export const orderExchange = '167'; //订单申请换货 | |||
export const orderEvaluate = '169'; //评价订单 | |||
export const orderEvaluateTag = '170'; //获取服务评价标签 | |||
export const salesmanMsg = '9f19be89a03e475b903b88d4bc91cbb4' //订单查询业务员简单信息 | |||
@@ -315,6 +313,8 @@ export const updateShippingAddress= "/iaw/issue/order/updateShippingAddress" // | |||
export const vehicleInfoQuery= "/iaw/app/issue/vehicleInfo/query" //获取车辆信息 | |||
export const etcQyList = "/iaw/sign/signChannelQuery"; // 统一会员平台可签约渠道列表查询接口 | |||
export const getUserMsg = "/iaw/api/userInfoQuery/queryIdNum" //通过opneId查询用户信息 | |||
export const orderExchange = '/iaw/issue/order/replaceGoodsFill'; //订单申请换货 | |||
export const orderReturn = '/iaw/issue/order/refundGoodsApply'; //订单申请退货 | |||
// 业务审核进度查询 | |||
export const generalAuditQuery= "/iaw/api/afterSale/generalAudit/query" //业务审核查询 | |||
export const generalAuditListVehicle= "/iaw/api/afterSale/generalAudit/listVehicle" //业务审核查询车辆列表 | |||
@@ -372,7 +372,7 @@ export const payequitydetection = "/iaw/app/issue/quanyi/payequitydetection" // | |||
export const paymentequityapplyapp = "/iaw/app/issue/quanyi/paymentequityapplyapp" //权益支付下单 | |||
export const equitypurchasepage = "/iaw/app/issue/quanyi/equitypurchasepage" //购买权益列表 | |||
export const queryuserallequity = "/iaw/ass/equity/queryuserallequity" //查询用户所有权益 | |||
export const singleEquityDetailNew = "/iaw/ass/equity/singleEquityDetail" //单项权益详情查询 | |||
// export const singleEquityDetailNew = "/iaw/ass/equity/singleEquityDetail" //单项权益详情查询 | |||
export const couponActivate = "/iaw/app/issue/coupon/activate" //卡卷激活 | |||
export const couponQuery = "/iaw/app/issue/coupon/query" //根据手机号权益编号查询所属订单及卡卷 | |||
//激活服务查询 |
@@ -339,7 +339,8 @@ export function requestNew(code, options = {}, start = false) { | |||
opId: getItem(StorageKeys.OpenId), | |||
orderSource:'WECHAT' | |||
} | |||
options.url = envs[process.env.NODE_ENV].baseUrl+'/prod' + code | |||
// options.url = envs[process.env.NODE_ENV].baseUrl+'/prod' + code | |||
options.url = envs[process.env.NODE_ENV].baseUrl+'/ndev' + code | |||
//默认json数据格式提交` | |||
let contentType = 'application/json' | |||
@@ -401,7 +402,7 @@ export function requestNew(code, options = {}, start = false) { | |||
} | |||
} | |||
}); | |||
}else if(res.data.code == 401001 || res.data.code == 401002){ | |||
}else if(res.data.code == 401002){ | |||
updateGetTokenNew().then((data) => { | |||
console.log("token刷新", data); | |||
requestNew(code, options, true) |