Lijy 1 год назад
Родитель
Сommit
e8d6912a39

+ 16 - 10
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/index.vue

@@ -165,7 +165,7 @@
 import { ref, reactive, onMounted, inject } from "vue";
 import type { ElTable, FormInstance, FormRules, UploadRequestOptions } from 'element-plus'
 import { useRouter, useRoute } from "vue-router";
-import { GETSYSFILED, MOD, GETPERSONNEL, GETGENERATEFOEM, GETBUSINESSLIST, UPDATEINSET, BUSINESSDETELE, BATCHTRANSFER, MODURL, tableColumn } from './api'
+import { GETSYSFILED, MOD, GETPERSONNEL, GETGENERATEFOEM, GETBUSINESSLIST, UPDATEINSET, BUSINESSDETELE, BATCHTRANSFER, MODURL, tableColumn, BUSIESS_GETSATE } from './api'
 import { GETTABLELIST } from '@/pages/product/api'
 import { post, get, uploadFile } from "@/utils/request";
 import { getAllListByCode, getFromValue, resetFromValue, getFirstDayOfMonth, createTaskFromType, formatDate, confirmAction, downloadTemplate, downloadFile } from '@/utils/tools'
@@ -394,15 +394,21 @@ function resetForm() {
 }
 
 async function getSystemField() {
-  const systemField = getAllListByCode(['商机阶段'])
-  for (let i in systemField) {
-    const { data } = await get(`${GETSYSFILED}?code=${systemField[i]}`)
-    for (let key of Object.keys(fixedData)) {
-      if (systemField[i] == key) {
-        Object.assign(fixedData, { [key]: data })
-      }
-    }
-  }
+  // const systemField = getAllListByCode(['商机阶段'])
+  // for (let i in systemField) {
+  //   const { data } = await get(`${GETSYSFILED}?code=${systemField[i]}`)
+  //   for (let key of Object.keys(fixedData)) {
+  //     if (systemField[i] == key) {
+  //       Object.assign(fixedData, { [key]: data })
+  //     }
+  //   }
+  // }
+
+  const row = await post(BUSIESS_GETSATE, {})
+  fixedData.BusinessStage = (row.data || []).map((item: any) => {
+    const { name, id, seq } = item
+    return { name, id, seq }
+  }).sort(function (a: any, b: any) {return a.seq - b.seq;});
 
   const { data } = await post(GETPERSONNEL, {})
   fixedData.Personnel = data.map((item: any) => {

+ 2 - 2
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/type.d.ts

@@ -14,8 +14,8 @@ interface businessOpportunityFormType {
 
 interface fixedDataInterface {
   id: string | number;
-  companyId: string | number;
-  code: string;
+  companyId?: string | number;
+  code?: string;
   name: string;
   seq: string | number;
 }