1
This commit is contained in:
parent
d4e00a1d13
commit
f7bf45e921
@ -138,6 +138,96 @@
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
<view class="card cardInfo userCard">
|
||||
<template>
|
||||
<view class="userTitle">工单信息</view>
|
||||
<view class="userContainer">
|
||||
<view style="display: flex;align-items: center">
|
||||
<view class="infoItem" style="flex: 1">
|
||||
<text class="label">进场时间</text>
|
||||
|
||||
<picker
|
||||
mode="date"
|
||||
:value="formData.inTime"
|
||||
start="2020-01-01"
|
||||
end="2030-12-31"
|
||||
@change="bindDateChange1">
|
||||
<view style="margin-left: 10rpx">
|
||||
{{ formData.inTime}}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="infoItem" style="flex: 1">
|
||||
<text class="label">预计完工</text>
|
||||
<picker
|
||||
mode="date"
|
||||
:value="formData.outTime"
|
||||
start="2020-01-01"
|
||||
end="2030-12-31"
|
||||
@change="bindDateChange2">
|
||||
<view style="margin-left: 10rpx">
|
||||
{{ formData.outTime}}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view style="display: flex;align-items: center">
|
||||
<view class="infoItem" style="flex: 1">
|
||||
<text class="label">表显里程</text>
|
||||
<input type="text" style="text-align: left" v-model="formData.mileageTraveled" placeholder="请填写表显里程"/>
|
||||
</view>
|
||||
<view class="infoItem" style="flex: 1">
|
||||
<text class="label">三包单位</text>
|
||||
<input type="text" style="text-align: left" v-model="formData.threePackUnits" placeholder="请填写三包单位"/>
|
||||
</view>
|
||||
</view>
|
||||
<view style="display: flex;align-items: center">
|
||||
<view class="infoItem" style="flex: 1">
|
||||
<text class="label">保险名称</text>
|
||||
<input type="text" style="text-align: left" v-model="formData.insuranceName" placeholder="请填写保险名称"/>
|
||||
</view>
|
||||
<view class="infoItem" style="flex: 1">
|
||||
<text class="label">管理费</text>
|
||||
<input type="text" style="text-align: left" v-model="formData.managerMoney" placeholder="请填写管理费"/>
|
||||
</view>
|
||||
</view>
|
||||
<view style="display: flex;align-items: center">
|
||||
<view class="infoItem" style="flex: 1">
|
||||
<text class="label">救援费</text>
|
||||
<input type="text" style="text-align: left" v-model="formData.rescueMoney" placeholder="请填写救援费"/>
|
||||
</view>
|
||||
<view class="infoItem" style="flex: 1">
|
||||
<text class="label">三包费</text>
|
||||
<input type="text" style="text-align: left" v-model="formData.threePackMoney" placeholder="请填写救援费"/>
|
||||
</view>
|
||||
</view>
|
||||
<view style="display: flex;align-items: center">
|
||||
<view class="infoItem" style="flex: 1">
|
||||
<text class="label">定损费</text>
|
||||
<input type="text" style="text-align: left" v-model="formData.confirmFaultMoney" placeholder="请填写定损费"/>
|
||||
</view>
|
||||
<view class="infoItem" style="flex: 1">
|
||||
<text class="label">维修类型</text>
|
||||
<picker @change="repairTypeChange" :value="repairTypeIndex" :range="repairTypes" range-key="label" v-if="repairTypes">
|
||||
<view class="uni-input">{{ repairTypes[repairTypeIndex].label}}</view>
|
||||
</picker>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view style="display: flex;align-items: center">
|
||||
<view class="infoItem" style="flex: 1">
|
||||
<text class="label">旧件处置方式</text>
|
||||
<picker @change="partDisposalChange" :value="partDisposalIndex" :range="partDisposals" range-key="label" v-if="partDisposals">
|
||||
<view class="uni-input">{{ partDisposals[partDisposalIndex].label}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
|
||||
<view :class="{ 'none': !selectedProj || selectedProj.length === 0 }" class="card cardInfo projCard">
|
||||
<template v-if="!selectedProj || selectedProj.length === 0">
|
||||
<image class="cardNoneIcon" mode="widthFix" src="/pages-order/static/projectNone.png"></image>
|
||||
@ -188,6 +278,7 @@ import {getToken, setUserInfo, getUserInfo} from '@/utils/auth.js'
|
||||
import config from "@/config";
|
||||
import {formatTimestamp, formatTimestampCustom} from "@/utils/utils";
|
||||
import upload from "@/utils/upload";
|
||||
import {getDictByCode,formatDate} from "@/utils/utils";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -199,6 +290,7 @@ export default {
|
||||
//上传的图片数组
|
||||
fileList: [],
|
||||
sizeType:['compressed'],
|
||||
repairTypeShow:true,
|
||||
phone: '',
|
||||
carList: [],
|
||||
activeCarIndex: 0,
|
||||
@ -206,6 +298,23 @@ export default {
|
||||
selectedProj: [],
|
||||
typeList: [],
|
||||
ticketType: '01',
|
||||
repairTypes:[],
|
||||
repairTypeIndex:0,
|
||||
partDisposals:[],
|
||||
partDisposalIndex:0,
|
||||
formData:{
|
||||
inTime: null,
|
||||
outTime: null,
|
||||
mileageTraveled:null,
|
||||
threePackUnits:null,
|
||||
insuranceName:null,
|
||||
managerMoney:0.00,
|
||||
rescueMoney:0.00,
|
||||
threePackMoney:0.00,
|
||||
confirmFaultMoney:0.00,
|
||||
partDisposal:null,
|
||||
repairType:null,
|
||||
},
|
||||
options: [
|
||||
{label: 'A单', value: '01'},
|
||||
{label: 'B单', value: '02'}
|
||||
@ -215,11 +324,14 @@ export default {
|
||||
}
|
||||
},
|
||||
onLoad(data) {
|
||||
this.formData.inTime = formatDate(Date.now())
|
||||
this.formData.outTime = formatDate(Date.now())
|
||||
this.ticketNo = this.createUniqueCodeByHead('GD')
|
||||
if (data.phone) {
|
||||
this.phone = data.phone
|
||||
this.listUserInfo()
|
||||
}
|
||||
this.initDict()
|
||||
setTimeout(() => {
|
||||
if (data.carId) {
|
||||
for (let i = 0; i < this.carList.length; i++) {
|
||||
@ -240,6 +352,33 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 日期选择 事件
|
||||
bindDateChange1(e) {
|
||||
this.formData.inTime = e.target.value; // 更新选择的日期到data中的date变量
|
||||
},
|
||||
|
||||
// 日期选择 事件
|
||||
bindDateChange2(e) {
|
||||
this.formData.outTime = e.target.value; // 更新选择的日期到data中的date变量
|
||||
},
|
||||
|
||||
repairTypeChange(event){
|
||||
const newIndex = event.detail.value;
|
||||
this.repairTypeIndex = newIndex;
|
||||
this.formData.repairType = this.repairTypes[newIndex].value;
|
||||
},
|
||||
partDisposalChange(event){
|
||||
const newIndex = event.detail.value;
|
||||
this.partDisposalIndex = newIndex;
|
||||
this.formData.partDisposal = this.repairTypes[newIndex].value;
|
||||
},
|
||||
|
||||
|
||||
initDict(){
|
||||
this.repairTypes = getDictByCode('repair_type')
|
||||
this.partDisposals = getDictByCode('repair_part_disposal')
|
||||
},
|
||||
|
||||
afterRead(file) {
|
||||
for (let i = 0; i < file.tempFilePaths.length; i++) {
|
||||
upload({
|
||||
@ -302,7 +441,8 @@ export default {
|
||||
adviserName: getUserInfo().nickname,
|
||||
ticketType: this.ticketType,
|
||||
itemList: this.formatItem(this.selectedProj),
|
||||
fileStr:fileStr
|
||||
fileStr:fileStr,
|
||||
...this.formData,
|
||||
}
|
||||
uni.navigateTo({
|
||||
// url: '/pages-repair/signature/signature?data=' + JSON.stringify(data)
|
||||
|
Loading…
Reference in New Issue
Block a user