1
This commit is contained in:
parent
6053ab110b
commit
66a12e1d26
@ -11,6 +11,7 @@
|
||||
<view class="order-body">
|
||||
<view class="carNum">
|
||||
{{ order.carNum }}
|
||||
<text style="float: right">{{order.repairTypeText}}</text>
|
||||
</view>
|
||||
<view class="carModel">
|
||||
{{ order.carModel }}
|
||||
@ -40,6 +41,15 @@
|
||||
<view>
|
||||
服务顾问:{{ order.counselorName }}
|
||||
</view>
|
||||
<view>
|
||||
业务来源:{{ order.busiFrom }}
|
||||
</view>
|
||||
<view v-if="order.payTypeText">
|
||||
支付方式:{{ order.payTypeText }}
|
||||
</view>
|
||||
<view v-if="!order.payTypeText">
|
||||
支付方式:未结算
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer">
|
||||
<view @click="projectDis" v-if="order.ticketsStatus == '04' && (userInfo.roleCodes.includes('service_advisor') || userInfo.roleCodes.includes('general_inspection'))" class="btn pg">
|
||||
|
11
config.js
11
config.js
@ -1,21 +1,24 @@
|
||||
// 应用全局配置
|
||||
module.exports = {
|
||||
//生产
|
||||
baseUrl: 'https://www.nuoyunr.com',
|
||||
// baseUrl: 'http://192.168.110.93:48080',
|
||||
// baseUrl: 'http://192.168.1.4:48080',
|
||||
// baseUrl: "http://localhost:48080",
|
||||
//开发
|
||||
// baseUrl: "http://192.168.1.17:48080",
|
||||
// baseUrl: "http://rzqhb7.natappfree.cc",
|
||||
imagesUrl: 'http://shequ.0315e.com/static/images/pages/',
|
||||
baseImageUrl: 'https://www.nuoyunr.com/minio/',
|
||||
shareUrl: 'https://www.lighting-it.cn/share?inviteId=',
|
||||
//生产
|
||||
wsUrl: 'ws://122.51.230.86:48080',
|
||||
//本地
|
||||
// wsUrl: 'ws://192.168.1.17:48080',
|
||||
//com.carService.qx
|
||||
// 应用信息
|
||||
appInfo: {
|
||||
// 应用名称
|
||||
name: "智修小助手",
|
||||
// 应用版本
|
||||
version: "2.2",
|
||||
version: "2.3",
|
||||
// 应用logo
|
||||
logo: "/static/logo.png'",
|
||||
// 官方网站
|
||||
|
@ -278,7 +278,7 @@ export default {
|
||||
menuList: [
|
||||
{
|
||||
title: '新建工单',
|
||||
desc: '直接添加客户订单',
|
||||
desc: '直接添加订单',
|
||||
icon: require('@/static/icons/homeMenuIcon/menu1.png'),
|
||||
path: '/pages-order/addOrder/addOrder'
|
||||
},
|
||||
|
@ -236,6 +236,20 @@
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view style="display: flex;align-items: center">
|
||||
<view class="infoItem" style="flex: 1" v-if="cusFromList && cusFromList.length>0">
|
||||
<text class="label">客户来源</text>
|
||||
<picker @change="cusFromChange" :value="cusFromIndex" :range="cusFromList" range-key="label" >
|
||||
<view class="uni-input">{{ cusFromList[cusFromIndex].label}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="infoItem" style="flex: 1" v-if="busiFromList && busiFromList.length>0">
|
||||
<text class="label">业务来源</text>
|
||||
<picker @change="busiFromChange" :value="busiFromIndex" :range="busiFromList" range-key="label" >
|
||||
<view class="uni-input">{{ busiFromList[busiFromIndex].label}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view style="display: flex;align-items: center">
|
||||
<view class="infoItem" style="flex: 1">
|
||||
<text class="label">保险名称</text>
|
||||
@ -289,7 +303,6 @@
|
||||
<picker @change="repairTypeChange" :value="repairTypeIndex" :range="repairTypes" range-key="label" >
|
||||
<view class="uni-input">{{ repairTypes[repairTypeIndex].label}}</view>
|
||||
</picker>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view style="display: flex;align-items: center">-->
|
||||
@ -381,6 +394,10 @@ export default {
|
||||
ticketType: '01',
|
||||
repairTypes:[],
|
||||
repairTypeIndex:0,
|
||||
cusFromList:[],
|
||||
cusFromIndex:0,
|
||||
busiFromList:[],
|
||||
busiFromIndex:0,
|
||||
partDisposals:[],
|
||||
partDisposalIndex:0,
|
||||
formData:{
|
||||
@ -401,6 +418,8 @@ export default {
|
||||
insuranceExpiryDate:null,
|
||||
jiaoqiang:null,
|
||||
shangye:null,
|
||||
cusFrom:null,
|
||||
busiFrom:null,
|
||||
},
|
||||
options: [
|
||||
{label: 'A单', value: '01'},
|
||||
@ -440,6 +459,15 @@ export default {
|
||||
if(!this.formData.handleMobile){
|
||||
this.formData.handleMobile = newVal.phoneNumber
|
||||
}
|
||||
if(!this.formData.cusFrom){
|
||||
for (let i = 0; i < this.cusFromList.length; i++) {
|
||||
if(newVal.dataFrom==this.cusFromList[i].value){
|
||||
this.cusFromIndex = i
|
||||
this.formData.cusFrom = newVal.dataFrom
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log('obj changed:', newVal, oldVal)
|
||||
},
|
||||
deep: true
|
||||
@ -457,8 +485,10 @@ export default {
|
||||
this.phone = data.phone
|
||||
this.listUserInfo()
|
||||
}
|
||||
this.initDict("repair_busi_from")
|
||||
this.initDict("insurance_type")
|
||||
this.initDict("repair_type")
|
||||
this.initDict("cus_data_from")
|
||||
this.initDict("repair_part_disposal")
|
||||
},
|
||||
onShow() {
|
||||
@ -492,10 +522,20 @@ export default {
|
||||
this.repairTypeIndex = newIndex;
|
||||
this.formData.repairType = this.repairTypes[newIndex].value;
|
||||
},
|
||||
cusFromChange(event){
|
||||
const newIndex = event.detail.value;
|
||||
this.cusFromIndex = newIndex;
|
||||
this.formData.cusFrom = this.cusFromList[newIndex].value;
|
||||
},
|
||||
busiFromChange(event){
|
||||
const newIndex = event.detail.value;
|
||||
this.busiFromIndex = newIndex;
|
||||
this.formData.busiFrom = this.busiFromList[newIndex].value;
|
||||
},
|
||||
partDisposalChange(event){
|
||||
const newIndex = event.detail.value;
|
||||
this.partDisposalIndex = newIndex;
|
||||
this.formData.partDisposal = this.repairTypes[newIndex].value;
|
||||
this.formData.partDisposal = this.partDisposals[newIndex].value;
|
||||
},
|
||||
|
||||
|
||||
@ -515,10 +555,14 @@ export default {
|
||||
if("repair_type"==dictCode){
|
||||
this.repairTypes = res.data
|
||||
this.buildRepairType()
|
||||
}else if("repair_part_disposal"){
|
||||
}else if("repair_part_disposal"==dictCode){
|
||||
this.partDisposals = res.data
|
||||
}else if("insurance_type"){
|
||||
}else if("insurance_type"==dictCode){
|
||||
this.buildInsuranceTypeList()
|
||||
}else if("cus_data_from"==dictCode){
|
||||
this.cusFromList = res.data
|
||||
}else if("repair_busi_from"==dictCode){
|
||||
this.busiFromList = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -528,10 +572,14 @@ export default {
|
||||
if("repair_type"==dictCode){
|
||||
this.repairTypes = dictArray
|
||||
this.buildRepairType()
|
||||
}else if("repair_part_disposal"){
|
||||
}else if("repair_part_disposal"==dictCode){
|
||||
this.partDisposals = dictArray
|
||||
}else if("insurance_type"){
|
||||
}else if("insurance_type"==dictCode){
|
||||
this.buildInsuranceTypeList()
|
||||
}else if("cus_data_from"==dictCode){
|
||||
this.cusFromList = dictArray
|
||||
}else if("repair_busi_from"==dictCode){
|
||||
this.busiFromList = dictArray
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -613,6 +661,12 @@ export default {
|
||||
//新增工单
|
||||
submit() {
|
||||
let fileStr = this.fileList.map(item=>item.url.replace(config.baseImageUrl,"")).join(",")
|
||||
if(!this.formData.busiFrom){
|
||||
this.formData.busiFrom = this.busiFromList[this.busiFromIndex].value
|
||||
}
|
||||
if(!this.formData.cusFrom){
|
||||
this.formData.cusFrom = this.cusFromList[this.cusFromIndex].value
|
||||
}
|
||||
const data = {
|
||||
userId: this.userInfo.id,
|
||||
ticketNo: this.ticketNo,
|
||||
@ -634,6 +688,7 @@ export default {
|
||||
if(this.insuranceTypeArray.length>0){
|
||||
data.insuranceType= this.insuranceTypeArray.join(",")
|
||||
}
|
||||
|
||||
if(this.pageData && this.pageData.hasOwnProperty("bookingId")){
|
||||
data.bookingId = this.pageData.bookingId
|
||||
}
|
||||
|
@ -110,6 +110,20 @@
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view style="display: flex;align-items: center">
|
||||
<view class="infoItem" style="flex: 1" v-if="cusFromList && cusFromList.length>0">
|
||||
<text class="label">客户来源</text>
|
||||
<picker @change="cusFromChange" :value="cusFromIndex" :range="cusFromList" range-key="label" >
|
||||
<view class="uni-input">{{ cusFromList[cusFromIndex].label}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="infoItem" style="flex: 1" v-if="busiFromList && busiFromList.length>0">
|
||||
<text class="label">业务来源</text>
|
||||
<picker @change="busiFromChange" :value="busiFromIndex" :range="busiFromList" range-key="label" >
|
||||
<view class="uni-input">{{ busiFromList[busiFromIndex].label}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view style="display: flex;align-items: center">
|
||||
<view class="infoItem" style="flex: 1">
|
||||
<text class="label">保险名称</text>
|
||||
@ -163,7 +177,6 @@
|
||||
<picker @change="repairTypeChange" :value="repairTypeIndex" :range="repairTypes" range-key="label" >
|
||||
<view class="uni-input">{{ repairTypes[repairTypeIndex].label}}</view>
|
||||
</picker>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -174,12 +187,23 @@
|
||||
<view class="btn" @click="submitUpload">保存工单</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 普通弹窗---拍照上传 -->
|
||||
<uni-popup ref="popup" background-color="#fff">
|
||||
<view class="popup-content">
|
||||
<view class="dl-avatar-box">
|
||||
<uni-file-picker :value="fileList" :sizeType="sizeType" @select="afterRead" @delete="deleteFile" limit="9" title="请上传诊断维修单和车辆维修前照片"></uni-file-picker>
|
||||
</view>
|
||||
<button type="primary" @click="applyData">保存</button>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import VNavigationBar from '@/components/VNavigationBar.vue'
|
||||
import request from "@/utils/request";
|
||||
import upload from "@/utils/upload";
|
||||
import config from "@/config";
|
||||
import {getToken, setUserInfo, getUserInfo,getStorageWithExpiry,setStorageWithExpiry} from '@/utils/auth.js'
|
||||
import {getDictByCode,formatDate} from "@/utils/utils";
|
||||
|
||||
@ -189,9 +213,16 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//上传的图片数组
|
||||
fileList: [],
|
||||
sizeType:['compressed'],
|
||||
phone: '',
|
||||
repairTypes:[],
|
||||
repairTypeIndex:0,
|
||||
cusFromList:[],
|
||||
cusFromIndex:0,
|
||||
busiFromList:[],
|
||||
busiFromIndex:0,
|
||||
partDisposals:[],
|
||||
partDisposalIndex:0,
|
||||
formData:{
|
||||
@ -214,6 +245,8 @@ export default {
|
||||
insuranceExpiryDate:null,
|
||||
jiaoqiang:null,
|
||||
shangye:null,
|
||||
cusFrom:null,
|
||||
busiFrom:null,
|
||||
},
|
||||
//承保险种-、三者、车损、驾乘、不计
|
||||
insuranceTypeList:[{
|
||||
@ -243,14 +276,33 @@ export default {
|
||||
// this.formData.inTime = formatDate(Date.now())
|
||||
// this.formData.outTime = formatDate(Date.now())
|
||||
// this.formData.maintenanceDate = formatDate(Date.now())
|
||||
this.initDict("repair_busi_from")
|
||||
this.initDict("insurance_type")
|
||||
this.initDict("repair_type")
|
||||
this.initDict("cus_data_from")
|
||||
this.initDict("repair_part_disposal")
|
||||
this.getOrderDetail()
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
methods: {
|
||||
afterRead(file) {
|
||||
for (let i = 0; i < file.tempFilePaths.length; i++) {
|
||||
upload({
|
||||
url:'/admin-api/infra/file/upload',
|
||||
filePath: file.tempFilePaths[i]
|
||||
}).then((res)=>{
|
||||
this.fileList.push({
|
||||
url: config.baseImageUrl+res.data
|
||||
})
|
||||
console.log(this.fileList)
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
deleteFile(file, index) {
|
||||
this.fileList.splice(index, 1);
|
||||
},
|
||||
getOrderDetail(){
|
||||
request({
|
||||
url: '/admin-api/repair/tickets/getById',
|
||||
@ -281,6 +333,32 @@ export default {
|
||||
if(resultObj.insuranceType){
|
||||
this.insuranceTypeArray = resultObj.insuranceType.split(",")
|
||||
}
|
||||
for (let i = 0; i < this.cusFromList.length; i++) {
|
||||
if(this.cusFromList[i].value==resultObj.customerInfo.dataFrom){
|
||||
this.cusFromIndex = i
|
||||
resultObj.cusFrom = this.cusFromList[i].value
|
||||
break
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < this.busiFromList.length; i++) {
|
||||
if(this.busiFromList[i].value==resultObj.busiFrom){
|
||||
this.busiFromIndex = i
|
||||
resultObj.busiFrom = this.busiFromList[i].value
|
||||
break
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < this.partDisposals.length; i++) {
|
||||
if(this.partDisposals[i].value==resultObj.partDisposal){
|
||||
this.partDisposalIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < this.repairTypes.length; i++) {
|
||||
if(this.repairTypes[i].value==resultObj.repairType){
|
||||
this.repairTypeIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
this.formData = resultObj
|
||||
})
|
||||
},
|
||||
@ -309,6 +387,16 @@ export default {
|
||||
this.repairTypeIndex = newIndex;
|
||||
this.formData.repairType = this.repairTypes[newIndex].value;
|
||||
},
|
||||
cusFromChange(event){
|
||||
const newIndex = event.detail.value;
|
||||
this.cusFromIndex = newIndex;
|
||||
this.formData.cusFrom = this.cusFromList[newIndex].value;
|
||||
},
|
||||
busiFromChange(event){
|
||||
const newIndex = event.detail.value;
|
||||
this.busiFromIndex = newIndex;
|
||||
this.formData.busiFrom = this.busiFromList[newIndex].value;
|
||||
},
|
||||
partDisposalChange(event){
|
||||
const newIndex = event.detail.value;
|
||||
this.partDisposalIndex = newIndex;
|
||||
@ -329,11 +417,14 @@ export default {
|
||||
this.$nextTick(()=>{
|
||||
if("repair_type"==dictCode){
|
||||
this.repairTypes = res.data
|
||||
this.buildRepairType()
|
||||
}else if("repair_part_disposal"){
|
||||
}else if("repair_part_disposal"==dictCode){
|
||||
this.partDisposals = res.data
|
||||
}else if("insurance_type"){
|
||||
}else if("insurance_type"==dictCode){
|
||||
this.buildInsuranceTypeList()
|
||||
}else if("cus_data_from"==dictCode){
|
||||
this.cusFromList = res.data
|
||||
}else if("repair_busi_from"==dictCode){
|
||||
this.busiFromList = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -342,11 +433,14 @@ export default {
|
||||
this.$nextTick(()=>{
|
||||
if("repair_type"==dictCode){
|
||||
this.repairTypes = dictArray
|
||||
this.buildRepairType()
|
||||
}else if("repair_part_disposal"){
|
||||
}else if("repair_part_disposal"==dictCode){
|
||||
this.partDisposals = dictArray
|
||||
}else if("insurance_type"){
|
||||
}else if("insurance_type"==dictCode){
|
||||
this.buildInsuranceTypeList()
|
||||
}else if("cus_data_from"==dictCode){
|
||||
this.cusFromList = dictArray
|
||||
}else if("repair_busi_from"==dictCode){
|
||||
this.busiFromList = dictArray
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -366,26 +460,16 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
buildRepairType(){
|
||||
if(this.pageData.repairType){
|
||||
this.repairTypes.map((item,index)=>{
|
||||
if(item.value==this.pageData.repairType){
|
||||
this.repairTypeIndex = index
|
||||
this.formData.repairType = this.repairTypes[index].value;
|
||||
return
|
||||
}
|
||||
})
|
||||
}else{
|
||||
//默认选中第一个
|
||||
this.repairTypeIndex = 0
|
||||
this.formData.repairType = this.repairTypes[0].value;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 创建工单前上传图片
|
||||
*/
|
||||
submitUpload(){
|
||||
this.$refs.popup.open("bottom")
|
||||
},
|
||||
applyData(){
|
||||
let fileStr = this.fileList.map(item=>item.url.replace(config.baseImageUrl,"")).join(",")
|
||||
let dataObj = this.formData
|
||||
dataObj.image=fileStr
|
||||
if(this.insuranceTypeArray.length>0){
|
||||
dataObj.insuranceType= this.insuranceTypeArray.join(",")
|
||||
}
|
||||
@ -394,6 +478,7 @@ export default {
|
||||
method: 'POST',
|
||||
data: this.formData
|
||||
}).then(res => {
|
||||
this.$refs.popup.close()
|
||||
uni.showToast({
|
||||
title: '修改成功',
|
||||
icon: 'success'
|
||||
@ -404,7 +489,7 @@ export default {
|
||||
});
|
||||
},600)
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -66,6 +66,10 @@
|
||||
<text class="label">联系方式</text>
|
||||
<text class="value">{{ ticketInfo.userMobile }}</text>
|
||||
</view>
|
||||
<view class="infoItem">
|
||||
<text class="label">客户来源</text>
|
||||
<text class="value">{{ ticketInfo.customerInfo.dataFromText }}</text>
|
||||
</view>
|
||||
<view class="infoItem">
|
||||
<text class="label">性别</text>
|
||||
<text class="value">{{ ticketInfo.customerInfo.sex === '1' ? '女' : '男' }}</text>
|
||||
@ -78,6 +82,10 @@
|
||||
<text class="label">经办人电话</text>
|
||||
<text class="value">{{ ticketInfo.handleMobile }}</text>
|
||||
</view>
|
||||
<view class="infoItem" >
|
||||
<text class="label">业务来源</text>
|
||||
<text class="value">{{ ticketInfo.busiFrom }}</text>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="infoItem">
|
||||
<view class="label">车架号</view>
|
||||
|
@ -11,7 +11,7 @@
|
||||
</view>
|
||||
<view class="header" v-if="!isRepairWarehouse && activeKey==1">
|
||||
<view class="searchBox">
|
||||
<input class="searchInput" type="text" v-model="searchText" placeholder="工单号、车牌号、手机号、客户姓名" placeholder-style="font-size: 28rpx">
|
||||
<input class="searchInput" type="text" v-model="searchText" placeholder="工单号、车辆品牌、车牌号、手机号、客户姓名、经办人、工时项目" placeholder-style="font-size: 28rpx">
|
||||
<!-- <text class="searchBtn" @click="onRefresherrefresh">搜索</text>-->
|
||||
<text class="searchBtn" @click="clearText">清空</text>
|
||||
</view>
|
||||
|
@ -131,6 +131,7 @@
|
||||
v-model="datePickerValue"
|
||||
:formatter="formatter"
|
||||
:show="datePickerShow"
|
||||
:minDate="minDate"
|
||||
mode="date"
|
||||
@cancel="datePickerCancel"
|
||||
@confirm="datePickerConfirm"
|
||||
@ -200,9 +201,11 @@ export default {
|
||||
//可选车辆性质范围
|
||||
natureList: [],
|
||||
natureIndex: 0,
|
||||
minDate:null,
|
||||
};
|
||||
},
|
||||
onLoad(data) {
|
||||
this.minDate = Number(new Date('1980-01-01'));
|
||||
// 没有数据 需要赋值一下初始化
|
||||
if(data && data.hasOwnProperty("userInfo")){
|
||||
let thisUserInfoObj = JSON.parse(data.userInfo)
|
||||
@ -422,9 +425,9 @@ export default {
|
||||
message: '上传中'
|
||||
})
|
||||
})
|
||||
uni.showLoading({
|
||||
title: '正在识别中...'
|
||||
});
|
||||
// uni.showLoading({
|
||||
// title: '正在识别中...'
|
||||
// });
|
||||
try {
|
||||
for (let i = 0; i < lists.length; i++) {
|
||||
const result = await this.uploadFilePromise(lists[i].url)
|
||||
@ -438,6 +441,10 @@ export default {
|
||||
}
|
||||
}catch (e){
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '无法识别该行驶证',
|
||||
icon: 'success'
|
||||
})
|
||||
}
|
||||
},
|
||||
uploadFilePromise(url) {
|
||||
|
@ -114,6 +114,7 @@
|
||||
:formatter="formatter"
|
||||
:show="datePickerShow"
|
||||
mode="date"
|
||||
:minDate="minDate"
|
||||
@cancel="datePickerCancel"
|
||||
@confirm="datePickerConfirm"
|
||||
></u-datetime-picker>
|
||||
@ -132,7 +133,7 @@ import request from "@/utils/request";
|
||||
import config from '@/config'
|
||||
import {bus} from "@/utils/eventBus";
|
||||
import upload from "@/utils/upload";
|
||||
import {getDictByCode} from "@/utils/utils";
|
||||
import {getDictByCode,formatDate} from "@/utils/utils";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -179,13 +180,17 @@ export default {
|
||||
natureList: [],
|
||||
natureIndex: 0,
|
||||
index:null,
|
||||
minDate:null,
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.minDate = Number(new Date('1980-01-01'));
|
||||
// 如果是修改
|
||||
if (options.car) {
|
||||
// 有数据为编辑 或 删除
|
||||
this.car = JSON.parse(decodeURIComponent(options.car));
|
||||
//处理几个时间
|
||||
this.dealDateTime()
|
||||
this.brandId = this.car.carBrand
|
||||
console.log('初始化页面数据', this.car)
|
||||
this.bo1 = true;
|
||||
@ -210,6 +215,17 @@ export default {
|
||||
console.log(this.car)
|
||||
},
|
||||
methods: {
|
||||
dealDateTime(){
|
||||
if(this.car.carRegisterDate){
|
||||
this.car.carRegisterDate = formatDate(this.car.carRegisterDate)
|
||||
}
|
||||
if(this.car.nextInspectionDate){
|
||||
this.car.nextInspectionDate = formatDate(this.car.nextInspectionDate)
|
||||
}
|
||||
if(this.car.insuranceExpiryDate){
|
||||
this.car.insuranceExpiryDate = formatDate(this.car.insuranceExpiryDate)
|
||||
}
|
||||
},
|
||||
onchange(e) {
|
||||
this.brandId = e.detail.value[0].id
|
||||
this.brandName = e.detail.value[0].brandName
|
||||
@ -395,11 +411,12 @@ export default {
|
||||
message: '上传中'
|
||||
})
|
||||
})
|
||||
uni.showLoading({
|
||||
title: '正在识别中...'
|
||||
});
|
||||
// uni.showLoading({
|
||||
// title: '正在识别中...'
|
||||
// });
|
||||
try {
|
||||
for (let i = 0; i < lists.length; i++) {
|
||||
const result = await this.uploadFilePromise(lists[i].url)
|
||||
let result = await this.uploadFilePromise(lists[i].url)
|
||||
let item = this[`fileList${event.name}`][fileListLen]
|
||||
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
|
||||
status: 'success',
|
||||
@ -408,6 +425,14 @@ export default {
|
||||
}))
|
||||
fileListLen++
|
||||
}
|
||||
} catch (e) {
|
||||
//识别报错
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '无法识别该行驶证',
|
||||
icon: 'success'
|
||||
})
|
||||
}
|
||||
},
|
||||
uploadFilePromise(url) {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
@ -298,6 +298,7 @@ export function builderOrder(order) {
|
||||
userPhone: order.userMobile,
|
||||
counselorName: order.adviserName,
|
||||
canOperate:order.canOperate,
|
||||
...order,
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user