|
|
@@ -34,46 +34,31 @@
|
|
|
ref="queryRef"
|
|
|
size="default" label-width="0px" class="mt5 mb5">
|
|
|
<el-input
|
|
|
- v-model="state.formQuery.mobilePhone"
|
|
|
- placeholder="用户手机号"
|
|
|
+ v-model="state.formQuery.question"
|
|
|
+ placeholder="问题"
|
|
|
clearable
|
|
|
@blur="loadData(true)"
|
|
|
class="wd150 mr10">
|
|
|
</el-input>
|
|
|
- <el-input
|
|
|
- v-model="state.formQuery.outTradeNo"
|
|
|
- placeholder="商户订单号"
|
|
|
- clearable
|
|
|
- @blur="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </el-input>
|
|
|
- <el-input
|
|
|
- v-model="state.formQuery.transactionId"
|
|
|
- placeholder="微信订单号"
|
|
|
+ <ext-d-select
|
|
|
+ v-model="state.formQuery.status"
|
|
|
+ placeholder="状态"
|
|
|
+ type="Faq.status"
|
|
|
clearable
|
|
|
@blur="loadData(true)"
|
|
|
class="wd150 mr10">
|
|
|
- </el-input>
|
|
|
- <!-- <el-input
|
|
|
- v-model="state.formQuery.tradeType"
|
|
|
- placeholder="交易类型,枚举值:JSAPI:公众号支付 NATIVE:扫码支付 APP:APP支付 MICROPAY:付款码支付 MWEB:H5支付 FACEPAY:刷脸支付"
|
|
|
- clearable
|
|
|
- @blur="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </el-input>-->
|
|
|
- <!-- <el-input
|
|
|
- v-model="state.formQuery.tradeState"
|
|
|
- placeholder="交易状态,枚举值:SUCCESS:支付成功REFUND:转入退款NOTPAY:未支付CLOSED:已关闭REVOKED:已撤销(付款码支付)USERPAYING:用户支付中(付款码支付)PAYERROR:支付失败(其他原因,如银行返回失败)"
|
|
|
- clearable
|
|
|
- @blur="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </el-input>-->
|
|
|
+ </ext-d-select>
|
|
|
|
|
|
|
|
|
<el-button class="ml10" plain size="default" type="success" @click="loadData(true)">
|
|
|
<SvgIcon name="ele-Search"/>
|
|
|
查询
|
|
|
</el-button>
|
|
|
+
|
|
|
+ <el-button v-auth="'faq.add'" size="default" plain type="success" class="ml10" @click="onRowClick('add',null)">
|
|
|
+ <SvgIcon name="ele-FolderAdd"/>
|
|
|
+ 新增
|
|
|
+ </el-button>
|
|
|
</el-form>
|
|
|
|
|
|
<el-table
|
|
|
@@ -105,9 +90,6 @@
|
|
|
<template v-if="field.prop==='expand'">
|
|
|
<p style="padding-left: 2em;" v-html="row[field.prop]"></p>
|
|
|
</template>
|
|
|
- <template v-if="field.prop==='rechargeAmount'">
|
|
|
- {{u.fmt.fmtMoney(row[field.prop])}}
|
|
|
- </template>
|
|
|
<template v-else>
|
|
|
<div>{{ row[field.prop] }}</div>
|
|
|
</template>
|
|
|
@@ -118,10 +100,11 @@
|
|
|
|
|
|
<ext-page class="page-pager" v-model:value="state.pageQuery" @change="loadData(false)"/>
|
|
|
</el-card>
|
|
|
+ <FaqDialog ref="faq_dialog_ref"></FaqDialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<script setup lang="ts" name="PayLogList">
|
|
|
+<script setup lang="ts" name="FaqList">
|
|
|
import {nextTick, onBeforeMount, onBeforeUnmount, onMounted, reactive, ref} from 'vue';
|
|
|
import {$get} from "/@/utils/request";
|
|
|
import {Msg} from "/@/utils/message";
|
|
|
@@ -129,6 +112,7 @@ import u from "/@/utils/u"
|
|
|
|
|
|
import {useRoute} from "vue-router";
|
|
|
import ExtPage from '/@/components/form/ExtPage.vue'
|
|
|
+import FaqDialog from "/@/views/admin/faq/dialog.vue"
|
|
|
|
|
|
import mittBus from '/@/utils/mitt';
|
|
|
|
|
|
@@ -137,7 +121,7 @@ const route = useRoute();
|
|
|
|
|
|
//定义引用
|
|
|
const queryRef = ref();
|
|
|
-const payLogDialogRef = ref();
|
|
|
+const faq_dialog_ref = ref();
|
|
|
|
|
|
//定义变量
|
|
|
const state = reactive({
|
|
|
@@ -152,15 +136,10 @@ const state = reactive({
|
|
|
data: [] as Array<any>,
|
|
|
loading: false,
|
|
|
columns: [
|
|
|
- {label: '用户ID', prop: 'userId', width: 200, resizable: true, fixed: 'left'},
|
|
|
- {label: '用户手机号', prop: 'mobilePhone', width: 150, resizable: true, fixed: 'left'},
|
|
|
- {label: '商户订单号', prop: 'outTradeNo', width: 250, resizable: true},
|
|
|
- {label: '微信订单号', prop: 'transactionId', width: 250, resizable: true},
|
|
|
- {label: '订单总金额', prop: 'rechargeAmount', resizable: true, width: 130},
|
|
|
- // {label: '交易类型', prop: 'tradeType', width: 150, resizable: true},
|
|
|
- {label: '交易状态', prop: 'tradeState', width: 150, resizable: true},
|
|
|
- {label: '用户支付币种', prop: 'currency', width: 150, resizable: true},
|
|
|
- {label: '支付完成时间', prop: 'transactionTime', sortable: 'custom', resizable: true, width: 200, fixed: 'right'},
|
|
|
+ {label: '问题', prop: 'question', width: 200, resizable: true, fixed: 'left'},
|
|
|
+ {label: '状态', prop: 'status', width: 150, resizable: true, fixed: 'left'},
|
|
|
+ {label: '答案', prop: 'answer', resizable: true},
|
|
|
+ {label: '操作', prop: 'transactionTime', sortable: 'custom', resizable: true, width: 200, fixed: 'right'},
|
|
|
],
|
|
|
},
|
|
|
})
|
|
|
@@ -193,14 +172,8 @@ onMounted(() => {
|
|
|
state.tableData.height = bodyHeight - queryHeight - 320
|
|
|
})
|
|
|
|
|
|
- mittBus.on("payLog.refresh", () => {
|
|
|
- loadData();
|
|
|
- })
|
|
|
});
|
|
|
|
|
|
-onBeforeUnmount(() => {
|
|
|
- mittBus.off("payLog.refresh")
|
|
|
-})
|
|
|
|
|
|
|
|
|
//region 方法区
|
|
|
@@ -210,7 +183,7 @@ const loadData = (refresh: boolean = false) => {
|
|
|
state.pageQuery.pageNum = 1;
|
|
|
}
|
|
|
state.tableData.loading = true;
|
|
|
- $get(`/custom/listRecharge`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {
|
|
|
+ $get(`/faq/list`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {
|
|
|
let {list, total} = res;
|
|
|
state.tableData.data = list;
|
|
|
state.pageQuery.total = total;
|
|
|
@@ -221,15 +194,13 @@ const loadData = (refresh: boolean = false) => {
|
|
|
})
|
|
|
};
|
|
|
|
|
|
-// 打开修改用户弹窗
|
|
|
const onRowClick = (type: string, row: any) => {
|
|
|
- payLogDialogRef.value.open(type, row);
|
|
|
+ faq_dialog_ref.value.open(type, row);
|
|
|
};
|
|
|
|
|
|
-// 删除用户
|
|
|
const onRowDel = (row: any) => {
|
|
|
Msg.confirm(`此操作将永久删除:『${row.name}』,是否继续?`).then(() => {
|
|
|
- $get(`/payLog/delete/${row.id}`).then(() => {
|
|
|
+ $get(`/faq/delete/${row.id}`).then(() => {
|
|
|
Msg.message("删除成功", 'success')
|
|
|
}).catch(() => {
|
|
|
Msg.message("删除失败", 'error')
|