Kaynağa Gözat

查询条件

zouzs 1 gün önce
ebeveyn
işleme
584c035f73

+ 63 - 15
src/views/order/orderLoan/index.vue

@@ -5,6 +5,7 @@
       :columns="tableConfig"
       :request="getList"
       :is-card="true"
+      :beforeSearchSubmit="handleBeforeSearch"
       :search="{
         labelWidth: 100,
         showNumber: 3
@@ -125,8 +126,9 @@ import {
   updateStartLevel
 } from "@/api/order";
 import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
-import { isString } from "@pureadmin/utils";
+import { cloneDeep, isString } from "@pureadmin/utils";
 import { getChildAccount } from "@/api/childAccount";
+import { getDictionary } from "@/utils/dictionary";
 
 defineOptions({
   name: "OrderLoan"
@@ -148,6 +150,19 @@ onMounted(() => {
   getChildAccountList();
 });
 
+// 搜索条件处理
+const handleBeforeSearch = (values: any) => {
+  let params = cloneDeep(values);
+  if (params.applyTime && params.applyTime.length === 2) {
+    Reflect.set(params, "beginTime", values.applyTime[0]);
+    Reflect.set(params, "endTime", values.applyTime[1]);
+  } else {
+    Reflect.deleteProperty(params, "beginTime");
+    Reflect.deleteProperty(params, "endTime");
+  }
+  return params;
+};
+
 // 重新请求列表接口
 const refresh = () => {
   plusPageInstance.value?.getList();
@@ -181,6 +196,13 @@ const handleReliveOrder = () => {
   });
 };
 
+const childAccountList = ref<any[]>([]);
+
+const getChildAccountList = async () => {
+  let res = await getChildAccount();
+  childAccountList.value = res.data;
+};
+
 // 表格数据
 const tableConfig: PlusColumn[] = [
   {
@@ -212,12 +234,30 @@ const tableConfig: PlusColumn[] = [
     },
     hideInSearch: true
   },
+  {
+    label: "客户星级",
+    prop: "star",
+    valueType: "select",
+    options: [
+      { label: "1星", value: 1 },
+      { label: "2星", value: 2 },
+      { label: "3星", value: 3 },
+      { label: "4星", value: 4 },
+      { label: "5星", value: 5 }
+    ],
+    hideInTable: true
+  },
   {
     label: "电话",
     prop: "maskPhone",
     width: 100,
     hideInSearch: true
   },
+  {
+    label: "电话",
+    prop: "userMobile",
+    hideInTable: true
+  },
   {
     label: "微信",
     prop: "wxCode",
@@ -244,18 +284,34 @@ const tableConfig: PlusColumn[] = [
   {
     label: "贷款期限",
     prop: "loanTerm",
-    hideInSearch: true
+    hideInSearch: true,
+    formatter: val => getDictionary("LoanLimit", val)
   },
   {
     label: "申请时间",
     prop: "applyTime",
     width: 170,
-    hideInSearch: true
+    valueType: "date-picker",
+    fieldProps: {
+      type: "datetimerange",
+      rangeSeparator: "-",
+      valueFormat: "YYYY-MM-DD HH:mm:ss"
+    }
+  },
+  {
+    label: "分配子账号",
+    prop: "followerId",
+    valueType: "select",
+    options: computed(() => childAccountList.value),
+    optionsMap: {
+      label: "contractName",
+      value: "id"
+    },
+    hideInTable: true
   },
   {
     label: "分配子账号",
     prop: "follower",
-    width: 120,
     hideInSearch: true
   },
   {
@@ -263,10 +319,9 @@ const tableConfig: PlusColumn[] = [
     prop: "followStatus",
     valueType: "select",
     options: [
-      { label: "未跟进", value: 0 },
-      { label: "跟进", value: 4 }
-    ],
-    hideInSearch: true
+      { label: "未跟进", value: "0" },
+      { label: "跟进", value: "4" }
+    ]
   },
   {
     label: "备注",
@@ -376,13 +431,6 @@ const detailsColumns: PlusColumn[] = [
   }
 ];
 
-const childAccountList = ref<any[]>([]);
-
-const getChildAccountList = async () => {
-  let res = await getChildAccount();
-  childAccountList.value = res.data;
-};
-
 const resetColumns: PlusColumn[] = [
   {
     label: "分配子账号",

+ 53 - 26
src/views/order/orderMy/index.vue

@@ -5,6 +5,7 @@
       :columns="tableConfig"
       :request="getList"
       :is-card="true"
+      :beforeSearchSubmit="handleBeforeSearch"
       :search="{
         labelWidth: 100,
         showNumber: 3
@@ -117,8 +118,9 @@ import {
   updateStartLevel
 } from "@/api/order";
 import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
-import { isString } from "@pureadmin/utils";
+import { cloneDeep, isString } from "@pureadmin/utils";
 import { getChildAccount } from "@/api/childAccount";
+import { getDictionary } from "@/utils/dictionary";
 
 defineOptions({
   name: "OrderMy"
@@ -140,6 +142,19 @@ onMounted(() => {
   getChildAccountList();
 });
 
+// 搜索条件处理
+const handleBeforeSearch = (values: any) => {
+  let params = cloneDeep(values);
+  if (params.applyTime && params.applyTime.length === 2) {
+    Reflect.set(params, "beginTime", values.applyTime[0]);
+    Reflect.set(params, "endTime", values.applyTime[1]);
+  } else {
+    Reflect.deleteProperty(params, "beginTime");
+    Reflect.deleteProperty(params, "endTime");
+  }
+  return params;
+};
+
 // 重新请求列表接口
 const refresh = () => {
   plusPageInstance.value?.getList();
@@ -173,6 +188,13 @@ const handleReliveOrder = () => {
   });
 };
 
+const childAccountList = ref<any[]>([]);
+
+const getChildAccountList = async () => {
+  let res = await getChildAccount();
+  childAccountList.value = res.data;
+};
+
 // 表格数据
 const tableConfig: PlusColumn[] = [
   {
@@ -204,13 +226,31 @@ const tableConfig: PlusColumn[] = [
     },
     hideInSearch: true
   },
+  {
+    label: "客户星级",
+    prop: "star",
+    valueType: "select",
+    options: [
+      { label: "1星", value: 1 },
+      { label: "2星", value: 2 },
+      { label: "3星", value: 3 },
+      { label: "4星", value: 4 },
+      { label: "5星", value: 5 }
+    ],
+    hideInTable: true
+  },
   {
     label: "电话",
     prop: "maskPhone",
     width: 100,
     hideInSearch: true
   },
-  /*{
+  {
+    label: "电话",
+    prop: "userMobile",
+    hideInTable: true
+  },
+  {
     label: "微信",
     prop: "wxCode",
     tableColumnProps: {
@@ -218,11 +258,6 @@ const tableConfig: PlusColumn[] = [
     },
     hideInSearch: true
   },
-  {
-    label: "优先联系方式",
-    prop: "headContractType",
-    hideInSearch: true
-  },*/
   {
     label: "申请产品",
     prop: "planName",
@@ -236,29 +271,28 @@ const tableConfig: PlusColumn[] = [
   {
     label: "贷款期限",
     prop: "loanTerm",
-    hideInSearch: true
+    hideInSearch: true,
+    formatter: val => getDictionary("LoanLimit", val)
   },
   {
     label: "申请时间",
     prop: "applyTime",
     width: 170,
-    hideInSearch: true
+    valueType: "date-picker",
+    fieldProps: {
+      type: "datetimerange",
+      rangeSeparator: "-",
+      valueFormat: "YYYY-MM-DD HH:mm:ss"
+    }
   },
-  /*{
-    label: "分配子账号",
-    prop: "follower",
-    width: 120,
-    hideInSearch: true
-  },*/
   {
     label: "状态",
     prop: "followStatus",
     valueType: "select",
     options: [
-      { label: "未跟进", value: 0 },
-      { label: "跟进", value: 4 }
-    ],
-    hideInSearch: true
+      { label: "未跟进", value: "0" },
+      { label: "跟进", value: "4" }
+    ]
   },
   {
     label: "备注",
@@ -368,13 +402,6 @@ const detailsColumns: PlusColumn[] = [
   }
 ];
 
-const childAccountList = ref<any[]>([]);
-
-const getChildAccountList = async () => {
-  let res = await getChildAccount();
-  childAccountList.value = res.data;
-};
-
 const resetColumns: PlusColumn[] = [
   {
     label: "分配子账号",