报备页bug修复
This commit is contained in:
@ -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,27 +12,32 @@
|
||||
>
|
||||
</van-radio>
|
||||
</van-radio-group>
|
||||
<textarea class="multiple" id="text-input" rows="4" cols="50" placeholder="报备描述" v-model="decscripTxt"></textarea><br>
|
||||
<common-btn @submitClick="submit" />
|
||||
<textarea class="multiple" id="text-input" rows="4" cols="50" placeholder="报备描述"
|
||||
v-model="decscripTxt"></textarea><br>
|
||||
<common-btn @submitClick="submit"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {orderReporting} from "@/api/order"
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
import CommonBtn from "@/components/commonBtn.vue"
|
||||
|
||||
export default {
|
||||
name: "reportingView",
|
||||
mixins:[myMixins],
|
||||
data(){
|
||||
return{
|
||||
decscripTxt:'',
|
||||
mixins: [myMixins],
|
||||
data() {
|
||||
return {
|
||||
decscripTxt: '',
|
||||
radio: '',
|
||||
activeIcon: require('@/assets/check.png'),
|
||||
inactiveIcon: require('@/assets/uncheck.png'),
|
||||
queryType:'',
|
||||
userOrderId:'',
|
||||
orderCode:'',
|
||||
queryType: '',
|
||||
userOrderId: '',
|
||||
orderCode: '',
|
||||
reportingList: [],
|
||||
reportingRadioList: ['目的地变更', '服务项目更改', '拖车实际在地库', '目的地没有门头照片', '联系不到客户', '车牌、车架号不符',
|
||||
'第三方路段无法救援', '客户酒后代驾叫拖车', '车上有货物无法卸货', '客户无钥匙打不开车门', '事故车走故障救援', '电瓶检测仪显示优良客户要搭电', '客户车辆位于非正常路面', '其他报备']
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -138,51 +47,55 @@ export default {
|
||||
this.orderCode = urlParams.get('orderCode')
|
||||
// this.$toast('queryType' + this.queryType)
|
||||
},
|
||||
computed:{
|
||||
isRadio(){
|
||||
computed: {
|
||||
isRadio() {
|
||||
return this.radio ? true : false
|
||||
},
|
||||
isTxt(){
|
||||
isTxt() {
|
||||
return this.decscripTxt ? true : false
|
||||
},
|
||||
},
|
||||
methods:{
|
||||
submit(){
|
||||
methods: {
|
||||
submit() {
|
||||
this.goReporting();
|
||||
},
|
||||
change(e){
|
||||
this.radio=e
|
||||
change(e) {
|
||||
this.radio = e
|
||||
},
|
||||
async goReporting(){
|
||||
if(this.isRadio && this.isTxt){
|
||||
let result = await orderReporting({
|
||||
queryType:Number(this.queryType),
|
||||
userOrderId:this.userOrderId,
|
||||
orderCode:this.orderCode,
|
||||
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("报备事项和报备描述必选")
|
||||
async goReporting() {
|
||||
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 : ""
|
||||
})
|
||||
this.$toast(result.msg)
|
||||
setTimeout(() => {
|
||||
let data = {"action": "goBack", "params": ""}
|
||||
var u = navigator.userAgent;
|
||||
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
||||
if (isiOS) {
|
||||
window.webkit.messageHandlers.nativeObject.postMessage(data);
|
||||
} else {
|
||||
window.android.sendMessage("goBack");
|
||||
}
|
||||
}, 2000)
|
||||
|
||||
},
|
||||
},
|
||||
components:{
|
||||
components: {
|
||||
CommonBtn
|
||||
}
|
||||
}
|
||||
@ -191,35 +104,41 @@ 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 {
|
||||
@include fontWeightSize(bold,14px);
|
||||
@include fontWeightSize(bold, 14px);
|
||||
color: #323643;
|
||||
|
||||
}
|
||||
.item{
|
||||
|
||||
.item {
|
||||
font-size: 14px;
|
||||
margin-bottom: 8px;
|
||||
@include flexCenter;
|
||||
}
|
||||
|
||||
.line {
|
||||
@include wh(100%,2px);
|
||||
@include wh(100%, 2px);
|
||||
opacity: 0.16;
|
||||
border-top: 1px solid;
|
||||
margin-bottom: 10px;
|
||||
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);
|
||||
|
||||
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>
|
Reference in New Issue
Block a user