|
@@ -74,24 +74,24 @@
|
|
|
<template slot-scope="scope">{{ scope.row.phoneType == 1 ? '苹果' : '安卓' }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="驾校名称" align="center" prop="schoolName" />
|
|
|
-
|
|
|
- <el-table-column label="驾校提成" align="center" prop="schoolCommission" >
|
|
|
+
|
|
|
+ <el-table-column label="总价" align="center" prop="total">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.schoolCommission/100}}元
|
|
|
+ {{ scope.row.total }}元
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
- <template slot-scope="scope">
|
|
|
-
|
|
|
- <el-button :disabled="scope.row.outRefundNo" size="mini" type="text" icon="el-icon-remove-outline" @click="handleRefund(scope.row)"
|
|
|
- >退款</el-button>
|
|
|
+ <template v-if="!scope.row.outRefundNo" slot-scope="scope">
|
|
|
+
|
|
|
+ <el-button :disabled="scope.row.outRefundNo" size="mini" type="text" icon="el-icon-remove-outline"
|
|
|
+ @click="handleRefund(scope.row)">退款</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
- <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
|
|
- @pagination="getList" />
|
|
|
-
|
|
|
+ <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
|
|
+ :limit.sync="queryParams.pageSize" @pagination="getList" />
|
|
|
+
|
|
|
<!-- 添加或修改错题对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
@@ -111,7 +111,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getList, getError,refundOrder, delError, addError, updateError, exportError } from "@/api/tool/order";
|
|
|
+import { getList, getError, refundOrder, delError, addError, updateError, exportError } from "@/api/tool/order";
|
|
|
|
|
|
export default {
|
|
|
name: "Error",
|
|
@@ -137,10 +137,10 @@ export default {
|
|
|
open: false,
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
- outTradeNo:"",
|
|
|
- pageNum:1,
|
|
|
- pageSize:10
|
|
|
-
|
|
|
+ outTradeNo: "",
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10
|
|
|
+
|
|
|
// id: null,
|
|
|
// outRefundNo: null,
|
|
|
// payType: 1,
|
|
@@ -179,7 +179,7 @@ export default {
|
|
|
// 表单重置
|
|
|
reset() {
|
|
|
this.form = {
|
|
|
- outTradeNo:""
|
|
|
+ outTradeNo: ""
|
|
|
// id: null,
|
|
|
// outRefundNo: null,
|
|
|
// payType: 1,
|
|
@@ -191,14 +191,17 @@ export default {
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
|
- handleRefund(row){
|
|
|
- const outTradeNo = row.outTradeNo
|
|
|
- this.$confirm(`是否确认退款(${row.goodsName})`, "警告", {
|
|
|
+ handleRefund(row) {
|
|
|
+ const outTradeNo = row.outTradeNo
|
|
|
+ this.$prompt(`确认退款${row.goodsName}吗?
|
|
|
+ 请附带退款理由:`, "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function () {
|
|
|
- return refundOrder(outTradeNo);
|
|
|
+ type: "warning",
|
|
|
+ }).then(function (obj) {
|
|
|
+ return refundOrder(outTradeNo,{
|
|
|
+ reason:obj.value
|
|
|
+ });
|
|
|
}).then(() => {
|
|
|
this.getList();
|
|
|
this.msgSuccess("退款成功");
|