|
@@ -5,10 +5,8 @@ import Edit from "./edit.vue";
|
|
|
import { PureTable } from "@pureadmin/table";
|
|
|
import { computed, onBeforeMount, onMounted, reactive, ref, watch } from "vue";
|
|
|
import * as $api from "@/api/order/index";
|
|
|
-import { hasAuth } from "@/router/utils";
|
|
|
-import message from "@/utils/message";
|
|
|
-import {enableOptions, payStatusOptions, SelectOption} from "@/constants/constants";
|
|
|
-import { cloneDeep } from "@pureadmin/utils";
|
|
|
+import * as $merchantApi from "@/api/merchant/index";
|
|
|
+
|
|
|
|
|
|
const editRef = ref();
|
|
|
|
|
@@ -28,15 +26,15 @@ const searchFormFields = computed((): FormField[] => {
|
|
|
const fields: FormField[] = [
|
|
|
{
|
|
|
type: "select",
|
|
|
- label: "商户",
|
|
|
+ label: "商户名称",
|
|
|
prop: "merchantId",
|
|
|
placeholder: "请选择",
|
|
|
- dataSourceKey: "enableOptions",
|
|
|
+ dataSourceKey: "merchantOptions",
|
|
|
options: {
|
|
|
keys: {
|
|
|
- label: "label",
|
|
|
- value: "value",
|
|
|
- prop: "value"
|
|
|
+ label: "userName",
|
|
|
+ value: "id",
|
|
|
+ prop: "id"
|
|
|
},
|
|
|
filterable: true
|
|
|
}
|
|
@@ -62,7 +60,7 @@ const pageData: any = reactive({
|
|
|
searchForm: {}
|
|
|
},
|
|
|
dataSource: {
|
|
|
- enableOptions: []
|
|
|
+ merchantOptions: []
|
|
|
},
|
|
|
/*按钮 */
|
|
|
btnOpts: {
|
|
@@ -92,7 +90,7 @@ const pageData: any = reactive({
|
|
|
list: [],
|
|
|
columns: [
|
|
|
{
|
|
|
- label: "商户",
|
|
|
+ label: "商户名称",
|
|
|
prop: "merchantName",
|
|
|
slot: "merchantName",
|
|
|
width: 220
|
|
@@ -245,14 +243,14 @@ const _loadData = (page?: number) => {
|
|
|
};
|
|
|
onBeforeMount(() => {});
|
|
|
onMounted(() => {
|
|
|
+ $merchantApi.queryList()
|
|
|
+ .then((res: any) => {
|
|
|
+ if (res.success) {
|
|
|
+ pageData.dataSource.merchantOptions = res.result;
|
|
|
+ }
|
|
|
+ });
|
|
|
_loadData(1);
|
|
|
});
|
|
|
-const merchantOptions = ref([
|
|
|
- { label: "支付失败", value: -1 },
|
|
|
- { label: "待支付", value: 0 },
|
|
|
- { label: "支付成功", value: 1 },
|
|
|
- { label: "退款", value: 2 }
|
|
|
-]);
|
|
|
</script>
|
|
|
|
|
|
<template>
|