Selaa lähdekoodia

订单统计查询条件

liu_lake 4 kuukautta sitten
vanhempi
sitoutus
e0e6a44d91
2 muutettua tiedostoa jossa 27 lisäystä ja 32 poistoa
  1. 12 15
      admin-ui/src/views/ordertotal/index.vue
  2. 15 17
      agent-ui/src/views/ordertotal/index.vue

+ 12 - 15
admin-ui/src/views/ordertotal/index.vue

@@ -5,10 +5,7 @@ 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 $agentApi from "@/api/agent/index";
 
 const editRef = ref();
 
@@ -31,12 +28,12 @@ const searchFormFields = computed((): FormField[] => {
       label: "代理商",
       prop: "agentId",
       placeholder: "请选择",
-      dataSourceKey: "enableOptions",
+      dataSourceKey: "merchantOptions",
       options: {
         keys: {
-          label: "label",
-          value: "value",
-          prop: "value"
+          label: "userName",
+          value: "id",
+          prop: "id"
         },
         filterable: true
       }
@@ -62,7 +59,7 @@ const pageData: any = reactive({
     searchForm: {}
   },
   dataSource: {
-    enableOptions: []
+    merchantOptions: []
   },
   /*按钮 */
   btnOpts: {
@@ -245,14 +242,14 @@ const _loadData = (page?: number) => {
 };
 onBeforeMount(() => {});
 onMounted(() => {
+  $agentApi.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>

+ 15 - 17
agent-ui/src/views/ordertotal/index.vue

@@ -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>