</view> | </view> | ||||
</pick-regions> --> | </pick-regions> --> | ||||
<picker mode="region" @change="handleGetRegion($event, item)"> | |||||
<view class="uni-input">{{item.region}}</view> | |||||
<picker mode="region" @change="handleGetRegion($event, item)" :value="item.region"> | |||||
<view class="uni-input"> | |||||
{{item.region?item.region[0]+item.region[1]+item.region[2]:""}} | |||||
</view> | |||||
</picker> | </picker> | ||||
<!-- <picker @change="bindPickerChange" :value="index" :range="[]"> | |||||
<view class="uni-input">index</view> | |||||
</picker> --> | |||||
<image class="arror" :src="`${$imgUrl}common/arror-right.png`" mode="aspectFill"> | <image class="arror" :src="`${$imgUrl}common/arror-right.png`" mode="aspectFill"> | ||||
</image> | </image> | ||||
</view> | </view> | ||||
import { pathToBase64 } from "@/utils/util/imageTool.js"; | import { pathToBase64 } from "@/utils/util/imageTool.js"; | ||||
import pickRegions from "@/login/pick-regions/pick-regions.vue"; | import pickRegions from "@/login/pick-regions/pick-regions.vue"; | ||||
import { onMounted, ref } from "vue"; | import { onMounted, ref } from "vue"; | ||||
import { reactive } from "vue"; | |||||
const defaultRegionCode = "520115"; | const defaultRegionCode = "520115"; | ||||
const props = defineProps({ | const props = defineProps({ | ||||
formData: { | formData: { | ||||
}, | }, | ||||
}, | }, | ||||
}); | }); | ||||
const state = reactive({ | |||||
multiIndex: [0, 0, 0] | |||||
}) | |||||
//defineEmits | //defineEmits | ||||
const emit = defineEmits<{ | const emit = defineEmits<{ | ||||
(e : "submit", content : any) : void; | (e : "submit", content : any) : void; | ||||
function handleGetRegion(e : any, item : TypeData) { | function handleGetRegion(e : any, item : TypeData) { | ||||
console.log("获取选择的地区", e) | console.log("获取选择的地区", e) | ||||
// item[item.value] = e[0].name + "/" + e[1].name + "/" + e[2].name; | // item[item.value] = e[0].name + "/" + e[1].name + "/" + e[2].name; | ||||
item[item.value] = e.detail.value[0] + e.detail.value[1] + e.detail.value[2]; | |||||
item[item.value] = e.detail.value; | |||||
emit("handleGetRegion", e, item); | emit("handleGetRegion", e, item); | ||||
console.log("获取选择的地区", item) | console.log("获取选择的地区", item) | ||||
} | } |
}; | }; | ||||
request(orderDetail, options).then((res) => { | request(orderDetail, options).then((res) => { | ||||
//回显订单信息 | //回显订单信息 | ||||
console.log(stringToJson(res.bizContent)) | |||||
console.log("回显订单信息", stringToJson(res.bizContent)) | |||||
state.orderInfo = stringToJson(res.bizContent); | state.orderInfo = stringToJson(res.bizContent); | ||||
state.formData[0].hint = state.orderInfo.orderId; | state.formData[0].hint = state.orderInfo.orderId; | ||||
state.formData[1].hint = state.orderInfo.vehiclePlate; | state.formData[1].hint = state.orderInfo.vehiclePlate; | ||||
state.formData[10][state.formData[10].value] = | state.formData[10][state.formData[10].value] = | ||||
state.orderInfo.orderInfoExt.consigneeTel; | state.orderInfo.orderInfoExt.consigneeTel; | ||||
state.formData[11][state.formData[11].value] = | state.formData[11][state.formData[11].value] = | ||||
state.orderInfo.orderInfoExt.region; | |||||
state.orderInfo.orderInfoExt.regionList.slice(0, 3); | |||||
state.formData[12][state.formData[12].value] = | state.formData[12][state.formData[12].value] = | ||||
state.orderInfo.orderInfoExt.address; | state.orderInfo.orderInfoExt.address; | ||||
state.formData[13][state.formData[13].value] = | state.formData[13][state.formData[13].value] = | ||||
? e.exchangeRgNetworkName | ? e.exchangeRgNetworkName | ||||
: e.exchangeNetworkName; | : e.exchangeNetworkName; | ||||
const curOutlet = state.outlets.find((out) => out.name === curOutletName); | const curOutlet = state.outlets.find((out) => out.name === curOutletName); | ||||
const curRegin = e.region == null ? null : e.region.split("/"); | |||||
// const curRegin = e.region == null ? null : e.region.split("/"); | |||||
const curRegin = e.region == null ? null : e.region; | |||||
const options = { | const options = { | ||||
type: 2, | type: 2, | ||||
data: { | data: { | ||||
showLoading: true, | showLoading: true, | ||||
}; | }; | ||||
console.log("提交数据", options) | console.log("提交数据", options) | ||||
// return; | |||||
request(orderExchange, options).then((res) => { | request(orderExchange, options).then((res) => { | ||||
confirm( | confirm( | ||||
"您申办的ETC订单已申请换货", | "您申办的ETC订单已申请换货", |