结算,退车
This commit is contained in:
@@ -62,6 +62,10 @@ export const insuranceCompanyListAPI = () => request.get('/publicly/insurance/co
|
||||
// 事故接待-定损 /api/admin/merchant/car/reservation/order/damage
|
||||
export const damageAPI = (data) => request.post(`/admin/merchant/car/reservation/order/damage`, data);
|
||||
|
||||
// 事故接待-结算 /api/admin/merchant/car/reservation/order/settlementAccident
|
||||
export const settlementAccidentAPI = (data) =>
|
||||
request.post(`/admin/merchant/car/reservation/order/settlementAccident`, data);
|
||||
|
||||
// 事故接待-接车 /api/admin/merchant/car/reservation/order/picup
|
||||
export const picupAPI = (data) => request.post(`/admin/merchant/car/reservation/order/picup`, data);
|
||||
|
||||
@@ -71,6 +75,10 @@ export const accientBillingAPI = (data) => request.post(`/admin/merchant/car/res
|
||||
// 退车接待-接车 /api/admin/merchant/car/reservation/order/picupReturn
|
||||
export const picupReturnAPI = (data) => request.post(`/admin/merchant/car/reservation/order/picupReturn`, data);
|
||||
|
||||
// 退车接待-创建工单并接车 /api/admin/merchant/car/reservation/order/createAndPicUpReturn
|
||||
export const createAndPicUpReturnAPI = (data) =>
|
||||
request.post(`/admin/merchant/car/reservation/order/createAndPicUpReturn`, data);
|
||||
|
||||
// dp公司id /api/publicly/dp/company/listAll
|
||||
export const dpCompanyListAllAPI = () => request.get('/publicly/dp/company/listAll');
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div class="divBox">
|
||||
<!-- 事故维修 -->
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-tabs v-model="tabActive" @tab-click="handleClick">
|
||||
@@ -106,9 +107,16 @@
|
||||
<el-button v-if="tabActive == 'unbill'" type="text" size="small" @click="openAccientBillingBtn(scope.row)"
|
||||
>开单</el-button
|
||||
>
|
||||
|
||||
<!-- 待结算 -->
|
||||
<el-button v-if="tabActive == 'unsettlement'" type="text" size="small" @click="unsettlementBtn(scope.row)"
|
||||
>结算</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 测试 -->
|
||||
<!-- <el-button type="text" @click="unsettlementBtn">结算</el-button> -->
|
||||
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
@@ -237,11 +245,71 @@
|
||||
:accientBillingForm="accientBillingForm"
|
||||
:projectList="accientBillingForm.projectList"
|
||||
></creat-level>
|
||||
|
||||
<!-- 结算 -->
|
||||
<el-dialog title="结算" :visible.sync="unsettlementVisible" width="30%" :before-close="unsettlementQuxiaobtn">
|
||||
<el-form :model="unsettlementForm">
|
||||
<el-row>
|
||||
<el-form-item label="工单id">
|
||||
<el-input v-model="unsettlementForm.carReservationOrderId" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="理赔进度" :rules="[{ required: true, message: '请选择', trigger: 'blur' }]">
|
||||
<el-select v-model="unsettlementForm.claimProfress" placeholder="请选择理赔进度">
|
||||
<el-option label="待盖章" :value="1"></el-option>
|
||||
<el-option label="已提交" :value="2"></el-option>
|
||||
<el-option label="待打款" :value="3"></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-select v-model="unsettlementForm.claimType" placeholder="请选择理赔情况">
|
||||
<el-option label="未到账" :value="1"></el-option>
|
||||
<el-option label="部分到账" :value="2"></el-option>
|
||||
<el-option label="已到账" :value="3"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item
|
||||
label="到账时间"
|
||||
prop="receiptTime"
|
||||
:rules="[{ required: true, message: '请选择', trigger: 'blur' }]"
|
||||
>
|
||||
<el-date-picker v-model="unsettlementForm.receiptTime" type="date" placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</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="unsettlementForm.settlementRemark" placeholder="请输入"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="unsettlementQuxiaobtn">取 消</el-button>
|
||||
<el-button type="primary" @click="unsettlementFormBtn">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listAPI, picupAPI, damageAPI, dutyCategoryListAPI, insuranceCompanyListAPI } from '@/api/reservation/order';
|
||||
import {
|
||||
listAPI,
|
||||
picupAPI,
|
||||
damageAPI,
|
||||
dutyCategoryListAPI,
|
||||
insuranceCompanyListAPI,
|
||||
settlementAccidentAPI,
|
||||
} from '@/api/reservation/order';
|
||||
import creatLevel from './creatLevel';
|
||||
const obj = {
|
||||
id: null,
|
||||
@@ -342,6 +410,16 @@ export default {
|
||||
remark: '',
|
||||
},
|
||||
dialogTitle: '',
|
||||
|
||||
// 结算
|
||||
unsettlementVisible: false,
|
||||
unsettlementForm: {
|
||||
carReservationOrderId: null,
|
||||
claimProfress: null,
|
||||
claimType: null,
|
||||
receiptTime: '',
|
||||
settlementRemark: '',
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
@@ -349,6 +427,22 @@ export default {
|
||||
this.getList('all');
|
||||
},
|
||||
methods: {
|
||||
// 待结算
|
||||
unsettlementBtn(row) {
|
||||
this.unsettlementVisible = true;
|
||||
this.unsettlementForm.carReservationOrderId = row.id;
|
||||
// this.unsettlementForm.carReservationOrderId = 8;
|
||||
},
|
||||
async unsettlementFormBtn() {
|
||||
this.unsettlementVisible = false;
|
||||
this.unsettlementForm.receiptTime = this.dateChange(this.unsettlementForm.receiptTime);
|
||||
const res = await settlementAccidentAPI(this.unsettlementForm);
|
||||
console.log(res, 'res-unsettlementFormBtn');
|
||||
},
|
||||
unsettlementQuxiaobtn() {
|
||||
this.unsettlementVisible = false;
|
||||
this.unsettlementForm = {};
|
||||
},
|
||||
// 待开单--开单
|
||||
openAccientBillingBtn(row) {
|
||||
// console.log(row, 'row--openBtn');
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div class="divBox">
|
||||
<!-- 退车接待 -->
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-tabs v-model="tabActive" @tab-click="handleClick">
|
||||
@@ -30,7 +31,7 @@
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<el-button v-if="tabActive == 'untreated'" type="primary" @click="openDialog(1, '创建工单并开单')"
|
||||
<el-button v-if="tabActive == 'unpickup'" type="primary" @click="openDialog(1, '创建工单并接车', null)"
|
||||
>创建工单并接车</el-button
|
||||
>
|
||||
<el-table
|
||||
@@ -94,7 +95,12 @@
|
||||
<el-table-column label="操作" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<!-- 待接车 -->
|
||||
<el-button v-if="tabActive == 'unpickup'" type="text" size="small" @click="picupBtn(scope.row)"
|
||||
<!-- <el-button v-if="tabActive == 'unpickup'" type="text" size="small" @click="picupBtn(scope.row)">接车</el-button> -->
|
||||
<el-button
|
||||
v-if="tabActive == 'unpickup'"
|
||||
type="text"
|
||||
size="small"
|
||||
@click="openDialog(2, '接车', scope.row.id)"
|
||||
>接车</el-button
|
||||
>
|
||||
<!-- 待交车 -->
|
||||
@@ -119,8 +125,8 @@
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
<!-- 接车 -->
|
||||
<el-dialog title="确认接车" :visible.sync="picupDialogVisible" width="60%" class="showALL_dialog">
|
||||
<!-- 创建,接车 -->
|
||||
<el-dialog :title="picuptitle" :visible.sync="picupDialogVisible" width="60%" class="showALL_dialog">
|
||||
<el-form :model="picupForm" ref="picupForm" class="demo-ruleForm" v-loading="loading">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
@@ -130,7 +136,7 @@
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-form-item
|
||||
label="dp公司Id"
|
||||
label="dp公司"
|
||||
prop="dpCompanyId"
|
||||
:rules="[{ required: true, message: '请选择', trigger: 'blur' }]"
|
||||
>
|
||||
@@ -214,6 +220,62 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- -->
|
||||
<el-row v-if="picupForm.id == null">
|
||||
<el-col :span="4">
|
||||
<el-form-item
|
||||
label="维修店商户id"
|
||||
prop="merId"
|
||||
:rules="[{ required: true, message: '请选择', trigger: 'blur' }]"
|
||||
>
|
||||
<el-select v-model="picupForm.merId" placeholder="请选择">
|
||||
<el-option v-for="item in orderDataList" :key="item.id" :label="item.merName" :value="item.merId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="1">
|
||||
<el-form-item label="车牌号" prop="carNo" :rules="[{ required: true, message: '请选择', trigger: 'blur' }]">
|
||||
<el-select v-model="picupForm.carNo" placeholder="请选择">
|
||||
<el-option v-for="item in carNooptions" :key="item.id" :label="item.carNo" :value="item.carNo">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-form-item
|
||||
label="司机名称"
|
||||
prop="name"
|
||||
:rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
|
||||
>
|
||||
<el-input v-model.trim="picupForm.name" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-form-item
|
||||
label="联系方式"
|
||||
prop="phone"
|
||||
:rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
|
||||
>
|
||||
<el-input v-model.number="picupForm.phone" maxlength="11" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="5" :offset="1">
|
||||
<el-form-item
|
||||
label="维修类型:"
|
||||
prop="repairType"
|
||||
:rules="[{ required: true, message: '请选择', trigger: 'blur' }]"
|
||||
>
|
||||
<el-radio-group v-model="picupForm.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-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
@@ -551,7 +613,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listAPI, picupReturnAPI, dpCompanyListAllAPI, deliveryCarReturnAPI } from '@/api/reservation/order';
|
||||
import {
|
||||
listAPI,
|
||||
picupReturnAPI,
|
||||
createAndPicUpReturnAPI,
|
||||
dpCompanyListAllAPI,
|
||||
deliveryCarReturnAPI,
|
||||
carListAPI,
|
||||
} from '@/api/reservation/order';
|
||||
const obj = {
|
||||
damageImage: '',
|
||||
deliveryImage: '',
|
||||
@@ -614,7 +683,6 @@ export default {
|
||||
frontHood: 2,
|
||||
glass: 2,
|
||||
hehindBumper: 2,
|
||||
id: null,
|
||||
kilometer: null,
|
||||
leftApillar: 2,
|
||||
leftBeam: 2,
|
||||
@@ -641,9 +709,22 @@ export default {
|
||||
rightFrontRing: 2,
|
||||
rightFrontTire: 2,
|
||||
rightRearview: 2,
|
||||
id: null,
|
||||
carNo: null,
|
||||
merId: null,
|
||||
name: '',
|
||||
phone: null,
|
||||
repairType: 4,
|
||||
},
|
||||
picuptitle: '',
|
||||
formValidate: Object.assign({}, obj),
|
||||
// dpId
|
||||
dpCompanyIdoptions: [],
|
||||
carNooptions: [],
|
||||
carNoData: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
},
|
||||
// 交车
|
||||
deliveryCarDialogVisible: false,
|
||||
deliveryCarForm: {
|
||||
@@ -657,23 +738,37 @@ export default {
|
||||
this.getList('all');
|
||||
},
|
||||
methods: {
|
||||
// 接车
|
||||
async picupBtn(row) {
|
||||
// 创建并接车 - 接车
|
||||
async openDialog(num, str, id) {
|
||||
console.log(num, str, id, 'num-str-id');
|
||||
this.picupDialogVisible = true;
|
||||
this.picupForm.id = row.id;
|
||||
this.dpCompanyIdoptions = await dpCompanyListAllAPI();
|
||||
const res = await carListAPI(this.carNoData);
|
||||
this.carNooptions = res.list;
|
||||
this.picuptitle = str;
|
||||
this.picupForm.id = id;
|
||||
},
|
||||
// 接车
|
||||
// async picupBtn(row) {
|
||||
// this.picupDialogVisible = true;
|
||||
// this.picupForm.id = row.id;
|
||||
// },
|
||||
submitFormPicup() {
|
||||
this.$refs['picupForm'].validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
const res = await picupReturnAPI(this.picupForm);
|
||||
this.loading = false;
|
||||
this.picupDialogVisible = false;
|
||||
this.$message.success('接车成功');
|
||||
if (this.picupForm.id) {
|
||||
const res = await picupReturnAPI(this.picupForm);
|
||||
this.$message.success('接车成功');
|
||||
} else {
|
||||
await createAndPicUpReturnAPI(this.picupForm);
|
||||
this.$message.success('创建并接车成功');
|
||||
}
|
||||
this.formValidate = Object.assign({}, obj);
|
||||
this.picupDialogVisible = false;
|
||||
this.getList('unpickup');
|
||||
}
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
resetFormPicup() {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div class="divBox">
|
||||
<!-- 常规保养 -->
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-tabs v-model="tabActive" @tab-click="handleClick">
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div class="divBox">
|
||||
<!-- 故障维修 -->
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-tabs v-model="tabActive" @tab-click="handleClick">
|
||||
|
||||
Reference in New Issue
Block a user