退车-交车
This commit is contained in:
@@ -73,3 +73,7 @@ export const picupReturnAPI = (data) => request.post(`/admin/merchant/car/reserv
|
||||
|
||||
// dp公司id /api/publicly/dp/company/listAll
|
||||
export const dpCompanyListAllAPI = () => request.get('/publicly/dp/company/listAll');
|
||||
|
||||
// 退车接待-交车 /api/admin/merchant/car/reservation/order/deliveryCarReturn
|
||||
export const deliveryCarReturnAPI = (data) =>
|
||||
request.post(`/admin/merchant/car/reservation/order/deliveryCarReturn`, data);
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-button v-if="tabActive == 'untreated'" type="primary" @click="openDialog(1, '创建工单并开单')"
|
||||
>创建工单并接车</el-button
|
||||
>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="orderDataList"
|
||||
@@ -95,11 +97,16 @@
|
||||
<el-button v-if="tabActive == 'unpickup'" type="text" size="small" @click="picupBtn(scope.row)"
|
||||
>接车</el-button
|
||||
>
|
||||
<!-- 待交车 -->
|
||||
<el-button v-if="tabActive == 'undelivery'" type="text" size="small" @click="deliveryCarBtn(scope.row)"
|
||||
>交车</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 测试 -->
|
||||
<!-- <el-button type="text" size="small" @click="picupBtn">接车</el-button> -->
|
||||
<!-- <el-button type="text" size="small" @click="deliveryCarBtn">交车</el-button> -->
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:page-sizes="[10, 20, 40, 60]"
|
||||
@@ -510,13 +517,44 @@
|
||||
<el-button type="primary" @click="submitFormPicup">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!-- 交车 -->
|
||||
<el-dialog title="确认交车" :visible.sync="deliveryCarDialogVisible" width="30%">
|
||||
<el-form :model="deliveryCarForm" ref="deliveryCarForm" class="demo-ruleForm" v-loading="loading">
|
||||
<el-form-item label="工单id" prop="carReservationOrderId">
|
||||
<el-input v-model.number="deliveryCarForm.carReservationOrderId" disabled />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label="交车图片"
|
||||
prop="deliveryImage"
|
||||
:rules="[{ required: true, message: '请选择', trigger: 'blur' }]"
|
||||
>
|
||||
<div class="upLoadPicBox" @click="modalPicTap('2', 'deliveryImage')">
|
||||
<div v-if="deliveryCarForm.deliveryImage" class="pictrue">
|
||||
<img :src="deliveryCarForm.deliveryImage" />
|
||||
</div>
|
||||
<div v-else-if="formValidate.deliveryImage" class="pictrue">
|
||||
<img :src="formValidate.deliveryImage" />
|
||||
</div>
|
||||
<div v-else class="upLoad">
|
||||
<i class="el-icon-camera cameraIconfont" />
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="resetFormDeliveryCar">取 消</el-button>
|
||||
<el-button type="primary" @click="submitFormDeliveryCar">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listAPI, picupReturnAPI, dpCompanyListAllAPI } from '@/api/reservation/order';
|
||||
import { listAPI, picupReturnAPI, dpCompanyListAllAPI, deliveryCarReturnAPI } from '@/api/reservation/order';
|
||||
const obj = {
|
||||
damageImage: '',
|
||||
deliveryImage: '',
|
||||
};
|
||||
export default {
|
||||
name: 'reservationOrder',
|
||||
@@ -606,6 +644,12 @@ export default {
|
||||
},
|
||||
formValidate: Object.assign({}, obj),
|
||||
dpCompanyIdoptions: [],
|
||||
// 交车
|
||||
deliveryCarDialogVisible: false,
|
||||
deliveryCarForm: {
|
||||
carReservationOrderId: null,
|
||||
deliveryImage: '',
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
@@ -635,23 +679,43 @@ export default {
|
||||
resetFormPicup() {
|
||||
this.picupDialogVisible = false;
|
||||
this.picupForm = {};
|
||||
this.formValidate = Object.assign({}, obj);
|
||||
},
|
||||
// 交车
|
||||
deliveryCarBtn(row) {
|
||||
this.deliveryCarDialogVisible = true;
|
||||
this.deliveryCarForm.carReservationOrderId = row.id;
|
||||
},
|
||||
submitFormDeliveryCar() {
|
||||
this.$refs['deliveryCarForm'].validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
const res = await deliveryCarReturnAPI(this.deliveryCarForm);
|
||||
this.loading = false;
|
||||
this.deliveryCarDialogVisible = false;
|
||||
this.$message.success('交车成功');
|
||||
this.formValidate = Object.assign({}, obj);
|
||||
this.getList('undelivery');
|
||||
}
|
||||
});
|
||||
},
|
||||
resetFormDeliveryCar() {
|
||||
this.deliveryCarDialogVisible = false;
|
||||
this.deliveryCarForm = {};
|
||||
this.formValidate = Object.assign({}, obj);
|
||||
},
|
||||
// 点击商品图
|
||||
modalPicTap(tit, num) {
|
||||
const _this = this;
|
||||
this.$modalUpload(
|
||||
function (img) {
|
||||
if (tit === '1' && num === 'damageImage') {
|
||||
_this.formValidate.damageImage = img[0].sattDir;
|
||||
this.$set(_this.picupForm, 'damageImage', _this.formValidate.damageImage);
|
||||
} else {
|
||||
_this.formValidate.image = img[0].sattDir;
|
||||
this.$set(_this.picupForm, 'image', _this.formValidate.image);
|
||||
}
|
||||
},
|
||||
tit,
|
||||
'picupForm',
|
||||
);
|
||||
this.$modalUpload(function (img) {
|
||||
if (tit === '1' && num === 'damageImage') {
|
||||
_this.formValidate.damageImage = img[0].sattDir;
|
||||
this.$set(_this.picupForm, 'damageImage', _this.formValidate.damageImage);
|
||||
} else if (tit === '2' && num === 'deliveryImage') {
|
||||
_this.formValidate.deliveryImage = img[0].sattDir;
|
||||
this.$set(_this.deliveryCarForm, 'deliveryImage', _this.formValidate.deliveryImage);
|
||||
}
|
||||
});
|
||||
},
|
||||
handleClick(tab) {
|
||||
this.tabActive = tab.name;
|
||||
|
||||
807
src/views/reservation/management/fault/creatLevel.vue
Normal file
807
src/views/reservation/management/fault/creatLevel.vue
Normal file
@@ -0,0 +1,807 @@
|
||||
<template>
|
||||
<div class="creatLevel">
|
||||
<!-- 创建工单并开单 一层 -->
|
||||
<el-dialog
|
||||
v-if="createAndBillFormVisible"
|
||||
:title="title"
|
||||
:visible.sync="createAndBillFormVisible"
|
||||
width="85%"
|
||||
class="showALL_dialog"
|
||||
@close="createAndBillremoveBtn"
|
||||
>
|
||||
<div class="sketch_content">
|
||||
<el-form :model="createAndBillForm">
|
||||
<el-row :gutter="10" type="flex" justify="space-between">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="车牌:" :rules="[{ required: true, message: '请选择', trigger: 'blur' }]">
|
||||
<el-select v-model="createAndBillForm.carNo" placeholder="请选择车牌号">
|
||||
<el-option v-for="item in optionsCarNo" :key="item.value" :label="item.carNo" :value="item.carNo">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="司机名称:" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<el-input v-model="createAndBillForm.name" placeholder="请输入司机名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="联系方式:" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<el-input v-model="createAndBillForm.phone" maxlength="11" placeholder="请输入联系方式"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="维修类型:" :rules="[{ required: true, message: '请选择', trigger: 'blur' }]">
|
||||
<el-radio-group v-model="createAndBillForm.repairType">
|
||||
<el-radio disabled :label="1">常规保养</el-radio>
|
||||
<el-radio disabled :label="2">故障维修</el-radio>
|
||||
<el-radio disabled :label="3">事故维修</el-radio>
|
||||
<el-radio disabled :label="4">退车</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="公里数:" :rules="[{ required: true, message: '请输入公里数', trigger: 'blur' }]">
|
||||
<!-- v-if="createAndBillForm.maintenance" -->
|
||||
<el-input
|
||||
v-model.number="createAndBillForm.maintenance.kilometer"
|
||||
placeholder="请输入公里数"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="5" v-show="currentBtnId == 2 || currentBtnId == 3">
|
||||
<el-form-item label="工单id">
|
||||
<el-input :disabled="true" v-model="createAndBillForm.carReservationOrderId"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="18">
|
||||
<el-form-item label="故障现象" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<el-row>
|
||||
<el-col :span="6" v-for="(item, index) in faultList" :key="index" class="contentDiv">
|
||||
<el-input v-model="item.content" type="textarea" autosize placeholder="请输入故障现象"></el-input>
|
||||
<div class="con_btn_div">
|
||||
<el-button icon="el-icon-plus" type="primary" @click="addContentInput" circle></el-button>
|
||||
<el-button
|
||||
icon="el-icon-minus"
|
||||
v-if="index > 0"
|
||||
@click="removeContentInput(item)"
|
||||
circle
|
||||
></el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<!-- <el-form :model="dynamicValidateFormObj" ref="dynamicValidateFormObj" class="demo-dynamic">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
prop="content"
|
||||
label="现象描述"
|
||||
:rules="[{ required: true, message: '请输入现象描述', trigger: 'blur' }]"
|
||||
>
|
||||
<el-input
|
||||
type="textarea"
|
||||
autosize
|
||||
v-model="dynamicValidateFormObj.content"
|
||||
style="width: 300px"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item
|
||||
label="车头照片"
|
||||
prop="headerImage"
|
||||
:rules="[{ required: true, message: '请添加', trigger: 'blur' }]"
|
||||
>
|
||||
<div class="upLoadPicBox" @click="modalPicTap('6', 'headerImage')">
|
||||
<div v-if="createAndBillForm.maintenance.headerImage" class="pictrue">
|
||||
<img :src="createAndBillForm.maintenance.headerImage" />
|
||||
</div>
|
||||
<div v-else-if="formValidate.headerImage" class="pictrue">
|
||||
<img :src="formValidate.headerImage" />
|
||||
</div>
|
||||
<div v-else class="upLoad">
|
||||
<i class="el-icon-camera cameraIconfont" />
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item
|
||||
label="车架号照片"
|
||||
prop="vinImage"
|
||||
:rules="[{ required: true, message: '请添加', trigger: 'blur' }]"
|
||||
>
|
||||
<div class="upLoadPicBox" @click="modalPicTap('7', 'vinImage')">
|
||||
<div v-if="createAndBillForm.maintenance.vinImage" class="pictrue">
|
||||
<img :src="createAndBillForm.maintenance.vinImage" />
|
||||
</div>
|
||||
<div v-else-if="formValidate.vinImage" class="pictrue">
|
||||
<img :src="formValidate.vinImage" />
|
||||
</div>
|
||||
<div v-else class="upLoad">
|
||||
<i class="el-icon-camera cameraIconfont" />
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item
|
||||
label="仪表盘照片"
|
||||
prop="dashboardImage"
|
||||
:rules="[{ required: true, message: '请添加', trigger: 'blur' }]"
|
||||
>
|
||||
<div class="upLoadPicBox" @click="modalPicTap('1', 'dashboardImage')">
|
||||
<div v-if="createAndBillForm.maintenance.dashboardImage" class="pictrue">
|
||||
<img :src="createAndBillForm.maintenance.dashboardImage" />
|
||||
</div>
|
||||
<div v-else-if="formValidate.dashboardImage" class="pictrue">
|
||||
<img :src="formValidate.dashboardImage" />
|
||||
</div>
|
||||
<div v-else class="upLoad">
|
||||
<i class="el-icon-camera cameraIconfont" />
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item
|
||||
label="驾驶证照片"
|
||||
prop="driveLicenseImage"
|
||||
:rules="[{ required: true, message: '请添加', trigger: 'blur' }]"
|
||||
>
|
||||
<div class="upLoadPicBox" @click="modalPicTap('2', 'driveLicenseImage')">
|
||||
<div v-if="createAndBillForm.maintenance.driveLicenseImage" class="pictrue">
|
||||
<img :src="createAndBillForm.maintenance.driveLicenseImage" />
|
||||
</div>
|
||||
<div v-else-if="formValidate.driveLicenseImage" class="pictrue">
|
||||
<img :src="formValidate.driveLicenseImage" />
|
||||
</div>
|
||||
<div v-else class="upLoad">
|
||||
<i class="el-icon-camera cameraIconfont" />
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item
|
||||
label="行驶证照片"
|
||||
prop="drivingLicenseImage"
|
||||
:rules="[{ required: true, message: '请添加', trigger: 'blur' }]"
|
||||
>
|
||||
<div class="upLoadPicBox" @click="modalPicTap('3', 'drivingLicenseImage')">
|
||||
<div v-if="createAndBillForm.maintenance.drivingLicenseImage" class="pictrue">
|
||||
<img :src="createAndBillForm.maintenance.drivingLicenseImage" />
|
||||
</div>
|
||||
<div v-else-if="formValidate.drivingLicenseImage" class="pictrue">
|
||||
<img :src="formValidate.drivingLicenseImage" />
|
||||
</div>
|
||||
<div v-else class="upLoad">
|
||||
<i class="el-icon-camera cameraIconfont" />
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item
|
||||
label="故障照片"
|
||||
prop="faultImage"
|
||||
:rules="[{ required: true, message: '请添加', trigger: 'blur' }]"
|
||||
>
|
||||
<div class="upLoadPicBox" @click="modalPicTap('4', 'faultImage')">
|
||||
<div v-if="createAndBillForm.maintenance.faultImage" class="pictrue">
|
||||
<img :src="createAndBillForm.maintenance.faultImage" />
|
||||
</div>
|
||||
<div v-else-if="formValidate.faultImage" class="pictrue">
|
||||
<img :src="formValidate.faultImage" />
|
||||
</div>
|
||||
<div v-else class="upLoad">
|
||||
<i class="el-icon-camera cameraIconfont" />
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item
|
||||
label="故障视频"
|
||||
prop="faultVideo"
|
||||
:rules="[{ required: true, message: '请添加', trigger: 'blur' }]"
|
||||
>
|
||||
<div class="upLoadPicBox" @click="modalPicTap('5', 'faultVideo')">
|
||||
<div v-if="createAndBillForm.maintenance.faultVideo" class="pictrue">
|
||||
<video :src="createAndBillForm.maintenance.faultVideo" controls="controls" />
|
||||
</div>
|
||||
<div v-else-if="formValidate.faultVideo" class="pictrue">
|
||||
<video :src="formValidate.faultVideo" controls="controls" />
|
||||
</div>
|
||||
<div v-else class="upLoad">
|
||||
<i class="el-icon-camera cameraIconfont" />
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 维修项目 -->
|
||||
<el-form-item label="维修项目">
|
||||
<el-button @click="openTwoDialog" type="primary">添加维修项目</el-button>
|
||||
|
||||
<!-- 自定义开单 并且 金额计价 -->
|
||||
<el-table :data="projectList" v-if="createAndBillFormTwo.isPackage == 0 && createAndBillFormTwo.type == 1">
|
||||
<el-table-column prop="name" label="维修项目名称"> </el-table-column>
|
||||
<el-table-column prop="price" label="材料价格"> </el-table-column>
|
||||
<el-table-column prop="isPackage" label="开单方式">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.isPackage == 0 ? '自定义开单' : '快速开单' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="type" label="计价类型">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.type == 1 ? '金额计价' : '工时计价' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="workingHour" label="工时数量"> </el-table-column>
|
||||
<el-table-column prop="workingPrice" label="工时单价"> </el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@click.native.prevent="projectListDeleteRow(scope.$index, projectList)"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
移除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 自定义开单 并且 工时计价 -->
|
||||
<el-table
|
||||
:data="createAndBillFormTwo_two.accessoryList"
|
||||
v-if="createAndBillFormTwo.isPackage == 0 && createAndBillFormTwo.type == 2"
|
||||
>
|
||||
<el-table-column prop="accessoryId" label="材料id"> </el-table-column>
|
||||
<el-table-column prop="name" label="材料名称"> </el-table-column>
|
||||
<el-table-column prop="num" label="材料数量"> </el-table-column>
|
||||
<el-table-column prop="price" label="材料价格"> </el-table-column>
|
||||
<el-table-column prop="workingHour" label="工时数量"> </el-table-column>
|
||||
<el-table-column prop="workingPrice" label="工时价格"> </el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@click.native.prevent="accessoryListDeleteRow(scope.$index, createAndBillFormTwo_two.accessoryList)"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
移除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="createAndBillremoveBtn">取 消</el-button>
|
||||
<el-button type="primary" @click="createAndBillsureBtn">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 维修项目弹窗 二层 -->
|
||||
<el-dialog
|
||||
width="50%"
|
||||
title="维修项目"
|
||||
:visible.sync="createAndBilltwoVisible"
|
||||
append-to-body
|
||||
@close="removeBtnTwo"
|
||||
>
|
||||
<el-form :model="createAndBillFormTwo">
|
||||
<el-row>
|
||||
<el-form-item label="开单方式:" :rules="[{ required: true, message: '请选择', trigger: 'blur' }]">
|
||||
<el-radio-group v-model="createAndBillFormTwo.isPackage">
|
||||
<el-radio :label="0">自定义开单</el-radio>
|
||||
<el-radio :label="1">快速开单</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="计价类型:" :rules="[{ required: true, message: '请选择', trigger: 'blur' }]">
|
||||
<el-radio-group v-model="createAndBillFormTwo.type">
|
||||
<el-radio :label="1">金额计价</el-radio>
|
||||
<el-radio :label="2">工时计价</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
|
||||
<!-- 当选择 自定义开单 并且 金额计价 时 -->
|
||||
<el-row v-if="createAndBillFormTwo.isPackage == 0 && createAndBillFormTwo.type == 1">
|
||||
<el-form-item label="维修项目名称:" :rules="[{ required: true, message: '请输入维修项目', trigger: 'blur' }]">
|
||||
<el-input v-model="createAndBillFormTwo.name" placeholder="请输入维修项目"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="材料价格:" :rules="[{ required: true, message: '请输入材料价格', trigger: 'blur' }]">
|
||||
<el-input v-model.number="createAndBillFormTwo.price" placeholder="请输入材料价格"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="工时数量:" :rules="[{ required: true, trigger: 'blur' }]">
|
||||
<el-input-number
|
||||
v-model="createAndBillFormTwo.workingHour"
|
||||
:precision="2"
|
||||
:step="0.5"
|
||||
:min="1"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="工时单价:" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<el-input v-model.number="createAndBillFormTwo.workingPrice" placeholder="请输入"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="套餐id:">
|
||||
<el-select v-model="createAndBillFormTwo.packageId" placeholder="请选择">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
</el-row>
|
||||
<!-- 当选择 自定义开单 并且 工时计价 时 -->
|
||||
<el-row v-if="createAndBillFormTwo.isPackage == 0 && createAndBillFormTwo.type == 2">
|
||||
<el-form-item label="维修项目名称:" :rules="[{ required: true, message: '请输入维修项目', trigger: 'blur' }]">
|
||||
<el-input v-model="createAndBillFormTwo.name" placeholder="请输入维修项目"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-form :model="createAndBillFormThree" ref="createAndBillFormThree">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="材料id:" :rules="[{ required: true, message: '请选择', trigger: 'blur' }]">
|
||||
<el-select v-model="createAndBillFormThree.accessoryId" placeholder="请选择材料">
|
||||
<el-option v-for="item in accessoryIdarr" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-form-item label="工时价格:" :rules="[{ required: true, message: '请选择', trigger: 'blur' }]">
|
||||
<!-- <el-cascader
|
||||
clearable
|
||||
v-model.number="createAndBillFormThree.workingPrice"
|
||||
:options="projectCategoryTreeList"
|
||||
:props="{ value: 'workPrice', label: 'names', children: 'childList', checkStrictly: true }"
|
||||
:show-all-levels="false"
|
||||
:render-format="
|
||||
(labels, selectedData) => {
|
||||
const { name, workPrice } = selectedData[selectedData.length - 1];
|
||||
return `${name} - ${workPrice}`;
|
||||
}
|
||||
"
|
||||
>
|
||||
</el-cascader> -->
|
||||
<!-- v-model.number="createAndBillFormThree.workingPrice" -->
|
||||
<el-cascader
|
||||
:options="projectCategoryTreeList"
|
||||
v-model.number="ThreeWorkingPrice"
|
||||
:props="{ value: 'workPrice', label: 'name', children: 'childList', checkStrictly: true }"
|
||||
>
|
||||
<template slot-scope="{ node, data }">
|
||||
<span>{{ data.name }}/{{ data.workPrice }}元</span>
|
||||
<!-- <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span> -->
|
||||
</template>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="材料名称:" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<el-input v-model="createAndBillFormThree.name" placeholder="请输入材料名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-form-item label="工时数量:" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<el-input
|
||||
v-model.number="createAndBillFormThree.workingHour"
|
||||
placeholder="请输入工时数量"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="材料数量:" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<el-input v-model.number="createAndBillFormThree.num" placeholder="请输入材料数量"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-form-item label="材料价格:" :rules="[{ required: true, message: '请输入', trigger: 'blur' }]">
|
||||
<el-input v-model.number="createAndBillFormThree.price" placeholder="请输入材料价格"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="removeBtnTwo">取 消</el-button>
|
||||
<el-button type="primary" @click="sureBtnTwo">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
billingAPI,
|
||||
reBillingAPI,
|
||||
createAndBillAPI,
|
||||
accessoryCategoryListAPI,
|
||||
accessoryListAPI,
|
||||
projectCategoryTreeAPI,
|
||||
} from '@/api/reservation/order';
|
||||
|
||||
const obj = {
|
||||
dashboardImage: '',
|
||||
driveLicenseImage: '',
|
||||
drivingLicenseImage: '',
|
||||
faultImage: '',
|
||||
faultVideo: '',
|
||||
headerImage: '',
|
||||
kilometer: null,
|
||||
vinImage: '',
|
||||
};
|
||||
export default {
|
||||
name: 'creatLevel',
|
||||
props: {
|
||||
currentBtnId: Number,
|
||||
createAndBillForm: Object,
|
||||
title: String,
|
||||
projectList: {
|
||||
type: Array,
|
||||
default: function () {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
faultList: {
|
||||
type: Array,
|
||||
default: function () {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
optionsCarNo: {
|
||||
type: Array,
|
||||
default: [],
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
listLoading: true,
|
||||
|
||||
loading: false,
|
||||
loadingBtn: false,
|
||||
orderDataList: [],
|
||||
|
||||
// 创建工单并开单
|
||||
createAndBillFormVisible: false,
|
||||
createAndBilltwoVisible: false,
|
||||
// 一层
|
||||
dynamicValidateForm: [],
|
||||
dynamicValidateFormObj: { content: '' },
|
||||
carList: [],
|
||||
// 二层
|
||||
createAndBillFormTwo: {
|
||||
accessoryList: [],
|
||||
isPackage: null,
|
||||
name: '',
|
||||
price: null,
|
||||
type: null,
|
||||
workingHour: null,
|
||||
workingPrice: null,
|
||||
},
|
||||
createAndBillFormTwo_two: {
|
||||
accessoryList: [],
|
||||
name: '',
|
||||
isPackage: null,
|
||||
type: null,
|
||||
},
|
||||
// 三层
|
||||
createAndBillFormThree: {
|
||||
accessoryId: null,
|
||||
name: '',
|
||||
num: null,
|
||||
price: null,
|
||||
workingHour: null,
|
||||
workingPrice: null,
|
||||
},
|
||||
accessoryIdarr: [],
|
||||
projectCategoryTreeList: [],
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
formValidate: Object.assign({}, obj),
|
||||
ThreeWorkingPrice: [],
|
||||
};
|
||||
},
|
||||
// watch: {
|
||||
// createAndBillForm: {
|
||||
// handler(val) {
|
||||
// console.log(val);
|
||||
// },
|
||||
// deep: true,
|
||||
// },
|
||||
// },
|
||||
mounted() {},
|
||||
created() {
|
||||
// this.$parent.getList('all');
|
||||
},
|
||||
methods: {
|
||||
// 点击+图
|
||||
modalPicTap(tit, num) {
|
||||
const _this = this;
|
||||
this.$modalUpload(
|
||||
function (img) {
|
||||
// console.log(img, 'imgggggggggggggggg');
|
||||
if (tit === '1' && num === 'dashboardImage') {
|
||||
_this.formValidate.dashboardImage = img[0].sattDir;
|
||||
this.$set(_this.createAndBillForm.maintenance, 'dashboardImage', _this.formValidate.dashboardImage);
|
||||
}
|
||||
if (tit === '2' && num === 'driveLicenseImage') {
|
||||
_this.formValidate.driveLicenseImage = img[0].sattDir;
|
||||
this.$set(_this.createAndBillForm.maintenance, 'driveLicenseImage', _this.formValidate.driveLicenseImage);
|
||||
}
|
||||
if (tit === '3' && num === 'drivingLicenseImage') {
|
||||
_this.formValidate.drivingLicenseImage = img[0].sattDir;
|
||||
this.$set(
|
||||
_this.createAndBillForm.maintenance,
|
||||
'drivingLicenseImage',
|
||||
_this.formValidate.drivingLicenseImage,
|
||||
);
|
||||
}
|
||||
if (tit === '4' && num === 'faultImage') {
|
||||
_this.formValidate.faultImage = img[0].sattDir;
|
||||
this.$set(_this.createAndBillForm.maintenance, 'faultImage', _this.formValidate.faultImage);
|
||||
}
|
||||
if (tit === '5' && num === 'faultVideo') {
|
||||
_this.formValidate.faultVideo = img[0].sattDir;
|
||||
this.$set(_this.createAndBillForm.maintenance, 'faultVideo', _this.formValidate.faultVideo);
|
||||
}
|
||||
if (tit === '6' && num === 'headerImage') {
|
||||
_this.formValidate.headerImage = img[0].sattDir;
|
||||
this.$set(_this.createAndBillForm.maintenance, 'headerImage', _this.formValidate.headerImage);
|
||||
}
|
||||
if (tit === '7' && num === 'vinImage') {
|
||||
_this.formValidate.vinImage = img[0].sattDir;
|
||||
this.$set(_this.createAndBillForm.maintenance, 'vinImage', _this.formValidate.vinImage);
|
||||
}
|
||||
// this.$set(_this.createAndBillForm.maintenance, 'isShow', true);
|
||||
},
|
||||
tit,
|
||||
'createAndBillForm.maintenance',
|
||||
);
|
||||
},
|
||||
|
||||
// 二层
|
||||
async openTwoDialog() {
|
||||
this.createAndBilltwoVisible = true;
|
||||
const res = await accessoryCategoryListAPI();
|
||||
res.forEach((item) => {
|
||||
this.accessoryIdarr.push(item);
|
||||
});
|
||||
// const res = await accessoryListAPI();
|
||||
// res.list.forEach((item) => {
|
||||
// this.accessoryIdarr.push(item);
|
||||
// });
|
||||
this.projectCategoryTreeList = await projectCategoryTreeAPI();
|
||||
},
|
||||
async sureBtnTwo() {
|
||||
this.createAndBilltwoVisible = false;
|
||||
this.createAndBillFormThree.workingPrice = this.ThreeWorkingPrice[1];
|
||||
if (this.createAndBillFormTwo.isPackage == 0 && this.createAndBillFormTwo.type == 1) {
|
||||
this.projectList.push(this.createAndBillFormTwo);
|
||||
} else if (this.createAndBillFormTwo.isPackage == 0 && this.createAndBillFormTwo.type == 2) {
|
||||
this.createAndBillFormTwo_two.isPackage = this.createAndBillFormTwo.isPackage;
|
||||
this.createAndBillFormTwo_two.type = this.createAndBillFormTwo.type;
|
||||
this.createAndBillFormTwo_two.name = this.createAndBillFormTwo.name;
|
||||
this.createAndBillFormTwo_two.accessoryList.push(this.createAndBillFormThree);
|
||||
this.projectList.push(this.createAndBillFormTwo_two);
|
||||
}
|
||||
// this.$parent.resetForm();
|
||||
},
|
||||
removeBtnTwo() {
|
||||
this.createAndBilltwoVisible = false;
|
||||
this.accessoryIdarr = [];
|
||||
this.ThreeWorkingPrice = [];
|
||||
this.projectCategoryTreeList = [];
|
||||
this.createAndBillFormTwo = {
|
||||
accessoryList: [],
|
||||
isPackage: null,
|
||||
name: '',
|
||||
price: null,
|
||||
type: null,
|
||||
workingHour: null,
|
||||
workingPrice: null,
|
||||
};
|
||||
this.createAndBillFormThree = {
|
||||
accessoryId: null,
|
||||
name: '',
|
||||
num: null,
|
||||
price: null,
|
||||
workingHour: null,
|
||||
workingPrice: null,
|
||||
};
|
||||
},
|
||||
// 一层
|
||||
async createAndBillsureBtn() {
|
||||
this.createAndBillFormVisible = false;
|
||||
// await this.faultList.push(this.dynamicValidateFormObj);
|
||||
// const res = await createAndBillAPI(this.createAndBillForm);
|
||||
// this.$message.success('创建成功');
|
||||
// this.$parent.getList('untreated');
|
||||
const apiMap = {
|
||||
1: createAndBillAPI,
|
||||
2: billingAPI,
|
||||
3: reBillingAPI,
|
||||
};
|
||||
await apiMap[this.currentBtnId](this.createAndBillForm);
|
||||
this.$message.success('开单成功');
|
||||
this.$parent.getList('all');
|
||||
// if (btnId == 1) {
|
||||
// const res = await createAndBillAPI(this.createAndBillForm);
|
||||
// this.$message.success('创建成功');
|
||||
// this.$parent.getList('untreated');
|
||||
// } else if (btnId == 2) {
|
||||
// console.log('进来开单了');
|
||||
// const res = await billingAPI(this.createAndBillForm);
|
||||
// this.$message.success('开单成功');
|
||||
// this.$parent.getList('untreated');
|
||||
// } else if (btnId == 3) {
|
||||
// console.log('进来重新开单了');
|
||||
// const res = await reBillingAPI(this.createAndBillForm);
|
||||
// this.$message.success('重新开单成功');
|
||||
// this.$parent.getList('refuse');
|
||||
// }
|
||||
|
||||
this.formValidate = Object.assign({}, obj);
|
||||
this.$parent.resetForm();
|
||||
},
|
||||
createAndBillremoveBtn() {
|
||||
this.createAndBillFormVisible = false;
|
||||
this.$parent.resetForm();
|
||||
// this.$parent.createAndBillForm = {};
|
||||
},
|
||||
// 移除
|
||||
projectListDeleteRow(index, rows) {
|
||||
rows.splice(index, 1);
|
||||
},
|
||||
accessoryListDeleteRow(index, rows) {
|
||||
rows.splice(index, 1);
|
||||
},
|
||||
// 故障现象
|
||||
addContentInput() {
|
||||
this.faultList.push({ content: '' });
|
||||
},
|
||||
removeContentInput(item) {
|
||||
const index = this.faultList.indexOf(item);
|
||||
if (index > -1) {
|
||||
this.faultList.splice(index, 1);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.contentDiv {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.con_btn_div {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 82px;
|
||||
height: 36px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.showALL_dialog {
|
||||
overflow: hidden;
|
||||
::v-deep .el-dialog {
|
||||
margin: 0 auto !important;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
.el-dialog__body {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50px;
|
||||
bottom: 50px;
|
||||
right: 0;
|
||||
padding: 0;
|
||||
z-index: 1;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
.dialog-footer {
|
||||
// border: 1px red solid;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
.descriBOX {
|
||||
padding: 30px;
|
||||
}
|
||||
.dialogSpan {
|
||||
font-size: 12px;
|
||||
color: salmon;
|
||||
}
|
||||
.pic {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
background: #1890ff;
|
||||
border-radius: 6px 6px 6px 6px;
|
||||
opacity: 1;
|
||||
text-align: center;
|
||||
margin-right: 12px;
|
||||
|
||||
.iconfont {
|
||||
color: #fff;
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep.el-drawer__header {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.box-container {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.box-container .list {
|
||||
float: left;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.box-container .sp {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.box-container .sp3 {
|
||||
width: 33.3333%;
|
||||
}
|
||||
|
||||
.box-container .sp100 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.box-container .list .name {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
text-align: right;
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
.box-container .list.image {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.box-container .list.image img {
|
||||
position: relative;
|
||||
top: 40px;
|
||||
}
|
||||
|
||||
::v-deep.el-form-item__content .el-rate {
|
||||
position: relative;
|
||||
top: 8px;
|
||||
}
|
||||
</style>
|
||||
@@ -30,7 +30,9 @@
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-button v-if="tabActive == 'untreated'" type="primary" @click="openDialog(1, '创建工单并开单')"
|
||||
>创建工单并开单</el-button
|
||||
>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="orderDataList"
|
||||
@@ -90,53 +92,48 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column prop="isArrived" label="是否到店">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.isArrived == true ? '已到店' : row.isArrived == false ? '未到店' : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="isPickUp" label="是否接车">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.isPickUp == true ? '已接车' : row.isPickUp == false ? '未接车' : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="isBilled" label="是否开单">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.isBilled == true ? '已开单' : row.isBilled == false ? '未开单' : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="isDamage" label="是否定损">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.isDamage == true ? '已定损' : row.isDamage == false ? '未定损' : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="isDelivery" label="是否交车">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.isDelivery == true ? '已交车' : row.isDelivery == false ? '未交车' : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="isFinish" label="是否完成">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.isFinish == true ? '已完成' : row.isFinish == false ? '未完成' : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="isSettlement" label="是否结算">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.isSettlement == true ? '已结算' : row.isSettlement == false ? '未结算' : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="isLogoff" label="是否注销">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.isLogoff == true ? '已注销' : row.isLogoff == false ? '未注销' : '' }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
|
||||
<!-- <el-table-column label="操作" fixed="right" align="center">
|
||||
<el-table-column label="操作" fixed="right" align="center" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="onEdit(scope.row)" class="mr10">详情</el-button>
|
||||
<el-button type="text" size="small" @click="onDelFn(scope.row.id)" class="mr10">删除</el-button>
|
||||
<el-button type="text" size="small" @click="detailBtn(scope.row)">详情</el-button>
|
||||
<!-- 未确认 -->
|
||||
<el-button v-if="tabActive == 'ucheck'" type="text" size="small" @click="ucheckAgreeBtn(scope.row)"
|
||||
>确认</el-button
|
||||
>
|
||||
|
||||
<!-- 未到店 -->
|
||||
<el-button v-if="tabActive == 'notArrive'" type="text" size="small" @click="agreeBtn(scope.row.id)"
|
||||
>确认到店</el-button
|
||||
>
|
||||
|
||||
<!-- 未处理有 -->
|
||||
<el-button
|
||||
v-if="tabActive == 'untreated'"
|
||||
type="text"
|
||||
size="small"
|
||||
@click="openDialog(2, '开单', scope.row.id)"
|
||||
>开单</el-button
|
||||
>
|
||||
|
||||
<!-- 待审核有 :disabled="scope.row.billAuditStatus !== 0" -->
|
||||
<el-button v-if="tabActive == 'billAudit'" type="text" size="small" @click="shenHeBtn(scope.row)"
|
||||
>开单审核</el-button
|
||||
>
|
||||
|
||||
<!-- 维修中有 -->
|
||||
<el-button v-if="tabActive == 'repair'" type="text" size="small" @click="finishBtn(scope.row)"
|
||||
>维修完成</el-button
|
||||
>
|
||||
|
||||
<!-- 已拒绝有 -->
|
||||
<el-button
|
||||
v-if="tabActive == 'refuse'"
|
||||
type="text"
|
||||
size="small"
|
||||
@click="openDialog(3, '重新开单', scope.row.id)"
|
||||
>重新开单</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="block">
|
||||
@@ -151,15 +148,264 @@
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<!-- 待审核 未确认 -->
|
||||
<el-dialog title="审核信息" :visible.sync="dialogFormVisible">
|
||||
<el-form :model="form">
|
||||
<el-form-item label="审核状态:" :label-width="formLabelWidth">
|
||||
<el-radio v-model="form.auditStatus" :label="1">已处理</el-radio>
|
||||
<el-radio v-model="form.auditStatus" :label="2">拒绝处理</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注:" :label-width="formLabelWidth">
|
||||
<el-input
|
||||
:required="form.auditStatus == '2'"
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
placeholder="请输入备注"
|
||||
v-model="form.remark"
|
||||
>
|
||||
</el-input>
|
||||
<span v-if="form.auditStatus == '2' && !form.remark" class="dialogSpan">请填写备注</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="removeBtn">取 消</el-button>
|
||||
<el-button type="primary" @click="sureBtn">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 维修完成 -->
|
||||
<el-dialog title="维修完成" :visible.sync="finishDialogFormVisible">
|
||||
<el-form :model="finishForm">
|
||||
<el-form-item label="车库:">
|
||||
<el-select v-model="finishForm.garageId" placeholder="请选择">
|
||||
<el-option v-for="item in finishOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="维修完成图片:" prop="repairFinishImage">
|
||||
<div class="upLoadPicBox" @click="modalPicTap('1', 'repairFinishImage')">
|
||||
<div v-if="finishForm.repairFinishImage" class="pictrue"><img :src="finishForm.repairFinishImage" /></div>
|
||||
<div v-else-if="formValidate.repairFinishImage" class="pictrue">
|
||||
<img :src="formValidate.repairFinishImage" />
|
||||
</div>
|
||||
<div v-else class="upLoad">
|
||||
<i class="el-icon-camera cameraIconfont" />
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="finishRemoveBtn">取 消</el-button>
|
||||
<el-button type="primary" @click="finishSureBtn">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 详情 -->
|
||||
<el-drawer :visible.sync="drawer" size="50%">
|
||||
<div class="descriBOX">
|
||||
<el-descriptions title="详情信息" border>
|
||||
<el-descriptions-item label="ID">{{ this.detailObj.id }}</el-descriptions-item>
|
||||
<el-descriptions-item label="汽车id">{{ this.detailObj.carId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="车牌号">{{ this.detailObj.carNo }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="维修店商户id">{{ this.detailObj.merId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="商户名称">{{
|
||||
this.detailObj.merName ? this.detailObj.merName : '无名'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="车辆型号id">{{ this.detailObj.modelId }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="车辆型号">{{ this.detailObj.modelName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="车主姓名">{{ this.detailObj.name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="车主电话">{{ this.detailObj.phone }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="维修类型">{{
|
||||
this.detailObj.repairType == 1
|
||||
? '常规保养'
|
||||
: this.detailObj.repairType == 2
|
||||
? '故障维修'
|
||||
: this.detailObj.repairType == 3
|
||||
? '事故维修'
|
||||
: this.detailObj.repairType == 4
|
||||
? '退车'
|
||||
: ''
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="预约单号">{{ this.detailObj.orderSn }}</el-descriptions-item>
|
||||
<el-descriptions-item label="预约预处理审核">
|
||||
{{
|
||||
this.detailObj.auditStatus == 0
|
||||
? '待审核'
|
||||
: this.detailObj.auditStatus == 1
|
||||
? '已处理'
|
||||
: this.detailObj.auditStatus == 2
|
||||
? '驳回'
|
||||
: ''
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="预约预处驳回理由">
|
||||
{{ this.detailObj.auditReason ? this.detailObj.auditReason : '无' }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="开单审核">
|
||||
{{
|
||||
this.detailObj.billAuditStatus == 0
|
||||
? '待审核'
|
||||
: this.detailObj.billAuditStatus == 1
|
||||
? '同意'
|
||||
: this.detailObj.billAuditStatus == 2
|
||||
? '拒绝'
|
||||
: ''
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="开单审核拒绝理由">
|
||||
{{ this.detailObj.billAuditReason ? this.detailObj.billAuditReason : '无' }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="是否到店">
|
||||
{{ this.detailObj.isArrived == true ? '已到店' : this.detailObj.isArrived == false ? '未到店' : '' }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="是否接车">
|
||||
{{ this.detailObj.isPickUp == true ? '已接车' : this.detailObj.isPickUp == false ? '未接车' : '' }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="是否开单">
|
||||
{{ this.detailObj.isBilled == true ? '已开单' : this.detailObj.isBilled == false ? '未开单' : '' }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="是否定损">
|
||||
{{ this.detailObj.isDamage == true ? '已定损' : this.detailObj.isDamage == false ? '未定损' : '' }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="是否交车">
|
||||
{{ this.detailObj.isDelivery == true ? '已交车' : this.detailObj.isDelivery == false ? '未交车' : '' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否完成">
|
||||
{{ this.detailObj.isFinish == true ? '已完成' : this.detailObj.isFinish == false ? '未完成' : '' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否结算">
|
||||
{{ this.detailObj.isSettlement == true ? '已结算' : this.detailObj.isSettlement == false ? '未结算' : '' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="状态值">
|
||||
{{ this.detailObj.showText }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div class="tableBox">
|
||||
<el-descriptions title="接单信息" border>
|
||||
<el-descriptions-item label="仪表盘图片">
|
||||
<img v-if="dashboardImage" style="width: 40px; height: 40px" :src="dashboardImage" alt="" />
|
||||
<i v-else class="el-icon-picture-outline"></i>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="驾驶证照片">
|
||||
<img v-if="driveLicenseImage" style="width: 40px; height: 40px" :src="driveLicenseImage" alt="" />
|
||||
<i v-else class="el-icon-picture-outline"></i>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="行驶证照片">
|
||||
<img v-if="drivingLicenseImage" style="width: 40px; height: 40px" :src="drivingLicenseImage" alt="" />
|
||||
<i v-else class="el-icon-picture-outline"></i>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="故障照片">
|
||||
<img v-if="faultImage" style="width: 40px; height: 40px" :src="faultImage" alt="" />
|
||||
<i v-else class="el-icon-picture-outline"></i>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="故障视频">
|
||||
<video v-if="faultVideo" style="width: 40px; height: 40px" :src="faultVideo" alt="" />
|
||||
<i v-else class="el-icon-video-camera"></i>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="车头照片">
|
||||
<img v-if="headerImage" style="width: 40px; height: 40px" :src="headerImage" alt="" />
|
||||
<i v-else class="el-icon-picture-outline"></i>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="车架号照片">
|
||||
<img v-if="vinImage" style="width: 40px; height: 40px" :src="vinImage" alt="" />
|
||||
<i v-else class="el-icon-picture-outline"></i>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div class="tableBox">
|
||||
<el-table
|
||||
:data="detailObj.projectList"
|
||||
style="width: 100%"
|
||||
:header-cell-style="{ background: '#e8f4ff', color: '#606266' }"
|
||||
>
|
||||
<el-table-column label="维修项目:">
|
||||
<el-table-column prop="name" label="维修项目名称"> </el-table-column>
|
||||
<el-table-column prop="price" label="材料价格"> </el-table-column>
|
||||
<el-table-column prop="type" label="计价方式">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.type == 1 ? '金额计价' : row.type == 2 ? '工时计价' : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="isPackage" label="开单方式">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.type == 0 ? '自定义' : row.type == 1 ? '套餐' : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="workingHour" label="工时"> </el-table-column>
|
||||
<el-table-column prop="workingPrice" label="工时价格"> </el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
|
||||
<creat-level
|
||||
:title="dialogTitle"
|
||||
ref="grades"
|
||||
v-if="createAndBillForm"
|
||||
:createAndBillForm="createAndBillForm"
|
||||
:optionsCarNo="optionsCarNo"
|
||||
:projectList="createAndBillForm.projectList"
|
||||
:faultList="createAndBillForm.faultList"
|
||||
:currentBtnId="currentBtnId"
|
||||
></creat-level>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { arriveAPI, auditAPI, auditCheckAPI, orderCheckListAPI, infoDetailAPI, listAPI } from '@/api/reservation/order';
|
||||
import {
|
||||
orderCheckListAPI,
|
||||
infoDetailAPI,
|
||||
finishRepairAPI,
|
||||
carListAPI,
|
||||
arriveAPI,
|
||||
auditAPI,
|
||||
auditCheckAPI,
|
||||
orderDetailAPI,
|
||||
listAPI,
|
||||
projectCategoryTreeAPI,
|
||||
} from '@/api/reservation/order';
|
||||
import creatLevel from './creatLevel';
|
||||
import { garageListAPI } from '@/api/garage';
|
||||
const obj = {
|
||||
repairFinishImage: '',
|
||||
id: null,
|
||||
garageId: null,
|
||||
};
|
||||
export default {
|
||||
name: 'reservationOrder',
|
||||
components: {
|
||||
creatLevel,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 维修完成
|
||||
finishDialogFormVisible: false,
|
||||
finishOptions: [],
|
||||
finishForm: {
|
||||
repairFinishImage: '',
|
||||
id: null,
|
||||
},
|
||||
formValidate: Object.assign({}, obj),
|
||||
// 开单审核
|
||||
dialogFormVisible: false,
|
||||
form: {
|
||||
auditStatus: '',
|
||||
remark: '',
|
||||
},
|
||||
formLabelWidth: '120px',
|
||||
|
||||
currentTab: 0,
|
||||
tabActive: 'all',
|
||||
visible: false,
|
||||
@@ -201,6 +447,41 @@ export default {
|
||||
repairType: 2,
|
||||
},
|
||||
orderDataList: [],
|
||||
// 详情
|
||||
detailObj: {},
|
||||
dashboardImage: '',
|
||||
driveLicenseImage: '',
|
||||
drivingLicenseImage: '',
|
||||
faultImage: '',
|
||||
faultVideo: '',
|
||||
headerImage: '',
|
||||
vinImage: '',
|
||||
drawer: false,
|
||||
title: '',
|
||||
// 创建工单并开单
|
||||
createAndBillForm: {
|
||||
carReservationOrderId: undefined,
|
||||
orderType: '',
|
||||
carNo: '',
|
||||
name: '',
|
||||
phone: '',
|
||||
repairType: 1,
|
||||
projectList: [],
|
||||
maintenance: {
|
||||
dashboardImage: '',
|
||||
driveLicenseImage: '',
|
||||
drivingLicenseImage: '',
|
||||
faultImage: '',
|
||||
faultVideo: '',
|
||||
headerImage: '',
|
||||
kilometer: null,
|
||||
vinImage: '',
|
||||
},
|
||||
faultList: [{ content: '' }],
|
||||
},
|
||||
optionsCarNo: [],
|
||||
currentBtnId: null,
|
||||
dialogTitle: '',
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
@@ -208,6 +489,23 @@ export default {
|
||||
this.getList('all');
|
||||
},
|
||||
methods: {
|
||||
// 开单
|
||||
async openDialog(btnId, title, id = null) {
|
||||
this.currentBtnId = btnId;
|
||||
this.dialogTitle = title;
|
||||
this.createAndBillForm.carReservationOrderId = id;
|
||||
this.$refs.grades.createAndBillFormVisible = true;
|
||||
carListAPI().then((res) => {
|
||||
this.carList = res.list;
|
||||
res.list.forEach((item) => {
|
||||
this.optionsCarNo.push({
|
||||
id: item.id,
|
||||
carNo: item.carNo,
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
handleClick(tab) {
|
||||
this.tabActive = tab.name;
|
||||
this.getList(this.tabActive);
|
||||
@@ -241,20 +539,141 @@ export default {
|
||||
(this.tableFrom = { carNo: '', orderSn: '', name: '', phone: '', repairType: 2, orderType: 'all' }),
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
// 详情
|
||||
onEdit(row) {
|
||||
console.log(row, 'row-editttttttttt');
|
||||
// 维修完成 +图
|
||||
modalPicTap(tit, num) {
|
||||
const _this = this;
|
||||
this.$modalUpload(
|
||||
function (img) {
|
||||
if (tit === '1' && num === 'icon') {
|
||||
_this.formValidate.icon = img[0].sattDir;
|
||||
this.$set(_this.finishForm, 'icon', _this.formValidate.icon);
|
||||
} else {
|
||||
_this.formValidate.repairFinishImage = img[0].sattDir;
|
||||
this.$set(_this.finishForm, 'repairFinishImage', _this.formValidate.repairFinishImage);
|
||||
}
|
||||
},
|
||||
tit,
|
||||
'finishForm',
|
||||
);
|
||||
},
|
||||
// 删除
|
||||
onDelFn(id) {
|
||||
console.log(id, 'del-iddddddd');
|
||||
async finishSureBtn() {
|
||||
await finishRepairAPI(this.finishForm);
|
||||
this.$message.success('维修完成');
|
||||
this.getList('repair');
|
||||
this.finishDialogFormVisible = false;
|
||||
this.finishForm = {
|
||||
repairFinishImage: '',
|
||||
id: null,
|
||||
garageId: null,
|
||||
};
|
||||
},
|
||||
finishRemoveBtn() {
|
||||
this.finishDialogFormVisible = false;
|
||||
this.finishForm = {
|
||||
repairFinishImage: '',
|
||||
id: null,
|
||||
garageId: null,
|
||||
};
|
||||
},
|
||||
// 详情
|
||||
async detailBtn(row) {
|
||||
this.drawer = true;
|
||||
const res = await orderDetailAPI({ id: row.id });
|
||||
this.detailObj = res;
|
||||
this.maintenance = res.maintenance;
|
||||
this.dashboardImage = res.maintenance.dashboardImage;
|
||||
this.driveLicenseImage = res.maintenance.driveLicenseImage;
|
||||
this.drivingLicenseImage = res.maintenance.drivingLicenseImage;
|
||||
this.faultImage = res.maintenance.faultImage;
|
||||
this.faultVideo = res.maintenance.faultVideo;
|
||||
this.headerImage = res.maintenance.headerImage;
|
||||
this.vinImage = res.maintenance.vinImage;
|
||||
let toRemove = 'https://jimte.oss-cn-hangzhou.aliyuncs.com/';
|
||||
this.dashboardImage = this.dashboardImage.replace(toRemove, '');
|
||||
this.driveLicenseImage = this.driveLicenseImage.replace(toRemove, '');
|
||||
this.drivingLicenseImage = this.drivingLicenseImage.replace(toRemove, '');
|
||||
this.faultImage = this.faultImage.replace(toRemove, '');
|
||||
this.faultVideo = this.faultVideo.replace(toRemove, '');
|
||||
this.headerImage = this.headerImage.replace(toRemove, '');
|
||||
this.vinImage = this.vinImage.replace(toRemove, '');
|
||||
},
|
||||
// 维修中 维修完成
|
||||
async finishBtn(row) {
|
||||
this.finishDialogFormVisible = true;
|
||||
const res = await garageListAPI();
|
||||
this.finishOptions = res.list;
|
||||
this.finishForm.id = row.id;
|
||||
},
|
||||
// 未确认
|
||||
ucheckAgreeBtn(row) {
|
||||
this.dialogFormVisible = true;
|
||||
this.form.id = row.id;
|
||||
},
|
||||
// 待审核
|
||||
shenHeBtn(row) {
|
||||
this.dialogFormVisible = true;
|
||||
this.form.id = row.id;
|
||||
},
|
||||
sureBtn() {
|
||||
if (this.form.auditStatus == '2' && this.form.remark == '') {
|
||||
this.dialogFormVisible = true;
|
||||
return;
|
||||
}
|
||||
if (this.tabActive == 'billAudit') {
|
||||
auditAPI(this.form);
|
||||
this.$message.success('审核成功');
|
||||
this.getList('billAudit');
|
||||
this.dialogFormVisible = false;
|
||||
this.form = {};
|
||||
} else if (this.tabActive == 'ucheck') {
|
||||
auditCheckAPI(this.form);
|
||||
this.$message.success('确认成功');
|
||||
this.getList('ucheck');
|
||||
this.dialogFormVisible = false;
|
||||
this.form = {};
|
||||
}
|
||||
},
|
||||
removeBtn() {
|
||||
this.dialogFormVisible = false;
|
||||
this.form = {};
|
||||
},
|
||||
// 确认到店
|
||||
async agreeBtn(id) {
|
||||
await arriveAPI({ id });
|
||||
},
|
||||
resetForm() {
|
||||
this.createAndBillForm = {
|
||||
carReservationOrderId: undefined,
|
||||
orderType: '',
|
||||
carNo: '',
|
||||
name: '',
|
||||
phone: '',
|
||||
repairType: 1,
|
||||
projectList: [],
|
||||
maintenance: {
|
||||
dashboardImage: '',
|
||||
driveLicenseImage: '',
|
||||
drivingLicenseImage: '',
|
||||
faultImage: '',
|
||||
faultVideo: '',
|
||||
headerImage: '',
|
||||
kilometer: null,
|
||||
vinImage: '',
|
||||
},
|
||||
faultList: [],
|
||||
};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.descriBOX {
|
||||
padding: 30px;
|
||||
}
|
||||
.tableBox {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.pic {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
|
||||
Reference in New Issue
Block a user