This commit is contained in:
PQZ 2024-09-23 14:28:32 +08:00
parent 0d921e70a8
commit 665ab7326b
3 changed files with 535 additions and 0 deletions

View File

@ -0,0 +1,53 @@
import request from '@/utils/request'
// 创建维修模块 订单
export function createOrderInfo(data) {
return request({
url: '/repair/order-info/create',
method: 'post',
data: data
})
}
// 更新维修模块 订单
export function updateOrderInfo(data) {
return request({
url: '/repair/order-info/update',
method: 'put',
data: data
})
}
// 删除维修模块 订单
export function deleteOrderInfo(id) {
return request({
url: '/repair/order-info/delete?id=' + id,
method: 'delete'
})
}
// 获得维修模块 订单
export function getOrderInfo(id) {
return request({
url: '/repair/order-info/get?id=' + id,
method: 'get'
})
}
// 获得维修模块 订单分页
export function getOrderInfoPage(params) {
return request({
url: '/repair/order-info/page',
method: 'get',
params
})
}
// 导出维修模块 订单 Excel
export function exportOrderInfoExcel(params) {
return request({
url: '/repair/order-info/export-excel',
method: 'get',
params,
responseType: 'blob'
})
}

View File

@ -0,0 +1,253 @@
<template>
<div class="app-container">
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="45%" v-dialogDrag append-to-body>
<el-form ref="formRef" :model="formData" :rules="formRules" v-loading="formLoading" label-width="100px">
<el-form-item label="订单号" prop="orderNo">
<el-input v-model="formData.orderNo" placeholder="请输入订单号"/>
</el-form-item>
<el-form-item label="服务名称" prop="goodsTitle">
<el-input v-model="formData.goodsTitle" placeholder="请输入服务名称"/>
</el-form-item>
<el-form-item label="消费类型1会员充值2维修服务" prop="goodsType">
<el-select v-model="formData.goodsType" placeholder="请选择消费类型1会员充值2维修服务">
<el-option label="请选择字典生成" value=""/>
</el-select>
</el-form-item>
<el-form-item label="用户id" prop="userId">
<el-input v-model="formData.userId" placeholder="请输入用户id"/>
</el-form-item>
<el-form-item label="客户id" prop="cusId">
<el-input v-model="formData.cusId" placeholder="请输入客户id"/>
</el-form-item>
<el-form-item label="客户姓名" prop="cusName">
<el-input v-model="formData.cusName" placeholder="请输入客户姓名"/>
</el-form-item>
<el-form-item label="客户手机号" prop="cusPhone">
<el-input v-model="formData.cusPhone" placeholder="请输入客户手机号"/>
</el-form-item>
<el-form-item label="商品原价 元" prop="goodsPrice">
<el-input v-model="formData.goodsPrice" placeholder="请输入商品原价 元"/>
</el-form-item>
<el-form-item label="实付金额 元" prop="payMoney">
<el-input v-model="formData.payMoney" placeholder="请输入实付金额 元"/>
</el-form-item>
<el-form-item label="下单时间" prop="orderTime">
<el-date-picker clearable v-model="formData.orderTime" type="date" value-format="timestamp"
placeholder="选择下单时间"/>
</el-form-item>
<el-form-item label="会员优惠金额" prop="reduceMoney">
<el-input v-model="formData.reduceMoney" placeholder="请输入会员优惠金额"/>
</el-form-item>
<el-form-item label="使用会员储值卡的金额" prop="balance">
<el-input v-model="formData.balance" placeholder="请输入使用会员储值卡的金额"/>
</el-form-item>
<el-form-item label="支付时间" prop="payTime">
<el-date-picker clearable v-model="formData.payTime" type="date" value-format="timestamp"
placeholder="选择支付时间"/>
</el-form-item>
<el-form-item label="支付方式" prop="payType">
<el-select v-model="formData.payType" placeholder="请选择支付方式">
<el-option label="请选择字典生成" value=""/>
</el-select>
</el-form-item>
<el-form-item label="支付信息备注" prop="payRemark">
<el-input v-model="formData.payRemark" placeholder="请输入支付信息备注"/>
</el-form-item>
<el-form-item label="线上或者线下 1线上 0线下" prop="isOnline">
<el-input v-model="formData.isOnline" placeholder="请输入线上或者线下 1线上 0线下"/>
</el-form-item>
<el-form-item label="收款账号" prop="receivablesAccount">
<el-input v-model="formData.receivablesAccount" placeholder="请输入收款账号"/>
</el-form-item>
<el-form-item label="订单状态0待支付1已支付" prop="orderStatus">
<el-radio-group v-model="formData.orderStatus">
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="评价详情" prop="commentDesc">
<el-input v-model="formData.commentDesc" placeholder="请输入评价详情"/>
</el-form-item>
<el-form-item label="星级" prop="commentStar">
<el-input v-model="formData.commentStar" placeholder="请输入星级"/>
</el-form-item>
<el-form-item label="评论时间" prop="commentTime">
<el-date-picker clearable v-model="formData.commentTime" type="date" value-format="timestamp"
placeholder="选择评论时间"/>
</el-form-item>
<el-form-item label="核销码" prop="accessCode">
<el-input v-model="formData.accessCode" placeholder="请输入核销码"/>
</el-form-item>
<el-form-item label="核销时间" prop="validationTime">
<el-date-picker clearable v-model="formData.validationTime" type="date" value-format="timestamp"
placeholder="选择核销时间"/>
</el-form-item>
<el-form-item label="核销人" prop="validationRealName">
<el-input v-model="formData.validationRealName" placeholder="请输入核销人"/>
</el-form-item>
<el-form-item label="核销人id" prop="validationUserId">
<el-input v-model="formData.validationUserId" placeholder="请输入核销人id"/>
</el-form-item>
<el-form-item label="是否使用优惠券 0 未使用 1使用" prop="isCoupon">
<el-input v-model="formData.isCoupon" placeholder="请输入是否使用优惠券 0 未使用 1使用"/>
</el-form-item>
<el-form-item label="优惠券id" prop="couponId">
<el-input v-model="formData.couponId" placeholder="请输入优惠券id"/>
</el-form-item>
<el-form-item label="优惠券代码" prop="couponCode">
<el-input v-model="formData.couponCode" placeholder="请输入优惠券代码"/>
</el-form-item>
<el-form-item label="优惠金额" prop="couponDiscount">
<el-input v-model="formData.couponDiscount" placeholder="请输入优惠金额"/>
</el-form-item>
<el-form-item label="创建人所在部门" prop="deptId">
<el-input v-model="formData.deptId" placeholder="请输入创建人所在部门"/>
</el-form-item>
<el-form-item label="服务id或工单id" prop="goodsId">
<el-input v-model="formData.goodsId" placeholder="请输入服务id或工单id"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import * as OrderInfoApi from '@/api/repair/orderinfo';
export default {
name: "OrderInfoForm",
components: {},
data() {
return {
//
dialogTitle: "",
//
dialogVisible: false,
// 12
formLoading: false,
//
formData: {
orderNo: undefined,
goodsTitle: undefined,
goodsType: undefined,
userId: undefined,
cusId: undefined,
cusName: undefined,
cusPhone: undefined,
goodsPrice: undefined,
payMoney: undefined,
orderTime: undefined,
reduceMoney: undefined,
balance: undefined,
payTime: undefined,
payType: undefined,
payRemark: undefined,
isOnline: undefined,
receivablesAccount: undefined,
orderStatus: undefined,
commentDesc: undefined,
commentStar: undefined,
commentTime: undefined,
accessCode: undefined,
validationTime: undefined,
validationRealName: undefined,
validationUserId: undefined,
isCoupon: undefined,
couponId: undefined,
couponCode: undefined,
couponDiscount: undefined,
deptId: undefined,
id: undefined,
goodsId: undefined,
},
//
formRules: {},
};
},
methods: {
/** 打开弹窗 */
async open(id) {
this.dialogVisible = true;
this.reset();
//
if (id) {
this.formLoading = true;
try {
const res = await OrderInfoApi.getOrderInfo(id);
this.formData = res.data;
this.title = "修改维修模块 订单";
} finally {
this.formLoading = false;
}
}
this.title = "新增维修模块 订单";
},
/** 提交按钮 */
async submitForm() {
//
await this.$refs["formRef"].validate();
this.formLoading = true;
try {
const data = this.formData;
//
if (data.id) {
await OrderInfoApi.updateOrderInfo(data);
this.$modal.msgSuccess("修改成功");
this.dialogVisible = false;
this.$emit('success');
return;
}
//
await OrderInfoApi.createOrderInfo(data);
this.$modal.msgSuccess("新增成功");
this.dialogVisible = false;
this.$emit('success');
} finally {
this.formLoading = false;
}
},
/** 表单重置 */
reset() {
this.formData = {
orderNo: undefined,
goodsTitle: undefined,
goodsType: undefined,
userId: undefined,
cusId: undefined,
cusName: undefined,
cusPhone: undefined,
goodsPrice: undefined,
payMoney: undefined,
orderTime: undefined,
reduceMoney: undefined,
balance: undefined,
payTime: undefined,
payType: undefined,
payRemark: undefined,
isOnline: undefined,
receivablesAccount: undefined,
orderStatus: undefined,
commentDesc: undefined,
commentStar: undefined,
commentTime: undefined,
accessCode: undefined,
validationTime: undefined,
validationRealName: undefined,
validationUserId: undefined,
isCoupon: undefined,
couponId: undefined,
couponCode: undefined,
couponDiscount: undefined,
deptId: undefined,
id: undefined,
goodsId: undefined,
};
this.resetForm("formRef");
}
}
};
</script>

View File

@ -0,0 +1,229 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="订单号" prop="orderNo">
<el-input v-model="queryParams.orderNo" placeholder="请输入订单号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="服务名称" prop="goodsTitle">
<el-input v-model="queryParams.goodsTitle" placeholder="请输入服务名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="支付方式" prop="payType">
<el-select v-model="queryParams.payType" placeholder="请选择支付方式" clearable size="small">
<el-option label="请选择字典生成" value=""/>
</el-select>
</el-form-item>
<el-form-item label="订单状态" prop="orderStatus">
<el-select v-model="queryParams.orderStatus" placeholder="请选择订单状态" clearable size="small">
<el-option label="请选择字典生成" value=""/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
:loading="exportLoading"
v-hasPermi="['repair:order-info:export']">导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="订单号" align="center" prop="orderNo"/>
<el-table-column label="服务名称" align="center" prop="goodsTitle"/>
<el-table-column label="消费类型" align="center" prop="goodsType"/>
<el-table-column label="客户姓名" align="center" prop="cusName"/>
<el-table-column label="客户手机号" align="center" prop="cusPhone"/>
<el-table-column label="商品原价 元" align="center" prop="goodsPrice"/>
<el-table-column label="实付金额 元" align="center" prop="payMoney"/>
<el-table-column label="下单时间" align="center" prop="orderTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.orderTime) }}</span>
</template>
</el-table-column>
<el-table-column label="会员优惠金额" align="center" prop="reduceMoney"/>
<el-table-column label="使用会员储值卡的金额" align="center" prop="balance"/>
<el-table-column label="支付时间" align="center" prop="payTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.payTime) }}</span>
</template>
</el-table-column>
<el-table-column label="支付方式" align="center" prop="payType"/>
<el-table-column label="支付信息备注" align="center" prop="payRemark"/>
<el-table-column label="线上或者线下 1线上 0线下" align="center" prop="isOnline"/>
<el-table-column label="收款账号" align="center" prop="receivablesAccount"/>
<el-table-column label="订单状态0待支付1已支付" align="center" prop="orderStatus"/>
<el-table-column label="评价详情" align="center" prop="commentDesc"/>
<el-table-column label="星级" align="center" prop="commentStar"/>
<el-table-column label="评论时间" align="center" prop="commentTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.commentTime) }}</span>
</template>
</el-table-column>
<el-table-column label="核销码" align="center" prop="accessCode"/>
<el-table-column label="核销时间" align="center" prop="validationTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.validationTime) }}</span>
</template>
</el-table-column>
<el-table-column label="核销人" align="center" prop="validationRealName"/>
<el-table-column label="核销人id" align="center" prop="validationUserId"/>
<el-table-column label="是否使用优惠券 0 未使用 1使用" align="center" prop="isCoupon"/>
<el-table-column label="优惠券id" align="center" prop="couponId"/>
<el-table-column label="优惠券代码" align="center" prop="couponCode"/>
<el-table-column label="优惠金额" align="center" prop="couponDiscount"/>
<el-table-column label="创建人所在部门" align="center" prop="deptId"/>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="订单id" align="center" prop="id"/>
<el-table-column label="服务id或工单id" align="center" prop="goodsId"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
v-hasPermi="['repair:order-info:update']">修改
</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['repair:order-info:delete']">删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<OrderInfoForm ref="formRef" @success="getList"/>
</div>
</template>
<script>
import * as OrderInfoApi from '@/api/repair/orderinfo';
import OrderInfoForm from './OrderInfoForm.vue';
export default {
name: "OrderInfo",
components: {
OrderInfoForm,
},
data() {
return {
//
loading: true,
//
exportLoading: false,
//
showSearch: true,
//
total: 0,
//
list: [],
//
isExpandAll: true,
//
refreshTable: true,
//
currentRow: {},
//
queryParams: {
pageNo: 1,
pageSize: 10,
orderNo: null,
goodsTitle: null,
goodsType: null,
userId: null,
cusId: null,
cusName: null,
cusPhone: null,
goodsPrice: null,
payMoney: null,
orderTime: [],
reduceMoney: null,
balance: null,
payTime: [],
payType: null,
payRemark: null,
isOnline: null,
receivablesAccount: null,
orderStatus: null,
commentDesc: null,
commentStar: null,
commentTime: [],
accessCode: null,
validationTime: [],
validationRealName: null,
validationUserId: null,
isCoupon: null,
couponId: null,
couponCode: null,
couponDiscount: null,
deptId: null,
createTime: [],
goodsId: null,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
async getList() {
try {
this.loading = true;
const res = await OrderInfoApi.getOrderInfoPage(this.queryParams);
this.list = res.data.list;
this.total = res.data.total;
} finally {
this.loading = false;
}
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 添加/修改操作 */
openForm(id) {
this.$refs["formRef"].open(id);
},
/** 删除按钮操作 */
async handleDelete(row) {
const id = row.id;
await this.$modal.confirm('是否确认删除维修模块 订单编号为"' + id + '"的数据项?')
try {
await OrderInfoApi.deleteOrderInfo(id);
await this.getList();
this.$modal.msgSuccess("删除成功");
} catch {
}
},
/** 导出按钮操作 */
async handleExport() {
await this.$modal.confirm('是否确认导出所有维修模块 订单数据项?');
try {
this.exportLoading = true;
const data = await OrderInfoApi.exportOrderInfoExcel(this.queryParams);
this.$download.excel(data, '维修模块 订单.xls');
} catch {
} finally {
this.exportLoading = false;
}
},
}
};
</script>