Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
5fa7d71117
@ -26,6 +26,15 @@ export function addOrder(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 新增订单
|
||||||
|
export function payCallback(data) {
|
||||||
|
return request({
|
||||||
|
url: '/member/order/payCallback',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 修改订单
|
// 修改订单
|
||||||
export function updateOrder(data) {
|
export function updateOrder(data) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="订单类型" prop="orderType">
|
<el-form-item label="订单类型" prop="orderType">
|
||||||
<el-select v-model="queryParams.orderType" placeholder="请选择身份类型" clearable>
|
<el-select v-model="queryParams.orderType" placeholder="请选择订单类型" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.dl_order_type"
|
v-for="dict in dict.type.dl_order_type"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@ -84,52 +84,6 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['member:order:add']"
|
|
||||||
>新增
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['member:order:edit']"
|
|
||||||
>修改
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['member:order:remove']"
|
|
||||||
>删除
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['member:order:export']"
|
|
||||||
>导出
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@ -140,14 +94,14 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="用户昵称" align="center" prop="nickname"/>
|
<el-table-column label="用户昵称" align="center" prop="nickname"/>
|
||||||
<el-table-column label="订单编号" align="center" prop="orderNo"/>
|
<el-table-column width="150" label="订单编号" align="center" prop="orderNo"/>
|
||||||
<el-table-column label="订单类型" align="center" prop="orderType">
|
<el-table-column label="订单类型" align="center" prop="orderType">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.dl_order_type" :value="scope.row.orderType"/>
|
<dict-tag :options="dict.type.dl_order_type" :value="scope.row.orderType"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商品数量" align="center" prop="goodsNum"/>
|
<el-table-column label="商品数量" align="center" prop="goodsNum"/>
|
||||||
<el-table-column label="订单总价" align="center" prop="goodsPrice"/>
|
<el-table-column label="订单总价(元)" align="center" prop="goodsPrice"/>
|
||||||
<el-table-column label="支付时间" align="center" prop="payTime" width="180">
|
<el-table-column label="支付时间" align="center" prop="payTime" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.payTime, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.payTime, '{y}-{m}-{d}') }}</span>
|
||||||
@ -160,39 +114,37 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="是否支付" align="center" prop="isPay">
|
<el-table-column label="是否支付" align="center" prop="isPay">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.isPay == 0">待支付</span>
|
<el-tag type="success" v-if="scope.row.isPay == 1">已支付</el-tag>
|
||||||
<span v-if="scope.row.isPay == 1">已支付</span>
|
<el-tag type="danger" v-if="scope.row.isPay == 0">待支付</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="是否退款" align="center" prop="isRefund">
|
<el-table-column label="是否退款" align="center" prop="isRefund">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.isPay == 0">未退款</span>
|
<el-tag type="success" v-if="scope.row.isRefund == 0">未退款</el-tag>
|
||||||
<span v-if="scope.row.isPay == 1">已退款</span>
|
<el-tag type="danger" v-if="scope.row.isRefund == 1">已退款</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="退款方式" align="center" prop="refundWay">
|
<!-- <el-table-column label="退款方式" align="center" prop="refundWay">-->
|
||||||
<template slot-scope="scope">
|
<!-- <template slot-scope="scope">-->
|
||||||
<dict-tag :options="dict.type.dl_pay_way" :value="scope.row.refundWay"/>
|
<!-- <dict-tag :options="dict.type.dl_pay_way" :value="scope.row.refundWay"/>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="退款单号" align="center" prop="refundNo"/>
|
<!-- <el-table-column label="退款单号" align="center" prop="refundNo"/>-->
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column fixed="right" width="150" label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
v-if="scope.row.isPay == 0"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['member:order:edit']"
|
>修改价格
|
||||||
>修改
|
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
v-if="scope.row.isPay == 0"
|
||||||
@click="handleDelete(scope.row)"
|
@click="pay(scope.row)"
|
||||||
v-hasPermi="['member:order:remove']"
|
>线下支付
|
||||||
>删除
|
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -209,70 +161,29 @@
|
|||||||
<!-- 添加或修改订单对话框 -->
|
<!-- 添加或修改订单对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="用户id" prop="userId">
|
|
||||||
<el-input v-model="form.userId" placeholder="请输入用户id"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="用户昵称" prop="nickname">
|
<el-form-item label="用户昵称" prop="nickname">
|
||||||
<el-input v-model="form.nickname" placeholder="请输入用户昵称"/>
|
<el-input :disabled="true" v-model="form.nickname" placeholder="请输入用户昵称"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="订单编号" prop="orderNo">
|
<el-form-item label="订单编号" prop="orderNo">
|
||||||
<el-input v-model="form.orderNo" placeholder="请输入订单编号"/>
|
<el-input :disabled="true" v-model="form.orderNo" placeholder="请输入订单编号"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品id(前期就是会员卡id、通告券id)" prop="goodsId">
|
<el-form-item label="订单类型" prop="orderType">
|
||||||
<el-input v-model="form.goodsId" placeholder="请输入商品id(前期就是会员卡id、通告券id)"/>
|
<el-select :disabled="true" v-model="form.orderType" placeholder="请选择订单类型" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.dl_order_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品数量" prop="goodsNum">
|
<el-form-item label="商品数量" prop="goodsNum">
|
||||||
<el-input v-model="form.goodsNum" placeholder="请输入商品数量"/>
|
<el-input :disabled="true" v-model="form.goodsNum" placeholder="请输入商品数量"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="订单总价" prop="goodsPrice">
|
<el-form-item label="订单总价" prop="goodsPrice">
|
||||||
<el-input v-model="form.goodsPrice" placeholder="请输入订单总价"/>
|
<el-input v-model="form.goodsPrice" placeholder="请输入订单总价"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="支付时间" prop="payTime">
|
|
||||||
<el-date-picker clearable
|
|
||||||
v-model="form.payTime"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="请选择支付时间">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="下单描述">
|
|
||||||
<editor v-model="form.content" :min-height="192"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="支付方式(数据字典:dl_pay_way)" prop="payWay">
|
|
||||||
<el-input v-model="form.payWay" placeholder="请输入支付方式(数据字典:dl_pay_way)"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="是否已支付" prop="isPay">
|
|
||||||
<el-input v-model="form.isPay" placeholder="请输入是否已支付"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="是否退款(0未退款|1已退款)" prop="isRefund">
|
|
||||||
<el-input v-model="form.isRefund" placeholder="请输入是否退款(0未退款|1已退款)"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="退款人id" prop="refundUserId">
|
|
||||||
<el-input v-model="form.refundUserId" placeholder="请输入退款人id"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="退款方式(数据字典:dl_pay_way)" prop="refundWay">
|
|
||||||
<el-input v-model="form.refundWay" placeholder="请输入退款方式(数据字典:dl_pay_way)"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="退款单号" prop="refundNo">
|
|
||||||
<el-input v-model="form.refundNo" placeholder="请输入退款单号"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="退款发起时间" prop="refundApplyTime">
|
|
||||||
<el-date-picker clearable
|
|
||||||
v-model="form.refundApplyTime"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="请选择退款发起时间">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="退款到账时间" prop="refundReceiveTime">
|
|
||||||
<el-input v-model="form.refundReceiveTime" placeholder="请输入退款到账时间"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="退款理由" prop="refundReason">
|
|
||||||
<el-input v-model="form.refundReason" type="textarea" placeholder="请输入内容"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="form.remark" placeholder="请输入备注"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
@ -283,7 +194,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {listOrder, getOrder, delOrder, addOrder, updateOrder} from "@/api/member/order";
|
import {listOrder, getOrder, delOrder, addOrder, updateOrder, payCallback} from "@/api/member/order";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Order",
|
name: "Order",
|
||||||
@ -391,6 +302,19 @@ export default {
|
|||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**支付*/
|
||||||
|
pay(row){
|
||||||
|
const param = {
|
||||||
|
orderNo:row.orderNo
|
||||||
|
}
|
||||||
|
payCallback(param).then(response => {
|
||||||
|
this.$modal.msgSuccess("线下支付成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user