报备页bug修复

This commit is contained in:
2023-10-13 14:53:01 +08:00
parent 5924684357
commit faa0822f47

View File

@ -3,104 +3,8 @@
<div class="title">报备事项:</div>
<div class="line"></div>
<van-radio-group v-model="radio" @change="change">
<van-radio name="目的地变更" class="item">
目的地变更
<img
slot="icon"
slot-scope="props"
:src="props.checked ? activeIcon : inactiveIcon"
>
</van-radio>
<van-radio name="服务项目更改" class="item">
服务项目更改
<img
slot="icon"
slot-scope="props"
:src="props.checked ? activeIcon : inactiveIcon"
>
</van-radio>
<van-radio name="拖车实际在地库" class="item">
拖车实际在地库
<img
slot="icon"
slot-scope="props"
:src="props.checked ? activeIcon : inactiveIcon"
>
</van-radio>
<van-radio name="目的地没有门头照片" class="item">
目的地没有门头照片
<img
slot="icon"
slot-scope="props"
:src="props.checked ? activeIcon : inactiveIcon"
>
</van-radio>
<van-radio name="联系不到客户" class="item">
联系不到客户
<img
slot="icon"
slot-scope="props"
:src="props.checked ? activeIcon : inactiveIcon"
>
</van-radio>
<van-radio name="车牌、车架号不符" class="item">
车牌车架号不符
<img
slot="icon"
slot-scope="props"
:src="props.checked ? activeIcon : inactiveIcon"
>
</van-radio>
<van-radio name="第三方路段无法救援" class="item">
第三方路段无法救援
<img
slot="icon"
slot-scope="props"
:src="props.checked ? activeIcon : inactiveIcon"
>
</van-radio>
<van-radio name="客户酒后代驾叫拖车" class="item">
客户酒后代驾叫拖车
<img
slot="icon"
slot-scope="props"
:src="props.checked ? activeIcon : inactiveIcon"
>
</van-radio>
<van-radio name="车上有货物无法卸货" class="item">
车上有货物无法卸货
<img
slot="icon"
slot-scope="props"
:src="props.checked ? activeIcon : inactiveIcon"
>
</van-radio>
<van-radio name="客户无钥匙打不开车门" class="item">
客户无钥匙打不开车门
<img
slot="icon"
slot-scope="props"
:src="props.checked ? activeIcon : inactiveIcon"
>
</van-radio>
<van-radio name="事故车走故障救援" class="item">
事故车走故障救援
<img
slot="icon"
slot-scope="props"
:src="props.checked ? activeIcon : inactiveIcon"
>
</van-radio>
<van-radio name="电瓶检测仪显示优良客户要搭电" class="item">
电瓶检测仪显示优良客户要搭电
<img
slot="icon"
slot-scope="props"
:src="props.checked ? activeIcon : inactiveIcon"
>
</van-radio>
<van-radio name="客户车辆位于非正常路面" class="item">
客户车辆位于非正常路面
<van-radio v-for="(item,index) in reportingRadioList" :key="index" :name="item" class="item">
{{ item }}
<img
slot="icon"
slot-scope="props"
@ -108,7 +12,8 @@
>
</van-radio>
</van-radio-group>
<textarea class="multiple" id="text-input" rows="4" cols="50" placeholder="报备描述" v-model="decscripTxt"></textarea><br>
<textarea class="multiple" id="text-input" rows="4" cols="50" placeholder="报备描述"
v-model="decscripTxt"></textarea><br>
<common-btn @submitClick="submit"/>
</div>
</template>
@ -117,6 +22,7 @@
import {orderReporting} from "@/api/order"
import {myMixins} from "@/utils/myMixins"
import CommonBtn from "@/components/commonBtn.vue"
export default {
name: "reportingView",
mixins: [myMixins],
@ -129,6 +35,9 @@ export default {
queryType: '',
userOrderId: '',
orderCode: '',
reportingList: [],
reportingRadioList: ['目的地变更', '服务项目更改', '拖车实际在地库', '目的地没有门头照片', '联系不到客户', '车牌、车架号不符',
'第三方路段无法救援', '客户酒后代驾叫拖车', '车上有货物无法卸货', '客户无钥匙打不开车门', '事故车走故障救援', '电瓶检测仪显示优良客户要搭电', '客户车辆位于非正常路面', '其他报备']
}
},
mounted() {
@ -154,33 +63,37 @@ export default {
this.radio = e
},
async goReporting() {
if(this.isRadio && this.isTxt){
if (!this.isRadio) {
this.$toast('报备事项必选')
return
}
if (this.radio == '其他报备') {
if (!this.decscripTxt) {
this.$toast('报备描述必填')
return
}
}
let result = await orderReporting({
queryType: Number(this.queryType),
userOrderId: this.userOrderId,
orderCode: this.orderCode,
reportingConfirm: 1,
reportingItem: this.radio ? this.radio : "",
reportingDesc: this.decscripTxt ? this.decscripTxt : ""
})
// if(result.code === 200){
this.$toast(result.msg)
setTimeout(() => {
let data = {"action": "goBack", "params": ""}
var u = navigator.userAgent;
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
// var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
if (isiOS) {
window.webkit.messageHandlers.nativeObject.postMessage(data);
} else {
window.android.sendMessage("goBack");
}
}, 2000)
// }
}else{
this.$toast("报备事项和报备描述必选")
}
}
},
},
components: {
CommonBtn
@ -191,11 +104,13 @@ export default {
<style scoped lang="scss">
@import "@/styles/mixin.scss";
@import "@/styles/common.scss";
.wrap {
box-sizing: border-box;
padding: 13px 24px 0;
width: 100%;
height: 100%;
//overflow-y: auto;
}
.title {
@ -203,11 +118,13 @@ export default {
color: #323643;
}
.item {
font-size: 14px;
margin-bottom: 8px;
@include flexCenter;
}
.line {
@include wh(100%, 2px);
opacity: 0.16;
@ -216,10 +133,12 @@ export default {
margin-top: 10px;
border-image: linear-gradient(270deg, rgba(217, 217, 217, 0.6), rgba(178, 178, 178, 1), rgba(178, 178, 178, 1), rgba(217, 217, 217, 0.6)) 1 1;
}
img {
@include widHeiMar(16px, 16px, 10px);
}
.multiple {
width: 100%;
height: 125px;
@ -229,8 +148,17 @@ img{
backdrop-filter: blur(10px);
padding: 10px;
box-sizing: border-box;
margin-top: 20px;
//margin-top: 20px;
margin-bottom: 10px;
}
.btn {
box-sizing: border-box;
padding: 13px 24px 0;
}
.scrollWrap {
}
</style>