Ver Fonte

调整财务核算成本的分摊设置

Lijy há 2 anos atrás
pai
commit
941d0494e3

+ 19 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/project/finance.vue

@@ -178,7 +178,7 @@
             <template v-if="user.timeType.isSecretSalary==1">
                 <el-table-column :label="item" sortable show-overflow-tooltip v-for="(item, index) in tblCols" :key="index" width="130px" align="center">
                 <template slot-scope="scope" >
-                    *
+                    * <span v-if="scope.row"></span>
                 </template>
                 </el-table-column>
             </template>
@@ -402,7 +402,7 @@
                 <div>
                     <el-button :disabled="multipleSelection.length==0" @click="setPercent(true, null)">批量设置比例</el-button>
                     <el-button :disabled="projectCols.length==0 || userCostSettingList.length == 0" @click="getLastMonthSetting">使用上月比例设置</el-button>
-                    <el-button @click="showSelectProjectDialog">管理待分摊项目</el-button>
+                    <el-button @click="showSelectProjectDialog">{{date}} 月待分摊项目设置</el-button>
                     <el-button @click="intoAmortizationRatio">导入分摊比例</el-button>
                 </div>
                 <el-table :data="userCostSettingList" highlight-current-row v-loading="costSettingLoading" 
@@ -430,11 +430,12 @@
             </div>
         </el-dialog>
 
-        <el-dialog title="待分摊项目选择" show-header="false" v-if="projectsDialog" :visible.sync="projectsDialog" 
+        <el-dialog :title="date + '月待分摊项目选择'" show-header="false" v-if="projectsDialog" :visible.sync="projectsDialog" 
             :close-on-click-modal="false" customClass="customWidth" width="1000px">
             <el-select v-model="chosenProjects" multiple filterable clearable style="width:100%">
                 <el-option v-for="item in allProjectList" :label="item.projectName" :key="item.id" :value="item.id"></el-option>
             </el-select>
+            <el-checkbox v-model="chosenProjectsChecked" @change="chosenProjectsCheckedClick" style="margin: 20px 0;">{{chosenProjectsChecked ? '取消选择全部项目' : '选中全部项目'}}</el-checkbox>
             <div slot="footer" class="dialog-footer">
                 <el-button type="default" @click="projectsDialog = false" >关闭</el-button>
                 <el-button type="primary" @click="saveProjectSetting()" >确定</el-button>
@@ -590,10 +591,23 @@ import { error } from 'dingtalk-jsapi';
                 importResultMsg:null,
                 showImportResult:false,
                 widthHtval: document.body.clientWidth - 230,
-                deleteSelList: []
+                deleteSelList: [],
+                chosenProjectsChecked: false
             };
         },
         methods: {
+            chosenProjectsCheckedClick() {
+                console.log(this.chosenProjects, '数据')
+                if(this.chosenProjectsChecked) {
+                    let arr = []
+                    for(let i in this.allProjectList) {
+                        arr.push(this.allProjectList[i].id)
+                    }
+                    this.chosenProjects = arr
+                } else {
+                    this.chosenProjects = []
+                }
+            },
             deleteSel(sel){
                 this.deleteSelList = sel
                 // console.log(sel);
@@ -903,6 +917,7 @@ import { error } from 'dingtalk-jsapi';
             showSelectProjectDialog() {
                 //设置选中状态
                 this.chosenProjects = [];
+                this.chosenProjectsChecked = false
                 this.projectCols.forEach(item=>{
                     this.chosenProjects.push(item.projectId);
                 })