|
@@ -1,14 +1,14 @@
|
|
|
<template>
|
|
|
<view class="pages flex flex_column">
|
|
|
- <view class="forms">
|
|
|
+ <view class="forms" v-if="carInfo">
|
|
|
<view class="forms-tits">车辆信息</view>
|
|
|
<view class="flex align_center">
|
|
|
<view class="labes">车辆品牌:</view>
|
|
|
- <view class="inputs">日产(东风)</view>
|
|
|
+ <view class="inputs">{{carInfo.carBrand}}</view>
|
|
|
</view>
|
|
|
<view class="flex align_center">
|
|
|
<view class="labes">车型:</view>
|
|
|
- <view class="inputs">轩逸</view>
|
|
|
+ <view class="inputs">{{carInfo.carModel}}</view>
|
|
|
</view>
|
|
|
<view class="flex align_center">
|
|
|
<view class="labes">里程数:</view>
|
|
@@ -16,7 +16,7 @@
|
|
|
</view>
|
|
|
<view class="flex align_center">
|
|
|
<view class="labes">车牌号:</view>
|
|
|
- <view class="inputs">{{carInfo.carNo}}</view>
|
|
|
+ <view class="inputs">{{carInfo.vehicleNumber}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -24,11 +24,11 @@
|
|
|
<view class="forms-tits">客户联系方式</view>
|
|
|
<view class="flex align_center">
|
|
|
<view class="labes"><text>*</text>客户姓名:</view>
|
|
|
- <view class="inputs"><u-input :focus="focusInput" v-model="form.customerName" maxlength="30" border clearable type="text" placeholder="请输入客户姓名"></u-input></view>
|
|
|
+ <view class="inputs"><u-input :focus="focusInput" v-model="form.customName" maxlength="30" border clearable type="text" placeholder="请输入客户姓名"></u-input></view>
|
|
|
</view>
|
|
|
<view class="flex align_center">
|
|
|
<view class="labes"><text>*</text>手机号码:</view>
|
|
|
- <view class="inputs"><u-input v-model="form.phone" type="number" maxlength="11" border clearable placeholder="请输入手机号码"></u-input></view>
|
|
|
+ <view class="inputs"><u-input v-model="form.customMobile" type="number" maxlength="11" border clearable placeholder="请输入手机号码"></u-input></view>
|
|
|
</view>
|
|
|
<view class="flex align_center">
|
|
|
<view class="labes"><text>*</text>验证码:</view>
|
|
@@ -43,7 +43,7 @@
|
|
|
|
|
|
<view class="buttons flex align_center">
|
|
|
<u-button type="default" @click="toBack">上一步</u-button>
|
|
|
- <u-button type="primary" @click="saveForm">确定</u-button>
|
|
|
+ <u-button type="primary" :loading="loading" @click="saveForm">确定</u-button>
|
|
|
</view>
|
|
|
<!-- 图文验证码 -->
|
|
|
<uni-popup @change="changeModal" ref="imageTxtPopup" type="center">
|
|
@@ -55,9 +55,14 @@
|
|
|
<script>
|
|
|
import uniPopup from '@/components/uni-popup/uni-popup.vue'
|
|
|
import popupCon from '@/components/uni-popup/popup-con.vue'
|
|
|
+ import {
|
|
|
+ sendLoginVerifyCode
|
|
|
+ } from '../../api/login.js'
|
|
|
import {
|
|
|
isvalidPhone
|
|
|
} from '@/libs/validate.js'
|
|
|
+ import{ traceWarrantySave } from '@/api/trace.js'
|
|
|
+
|
|
|
export default {
|
|
|
components: {
|
|
|
uniPopup,
|
|
@@ -74,21 +79,24 @@
|
|
|
isDisabled: false ,// 倒计时按钮是否禁用
|
|
|
checkedXy: true,
|
|
|
carInfo:{
|
|
|
- vinCode: '',
|
|
|
+ vin: '',
|
|
|
mileage: '',
|
|
|
- carNo: ''
|
|
|
+ vehicleNumber: '',
|
|
|
+ carBrand: '',
|
|
|
+ carModel: '',
|
|
|
},
|
|
|
form:{
|
|
|
- customerName: '',
|
|
|
- phone: '',
|
|
|
+ customName: '',
|
|
|
+ customMobile: '',
|
|
|
vericode: ''
|
|
|
},
|
|
|
uuid: [],
|
|
|
+ loading: false
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
const tempData = this.$store.state.vuex_uuidTempData
|
|
|
- this.uuid = tempData&&tempData.uuid ? tempData.uuid : [],
|
|
|
+ this.uuid = tempData&&tempData.traceCodeList ? tempData.traceCodeList : [],
|
|
|
this.carInfo = Object.assign(this.carInfo, tempData.carInfo)
|
|
|
},
|
|
|
methods: {
|
|
@@ -120,9 +128,9 @@
|
|
|
checkMobile() {
|
|
|
if(this.isDisabled){return}
|
|
|
if (!this.getCodeing) {
|
|
|
- if (this.form.phone) {
|
|
|
- console.log(!isvalidPhone(this.form.phone))
|
|
|
- if (!isvalidPhone(this.form.phone)) {
|
|
|
+ if (this.form.customMobile) {
|
|
|
+ console.log(!isvalidPhone(this.form.customMobile))
|
|
|
+ if (!isvalidPhone(this.form.customMobile)) {
|
|
|
uni.showToast({
|
|
|
title: '请输入正确的手机号码',
|
|
|
icon: 'none'
|
|
@@ -151,7 +159,7 @@
|
|
|
captchaVerify(code, nowRandomCode) {
|
|
|
const _this = this
|
|
|
let obj = {}
|
|
|
- obj.mobile = this.form.phone
|
|
|
+ obj.mobile = this.form.customMobile
|
|
|
obj.random = nowRandomCode
|
|
|
obj.code = code
|
|
|
obj.signName = '修配易码通'
|
|
@@ -191,14 +199,14 @@
|
|
|
})
|
|
|
},
|
|
|
saveForm(){
|
|
|
- if(this.form.customerName == ''){
|
|
|
+ if(this.form.customName == ''){
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
|
title: '请输入客户名称'
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if(this.form.phone == ''){
|
|
|
+ if(this.form.customMobile == ''){
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
|
title: '请输入电话号码'
|
|
@@ -213,8 +221,28 @@
|
|
|
return
|
|
|
}
|
|
|
this.$store.state.vuex_uuidTempData.customerInfo = this.form
|
|
|
- uni.redirectTo({
|
|
|
- url: "/pagesA/qualityPolicy/resultOrder"
|
|
|
+ const formData = this.$store.state.vuex_uuidTempData
|
|
|
+ console.log(formData)
|
|
|
+ const params = {...formData.carInfo,...formData.customerInfo}
|
|
|
+ const uuidList = []
|
|
|
+ formData.traceCodeList.map(item => {
|
|
|
+ uuidList.push(item.traceCode)
|
|
|
+ })
|
|
|
+ params.traceCodeList = uuidList
|
|
|
+ console.log(params)
|
|
|
+ // 保存数据
|
|
|
+ this.loading = true
|
|
|
+ traceWarrantySave(params).then(res => {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: res.message
|
|
|
+ })
|
|
|
+ if(res.status == 200){
|
|
|
+ uni.redirectTo({
|
|
|
+ url: "/pagesA/qualityPolicy/resultOrder"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.loading = false
|
|
|
})
|
|
|
}
|
|
|
}
|
|
@@ -279,6 +307,7 @@
|
|
|
text-align: center;
|
|
|
color: dodgerblue;
|
|
|
font-size: 0.8rem;
|
|
|
+ width: 5rem;
|
|
|
}
|
|
|
}
|
|
|
</style>
|