This commit is contained in:
Vinjor 2024-11-06 18:23:38 +08:00
parent f7bf45e921
commit 1756cb5034
8 changed files with 69 additions and 54 deletions

View File

@ -40,6 +40,9 @@
<view v-if="order.adviserName">
服务顾问{{ order.adviserName }}
</view>
<view v-if="order.repairText">
服务项目{{ order.repairText }}
</view>
</view>
<!-- <view class="footer">-->
<!-- <view @click="projectDis" v-if="order.ticketsStatus == '04' && roleCanPg" class="btn pg">-->

View File

@ -1,8 +1,8 @@
// 应用全局配置
module.exports = {
baseUrl: 'https://www.nuoyunr.com',
// baseUrl: 'https://www.nuoyunr.com',
// baseUrl: 'http://124.222.105.7:48080',
// baseUrl: 'http://192.168.1.17:48080',
baseUrl: 'http://192.168.1.17:48080',
// baseUrl: "http://localhost:48080",
imagesUrl: 'http://shequ.0315e.com/static/images/pages/',
baseImageUrl: 'https://www.nuoyunr.com/minio/',

View File

@ -73,17 +73,17 @@
</view>
<view style="display: flex;align-items: center">
<view class="infoItem" style="flex: 1">
<view class="label">年检时间</view>
<view class="value">{{ carList[activeCarIndex].inspectionDate }}</view>
<view class="label">年检到期时间</view>
<view class="value">{{ carList[activeCarIndex].nextInspectionDate || '未知' }}</view>
</view>
<view class="infoItem" style="flex: 1">
<view class="label">保险时间</view>
<view class="value">{{ carList[activeCarIndex].insuranceDate }}</view>
<view class="value">{{ carList[activeCarIndex].insuranceExpiryDate || '未知' }}</view>
</view>
</view>
<view class="infoItem">
<view class="label">注册日期</view>
<view class="value">{{ carList[activeCarIndex].carRegisterDate }}</view>
<view class="value">{{ carList[activeCarIndex].carRegisterDate || '未知' }}</view>
</view>
</view>
<view class="carFoot">
@ -142,7 +142,7 @@
<view class="card cardInfo userCard">
<template>
<view class="userTitle">工单信息</view>
<view class="userContainer">
<view class="userContainer" style="padding-bottom: 20rpx">
<view style="display: flex;align-items: center">
<view class="infoItem" style="flex: 1">
<text class="label">进场时间</text>
@ -321,9 +321,12 @@ export default {
],
imgUrlPrex: config.baseImageUrl,
ticketNo: '',
//
pageData:{},
}
},
onLoad(data) {
this.pageData = data
this.formData.inTime = formatDate(Date.now())
this.formData.outTime = formatDate(Date.now())
this.ticketNo = this.createUniqueCodeByHead('GD')
@ -332,16 +335,6 @@ export default {
this.listUserInfo()
}
this.initDict()
setTimeout(() => {
if (data.carId) {
for (let i = 0; i < this.carList.length; i++) {
if (data.carId == this.carList[i].id) {
this.activeCarIndex = i
break
}
}
}
}, 500)
},
onShow() {
if (this.phone != '') {
@ -377,6 +370,15 @@ export default {
initDict(){
this.repairTypes = getDictByCode('repair_type')
this.partDisposals = getDictByCode('repair_part_disposal')
console.log(this.pageData.repairType,"this.pageData.repairType")
if(this.pageData.repairType){
this.repairTypes.map((item,index)=>{
if(item.value==this.pageData.repairType){
this.repairTypeIndex = index
return
}
})
}
},
afterRead(file) {
@ -552,15 +554,15 @@ export default {
}
//
this.carList.forEach(item => {
if (item.inspectionDate) {
item.inspectionDate = formatTimestampCustom(item.inspectionDate)
if (item.nextInspectionDate) {
item.nextInspectionDate = formatTimestampCustom(item.nextInspectionDate)
}else {
item.inspectionDate = ''
item.nextInspectionDate = ''
}
if (item.insuranceDate) {
item.insuranceDate = formatTimestampCustom(item.insuranceDate)
if (item.insuranceExpiryDate) {
item.insuranceExpiryDate = formatTimestampCustom(item.insuranceExpiryDate)
}else {
item.insuranceDate = ''
item.insuranceExpiryDate = ''
}
if (item.carRegisterDate) {
item.carRegisterDate = formatTimestampCustom(item.carRegisterDate)
@ -568,6 +570,14 @@ export default {
item.carRegisterDate = ''
}
})
if (this.pageData.carId) {
for (let i = 0; i < this.carList.length; i++) {
if (this.pageData.carId == this.carList[i].id) {
this.activeCarIndex = i
break
}
}
}
})
},
editCarInfo(index) {

View File

@ -20,7 +20,7 @@
</view>
<view class="orderList">
<view v-for="item in orderList" :key="item.id" class="orderItem" @click="addOrder(item.carId)">
<view v-for="item in orderList" :key="item.id" class="orderItem" @click="addOrder(item)">
<booking-order-card :order="item"></booking-order-card>
</view>
</view>
@ -91,10 +91,10 @@ export default {
})
}
},
addOrder(carId){
addOrder(order){
console.log('执行')
uni.navigateTo({
url: `/pages-order/addOrder/addOrder?phone=${this.phone}&carId=${carId}`
url: `/pages-order/addOrder/addOrder?phone=${this.phone}&carId=${order.carId}&repairType=${order.repairType}`
});
},
}

View File

@ -49,12 +49,12 @@
<template v-if="carInfo.showAll">
<view style="display: flex;align-items: center">
<view class="infoItem" style="flex: 1">
<view class="label">年检时间</view>
<view class="value">{{ ticketInfo.inspectionDate }}</view>
<view class="label">年检到期时间</view>
<view class="value">{{ ticketInfo.nextInspectionDate}}</view>
</view>
<view class="infoItem" style="flex: 1">
<view class="label">保险时间</view>
<view class="value">{{ ticketInfo.insuranceDate }}</view>
<view class="label">保险到期时间</view>
<view class="value">{{ ticketInfo.insuranceExpiryDate}}</view>
</view>
</view>
@ -837,18 +837,21 @@ export default {
//
if (null != resultObj.carInfo.carRegisterDate){
resultObj.carRegisterDate = formatDate(resultObj.carInfo.carRegisterDate)
}else{
resultObj.carRegisterDate = '未知'
}
//
if (null != resultObj.carInfo.inspectionDate){
resultObj.inspectionDate = formatDate(resultObj.carInfo.inspectionDate)
console.log(resultObj.carInfo)
if (null != resultObj.carInfo.nextInspectionDate){
resultObj.nextInspectionDate = formatDate(resultObj.carInfo.nextInspectionDate)
} else {
resultObj.inspectionDate = '未知'
resultObj.nextInspectionDate = '未知'
}
//
if (null != resultObj.carInfo.insuranceDate) {
resultObj.insuranceDate = formatDate(resultObj.carInfo.insuranceDate)
if (null != resultObj.carInfo.insuranceExpiryDate) {
resultObj.insuranceExpiryDate = formatDate(resultObj.carInfo.insuranceExpiryDate)
} else {
resultObj.insuranceDate = '未知'
resultObj.insuranceExpiryDate = '未知'
}
//
if (null != resultObj.customerInfo.birthday) {
@ -862,7 +865,9 @@ export default {
item.createTime = formatTimestamp(item.createTime)
})
}
this.ticketInfo = resultObj
this.$nextTick(()=>{
this.ticketInfo = resultObj
})
//
this.checkRoleOperate()
})

View File

@ -295,7 +295,6 @@ export default {
//
console.log(this.allCompanyList,"this.checkedCorpIdList")
debugger
if(this.checkedCorpIdList.length>0){
this.formData.corpId = this.checkedCorpIdList.join()
}

View File

@ -198,7 +198,6 @@ export default {
}
})]
console.log(data)
debugger
request({
url: '/admin-api/repair/so/create',
method: 'post',

View File

@ -64,26 +64,26 @@
<u-form-item borderBottom label="发动机号" labelWidth="200">
<u-input v-model="car.engineNumber" border="none" placeholder="请输入发动机号"></u-input>
</u-form-item>
<u-form-item borderBottom label="年检时间" labelWidth="200" @click="openDatePicker('nj'); ">
<u-form-item borderBottom label="年检到期时间" labelWidth="200" @click="openDatePicker('nj'); ">
<u-input
v-model="car.inspectionDate"
v-model="car.nextInspectionDate"
border="none"
disabled
disabledColor="#ffffff"
placeholder="请选择年检时间"
placeholder="请选择年检到期时间"
></u-input>
<u-icon
slot="right"
name="arrow-right"
></u-icon>
</u-form-item>
<u-form-item borderBottom label="保险时间" labelWidth="200" @click="openDatePicker('bx'); hideKeyboard()">
<u-form-item borderBottom label="保险到期时间" labelWidth="200" @click="openDatePicker('bx'); hideKeyboard()">
<u-input
v-model="car.insuranceDate"
v-model="car.insuranceExpiryDate"
border="none"
disabled
disabledColor="#ffffff"
placeholder="请选择保险时间"
placeholder="请选择保险到期时间"
></u-input>
<u-icon
slot="right"
@ -257,9 +257,9 @@ export default {
openDatePicker(picker) {
if (picker === 'nj') {
this.pickerConfirmField = 'inspectionDate'
this.pickerConfirmField = 'nextInspectionDate'
} else if (picker === 'bx') {
this.pickerConfirmField = 'insuranceDate'
this.pickerConfirmField = 'insuranceExpiryDate'
} else if (picker === 'zcrq') {
this.pickerConfirmField = 'carRegisterDate'
}
@ -307,15 +307,15 @@ export default {
// bus.$emit('updateCarInfo', this.car)
this.car.brandAndModel = [this.brandId, this.car.carModel]
//
if (this.car.inspectionDate) {
this.car.inspectionDate = new Date(this.car.inspectionDate).getTime()
if (this.car.nextInspectionDate) {
this.car.nextInspectionDate = new Date(this.car.nextInspectionDate).getTime()
}else {
this.car.inspectionDate = undefined
this.car.nextInspectionDate = undefined
}
if (this.car.insuranceDate) {
this.car.insuranceDate = new Date(this.car.insuranceDate).getTime()
if (this.car.insuranceExpiryDate) {
this.car.insuranceExpiryDate = new Date(this.car.insuranceExpiryDate).getTime()
}else {
this.car.insuranceDate = undefined
this.car.insuranceExpiryDate = undefined
}
if (this.car.carRegisterDate) {
this.car.carRegisterDate = new Date(this.car.carRegisterDate).getTime()
@ -323,7 +323,6 @@ export default {
this.car.carRegisterDate = undefined
}
console.log(this.car,"car")
return
if (this.car.id != null) {
request({
url: '/admin-api/base/carMain/update',