Browse Source

feat: 客户管理相关代码

qiny 1 year ago
parent
commit
2eab192b47

+ 7 - 0
client/src/api/system/dept/index.ts

@@ -61,3 +61,10 @@ export const disassociateUser = async (params: IAssociated) => {
     data: params
   })
 }
+
+// 获取部门用户精简信息列表-数据权限过滤
+export const getSimpleDeptUserList = async () => {
+  return await request.get({
+    url: `/system/dept/list-all-user-simple-permission`
+  })
+}

+ 16 - 0
client/src/router/modules/remaining.ts

@@ -304,6 +304,22 @@ const remainingRouter: AppRouteRecordRaw[] = [
         meta: {
           title: '发出的日志'
         }
+      },
+      {
+        path: 'newCustomer',
+        component: () => import('@/views/OaSystem/marketCenter/khxjPage/index.vue'),
+        name: 'newCustomer',
+        meta: {
+          title: '新建客户'
+        }
+      },
+      {
+        path: 'customerDetail',
+        component: () => import('@/views/OaSystem/marketCenter/khxqPage/index.vue'),
+        name: 'customerDetail',
+        meta: {
+          title: '客户详情'
+        }
       }
     ]
   },

+ 36 - 12
client/src/views/OaSystem/marketCenter/khglPage/index.vue

@@ -1,17 +1,41 @@
 <template>
-  <div class="purchaseContractBox">
-    <img src="@/assets/imgs/kfz.jpg" />
+  <div class="oa-sys-list-view">
+    <SearchForm :onSearch="onSearch" />
+    <CustomerTable :dataSource="dataSource" />
   </div>
 </template>
+<script lang="ts" setup>
+/**
+ * @description 客户管理
+ */
+import SearchForm from './components/SearchForm.vue'
+import CustomerTable from './components/CustomerTable.vue'
+import request from '@/config/axios'
 
-<style lang="scss" scoped>
-.purchaseContractBox {
-  margin-top: 20px;
-  height: calc(100% - 20px);
-  background-color: #fff;
-  border-radius: 20px;
-  padding: 20px;
-  position: relative;
-  text-align: center;
+const dataSource = ref([])
+onMounted(() => {
+  getCustomerList()
+})
+// 搜索
+const onSearch = (params: any) => {
+  console.log('params', params)
+  getCustomerList(params)
 }
-</style>
+// 获取客户管理数据
+const getCustomerList = async (params = {}) => {
+  const result = await request.getOriginal(
+    {
+      url: '/customer/customer-list',
+      params: {
+        pageNo: 1,
+        pageSize: 10,
+        ...params
+      }
+    },
+    '/business'
+  )
+  dataSource.value = result.data
+  console.log('result', result)
+}
+</script>
+<style lang="scss" scoped></style>

+ 0 - 105
client/src/views/OaSystem/personnelManagement/dailyStatistic/dailyStatisticDetail.vue

@@ -1,105 +0,0 @@
-<template>
-  <div class="dailyStatisticDetailBox">
-    <h4 class="title">部门日报统计</h4>
-    <div class="searchBox">
-      <el-form :inline="true" :model="formInline" class="demo-form-inline">
-        <el-form-item label="年份:">
-          <el-date-picker v-model="formInline.month" type="year" placeholder="请选择年份" />
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" :icon="Search" @click="onSearchHandle">查询</el-button>
-          <el-button type="primary" :icon="UploadFilled" @click="onExportHandle">导出</el-button>
-        </el-form-item>
-      </el-form>
-    </div>
-    <div class="tableBox">
-      <el-table :data="tableData" style="width: 100%">
-        <el-table-column prop="address" width="80px" label="月份" />
-        <el-table-column
-          width="45px"
-          v-for="(item, index) in 31"
-          :key="index"
-          :label="(index + 1).toString()"
-        />
-        <el-table-column prop="address" label="应填(天)" />
-        <el-table-column prop="address" label="未填(天)" />
-      </el-table>
-    </div>
-    <div class="pageBox">
-      <el-pagination
-        v-model:current-page="currentPage1"
-        :page-size="100"
-        background
-        layout="total, prev, pager, next, jumper"
-        :total="1000"
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-      />
-    </div>
-  </div>
-</template>
-
-<script setup lang="ts">
-import { UploadFilled, Search } from '@element-plus/icons-vue'
-const currentPage1 = ref(1)
-const formInline = ref<{
-  dept: string
-  month: string
-}>({
-  dept: '',
-  month: ''
-})
-const tableData = [
-  {
-    date: '2016-05-03',
-    name: 'Tom',
-    address: '166'
-  },
-  {
-    date: '2016-05-02',
-    name: 'Tom',
-    address: '166'
-  },
-  {
-    date: '2016-05-04',
-    name: 'Tom',
-    address: '166'
-  },
-  {
-    date: '2016-05-01',
-    name: 'Tom',
-    address: '166'
-  }
-]
-const onSearchHandle = (): void => {}
-const onExportHandle = (): void => {}
-const handleCurrentChange = (): void => {}
-const handleSizeChange = (): void => {}
-</script>
-
-<style lang="scss" scoped>
-.dailyStatisticDetailBox {
-  margin-top: 20px;
-  height: calc(100% - 20px);
-  background-color: #fff;
-  border-radius: 20px;
-  padding: 20px;
-  > .title {
-    padding-bottom: 20px;
-    font-size: 20px;
-  }
-  > .tableBox {
-  }
-  :deep {
-    .el-table th.el-table__cell {
-      background-color: #edf2fc;
-      color: #4c525b;
-    }
-  }
-  > .pageBox {
-    padding: 20px 0px 10px 0px;
-    display: flex;
-    justify-content: right;
-  }
-}
-</style>

+ 4 - 4
client/src/views/OaSystem/personnelManagement/weeklyStatistic/index.vue

@@ -89,11 +89,11 @@ const { push } = useRouter()
 const jumpToMyLog = (row: any): void => {
   const { userId, nickName, reportYear, reportMonth } = row
   // 查看本月填报详情
-  // push(`/weeklyLogDetail?userId=${userId}&userName=${nickName}&date=${reportYear}-${reportMonth}`)
+  push(`/weeklyLogDetail?userId=${userId}&userName=${nickName}&date=${reportYear}-${reportMonth}`)
   // 查看本月填报列表
-  push(
-    `/mySendLog?type=weekly&userId=${userId}&userName=${nickName}&date=${reportYear}-${reportMonth}`
-  )
+  // push(
+  //   `/mySendLog?type=weekly&userId=${userId}&userName=${nickName}&date=${reportYear}-${reportMonth}`
+  // )
 }
 
 onMounted(() => {

+ 0 - 105
client/src/views/OaSystem/personnelManagement/weeklyStatistic/weeklyStatisticDetail.vue

@@ -1,105 +0,0 @@
-<template>
-  <div class="weeklyStatisticDetailBox">
-    <h4 class="title">部门日报统计</h4>
-    <div class="searchBox">
-      <el-form :inline="true" :model="formInline" class="demo-form-inline">
-        <el-form-item label="年份:">
-          <el-date-picker v-model="formInline.month" type="year" placeholder="请选择年份" />
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" :icon="Search" @click="onSearchHandle">查询</el-button>
-          <el-button type="primary" :icon="UploadFilled" @click="onExportHandle">导出</el-button>
-        </el-form-item>
-      </el-form>
-    </div>
-    <div class="tableBox">
-      <el-table :data="tableData" style="width: 100%">
-        <el-table-column prop="address" label="部门" />
-        <el-table-column prop="address" width="80px" label="姓名" />
-        <el-table-column prop="address" width="80px" label="月份" />
-        <el-table-column v-for="(item, index) in 5" :key="index" :label="weeklyTitle[index]" />
-        <el-table-column prop="address" label="应填(周)" />
-        <el-table-column prop="address" label="未填(周)" />
-        <el-table-column prop="address" label="已填(周)" />
-        <el-table-column prop="address" label="填写率" />
-      </el-table>
-    </div>
-    <div class="pageBox">
-      <el-pagination
-        v-model:current-page="currentPage1"
-        :page-size="100"
-        background
-        layout="total, prev, pager, next, jumper"
-        :total="1000"
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-      />
-    </div>
-  </div>
-</template>
-
-<script setup lang="ts">
-import { UploadFilled, Search } from '@element-plus/icons-vue'
-const weeklyTitle = ['第一周', '第二周', '第三周', '第四周', '第五周']
-const currentPage1 = ref(1)
-const formInline = ref<{
-  dept: string
-  month: string
-}>({
-  dept: '',
-  month: ''
-})
-const tableData = [
-  {
-    date: '2016-05-03',
-    name: 'Tom',
-    address: '166'
-  },
-  {
-    date: '2016-05-02',
-    name: 'Tom',
-    address: '166'
-  },
-  {
-    date: '2016-05-04',
-    name: 'Tom',
-    address: '166'
-  },
-  {
-    date: '2016-05-01',
-    name: 'Tom',
-    address: '166'
-  }
-]
-const onSearchHandle = (): void => {}
-const onExportHandle = (): void => {}
-const handleCurrentChange = (): void => {}
-const handleSizeChange = (): void => {}
-</script>
-
-<style lang="scss" scoped>
-.weeklyStatisticDetailBox {
-  margin-top: 20px;
-  height: calc(100% - 20px);
-  background-color: #fff;
-  border-radius: 20px;
-  padding: 20px;
-  > .title {
-    padding-bottom: 20px;
-    font-size: 20px;
-  }
-  > .tableBox {
-  }
-  :deep {
-    .el-table th.el-table__cell {
-      background-color: #edf2fc;
-      color: #4c525b;
-    }
-  }
-  > .pageBox {
-    padding: 20px 0px 10px 0px;
-    display: flex;
-    justify-content: right;
-  }
-}
-</style>