Lijy 1 år sedan
förälder
incheckning
4cb53d8f74

+ 2 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/api.ts

@@ -2,7 +2,8 @@ export const MOD = "/business";
 export const prefix = "/clue";
 export const GETSYSFILED = "/sys-dict/getListByCode";
 export const GETPERSONNEL = "/user/getSimpleActiveUserList";
-export const GETGENERATEFOEM = `sys-form/getListByCode${MOD}`
+export const GETGENERATEFOEM = `/sys-form/getListByCode${MOD}`
+export const GETBUSINESSLIST = `/business-opportunity/list`
 
 export const stageStatus = [
     { id: 1, name: "赢单", progress: "100%" },

+ 14 - 3
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/index.vue

@@ -40,7 +40,7 @@
         </div>
         <div class="w-full flex p-3 shadow-[0_-3px_5px_0px_rgba(0,0,0,0.2)]">
           <El-button class="w-full">重置</El-Button>
-          <El-button type="primary" class="w-full">搜索</El-Button>
+          <El-button type="primary" class="w-full" @click="getBusinessTableList()">搜索</El-Button>
         </div>
       </div>
     </div>
@@ -109,7 +109,7 @@
         </div>
       </template>
       <div class="h-[60vh] overflow-y-auto scroll-bar">
-        <!-- <GenerateForm ref="generateForm" :data="generateFormData" /> -->
+        <GenerateForm ref="generateForm" :data="generateFormData" />
         <div>相关产品</div>
         <RelatedProducts :productTableList="productTableList" />
       </div>
@@ -121,7 +121,7 @@
 import { ref, reactive, onMounted, inject } from "vue";
 import type { FormInstance, FormRules } from 'element-plus'
 import { useRouter, useRoute } from "vue-router";
-import { GETSYSFILED, MOD, GETPERSONNEL, GETGENERATEFOEM } from './api'
+import { GETSYSFILED, MOD, GETPERSONNEL, GETGENERATEFOEM, GETBUSINESSLIST } from './api'
 import { GETTABLELIST } from '@/pages/product/api'
 import { post, get } from "@/utils/request";
 import { getAllListByCode, getFromValue, resetFromValue, getFirstDayOfMonth, getLastDayOfMonth, formatDate } from '@/utils/tools'
@@ -191,6 +191,16 @@ function handleClose(done: () => void) {
   done()
 }
 
+function getBusinessTableList() {
+  const formValue = getFromValue(businessOpportunityForm)
+  post(GETBUSINESSLIST, {...formValue }).then((res) => {
+    console.log(res, '<==== 返回的数据')
+    const { data, total } = res.data
+    businessTable.value = data
+    businessTotalTable.value = total
+  })
+}
+
 async function getSystemField() {
   const systemField = getAllListByCode(['商机阶段'])
   for (let i in systemField) {
@@ -250,6 +260,7 @@ function getProductTableList() {
 onMounted(() => {
   getSystemField()
   getProductTableList()
+  getBusinessTableList()
 })
 </script>
 

+ 4 - 2
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/api.ts

@@ -1,8 +1,10 @@
-export const MOD = 'order'
+export const MOD = '/order'
 
 export const GETSYSFILED = "/sys-dict/getListByCode";
 export const GETPERSONNEL = "/user/getSimpleActiveUserList";
-export const GETGENERATEFOEM = `sys-form/getListByCode${MOD}`
+export const GETGENERATEFOEM = `/sys-form/getListByCode${MOD}`
+export const GETALLPRODUCT = `/sys-form/getListByCode/product`
+export const GETTABLELIST =  `${MOD}/list`
 
 export const actionButtons: any[] = [
     { text: '新建订单' },

+ 41 - 8
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/index.vue

@@ -26,6 +26,10 @@
             </template>
           </el-form>
         </div>
+        <div class="w-full flex p-3 shadow-[0_-3px_5px_0px_rgba(0,0,0,0.2)]">
+          <El-button class="w-full" @click="resetFilterForm()">重置</El-Button>
+          <El-button type="primary" class="w-full" @click="getTableList()">搜索</El-Button>
+        </div>
       </div>
     </div>
     <div class="flex-1 p-5 overflow-auto">
@@ -70,7 +74,7 @@
 import { ref, reactive, onMounted, inject } from "vue";
 import { getAllListByCode, getFromValue, resetFromValue, getFirstDayOfMonth, getLastDayOfMonth, formatDate } from '@/utils/tools'
 import { post, get } from "@/utils/request";
-import { actionButtons, tableColumns, GETSYSFILED, GETPERSONNEL, GETGENERATEFOEM, MOD } from "./api";
+import { actionButtons, tableColumns, GETSYSFILED, GETPERSONNEL, GETGENERATEFOEM, MOD, GETTABLELIST, GETALLPRODUCT } from "./api";
 import { useRouter, useRoute } from "vue-router";
 
 const router = useRouter()
@@ -82,14 +86,15 @@ const filterForm = reactive<FilterForm>({ // 筛选条件 Value
   responsibleId: '',
   createId: '',
   email: '',
-  startTime: '',
-  endTime: ''
+  startTime: getFirstDayOfMonth(new Date()),
+  endTime: formatDate(new Date())
 });
 const selectData = reactive({ // 下拉数据
   Personnel: [] as personnelInterface[],
   Customer: [] as any[], // 客户名称
   OrderType: [] as any[], // 订单类型
   RemittanceStatus: [] as any[], // 回款状态
+  AllProduct: [] as any[] // 所有产品
 })
 const filterItems = ref<FilterItem[]>([]) // 渲染筛选条件
 const formTablePaging = reactive({ // 分页条件
@@ -106,7 +111,7 @@ const allLoading = reactive({ // 按钮加载 Loading
   formTableLading: false,
 })
 const dialogVisible = reactive({
-
+  
 })
 
 function toDetali(row: any) {
@@ -116,6 +121,32 @@ function toDetali(row: any) {
   })
 }
 
+function getTableList() {
+  const formValue = getFromValue(filterForm)
+  const formPaging = { pageIndex: formTablePaging.currentPage, pageSize: formTablePaging.pageSize }
+  allLoading.formTableLading = true
+  post(GETTABLELIST, { ...formValue, ...formPaging }).then(res => {
+    const { total, record } = res.data
+    formTable.value = record
+    formTablePaging.total = total
+  }).finally(() => {
+    allLoading.formTableLading = false
+  })
+}
+
+function resetFilterForm() {
+  let newFilterForm = resetFromValue(filterForm, { startTime: getFirstDayOfMonth(new Date()), endTime: formatDate(new Date()) })
+  Object.assign(filterForm, newFilterForm)
+  getTableList()
+}
+
+function getAllProduct() {
+  post(GETALLPRODUCT, { pageIndex: -1, pageSize: -1 }).then((res) => {
+    const { record } = res.data
+    selectData.AllProduct = record
+  })
+}
+
 async function getSystemField() {
   const systemField = getAllListByCode([])
   for (let i in systemField) {
@@ -143,11 +174,11 @@ async function getSystemField() {
 
 function setFilterItems() {
   filterItems.value = [
-    { label: '订单编号', key: 'contactPerson', type: 'input' },
-    { label: '订单名称', key: 'customerId', type: 'input' },
-    { label: '客户名称', key: 'phoneNumber', type: 'select', options: selectData.Customer },
+    { label: '订单编号', key: 'orderCode', type: 'input' },
+    { label: '订单名称', key: 'orderName', type: 'input' },
+    { label: '客户名称', key: 'customId', type: 'select', options: selectData.Customer },
     { label: '商机名称', key: 'email', type: 'input' },
-    { label: '订单类型', key: 'orderType', type: 'select', options: selectData.OrderType },
+    { label: '订单类型', key: 'type', type: 'select', options: selectData.OrderType },
     { label: '回款状态', key: 'remittanceStatus', type: 'select', options: selectData.RemittanceStatus },
     { label: '负责人', key: 'responsibleId', type: 'select', options: selectData.Personnel },
     { label: '下单时间', key: '', type: 'date' },
@@ -156,6 +187,8 @@ function setFilterItems() {
 
 onMounted(() => {
   getSystemField()
+  getAllProduct()
+  getTableList()
 })
 </script>
 

+ 25 - 20
fhKeeper/formulahousekeeper/plugIn/form-design-master/src/generate/GenerateFormItem.vue

@@ -188,29 +188,33 @@
     </template>
 
     <template v-if="element.type === 'time'">
-      <el-time-picker
-        v-model="data"
-        :placeholder="element.options.placeholder"
-        :readonly="element.options.readonly"
-        :editable="element.options.editable"
-        :clearable="element.options.clearable"
-        :format="element.options.format"
-        :disabled="disabled || element.options.disabled"
-        :style="{ width: element.options.width }"
-      />
+      <el-config-provider :locale="zhCn">
+        <el-time-picker
+          v-model="data"
+          :placeholder="element.options.placeholder"
+          :readonly="element.options.readonly"
+          :editable="element.options.editable"
+          :clearable="element.options.clearable"
+          :format="element.options.format"
+          :disabled="disabled || element.options.disabled"
+          :style="{ width: element.options.width }"
+        />
+      </el-config-provider>
     </template>
 
     <template v-if="element.type === 'date'">
-      <el-date-picker
-        v-model="data"
-        :placeholder="element.options.placeholder"
-        :readonly="element.options.readonly"
-        :editable="element.options.editable"
-        :clearable="element.options.clearable"
-        :format="element.options.format"
-        :disabled="disabled || element.options.disabled"
-        :style="{ width: element.options.width }"
-      />
+      <el-config-provider :locale="zhCn">
+        <el-date-picker
+          v-model="data"
+          :placeholder="element.options.placeholder"
+          :readonly="element.options.readonly"
+          :editable="element.options.editable"
+          :clearable="element.options.clearable"
+          :format="element.options.format"
+          :disabled="disabled || element.options.disabled"
+          :style="{ width: element.options.width }"
+        />
+      </el-config-provider>
     </template>
 
     <template v-if="element.type === 'rate'">
@@ -332,6 +336,7 @@
 
 <script lang="ts" setup>
 import type { WidgetForm } from '@/config'
+import zhCn from "element-plus/es/locale/lang/zh-cn";
 
 const props = defineProps<{
   config: WidgetForm['config']

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
fhKeeper/formulahousekeeper/plugIn/form-design-master/update/dist/index.css


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 239 - 25
fhKeeper/formulahousekeeper/plugIn/form-design-master/update/dist/index.es.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
fhKeeper/formulahousekeeper/plugIn/form-design-master/update/dist/index.es.js.map