Переглянути джерело

Merge branch 'master' of http://47.100.37.243:10191/wutt/manHourHousekeeper

Min 11 місяців тому
батько
коміт
a1df516c1a
26 змінених файлів з 557 додано та 73 видалено
  1. 3 0
      fhKeeper/formulahousekeeper/customerBuler-crm/.gitignore
  2. 39 5
      fhKeeper/formulahousekeeper/customerBuler-crm/src/components/relatedProducts/relatedProducts.vue
  3. 1 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/component/information.vue
  4. 5 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/component/products.vue
  5. 34 12
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/index.vue
  6. 2 2
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/type.d.ts
  7. 4 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contacts/component/relatedBusiness.vue
  8. 5 2
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/component/relatedBusiness.vue
  9. 4 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/thread/detail/components/information.vue
  10. 0 2
      fhKeeper/formulahousekeeper/customerBuler-crm/src/utils/customInstructions.ts
  11. 28 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/utils/tools.ts
  12. 6 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java
  13. 2 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java
  14. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/task/TimingTask.java
  15. 2 2
      fhKeeper/formulahousekeeper/plugIn/form-design-master/.vscode/settings.json
  16. 26 0
      fhKeeper/formulahousekeeper/plugIn/form-design-master/src/components.d.ts
  17. 11 0
      fhKeeper/formulahousekeeper/plugIn/form-design-master/src/generate/GenerateForm.vue
  18. 46 0
      fhKeeper/formulahousekeeper/plugIn/form-design-master/src/generate/GenerateFormItem.vue
  19. 1 0
      fhKeeper/formulahousekeeper/plugIn/form-design-master/update/dist/generate/GenerateForm.vue.d.ts
  20. 6 2
      fhKeeper/formulahousekeeper/plugIn/form-design-master/update/dist/generate/GenerateFormItem.vue.d.ts
  21. 1 1
      fhKeeper/formulahousekeeper/plugIn/form-design-master/update/dist/index.css
  22. 69 16
      fhKeeper/formulahousekeeper/plugIn/form-design-master/update/dist/index.es.js
  23. 1 1
      fhKeeper/formulahousekeeper/plugIn/form-design-master/update/dist/index.es.js.map
  24. 235 0
      fhKeeper/formulahousekeeper/timesheet/src/components/cascadeSelection.vue
  25. 10 10
      fhKeeper/formulahousekeeper/timesheet/src/components/select.vue
  26. 15 13
      fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

+ 3 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/.gitignore

@@ -22,3 +22,6 @@ dist-ssr
 *.njsproj
 *.sln
 *.sw?
+
+!plugIn/form-design-master/update/node_modules/
+!plugIn/form-design-master/update/dist/

+ 39 - 5
fhKeeper/formulahousekeeper/customerBuler-crm/src/components/relatedProducts/relatedProducts.vue

@@ -1,5 +1,5 @@
 <template>
-    <div>
+    <div class="pt-2">
         <el-table ref="productTableRef" :data="productTable" border :row-class-name="tableRowClassName"
             @row-click="tableRowItem" :style="{ width: '100%', height: heightClass }">
             <el-table-column label="序号" width="60" align="center">
@@ -55,11 +55,22 @@
                 </template>
             </el-table-column>
         </el-table>
+
+        <div class="flex w-full justify-between pt-2 pb-1">
+            <div>整单折扣率(%)</div>
+            <div class="flex">
+                <div>已选中产品:<span class="text-[red] pr-2">{{ selectedQuantity }}</span>个</div>
+                <div class="pl-4">
+                    总金额:<span class="pr-1">{{ totalAmount }}</span> 元
+                </div>
+            </div>
+        </div>
     </div>
 </template>
   
 <script lang="ts" setup>
-import { ref, reactive, onMounted, inject, watchEffect } from "vue";
+import { ElNotification } from "element-plus";
+import { ref, reactive, onMounted, inject, watchEffect, computed } from "vue";
 
 const props = defineProps<{
     productTableList: any,
@@ -116,14 +127,37 @@ function returnData() {
     let jsonstr = JSON.stringify(productTable.value)
     let json = '[{"index":0}]'
     if (jsonstr == json) {
-        return false
+        return []
+    }
+
+    const list = productTable.value.filter((item: any) => item.productId)
+    const incompleteProduct = list.find((item: any) => !item.sellingPrice || !item.quantity || !item.discount);
+    if (incompleteProduct) {
+        ElNotification.closeAll();
+        ElNotification({
+            title: '提示',
+            message: `相关产品【${incompleteProduct.productName}】请填写完整`,
+            type: 'warning',
+        });
+        return false;
     }
-    productTable.value.forEach((item: any) => {
+
+    list.forEach((item: any) => {
         delete item.index
     });
-    return productTable.value
+    return list || []
 }
 
+const selectedQuantity = computed(() => {
+    return productTable.value.filter((item: any) => item.productId).length
+})
+
+const totalAmount = computed(() => {
+    return productTable.value.filter((item: any) => item.productId).reduce((pre: number, cur: any) => {
+        return pre + (cur.totalPrice || 0)
+    }, 0)
+})
+
 watchEffect(() => {
     const { productTableList, height, productTableListValue = [] } = props
     console.log(productTableListValue, '<==== 数据')

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

@@ -32,7 +32,7 @@
             </div>
             <div class="formItem flex pt-5 pb-1">
                 <div class="w-22 text-right text-gray-500">负责人:</div>
-                <div class="flex-1 overflow-hidden text-ellipsis whitespace-nowrap ml-1">{{ information.creatorName }}</div>
+                <div class="flex-1 overflow-hidden text-ellipsis whitespace-nowrap ml-1">{{ information.inchargerName }}</div>
             </div>
             <div class="formItem flex pt-5 pb-1">
                 <div class="w-22 text-right text-gray-500">预计成交日期:</div>

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

@@ -58,6 +58,7 @@ import { post } from '@/utils/request';
 import RelatedProducts from '@/components/relatedProducts/relatedProducts.vue'
 import { UPDATEINSET } from '../api';
 import { all } from 'axios';
+import { judgmentaAmounteEqual } from '@/utils/tools';
 
 const emits = defineEmits(['refreshData']);
 const props = defineProps<{
@@ -78,10 +79,13 @@ const allLoading = reactive({
 
 function editProduct() {
     let productTableListData = relatedProductsRef?.value?.returnData()
+    const { id, name, customerId, contactsId, amountOfMoney, expectedTransactionDate, stageId, inchargerId, remark } = information.value
+    if(!productTableListData || judgmentaAmounteEqual({ amountOfMoney }, productTableListData)) {
+      return
+    }
     productTableListData.forEach((item: any) => {
         delete item.id
     })
-    const { id, name, customerId, contactsId, amountOfMoney, expectedTransactionDate, stageId, inchargerId, remark } = information.value
     const formData = { id, name, customerId, contactsId, amountOfMoney, expectedTransactionDate, stageId, inchargerId, remark }
     allLoading.editProductLoading = true
     post(UPDATEINSET, { ...formData, businessItemProductList: JSON.stringify(productTableListData) }).then((_res) => {

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

@@ -29,8 +29,8 @@
               </el-select>
             </el-form-item>
             <el-form-item label="创建时间">
-              <el-date-picker v-model="businessOpportunityForm.startTime" type="date" placeholder="请选择" :clearable="false"
-                format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
+              <el-date-picker v-model="businessOpportunityForm.startTime" type="date" placeholder="请选择"
+                :clearable="false" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
             </el-form-item>
             <el-form-item label="">
               <el-date-picker v-model="businessOpportunityForm.endTime" type="date" placeholder="请选择" :clearable="false"
@@ -47,14 +47,17 @@
     <div class="flex-1 p-5 overflow-auto">
       <div class="bg-white w-full h-full p-3 shadow-md rounded-md flex flex-col">
         <div class="flex justify-end pb-3">
-          <el-button v-permission="['businessAddAnEdit']" type="primary" @click="editNewBusiness(false)">新建商机</el-button>
+          <el-button v-permission="['businessAddAnEdit']" type="primary"
+            @click="editNewBusiness(false)">新建商机</el-button>
           <el-button type="primary" @click="showVisible('batchTransferVisible')"
             :disabled="batchTableData.length <= 0">批量转移</el-button>
           <el-button type="primary" @click="batchDeteleItem()" :disabled="batchTableData.length <= 0">批量删除</el-button>
           <el-button type="primary" @click="showVisible('stageSetVisible')">阶段设置</el-button>
           <el-button type="primary" @click="showVisible('deteleBusinessVisible')">回收站</el-button>
-          <el-button v-permission="['businessImport']" type="primary" @click="showVisible('importVisible')">导入</el-button>
-          <el-button v-permission="['businessExport']" type="primary" @click="exportBusinessTableList()" :loading="allLoading.exoprtLoading">导出</el-button>
+          <el-button v-permission="['businessImport']" type="primary"
+            @click="showVisible('importVisible')">导入</el-button>
+          <el-button v-permission="['businessExport']" type="primary" @click="exportBusinessTableList()"
+            :loading="allLoading.exoprtLoading">导出</el-button>
         </div>
         <div class="flex-1 w-full overflow-hidden">
           <el-table ref="businessTableRef" :data="businessTable" border v-loading="allLoading.businessTableLading"
@@ -70,16 +73,19 @@
             </el-table-column>
             <el-table-column label="操作" fixed="right" width="200">
               <template #default="scope">
-                <el-button link type="primary" size="large" @click="editNewBusiness(scope.row)" v-permission="['businessAddAnEdit']">编辑</el-button>
-                <el-button link type="primary" size="large" @click="newTask(scope.row)" v-permission="['tasksAdd']">新建任务</el-button>
-                <el-button link type="danger" size="large"
-                  @click="businessDeteleItem(scope.row.id, scope.row.name)" v-permission="['businessAddAnEdit']">删除</el-button>
+                <el-button link type="primary" size="large" @click="editNewBusiness(scope.row)"
+                  v-permission="['businessAddAnEdit']">编辑</el-button>
+                <el-button link type="primary" size="large" @click="newTask(scope.row)"
+                  v-permission="['tasksAdd']">新建任务</el-button>
+                <el-button link type="danger" size="large" @click="businessDeteleItem(scope.row.id, scope.row.name)"
+                  v-permission="['businessAddAnEdit']">删除</el-button>
               </template>
             </el-table-column>
           </el-table>
         </div>
         <div class="flex justify-end pt-3">
-          <el-pagination layout="total, prev, pager, next, sizes" :total="businessTotalTable"
+          <el-pagination layout="total, prev, pager, next, sizes" :page-size="businessOpportunityForm.pageFrom"
+            @size-change="handleSizeChange" @current-change="handleCurrentChange" :total="businessTotalTable"
             :hide-on-single-page="true" />
         </div>
       </div>
@@ -173,7 +179,7 @@ import { useRouter, useRoute } from "vue-router";
 import { GETSYSFILED, MOD, GETPERSONNEL, GETGENERATEFOEM, GETBUSINESSLIST, UPDATEINSET, BUSINESSDETELE, BATCHTRANSFER, MODURL, tableColumn, BUSIESS_GETSATE, URL_IMPOERBUSINESS, BUSIESS_INFO, URL_EXPORTBUSINESS } 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'
+import { getAllListByCode, getFromValue, resetFromValue, getFirstDayOfMonth, createTaskFromType, formatDate, confirmAction, downloadTemplate, downloadFile, judgmentaAmounteEqual } from '@/utils/tools'
 import { createTask } from '@/components/TaskModal/taskFunction'
 import { formatDateTime } from '@/utils/times'
 import { GenerateForm } from '@zmjs/form-design';
@@ -246,7 +252,12 @@ const productTableListValue = ref([])
 
 function editBusiness(visibles: boolean) {
   businessTemplateRef.value?.getData().then((res: any) => {
-    let productTableListData = relatedProductsRef?.value?.returnData() || []
+    let productTableListData = relatedProductsRef?.value?.returnData()
+    console.log(!productTableListData, judgmentaAmounteEqual({...businessTemplateValue.value, ...res}, productTableListData))
+    if(!productTableListData || judgmentaAmounteEqual({...businessTemplateValue.value, ...res}, productTableListData)) {
+      return
+    }
+
     productTableListData.forEach((item: any) => {
       delete item.id
     })
@@ -393,6 +404,17 @@ function editProduct(row: any) {
   })
 }
 
+function handleSizeChange(val: number) {
+  businessOpportunityForm.pageIndex = 1
+  businessOpportunityForm.pageFrom = val
+  getBusinessTableList()
+}
+
+function handleCurrentChange(val: number) {
+  businessOpportunityForm.pageIndex = val
+  getBusinessTableList()
+}
+
 function showVisible(type: keyof typeof allVisible) { // 显示弹窗
   allVisible[type] = true
 }

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

@@ -8,8 +8,8 @@ interface businessOpportunityFormType {
   inchargerId: string | number;
   startTime: string | number;
   endTime: string | number;
-  pageIndex: string | number;
-  pageFrom: string | number;
+  pageIndex: number;
+  pageFrom: number;
 }
 
 interface fixedDataInterface {

+ 4 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contacts/component/relatedBusiness.vue

@@ -57,6 +57,7 @@ import RelatedProducts from '@/components/relatedProducts/relatedProducts.vue'
 import { formatDateTime } from '@/utils/times';
 import { GETGENERATEFOEM, UPDATEINSET } from '@/pages/business/api';
 import { GETTABLELIST } from '@/pages/product/api';
+import { judgmentaAmounteEqual } from '@/utils/tools';
 
 const router = useRouter()
 const globalPopup = inject<GlobalPopup>('globalPopup')
@@ -95,6 +96,9 @@ function toBusDetal(row: any) {
 function editBusiness() {
     businessTemplateRef.value?.getData().then((res: any) => {
         let productTableListData = relatedProductsRef?.value?.returnData()
+        if(!productTableListData || judgmentaAmounteEqual({ ...businessTemplateValue.value, ...res }, productTableListData)) {
+            return
+        }
         let newForm = {
             ...res,
             expectedTransactionDate: res.expectedTransactionDate ? formatDateTime(new Date(res.expectedTransactionDate)) : '',

+ 5 - 2
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/component/relatedBusiness.vue

@@ -54,7 +54,7 @@ import { GenerateForm } from '@zmjs/form-design';
 import RelatedProducts from '@/components/relatedProducts/relatedProducts.vue'
 import { GETTABLELIST } from '@/pages/product/api';
 import { GETGENERATEFOEM, UPDATEINSET } from '@/pages/business/api';
-import { setTemplateDataDisable } from '@/utils/tools';
+import { judgmentaAmounteEqual, setTemplateDataDisable } from '@/utils/tools';
 import { formatDateTime } from '@/utils/times';
 
 const emits = defineEmits(['refreshData']);
@@ -86,7 +86,10 @@ const allLoading = reactive({
 
 function editBusiness(visibles: boolean) {
     businessTemplateRef.value?.getData().then((res: any) => {
-        let productTableListData = relatedProductsRef?.value?.returnData() || []
+        let productTableListData = relatedProductsRef?.value?.returnData()
+        if(!productTableListData || judgmentaAmounteEqual({ ...businessTemplateValue.value, ...res }, productTableListData)) {
+            return
+        }
         productTableListData.forEach((item: any) => {
             delete item.id
         })

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

@@ -138,7 +138,7 @@
 <script lang="ts" setup>
 import { ref, reactive, onMounted, onUnmounted, defineExpose, inject, watchEffect } from 'vue'
 import { GenerateForm } from '@zmjs/form-design';
-import { formatDate, confirmAction, backPath } from '@/utils/tools'
+import { formatDate, confirmAction, backPath, judgmentaAmounteEqual } from '@/utils/tools'
 import { GETTEMPLATE, UNDATEFORM, GETPERSONNEL, UNDATECLAIM, GETTEMPLATETWO } from '../../constant'
 import { get, post } from '@/utils/request'
 import { useStore } from '@/store/index'
@@ -202,6 +202,9 @@ const transferOptions = ref<personnelInterface[]>([]) // 转移人员列表
 function transferBusiness() {
     generateFormDataRef.value?.getData().then((res: any) => {
         let productTableListData = relatedProductsRef?.value?.returnData()
+        if(!productTableListData || judgmentaAmounteEqual({ ...res }, productTableListData)) {
+            return
+        }
         let newForm = {
             ...res,
             expectedTransactionDate: res.expectedTransactionDate ? formatDateTime(new Date(res.expectedTransactionDate)) : '',

+ 0 - 2
fhKeeper/formulahousekeeper/customerBuler-crm/src/utils/customInstructions.ts

@@ -17,8 +17,6 @@ const PermissionDirective: Directive = { // 数组, 权限 code 和 布尔值
             return;
         }
 
-        console.log(binding.value)
-
         if (permissions.some((element): element is boolean => element === true)) {
             return;
         }

+ 28 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/utils/tools.ts

@@ -1,4 +1,5 @@
 import { defalutModalForm } from "@/components/TaskModal/api";
+import { ElNotification } from "element-plus";
 import { ElMessageBox } from "element-plus";
 import { IMPORTTIMELIST } from '../pages/api'
 import { get, post } from "./request";
@@ -263,3 +264,30 @@ export function setTemplateDataDisable(list: Array<any>, fieldList: Array<any>)
   })
   return result;
 } 
+
+/**
+ * 新建商机指定方法,用来判断商机金额需与产品总金额是否相等
+ * @param mob 商机表单
+ * @param arr 相关产品
+ * @returns Boolean
+ */
+export function judgmentaAmounteEqual(mob: any, arr: any) {
+  if(!arr || arr.length <= 0) {
+    return false;
+  }
+  let flag = false;
+  const amounte = mob.amountOfMoney || 0;
+  const totalAmounte = arr.reduce((pre: number, cur: any) => pre + (cur.totalPrice || 0), 0);
+
+  if (amounte != totalAmounte) {
+    ElNotification.closeAll();
+    ElNotification({
+      title: '提示',
+      message: `商机金额${amounte > totalAmounte ? '大于' : '小于'}产品总金额,请修改`,
+      type: 'warning',
+    });
+    flag = true;
+  }
+
+  return flag;
+}

+ 6 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java

@@ -1466,6 +1466,9 @@ public class ReportController {
                             if (parentDept != null) {
                                 report.setAuditDeptid(parentDept.getDepartmentId());
                                 report.setAuditDeptManagerid(parentDept.getManagerId());
+                            } else {
+                                //没有上级部门,直接算部门审核通过
+                                report.setDepartmentAuditState(1);
                             }
                         } else {
                             report.setAuditDeptid(department.getDepartmentId());
@@ -1487,6 +1490,9 @@ public class ReportController {
                             if (parentDept != null) {
                                 report.setAuditDeptid(parentDept.getDepartmentId());
                                 report.setAuditDeptManagerid(parentDept.getManagerId());
+                            } else {
+                                //没有上级部门,直接算部门审核通过
+                                report.setDepartmentAuditState(1);
                             }
                         } else {
                             report.setAuditDeptid(department.getDepartmentId());

+ 2 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java

@@ -188,7 +188,8 @@ public class TaskController {
             //针对依斯呗的校验
             if(user.getCompanyId()==3092){
                 Project project = projectService.getById(task.getProjectId());
-                if(task.getGroupId()!=null&&(project.getCategory()!=null&&project.getCategory()==696)){
+                //除了报价项目  售后报价项目和研发项目不管控  其它项目都管控
+                if(task.getGroupId()!=null&&(project.getCategory()!=null && !(project.getCategory()==644 || project.getCategory()==647 || project.getCategory()==697))){
                     TaskGroup taskGroup = taskGroupService.getById(task.getGroupId());
                     if(taskGroup.getManDay()==null){
                         msg.setError("创建失败,请先分配任务分组的预估工时");

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/task/TimingTask.java

@@ -971,7 +971,7 @@ public class TimingTask {
                         String deptAuditorId = null;
                         if (report.getDepartmentAuditState() == 0) {
                             deptAuditorId = report.getAuditDeptManagerid();
-                            if (!deptAuditorId.equals(pAuditorId)) {
+                            if (deptAuditorId != null &&!deptAuditorId.equals(pAuditorId)) {
                                 //不是同一个人,需要单独统计
                                 if (auditorMap.get(deptAuditorId) == null) {
                                     auditorMap.put(deptAuditorId, 1L);

+ 2 - 2
fhKeeper/formulahousekeeper/plugIn/form-design-master/.vscode/settings.json

@@ -2,8 +2,8 @@
   "prettier.enable": false,
   "typescript.tsdk": "node_modules/typescript/lib",
   "editor.codeActionsOnSave": {
-    "source.fixAll.eslint": true,
-    "source.fixAll.stylelint": true
+    "source.fixAll.eslint": "explicit",
+    "source.fixAll.stylelint": "explicit"
   },
   "files.associations": {
     "*.css": "postcss"

+ 26 - 0
fhKeeper/formulahousekeeper/plugIn/form-design-master/src/components.d.ts

@@ -6,6 +6,32 @@ declare module 'vue' {
   export interface GlobalComponents {
     CodeEditor: typeof import('./components/CodeEditor.vue')['default']
     ComponentGroup: typeof import('./components/ComponentGroup.vue')['default']
+    ElButton: typeof import('element-plus/es')['ElButton']
+    ElCascader: typeof import('element-plus/es')['ElCascader']
+    ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
+    ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
+    ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
+    ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
+    ElDialog: typeof import('element-plus/es')['ElDialog']
+    ElDivider: typeof import('element-plus/es')['ElDivider']
+    ElForm: typeof import('element-plus/es')['ElForm']
+    ElFormItem: typeof import('element-plus/es')['ElFormItem']
+    ElImage: typeof import('element-plus/es')['ElImage']
+    ElInput: typeof import('element-plus/es')['ElInput']
+    ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
+    ElOption: typeof import('element-plus/es')['ElOption']
+    ElRadio: typeof import('element-plus/es')['ElRadio']
+    ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
+    ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
+    ElRate: typeof import('element-plus/es')['ElRate']
+    ElSelect: typeof import('element-plus/es')['ElSelect']
+    ElSlider: typeof import('element-plus/es')['ElSlider']
+    ElSpace: typeof import('element-plus/es')['ElSpace']
+    ElSwitch: typeof import('element-plus/es')['ElSwitch']
+    ElTable: typeof import('element-plus/es')['ElTable']
+    ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
+    ElTimePicker: typeof import('element-plus/es')['ElTimePicker']
+    ElUpload: typeof import('element-plus/es')['ElUpload']
   }
 }
 

+ 11 - 0
fhKeeper/formulahousekeeper/plugIn/form-design-master/src/generate/GenerateForm.vue

@@ -17,6 +17,8 @@
         :config="data.config"
         :disabled="disabled"
         :request="request"
+        :widgetFormData="widgetForm.list"
+        @updateWidgetForm="updateWidgetForm"
       />
     </template>
   </el-form>
@@ -122,6 +124,14 @@ export default defineComponent({
       })
     }
 
+    const updateWidgetForm = (list: any[]) => {
+      // console.log(list, '<=====')
+      const listIndex = state.widgetForm.list.findIndex((item: any) => item.type === 'grid')
+      state.widgetForm.list[listIndex].columns = list
+      // console.log(state.widgetForm.list);
+      state.model = {...state.model, contactsId: ''}
+    }
+
     watch(
       () => props.data,
       (val) => {
@@ -159,6 +169,7 @@ export default defineComponent({
       ...toRefs(state),
       getData,
       reset,
+      updateWidgetForm
     }
   },
 })

+ 46 - 0
fhKeeper/formulahousekeeper/plugIn/form-design-master/src/generate/GenerateFormItem.vue

@@ -18,6 +18,8 @@
         :element="colItem"
         :config="config"
         :disabled="disabled"
+        :widgetFormData="element.columns"
+        @updateWidgetForm="updateWidgetForm"
       />
     </div>
   </div>
@@ -236,6 +238,7 @@
         :filterable="element.options.filterable"
         :disabled="disabled || element.options.disabled"
         :style="{ width: element.options.width }"
+        @change="(value: any) => specializedHandleSelect(value, element)"
       >
         <el-option
           v-for="item of element.options.remote
@@ -346,6 +349,7 @@ const props = defineProps<{
   updatedModel: any
   disabled: boolean
   request?: Function
+  widgetFormData?: any
 }>()
 const originData = props.model[props.element.model]
 const data = computed({
@@ -382,6 +386,48 @@ async function download(defaultValue: string, label: string) {
   a.download = `${label}.${defaultValue.split('.')[1]}`
   a.click()
 }
+
+const emits = defineEmits(['updateWidgetForm'])
+const specializedHandleSelect = (val: any, element: any) => {
+  const field = element.model
+  if(field == 'customerId') {
+    // console.log(props, '<===== props')
+    let list = JSON.parse(JSON.stringify(props.widgetFormData))
+    for(var i in list) {
+      if(list[i].list[0].model == 'contactsId') {
+        let item = list[i].list[0]
+        const token: any = sessionStorage.getItem('token')
+        // fetch(item.options.remoteFunc, {
+        fetch(`${item.options.remoteFunc}?customerId=${val}`, {
+          headers: {
+            "Content-type": " application/x-www-form-urlencoded; charset=UTF-8",
+            "Token": token
+          }
+        })
+          .then(resp => resp.json())
+          .then((json) => {
+            const res = json.data
+            if (res instanceof Array) {
+              item.options.remoteOptions = res.map(data => ({
+                label: data[item.options.props.label],
+                value: data[item.options.props.value],
+                children: data[item.options.props.children],
+              }))
+            }
+            list[i].list[0].options = {...list[i].list[0].options, disabled: false, defaultValue: ''}
+          })
+      }
+    }
+    setTimeout(() => {
+      console.log('开始执行')
+      updateWidgetForm(list)
+    }, 100)
+  }
+}
+
+const updateWidgetForm = (list: any) => {
+  emits('updateWidgetForm', list)
+}
 </script>
 <style scoped>
 :deep(.el-upload--picture-card) {

+ 1 - 0
fhKeeper/formulahousekeeper/plugIn/form-design-master/update/dist/generate/GenerateForm.vue.d.ts

@@ -16,6 +16,7 @@ declare const _default: import("vue").DefineComponent<{
 }, {
     getData: () => Promise<unknown>;
     reset: () => void;
+    updateWidgetForm: (list: any[]) => void;
     generateForm: import("vue").Ref<any>;
     model: import("vue").Ref<any>;
     updatedModel: import("vue").Ref<any>;

+ 6 - 2
fhKeeper/formulahousekeeper/plugIn/form-design-master/update/dist/generate/GenerateFormItem.vue.d.ts

@@ -6,14 +6,18 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
     updatedModel: any;
     disabled: boolean;
     request?: Function | undefined;
-}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
+    widgetFormData?: any;
+}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "updateWidgetForm"[], "updateWidgetForm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
     config: WidgetForm['config'];
     element: any;
     model: any;
     updatedModel: any;
     disabled: boolean;
     request?: Function | undefined;
-}>>>, {}>;
+    widgetFormData?: any;
+}>>> & {
+    onUpdateWidgetForm?: ((...args: any[]) => any) | undefined;
+}, {}>;
 export default _default;
 declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
 declare type __VLS_TypePropsToRuntimeProps<T> = {

Різницю між файлами не показано, бо вона завелика
+ 1 - 1
fhKeeper/formulahousekeeper/plugIn/form-design-master/update/dist/index.css


+ 69 - 16
fhKeeper/formulahousekeeper/plugIn/form-design-master/update/dist/index.es.js

@@ -27558,7 +27558,7 @@ var _export_sfc = (sfc, props) => {
   }
   return target;
 };
-const _withScopeId = (n) => (pushScopeId("data-v-1a926725"), n = n(), popScopeId(), n);
+const _withScopeId = (n) => (pushScopeId("data-v-fd931432"), n = n(), popScopeId(), n);
 const _hoisted_1$6 = { key: 12 };
 const _hoisted_2$5 = {
   key: 1,
@@ -27575,9 +27575,11 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
     model: null,
     updatedModel: null,
     disabled: { type: Boolean },
-    request: null
+    request: null,
+    widgetFormData: null
   },
-  setup(__props) {
+  emits: ["updateWidgetForm"],
+  setup(__props, { emit: emits }) {
     const props = __props;
     const originData = props.model[props.element.model];
     const data2 = computed({
@@ -27609,6 +27611,41 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
       a2.download = `${label}.${defaultValue.split(".")[1]}`;
       a2.click();
     }
+    const specializedHandleSelect = (val, element) => {
+      const field = element.model;
+      if (field == "customerId") {
+        let list = JSON.parse(JSON.stringify(props.widgetFormData));
+        for (var i in list) {
+          if (list[i].list[0].model == "contactsId") {
+            let item = list[i].list[0];
+            const token = sessionStorage.getItem("token");
+            fetch(`${item.options.remoteFunc}?customerId=${val}`, {
+              headers: {
+                "Content-type": " application/x-www-form-urlencoded; charset=UTF-8",
+                "Token": token
+              }
+            }).then((resp) => resp.json()).then((json) => {
+              const res = json.data;
+              if (res instanceof Array) {
+                item.options.remoteOptions = res.map((data22) => ({
+                  label: data22[item.options.props.label],
+                  value: data22[item.options.props.value],
+                  children: data22[item.options.props.children]
+                }));
+              }
+              list[i].list[0].options = __spreadProps(__spreadValues({}, list[i].list[0].options), { disabled: false, defaultValue: "" });
+            });
+          }
+        }
+        setTimeout(() => {
+          console.log("\u5F00\u59CB\u6267\u884C");
+          updateWidgetForm(list);
+        }, 100);
+      }
+    };
+    const updateWidgetForm = (list) => {
+      emits("updateWidgetForm", list);
+    };
     return (_ctx, _cache) => {
       const _component_GenerateFormItem = resolveComponent("GenerateFormItem", true);
       const _component_el_table_column = ElTableColumn;
@@ -27651,8 +27688,10 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
                 "updated-model": __props.updatedModel,
                 element: colItem,
                 config: __props.config,
-                disabled: __props.disabled
-              }, null, 8, ["request", "model", "updated-model", "element", "config", "disabled"]);
+                disabled: __props.disabled,
+                widgetFormData: __props.element.columns,
+                onUpdateWidgetForm: updateWidgetForm
+              }, null, 8, ["request", "model", "updated-model", "element", "config", "disabled", "widgetFormData"]);
             }), 128))
           ], 4);
         }), 128))
@@ -27692,6 +27731,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
             key: 0,
             modelValue: unref(data2),
             "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(data2) ? data2.value = $event : null),
+            modelModifiers: { trim: true },
             style: normalizeStyle({ width: __props.element.options.width }),
             placeholder: __props.element.options.placeholder,
             maxlength: parseInt(__props.element.options.maxlength),
@@ -27728,6 +27768,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
             key: 1,
             modelValue: unref(data2),
             "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(data2) ? data2.value = $event : null),
+            modelModifiers: { trim: true },
             style: normalizeStyle({ width: __props.element.options.width }),
             placeholder: __props.element.options.placeholder,
             maxlength: parseInt(__props.element.options.maxlength),
@@ -27765,6 +27806,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
             key: 2,
             modelValue: unref(data2),
             "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(data2) ? data2.value = $event : null),
+            modelModifiers: { trim: true },
             type: "textarea",
             resize: "none",
             rows: __props.element.options.rows,
@@ -27784,7 +27826,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
             style: normalizeStyle({ width: __props.element.options.width }),
             max: __props.element.options.max,
             min: __props.element.options.min,
-            disabled: __props.disabled || __props.element.options.disabled
+            disabled: __props.disabled || __props.element.options.disabled,
+            "controls-position": "right"
           }, null, 8, ["modelValue", "style", "max", "min", "disabled"])) : createCommentVNode("", true),
           __props.element.type === "radio" ? (openBlock(), createBlock(_component_el_radio_group, {
             key: 4,
@@ -27891,7 +27934,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
             clearable: __props.element.options.clearable,
             filterable: __props.element.options.filterable,
             disabled: __props.disabled || __props.element.options.disabled,
-            style: normalizeStyle({ width: __props.element.options.width })
+            style: normalizeStyle({ width: __props.element.options.width }),
+            onChange: _cache[10] || (_cache[10] = (value) => specializedHandleSelect(value, __props.element))
           }, {
             default: withCtx(() => [
               (openBlock(true), createElementBlock(Fragment, null, renderList(__props.element.options.remote ? __props.element.options.remoteOptions : __props.element.options.options, (item) => {
@@ -27907,7 +27951,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
           __props.element.type === "switch" ? (openBlock(), createBlock(_component_el_switch, {
             key: 10,
             modelValue: unref(data2),
-            "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => isRef(data2) ? data2.value = $event : null),
+            "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => isRef(data2) ? data2.value = $event : null),
             "active-text": __props.element.options.activeText,
             "inactive-text": __props.element.options.inactiveText,
             disabled: __props.disabled || __props.element.options.disabled
@@ -27915,7 +27959,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
           __props.element.type === "slider" ? (openBlock(), createBlock(_component_el_slider, {
             key: 11,
             modelValue: unref(data2),
-            "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => isRef(data2) ? data2.value = $event : null),
+            "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => isRef(data2) ? data2.value = $event : null),
             min: __props.element.options.min,
             max: __props.element.options.max,
             step: __props.element.options.step,
@@ -27962,7 +28006,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
             key: 14,
             style: { "margin-top": "-4px" },
             type: "text",
-            onClick: _cache[12] || (_cache[12] = ($event) => download(__props.element.options.defaultValue, __props.element.label))
+            onClick: _cache[13] || (_cache[13] = ($event) => download(__props.element.options.defaultValue, __props.element.label))
           }, {
             default: withCtx(() => [
               _hoisted_6$4
@@ -27972,7 +28016,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
           __props.element.type === "cascader" ? (openBlock(), createBlock(_component_el_cascader, {
             key: 15,
             modelValue: unref(data2),
-            "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => isRef(data2) ? data2.value = $event : null),
+            "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => isRef(data2) ? data2.value = $event : null),
             options: __props.element.options.remoteOptions,
             placeholder: __props.element.options.placeholder,
             filterable: __props.element.options.filterable,
@@ -27997,7 +28041,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
     };
   }
 });
-var GenerateFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-1a926725"]]);
+var GenerateFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-fd931432"]]);
 const _sfc_main$7 = defineComponent({
   name: "FormGenerate",
   components: {
@@ -28081,6 +28125,11 @@ const _sfc_main$7 = defineComponent({
         }
       });
     };
+    const updateWidgetForm = (list) => {
+      const listIndex2 = state.widgetForm.list.findIndex((item) => item.type === "grid");
+      state.widgetForm.list[listIndex2].columns = list;
+      state.model = __spreadProps(__spreadValues({}, state.model), { contactsId: "" });
+    };
     watch(() => props.data, (val) => {
       var _a3;
       state.widgetForm = (_a3 = val && JSON.parse(JSON.stringify(val))) != null ? _a3 : getWidgetForm();
@@ -28106,7 +28155,8 @@ const _sfc_main$7 = defineComponent({
     };
     return __spreadProps(__spreadValues({}, toRefs(state)), {
       getData,
-      reset
+      reset,
+      updateWidgetForm
     });
   }
 });
@@ -28132,8 +28182,10 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
           element: _ctx.widgetForm.list[index],
           config: _ctx.data.config,
           disabled: _ctx.disabled,
-          request: _ctx.request
-        }, null, 8, ["model", "updated-model", "element", "config", "disabled", "request"]);
+          request: _ctx.request,
+          widgetFormData: _ctx.widgetForm.list,
+          onUpdateWidgetForm: _ctx.updateWidgetForm
+        }, null, 8, ["model", "updated-model", "element", "config", "disabled", "request", "widgetFormData", "onUpdateWidgetForm"]);
       }), 128))
     ]),
     _: 1
@@ -28496,7 +28548,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
               style: normalizeStyle({ width: __props.element.options.width }),
               max: __props.element.options.max,
               min: __props.element.options.min,
-              disabled: __props.element.options.disabled
+              disabled: __props.element.options.disabled,
+              "controls-position": "right"
             }, null, 8, ["model-value", "style", "max", "min", "disabled"])) : createCommentVNode("", true),
             __props.element.type === "radio" ? (openBlock(), createBlock(_component_el_radio_group, {
               key: 4,

Різницю між файлами не показано, бо вона завелика
+ 1 - 1
fhKeeper/formulahousekeeper/plugIn/form-design-master/update/dist/index.es.js.map


+ 235 - 0
fhKeeper/formulahousekeeper/timesheet/src/components/cascadeSelection.vue

@@ -0,0 +1,235 @@
+<template>
+    <div class='cascadeSelection'>
+        <!-- 框框 -->
+        <div ref="focusDiv" tabindex="0" :class="`input ${size} ${disabled ? 'inputDisabled' : ''}`"
+            :style="`width: ${width}`" @focus="handleFocus" @blur="handleBlur">
+            <!-- 默认提示文字 -->
+            <span class="placeholderColor" v-if="resultText.length == 0">请选择</span>
+            <!-- 选中数据 -->
+            <div v-if="resultText.length > 0" class="textEllipsisNowrap">
+                <template v-for="(item, index) in resultText[0]">
+                    <TranslationOpenDataText type='departmentName' :openid='item'></TranslationOpenDataText>
+                    <span v-if="index < resultText[0].length - 1" class="textSpan">/</span>
+                </template>
+            </div>
+
+            <i v-if="resultText.length > 0" class="el-icon-circle-close iostu" @click.stop="clearDelete"></i>
+
+            <!-- 级联面板 -->
+            <div class="absoluteWeight" v-if="isFocused" :style="`top: ${sizeTop[size]}`">
+                <el-cascader-panel v-model="modelValue" ref="cascaderPanelRef" :options="options" :props="props"
+                    @change="panelChange">
+                    <template slot-scope="{ node, data }">
+                        <TranslationOpenDataText type='departmentName' :openid='data.label'></TranslationOpenDataText>
+                    </template>
+                </el-cascader-panel>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    name: '',
+    components: {},
+    props: {
+        modelValue: {
+            type: Array,
+            default: () => []
+        },
+        size: {
+            type: String,
+            default: 'default',
+        },
+        width: {
+            type: String,
+            default: '100%',
+        },
+        options: {
+            type: Array,
+            default: () => [],
+        },
+        props: {
+            type: Object,
+            default: () => {
+                return { checkStrictly: true, expandTrigger: 'hover' }
+            }
+        },
+        disabled: {
+            type: Boolean,
+            default: false
+        }
+    },
+    data() {
+        return {
+            isFocused: false,
+            resultText: [],
+            sizeTop: {
+                default: '40px',
+                medium: '36px',
+                small: '32px',
+                mini: '24px'
+            }
+        }
+    },
+    computed: {},
+    watch: {},
+    created() { },
+    mounted() {
+        setTimeout(() => {
+            if ((this.modelValue || []).length > 0) {
+                this.resultText = this.findDepartmentNames(this.options, this.props.multiple ? this.modelValue : [this.modelValue]);
+            }
+        }, 500)
+    },
+    model: {
+        prop: 'modelValue',
+        event: 'getValue'
+    },
+    methods: {
+        panelChange(val) {
+            this.resultText = this.findDepartmentNames(this.options, this.props.multiple ? val : [val]);
+            this.updateModelValue()
+        },
+        findDepartmentNames(data, values) {
+            const findLabels = (valueList) => {
+                return valueList.map(value => {
+                    const findLabel = (data, value) => {
+                        for (let item of data) {
+                            if (item.value === value) {
+                                return item.label;
+                            }
+                            if (item.children) {
+                                const label = findLabel(item.children, value);
+                                if (label) return label;
+                            }
+                        }
+                        return null;
+                    };
+                    return findLabel(data, value);
+                }).filter(label => label !== null);
+            };
+            return values.map(valueList => findLabels(valueList));
+        },
+        handleFocus() {
+            if(this.disabled) {
+                return
+            }
+            this.isFocused = true
+            this.$refs.focusDiv.classList.add('focused');
+        },
+        handleBlur(event) {
+            if(this.disabled) {
+                return
+            }
+            if (this.$refs.focusDiv.contains(event.relatedTarget)) {
+                this.$refs.focusDiv.focus();
+                event.preventDefault();
+                return;
+            }
+            this.isFocused = false
+            this.$refs.focusDiv.classList.remove('focused');
+        },
+        clearDelete() {
+            this.$refs.focusDiv.blur()
+            this.resultText = [];
+            this.$emit('getValue', []);
+            this.$emit('change', []);
+        },
+        updateModelValue() {
+            this.$emit('getValue', this.modelValue);
+            this.$emit('change', this.modelValue);
+        }
+    },
+}
+</script>
+<style scoped lang='scss'>
+.cascadeSelection {
+    position: relative;
+    max-height: 40px;
+
+    .default {
+        height: 40px;
+        line-height: 40px;
+    }
+
+    .medium {
+        height: 36px;
+        line-height: 36px;
+    }
+
+    .small {
+        height: 32px;
+        line-height: 32px;
+    }
+
+    .mini {
+        height: 28px;
+        line-height: 28px;
+    }
+
+    .input {
+        position: relative;
+        font-size: 14px;
+        background-color: #FFF;
+        background-image: none;
+        border-radius: 4px;
+        border: 1px solid #DCDFE6;
+        box-sizing: border-box;
+        color: #606266;
+        display: inline-block;
+        outline: 0;
+        padding: 0 15px;
+        -webkit-transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
+        transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
+        width: 100%;
+    }
+
+    .input:focus {
+        border-color: #409EFF;
+    }
+
+    .placeholderColor {
+        color: #C0C4CC;
+    }
+
+    .absoluteWeight {
+        position: absolute;
+        z-index: 99;
+        background: #fff;
+        left: 0;
+    }
+
+    .textSpan {
+        display: inline-block;
+        padding: 0 3px
+    }
+
+    .textEllipsisNowrap {
+        width: 100%;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+    }
+
+    .iostu {
+        position: absolute;
+        top: 50%;
+        margin-top: -4px;
+        right: 8px;
+        color: #C0C4CC;
+        transition: All 0.2s ease-in-out;
+    }
+
+    .iostuHover {
+        transform: rotate(-180deg);
+    }
+
+    .inputDisabled {
+        background-color: #f5f7fa !important;
+        border-color: #e4e7ed !important;
+        color: #c0c4cc !important;
+        cursor: not-allowed !important;
+    }
+}
+</style>

+ 10 - 10
fhKeeper/formulahousekeeper/timesheet/src/components/select.vue

@@ -276,7 +276,7 @@ export default {
                     }
                 }
             }
-            console.log(this.options, this.subjectId)
+            // console.log(this.options, this.subjectId)
             if(this.multiSelect) { 
                 for(var i in this.options) {
                     for(var j in this.subjectId) {
@@ -288,7 +288,7 @@ export default {
                 }
             }
         }
-        console.log(this.subject, this.subjectId)
+        // console.log(this.subject, this.subjectId)
 
         var thats = this
         var phoneArr = []
@@ -300,7 +300,7 @@ export default {
         }, 500)
         
         thats.fistArrList = phoneArr
-        console.log(thats.fistArrList)
+        // console.log(thats.fistArrList)
         this.dailyListIndex = this.idx
     },
     methods: {
@@ -315,9 +315,9 @@ export default {
                     "selectedDepartmentIds": [],// 非必填,已选部门ID列表。用于多次选人时可重入,single模式下请勿填入多个id
                     "selectedUserIds": []// 非必填,已选用户ID列表。用于多次选人时可重入,single模式下请勿填入多个id
                         },function(res){
-                            console.log(res)
+                            // console.log(res)
                             if (res.err_msg == "selectEnterpriseContact:ok"){
-                                console.log(res, '数据来源')
+                                // console.log(res, '数据来源')
                                 if(typeof res.result == 'string'){
                                     res.result = JSON.parse(res.result) //由于目前各个终端尚未完全兼容,需要开发者额外判断result类型以保证在各个终端的兼容性
                                 }
@@ -328,7 +328,7 @@ export default {
                                         var user = selectedUserList[i];
                                         userId = user.id; // 已选的单个成员ID
                                         userName = user.name;// 已选的单个成员名称
-                                        console.log(userId, userName)
+                                        // console.log(userId, userName)
                                 }
                                 for(var s in that.options) {
                                     if(that.options[s].name == userId) {
@@ -349,7 +349,7 @@ export default {
                 other: this.other,
                 name: this.selectName
             }
-            console.log(obj)
+            // console.log(obj)
             this.$emit("selectCal", obj)
         },
         selectCli() {
@@ -400,11 +400,11 @@ export default {
             this.transitionBoxLiIdx = index
         },
         liClick(item, itemIndex) {
-            console.log(item, '进来的')
+            // console.log(item, '进来的')
             let nameId = item.auditorId || item.id
             this.selectName = item.auditorName || item.name
             if(!this.multiSelect) {
-                console.log('我进来了', this.flg)
+                // console.log('我进来了', this.flg)
                 if(this.flgs) {
                     let obj = {
                         id: nameId,
@@ -540,7 +540,7 @@ export default {
                         }
                     })
                     // this.options = arr
-                    console.log('将要赋值')
+                    // console.log('将要赋值')
                     var newArr = arr.length > 0 ? arr : res.data.records
                     this.$set(this, 'options', newArr)
                     this.cursor = res.data.nextCursor

+ 15 - 13
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -471,13 +471,13 @@
                             </el-select>
                         </div>
                     </el-form-item>
-
                     <el-form-item :label="$t('subordinatedepartments')" :prop="user.companyId == 936 ? 'deptId' : false" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''" v-if="user.timeType.projectWithDept">
                         <el-cascader v-model="addForm.deptId" :options="departmentList" :placeholder="$t('defaultText.pleaseChoose')" :disabled="canOnlyModParticipator"
                             :props="{ checkStrictly: true, expandTrigger: 'hover' }" clearable filterable @change="cascaderChange" style="width: 100%"
-                            v-if="user.userNameNeedTranslate != 1">
+                            v-if="user.userNameNeedTranslate != 1"
                         ></el-cascader>
-                        <vueCascader :size="'medium'" :widthStr="'430'" :filterable="true" :clearable="true" :subject="departmentList" :subjectId="addForm.deptId" :radios="true" :distinction="'20'" :disabled="canOnlyModParticipator" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1" ></vueCascader>
+                        <!-- <vueCascader :size="'medium'" :widthStr="'430'" :filterable="true" :clearable="true" :subject="departmentList" :subjectId="addForm.deptId" :radios="true" :distinction="'20'" :disabled="canOnlyModParticipator" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1" ></vueCascader> -->
+                        <vueCascadeSelection v-model="addForm.deptId" :options="departmentList" :props="{ checkStrictly: true, expandTrigger: 'hover' }" :disabled="canOnlyModParticipator" v-if="user.userNameNeedTranslate == 1"></vueCascadeSelection>
                     </el-form-item>
 
                     <!-- 供应商 -->
@@ -509,25 +509,25 @@
                     </el-form-item> -->
                     <el-form-item :label="$t('Allparticipants')" v-show="addForm.isPublic == 0" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''">
                         <el-tooltip placement="top" effect="light" v-if="user.userNameNeedTranslate != 1">
-
                             <div slot="content" style="width:780px">{{addForm.userNames}}</div>
                             <el-input  @focus="showChooseMembTree" v-model="addForm.userNames"></el-input>
                         </el-tooltip>
 
                         <el-tooltip placement="top" effect="light" v-if="user.userNameNeedTranslate == 1">
-                            <div slot="content" style="width:780px">
+                            <div slot="content" style="max-width: 780px;max-height: 400px;overflow-y: auto;">
                                 <span v-for="(item, index) in addFormUserNames" :key="index">
-                                    <!-- {{item}} -->
                                     <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
                                     <span v-if="index < addFormUserNames.length - 1">,</span>
                                 </span>
                             </div>
                             <div @click="showChooseMembTree" style="width: 800px;overflow:hidden;white-space:nowrap;height:40px;border: 1px solid #DCDFE6;border-radius: 4px;box-sizing: border-box;padding: 0 10px">
-                                <span v-for="(item, index) in addFormUserNames" :key="index">
-                                    <!-- {{item}} -->
-                                    <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
-                                    <span v-if="index < addFormUserNames.length - 1">,</span>
-                                </span>
+                                <template v-for="(item, index) in addFormUserNames">
+                                    <template v-if="index <= 13">
+                                        <TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText>
+                                        <span v-if="index < addFormUserNames.length - 1">,</span>
+                                        <span v-if="(addFormUserNames || []).length > 13 && index == 13">...</span>
+                                    </template>
+                                </template>
                             </div>
                         </el-tooltip>
                     </el-form-item>
@@ -538,7 +538,7 @@
                                 <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
                             </el-option>
                         </el-select>
-                        <selectCat v-if="user.userNameNeedTranslate == 1" :size="'medium'" :subject="participator" :subjectId="addForm.inchargerId" :distinction="'3'" @selectCal="selectCal" :disabled="canOnlyModParticipator || projectManagerEdit || isShowProjectName"></selectCat>
+                        <selectCat v-if="user.userNameNeedTranslate == 1" :filterable="true" :size="'medium'" :subject="participator" :subjectId="addForm.inchargerId" :distinction="'3'" @selectCal="selectCal" :disabled="canOnlyModParticipator || projectManagerEdit || isShowProjectName"></selectCat>
                     </el-form-item>
 
                     <span v-if="user.companyId != 469">
@@ -1759,11 +1759,13 @@ a {
     // 自定义select组件
     import selectCat from "@/components/select.vue"
     import vueCascader from "@/components/cascader.vue"
+    import vueCascadeSelection from "@/components/cascadeSelection.vue"
     export default {
         components:{
             projectgantt,
             selectCat,
             vueCascader,
+            vueCascadeSelection
         },
         data() {
             return {
@@ -4672,7 +4674,7 @@ a {
                         var findUser = list[0];    
                         this.participator.push(findUser);
                     } else {
-                        console.log('未找到用户: '+u);
+                        // console.log('未找到用户: '+u);
                     }
                     
                 })