Bladeren bron

提出相关产品

Lijy 1 jaar geleden
bovenliggende
commit
3cd2cecb91

fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/component/relatedProducts.vue → fhKeeper/formulahousekeeper/customerBuler-crm/src/components/relatedProducts/relatedProducts.vue


+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/component/products.vue

@@ -55,7 +55,7 @@ import { ref, reactive, onMounted, onUnmounted, defineExpose, inject, watchEffec
 import { GETTABLELIST } from '@/pages/product/api';
 import { post } from '@/utils/request';
 
-import RelatedProducts from './relatedProducts.vue'
+import RelatedProducts from '@/components/relatedProducts/relatedProducts.vue'
 
 const props = defineProps<{
     information: any

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

@@ -172,7 +172,7 @@ import { getAllListByCode, getFromValue, resetFromValue, getFirstDayOfMonth, cre
 import { createTask } from '@/components/TaskModal/taskFunction'
 import { formatDateTime } from '@/utils/times'
 import { GenerateForm } from '@zmjs/form-design';
-import RelatedProducts from './component/relatedProducts.vue'
+import RelatedProducts from '@/components/relatedProducts/relatedProducts.vue'
 import TaskModal from '@/components/TaskModal/index.vue'
 import DeteleBusiness from './component/deteleTables.vue'
 import StageSetting from './component/stageSetting.vue'

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

@@ -17,21 +17,21 @@ export const actionButtons: any[] = [
 ]
 
 export const tableColumns: TableColumn[] = [
-    { prop: 'name', label: '订单编号', event: 'toDetali', width: '150' },
-    { prop: 'mobile', label: '订单名称', width: '150' },
-    { prop: 'email', label: '客户名称', width: '200' },
-    { prop: 'wechat', label: '商机名称', width: '200' },
-    { prop: 'position', label: '订单金额', width: '100' },
-    { prop: 'company', label: '已回款', width: '100' },
-    { prop: 'companya', label: '未回款', width: '100' },
-    { prop: 'companyb', label: '回放状态', width: '100' },
-    { prop: 'companyc', label: '订单类型', width: '200' },
-    { prop: 'companyd', label: '下单时间', width: '200' },
-    { prop: 'companye', label: '订单开始时间', width: '200' },
-    { prop: 'companyf', label: '订单结束时间', width: '200' },
-    { prop: 'companyg', label: '客户签的人', width: '200' },
-    { prop: 'companyh', label: '公司签的人', width: '200' },
-    { prop: 'companyj', label: '负责人', width: '200' },
-    { prop: 'companyk', label: '创建人', width: '200' },
-    { prop: 'companyl', label: '创建时间', width: '200' },
+    { prop: 'orderCode', label: '订单编号', event: 'toDetali', width: '150' },
+    { prop: 'orderName', label: '订单名称', width: '150' },
+    { prop: 'customName', label: '客户名称', width: '200' },
+    { prop: 'businessOpportunityName', label: '商机名称', width: '200' },
+    { prop: 'price', label: '订单金额', width: '100' },
+    { prop: 'receivedPayment', label: '已回款', width: '100' },
+    { prop: 'unReceivedPayment', label: '未回款', width: '100' },
+    { prop: 'status', label: '回放状态', width: '100' },
+    { prop: 'typeName', label: '订单类型', width: '200' },
+    { prop: 'placeTime', label: '下单时间', width: '200' },
+    { prop: 'orderStartDate', label: '订单开始时间', width: '200' },
+    { prop: 'orderEndDate', label: '订单结束时间', width: '200' },
+    { prop: 'customSigner', label: '客户签的人', width: '200' },
+    { prop: 'companySigner', label: '公司签的人', width: '200' },
+    { prop: 'inchargerName', label: '负责人', width: '200' },
+    { prop: 'creatorName', label: '创建人', width: '200' },
+    { prop: 'createTime', label: '创建时间', width: '200' },
 ]

+ 21 - 19
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/index.vue

@@ -40,13 +40,13 @@
         </div>
         <div class="flex-1 w-full overflow-hidden">
           <!-- 表格 -->
-          <el-table ref="clueTableRef" :data="formTable" border v-loading="allLoading.formTableLading"
+          <el-table ref="otherTableRef" :data="formTable" border v-loading="allLoading.formTableLading"
             style="width: 100%;height: 100%;">
             <el-table-column v-for="(column, index) in tableColumns" :key="index" :prop="column.prop"
               :label="column.label" :width="column.width">
               <template #default="scope">
                 <template v-if="column.event === 'toDetali'">
-                  <el-button link type="primary" size="large" @click="toDetali(scope.row)">{{ scope.row.name
+                  <el-button link type="primary" size="large" @click="toDetali(scope.row)">{{ scope.row[column.prop]
                   }}</el-button>
                 </template>
               </template>
@@ -76,6 +76,7 @@ import { getAllListByCode, getFromValue, resetFromValue, getFirstDayOfMonth, get
 import { post, get } from "@/utils/request";
 import { actionButtons, tableColumns, GETSYSFILED, GETPERSONNEL, GETGENERATEFOEM, MOD, GETTABLELIST, GETALLPRODUCT } from "./api";
 import { useRouter, useRoute } from "vue-router";
+import { URL_FETALL } from "../customer/api";
 
 const router = useRouter()
 
@@ -93,7 +94,7 @@ const selectData = reactive({ // 下拉数据
   Personnel: [] as personnelInterface[],
   Customer: [] as any[], // 客户名称
   OrderType: [] as any[], // 订单类型
-  RemittanceStatus: [] as any[], // 回款状态
+  RemittanceStatus: [{ id: 0, name: '已回款' }, { id: 1, name: '未回款' }, { id: 2, name: '已完全回款' }] as any[], // 回款状态
   AllProduct: [] as any[] // 所有产品
 })
 const filterItems = ref<FilterItem[]>([]) // 渲染筛选条件
@@ -104,20 +105,18 @@ const formTablePaging = reactive({ // 分页条件
 })
 const generateFormData = ref([]) // 自定义表单数据
 
-const formTable = ref([
-  { name: '订单名称', mobile: '13311112222', email: '123@qq.com', responsible: '张三', createId: '张三' }
-]) // 表格数据
+const formTable = ref([]) // 表格数据
 const allLoading = reactive({ // 按钮加载 Loading
   formTableLading: false,
 })
-const dialogVisible = reactive({
-  
+const allVisible = reactive({
+
 })
 
 function toDetali(row: any) {
   router.push({
     path: `${MOD}/detail`,
-    query: { id: row.name }
+    query: { id: row.id }
   })
 }
 
@@ -148,7 +147,7 @@ function getAllProduct() {
 }
 
 async function getSystemField() {
-  const systemField = getAllListByCode([])
+  const systemField = getAllListByCode(['订单类型'])
   for (let i in systemField) {
     const { data } = await get(`${GETSYSFILED}?code=${systemField[i]}`)
     for (let key of Object.keys(selectData)) {
@@ -158,14 +157,17 @@ async function getSystemField() {
     }
   }
 
-  const { data } = await post(GETPERSONNEL, {})
-  selectData.Personnel = data.map((item: any) => {
+  const { data: personnelData } = await post(GETPERSONNEL, {})
+  selectData.Personnel = personnelData.map((item: any) => {
     const { id, name, phone, jobNumber } = item
-    return {
-      id, name, phone, jobNumber
-    }
+    return { id, name, phone, jobNumber }
   })
 
+  const { data: customerData } = await post(URL_FETALL, {})
+  selectData.Customer = (customerData || []).map((item: any) => {
+    const { id, customName } = item
+    return { id, name: customName }
+  })
   // const res = await get(GETGENERATEFOEM)
   // generateFormData.value = JSON.parse(res.data[0].config)
 
@@ -177,10 +179,10 @@ function setFilterItems() {
     { 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: 'type', type: 'select', options: selectData.OrderType },
-    { label: '回款状态', key: 'remittanceStatus', type: 'select', options: selectData.RemittanceStatus },
-    { label: '负责人', key: 'responsibleId', type: 'select', options: selectData.Personnel },
+    { label: '商机名称', key: 'businessOpportunityId', type: 'input' },
+    { label: '订单类型', key: 'ordertype', type: 'select', options: selectData.OrderType },
+    { label: '回款状态', key: 'receivedStatus', type: 'select', options: selectData.RemittanceStatus },
+    { label: '负责人', key: 'inchargerId', type: 'select', options: selectData.Personnel },
     { label: '下单时间', key: '', type: 'date' },
   ]
 }

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/thread/detail/components/information.vue

@@ -133,7 +133,7 @@ import { GETTEMPLATE, UNDATEFORM, GETPERSONNEL, UNDATECLAIM, GETTEMPLATETWO } fr
 import { get, post } from '@/utils/request'
 import { useStore } from '@/store/index'
 import { ElMessageBox } from 'element-plus';
-import RelatedProducts from '@/pages/business/component/relatedProducts.vue'
+import RelatedProducts from '@/components/relatedProducts/relatedProducts.vue'
 import { all } from 'axios';
 import { formatDateTime } from '@/utils/times';
 import { UPDATEINSET } from '@/pages/business/api';