'退车'
This commit is contained in:
@@ -121,6 +121,39 @@ export function accidentBilling(data) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 事故接待-维修完成
|
||||
*/
|
||||
export function accidentFinishRepair(data) {
|
||||
return request({
|
||||
url: '/api/front/repair/accident/finishRepair',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 事故接待-交车
|
||||
*/
|
||||
export function deliveryCarAccident(data) {
|
||||
return request({
|
||||
url: '/api/front/repair/accident/deliveryCarAccident',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 事故接待-结算
|
||||
*/
|
||||
export function settlementAccident(data) {
|
||||
return request({
|
||||
url: '/api/front/repair/accident/settlementAccident',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取维修接待列表
|
||||
*/
|
||||
@@ -198,6 +231,17 @@ export function returnList(params) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取退车接待详情
|
||||
*/
|
||||
export function returnDetail(params) {
|
||||
return request({
|
||||
url: '/api/front/repair/return/detail',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 退车接待-创建并开单
|
||||
*/
|
||||
@@ -210,9 +254,31 @@ export function createAndPicUp(data) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 退车接待-创建并开单
|
||||
* 退车接待-接车
|
||||
*/
|
||||
export function noRepair(data) {
|
||||
export function returnPicup(data) {
|
||||
return request({
|
||||
url: '/api/front/repair/return/picup',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 退车接待-开单维修
|
||||
*/
|
||||
export function returnBilling(data) {
|
||||
return request({
|
||||
url: '/api/front/repair/return/billing',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 退车接待-开单不维修
|
||||
*/
|
||||
export function returnNoRepair(data) {
|
||||
return request({
|
||||
url: '/api/front/repair/return/noRepair',
|
||||
method: 'post',
|
||||
|
||||
@@ -102,4 +102,15 @@ export function merchantInfo() {
|
||||
'url': '/api/front/merchant/merchant/info',
|
||||
'method': 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车库
|
||||
*/
|
||||
export function garageList(params) {
|
||||
return request({
|
||||
'url': '/api/front/merchant/car/garage/list',
|
||||
'method': 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
<view class="" v-if="btnState == 'commonOrderType'">
|
||||
<view class="flex align-center justify-between">
|
||||
<text>维修类型</text>
|
||||
<text>{{showType(item.repairType)}}</text>
|
||||
<text>{{showType(item.repairType, 'typelist')}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between">
|
||||
<text>车辆型号</text>
|
||||
@@ -22,7 +22,7 @@
|
||||
<view class="" v-if="btnState == 'orderType'">
|
||||
<view class="flex align-center justify-between">
|
||||
<text>维修类型</text>
|
||||
<text>{{showType(item.repairType)}}</text>
|
||||
<text>{{showType(item.repairType, 'typelist')}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between" v-if="!(this.item.isArrived && !this.item.isBilled)">
|
||||
<text>维修项目</text>
|
||||
@@ -40,7 +40,7 @@
|
||||
<view class="" v-if="btnState == 'accientOrderType'">
|
||||
<view class="flex align-center justify-between">
|
||||
<text>维修类型</text>
|
||||
<text>{{showType(item.repairType)}}</text>
|
||||
<text>{{showType(item.repairType, 'typelist')}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between">
|
||||
<text>所属公司</text>
|
||||
@@ -48,30 +48,71 @@
|
||||
</view>
|
||||
<view class="flex align-center justify-between" v-if="item.isPickUp">
|
||||
<text>责任类型</text>
|
||||
<text>{{showDutyCategory(item.reservationStaff.dutyCategoryId)}}</text>
|
||||
<text>{{showType(item.reservationStaff.dutyCategoryId, 'dutyCategoryList')}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between" v-if="item.isPickUp">
|
||||
<view class="flex align-center justify-between" v-if="item.isPickUp && !(item.status == 2 && !item.isDelivery) && !(item.isDelivery && !item.isSettlement)">
|
||||
<text>保险公司</text>
|
||||
<text>{{showInsurance(item.reservationStaff.insuranceCompanyId)}}</text>
|
||||
<text>{{showType(item.reservationStaff.insuranceCompanyId, 'insuranceList')}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between" v-if="item.isPickUp">
|
||||
<view class="flex align-center justify-between" v-if="item.isPickUp && !(item.status == 2 && !item.isDelivery) && !(item.isDelivery && !item.isSettlement)">
|
||||
<text>进店日期</text>
|
||||
<text>{{item.arriveTime}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between" v-if="item.isPickUp">
|
||||
<view class="flex align-center justify-between" v-if="item.isPickUp && !(item.status == 2 && !item.isDelivery)">
|
||||
<text>定损金额</text>
|
||||
<text>{{item.reservationStaff.damagePrice}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between" v-if="item.isPickUp">
|
||||
<view class="flex align-center justify-between" v-if="item.status == 2 && !item.isDelivery && !(item.isDelivery && !item.isSettlement)">
|
||||
<text>完工日期</text>
|
||||
<text>{{item.repairOverTime}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between" v-if="item.isPickUp && !(item.isDelivery && !item.isSettlement)">
|
||||
<text>进厂天数</text>
|
||||
<text>{{ showDate(item.arriveTime).toFixed(0) + '天' }}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between" v-if="item.isPickUp&&(this.item.isDelivery && !this.item.isSettlement)">
|
||||
<text>理赔进度</text>
|
||||
<text>{{ showClaim(item.reservationStaff.claimProfress) }}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between" v-if="item.isPickUp && !(item.status == 2 && !item.isDelivery) && !(item.isDelivery && !item.isSettlement)">
|
||||
<text>到账金额</text>
|
||||
<text>{{item.arriveTime}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between" v-if="item.isPickUp && !(item.status == 2 && !item.isDelivery) && !(item.isDelivery && !item.isSettlement)">
|
||||
<text>到账时间</text>
|
||||
<text>{{item.reservationStaff.receiptTime}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between" v-if="!item.isPickUp">
|
||||
<text>预约时间</text>
|
||||
<text>{{item.workingDay + ' ' + item.workingTime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="" v-if="btnState == 'backOrderType'">
|
||||
<view class="flex align-center justify-between">
|
||||
<text>维修类型</text>
|
||||
<text>{{showType(item.repairType, 'typelist')}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between">
|
||||
<text>所属公司</text>
|
||||
<text>{{item.company}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between" v-if="!item.isPickUp">
|
||||
<text>预约时间</text>
|
||||
<text>{{item.workingDay + ' ' + item.workingTime}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between" v-if="item.isPickUp">
|
||||
<text>退车类型</text>
|
||||
<text>{{showType(item.reservationReturnInfo.returnCategory, 'returnList')}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between" v-if="item.isPickUp">
|
||||
<text>DP公司</text>
|
||||
<text>{{showType(item.reservationReturnInfo.dpCompanyId, 'dpCompanylist')}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between" v-if="item.isPickUp">
|
||||
<text>退车日期</text>
|
||||
<text>{{item.reservationReturnInfo.returnDate}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 预约接待按钮 -->
|
||||
<view class="btns flex justify-end" v-if="btnState=='commonOrderType'">
|
||||
@@ -101,7 +142,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 事故接待按钮 -->
|
||||
<view class="btns flex justify-end" v-if="btnState=='accientOrderType'">
|
||||
<view class="btns flex justify-end" v-if="btnState=='accientOrderType' && !(item.auditRepair == 2 || item.billAuditStatus == 2)">
|
||||
<view class="" v-if="!item.isPickUp" @click.stop="checkBtn(7)">
|
||||
<u-button :customStyle="{width: '160rpx',height: '56rpx', margin: 0, fontSize:'24rpx'}" shape="circle" color="#13AFA8">接车</u-button>
|
||||
</view>
|
||||
@@ -111,22 +152,33 @@
|
||||
<view class="" @click.stop="checkBtn(9)" v-if="item.isDamage && !item.isBilled">
|
||||
<u-button :customStyle="{width: '160rpx',height: '56rpx', margin: 0, fontSize:'24rpx'}" shape="circle" color="#13AFA8">开单</u-button>
|
||||
</view>
|
||||
<view class="" @click="checkBtn(10)" v-if="item.status == 1">
|
||||
<view class="" @click.stop="checkBtn(10)" v-if="item.status == 1">
|
||||
<u-button :customStyle="{width: '160rpx',height: '56rpx', margin: 0, fontSize:'24rpx'}" shape="circle" color="#13AFA8">结束维修</u-button>
|
||||
</view>
|
||||
<view class="" @click="checkBtn(11)" v-if="item.status == 2 && !item.isDelivery">
|
||||
<u-button :customStyle="{width: '160rpx',height: '56rpx', margin: 0, fontSize:'24rpx'}" shape="circle">提车</u-button>
|
||||
<view class="" @click.stop="checkBtn(11)" v-if="item.status == 2 && !item.isDelivery">
|
||||
<u-button :customStyle="{width: '160rpx',height: '56rpx', margin: 0, fontSize:'24rpx'}" shape="circle" color="#13AFA8">提车</u-button>
|
||||
</view>
|
||||
<view class="" @click="checkBtn(11)" v-if="item.isDelivery && !item.isSettlement">
|
||||
<u-button :customStyle="{width: '160rpx',height: '56rpx', margin: 0, fontSize:'24rpx'}" shape="circle">结算</u-button>
|
||||
<view class="" @click.stop="checkBtn(12)" v-if="item.isDelivery && !item.isSettlement">
|
||||
<u-button :customStyle="{width: '160rpx',height: '56rpx', margin: 0, fontSize:'24rpx'}" shape="circle" color="#13AFA8">结算</u-button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 退车接待按钮 -->
|
||||
<view class="btns flex justify-end" v-if="btnState=='backOrderType'">
|
||||
<u-button :customStyle="{width: '160rpx',height: '56rpx', margin: 0, fontSize:'24rpx'}" shape="circle" @click="toStore">接车</u-button>
|
||||
<u-button :customStyle="{width: '160rpx',height: '56rpx', margin: 0, fontSize:'24rpx'}" shape="circle" @click="toStore">维修完成</u-button>
|
||||
<u-button :customStyle="{width: '160rpx',height: '56rpx', margin: 0, fontSize:'24rpx'}" shape="circle" @click="toStore">提车</u-button>
|
||||
<u-button :customStyle="{width: '160rpx',height: '56rpx', margin: 0, fontSize:'24rpx'}" shape="circle" @click="toStore">结算</u-button>
|
||||
<view class="btns flex justify-end" v-if="btnState=='backOrderType'&&!(((item.auditRepair == 0 && item.billAuditStatus == 1) || item.billAuditStatus == 0)&&item.isBilled&&(item.status == 0 || item.status == 3))">
|
||||
<view class="" @click.stop="checkBtn(13)" v-if="!item.isPickUp">
|
||||
<u-button :customStyle="{width: '160rpx',height: '56rpx', margin: 0, fontSize:'24rpx'}" shape="circle" color="#13AFA8">接车</u-button>
|
||||
</view>
|
||||
<view class="" @click.stop="checkBtn(14)" v-if="item.isPickUp && !item.isBilled">
|
||||
<u-button :customStyle="{width: '160rpx',height: '56rpx', margin: 0, fontSize:'24rpx'}" shape="circle" color="#13AFA8">开单</u-button>
|
||||
</view>
|
||||
<view class="" @click.stop="checkBtn(15)" v-if="item.status == 1">
|
||||
<u-button :customStyle="{width: '160rpx',height: '56rpx', margin: 0, fontSize:'24rpx'}" shape="circle" color="#13AFA8">维修完成</u-button>
|
||||
</view>
|
||||
<view class="" @click.stop="checkBtn(16)" v-if="item.status == 2 && !item.isDelivery">
|
||||
<u-button :customStyle="{width: '160rpx',height: '56rpx', margin: 0, fontSize:'24rpx'}" shape="circle" color="#13AFA8">提车</u-button>
|
||||
</view>
|
||||
<view class="" @click.stop="checkBtn(17)" v-if="item.isDelivery && !item.isSettlement">
|
||||
<u-button :customStyle="{width: '160rpx',height: '56rpx', margin: 0, fontSize:'24rpx'}" shape="circle" color="#13AFA8">结算</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -134,7 +186,7 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { typelist } from '@/data/typeData'
|
||||
import { typelist, returnList } from '@/data/typeData'
|
||||
export default {
|
||||
name:"billing-item",
|
||||
props: {
|
||||
@@ -144,6 +196,12 @@
|
||||
return {}
|
||||
}
|
||||
},
|
||||
dpCompanylist: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
insuranceList: {
|
||||
type: Array,
|
||||
default() {
|
||||
@@ -164,6 +222,7 @@
|
||||
return {
|
||||
show: false,
|
||||
typelist,
|
||||
returnList,
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
@@ -173,6 +232,12 @@
|
||||
console.log('详情', this.item);
|
||||
},
|
||||
methods: {
|
||||
showClaim(e) {
|
||||
if(this.item.isSettlement) return "已打款"
|
||||
if(e == 1) return '待盖章'
|
||||
if(e == 2) return '已提交'
|
||||
if(e == 3) return '待打款'
|
||||
},
|
||||
showDate(e) {
|
||||
if(e) return (new Date() - new Date(e)) / 3600 / 24 / 1000
|
||||
else return 0
|
||||
@@ -183,22 +248,25 @@
|
||||
showInsurance(e) {
|
||||
if(this.insuranceList.filter(i => i.id == e).length) return this.insuranceList.filter(i => i.id == e)[0].name
|
||||
},
|
||||
showType(e) {
|
||||
return this.typelist.filter(i => i.type == e)[0].text
|
||||
showType(e, str) {
|
||||
return this[str].filter(i => i.type == e)[0].text
|
||||
},
|
||||
showStatus(e) {
|
||||
if(this.item.auditStatus == 0) return '待确认'
|
||||
if(this.item.auditStatus == 0 || (this.item.isPickUp && !this.item.isBilled && this.btnState == 'backOrderType')) return '待确认'
|
||||
if(this.item.auditStatus == 1 && this.item.isArrived == 0) return "确认未到店"
|
||||
if(this.item.auditStatus == 2) return "已驳回"
|
||||
if(this.item.isArrived && !this.item.isBilled && this.btnState == "orderType") return "未处理"
|
||||
if(this.item.auditRepair == 2 || this.item.billAuditStatus == 2 && this.btnState == "orderType") return "已拒绝"
|
||||
if(this.item.auditRepair == 1 && this.item.billAuditStatus == 0 && this.btnState == "orderType") return "平台审核中"
|
||||
if(this.item.auditRepair == 0 && this.item.billAuditStatus == 1 && this.btnState == "orderType") return "公司审核中"
|
||||
if(this.item.auditRepair == 0 && this.item.billAuditStatus == 0 && this.btnState == "orderType") return "平台/公司审核中"
|
||||
if(this.item.status == 1 && this.btnState == "orderType") return "维修中"
|
||||
if(this.item.status == 2 && this.btnState == "orderType") return "已完成"
|
||||
if(this.item.auditRepair == 2 || this.item.billAuditStatus == 2) return "已拒绝"
|
||||
if(!this.item.isPickUp) return "待接车"
|
||||
if(this.item.auditRepair == 0 && this.item.billAuditStatus == 1) return "公司审核中"
|
||||
if(this.item.billAuditStatus == 0) return "平台审核中"
|
||||
if(this.item.status == 1) return "维修中"
|
||||
if(this.item.status == 2 && this.btnState == "orderType") return "已完成"
|
||||
if(this.item.isPickUp && !this.item.isDamage) return "待定损"
|
||||
if(this.item.isDamage && !this.item.isBilled) return "待开单"
|
||||
if(this.item.isBilled && !this.item.isDelivery) return "待交车"
|
||||
if(this.item.isDelivery && !this.item.isSettlement) return "未到账"
|
||||
if(this.item.isSettlement) return "已到账"
|
||||
},
|
||||
checkBtn(e) {
|
||||
this.$emit('checkBtn', {btnType: e, item: this.item})
|
||||
|
||||
@@ -78,4 +78,32 @@ export const appearanceList = [{
|
||||
text: '破损',
|
||||
type: 3,
|
||||
from: true
|
||||
}]
|
||||
}]
|
||||
|
||||
export const claimProfressList = [{
|
||||
text: '待盖章',
|
||||
type: 1,
|
||||
from: true
|
||||
},{
|
||||
text: '已提交',
|
||||
type: 2,
|
||||
from: true
|
||||
},{
|
||||
text: '待打款',
|
||||
type: 3,
|
||||
from: true
|
||||
}]
|
||||
|
||||
export const claimTypeList = [{
|
||||
text: '未到账',
|
||||
type: 1,
|
||||
from: true
|
||||
},{
|
||||
text: '部分到账',
|
||||
type: 2,
|
||||
from: true
|
||||
},{
|
||||
text: '已到账',
|
||||
type: 3,
|
||||
from: true
|
||||
}]
|
||||
20
pages.json
20
pages.json
@@ -162,6 +162,19 @@
|
||||
"enablePullDownRefresh" : false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/repair/repair/accident/handover",
|
||||
"style": {
|
||||
"navigationBarTitleText": "交车",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}, {
|
||||
"path": "pages/repair/repair/reverse/accidentBilling",
|
||||
"style": {
|
||||
"navigationBarTitleText": "交车",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/repair/repair/accident/specifiedDamage",
|
||||
"style": {
|
||||
@@ -176,6 +189,13 @@
|
||||
"enablePullDownRefresh" : false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/repair/repair/accident/selectGarage",
|
||||
"style": {
|
||||
"navigationBarTitleText" : "车库",
|
||||
"enablePullDownRefresh" : false,
|
||||
"navigationBarBackgroundColor": "#F5F5F5"
|
||||
}
|
||||
}, {
|
||||
"path" : "pages/repair/repair/reverse/createOrder",
|
||||
"style": {
|
||||
|
||||
@@ -139,6 +139,7 @@
|
||||
},
|
||||
onLoad(option) {
|
||||
this.form.carReservationOrderId = option.id
|
||||
this.$store.dispatch('SetForm', {key: 'repairTypeName', value: '事故维修'})
|
||||
},
|
||||
methods: {
|
||||
showNum(a) {
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
<script>
|
||||
import { parseTime } from '@/utils/index'
|
||||
import { typelist, settlementList } from '@/data/typeData'
|
||||
import { typelist, claimTypeList } from '@/data/typeData'
|
||||
import { getCarInfo, createAccident, detailAccident, accidentPicup } from '@/api/repair/repair';
|
||||
import { dutyCategory, insuranceList, dpCompanylist } from '@/api/system/config'
|
||||
import cellList from '@/components/cell-list/cell-list';
|
||||
|
||||
355
pages/repair/repair/accident/handover.vue
Normal file
355
pages/repair/repair/accident/handover.vue
Normal file
@@ -0,0 +1,355 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<u-form label-width="80" :model="form" ref="uForm" :rules="rules">
|
||||
<u-form-item label="车牌号码" class="forms-item" prop="carNo">
|
||||
<u-input v-model="detail.carNo" disabled disabledColor="#fff" border="none" class="image-box-b" input-align="right"></u-input>
|
||||
</u-form-item>
|
||||
<view class="bg-white mt-3 pb-3 primary-radius">
|
||||
<u-form-item border-bottom label="维修类型" class="forms-item" prop="dutyCategoryId">
|
||||
<view class="select-box flex align-center justify-end">
|
||||
<text class="checked">事故维修</text>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item border-bottom label="所属公司" class="forms-item">
|
||||
<view class="select-box flex align-center justify-end">
|
||||
<text class="checked">{{detail.company}}</text>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item border-bottom label="责任类型" class="forms-item" prop="dutyCategoryId">
|
||||
<view class="select-box flex align-center justify-end">
|
||||
<text class="checked">{{detail.staff&&detail.staff.dutyCategoryName}}</text>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item border-bottom label="定损金额" class="forms-item" prop="damagePrice">
|
||||
<view style="width: 100%;" class="text-right" v-if="disabled || title == '结算'">¥{{form.damagePrice}}</view>
|
||||
<u-input v-else border="none" :disabled="disabled" disabledColor="#ffffff" v-model="form.damagePrice" placeholder="请输入" input-align="right"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item border-bottom label="理赔进度" @click="openType('claimProfressList')" class="forms-item" prop="claimProfress" v-if="title == '结算'&& !disabled">
|
||||
<view class="select-box flex align-center justify-end">
|
||||
<text v-if="form.claimProfress" class="checked">{{showDp(form.claimProfress, 'claimProfressList')}}</text>
|
||||
<text v-else class="nochecked">请选择</text>
|
||||
<image src="@/static/images/icon/arrow-right.png" mode=""></image>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item border-bottom label="理赔情况" @click="openType('claimTypeList')" class="forms-item" prop="claimType" v-if="title == '结算'&& !disabled">
|
||||
<view class="select-box flex align-center justify-end">
|
||||
<text v-if="form.claimType" class="checked">{{showDp(form.claimType, 'claimTypeList')}}</text>
|
||||
<text v-else class="nochecked">请选择</text>
|
||||
<image src="@/static/images/icon/arrow-right.png" mode=""></image>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item border-bottom label="到账金额" class="forms-item" prop="receiptMoney" v-if="title == '结算'&& !disabled">
|
||||
<u-input border="none" :disabled="disabled" disabledColor="#ffffff" v-model="form.receiptMoney" placeholder="请输入" input-align="right">
|
||||
<text slot="suffix">元</text>
|
||||
</u-input>
|
||||
</u-form-item>
|
||||
<u-form-item border-bottom label="到账日期" @click="openDate()" class="forms-item" prop="receiptTime" v-if="title == '结算'&& !disabled">
|
||||
<u-input disabled disabledColor="#fff" border="none" v-model="form.receiptTime" placeholder="请选择到账日期" input-align="right">
|
||||
<template slot="suffix">
|
||||
<image style="width: 8rpx;height: 16rpx;" src="@/static/images/icon/arrow-right.png" mode=""></image>
|
||||
</template>
|
||||
</u-input>
|
||||
</u-form-item>
|
||||
<u-form-item border-bottom label="绝对免赔" class="forms-item" prop="deductiblePrice" v-if="title == '交车'">
|
||||
<u-input border="none" :disabled="disabled" disabledColor="#ffffff" v-model="form.deductiblePrice" placeholder="请输入" input-align="right"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item border-bottom label="保险上浮费" class="forms-item" prop="upwardPrice" v-if="title == '交车'">
|
||||
<u-input border="none" :disabled="disabled" disabledColor="#ffffff" v-model="form.upwardPrice" placeholder="请输入" input-align="right"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item border-bottom label="备注" class="forms-item" prop="remark" v-if="title == '交车'">
|
||||
<u-input border="none" :disabled="disabled" disabledColor="#ffffff" v-model="form.remark" placeholder="请输入" input-align="right"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item border-bottom label="备注" class="forms-item" prop="settlementRemark" v-if="title == '结算'&& !disabled">
|
||||
<u-input border="none" :disabled="disabled" disabledColor="#ffffff" v-model="form.settlementRemark" placeholder="请输入" input-align="right"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item v-if="title=='交车'">
|
||||
<view class="form-item">
|
||||
<view class="f-32 fw-5 c444">
|
||||
<text class="px-24">{{disabled? '付款截图' : '上传付款截图'}}</text>
|
||||
<view class="image-box flex-wrap align-center">
|
||||
<view class="image-box-b rel" :style="index%3 == 0 && 'marginLeft: 0' " v-for="(item,index) in payImage" :key="index">
|
||||
<image class="upload-bg" :src="item" mode=""></image>
|
||||
<image v-if="!disabled" class="reduce abs" src="@/static/images/icon/reduce.png" mode="" @click="DelPic(index, 'payImage')"></image>
|
||||
</view>
|
||||
<image v-if="!disabled" :style="payImage.length%3 == 2 && 'marginLeft: 0' " class="upload-bg" src="@/static/images/icon/plus_box.png" mode="" @click="getImage('payImage')"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="bg-white mt-3 pb-3 primary-radius" v-if="title == '结算'&& disabled">
|
||||
<u-form-item border-bottom label="理赔进度" class="forms-item">
|
||||
<view class="select-box flex align-center justify-end">
|
||||
<text class="checked">{{showDp(form.claimProfress, 'claimProfressList')}}</text>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item border-bottom label="理赔情况" class="forms-item">
|
||||
<view class="select-box flex align-center justify-end">
|
||||
<text class="checked">{{showDp(form.claimType, 'claimTypeList')}}</text>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item border-bottom label="到账金额" class="forms-item">
|
||||
<view class="select-box flex align-center justify-end">
|
||||
<text class="checked">{{form.receiptMoney}}</text>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item border-bottom label="到账时间" class="forms-item">
|
||||
<view class="select-box flex align-center justify-end">
|
||||
<text class="checked">{{form.receiptTime}}</text>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item border-bottom label="备注" class="forms-item">
|
||||
<view class="select-box flex align-center justify-end">
|
||||
<text class="checked">{{form.settlementRemark}}</text>
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
</u-form>
|
||||
<view class="btns fixed-bottom" v-if="!disabled">
|
||||
<u-button v-if="title == '交车'" color="#13AFA8" shape="circle" @click="submit">提交</u-button>
|
||||
<u-button v-if="title == '结算'" color="#13AFA8" shape="circle" @click="submit">保存</u-button>
|
||||
</view>
|
||||
<u-datetime-picker title="到账时间" @confirm="dateConfirm" :show="timeShow" :formatter="formatter" v-model="createTime" mode="datetime"></u-datetime-picker>
|
||||
<cell-list ref="cellList" :title="titles" @confirm="checkItem" :list="selectList"></cell-list>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { parseTime } from '@/utils/index'
|
||||
import { getCarInfo, detailAccident, deliveryCarAccident, settlementAccident } from '@/api/repair/repair';
|
||||
import { dutyCategory, insuranceList, dpCompanylist } from '@/api/system/config'
|
||||
import { claimProfressList, claimTypeList } from '@/data/typeData'
|
||||
import cellList from '@/components/cell-list/cell-list';
|
||||
export default {
|
||||
components: {cellList},
|
||||
data() {
|
||||
return {
|
||||
disabled: false,
|
||||
timeShow: false,
|
||||
selectType: '',
|
||||
title: '',
|
||||
titles: '',
|
||||
createTime: new Date() * 1,
|
||||
detail: {},
|
||||
form: {
|
||||
carReservationOrderId: '', // 对应工单主键id
|
||||
damagePrice: '', // 定损金额
|
||||
deductiblePrice: '', // 绝对免赔
|
||||
payImage: '', // 付款图片
|
||||
remark: '', // 结算备注
|
||||
upwardPrice: '', // 保险上浮
|
||||
receiptMoney: '', // 到账金额
|
||||
claimProfress: '', // 理赔进度1=待盖章2=已提交3=带打款
|
||||
claimType: '', // 理赔情况1=未到账2=部分到账3=已到账
|
||||
receiptTime: '', // 到账时间
|
||||
settlementRemark: '' // 结算备注
|
||||
},
|
||||
rules: {
|
||||
damagePrice: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写定损金额',
|
||||
trigger: ['blur']
|
||||
},
|
||||
deductiblePrice: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写绝对免赔',
|
||||
trigger: ['blur']
|
||||
},
|
||||
receiptMoney: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写到账金额',
|
||||
trigger: ['blur']
|
||||
},
|
||||
upwardPrice: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写保险上浮费',
|
||||
trigger: ['blur']
|
||||
},
|
||||
},
|
||||
payImage: [],
|
||||
selectList: [],
|
||||
claimProfressList,
|
||||
claimTypeList
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
this.title = option.title
|
||||
uni.setNavigationBarTitle({
|
||||
title: option.title
|
||||
})
|
||||
this.getDetailAccident(option.id)
|
||||
},
|
||||
methods: {
|
||||
formatter(type, value) {
|
||||
if (type === 'year') {
|
||||
return `${value}年`
|
||||
}
|
||||
if (type === 'month') {
|
||||
return `${value}月`
|
||||
}
|
||||
if (type === 'day') {
|
||||
return `${value}日`
|
||||
}
|
||||
if (type === 'hour') {
|
||||
return `${value}时`
|
||||
}
|
||||
if (type === 'minute') {
|
||||
return `${value}分`
|
||||
}
|
||||
return value
|
||||
},
|
||||
dateConfirm(e) {
|
||||
console.log(e);
|
||||
this.form.receiptTime = parseTime(e.value, '{y}-{m}-{d} {h}:{i}:{s}')
|
||||
this.timeShow = false
|
||||
},
|
||||
openDate() {
|
||||
this.timeShow = true
|
||||
},
|
||||
showDp(id, str){
|
||||
console.log(id, str);
|
||||
if(this[str].filter(i => i.type == id).length) {
|
||||
return this[str].filter(i => i.type == id)[0].text
|
||||
} else {
|
||||
return '该dp公司已不存在'
|
||||
}
|
||||
},
|
||||
// 打开工单
|
||||
openType(str) {
|
||||
this.$refs.cellList.detail = {}
|
||||
this.selectType = str
|
||||
this.selectList = this[str]
|
||||
if(str == 'claimProfressList') this.titles = '理赔进度'
|
||||
if(str == 'claimTypeList') this.titles = '理赔情况'
|
||||
console.log(this.selectList, str);
|
||||
this.$refs.cellList.show = true
|
||||
},
|
||||
// 选中维修类型
|
||||
checkItem(item) {
|
||||
console.log(item);
|
||||
if(this.selectType == 'claimProfressList') {
|
||||
this.form.claimProfress = item.type
|
||||
} else if (this.selectType == 'claimTypeList') {
|
||||
this.form.claimType = item.type
|
||||
}
|
||||
},
|
||||
// 获取事故工单详情
|
||||
getDetailAccident(id) {
|
||||
detailAccident({id}).then(res => {
|
||||
console.log(res.data);
|
||||
this.detail =res.data
|
||||
this.form.carReservationOrderId = res.data.id
|
||||
this.form.damagePrice = res.data.staff.damagePrice
|
||||
this.carConfirm()
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
this.$refs.uForm.validate().then(res => {
|
||||
if(this.title == '交车') {
|
||||
if(this.payImage.length==1) this.form.payImage = res.data
|
||||
else this.form.payImage = this.payImage.join(',')
|
||||
deliveryCarAccident(this.form).then(res => {
|
||||
this.disabled = true
|
||||
})
|
||||
}
|
||||
if(this.title == '结算') {
|
||||
console.log(this.form);
|
||||
settlementAccident(this.form).then(res => {
|
||||
this.disabled = true
|
||||
})
|
||||
}
|
||||
}).catch(errors => {
|
||||
uni.$u.toast('请补齐信息')
|
||||
})
|
||||
},
|
||||
// 点击确认
|
||||
carConfirm() {
|
||||
getCarInfo({carNo: this.detail.carNo}).then(res => {
|
||||
console.log(res);
|
||||
if(res.data) {
|
||||
this.detail.company = res.data.company
|
||||
}
|
||||
else this.$u.toast('车辆信息不存在')
|
||||
}).finally(() => {
|
||||
this.carShow = false
|
||||
this.$store.dispatch('SetForm', {key: 'carNo', value: this.form.carNo})
|
||||
})
|
||||
},
|
||||
//传图片
|
||||
getImage(str) {
|
||||
this.$util.uploadImageOne({
|
||||
count: 9,
|
||||
sizeType: ['original'],
|
||||
sourceType:['album', 'camera'],
|
||||
dir:'crmebimage/public/product/'
|
||||
},null,res=>{
|
||||
console.log(res);
|
||||
this[str].push(res.data)
|
||||
uni.hideLoading();
|
||||
});
|
||||
},
|
||||
DelPic(index, str) {
|
||||
this[str].splice(index, 1)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page {
|
||||
padding: 24rpx;
|
||||
padding-bottom: 180rpx;
|
||||
min-height: 100vh;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.forms-item {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 8rpx;
|
||||
.right-icon {
|
||||
width: 8rpx;
|
||||
height: 16rpx;
|
||||
}
|
||||
}
|
||||
.image-box {
|
||||
margin-top: 32rpx;
|
||||
.upload-bg {
|
||||
margin-left: 24rpx;
|
||||
width: 202rpx;
|
||||
height: 202rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
.reduce {
|
||||
top: -20rpx;
|
||||
right: -20rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
.px-24 {
|
||||
padding: 0 24rpx;
|
||||
}
|
||||
.btns {
|
||||
padding: 16rpx 24rpx 68rpx 24rpx;
|
||||
width: 750rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
.select-box {
|
||||
width: 100%;
|
||||
font-size: 32rpx;
|
||||
.checked {
|
||||
}
|
||||
.nochecked {
|
||||
color: #bbbbbb
|
||||
}
|
||||
image {
|
||||
margin-left: 8rpx;
|
||||
width: 8rpx;
|
||||
height: 16rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
58
pages/repair/repair/accident/selectGarage.vue
Normal file
58
pages/repair/repair/accident/selectGarage.vue
Normal file
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<view>
|
||||
<z-paging ref="paging" height="100%" :fixed ="false" v-model="dataList" @query="queryList" safe-area-inset-bottom :use-page-scroll="true">
|
||||
<view class="list flex-wrap justify-between align-center">
|
||||
<view class="item mb-3 text-center" :class="item.id == checkItem.id && 'checked'" v-for="(item,index) in dataList" :key="item.id" @click="checkItem = item">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<u-button color="#13AFA8" shape="circle" @click="submit">确认</u-button>
|
||||
</view>
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { garageList } from '@/api/system/config';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataList: [],
|
||||
checkItem: {}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
queryList(pageNo, pageSize) {
|
||||
garageList({limit: pageSize, page: pageNo}).then(res => {
|
||||
console.log(res);
|
||||
this.$refs.paging.complete(res.data.list);
|
||||
}).catch(err => {
|
||||
this.$refs.paging.complete(false);
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
this.$store.dispatch('SetGarage', this.checkItem)
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.list {
|
||||
padding: 32rpx 24rpx;
|
||||
.item {
|
||||
border-radius: 8rpx;
|
||||
width: 339rpx;
|
||||
line-height: 72rpx;
|
||||
background-color: #f5f5f5;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
.checked {
|
||||
background-color: #13AFA8;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2,9 +2,19 @@
|
||||
<view>
|
||||
<u-popup :show="show" :round="16" @close="show=false">
|
||||
<view class="popup-box rel">
|
||||
<view class="close abs">
|
||||
<view class="close abs" @click="show = false">
|
||||
<image src="@/static/images/icon/x_4.png" mode=""></image>
|
||||
</view>
|
||||
<view class="garage-select flex align-center justify-between" v-if="dataItem.btnType == 10">
|
||||
<view class="f-32 c111">
|
||||
车库
|
||||
</view>
|
||||
<view class="flex align-center" @click="$tab.navigateTo('/pages/repair/repair/accident/selectGarage')">
|
||||
<text class="c111 f-28" v-if="garage.name">{{garage.name}}</text>
|
||||
<text class="c999 f-28" v-else>请选择车辆停放车库</text>
|
||||
<image src="@/static/images/icon/arrow-right.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="title flex align-center f-32 c111">
|
||||
上传维修完成照片
|
||||
<text class="f-24 c999">(选填)</text>
|
||||
@@ -25,9 +35,17 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name:"repairCompleted",
|
||||
created() {
|
||||
computed: {...mapGetters(['garage'])},
|
||||
props: {
|
||||
dataItem: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -55,7 +73,6 @@
|
||||
this.imageList.splice(key, 1)
|
||||
},
|
||||
confirm() {
|
||||
this.show = false
|
||||
this.$emit('confirm', this.imageList.join(','))
|
||||
}
|
||||
}
|
||||
@@ -76,6 +93,17 @@
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.garage-select {
|
||||
margin-bottom: 64rpx;
|
||||
padding: 24rpx;
|
||||
border-radius: 8rpx;
|
||||
background-color: #f5f5f5;
|
||||
image {
|
||||
margin-left: 8rpx;
|
||||
width: 10rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
}
|
||||
.content {
|
||||
padding: 32rpx 0 64rpx 0;
|
||||
.image-box {
|
||||
|
||||
@@ -58,12 +58,15 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-if="btnState == 'orderType'&&detail!={}">
|
||||
<view class="" v-if="(btnState == 'orderType' || btnState == 'accientOrderType')&&detail!={}">
|
||||
<view class="car-info bg-white">
|
||||
<view class="car-info-item flex align-center justify-between">
|
||||
<view class="f-38 fw-b c000"> {{detail.carNo}} </view>
|
||||
<view class="red f-28"> {{ showStatus() }} </view>
|
||||
</view>
|
||||
<view class="car-finish mt-2 flex-wrap align-center" v-if="detail.status == 2 && detail.repairFinishImage">
|
||||
<image :style="index%3==0&&'margin-left: 0;'" class="car-finish-image" :src="item" mode="" v-for="(item,index) in detail.repairFinishImage.split(',')" :key="index"></image>
|
||||
</view>
|
||||
<view class="car-info-item flex align-center justify-between mt-2 f-28" v-if="this.detail.isArrived && !this.detail.isBilled">
|
||||
<view class="c666"> 维修类型 </view>
|
||||
<view class="c111"> {{showType(detail.repairType)}} </view>
|
||||
@@ -142,6 +145,10 @@
|
||||
<view class="c666"> 司机名称 </view>
|
||||
<view class="c111"> {{detail.phone}} </view>
|
||||
</view>
|
||||
<view class="car-info-item flex align-center justify-between f-28" v-if="btnState == 'accientOrderType'">
|
||||
<view class="c666"> 结算方式 </view>
|
||||
<view class="c111"> {{showDp(detail.staff&&detail.staff.settlementMethod, 'settlementList')}} </view>
|
||||
</view>
|
||||
<view class="load-more abs flex align-center justify-center" @click="carInfoLoadMore = !carInfoLoadMore">
|
||||
{{carInfoLoadMore ? '更多' : '收起'}}
|
||||
<image v-show="carInfoLoadMore" src="@/static/images/icon/arrow-down.png" mode=""></image>
|
||||
@@ -151,7 +158,7 @@
|
||||
<view class="f-32 c111 mt-2 mb-2" v-if="!(this.detail.isArrived && !this.detail.isBilled)">
|
||||
接单信息
|
||||
</view>
|
||||
<view class="car-info car-info-bottom bg-white rel" :class="orderInfoLoadMore&&'active-car-info'" v-if="!(this.detail.isArrived && !this.detail.isBilled)">
|
||||
<view class="car-info car-info-bottom bg-white rel" :class="orderInfoLoadMore&&'active-car-info'" v-if="!(this.detail.isArrived && !this.detail.isBilled)&&btnState == 'orderType'">
|
||||
<view class="car-info-item flex align-center justify-between f-28">
|
||||
<view class="c666"> 工单号 </view>
|
||||
<view class="c111"> {{detail.orderSn}} </view>
|
||||
@@ -204,6 +211,47 @@
|
||||
<image v-show="!orderInfoLoadMore" src="@/static/images/icon/arrow-up.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="car-info car-info-bottom bg-white rel" :class="orderInfoLoadMore&&'active-car-info'" v-if="!(this.detail.isArrived && !this.detail.isBilled)&&btnState == 'accientOrderType'">
|
||||
<view class="car-info-item flex align-center justify-between f-28">
|
||||
<view class="c666"> 工单号 </view>
|
||||
<view class="c111"> {{detail.orderSn}} </view>
|
||||
</view>
|
||||
<view class="car-info-item flex align-center justify-between f-28">
|
||||
<view class="c666"> 责任类型 </view>
|
||||
<view class="c111"> {{detail.staff&&detail.staff.dutyCategoryName}} </view>
|
||||
</view>
|
||||
<view class="car-info-item flex align-center justify-between f-28">
|
||||
<view class="c666"> 保险公司 </view>
|
||||
<view class="c111"> {{detail.staff&&detail.staff.insuranceCompanyName}} </view>
|
||||
</view>
|
||||
<view class="car-info-item flex align-center justify-between f-28">
|
||||
<view class="c666"> 事故日期 </view>
|
||||
<view class="c111"> {{detail.staff&&detail.staff.accidentDate}} </view>
|
||||
</view>
|
||||
<view class="car-info-item flex align-center justify-between f-28">
|
||||
<view class="c666"> 全责方信息 </view>
|
||||
<view class="c111"> {{detail.staff&&detail.staff.responsibleInfo}} </view>
|
||||
</view>
|
||||
<view class="car-info-item flex align-center justify-between f-28">
|
||||
<view class="c666"> 拖车费 </view>
|
||||
<view class="c111"> {{detail.staff&&detail.staff.truckingPrice}} </view>
|
||||
</view>
|
||||
<view class="car-info-item flex align-center justify-between f-28">
|
||||
<view class="c666"> 备注信息 </view>
|
||||
<view class="c111"> {{detail.repairDescribe}} </view>
|
||||
</view>
|
||||
<view class="car-info-item flex justify-between f-28">
|
||||
<view class="c666"> 事故照片 </view>
|
||||
<view class="c111 flex-wrap align-center justify-end">
|
||||
<image class="image" :src="item" mode="" v-for="(item,index) in detail.staff&&detail.staff.accidentImage.split()" :key="index"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="load-more abs flex align-center justify-center" @click="orderInfoLoadMore = !orderInfoLoadMore">
|
||||
{{orderInfoLoadMore ? '更多' : '收起'}}
|
||||
<image v-show="orderInfoLoadMore" src="@/static/images/icon/arrow-down.png" mode=""></image>
|
||||
<image v-show="!orderInfoLoadMore" src="@/static/images/icon/arrow-up.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="f-32 c111 mt-2 mb-2" v-if="!(this.detail.isArrived && !this.detail.isBilled)">
|
||||
维修项目
|
||||
</view>
|
||||
@@ -269,18 +317,19 @@
|
||||
<text>{{ showNum(detail.reservationInfo&&detail.reservationInfo.totalPrice) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="car-info bg-white mt-2" v-if="!(this.detail.isArrived && !this.detail.isBilled)">
|
||||
<view class="car-info bg-white mt-2" v-if="!(this.detail.isArrived && !this.detail.isBilled)&&btnState == 'orderType'">
|
||||
<view class="f-28 c111">
|
||||
{{detail.repairDescribe}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-box fixed-bottom flex align-center justify-between" :class="detail.status == 1 && 'btn-bg'">
|
||||
<view class="btn-box fixed-bottom flex align-center justify-between" :class="(detail.status == 1 || (detail.status == 2 && !isDelivery && btnState == 'accientOrderType')) && 'btn-bg'">
|
||||
<u-button v-if="detail.auditStatus==0" shape="circle" :customStyle="{background: '#f5f5f5', border: '1rpx solid #000'}" @click="checkBtn(2)">驳回</u-button>
|
||||
<u-button v-if="detail.auditStatus==0" class="ml-2" color="#13AFA8" shape="circle" @click="checkBtn(1)">同意</u-button>
|
||||
<u-button v-if="detail.isArrived == 0 && detail.auditStatus == 1" color="#13AFA8" shape="circle" @click="checkBtn(3)">到店</u-button>
|
||||
<u-button v-if="detail.isArrived && !detail.isBilled" color="#13AFA8" shape="circle" @click="checkBtn(4)">开单</u-button>
|
||||
<u-button v-if="detail.status == 1" color="#13AFA8" shape="circle" @click="checkBtn(5)">维修完成</u-button>
|
||||
<u-button v-if="detail.status == 2 && !isDelivery && btnState == 'accientOrderType'" color="#13AFA8" shape="circle" @click="checkBtn(11)">交车</u-button>
|
||||
</view>
|
||||
<prompt-box @confirm="confirm" ref="prompt" />
|
||||
<repair-completed ref="repairCompleted" @confirm="repairConfirm" />
|
||||
@@ -303,7 +352,7 @@
|
||||
import repairCompleted from './components/repairCompleted'
|
||||
import { reservationInfo, maintenanceInfo, auditCheck, arrive, detailAccident } from '@/api/repair/repair'
|
||||
import { convertNumberToChinese } from '@/utils/index'
|
||||
import { typelist } from '@/data/typeData'
|
||||
import { typelist, settlementList } from '@/data/typeData'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
components: { billindItem, promptBox, repairCompleted },
|
||||
@@ -317,11 +366,12 @@
|
||||
videoImage: '',
|
||||
detail: {},
|
||||
typelist,
|
||||
settlementList,
|
||||
};
|
||||
},
|
||||
computed: {...mapGetters(['btnState'])},
|
||||
onLoad(options) {
|
||||
console.log(options);
|
||||
console.log(options, this.btnState);
|
||||
uni.setNavigationBarTitle({
|
||||
title: options.title
|
||||
})
|
||||
@@ -330,6 +380,13 @@
|
||||
if(this.btnState == 'accientOrderType') this.getDetailAccident(options.orderSn)
|
||||
},
|
||||
methods: {
|
||||
showDp(id, str){
|
||||
if(this[str].filter(i => i.type == id).length) {
|
||||
return this[str].filter(i => i.type == id)[0].text
|
||||
} else {
|
||||
return '该dp公司已不存在'
|
||||
}
|
||||
},
|
||||
showNum(a) {
|
||||
return convertNumberToChinese(a)
|
||||
},
|
||||
@@ -346,6 +403,7 @@
|
||||
if(this.detail.auditRepair == 0 && this.detail.billAuditStatus == 1) return "公司审核中"
|
||||
if(this.detail.auditRepair == 0 && this.detail.billAuditStatus == 0) return "平台/公司审核中"
|
||||
if(this.detail.status == 1) return "维修中"
|
||||
if(this.detail.status == 2) return "维修完成"
|
||||
},
|
||||
checkBtn(e) {
|
||||
console.log(e);
|
||||
@@ -364,6 +422,9 @@
|
||||
} else if (e == 5) {
|
||||
this.dataItem = e
|
||||
this.$refs.repairCompleted.show = true
|
||||
} else if (e == 11) {
|
||||
this.dataItem = e
|
||||
this.$tab.navigateTo(`./accident/handover?id=${this.detail.id}`)
|
||||
}
|
||||
},
|
||||
confirm() {
|
||||
@@ -392,11 +453,13 @@
|
||||
},
|
||||
repairConfirm(e) {
|
||||
console.log(e);
|
||||
finishRepair({id: this.detail.id, repairFinishImage: e}).then(res => {
|
||||
this.$u.toast('该工单已完成维修')
|
||||
this.dataItem = 0
|
||||
this.getMaintenanceInfo(this.detail.id)
|
||||
})
|
||||
if(this.dataItem == 5) {
|
||||
finishRepair({id: this.detail.id, repairFinishImage: e}).then(res => {
|
||||
this.$u.toast('该工单已完成维修')
|
||||
this.dataItem = 0
|
||||
this.getMaintenanceInfo(this.detail.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
// 获取预约工单详情
|
||||
getReservationInfo(orderSn){
|
||||
@@ -469,6 +532,14 @@ page {
|
||||
}
|
||||
}
|
||||
}
|
||||
.car-finish {
|
||||
.car-finish-image {
|
||||
margin-left: 16rpx;
|
||||
width: 202rpx;
|
||||
height: 202rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
.item-image-box {
|
||||
padding: 16rpx 0;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
|
||||
@@ -45,11 +45,11 @@
|
||||
<view class="mt-1">
|
||||
<z-paging ref="paging" height="100%" :fixed ="false" v-model="dataList" @query="queryList" safe-area-inset-bottom :use-page-scroll="true">
|
||||
<empty-view slot="empty" text="暂无更多"></empty-view>
|
||||
<billing-item :insuranceList="insuranceList" :dutyCategoryList="dutyCategoryList" :item="item" @checkBtn="checkBtn" v-for="(item,index) in dataList" :key="item.id"></billing-item>
|
||||
<billing-item :dpCompanylist="dpCompanylist" :insuranceList="insuranceList" :dutyCategoryList="dutyCategoryList" :item="item" @checkBtn="checkBtn" v-for="(item,index) in dataList" :key="item.id"></billing-item>
|
||||
</z-paging>
|
||||
</view>
|
||||
<prompt-box @confirm="confirm" ref="prompt" />
|
||||
<repair-completed ref="repairCompleted" @confirm="repairConfirm" />
|
||||
<repair-completed :dataItem="dataItem" ref="repairCompleted" @confirm="repairConfirm" />
|
||||
<u-popup :show="auditShow" round="16" @close="auditShow = false" :safeAreaInsetBottom="false">
|
||||
<view class="audit-box">
|
||||
<view class="audit-title rel f-32 fw-b c222 text-center">
|
||||
@@ -69,8 +69,8 @@
|
||||
import repairCompleted from './components/repairCompleted'
|
||||
|
||||
import { reservationList, maintenanceList, accidentList, auditCheck, arrive, returnList,
|
||||
finishRepair } from '@/api/repair/repair'
|
||||
import { dutyCategory, insuranceList } from '@/api/system/config'
|
||||
finishRepair, accidentFinishRepair } from '@/api/repair/repair'
|
||||
import { dutyCategory, insuranceList, dpCompanylist } from '@/api/system/config'
|
||||
import { tabsList1, tabsList2, tabsList3, tabsList4 } from '@/data/tabsData'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
@@ -91,7 +91,8 @@
|
||||
query: {},
|
||||
dataItem: {},
|
||||
insuranceList: [],
|
||||
dutyCategoryList: []
|
||||
dutyCategoryList: [],
|
||||
dpCompanylist: []
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
@@ -104,32 +105,50 @@
|
||||
},
|
||||
onShow() {
|
||||
console.log(this.btnState);
|
||||
// this.$refs.paging.reload()
|
||||
this.$refs.paging.reload()
|
||||
},
|
||||
mounted() {
|
||||
// 这里调用是避免参数获取不及时
|
||||
// this.$refs.paging.reload()
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['btnState'])
|
||||
...mapGetters(['btnState', 'garage'])
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.getDutyCategory()
|
||||
this.getInsuranceList()
|
||||
this.getDPCompanylist()
|
||||
},
|
||||
// 获取DP公司
|
||||
getDPCompanylist() {
|
||||
dpCompanylist().then(res => {
|
||||
this.dpCompanylist = []
|
||||
let arr = res.data
|
||||
arr.forEach(item => {
|
||||
this.dpCompanylist.push({text: item.name,type: item.id,from: item.isShow})
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取保险公司
|
||||
getInsuranceList() {
|
||||
insuranceList().then(res => {
|
||||
console.log('保险', res);
|
||||
this.insuranceList = res.data
|
||||
this.insuranceList = []
|
||||
// console.log('保险', res);
|
||||
let arr = res.data
|
||||
arr.forEach(item => {
|
||||
this.insuranceList.push({text: item.name,type: item.id,from: item.isShow})
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取责任分类
|
||||
getDutyCategory() {
|
||||
dutyCategory().then(res => {
|
||||
console.log(res);
|
||||
this.dutyCategoryList = res.data
|
||||
this.dutyCategoryList = []
|
||||
let arr = res.data
|
||||
arr.forEach(item => {
|
||||
this.dutyCategoryList.push({text: item.dutyName,type: item.id,from: item.isShow})
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取列表
|
||||
@@ -196,7 +215,7 @@
|
||||
// if(this.current == 1) this.$tab.navigateTo(`./detail?orderSn=${e.item.id}&title=事故定损`)
|
||||
// if(this.current == 2) this.$tab.navigateTo(`./detail?orderSn=${e.item.id}&title=接单信息`)
|
||||
// if(this.current == 3) this.$tab.navigateTo(`./detail?orderSn=${e.item.id}&title=工单详情`)
|
||||
// if(this.current == 4) this.$tab.navigateTo(`./detail?orderSn=${e.item.id}&title=交车`)
|
||||
if(this.current == 4) this.$tab.navigateTo(`./detail?orderSn=${e.item.id}&title=工单详情`)
|
||||
// if(this.current == 5) this.$tab.navigateTo(`./detail?orderSn=${e.item.id}&title=结算`)
|
||||
// if(this.current == 6) this.$tab.navigateTo(`./detail?orderSn=${e.item.id}&title=事故接待`)
|
||||
}
|
||||
@@ -227,8 +246,9 @@
|
||||
} else if (e.btnType == 4) {
|
||||
// 维修接待-开单
|
||||
this.$tab.navigateTo(`./reservation/createOrder?id=${e.item.id}`)
|
||||
} else if (e.btnType == 5) {
|
||||
} else if (e.btnType == 5 || e.btnType == 10) {
|
||||
// 维修接待-维修完成
|
||||
// 事故接待-维修完成
|
||||
this.dataItem = e
|
||||
this.$refs.repairCompleted.show = true
|
||||
} else if (e.btnType == 6) {
|
||||
@@ -243,6 +263,19 @@
|
||||
} else if (e.btnType == 9) {
|
||||
// 事故接待-开单
|
||||
this.$tab.navigateTo(`./accident/accidentBilling?id=${e.item.id}&title=接单信息`)
|
||||
} else if (e.btnType == 11) {
|
||||
// 事故接单-交车
|
||||
this.$tab.navigateTo(`./accident/handover?id=${e.item.id}&title=交车`)
|
||||
} else if (e.btnType == 12) {
|
||||
// 事故接单-结算
|
||||
this.$tab.navigateTo(`./accident/handover?id=${e.item.id}&title=结算`)
|
||||
} else if (e.btnType == 13) {
|
||||
// 退车接待-接车
|
||||
this.$tab.navigateTo(`./reverse/createOrder?id=${e.item.id}`)
|
||||
} else if (e.btnType == 14) {
|
||||
// 退车接待-开单
|
||||
this.$store.dispatch('ClearProject')
|
||||
this.$tab.navigateTo(`./reverse/accidentBilling?id=${e.item.id}`)
|
||||
}
|
||||
},
|
||||
confirm() {
|
||||
@@ -263,11 +296,25 @@
|
||||
},
|
||||
repairConfirm(e) {
|
||||
console.log(e);
|
||||
finishRepair({id: this.dataItem.item.id, repairFinishImage: e}).then(res => {
|
||||
if(this.dataItem.btnType == 5) {
|
||||
finishRepair({id: this.dataItem.item.id, repairFinishImage: e}).then(res => {
|
||||
this.$u.toast('该工单已完成维修')
|
||||
this.$refs.repairCompleted.show = false
|
||||
this.dataItem = {}
|
||||
this.$refs.paging.reload()
|
||||
})
|
||||
})
|
||||
} else if (this.dataItem.btnType == 10) {
|
||||
console.log(this.garage);
|
||||
accidentFinishRepair({id:this.dataItem.item.id,repairFinishImage: e,garageId: this.garage.id}).then(res => {
|
||||
this.$u.toast('该工单已完成维修')
|
||||
this.$refs.repairCompleted.show = false
|
||||
this.$tab.navigateTo(`./detail?orderSn=${this.dataItem.item.id}&title=工单详情`)
|
||||
this.$store.dispatch('SetGarage', {})
|
||||
this.dataItem = {}
|
||||
}).catch(err => {
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
submitAudit() {
|
||||
auditCheck({id: this.dataItem.item.id, auditStatus: 2, remark: this.remark}).then(res => {
|
||||
|
||||
@@ -1,174 +1,203 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="page-box bg-white">
|
||||
<view class="nav-select flex align-center justify-between">
|
||||
<view class="nav-select flex align-center justify-between" :class="maintenance&&'mb-4'" v-if="isReturnCar">
|
||||
<view class="left">
|
||||
维修项目
|
||||
是否维修
|
||||
</view>
|
||||
<view class="content flex align-center justify-start">
|
||||
<view class="center flex align-center" @click="projectForm.isPackage = 1">
|
||||
<image v-show="projectForm.isPackage == 1" src="@/static/images/icon/true_1.png" mode=""></image>
|
||||
<image v-show="projectForm.isPackage == 0" src="@/static/images/icon/false_1.png" mode=""></image>
|
||||
快速开单
|
||||
<view class="center flex align-center" @click="maintenance = true">
|
||||
<image v-show="maintenance" src="@/static/images/icon/true_1.png" mode=""></image>
|
||||
<image v-show="!maintenance" src="@/static/images/icon/false_1.png" mode=""></image>
|
||||
维修
|
||||
</view>
|
||||
<view class="right flex align-center" @click="projectForm.isPackage = 0">
|
||||
<image v-show="projectForm.isPackage == 0" src="@/static/images/icon/true_1.png" mode=""></image>
|
||||
<image v-show="projectForm.isPackage == 1" src="@/static/images/icon/false_1.png" mode=""></image>
|
||||
自定义开单
|
||||
<view class="right flex align-center" @click="maintenance = false">
|
||||
<image v-show="!maintenance" src="@/static/images/icon/true_1.png" mode=""></image>
|
||||
<image v-show="maintenance" src="@/static/images/icon/false_1.png" mode=""></image>
|
||||
不维修
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="nav-select flex align-center justify-between mt-4" v-show="projectForm.isPackage == 0">
|
||||
<view class="left">
|
||||
选择计价方式
|
||||
<view class="select-item flex align-center justify-between" v-if="!maintenance">
|
||||
<view class="select-item-t">
|
||||
车库
|
||||
</view>
|
||||
<view class="content flex align-center justify-start">
|
||||
<view class="center flex align-center" @click="projectForm.type = 1">
|
||||
<image v-show="projectForm.type == 1" src="@/static/images/icon/true_1.png" mode=""></image>
|
||||
<image v-show="projectForm.type == 2" src="@/static/images/icon/false_1.png" mode=""></image>
|
||||
金额计价
|
||||
</view>
|
||||
<view class="right flex align-center" @click="projectForm.type = 2">
|
||||
<image v-show="projectForm.type == 2" src="@/static/images/icon/true_1.png" mode=""></image>
|
||||
<image v-show="projectForm.type == 1" src="@/static/images/icon/false_1.png" mode=""></image>
|
||||
工时计价
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end" @click="$tab.navigateTo('/pages/repair/repair/accident/selectGarage')">
|
||||
<text v-if="garage.name">{{ garage.name }}</text>
|
||||
<text v-else>请选择车辆停放车库</text>
|
||||
<image src="@/static/images/icon/arrow-right.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-show="projectForm.isPackage == 1">
|
||||
<view class="select-item flex align-center justify-between">
|
||||
<view class="select-item-t">
|
||||
添加类型
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
{{ saveForm.repairTypeName }}
|
||||
<image src="@/static/images/icon/arrow-right.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="select-item flex align-center justify-between">
|
||||
<view class="select-item-t ">
|
||||
添加项目
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end" @click="$tab.navigateTo('./auxiliary/package')">
|
||||
<text v-if="packageForm.name">{{packageForm.name}}</text>
|
||||
<text v-else>请选择维修项目</text>
|
||||
<image src="@/static/images/icon/arrow-right.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="detail-list">
|
||||
<view class="detail-item flex-column justify-between" v-for="(item,index) in packageForm.itemResponsesList" :key="index">
|
||||
<view class="flex align-center justify-between">
|
||||
<text class="c666">{{item.itemName}}</text>
|
||||
<image src="@/static/images/icon/edit.png" mode="" @click="$tab.navigateTo(`./auxiliary/packageEdit?index=${index}`)"></image>
|
||||
</view>
|
||||
<view class="flex align-center justify-between c111" v-for="(t, i) in item.accessoryList">
|
||||
<text>{{t.name}}*{{t.num}}</text>
|
||||
<text>¥{{t.price}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between">
|
||||
<text>工时:{{item.workingHour}}</text>
|
||||
<text>¥{{item.workingPrice}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-show="projectForm.isPackage == 0">
|
||||
<view class="select-item flex align-center justify-between">
|
||||
<view class="select-item-t">
|
||||
<view class="" v-if="maintenance">
|
||||
<view class="nav-select flex align-center justify-between">
|
||||
<view class="left">
|
||||
维修项目
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
<u-input border="none" input-align="right" v-model="projectForm.name" placeholder="请输入维修项目"></u-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-show="projectForm.type == 1">
|
||||
<view class="select-item flex align-center justify-between">
|
||||
<view class="select-item-t">
|
||||
材料价格
|
||||
<view class="content flex align-center justify-start">
|
||||
<view class="center flex align-center" @click="projectForm.isPackage = 1">
|
||||
<image v-show="projectForm.isPackage == 1" src="@/static/images/icon/true_1.png" mode=""></image>
|
||||
<image v-show="projectForm.isPackage == 0" src="@/static/images/icon/false_1.png" mode=""></image>
|
||||
快速开单
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
<u-input border="none" input-align="right" v-model="projectForm.price" placeholder="请输入价格"></u-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="select-item flex align-center justify-between">
|
||||
<view class="select-item-t">
|
||||
工时价格
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
<u-input border="none" v-model="projectForm.workingPrice" input-align="right" placeholder="请输入价格"></u-input>
|
||||
<view class="right flex align-center" @click="projectForm.isPackage = 0">
|
||||
<image v-show="projectForm.isPackage == 0" src="@/static/images/icon/true_1.png" mode=""></image>
|
||||
<image v-show="projectForm.isPackage == 1" src="@/static/images/icon/false_1.png" mode=""></image>
|
||||
自定义开单
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-show="projectForm.type == 2">
|
||||
<view class="select-item flex align-center justify-between" @click="$tab.navigateTo(`./auxiliary/material?title=${projectForm.name}`)">
|
||||
<view class="select-item-t ">
|
||||
添加材料
|
||||
<view class="nav-select flex align-center justify-between mt-4" v-show="projectForm.isPackage == 0">
|
||||
<view class="left">
|
||||
选择计价方式
|
||||
</view>
|
||||
<view class="content flex align-center justify-start">
|
||||
<view class="center flex align-center" @click="projectForm.type = 1">
|
||||
<image v-show="projectForm.type == 1" src="@/static/images/icon/true_1.png" mode=""></image>
|
||||
<image v-show="projectForm.type == 2" src="@/static/images/icon/false_1.png" mode=""></image>
|
||||
金额计价
|
||||
</view>
|
||||
<view class="right flex align-center" @click="projectForm.type = 2">
|
||||
<image v-show="projectForm.type == 2" src="@/static/images/icon/true_1.png" mode=""></image>
|
||||
<image v-show="projectForm.type == 1" src="@/static/images/icon/false_1.png" mode=""></image>
|
||||
工时计价
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-show="projectForm.isPackage == 1">
|
||||
<view class="select-item flex align-center justify-between">
|
||||
<view class="select-item-t">
|
||||
添加类型
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
请选择维修材料
|
||||
{{ saveForm.repairTypeName }}
|
||||
<image src="@/static/images/icon/arrow-right.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<block class="" v-for="(item,index) in accessoryList" :key="index">
|
||||
<view class="select-item flex align-center justify-between" v-show="projectForm.type == 2">
|
||||
<view class="select-item-t">
|
||||
材料单价
|
||||
<view class="select-item flex align-center justify-between">
|
||||
<view class="select-item-t ">
|
||||
添加项目
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end" @click="$tab.navigateTo('./auxiliary/package')">
|
||||
<text v-if="packageForm.name">{{packageForm.name}}</text>
|
||||
<text v-else>请选择维修项目</text>
|
||||
<image src="@/static/images/icon/arrow-right.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="detail-list">
|
||||
<view class="detail-item flex-column justify-between" v-for="(item,index) in packageForm.itemResponsesList" :key="index">
|
||||
<view class="flex align-center justify-between">
|
||||
<text class="c666">{{item.itemName}}</text>
|
||||
<image src="@/static/images/icon/edit.png" mode="" @click="$tab.navigateTo(`./auxiliary/packageEdit?index=${index}`)"></image>
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
¥{{item.price}}
|
||||
<view class="flex align-center justify-between c111" v-for="(t, i) in item.accessoryList">
|
||||
<text>{{t.name}}*{{t.num}}</text>
|
||||
<text>¥{{t.price}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between">
|
||||
<text>工时:{{item.workingHour}}</text>
|
||||
<text>¥{{item.workingPrice}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-show="projectForm.isPackage == 0">
|
||||
<view class="select-item flex align-center justify-between">
|
||||
<view class="select-item-t">
|
||||
维修项目
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
<u-input border="none" input-align="right" v-model="projectForm.name" placeholder="请输入维修项目"></u-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-show="projectForm.type == 1">
|
||||
<view class="select-item flex align-center justify-between">
|
||||
<view class="select-item-t">
|
||||
材料数量
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
{{item.num}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="select-item flex align-center justify-between" v-show="projectForm.type == 2">
|
||||
<view class="select-item-t">
|
||||
材料价格
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
¥{{item.price * item.num}}
|
||||
<u-input border="none" input-align="right" v-model="projectForm.price" placeholder="请输入价格"></u-input>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="select-item flex align-center justify-between" v-show="projectForm.type == 2">
|
||||
<view class="select-item-t ">
|
||||
添加工时
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end" @click="$tab.navigateTo('./auxiliary/workingHours')">
|
||||
<text v-if="projectForm.workingName" class="c111">{{projectForm.workingName}}</text>
|
||||
<text v-else>请选择维修工时</text>
|
||||
<image src="@/static/images/icon/arrow-right.png" mode=""></image>
|
||||
<view class="select-item flex align-center justify-between">
|
||||
<view class="select-item-t">
|
||||
工时价格
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
<u-input border="none" v-model="projectForm.workingPrice" input-align="right" placeholder="请输入价格"></u-input>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="select-item flex align-center justify-between" v-show="projectForm.type == 2">
|
||||
<view class="select-item-t">
|
||||
工时单价
|
||||
<view class="" v-show="projectForm.type == 2">
|
||||
<view class="select-item flex align-center justify-between" @click="$tab.navigateTo(`./auxiliary/material?title=${projectForm.name}`)">
|
||||
<view class="select-item-t ">
|
||||
添加材料
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
请选择维修材料
|
||||
<image src="@/static/images/icon/arrow-right.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
<u-input border="none" input-align="right" v-model="projectForm.workingPrice" placeholder="请输入单价"></u-input>
|
||||
<block class="" v-for="(item,index) in accessoryList" :key="index">
|
||||
<view class="select-item flex align-center justify-between" v-show="projectForm.type == 2">
|
||||
<view class="select-item-t">
|
||||
材料单价
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
¥{{item.price}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="select-item flex align-center justify-between">
|
||||
<view class="select-item-t">
|
||||
材料数量
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
{{item.num}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="select-item flex align-center justify-between" v-show="projectForm.type == 2">
|
||||
<view class="select-item-t">
|
||||
材料价格
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
¥{{item.price * item.num}}
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="select-item flex align-center justify-between" v-show="projectForm.type == 2">
|
||||
<view class="select-item-t ">
|
||||
添加工时
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end" @click="$tab.navigateTo('./auxiliary/workingHours')">
|
||||
<text v-if="projectForm.workingName" class="c111">{{projectForm.workingName}}</text>
|
||||
<text v-else>请选择维修工时</text>
|
||||
<image src="@/static/images/icon/arrow-right.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="select-item flex align-center justify-between" v-show="projectForm.type == 2">
|
||||
<view class="select-item-t">
|
||||
工时数量
|
||||
<view class="select-item flex align-center justify-between" v-show="projectForm.type == 2">
|
||||
<view class="select-item-t">
|
||||
工时单价
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
<u-input border="none" input-align="right" v-model="projectForm.workingPrice" placeholder="请输入单价"></u-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
<u-input border="none" input-align="right" v-model="projectForm.workingHour" placeholder="请输入数量"></u-input>
|
||||
<view class="select-item flex align-center justify-between" v-show="projectForm.type == 2">
|
||||
<view class="select-item-t">
|
||||
工时数量
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
<u-input border="none" input-align="right" v-model="projectForm.workingHour" placeholder="请输入数量"></u-input>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="select-item flex align-center justify-between">
|
||||
<view class="select-item-t">
|
||||
工时价格
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
<!-- <u-input border="none" input-align="right" placeholder="请输入价格"></u-input> -->
|
||||
<text v-if="projectForm.workingPrice && projectForm.workingHour">{{projectForm.workingPrice * projectForm.workingHour}}</text>
|
||||
<text v-else class="c999">请输入价格</text>
|
||||
<view class="select-item flex align-center justify-between">
|
||||
<view class="select-item-t">
|
||||
工时价格
|
||||
</view>
|
||||
<view class="select-item-b flex align-center justify-end">
|
||||
<!-- <u-input border="none" input-align="right" placeholder="请输入价格"></u-input> -->
|
||||
<text v-if="projectForm.workingPrice && projectForm.workingHour">{{projectForm.workingPrice * projectForm.workingHour}}</text>
|
||||
<text v-else class="c999">请输入价格</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -180,10 +209,13 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { returnNoRepair } from '@/api/repair/repair'
|
||||
export default {
|
||||
computed: {...mapGetters(['saveForm', 'packageForm', 'accessoryList', 'workingHours'])},
|
||||
computed: {...mapGetters(['saveForm', 'packageForm', 'accessoryList', 'workingHours', 'garage'])},
|
||||
data() {
|
||||
return {
|
||||
maintenance: true,
|
||||
id: '',
|
||||
projectForm: {
|
||||
isPackage: 1, // 0=自定义,1=套餐快速
|
||||
name: '', // 维修项目名称
|
||||
@@ -197,6 +229,11 @@
|
||||
},
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if(option.type) this.isReturnCar = true
|
||||
else this.isReturnCar = false
|
||||
if(option.id) this.id = option.id
|
||||
},
|
||||
onShow(){
|
||||
if(this.workingHours && this.workingHours != {}) {
|
||||
this.projectForm.workingName = this.workingHours.name
|
||||
@@ -206,50 +243,57 @@
|
||||
},
|
||||
methods: {
|
||||
submitForm() {
|
||||
if(this.projectForm.isPackage == 1) {
|
||||
console.log('快速开单');
|
||||
console.log('提交packageForm', this.packageForm);
|
||||
this.projectForm.packageId = this.packageForm.id
|
||||
this.projectForm.name = this.packageForm.name
|
||||
let price = 0
|
||||
this.projectForm.packageItemRequestList = []
|
||||
this.packageForm.itemResponsesList.forEach(item => {
|
||||
price += (item.workingPrice * 1)
|
||||
item.accessoryList.forEach(i => {
|
||||
price += (i.price * i.num)
|
||||
if(this.maintenance) {
|
||||
if(this.projectForm.isPackage == 1) {
|
||||
console.log('快速开单');
|
||||
console.log('提交packageForm', this.packageForm);
|
||||
this.projectForm.packageId = this.packageForm.id
|
||||
this.projectForm.name = this.packageForm.name
|
||||
let price = 0
|
||||
this.projectForm.packageItemRequestList = []
|
||||
this.packageForm.itemResponsesList.forEach(item => {
|
||||
price += (item.workingPrice * 1)
|
||||
item.accessoryList.forEach(i => {
|
||||
price += (i.price * i.num)
|
||||
})
|
||||
this.projectForm.packageItemRequestList.push({
|
||||
itemName: item.itemName,
|
||||
workingHour: item.workingHour,
|
||||
workingPrice: item.workingPrice,
|
||||
accessoryList: item.accessoryList
|
||||
})
|
||||
})
|
||||
this.projectForm.packageItemRequestList.push({
|
||||
itemName: item.itemName,
|
||||
workingHour: item.workingHour,
|
||||
workingPrice: item.workingPrice,
|
||||
accessoryList: item.accessoryList
|
||||
})
|
||||
})
|
||||
this.projectForm.subtotal = price
|
||||
console.log('提交projectForm', this.projectForm);
|
||||
this.$store.dispatch('PushPackage', this.projectForm)
|
||||
this.$tab.navigateBack()
|
||||
} else {
|
||||
console.log('自定义开单');
|
||||
if(this.projectForm.type == 1) {
|
||||
console.log('金额计价', this.projectForm);
|
||||
this.projectForm.subtotal = (this.projectForm.workingPrice * 1) + (this.projectForm.price * 1)
|
||||
this.projectForm.workingTotalPrice = (this.projectForm.workingPrice * 1) + (this.projectForm.price * 1)
|
||||
this.projectForm.subtotal = price
|
||||
console.log('提交projectForm', this.projectForm);
|
||||
this.$store.dispatch('PushPackage', this.projectForm)
|
||||
this.$tab.navigateBack()
|
||||
} else {
|
||||
this.projectForm.accessoryList = this.accessoryList
|
||||
let price = 0
|
||||
this.accessoryList.forEach(item => {
|
||||
price += (item.price * item.num)
|
||||
})
|
||||
price += (this.projectForm.workingHour * this.projectForm.workingPrice)
|
||||
this.projectForm.subtotal = price
|
||||
this.$store.dispatch('PushPackage', this.projectForm)
|
||||
this.$tab.navigateBack()
|
||||
this.$store.dispatch('ClearAccessory')
|
||||
console.log('工时计价', this.projectForm);
|
||||
console.log('自定义开单');
|
||||
if(this.projectForm.type == 1) {
|
||||
console.log('金额计价', this.projectForm);
|
||||
this.projectForm.subtotal = (this.projectForm.workingPrice * 1) + (this.projectForm.price * 1)
|
||||
this.projectForm.workingTotalPrice = (this.projectForm.workingPrice * 1) + (this.projectForm.price * 1)
|
||||
this.$store.dispatch('PushPackage', this.projectForm)
|
||||
this.$tab.navigateBack()
|
||||
} else {
|
||||
this.projectForm.accessoryList = this.accessoryList
|
||||
let price = 0
|
||||
this.accessoryList.forEach(item => {
|
||||
price += (item.price * item.num)
|
||||
})
|
||||
price += (this.projectForm.workingHour * this.projectForm.workingPrice)
|
||||
this.projectForm.subtotal = price
|
||||
this.$store.dispatch('PushPackage', this.projectForm)
|
||||
this.$tab.navigateBack()
|
||||
this.$store.dispatch('ClearAccessory')
|
||||
console.log('工时计价', this.projectForm);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
returnNoRepair({carReservationOrderId: this.id, garageId: this.garage.id}).then(res => {
|
||||
this.$u.toast('开单成功')
|
||||
this.$tab.navigateTo(`/pages/repair/repair/list?index=4&modul=backOrderType`)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -280,6 +324,9 @@
|
||||
.right {
|
||||
margin-left: 100rpx;
|
||||
}
|
||||
.center {
|
||||
width: 140rpx;
|
||||
}
|
||||
}
|
||||
image {
|
||||
margin-right: 8rpx;
|
||||
|
||||
263
pages/repair/repair/reverse/accidentBilling.vue
Normal file
263
pages/repair/repair/reverse/accidentBilling.vue
Normal file
@@ -0,0 +1,263 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="navbar fixed-top">
|
||||
<view :style="`height: ${$u.sys().statusBarHeight}px;`" />
|
||||
<view class="navbar-content rel">
|
||||
<view class="back-icon abs flex-center" @click="$tab.navigateBack">
|
||||
<image src="@/static/images/icon/arrow-left.png" mode=""></image>
|
||||
</view>
|
||||
<view class="f-36 fw-b black">
|
||||
接单信息
|
||||
</view>
|
||||
<view class="navbar-btn abs">
|
||||
<u-button
|
||||
:customStyle="{width: '136rpx', height: '48rpx',fontSize: '28rpx',padding: 0}"
|
||||
color="#13AFA8"
|
||||
@click="submitOrder">
|
||||
<text style="line-height: 1">提交工单</text>
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view :style="`height: ${$u.sys().statusBarHeight}px;`" />
|
||||
<view style="height: 112rpx" />
|
||||
<view class="">
|
||||
<u-form :model="form" ref="uForm" :rules="rules">
|
||||
<view class="btn-center-box bg-white flex justify-center align-center c111 f-28" @click="$tab.navigateTo(`/pages/repair/repair/reservation/createProject?id=${form.carReservationOrderId}&type=return`)">
|
||||
<image class="plus-icon" src="@/static/images/icon/plus_circle_black.png" mode=""></image>
|
||||
添加维修项目
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="detail-list">
|
||||
<view class="detail-item flex-column justify-between c111" v-for="(item,index) in projectList" :key="index">
|
||||
<view class="title flex align-center justify-between">
|
||||
<text class="title-left f-32">维修项目 {{ index + 1 }}</text>
|
||||
<view class="title-right flex align-center f-28">
|
||||
{{ item.name }}
|
||||
<image class="edit-icon" src="@/static/images/icon/edit.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="a-content">
|
||||
<view class="a-content-title c666 f-28">
|
||||
材料明细
|
||||
</view>
|
||||
<view v-if="item.isPackage == 1" class="" v-for="(t, i) in item.packageItemRequestList">
|
||||
<view class="text-item flex align-center justify-between c111" v-for="(a, b) in t.accessoryList" :key="b">
|
||||
<text>{{a.name}}*{{a.num}}</text>
|
||||
<text>¥{{a.price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view v-if="item.isPackage == 0 && item.type == 2" class="" v-for="(t, i) in item.accessoryList"> -->
|
||||
<view v-if="item.isPackage == 0 && item.type == 2" class="text-item flex align-center justify-between c111" v-for="(a, b) in item.accessoryList" :key="b">
|
||||
<text>{{a.name}}*{{a.num}}</text>
|
||||
<text>¥{{a.price}}</text>
|
||||
</view>
|
||||
<!-- </view> -->
|
||||
<view v-if="item.isPackage == 0 && item.type == 1" class="text-item flex align-center justify-between c111">
|
||||
<text>-</text>
|
||||
<text>¥{{item.price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="a-content">
|
||||
<view class="a-content-title c666 f-28">
|
||||
工时明细
|
||||
</view>
|
||||
<view v-if="item.isPackage == 1" class="text-item flex align-center justify-between" v-for="(t, i) in item.packageItemRequestList" :key="i">
|
||||
<text>{{t.itemName}}</text>
|
||||
<text>¥{{t.workingPrice}}</text>
|
||||
</view>
|
||||
<view v-if="item.isPackage == 0 && item.type == 1" class="text-item flex align-center justify-between">
|
||||
<text>-</text>
|
||||
<text>¥{{item.workingPrice}}</text>
|
||||
</view>
|
||||
<view v-if="item.isPackage == 0 && item.type == 2" class="text-item flex align-center justify-between">
|
||||
<text>{{item.workingName}}</text>
|
||||
<text>¥{{item.workingPrice}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="all-box flex align-center justify-between">
|
||||
<text>小计</text>
|
||||
<text>¥{{item.subtotal}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-box bg-white">
|
||||
<u-form-item>
|
||||
<view class="form-item flex align-center justify-between">
|
||||
<text>合计金额</text>
|
||||
<text>¥{{amount}}</text>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item>
|
||||
<view class="form-item flex align-center justify-between">
|
||||
<text>大写金额</text>
|
||||
<text>{{ showNum(amount) }}</text>
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-box bg-white">
|
||||
<u-form-item>
|
||||
<view class="form-item">
|
||||
<u--textarea v-model="form.remark" placeholder="整备备注 (选填)" ></u--textarea>
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
</u-form>
|
||||
</view>
|
||||
<u-toast ref="uToast"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { returnBilling } from '@/api/repair/repair'
|
||||
import { convertNumberToChinese } from '@/utils/index'
|
||||
import { typelist } from '@/data/typeData'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
remark: '',
|
||||
carReservationOrderId: '',
|
||||
projectList: []
|
||||
},
|
||||
rules: {
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['projectList']),
|
||||
amount() {
|
||||
let price = 0
|
||||
this.projectList.forEach(item => {
|
||||
price += item.subtotal
|
||||
})
|
||||
return price
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.form.carReservationOrderId = option.id
|
||||
this.$store.dispatch('SetForm', {key: 'repairTypeName', value: '退车维修'})
|
||||
},
|
||||
methods: {
|
||||
showNum(a) {
|
||||
return convertNumberToChinese(a)
|
||||
},
|
||||
submitOrder() {
|
||||
if(this.projectList.length) {
|
||||
this.form.projectList = this.projectList
|
||||
returnBilling(this.form).then(res => {
|
||||
this.$u.toast('退车工单开单成功')
|
||||
this.$store.dispatch('ClearProject')
|
||||
this.$tab.redirectTo(`/pages/repair/repair/list?index=4&modul=backOrderType`)
|
||||
})
|
||||
} else {
|
||||
this.$u.toast('请先添加维修项目')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.navbar {
|
||||
width: 750rpx;
|
||||
background-color: #fff;
|
||||
.navbar-content {
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
text-align: center;
|
||||
.back-icon {
|
||||
top: 50%;
|
||||
left: 24rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
transform: translateY(-50%);
|
||||
image {
|
||||
width: 18rpx;
|
||||
height: 34rpx;
|
||||
}
|
||||
}
|
||||
.navbar-btn {
|
||||
right: 24rpx;
|
||||
top: 50%;
|
||||
width: 144rpx;
|
||||
height: 56rpx;
|
||||
transform: translateY(-50%);
|
||||
image {
|
||||
margin-right: 8rpx;
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn-center-box {
|
||||
margin: 0 auto;
|
||||
width: 702rpx;
|
||||
border-radius: 8rpx;
|
||||
line-height: 108rpx;
|
||||
.plus-icon {
|
||||
margin-right: 16rpx;
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
}
|
||||
.form-box {
|
||||
margin: 24rpx;
|
||||
padding: 0 32rpx 40rpx 32rpx;
|
||||
border-radius: 8rpx;
|
||||
.form-item {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.detail-list {
|
||||
.detail-item {
|
||||
margin: 22rpx auto;
|
||||
padding: 32rpx;
|
||||
width: 702rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 400;
|
||||
.title {
|
||||
padding-bottom: 24rpx;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
.title-left {
|
||||
line-height: 44rpx;
|
||||
}
|
||||
.title-right {
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
.a-content {
|
||||
border-bottom: 1rpx solid #eee;
|
||||
.a-content-title {
|
||||
line-height: 40rpx;
|
||||
margin-top: 16rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.text-item {
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
}
|
||||
.all-box {
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
image {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.edit-icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -3,14 +3,14 @@
|
||||
<view>
|
||||
<view class="navbar fixed-top">
|
||||
<view :style="`height: ${$u.sys().statusBarHeight}px;`" />
|
||||
<view class="navbar-content flex align-center justify-between">
|
||||
<view class="back-icon flex-center" @click="$tab.navigateBack">
|
||||
<view class="navbar-content flex align-center justify-between rel">
|
||||
<view class="back-icon flex-center abs" @click="$tab.navigateBack">
|
||||
<image src="@/static/images/icon/arrow-left.png" mode=""></image>
|
||||
</view>
|
||||
<view class="">
|
||||
<view style="width:750rpx" class="f-36 c000">
|
||||
退车接待
|
||||
</view>
|
||||
<view class="navbar-btn" v-if="btnState!='commonOrderType'">
|
||||
<view class="navbar-btn abs" v-if="btnState!='commonOrderType'">
|
||||
<u-button
|
||||
:customStyle="{width: '144rpx', height: '56rpx',fontSize: '24rpx',margin: 0,padding: 0}"
|
||||
color="#13AFA8"
|
||||
@@ -34,9 +34,7 @@
|
||||
</u-form-item>
|
||||
<u-form-item border-bottom label="维修类型" class="forms-item" >
|
||||
<view class="select-box flex align-center justify-end">
|
||||
<text v-if="repairTypeName" class="checked">{{repairTypeName}}</text>
|
||||
<text v-else class="nochecked">请选择维修类型</text>
|
||||
<image src="@/static/images/icon/arrow-right.png" mode=""></image>
|
||||
<text class="checked">{{repairTypeName}}</text>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item border-bottom label="司机名称" class="forms-item" prop="name">
|
||||
@@ -419,7 +417,7 @@
|
||||
<script>
|
||||
import { parseTime } from '@/utils/index'
|
||||
import { returnList, damageList, appearanceList, typelist } from '@/data/typeData'
|
||||
import { getCarInfo, createAndPicUp, noRepair } from '@/api/repair/repair';
|
||||
import { getCarInfo, createAndPicUp, noRepair, returnDetail, returnPicup } from '@/api/repair/repair';
|
||||
import { dpCompanylist } from '@/api/system/config'
|
||||
import cellList from '@/components/cell-list/cell-list';
|
||||
import { mapGetters } from 'vuex'
|
||||
@@ -448,7 +446,8 @@
|
||||
phone: '', // 司机联系方式
|
||||
dpCompanyId: '', // dp公司id
|
||||
returnDate: '', // 退车日期
|
||||
damageImage: '', // 双证:1=双证齐全,2=缺行驶证,3=缺营运证
|
||||
doubleCertificates: '', // 双证:1=双证齐全,2=缺行驶证,3=缺营运证
|
||||
damageImage: '', // 车损照片
|
||||
frontBumper: 1, // 前保险杠损失情况
|
||||
hehindBumper: 1, // 后保险杠损失情况
|
||||
glass: 1, // 挡风玻璃损失情况
|
||||
@@ -601,9 +600,12 @@
|
||||
typelist
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(option) {
|
||||
console.log(this.btnState);
|
||||
this.init()
|
||||
if(option.id) {
|
||||
this.getReturnDetail(option.id)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showDp(id, str){
|
||||
@@ -616,6 +618,16 @@
|
||||
init() {
|
||||
this.getDpCompanylist()
|
||||
},
|
||||
getReturnDetail(id) {
|
||||
returnDetail({id}).then(res => {
|
||||
console.log(res);
|
||||
this.form.id = res.data.id
|
||||
this.form.carNo = res.data.carNo
|
||||
this.form.name = res.data.name
|
||||
this.form.phone = res.data.phone
|
||||
this.carConfirm()
|
||||
})
|
||||
},
|
||||
getDpCompanylist() {
|
||||
dpCompanylist().then(res => {
|
||||
this.dpCompanylist = []
|
||||
@@ -630,7 +642,10 @@
|
||||
this.$refs.uForm.validate().then(res => {
|
||||
uni.$u.toast('校验通过')
|
||||
if(this.form.id) {
|
||||
|
||||
returnPicup(this.form).then(res => {
|
||||
this.$u.toast('退车接单成功')
|
||||
this.$tab.navigateBack()
|
||||
})
|
||||
} else {
|
||||
console.log('退车维修', this.form);
|
||||
createAndPicUp(this.form).then(res => {
|
||||
@@ -791,11 +806,6 @@
|
||||
carNumdfocus() {
|
||||
this.carShow = true
|
||||
uni.hideKeyboard()
|
||||
},
|
||||
carInfo() {
|
||||
getCarInfo({carNo: form.carNo}).then(res => {
|
||||
console.log(res);
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -810,9 +820,12 @@ page {
|
||||
width: 750rpx;
|
||||
background-color: #fff;
|
||||
.navbar-content {
|
||||
padding: 8rpx 24rpx;
|
||||
line-height: 88rpx;
|
||||
text-align: center;
|
||||
.back-icon {
|
||||
margin-right: 24rpx;
|
||||
top: 50%;
|
||||
left: 24rpx;
|
||||
transform: translateY(-50%);
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
image {
|
||||
@@ -821,7 +834,9 @@ page {
|
||||
}
|
||||
}
|
||||
.navbar-btn {
|
||||
margin-left: 24rpx;
|
||||
top: 50%;
|
||||
right: 24rpx;
|
||||
transform: translateY(-50%);
|
||||
width: 144rpx;
|
||||
height: 56rpx;
|
||||
image {
|
||||
|
||||
@@ -51,9 +51,10 @@
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.init()
|
||||
// this.init()
|
||||
},
|
||||
onShow() {
|
||||
this.init()
|
||||
if(uni.getStorageInfoSync('userType') == 'carDealers') {
|
||||
this.$tab.switchTab('/pages/carShop/maintainOrder/maintainOrder')
|
||||
}
|
||||
|
||||
@@ -212,6 +212,9 @@ image {
|
||||
.mb-3 {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.mb-4 {
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
.m-auto {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ const getters = {
|
||||
packageForm: state => state.form.packageForm,
|
||||
projectList: state => state.form.projectList,
|
||||
accessoryList: state=> state.form.accessoryList,
|
||||
workingHours: state => state.form.workingHours
|
||||
workingHours: state => state.form.workingHours,
|
||||
garage: state => state.form.garage
|
||||
}
|
||||
export default getters
|
||||
|
||||
@@ -2,6 +2,7 @@ import config from '@/config'
|
||||
|
||||
const form = {
|
||||
state: {
|
||||
garage: {},
|
||||
saveForm: {}, // 维保开单
|
||||
packageForm: {}, // 项目套餐选中
|
||||
projectList: [], // 项目套餐选中
|
||||
@@ -11,6 +12,9 @@ const form = {
|
||||
},
|
||||
|
||||
mutations: {
|
||||
SET_GARAGE: (state, data) => {
|
||||
state.garage = data
|
||||
},
|
||||
SET_MATERIALS:(state, data)=>{
|
||||
if(data.type==1){
|
||||
state.materialsList.push(data.value)
|
||||
@@ -45,6 +49,9 @@ const form = {
|
||||
},
|
||||
|
||||
actions: {
|
||||
SetGarage: ({ commit }, data) => {
|
||||
commit('SET_GARAGE', data)
|
||||
},
|
||||
SetForm({ commit }, data) {
|
||||
commit('SET_FORM', data)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user