7.9(添加卖车商品页面
This commit is contained in:
@@ -37,3 +37,13 @@ export const detailAccidentAPI = (params) =>
|
||||
// 退车接待-工单详情 /api/admin/platform/car/reservation/order/detailReturn
|
||||
export const detailReturnAPI = (params) =>
|
||||
request.get('/admin/platform/car/reservation/order/detailReturn', { params });
|
||||
|
||||
|
||||
// 修改工单价格 api/admin/platform/car/reservation/order/modifyPrice
|
||||
export function modifyPriceAPI(params) {
|
||||
return request({
|
||||
url: `/admin/platform/car/reservation/order/modifyPrice`,
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
}
|
||||
@@ -25,6 +25,15 @@ const rentsellRouter = {
|
||||
},
|
||||
component: () => import('@/views/rentsell/sell/info'),
|
||||
},
|
||||
{
|
||||
path: 'carCommodity',
|
||||
name: 'carCommodity',
|
||||
meta: {
|
||||
title: '卖车商品',
|
||||
noCache: true,
|
||||
},
|
||||
component: () => import('@/views/rentsell/sell/carCommodity'),
|
||||
},
|
||||
{
|
||||
path: 'car_comment',
|
||||
name: 'commentList',
|
||||
|
||||
405
src/views/rentsell/sell/carCommodity/index.vue
Normal file
405
src/views/rentsell/sell/carCommodity/index.vue
Normal file
@@ -0,0 +1,405 @@
|
||||
<template>
|
||||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="container">
|
||||
<el-form :model="formData" inline size="small" label-width="110px">
|
||||
<el-form-item label="标题:">
|
||||
<el-input v-model.trim="formData.title" placeholder="请输入标题" class="selWidth"> </el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="车牌号:">
|
||||
<el-input v-model.trim="formData.brandId" placeholder="请输入品牌号" class="selWidth"> </el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- <el-button type="primary" class="mr10" @click="addBtn">新增汽车参数模板</el-button> -->
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="posterList"
|
||||
style="width: 100%"
|
||||
highlight-current-row
|
||||
class="switchTable"
|
||||
>
|
||||
<el-table-column prop="id" label="ID" width="40px" />
|
||||
<el-table-column prop="title" label="标题" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="image" label="主图">
|
||||
<template slot-scope="scope">
|
||||
<imagePreview :src="scope.row.image" style="width: 40px; height: 40px" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="brandName" label="品牌名称" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="modelName" label="型号名称" width="100px" show-overflow-tooltip></el-table-column>
|
||||
|
||||
<el-table-column prop="powerType" label="动力类型">
|
||||
<template v-slot="{ row }">
|
||||
{{ row.powerType == 0 ? '纯电' : row.powerType == 1 ? '油电' : '纯油' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="carDealerName" label="发布车商" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="depositMoney" label="定金" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="rentalPrice" label="租金/月" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="monthRent" label="租期" width="70px"></el-table-column>
|
||||
<el-table-column prop="sales" label="发布数量">
|
||||
<template slot-scope="scope">
|
||||
<el-tag @click="publishBtn(scope.row)" v-if="scope.row.sales > 0" effect="dark">{{
|
||||
scope.row.sales
|
||||
}}</el-tag>
|
||||
<el-tag @click="publishBtn(scope.row)" v-else type="info">{{ scope.row.sales }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="isShow" label="发布状态">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.isShow"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
active-text="上架"
|
||||
inactive-text="下架"
|
||||
@change="updownBtn(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="120" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button type="text" @click="editBtn(scope.row)">编辑</el-button> -->
|
||||
<el-button type="text" @click="infoBtn(scope.row)">详情</el-button>
|
||||
<!-- <el-button type="text" @click="onDelFn(scope.row)">删除</el-button> -->
|
||||
<el-button type="text" @click="updownBtn(scope.row, 1)">
|
||||
{{ scope.row.isShow == true ? '下架' : '上架' }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:page-sizes="[10, 20, 40, 60]"
|
||||
:page-size="formData.limit"
|
||||
:current-page="formData.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-drawer :visible.sync="drawer" size="100%">
|
||||
<div class="descriBOX">
|
||||
<el-descriptions title="汽车商品详情" :column="2" border>
|
||||
<el-descriptions-item label="id">{{ detailObj.id }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="品牌号">{{ detailObj.brandId }}</el-descriptions-item> -->
|
||||
<!-- <el-descriptions-item label="车商昵称">{{ detailObj.authorName }}</el-descriptions-item> -->
|
||||
<el-descriptions-item label="车商昵称">{{ detailObj.carDealerName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="车商地址">{{ detailObj.carDealerAddress }}</el-descriptions-item>
|
||||
<el-descriptions-item label="每月租金">{{ detailObj.rentalPrice }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{ detailObj.createTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="修改时间">{{ detailObj.updateTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="标题">{{ detailObj.title }}</el-descriptions-item>
|
||||
<el-descriptions-item label="主图">
|
||||
<imagePreview :src="detailObj.image" style="width: 40px; height: 40px" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="租期">{{ detailObj.monthRent }}</el-descriptions-item>
|
||||
<el-descriptions-item label="型号名称">{{ detailObj.modelName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="品牌名称">{{ detailObj.brandName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="可租数量">{{ detailObj.rentalQuantity }}</el-descriptions-item>
|
||||
<el-descriptions-item label="车龄">{{ detailObj.carAge }}</el-descriptions-item>
|
||||
<el-descriptions-item label="押金">{{ detailObj.depositMoney }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="公司名称">{{ detailObj.companyName }}</el-descriptions-item> -->
|
||||
<!-- <el-descriptions-item label="车商编码">{{ detailObj.dealerSn }}</el-descriptions-item> -->
|
||||
<!-- <el-descriptions-item label="商户简介">{{ detailObj.intro }}</el-descriptions-item> -->
|
||||
<!-- <el-descriptions-item label="车商电话">{{ detailObj.carDealerPhone }}</el-descriptions-item> -->
|
||||
<el-descriptions-item label="出租数量">{{ detailObj.sales }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="商品主图">
|
||||
<imagePreview :src="detailObj.productImage" style="width: 40px; height: 40px" />
|
||||
</el-descriptions-item> -->
|
||||
<!-- <el-descriptions-item label="订车规则">
|
||||
<imagePreview :src="detailObj.rulesImage" style="width: 40px; height: 40px" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="订车流程">
|
||||
<imagePreview :src="detailObj.processImage" style="width: 40px; height: 40px" />
|
||||
</el-descriptions-item> -->
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</el-drawer>
|
||||
|
||||
<!-- 发布数量 -->
|
||||
<el-dialog title="汽车商品-车商-发布列表" :visible.sync="dialogTableVisible" :close-on-click-modal="false">
|
||||
<el-table :data="attrList">
|
||||
<el-table-column prop="id" label="ID" />
|
||||
<el-table-column prop="carDealerId" label="车商id" />
|
||||
<el-table-column prop="cspId" label="卖车商品id"></el-table-column>
|
||||
<el-table-column prop="saleNum" label="销量"></el-table-column>
|
||||
<el-table-column prop="stock" label="库存"></el-table-column>
|
||||
<el-table-column prop="isShow" label="发布">
|
||||
<template v-slot="{ row }">
|
||||
<el-tag v-if="row.isShow == true">是</el-tag>
|
||||
<el-tag v-if="row.isShow == false" type="info">否</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间" width="180px"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="updownBtn(scope.row, 2)">
|
||||
{{ scope.row.isShow == true ? '下架' : '上架' }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:page-sizes="[10, 20, 40, 60]"
|
||||
:page-size="attrData.limit"
|
||||
:current-page="attrData.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="attrTotal"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="pageChange1"
|
||||
/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {productListAPI,productSwitchAPI,carProductInfoAPI} from "@/api/rentsell.js"
|
||||
export default {
|
||||
name: 'sellList',
|
||||
components: { },
|
||||
data() {
|
||||
return {
|
||||
drawer: false,
|
||||
listLoading: true,
|
||||
formData: {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
brandId: null,
|
||||
modelId: null,
|
||||
powerType: null,
|
||||
title: '',
|
||||
},
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0,
|
||||
},
|
||||
loading: false,
|
||||
posterList: [],
|
||||
userInfo: {},
|
||||
levelNumData: [],
|
||||
title: '',
|
||||
detailObj: {},
|
||||
imgArr: [],
|
||||
imgArr1: [],
|
||||
dialogTableVisible: false,
|
||||
attrData: {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
cspId: null,
|
||||
},
|
||||
attrTotal: 0,
|
||||
attrList: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 打开发布数量
|
||||
publishBtn(row) {
|
||||
this.dialogTableVisible = true;
|
||||
this.attrData.cspId = row.id;
|
||||
this.getAttrList();
|
||||
},
|
||||
getAttrList() {
|
||||
attrListAPI(this.attrData).then((res) => {
|
||||
console.log(res, '发布列表');
|
||||
this.attrList = res.list;
|
||||
this.attrTotal = res.total;
|
||||
});
|
||||
},
|
||||
// 列表
|
||||
getList() {
|
||||
this.listLoading = true;
|
||||
productListAPI(this.formData).then((res) => {
|
||||
// console.log(res, '列表');
|
||||
this.posterList = res.list;
|
||||
this.tableData.total = res.total;
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
reset() {
|
||||
this.userInfo = {};
|
||||
},
|
||||
addBtn() {
|
||||
this.$refs.grades.dialogVisible = true;
|
||||
this.userInfo = {};
|
||||
this.title = '新增汽车参数模板';
|
||||
},
|
||||
editBtn(row) {
|
||||
// console.log(row, '编辑行数据');
|
||||
this.tableData.data.map((item) => {
|
||||
this.levelNumData.push(item.grade);
|
||||
});
|
||||
infoSellerAPI(row.id).then((res) => {
|
||||
console.log(res, '汽车详情----编辑');
|
||||
this.userInfo = JSON.parse(JSON.stringify(res));
|
||||
});
|
||||
this.$refs.grades.dialogVisible = true;
|
||||
this.title = '编辑汽车参数模板';
|
||||
},
|
||||
infoBtn(row) {
|
||||
this.drawer = true;
|
||||
carProductInfoAPI(row.id).then((res) => {
|
||||
// console.log(res, '汽车详情');
|
||||
this.detailObj = res;
|
||||
this.imgArr = res.image.split(',');
|
||||
// res.parameterColorList.forEach((ele) => {
|
||||
res.colorList.forEach((ele) => {
|
||||
ele.imgArr1 = ele.image.split(',');
|
||||
});
|
||||
});
|
||||
},
|
||||
// 上下加
|
||||
updownBtn(row) {
|
||||
if (row.isShow) {
|
||||
productSwitchAPI(row.id).then(() => {
|
||||
this.$message.success('下架成功');
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
productSwitchAPI(row.id).then(() => {
|
||||
this.$message.success('上架成功');
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
},
|
||||
// 删
|
||||
onDelFn(row) {
|
||||
this.$modalSure('删除该内容吗').then(() => {
|
||||
delSellerAPI(row.id).then(() => {
|
||||
this.$message.success('删除成功');
|
||||
if (this.posterList.length === 1 && this.formData.page > 1) this.formData.page = this.formData.page - 1;
|
||||
this.getList();
|
||||
});
|
||||
});
|
||||
},
|
||||
pageChange(page) {
|
||||
this.formData.page = page;
|
||||
this.getList();
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.formData.limit = val;
|
||||
this.getList();
|
||||
},
|
||||
pageChange1(page) {
|
||||
this.attrData.page = page;
|
||||
this.getAttrList();
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.attrData.limit = val;
|
||||
this.getAttrList();
|
||||
},
|
||||
handleQuery() {
|
||||
this.formData;
|
||||
this.getList();
|
||||
},
|
||||
resetQuery() {
|
||||
(this.formData = { brandId: null, modelId: null, powerType: null, title: '' }), this.handleQuery();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.tableBox {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.pp {
|
||||
font-size: 18px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.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>
|
||||
<style>
|
||||
.el-tooltip__popper {
|
||||
/* max-width: 30%;
|
||||
padding-bottom: 5px !important; */
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-line-clamp: 25;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
</style>
|
||||
@@ -10,19 +10,15 @@
|
||||
<el-form-item label="车牌号:">
|
||||
<el-input v-model.trim="tableFrom.carNo" placeholder="请输入车牌号" class="selWidth"> </el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="车主姓名:">
|
||||
<el-input v-model.trim="tableFrom.name" placeholder="请输入车主姓名" class="selWidth"> </el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="车主电话:">
|
||||
<el-input v-model.trim="tableFrom.phone" placeholder="请输入车主电话" class="selWidth"> </el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="预约单号:">
|
||||
<el-input v-model.trim="tableFrom.orderSn" placeholder="请输入预约单号" class="selWidth"> </el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@@ -30,15 +26,8 @@
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="orderDataList"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
highlight-current-row
|
||||
class="switchTable"
|
||||
>
|
||||
<el-table v-loading="listLoading" :data="orderDataList" style="width: 100%" size="small" highlight-current-row
|
||||
class="switchTable">
|
||||
<el-table-column prop="id" label="ID" />
|
||||
<!-- <el-table-column prop="carId" label="汽车id"></el-table-column> -->
|
||||
<el-table-column prop="carNo" label="车牌号"></el-table-column>
|
||||
@@ -48,53 +37,41 @@
|
||||
<el-table-column prop="modelName" label="车辆型号"></el-table-column>
|
||||
<el-table-column prop="name" label="司机姓名"></el-table-column>
|
||||
<el-table-column prop="phone" label="司机电话"></el-table-column>
|
||||
|
||||
<el-table-column prop="repairType" label="维修类型" :formatter="showRepairType" />
|
||||
<el-table-column prop="orderSn" label="预约单号" width="200"></el-table-column>
|
||||
<el-table-column prop="totalPrice" label="价格总和" width="200"></el-table-column>
|
||||
<!-- <el-table-column prop="totalOverPrice" label="结算价格" width="200"></el-table-column> -->
|
||||
<el-table-column prop="auditStatus" label="订单状态" :formatter="showStatus" />
|
||||
|
||||
<el-table-column label="操作" fixed="right" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button v-if="scope.row.billAuditStatus == 0 && scope.row.isBilled == 1" type="text" size="small" @click="modifyPriceFn(scope.row)">修改工单价格</el-button> -->
|
||||
<el-button type="text" size="small" @click="detailBtn(scope.row)">详情</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.billAuditStatus == 0 && scope.row.isBilled == 1"
|
||||
type="text"
|
||||
size="small"
|
||||
@click="onEdit(scope.row)"
|
||||
>审核</el-button
|
||||
>
|
||||
<!-- :disabled="scope.row.billAuditStatus !== 0" -->
|
||||
<el-button v-if="scope.row.billAuditStatus == 0 && scope.row.isBilled == 1" type="text" size="small"
|
||||
@click="onEdit(scope.row)">审核</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:page-sizes="[10, 20, 40, 60]"
|
||||
:page-size="tableFrom.limit"
|
||||
:current-page="tableFrom.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
<el-pagination :page-sizes="[10, 20, 40, 60]" :page-size="tableFrom.limit" :current-page="tableFrom.page"
|
||||
layout="total, sizes, prev, pager, next, jumper" :total="tableData.total" @size-change="handleSizeChange"
|
||||
@current-change="pageChange" />
|
||||
</div>
|
||||
</el-card>
|
||||
<!-- 开单审核 -->
|
||||
<el-dialog title="审核信息" :visible.sync="dialogFormVisible">
|
||||
<el-form :model="form">
|
||||
<el-form-item label="审核状态:" label-width="120">
|
||||
<el-form-item label="审核状态:" label-width="120px">
|
||||
<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="120">
|
||||
<el-input
|
||||
:required="form.auditStatus == '2'"
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
placeholder="请输入备注"
|
||||
v-model="form.remark"
|
||||
>
|
||||
<el-form-item label="总结算价格" label-width="120px">
|
||||
<el-input type="number" :rows="2" placeholder="请输入总结算价格" v-model="form.totalOverPrice">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注:" label-width="120px">
|
||||
<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>
|
||||
@@ -105,23 +82,22 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 详情 -->
|
||||
<detail-dialog
|
||||
:detailObj="detailObj"
|
||||
:reservationReturnInfo="reservationReturnInfo"
|
||||
:reservationStaff="reservationStaff"
|
||||
:maintenanceObj="maintenance"
|
||||
ref="detailRef"
|
||||
></detail-dialog>
|
||||
<detail-dialog :detailObj="detailObj" :reservationReturnInfo="reservationReturnInfo"
|
||||
:reservationStaff="reservationStaff" :maintenanceObj="maintenance" ref="detailRef"></detail-dialog>
|
||||
<!-- 修改价格弹出层 -->
|
||||
<ModifyPrice ref="modifyPrice"></ModifyPrice>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reservationOrderListAPI, auditAPI, orderInfoAPI, detailOrderAPI } from '@/api/reservation/order';
|
||||
import detailDialog from '@/views/reservation/order/detailDialog.vue';
|
||||
import ModifyPrice from "@/views/reservation/order/modifyPrice.vue"
|
||||
export default {
|
||||
name: 'reservationOrder',
|
||||
components: {
|
||||
detailDialog,
|
||||
ModifyPrice
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -129,6 +105,7 @@ export default {
|
||||
form: {
|
||||
auditStatus: '',
|
||||
remark: '',
|
||||
totalOverPrice:0
|
||||
},
|
||||
tabActive: 'all',
|
||||
visible: false,
|
||||
@@ -184,7 +161,7 @@ export default {
|
||||
maintenance: {},
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
mounted() { },
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
@@ -199,6 +176,17 @@ export default {
|
||||
// 维修类型为3=事故维修的时候,accientOrderType必传
|
||||
// 维修类型为4=退车维修的时候,backOrderType必传
|
||||
|
||||
//修改价格
|
||||
modifyPriceFn(row) {
|
||||
detailOrderAPI({ id: row.id }).then((res) => {
|
||||
console.log(res.reservationInfo);
|
||||
// res.reservationInfo.id=row.id
|
||||
this.$refs.modifyPrice.form = res.reservationInfo
|
||||
this.$refs.modifyPrice.orderDialogShow = true
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 显示订单状态
|
||||
showStatus(row) {
|
||||
if (row.isFinish) return '已完成';
|
||||
@@ -267,9 +255,10 @@ export default {
|
||||
|
||||
// 查看
|
||||
onEdit(row) {
|
||||
// console.log(row, 'row-editttttttttt');
|
||||
console.log(row, 'row-editttttttttt');
|
||||
this.dialogFormVisible = true;
|
||||
this.form.id = row.id;
|
||||
this.form.totalOverPrice = row.totalPrice;
|
||||
},
|
||||
// 确认
|
||||
sureBtn() {
|
||||
@@ -298,16 +287,20 @@ export default {
|
||||
padding: 15px;
|
||||
border: 1px solid #666;
|
||||
}
|
||||
|
||||
.tableBox {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.descriBOX {
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
.dialogSpan {
|
||||
font-size: 12px;
|
||||
color: salmon;
|
||||
}
|
||||
|
||||
.pic {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
|
||||
@@ -31,14 +31,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="orderDataList"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
highlight-current-row
|
||||
class="switchTable"
|
||||
>
|
||||
<el-table v-loading="listLoading" :data="orderDataList" style="width: 100%" size="small" highlight-current-row
|
||||
class="switchTable">
|
||||
<el-table-column prop="id" label="ID" />
|
||||
<el-table-column prop="carNo" label="车牌号"></el-table-column>
|
||||
<el-table-column prop="merName" label="商户名称"></el-table-column>
|
||||
@@ -47,42 +41,28 @@
|
||||
<el-table-column prop="phone" label="车主电话"></el-table-column>
|
||||
<el-table-column prop="repairType" label="维修类型" :formatter="showRepairType" />
|
||||
<el-table-column prop="orderSn" label="预约单号"></el-table-column>
|
||||
<el-table-column prop="totalPrice" label="订单价格"></el-table-column>
|
||||
<el-table-column prop="auditStatus" label="订单状态" :formatter="showStatus" />
|
||||
<el-table-column label="操作" fixed="right" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button v-if="scope.row.billAuditStatus == 0 && scope.row.isBilled == 1" type="text" size="small" @click="modifyPriceFn(scope.row)">修改工单价格</el-button> -->
|
||||
<el-button type="text" size="small" @click="detailBtn(scope.row)">详情</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.billAuditStatus == 0 && scope.row.isBilled == 1"
|
||||
type="text"
|
||||
size="small"
|
||||
@click="onEdit(scope.row)"
|
||||
>审核</el-button
|
||||
>
|
||||
<el-button v-if="scope.row.billAuditStatus == 0 && scope.row.isBilled == 1" type="text" size="small"
|
||||
@click="onEdit(scope.row)">审核</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:page-sizes="[10, 20, 40, 60]"
|
||||
:page-size="tableFrom.limit"
|
||||
:current-page="tableFrom.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
<el-pagination :page-sizes="[10, 20, 40, 60]" :page-size="tableFrom.limit" :current-page="tableFrom.page"
|
||||
layout="total, sizes, prev, pager, next, jumper" :total="tableData.total" @size-change="handleSizeChange"
|
||||
@current-change="pageChange" />
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<!-- 详情 -->
|
||||
<detail-dialog
|
||||
:detailObj="detailObj"
|
||||
:reservationReturnInfo="reservationReturnInfo"
|
||||
:reservationStaff="reservationStaff"
|
||||
:maintenanceObj="maintenance"
|
||||
ref="detailRef"
|
||||
></detail-dialog>
|
||||
<detail-dialog :detailObj="detailObj" :reservationReturnInfo="reservationReturnInfo"
|
||||
:reservationStaff="reservationStaff" :maintenanceObj="maintenance" ref="detailRef"></detail-dialog>
|
||||
|
||||
<!-- 开单审核 -->
|
||||
<el-dialog title="审核信息" :visible.sync="dialogFormVisible">
|
||||
@@ -91,14 +71,13 @@
|
||||
<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 type="number" :rows="2" placeholder="请输入总结算价格" v-model="form.totalOverPrice">
|
||||
</el-input>
|
||||
</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 :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>
|
||||
@@ -108,22 +87,28 @@
|
||||
<el-button type="primary" @click="sureBtn">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 修改价格弹出层 -->
|
||||
<ModifyPrice ref="modifyPrice"></ModifyPrice>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reservationOrderListAPI, orderInfoAPI, detailOrderAPI, auditAPI } from '@/api/reservation/order';
|
||||
import detailDialog from '@/views/reservation/order/detailDialog.vue';
|
||||
import ModifyPrice from "@/views/reservation/order/modifyPrice.vue"
|
||||
export default {
|
||||
name: 'reservationOrder',
|
||||
components: {
|
||||
detailDialog,
|
||||
detailDialog, ModifyPrice
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
drawer: false,
|
||||
formLabelWidth: '120px',
|
||||
form: {},
|
||||
form: {
|
||||
totalOverPrice:0,
|
||||
auditStatus:1
|
||||
},
|
||||
dialogFormVisible: false,
|
||||
currentTab: 0,
|
||||
tabActive: 'all',
|
||||
@@ -173,11 +158,20 @@ export default {
|
||||
orderDataList: [],
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
mounted() { },
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
//修改价格
|
||||
modifyPriceFn(row) {
|
||||
detailOrderAPI({ id: row.id }).then((res) => {
|
||||
console.log(res.reservationInfo);
|
||||
// res.reservationInfo.id=row.id
|
||||
this.$refs.modifyPrice.form = res.reservationInfo
|
||||
this.$refs.modifyPrice.orderDialogShow = true
|
||||
});
|
||||
},
|
||||
// 显示订单状态
|
||||
showStatus(row) {
|
||||
if (row.isFinish) return '已完成';
|
||||
@@ -246,6 +240,7 @@ export default {
|
||||
console.log(row, 'row-editttttttttt');
|
||||
this.dialogFormVisible = true;
|
||||
this.form.id = row.id;
|
||||
this.form.totalOverPrice = row.totalPrice;
|
||||
},
|
||||
// 确认
|
||||
sureBtn() {
|
||||
@@ -278,12 +273,15 @@ export default {
|
||||
padding: 15px;
|
||||
border: 1px solid #666;
|
||||
}
|
||||
|
||||
.tableBox {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.descriBOX {
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
.pic {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
|
||||
47
src/views/reservation/order/modifyPrice.vue
Normal file
47
src/views/reservation/order/modifyPrice.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<el-dialog title="收货地址" :visible.sync="orderDialogShow">
|
||||
<el-form :model="form">
|
||||
<el-form-item label="配件价格" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.accessoryPrice" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="配件结算价格" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.accessoryOverPrice" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="工时价格" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.workPrice" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="总价格" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.totalPrice" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="总结算价格" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.totalOverPrice" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="orderDialogShow = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitFn">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { modifyPriceAPI } from '@/api/reservation/order';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form:{},
|
||||
orderDialogShow:false,
|
||||
formLabelWidth:'160px'
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
submitFn(){
|
||||
this.orderDialogShow=false
|
||||
this.$parent.getList()
|
||||
modifyPriceAPI(this.form).then(res=>{
|
||||
console.log(res);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -47,6 +47,7 @@
|
||||
<el-table-column prop="phone" label="车主电话"></el-table-column>
|
||||
<el-table-column prop="repairType" label="维修类型" :formatter="showRepairType" />
|
||||
<el-table-column prop="orderSn" label="预约单号"></el-table-column>
|
||||
<el-table-column prop="totalPrice" label="订单价格"></el-table-column>
|
||||
<el-table-column prop="auditStatus" label="订单状态" :formatter="showStatus" />
|
||||
<el-table-column label="操作" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
@@ -87,6 +88,10 @@
|
||||
<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 type="number" :rows="2" placeholder="请输入总结算价格" v-model="form.totalOverPrice">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注:" :label-width="formLabelWidth">
|
||||
<el-input
|
||||
:required="form.auditStatus == '2'"
|
||||
@@ -137,7 +142,10 @@ export default {
|
||||
phone: '',
|
||||
repairType: 4,
|
||||
},
|
||||
form: {},
|
||||
form: {
|
||||
auditStatus:1,
|
||||
totalOverPrice:0
|
||||
},
|
||||
title: '',
|
||||
loading: false,
|
||||
headeNum: [
|
||||
@@ -243,6 +251,7 @@ export default {
|
||||
// console.log(row, 'row-editttttttttt');
|
||||
this.dialogFormVisible = true;
|
||||
this.form.id = row.id;
|
||||
this.form.totalOverPrice = row.totalPrice;
|
||||
},
|
||||
// 删除
|
||||
onDelFn(id) {
|
||||
|
||||
Reference in New Issue
Block a user