ソースを参照

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	LOG_FILE_IS_UNDEFINED
ljy121 1 年間 前
コミット
a36206e623

+ 0 - 1
client/.env.dev

@@ -6,7 +6,6 @@ VITE_DEV=false
 # 请求路径
 # VITE_BASE_URL='http://10.10.9.113:48080'
 VITE_BASE_URL='http://10.10.10.7:18080'
-# VITE_BASE_URL='http://oa.zjugis.com:28080'
 
 # VITE_BASE_URL='http://10.10.9.168:48080'
 

+ 24 - 32
client/src/utils/PubsubService.ts

@@ -3,59 +3,51 @@
  * 一个简单的发布者、订阅者模式,提供了发布、订阅、删除的方法
  * from chinyan
  */
-const PubsubService = (function () {
-  const topics: Record<string, ((params?: any) => void)[]> = {}
+class PubsubService {
+  private topics: Record<string, ((params?: any) => void)[]> = {}
 
   // 发布事件
-  function publish(topic: string, data: any) {
-    if (!topics[topic]) return
-    topics[topic].forEach((fn) => fn(data))
+  publish(topic: string, data: any) {
+    if (!this.topics[topic]) return
+    this.topics[topic].forEach((fn) => fn(data))
   }
 
   // 订阅事件
-  function subscribe(topic: string, callback: (params?: any) => void) {
-    if (!topics[topic]) {
-      topics[topic] = []
+  subscribe(topic: string, callback: (params?: any) => void) {
+    if (!this.topics[topic]) {
+      this.topics[topic] = []
     }
 
-    if (topics[topic].includes(callback)) {
-      return // 已经订阅过,不重复添加
+    if (!this.topics[topic].includes(callback)) {
+      this.topics[topic].push(callback)
     }
 
-    topics[topic].push(callback)
     // 返回取消订阅的方法
-    return function unsubscribe() {
-      const index = topics[topic].indexOf(callback)
+    return () => {
+      const index = this.topics[topic].indexOf(callback)
       if (index !== -1) {
-        topics[topic].splice(index, 1)
+        this.topics[topic].splice(index, 1)
       }
     }
   }
 
   // 清空所有订阅者
-  function clearAllSub() {
-    for (const key in topics) {
-      topics[key] = []
-    }
+  clearAllSub() {
+    this.topics = {}
   }
 
   // 清空某个主题的订阅者
-  function clearSubsByTopic(topic: string) {
-    topics[topic] = []
+  clearSubsByTopic(topic: string) {
+    if (this.topics[topic]) {
+      this.topics[topic] = []
+    }
   }
 
   // 判断是否有某个主题的订阅者
-  function hasSubsByTopic(topic: string) {
-    return topics[topic] && topics[topic].length > 0
-  }
-
-  return {
-    publish,
-    subscribe,
-    clearSubsByTopic,
-    clearAllSub,
-    hasSubsByTopic
+  hasSubsByTopic(topic: string) {
+    return this.topics[topic] && this.topics[topic].length > 0
   }
-})()
+}
 
-export default PubsubService
+// 实例化并导出单例
+export default new PubsubService()

+ 4 - 3
client/src/views/OaSystem/financialManagement/kpglPage/deptIndex.vue

@@ -4,7 +4,7 @@
       <div class="form">
         <span class="formSpan">发票号码:</span>
         <el-input
-          v-model="queryParams.invoiceNumber"
+          v-model="queryParams.invoiceNo"
           placeholder="请输入发票号码"
           style="width: 210px"
         />
@@ -24,7 +24,7 @@
       </div>
       <div class="form">
         <span class="formSpan">项目名称:</span>
-        <el-input v-model="queryParams.xmmc" style="width: 160px" />
+        <el-input v-model="queryParams.xmmc" style="width: 160px" placeholder="请输入项目名称" />
       </div>
       <div class="form">
         <span class="formSpan">开票状态:</span>
@@ -102,7 +102,7 @@
           width="120"
           label="开票日期"
         />
-        <el-table-column align="center" prop="invoiceNumber" label="发票号码" width="150" />
+        <el-table-column align="center" prop="invoiceNo" label="发票号码" width="150" />
         <el-table-column
           align="center"
           :show-overflow-tooltip="true"
@@ -217,6 +217,7 @@ const returnTime = ref([])
 const queryParams = reactive({
   pageNo: 1,
   pageSize: 10,
+  invoiceNo: '',
   invoiceNumber: '',
   contractName: '',
   deptId: deptId,

+ 10 - 13
client/src/views/OaSystem/financialManagement/kpglPage/index.vue

@@ -4,7 +4,7 @@
       <div class="form">
         <span class="formSpan">发票号码:</span>
         <el-input
-          v-model="queryParams.invoiceNumber"
+          v-model="queryParams.invoiceNo"
           placeholder="请输入发票号码"
           style="width: 210px"
         />
@@ -24,15 +24,19 @@
       </div>
       <div class="form">
         <span class="formSpan">责任部门:</span>
-        <DeptTree v-model="queryParams['deptId']" />
+        <DeptTree v-model="queryParams['deptId']" placeholder="请选择责任部门" />
       </div>
       <div class="form">
         <span class="formSpan">项目名称:</span>
-        <el-input v-model="queryParams.xmmc" style="width: 160px" />
+        <el-input v-model="queryParams.xmmc" style="width: 160px" placeholder="请输入项目名称" />
       </div>
       <div class="form">
         <span class="formSpan">付款单位:</span>
-        <el-input v-model="queryParams.payCompany" style="width: 160px" />
+        <el-input
+          v-model="queryParams.payCompany"
+          style="width: 160px"
+          placeholder="请输入付款单位"
+        />
       </div>
 
       <div class="form">
@@ -75,14 +79,6 @@
         />
       </div>
 
-      <div class="form">
-        <span class="formSpan">是否回款:</span>
-        <el-select v-model="queryParams.isReturn" placeholder="请选择">
-          <el-option label="全部" value="" />
-          <el-option label="是" value="1" />
-          <el-option label="否" value="0" />
-        </el-select>
-      </div>
       <div class="from">
         <div class="btnBox">
           <el-button type="primary" style="background: #3485ff" @click="handleQuery">
@@ -120,7 +116,7 @@
           width="120"
           label="开票日期"
         />
-        <el-table-column align="center" prop="invoiceNumber" label="发票号码" width="150" />
+        <el-table-column align="center" prop="invoiceNo" label="发票号码" width="150" />
         <el-table-column
           align="center"
           :show-overflow-tooltip="true"
@@ -238,6 +234,7 @@ const returnTime = ref([])
 const queryParams = reactive({
   pageNo: 1,
   pageSize: 10,
+  invoiceNo: '',
   invoiceNumber: '',
   contractName: '',
   payCompany: '',

+ 5 - 4
client/src/views/OaSystem/financialManagement/kpglPage/myIndex.vue

@@ -4,7 +4,7 @@
       <div class="form">
         <span class="formSpan">发票号码:</span>
         <el-input
-          v-model="queryParams.invoiceNumber"
+          v-model="queryParams.invoiceNo"
           placeholder="请输入发票号码"
           style="width: 210px"
         />
@@ -20,8 +20,8 @@
       </div>
       <div class="form">
         <span class="formSpan">项目名称:</span>
-        <el-input v-model="queryParams.xmmc" style="width: 160px" />
-      </div>
+        <el-input v-model="queryParams.xmmc" style="width: 160px" placeholder="请输入项目名称"
+      /></div>
       <div class="form">
         <span class="formSpan">开票状态:</span>
         <el-select
@@ -107,7 +107,7 @@
           width="120"
           label="开票日期"
         />
-        <el-table-column align="center" prop="invoiceNumber" label="发票号码" width="150" />
+        <el-table-column align="center" prop="invoiceNo" label="发票号码" width="150" />
         <el-table-column
           align="center"
           :show-overflow-tooltip="true"
@@ -222,6 +222,7 @@ const returnTime = ref([])
 const queryParams = reactive({
   pageNo: 1,
   pageSize: 10,
+  invoiceNo: '',
   invoiceNumber: '',
   contractName: '',
   deptId: '',

+ 10 - 8
client/src/views/OaSystem/home/homeLeader.vue

@@ -44,7 +44,7 @@
       <CardItemThree @init="initData" />
       <CardTitle title="成本情况">
         <template #rightTitle>
-          <span style="font-size: 12px; color: #8b969c"> 单位:元 </span>
+          <span style="font-size: 12px; color: #8b969c"> 单位:{{ isBool ? '万' : '元' }} </span>
         </template>
       </CardTitle>
       <div style="flex: 1"> <MyEchart :options="options" /></div>
@@ -162,20 +162,22 @@ const options = reactive<EChartsOption>({
     }
   ]
 })
+const isBool = ref<boolean>(false)
 const initData = (result) => {
-  let isBool = false
   if (result.travelCost >= 10000) {
-    isBool = true
+    isBool.value = true
   } else if (result.reimbursementCost >= 10000) {
-    isBool = true
+    isBool.value = true
   } else if (result.paymentCost >= 10000) {
-    isBool = true
+    isBool.value = true
   }
-  chartData.value[0]['value'] = isBool ? (result.travelCost / 10000).toFixed(2) : result.travelCost
-  chartData.value[1]['value'] = isBool
+  chartData.value[0]['value'] = isBool.value
+    ? (result.travelCost / 10000).toFixed(2)
+    : result.travelCost
+  chartData.value[1]['value'] = isBool.value
     ? (result.reimbursementCost / 10000).toFixed(2)
     : result.reimbursementCost
-  chartData.value[2]['value'] = isBool
+  chartData.value[2]['value'] = isBool.value
     ? (result.paymentCost / 10000).toFixed(2)
     : result.paymentCost
   // options['series'][0]['data'] = chartData

+ 35 - 4
client/src/views/OaSystem/marketCenter/khxjPage/index.vue

@@ -11,7 +11,10 @@
         <h4><i class="icon"></i>基本信息</h4>
         <table>
           <tr>
-            <td class="th">客户名称:</td>
+            <td class="th">
+              <span class="required-star">*</span>
+              客户名称:
+            </td>
             <td><el-input clearable v-model="queryParams.customerName" /></td>
             <td class="th">客户编号:</td>
             <td>
@@ -29,7 +32,10 @@
             </td>
           </tr>
           <tr>
-            <td class="th">所属公司:</td>
+            <td class="th">
+              <span class="required-star">*</span>
+              所属公司:</td
+            >
             <td>
               <CompanySelect
                 v-model="queryParams.belongCompanyId"
@@ -54,7 +60,10 @@
             </td>
           </tr>
           <tr>
-            <td class="th">所属区域:</td>
+            <td class="th">
+              <span class="required-star">*</span>
+              所属区域:
+            </td>
             <td>
               <DistrictTree v-model="queryParams.xzqdm" />
             </td>
@@ -409,6 +418,25 @@ const onEditItem = (index) => {
 }
 // 生成客户编号
 const customerCode = () => {
+  if (
+    !queryParams.value.customerName ||
+    !queryParams.value.belongCompanyId ||
+    !queryParams.value.xzqdm
+  ) {
+    ElMessage({
+      message: '请先将客户基本信息填写完整',
+      type: 'error'
+    })
+    return
+  }
+  if (queryParams.value.customerNumber) {
+    ElMessage({
+      message: '客户编号已生成,请勿重复生成!',
+      type: 'success'
+    })
+    return
+  }
+
   request
     .post(
       {
@@ -428,7 +456,7 @@ const customerCode = () => {
     })
     .catch(() => {
       ElMessage({
-        message: '客户编号生成失败,请填写基本信息后重试',
+        message: '客户编号生成失败,请后重试',
         type: 'error'
       })
     })
@@ -477,6 +505,9 @@ const customerCode = () => {
   }
 
   .tableBox {
+    .required-star {
+      color: #f5222d;
+    }
     .add-contact {
       display: flex;
       justify-content: space-between;

+ 1 - 1
client/src/views/OaSystem/personnelManagement/components/AmountOfWork.vue

@@ -311,7 +311,7 @@ const openDialog = (id) => {
 <style lang="scss" scoped>
 .WorkHoursSelect {
   width: 100%;
-  height: calc(100% - 110px);
+  height: calc(100% - 140px);
   display: flex;
 
   .select-title {

+ 5 - 2
client/src/views/OaSystem/personnelManagement/components/DetailBox.vue

@@ -234,7 +234,7 @@ watch(
       }
       .text-area {
         width: 100%;
-        height: 132px;
+        height: 200px;
         overflow-y: scroll;
         background: #f9f9f9;
         border-radius: 4px 4px 4px 4px;
@@ -263,12 +263,15 @@ watch(
     width: 100%;
     padding-left: 100px;
     .comment-list {
-      height: 180px;
+      height: 120px;
       overflow-y: scroll;
       background: #f7f8fa;
       border-radius: 4px 4px 4px 4px;
       border: 1px solid #eef2f9;
       padding: 10px;
+      :deep(.el-empty) {
+        padding: 0 !important;
+      }
       .item {
         display: flex;
         justify-content: flex-start;

+ 6 - 3
client/src/views/OaSystem/personnelManagement/components/DetailBoxWeek.vue

@@ -145,7 +145,7 @@ watch(
       <el-form ref="form" label-width="100px">
         <el-row :gutter="24">
           <el-col :span="10">
-            <el-form-item class="label-item" label="日志日期">
+            <el-form-item class="label-item" label="周报日期">
               <div class="write-date">
                 {{ moment(detail.reportStartDate).format('YYYY-MM-DD') }}
                 -
@@ -246,7 +246,7 @@ watch(
       }
       .text-area {
         width: 100%;
-        height: 132px;
+        height: 200px;
         overflow-y: scroll;
         background: #f9f9f9;
         border-radius: 4px 4px 4px 4px;
@@ -275,12 +275,15 @@ watch(
     width: 100%;
     padding-left: 100px;
     .comment-list {
-      height: 180px;
+      height: 120px;
       overflow-y: scroll;
       background: #f7f8fa;
       border-radius: 4px 4px 4px 4px;
       border: 1px solid #eef2f9;
       padding: 10px;
+      :deep(.el-empty) {
+        padding: 0 !important;
+      }
       .item {
         display: flex;
         justify-content: flex-start;

+ 10 - 3
client/src/views/OaSystem/personnelManagement/weeklyCenter/weeklyLogList.vue

@@ -60,8 +60,16 @@ const { onChange } = defineProps<IProp>()
 const isLoading = ref<boolean>(false)
 // 所有的周日报和周划分
 // const allWorkDayListAndLogs = ref<any>([])
+
 // 本月日期
-const thisMonth = ref<any>(moment())
+const defineMonth = () => {
+  // 如果本周日是在一号或二号,那本周必然算是上个月,所以做一个判断
+  if (moment().date() < 3) {
+    return moment().subtract(1, 'month')
+  }
+  return moment()
+}
+const thisMonth = ref<any>(defineMonth())
 // 本月的周日报和周划分
 const thisMonthLogs = ref<any>([])
 
@@ -109,7 +117,6 @@ const initPageList = async () => {
   const workObj = await workDayList()
   const logList = await http.getMonthLogList('weekly', thisMonth.value)
   const allWorkDayListAndLogs = service.mergeWorkDayAndLogs(workObj, logList)
-
   const pointer = moment(thisMonth.value).format('YYYY-M')
   const thisMonthLog = allWorkDayListAndLogs[pointer].map((item: any) => {
     // 默认未填
@@ -177,7 +184,7 @@ const statusObj = [
 // const { push } = useRouter()
 const checkItem = ref(moment())
 const goToWeeklyPage = (item: any) => {
-  if (item.type == '未到') {
+  if (item?.type == '未到') {
     message.info('还未到这周!')
     return
   }

+ 14 - 2
client/src/views/OaSystem/projectCenter/projectBook/projectBook.vue

@@ -17,6 +17,17 @@
         <span class="formSpan">责任部门:</span>
         <DeptTree v-model="queryParams['deptId']" />
       </div>
+      <div class="form form-time-range">
+        <span class="formSpan">立项时间:</span>
+        <el-date-picker
+          v-model="lxsjObj"
+          type="daterange"
+          unlink-panels
+          range-separator="To"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        />
+      </div>
       <div class="form" style="width: unset">
         <span class="formSpan">合同状态:</span>
         <el-radio-group v-model="queryParams.isSign" @change="searchHandle">
@@ -73,8 +84,9 @@
           <el-table-column label="序号" width="80">
             <template #default="scope">{{ scope.$index + 1 }}</template>
           </el-table-column>
-          <el-table-column :show-overflow-tooltip="true" prop="xmbh" label="项目编号" />
+          <el-table-column :show-overflow-tooltip="true" prop="xmbh" width="180" label="项目编号" />
           <el-table-column :show-overflow-tooltip="true" prop="xmmc" label="项目名称" />
+          <el-table-column prop="lxsj" label="立项时间" width="140" />
           <el-table-column prop="zrbm" label="责任部门" :show-overflow-tooltip="true" width="200" />
           <el-table-column prop="xmjl" label="项目经理" width="120" />
           <el-table-column prop="contractAmount" align="center" label="合同额" width="120">
@@ -133,7 +145,7 @@ defineOptions({ name: 'ProjectBook' })
 const router = useRouter()
 const tableRef: any = ref(null)
 const tableHeight: any = ref(0)
-const { queryParams, setSearchParams, exportHandleCommon } = useMixins()
+const { queryParams, lxsjObj, setSearchParams, exportHandleCommon } = useMixins()
 
 const handleCurrentChange = (pageNo: number) => {
   queryParams.pageNo = pageNo

+ 7 - 6
zjugis-module-adm/zjugis-module-adm-biz/src/main/java/com/zjugis/module/adm/service/staff/StaffStatisticServiceImpl.java

@@ -80,6 +80,7 @@ public class StaffStatisticServiceImpl implements StaffStatisticService {
 
         List<StaffRecordSDO> staffList = recordsMapper.selectList(new LambdaQueryWrapperX<StaffRecordSDO>()
                 .inIfPresent(StaffRecordSDO::getUserId, userIds)
+                .neIfPresent(StaffRecordSDO::getNickname, "admin")
                 .neIfPresent(StaffRecordSDO::getState, 4));
 
 
@@ -102,15 +103,15 @@ public class StaffStatisticServiceImpl implements StaffStatisticService {
                 .collect(Collectors.groupingBy(
                         employee -> {
                             if (employee.getZgxl().equals("6")) {
-                                return "doctorStaff";
+                                return "doctorStaff"; //博士
                             } else if (employee.getZgxl().equals("5")) {
-                                return "masterStaff";
-                            } else if (employee.getZgxl().equals("4")) {
-                                return "undergraduateStaff";
+                                return "masterStaff"; //硕士
+                            } else if (employee.getZgxl().equals("4") || employee.getZgxl().equals("7")) {
+                                return "undergraduateStaff";//本科
                             } else if (employee.getZgxl().equals("3")) {
-                                return "juniorCollegeStaff";
+                                return "juniorCollegeStaff";//大专
                             } else {
-                                return "belowJuniorCollegeStaff";
+                                return "belowJuniorCollegeStaff"; //大专以下
                             }
                         },
                         Collectors.counting()