订单管理

This commit is contained in:
PQZ 2024-09-24 15:12:25 +08:00
parent 9f8f1a5648
commit fbf2401cf4
2 changed files with 53 additions and 75 deletions

View File

@ -8,14 +8,23 @@
<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="cusName">
<el-input v-model="queryParams.cusName" 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 v-model="queryParams.payType" placeholder="请选择支付方式">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.REPAIR_PAY_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.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 v-model="queryParams.orderStatus" 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-form-item>
@ -47,48 +56,30 @@
<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="线上或者线下" align="center" prop="isOnline"/>
<el-table-column label="收款账号" align="center" prop="receivablesAccount"/>
<el-table-column label="订单状态" 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">
<el-table-column label="支付方式" align="center" prop="payType">
<template v-slot="scope">
<span>{{ parseTime(scope.row.commentTime) }}</span>
<dict-tag :type="DICT_TYPE.REPAIR_PAY_TYPE" :value="scope.row.payType" />
</template>
</el-table-column>
<el-table-column label="核销码" align="center" prop="accessCode"/>
<el-table-column label="核销时间" align="center" prop="validationTime" width="180">
<el-table-column label="订单状态" align="center" prop="orderStatus">
<template v-slot="scope">
<span>{{ parseTime(scope.row.validationTime) }}</span>
<el-tag type="warning" v-if="scope.row.orderStatus === '0'">待支付</el-tag>
<el-tag type="success" v-if="scope.row.orderStatus === '1'">已支付</el-tag>
</template>
</el-table-column>
<el-table-column label="核销人" align="center" prop="validationRealName"/>
<el-table-column label="是否使用优惠券" align="center" prop="isCoupon"/>
<el-table-column label="优惠券代码" align="center" prop="couponCode"/>
<el-table-column label="优惠金额" align="center" prop="couponDiscount"/>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<el-table-column label="操作" width="150" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<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="toPay(scope.row.id)"
<el-button v-if="scope.row.orderStatus === '0'" size="mini" type="text" icon="el-icon-edit" @click="toPay(scope.row)"
v-hasPermi="['repair:order-info:update']">支付
</el-button>
<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-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>
@ -125,6 +116,13 @@ export default {
title: '',
visible: false,
},
options:[{
value:'0',
label:'待支付'
},{
value:'1',
label:'已支付'
}],
//
loading: true,
//
@ -148,35 +146,9 @@ export default {
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,
orderStatus:null
},
};
},
@ -205,16 +177,28 @@ export default {
this.resetForm("queryForm");
this.handleQuery();
},
async toPay(orderId){
let data = {
orderId:orderId
}
const res = await OrderInfoApi.toPay(data);
console.log(res,208)
this.qrCode = {
url: res.data.code_url,
visible: true
async toPay(row){
if (row.payType == '01'){
const orderId = row.id
let data = {
orderId:orderId
}
const res = await OrderInfoApi.toPay(data);
console.log(res,208)
this.qrCode = {
url: res.data.code_url,
visible: true
}
} else{
await this.$modal.confirm('本订单为线下支付订单或挂账订单,点击确定前请确认客户是否已支付')
let data = {
orderNo:row.orderNo,
}
await OrderInfoApi.updateOrderInfo(data);
this.$modal.msgSuccess("支付成功");
this.getList()
}
},
/** 添加/修改操作 */
openForm(id) {
@ -223,7 +207,7 @@ export default {
/** 删除按钮操作 */
async handleDelete(row) {
const id = row.id;
await this.$modal.confirm('是否确认删除维修模块 订单编号为"' + id + '"的数据项?')
await this.$modal.confirm('是否确认删除维修模块 订单编号为"' + row.orderNo + '"的数据项?')
try {
await OrderInfoApi.deleteOrderInfo(id);
await this.getList();

View File

@ -6,12 +6,6 @@
<el-input v-model="queryParams.name" placeholder="请输入名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="分类" prop="type">
<el-select v-model="queryParams.type" 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>