فهرست منبع

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

QuYueTing 11 ماه پیش
والد
کامیت
225968d568

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

@@ -252,7 +252,7 @@ function search() {
       executorNames: item.taskExecutors?.join(',') ?? ''
       executorNames: item.taskExecutors?.join(',') ?? ''
     }));
     }));
   }).catch(err => {
   }).catch(err => {
-    globalPopup?.showError(err);
+    globalPopup?.showError(err.msg);
     loading.value = false;
     loading.value = false;
   })
   })
 }
 }
@@ -290,7 +290,7 @@ function deleteTasks() {
       search();
       search();
       globalPopup?.showSuccess("删除成功")
       globalPopup?.showSuccess("删除成功")
     }).catch(err => {
     }).catch(err => {
-      globalPopup?.showError(err)
+      globalPopup?.showError(err.msg)
     })
     })
   });
   });
 }
 }
@@ -313,7 +313,7 @@ function importExcel(data: any) {
     importLoading.value = "3";
     importLoading.value = "3";
     search();
     search();
   }).catch(err => {
   }).catch(err => {
-    globalPopup?.showError(err)
+    globalPopup?.showError(err.msg)
     importLoading.value = "4";
     importLoading.value = "4";
   })
   })
 }
 }
@@ -337,7 +337,7 @@ function exportTasks() {
     btnLoading.value = false;
     btnLoading.value = false;
   }).catch(err => {
   }).catch(err => {
     btnLoading.value = false;
     btnLoading.value = false;
-    globalPopup?.showError(err)
+    globalPopup?.showError(err.msg)
   })
   })
 }
 }
 function closeExportModal() {
 function closeExportModal() {
@@ -350,7 +350,7 @@ function exportExcel(data: any) {
     exportLoading.value = "3";
     exportLoading.value = "3";
     exportVisible.value = false;
     exportVisible.value = false;
   }).catch(err => {
   }).catch(err => {
-    globalPopup?.showError(err)
+    globalPopup?.showError(err.msg)
   })
   })
   setTimeout(() => {
   setTimeout(() => {
 
 
@@ -375,7 +375,7 @@ function finishRow(item: any) {
     search()
     search()
     globalPopup?.showSuccess("操作成功")
     globalPopup?.showSuccess("操作成功")
   }).catch(err => {
   }).catch(err => {
-    globalPopup?.showError(err)
+    globalPopup?.showError(err.msg)
   })
   })
 }
 }
 function restart(item: any) {
 function restart(item: any) {
@@ -386,7 +386,7 @@ function restart(item: any) {
     search()
     search()
     globalPopup?.showSuccess("操作成功")
     globalPopup?.showSuccess("操作成功")
   }).catch(err => {
   }).catch(err => {
-    globalPopup?.showError(err)
+    globalPopup?.showError(err.msg)
   })
   })
 }
 }
 function deleteRow(item: any) {
 function deleteRow(item: any) {
@@ -398,7 +398,7 @@ function deleteRow(item: any) {
       globalPopup?.showSuccess("删除成功")
       globalPopup?.showSuccess("删除成功")
     }).catch(err => {
     }).catch(err => {
       console.log("err", err);
       console.log("err", err);
-      globalPopup?.showError(err)
+      globalPopup?.showError(err.msg)
     })
     })
   })
   })
 }
 }

+ 1 - 1
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/ContactsServiceImpl.java

@@ -168,7 +168,7 @@ public class ContactsServiceImpl extends ServiceImpl<ContactsMapper, Contacts> i
 
 
         }
         }
 
 
-        Page<ContactsVo> pageContacts = contactsMapper.pageContacts(new Page((long) (pageIndex - 1) *pageSize, pageSize), map);
+        Page<ContactsVo> pageContacts = contactsMapper.pageContacts(new Page( pageIndex, pageSize), map);
 
 
         List<ContactsVo> records = pageContacts.getRecords();
         List<ContactsVo> records = pageContacts.getRecords();
         long total = pageContacts.getTotal();
         long total = pageContacts.getTotal();

+ 92 - 19
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/TaskServiceImpl.java

@@ -22,6 +22,7 @@ import org.apache.poi.xssf.usermodel.XSSFRow;
 import org.apache.poi.xssf.usermodel.XSSFSheet;
 import org.apache.poi.xssf.usermodel.XSSFSheet;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
@@ -53,6 +54,9 @@ import java.util.stream.Collectors;
 @Transactional
 @Transactional
 public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements TaskService {
 public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements TaskService {
 
 
+    @Autowired
+    private ContactsService contactsService;
+
     @Resource
     @Resource
     private UserMapper userMapper;
     private UserMapper userMapper;
     @Resource
     @Resource
@@ -446,13 +450,23 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                 task.setCreateDate(LocalDateTime.now());
                 task.setCreateDate(LocalDateTime.now());
 //                task.setStatus(0);
 //                task.setStatus(0);
                 task.setIsDelete(0);
                 task.setIsDelete(0);
+
+                //统计 线索不应与客户/商机/销售订单/联系人一同存在
+                boolean b1=false; //客户/商机/销售订单/联系人
+                boolean b2=false;//线索
+
+                //客户/商机/销售订单不应一同存在
+                boolean b3=false;//客户
+                boolean b4=false;//商机
+                boolean b5=false;//销售订单
+
                 for (int i = 0; i < cellNum; i++) {
                 for (int i = 0; i < cellNum; i++) {
                     String modelName = modelNameList.get(i);
                     String modelName = modelNameList.get(i);
                     String className = modelName.substring(0, 1).toUpperCase() + modelName.substring(1);
                     String className = modelName.substring(0, 1).toUpperCase() + modelName.substring(1);
                     String getter="get"+className;
                     String getter="get"+className;
                     String setter="set"+className;
                     String setter="set"+className;
                     XSSFCell cell = row.getCell(i);
                     XSSFCell cell = row.getCell(i);
-                    if(cell!=null&&StringUtils.isNotEmpty(cell.getStringCellValue())){
+                    if(cell!=null){
                         switch (typeList.get(i)){
                         switch (typeList.get(i)){
                             default:cell.setCellType(CellType.STRING);
                             default:cell.setCellType(CellType.STRING);
                         }
                         }
@@ -494,7 +508,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                                 if (first.isPresent()) {
                                 if (first.isPresent()) {
                                     executorIds.add(first.get().getId());
                                     executorIds.add(first.get().getId());
                                 } else {
                                 } else {
-                                    throw new Exception("["+userName+"]在系统中不存在");
+                                    msg.setError("["+userName+"]在系统中不存在");
+                                    return msg;
                                 }
                                 }
                             }
                             }
                             StringJoiner joiner = new StringJoiner(",");
                             StringJoiner joiner = new StringJoiner(",");
@@ -546,31 +561,37 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
 
 
                     else if(modelName.equals("contactsId")){
                     else if(modelName.equals("contactsId")){
                         if(cell!=null&&!StringUtils.isEmpty(cell.getStringCellValue())){
                         if(cell!=null&&!StringUtils.isEmpty(cell.getStringCellValue())){
+                            b1=true;
+
                             String contactsName = cell.getStringCellValue();
                             String contactsName = cell.getStringCellValue();
                             List<Contacts> collect = contactsList.stream().filter(contacts -> contacts.getName().equals(contactsName)).collect(Collectors.toList());
                             List<Contacts> collect = contactsList.stream().filter(contacts -> contacts.getName().equals(contactsName)).collect(Collectors.toList());
-                            if (collect.size()>1){
-                                throw new Exception("["+contactsName+"]对应的联系人存在多个");
-                            }else if (collect.size()==1) {
+                            if (!collect.isEmpty()) {
                                 Contacts contacts = collect.get(0);
                                 Contacts contacts = collect.get(0);
                                 task.setContactsId(contacts.getId());
                                 task.setContactsId(contacts.getId());
                             }else {
                             }else {
-                                throw new Exception("["+contactsName+"]对应的联系人不存在");
+                                msg.setError("["+contactsName+"]对应的联系人不存在");
+                                return msg;
                             }
                             }
                         }
                         }
                     }
                     }
 
 
                     else if(modelName.equals("customId")){
                     else if(modelName.equals("customId")){
                         if(cell!=null&&!StringUtils.isEmpty(cell.getStringCellValue())){
                         if(cell!=null&&!StringUtils.isEmpty(cell.getStringCellValue())){
+                            b1=true;
+                            b3=true;
+
                             String customName = cell.getStringCellValue();
                             String customName = cell.getStringCellValue();
                             List<Custom> customs = customList.stream().filter(custom -> customName.equals(custom.getCustomName())).collect(Collectors.toList());
                             List<Custom> customs = customList.stream().filter(custom -> customName.equals(custom.getCustomName())).collect(Collectors.toList());
                             if (customs.size()>1){
                             if (customs.size()>1){
-                                throw new Exception("["+customName+"]对应的客户存在多个");
+                                msg.setError("["+customName+"]对应的客户存在多个");
+                                return msg;
                             }else if (customs.size()==1){
                             }else if (customs.size()==1){
                                 Custom custom = customs.get(0);
                                 Custom custom = customs.get(0);
                                 if (task.getContactsId()!=null){
                                 if (task.getContactsId()!=null){
                                     boolean isExist = contactsList.stream().anyMatch(contacts -> custom.getId().equals(contacts.getCustomId())&&contacts.getId().equals(task.getContactsId()));
                                     boolean isExist = contactsList.stream().anyMatch(contacts -> custom.getId().equals(contacts.getCustomId())&&contacts.getId().equals(task.getContactsId()));
                                     if(!isExist){
                                     if(!isExist){
-                                        throw new Exception("["+customName+"]对应的客户没有对应填写的联系人");
+                                        msg.setError("["+customName+"]对应的客户没有对应填写的联系人");
+                                        return msg;
                                     }
                                     }
                                     else {
                                     else {
                                         task.setCustomId(custom.getId());
                                         task.setCustomId(custom.getId());
@@ -581,43 +602,55 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                                     task.setTaskType(0);
                                     task.setTaskType(0);
                                 }
                                 }
                             }else {
                             }else {
-                                throw new Exception("["+customName+"]对应的客户不存在");
+                                msg.setError("["+customName+"]对应的客户不存在");
+                                return msg;
                             }
                             }
                         }
                         }
                     }
                     }
                     else if (modelName.equals("businessOpportunityId")){
                     else if (modelName.equals("businessOpportunityId")){
                         if(cell!=null&&!StringUtils.isEmpty(cell.getStringCellValue())){
                         if(cell!=null&&!StringUtils.isEmpty(cell.getStringCellValue())){
+                            b1=true;
+                            b4=true;
+
                             String businessName = cell.getStringCellValue();
                             String businessName = cell.getStringCellValue();
                             List<BusinessOpportunity> collect = opportunityList.stream().filter(o -> businessName.equals(o.getName())).collect(Collectors.toList());
                             List<BusinessOpportunity> collect = opportunityList.stream().filter(o -> businessName.equals(o.getName())).collect(Collectors.toList());
                             if (collect.size()>1){
                             if (collect.size()>1){
-                                throw new Exception("["+businessName+"]对应的商机存在多个");
+                                msg.setError("["+businessName+"]名称,对应的商机存在多个");
+                                return msg;
                             }else if (collect.size()==1) {
                             }else if (collect.size()==1) {
                                 BusinessOpportunity businessOpportunity = collect.get(0);
                                 BusinessOpportunity businessOpportunity = collect.get(0);
                                 if (task.getContactsId()!=null){
                                 if (task.getContactsId()!=null){
                                     if (!businessOpportunity.getContactsId().equals(task.getContactsId())){
                                     if (!businessOpportunity.getContactsId().equals(task.getContactsId())){
-                                        throw new Exception("["+businessName+"]对应的商机没有对应填写的联系人");
+                                        msg.setError("["+businessName+"]对应的商机没有对应填写的联系人");
+                                        return msg;
                                     }else {
                                     }else {
                                         task.setBusinessOpportunityId(businessOpportunity.getId());
                                         task.setBusinessOpportunityId(businessOpportunity.getId());
                                         task.setTaskType(1);
                                         task.setTaskType(1);
                                     }
                                     }
                                 }
                                 }
                             }else {
                             }else {
-                                throw new Exception("["+businessName+"]对应的商机不存在");
+                                msg.setError("["+businessName+"]对应的商机不存在");
+                                return msg;
                             }
                             }
 
 
                         }
                         }
                     }
                     }
                     else if (modelName.equals("orderId")){
                     else if (modelName.equals("orderId")){
                         if(cell!=null&&!StringUtils.isEmpty(cell.getStringCellValue())){
                         if(cell!=null&&!StringUtils.isEmpty(cell.getStringCellValue())){
+                            b1=true;
+                            b5=true;
+
                             String orderName = cell.getStringCellValue();
                             String orderName = cell.getStringCellValue();
                             List<SalesOrder> collect = orderList.stream().filter(order -> orderName.equals(order.getOrderName())).collect(Collectors.toList());
                             List<SalesOrder> collect = orderList.stream().filter(order -> orderName.equals(order.getOrderName())).collect(Collectors.toList());
                             if (collect.size()>1){
                             if (collect.size()>1){
-                                throw new Exception("["+orderName+"]对应的销售订单存在多个");
+                                msg.setError("["+orderName+"]对应的销售订单存在多个");
+                                return msg;
                             }else if (collect.size()==1) {
                             }else if (collect.size()==1) {
                                 SalesOrder order=collect.get(0);
                                 SalesOrder order=collect.get(0);
                                 if (task.getContactsId()!=null){
                                 if (task.getContactsId()!=null){
                                     if (!order.getContactsId().equals(task.getContactsId())){
                                     if (!order.getContactsId().equals(task.getContactsId())){
-                                        throw new Exception("["+orderName+"]对应的销售订单没有对应填写的联系人");
+                                        msg.setError("["+orderName+"]对应的销售订单没有对应填写的联系人");
+                                        return msg;
                                     }
                                     }
                                     else {
                                     else {
                                         task.setOrderId(order.getId());
                                         task.setOrderId(order.getId());
@@ -625,16 +658,20 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                                     }
                                     }
                                 }
                                 }
                             }else {
                             }else {
-                                throw new Exception("["+orderName+"]对应的销售订单不存在");
+                                msg.setError("["+orderName+"]对应的销售订单不存在");
+                                return msg;
                             }
                             }
                         }
                         }
                     }
                     }
 
 
                     else if (modelName.equals("clueId")) {
                     else if (modelName.equals("clueId")) {
                         if (cell!=null&&!StringUtils.isEmpty(cell.getStringCellValue())) {
                         if (cell!=null&&!StringUtils.isEmpty(cell.getStringCellValue())) {
+                            b2=true;
+
                             String clueName = cell.getStringCellValue();
                             String clueName = cell.getStringCellValue();
                             if (task.getContactsId()!=null){
                             if (task.getContactsId()!=null){
-                                throw new Exception("["+clueName+"]对应的线索不存在联系人");
+                                msg.setError("["+clueName+"]对应的线索不存在联系人");
+                                return msg;
                             }
                             }
                             List<Clue> collect = clueList.stream().filter(clue -> clueName.equals(clue.getClueName())).collect(Collectors.toList());
                             List<Clue> collect = clueList.stream().filter(clue -> clueName.equals(clue.getClueName())).collect(Collectors.toList());
                             if (!collect.isEmpty()) {
                             if (!collect.isEmpty()) {
@@ -642,7 +679,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                                 task.setClueId(clue.getId());
                                 task.setClueId(clue.getId());
                                 task.setTaskType(3);
                                 task.setTaskType(3);
                             }else {
                             }else {
-                                throw new Exception("["+clueName+"]对应的线索不存在");
+                                msg.setError("["+clueName+"]对应的线索不存在");
+                                return msg;
                             }
                             }
                         }
                         }
                     }
                     }
@@ -652,12 +690,14 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                             String contactsPhone = cell.getStringCellValue();
                             String contactsPhone = cell.getStringCellValue();
                             List<Contacts> collect = contactsList.stream().filter(contacts -> contactsPhone.equals(contacts.getPhone())).collect(Collectors.toList());
                             List<Contacts> collect = contactsList.stream().filter(contacts -> contactsPhone.equals(contacts.getPhone())).collect(Collectors.toList());
                             if (collect.size()>1){
                             if (collect.size()>1){
-                                throw new Exception("联系人号码"+"["+contactsPhone+"]对应的联系人存在多个");
+                                msg.setError("联系人号码"+"["+contactsPhone+"]对应的联系人存在多个");
+                                return msg;
                             } else if (collect.size() == 1) {
                             } else if (collect.size() == 1) {
                                 Contacts contacts = collect.get(0);
                                 Contacts contacts = collect.get(0);
                                 if (task.getContactsId()!=null){
                                 if (task.getContactsId()!=null){
                                     if (!contacts.getId().equals(task.getContactsId())){
                                     if (!contacts.getId().equals(task.getContactsId())){
-                                        throw new Exception("联系人号码"+"["+contactsPhone+"]与联系人不绑定");
+                                        msg.setError("联系人号码"+"["+contactsPhone+"]与联系人不绑定");
+                                        return msg;
                                     }
                                     }
                                 }else {
                                 }else {
                                     task.setContactsId(contacts.getId());
                                     task.setContactsId(contacts.getId());
@@ -676,7 +716,18 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                             method.invoke(task,cell.getStringCellValue());
                             method.invoke(task,cell.getStringCellValue());
                         }
                         }
                     }
                     }
+
                 }
                 }
+
+                if (b1&&b2){
+                    msg.setError("任务名称:"+task.getTaskName()+",线索不应与客户/商机/销售订单/联系人一同存在");
+                    return msg;
+                }
+                if (b3&&b4&&b5){
+                    msg.setError("任务名称:"+task.getTaskName()+",客户/商机/销售订单不应一同存在");
+                    return msg;
+                }
+
                 importTaskList.add(task);
                 importTaskList.add(task);
             }
             }
 
 
@@ -702,6 +753,28 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                         task.setStatus(1);
                         task.setStatus(1);
                     }
                     }
 
 
+                    //判断客户/商机/销售订单跟联系人时候绑定
+                    if (task.getTaskType()!=null&&task.getTaskType()<3&&task.getContactsId()!=null){
+                        HttpRespMsg httpRespMsg = contactsService.getAllContacts(task.getBusinessOpportunityId(), task.getOrderId(), task.getCustomId(), request);
+                        List<Contacts> list = (List<Contacts>) httpRespMsg.getData();
+                        if (!list.isEmpty()){
+                            boolean present = list.stream().anyMatch(contacts -> contacts.getId().equals(task.getContactsId()));
+                            if (!present){
+                                String type="";
+                                //客户0, 商机1 ,订单2 ,
+                                if (task.getTaskType()==0){
+                                    type="客户";
+                                }else if (task.getTaskType()==1){
+                                    type="商机";
+                                }else {
+                                    type="订单";
+                                }
+                                msg.setError("存在"+type+"与联系人不一一对应:");
+                                return msg;
+                            }
+                        }
+                    }
+
                 }
                 }
                 if(saveOrUpdateBatch(importTaskList)){
                 if(saveOrUpdateBatch(importTaskList)){
                     ArrayList<TaskExecutor> taskExecutors = new ArrayList<>();
                     ArrayList<TaskExecutor> taskExecutors = new ArrayList<>();

+ 2 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportLogController.java

@@ -309,6 +309,8 @@ public class ReportLogController {
                             msg.setError("第"+row+"行填报时间格式错误,请检查审核时间数据");
                             msg.setError("第"+row+"行填报时间格式错误,请检查审核时间数据");
                             return msg;
                             return msg;
                         }
                         }
+                        reportLog.setOperateDate(createTimeTime);
+                        needUpdateReportLogList.add(reportLog);
                         LocalDateTime finalCreateTimeTime = createTimeTime;
                         LocalDateTime finalCreateTimeTime = createTimeTime;
                         reports.forEach(r->{
                         reports.forEach(r->{
                             r.setCreateTime(finalCreateTimeTime);
                             r.setCreateTime(finalCreateTimeTime);

+ 33 - 30
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -1,14 +1,14 @@
 <template>
 <template>
     <section>
     <section>
         <el-row style="padding-bottom: 0px;text-align:center;margin-top:20px;z-index: 999;">
         <el-row style="padding-bottom: 0px;text-align:center;margin-top:20px;z-index: 999;">
-        <el-col :span="6" >
+        <el-col :span="5" >
             <div ><span style="color:#999;">{{ $t('chartY') }} </span>
             <div ><span style="color:#999;">{{ $t('chartY') }} </span>
             <el-radio-group v-model="yAxisValue" @change="onYAxisChange" size="small">
             <el-radio-group v-model="yAxisValue" @change="onYAxisChange" size="small">
                 <el-radio-button label="1" v-if="permissions.countHours">{{ $t('accordingtoworkinghours') }}</el-radio-button>
                 <el-radio-button label="1" v-if="permissions.countHours">{{ $t('accordingtoworkinghours') }}</el-radio-button>
                 <el-radio-button label="0" v-if="permissions.countCost">{{ $t('accordingtothecost') }}</el-radio-button>
                 <el-radio-button label="0" v-if="permissions.countCost">{{ $t('accordingtothecost') }}</el-radio-button>
             </el-radio-group></div>
             </el-radio-group></div>
         </el-col>
         </el-col>
-        <el-col :span="14" style="display: flex;flex-wrap: wrap;justify-content: flex-end;">
+        <el-col :span="16" style="display: flex;flex-wrap: wrap;justify-content: flex-end;">
             <el-date-picker v-show="user.timeType.fixMonthcost==0"  size="small"
             <el-date-picker v-show="user.timeType.fixMonthcost==0"  size="small"
             v-model="dateRange" :editable="false" 
             v-model="dateRange" :editable="false" 
             format="yyyy-MM-dd" value-format="yyyy-MM-dd" 
             format="yyyy-MM-dd" value-format="yyyy-MM-dd" 
@@ -39,15 +39,11 @@
             </el-radio-group>
             </el-radio-group>
 
 
             <el-select v-if="radio == $t('other.project')||radio == namess " v-model="proJuctId" :placeholder="$t('defaultText.pleaseSelectSnItem')" clearable filterable size="small" @change="getEchart" style="margin-left:10px">
             <el-select v-if="radio == $t('other.project')||radio == namess " v-model="proJuctId" :placeholder="$t('defaultText.pleaseSelectSnItem')" clearable filterable size="small" @change="getEchart" style="margin-left:10px">
-          <el-option v-for="(item) in projectList" :key="item.id" :label="item.projectName + (item.projectCode ? item.projectCode : '')" :value="item.id">
-            <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
-            <span style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>
-          </el-option>
+            <el-option v-for="(item) in projectList" :key="item.id" :label="item.projectName + (item.projectCode ? item.projectCode : '')" :value="item.id">
+                <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
+                <span style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>
+            </el-option>
         </el-select>
         </el-select>
-<!-- 
-            <el-select v-model="customName" filterable placeholder="请选择" style="margin-top: 10px;width: 350px" v-if="theCustomListFlg" @change="jieliu()">
-                <el-option v-for="item in customList" :key="item.id" :label="item.name" :value="item.name"></el-option>
-            </el-select> -->
 
 
             <el-select v-model="personnelValue" filterable clearable :placeholder="hasReportUserList.length == 0 ? $t('nodata') : $t('pleaseselectpersonnel')"  size="small" style="margin-top: 10px;width: 350px" v-if="(radio == $t('ren-yuan'))&& user.userNameNeedTranslate != '1'" @change="personnel()"
             <el-select v-model="personnelValue" filterable clearable :placeholder="hasReportUserList.length == 0 ? $t('nodata') : $t('pleaseselectpersonnel')"  size="small" style="margin-top: 10px;width: 350px" v-if="(radio == $t('ren-yuan'))&& user.userNameNeedTranslate != '1'" @change="personnel()"
             :disabled="hasReportUserList.length == 0 ? true : false">
             :disabled="hasReportUserList.length == 0 ? true : false">
@@ -61,31 +57,31 @@
             </span>
             </span>
 
 
         </el-col>
         </el-col>
-        <el-col :span="4">
+        <el-col :span="3">
             <el-button @click="exportProjectData" v-if="theCustomListFlg"  size="small">{{ $t('reporderived') }}</el-button>
             <el-button @click="exportProjectData" v-if="theCustomListFlg"  size="small">{{ $t('reporderived') }}</el-button>
             <el-button @click="showExportDialog" v-else  size="small">{{ $t('reporderived') }}</el-button>
             <el-button @click="showExportDialog" v-else  size="small">{{ $t('reporderived') }}</el-button>
         </el-col>
         </el-col>
         </el-row>
         </el-row>
-        <!-- <div id="clearfix" :style="'width:'+widthHtval+'px;position: relative; height:'+containerHeight+'px;'">
-             <div id="container" :style="'height:'+containerHeight+'px;width:100%'"></div>
-        </div> -->
         <div id="clearfix" :class="radio == $t('ren-yuan') ? 'ryuans' : ''" :style="'overflow-x: auto;width:100%;padding-bottom: 100px; position: relative; height:'+containerHeight+'px;'" v-loading="radioLoading">
         <div id="clearfix" :class="radio == $t('ren-yuan') ? 'ryuans' : ''" :style="'overflow-x: auto;width:100%;padding-bottom: 100px; position: relative; height:'+containerHeight+'px;'" v-loading="radioLoading">
-            <div id="container" :style="'height:'+(containerHeight - 20)+'px;width:100%'"></div>
-            <div class="poss">
+            <div id="container" ref="container" :style="'height:'+(containerHeight - 20)+'px;width:100%'"></div>
+            <div class="poss" :style="`width:${possWidth}px;`">
+                <div class="poss-btn">
+                    <el-radio-group v-model="possradio" size="small" @change="onYAxisChange" v-if="radio == '项目'">
+                        <el-radio-button label="1">项目名称</el-radio-button>
+                        <el-radio-button label="2">项目编号</el-radio-button>
+                    </el-radio-group>
+                </div>
                 <el-pagination
                 <el-pagination
-                  @size-change="echartsSizeChange"
-                  @current-change="echartsCurrentChange"
-                  :current-page="page"
-                  :page-sizes="[50]"
-                  :page-size="50"
-                  layout="total, sizes, prev, pager, next"
-                  :total="total">
+                @size-change="echartsSizeChange"
+                @current-change="echartsCurrentChange"
+                :current-page="page"
+                :page-sizes="[50]"
+                :page-size="50"
+                layout="total, sizes, prev, pager, next"
+                :total="total">
                 </el-pagination>
                 </el-pagination>
             </div>
             </div>
         </div>
         </div>
-        <!-- <div>
-             <div id="container" :style="'height:'+containerHeight+'px;width:100%'"></div>
-        </div> -->
         <div style="position:fixed;top:170px;left:600px;" v-show="radio==$t('lable.department') && parentDeptId != null">
         <div style="position:fixed;top:170px;left:600px;" v-show="radio==$t('lable.department') && parentDeptId != null">
             <el-button @click="backToParentDept">{{ $t('returnsuperior') }}</el-button>
             <el-button @click="backToParentDept">{{ $t('returnsuperior') }}</el-button>
         </div>
         </div>
@@ -252,6 +248,8 @@
                 departmentList: [],
                 departmentList: [],
                 radioLoading: false,
                 radioLoading: false,
                 proJuctId:'',
                 proJuctId:'',
+                possWidth: 300,
+                possradio: '1'
             };
             };
         },
         },
         methods: {
         methods: {
@@ -1059,7 +1057,7 @@
                             for(var i in list) {
                             for(var i in list) {
                                 if(this.radio==this.$t('other.project') || this.radio == this.$t('zhu-xiang-mu')) {
                                 if(this.radio==this.$t('other.project') || this.radio == this.$t('zhu-xiang-mu')) {
                                     if(this.radio == this.$t('other.project')){
                                     if(this.radio == this.$t('other.project')){
-                                        xList.push(list[i].project);
+                                        xList.push(this.possradio == '1' ? list[i].project : list[i].projectCode);
                                     }else{
                                     }else{
                                         xList.push(list[i].mainProjectName);
                                         xList.push(list[i].mainProjectName);
                                     }
                                     }
@@ -1439,12 +1437,11 @@
             this.myChart = null
             this.myChart = null
         },
         },
         mounted() {
         mounted() {
+            this.possWidth = this.$refs.container.clientWidth
             this.containerHeight = window.innerHeight - 200
             this.containerHeight = window.innerHeight - 200
-            // this.containerHeight = window.innerHeight - 130
             const that = this;
             const that = this;
             window.onresize = function temp() {
             window.onresize = function temp() {
                 this.containerHeight = window.innerHeight - 130
                 this.containerHeight = window.innerHeight - 130
-                // this.containerHeight = window.innerHeight - 200
             };
             };
             if(this.permissions.countCost && !this.permissions.countHours){
             if(this.permissions.countCost && !this.permissions.countHours){
                 this.yAxisValue = '0'
                 this.yAxisValue = '0'
@@ -1521,8 +1518,14 @@
     .poss {
     .poss {
         position: fixed;
         position: fixed;
         bottom: 10px;
         bottom: 10px;
-        right: 1%;
         box-sizing: border-box;
         box-sizing: border-box;
+        padding: 0 1%;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        .poss-btn {
+            display: flex;
+        }
     }
     }
 </style>
 </style>