소스 검색

管理驾驶舱选择部门和预算判断

yuhan 1 년 전
부모
커밋
ce21194b6b

+ 4 - 4
src/api/kzksApi.js

@@ -33,12 +33,12 @@ const insertIntoProject = (params)=>postAction("/projectCostHuiji/projectCostHui
 const costModelInform = (params)=>postAction("/costModelList/costModelList/inform", params);
 
 // 首页/报表/驾驶舱
-const getZhibiaoCollect = (params)=>getAction("/index/getCollect", params);
+const getZhibiaoCollect = (params)=>postAction("/index/getCollect", params);
 const getdataByHt = (params)=>postAction("/index/getContractAmountInfo", params);
-const getdataByChb = (params)=>getAction("/index/getEightCostsInfo", params);
+const getdataByChb = (params)=>postAction("/index/getEightCostsInfo", params);
 // const getdataByChb = (params)=>getAction("/index/getEightCost", params);
-const getdataByLr = (params)=>getAction("/index/countLreByDate", params);
-const getdataBySk = (params)=>getAction("/index/countTotalReceivedByDate", params);
+const getdataByLr = (params)=>postAction("/index/countLreByDate", params);
+const getdataBySk = (params)=>postAction("/index/countTotalReceivedByDate", params);
 const deptZhibiaoPaihang = (params)=>getAction("/index/getCompletRateByDate", params);
 
 

+ 26 - 1
src/views/module_kzks/dashboard/Analysis.vue

@@ -185,6 +185,11 @@
           </a-tabs>
         </div>
       </a-card> -->
+
+      <!-- 选择部门 -->
+      <div v-if="pageRoleNum === 0" class="choose-dept-container">
+        <j-select-depart v-model="selecteddeparts" :multi="true" @back="backDepartInfo" :backDepart="true" :treeOpera="true">></j-select-depart>
+      </div>
     </template>
     
 
@@ -379,6 +384,8 @@
           zrbmCharts: [],
         },
 
+        selecteddeparts: [],
+        deptParams: []
       }
     },
     computed: {
@@ -431,7 +438,7 @@
       },
       getZhibiaoCollect(){
         this.loading = true
-        getZhibiaoCollect().then(res => {
+        getZhibiaoCollect(this.deptParams).then(res => {
           console.log(res)
           if (res.success) {
             // 0:所领导,1:部门领导,2:员工;3:未赋值或选了多个前面所说角色
@@ -471,12 +478,14 @@
             time: 'month',
             beginDate: beginDate,
             endDate: endDate,
+            departNameList: this.deptParams
           }
         } else if (sType === 'year') {
           this.searchParams = {
             time: 'year',
             beginDate: year,
             endDate: year,
+            departNameList: this.deptParams
           }
         }
         this.getDataByDate()
@@ -598,6 +607,7 @@
             time: 'month',
             beginDate: moment(value[0]).format('YYYY-MM'),
             endDate: moment(value[1]).format('YYYY-MM'),
+            departNameList: this.deptParams
           }
         }
         if(this.searchMode[0] === 'year'){
@@ -605,6 +615,7 @@
             time: 'year',
             beginDate: moment(value[0]).format('YYYY'),
             endDate: moment(value[1]).format('YYYY'),
+            departNameList: this.deptParams
           }
         }
         // this.modeMonth = [mode[0] === 'date' ? 'month' : mode[0], mode[1] === 'date' ? 'month' : mode[1]];
@@ -683,6 +694,14 @@
       changeopen() {
         this.zbphYearIsopen = true;
       },
+
+      backDepartInfo(info) {
+        console.log(info)
+        this.deptParams = info.map(item => item.text)
+        console.log(this.deptParams)
+        this.getZhibiaoCollect()
+        this.handlePanelChange()
+      },
     }
   }
 </script>
@@ -738,4 +757,10 @@
   .dept-zbph-table{
     padding: 0 20px 20px;
   }
+
+  .choose-dept-container{
+    position: fixed;
+    right: 10px;
+    top: 84px;
+  }
 </style>

+ 6 - 1
src/views/module_kzks/projectCostList/ProjectCostList.vue

@@ -711,7 +711,12 @@ import { number } from 'echarts';
           {
             title:'业务员',
             align:"center",
-            dataIndex: 'businessman'
+            dataIndex: 'businessManName'
+          },
+          {
+            title:'主管设计师',
+            align:"center",
+            dataIndex: 'ywfzrname'
           },
           {
             title:'设计工时',

+ 12 - 0
src/views/module_kzks/projectPushList/ProjectPushListList.vue

@@ -10,6 +10,18 @@
             </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="成本类型">
+              <!-- <a-input placeholder="请输入成本类型" v-model="queryParam.costType"></a-input> -->
+              <j-dict-select-tag type="list" v-model="queryParam.costType" dictCode="project_push_type" placeholder="请选择成本类型" />
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="推送类型">
+              <!-- <a-input placeholder="请输入成本类型" v-model="queryParam.costType"></a-input> -->
+              <j-dict-select-tag type="list" v-model="queryParam.costType" dictCode="push_type" placeholder="请选择推送类型" />
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
               <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>

+ 1 - 1
src/views/module_kzks/projectPushSet/ProjectPushSetList.vue

@@ -7,7 +7,7 @@
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <a-form-item label="成本类型">
               <!-- <a-input placeholder="请输入成本类型" v-model="queryParam.costType"></a-input> -->
-              <j-dict-select-tag type="list" v-model="queryParam.costType" dictCode="project_push_type" placeholder="请选择要推送的成本类型" />
+              <j-dict-select-tag type="list" v-model="queryParam.costType" dictCode="project_push_type" placeholder="请选择成本类型" />
             </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">

+ 6 - 1
src/views/module_kzks/projectPushSet/modules/ProjectPushSetForm.vue

@@ -9,7 +9,7 @@
               <j-dict-select-tag type="list" v-model="model.costType" dictCode="project_push_type" placeholder="请选择要推送的成本类型" />
             </a-form-model-item>
           </a-col>
-          <a-col :span="24">
+          <a-col :span="24" v-if="model.costType != '3' && model.costType != '4'">
             <a-form-model-item label="阶段(%)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stage">
               <!-- <a-input v-model="model.stage" placeholder="请输入阶段(%)"  ></a-input> -->
               <a-input-number
@@ -19,6 +19,7 @@
                 :max="100"
                 :formatter="value => `${value}%`"
                 :parser="value => value.replace('%', '')"
+                style="width: 100%;"
               />
             </a-form-model-item>
           </a-col>
@@ -115,6 +116,7 @@
       },
       edit (record) {
         this.model = Object.assign({}, record);
+        console.log(this.model)
         this.visible = true;
       },
       onChange(value){
@@ -135,6 +137,9 @@
               httpurl+=this.url.edit;
                method = 'put';
             }
+            if(this.model.costType == '3' || this.model.costType == '4'){
+              this.model.stage = '-'
+            }
             httpAction(httpurl,this.model,method).then((res)=>{
               if(res.success){
                 that.$message.success(res.message);