代办事项审核bug修复
This commit is contained in:
@ -31,7 +31,7 @@ import {myMixins} from "@/utils/myMixins"
|
||||
<style scoped lang="scss">
|
||||
@import "@/styles/mixin.scss";
|
||||
.button {
|
||||
position: fixed;
|
||||
position: absolute;
|
||||
bottom: 30px;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
|
@ -12,7 +12,7 @@
|
||||
/>
|
||||
</div>
|
||||
<cell-group label="司机姓名" placeholder="请输入司机姓名" v-model="driverName"/>
|
||||
<cell-group label="手机号码" v-model="driverPhone" @blurIn="validatePhoneNumber" placeholder="请输入手机号" />
|
||||
<cell-group label="手机号码" v-model="driverPhone" placeholder="请输入手机号" />
|
||||
<p v-if="phoneNumberError" class="error-message">{{ phoneNumberErrorMessage }}</p>
|
||||
<cell-group label="身份证号" v-model="identityCardNumber" placeholder="请输入身份证号" />
|
||||
<div class="itemContent">
|
||||
@ -92,6 +92,7 @@ export default {
|
||||
this.drivingModel = this.$route.params?.drivingModel;
|
||||
this.identityCardNumber = this.$route.params?.identityCardNumber;
|
||||
this.states = this.$route.params?.states;
|
||||
console.log(this.driverName,this.driverPhone,this.drivingModel,this.identityCardNumber,this.states)
|
||||
const selectElement = document.getElementById('mySelect');
|
||||
selectElement.addEventListener('change', function() {
|
||||
const selectedValue = selectElement.value;
|
||||
@ -104,7 +105,7 @@ export default {
|
||||
this.states=e
|
||||
},
|
||||
async submitBtn(){
|
||||
if(!(this.driverName && this.driverPhone && this.identityCardNumber && this.drivingModel && this.states)){
|
||||
if (this.driverName || this.driverPhone || this.identityCardNumber || this.drivingModel || this.states){
|
||||
this.$toast('必填字段未填写')
|
||||
}else{
|
||||
await saveDriver({
|
||||
@ -130,6 +131,7 @@ export default {
|
||||
cancelBtn(){//取消
|
||||
this.$router.back()
|
||||
},
|
||||
// @blurIn="validatePhoneNumber"
|
||||
// validatePhoneNumber() {
|
||||
// const phoneNumberRegex = /^1[0-9]{10}$/;
|
||||
// if (!phoneNumberRegex.test(this.driverPhone)) {
|
||||
|
@ -111,9 +111,6 @@ export default {
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
// const urlParams = new URLSearchParams(window.location.search);
|
||||
// const token = urlParams.get('token');
|
||||
// this.$toast("车辆编辑打印token" + token)
|
||||
this.id=this.$route.params?.id
|
||||
const selectElement = document.getElementById('mySelect');
|
||||
selectElement.addEventListener('change', function() {
|
||||
@ -140,14 +137,12 @@ export default {
|
||||
let res= await getInfoById({
|
||||
vehicleId:this.id
|
||||
})
|
||||
// if(res.code === 200){
|
||||
let result=res.data;
|
||||
this.id=result.vehicleId
|
||||
this.carNum=result.plateNumber
|
||||
this.isJoin=result.hasPolymerization.code
|
||||
this.selectedOption=result.vehicleType;
|
||||
this.serviceIds=result.serviceIds
|
||||
// }
|
||||
},
|
||||
change(e) {
|
||||
this.trailerService=e
|
||||
@ -163,7 +158,7 @@ export default {
|
||||
this.$router.back()
|
||||
},
|
||||
async submitBtn(){
|
||||
if(!(this.carNum && this.selectedOption && this.isJoin)){
|
||||
if(this.carNum || this.selectedOption || this.isJoin){
|
||||
this.$toast('必填字段未填写')
|
||||
}else{
|
||||
await saveVehicle({
|
||||
|
Reference in New Issue
Block a user