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

休息时间段设置部门

cs 2 роки тому
батько
коміт
a82f6182ce

+ 4 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -981,22 +981,22 @@
                     {{scope.row.invoiceType == null?'':(scope.row.invoiceType == 0 ? '增值税专用发票' : '增值税普通发票')}}
                   </template>
                 </el-table-column>
-                <el-table-column prop="amount" :label="$t('amountof')+'('+ $t('tax') +')'"   align="right">
+                <el-table-column prop="amount" :label="$t('amountof')+'('+ $t('tax') +')'">
                   <template slot-scope="scope">
                         {{scope.row.amount}}
                     </template>
                 </el-table-column>
-                <el-table-column prop="amount" :label="$t('taxs')"   align="right">
+                <el-table-column prop="amount" :label="$t('taxs')">
                   <template slot-scope="scope">
                         {{scope.row.taxValue == null?'0.00':scope.row.taxValue.toFixed(2)}}
                     </template>
                 </el-table-column>
-                <el-table-column prop="amount" :label="$t('amountof')+'('+ $t('notax') +')'"   align="right">
+                <el-table-column prop="amount" :label="$t('amountof')+'('+ $t('notax') +')'">
                   <template slot-scope="scope">
                         {{(scope.row.amount-scope.row.taxValue).toFixed(2)}}
                     </template>
                 </el-table-column>
-                <el-table-column prop="remark" label="备注"   align="right">
+                <el-table-column prop="remark" label="备注">
                   <template slot-scope="scope">
                     <el-tooltip popper-class="tipclass" :content=scope.row.remark placement="top-start">
                       <div class="cloStyleFour">{{scope.row.remark==null?"":scope.row.remark.length > 6?scope.row.remark.substring(0,5) + "...": scope.row.remark}}</div>

+ 32 - 30
fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue

@@ -147,7 +147,7 @@
             <div v-if="timeType.type == 2">
                 <el-link :underline="false" type="primary" @click="setupRest">{{ $t('settingrestPeriod') }}</el-link>
                 <div style="padding: 10px 2px;">
-                <el-tag style="margin: 0 8px 8px 0;" size="small" type="info" v-for="item in restList" :key="item.id">{{item.startTime + '-' + item.endTime}}</el-tag>
+                    <el-tag style="margin: 0 8px 8px 0;" size="small" type="info" v-for="item in restList" :key="item.id">{{item.startTime + '-' + item.endTime}}</el-tag>
                 </div>
             </div>
         </div>
@@ -479,21 +479,27 @@
             </div>
             <el-dialog :title="setupItemId == null ? $t('add') : $t('xiu-gai')" v-if="setupRestAppendDialog" :visible.sync="setupRestAppendDialog" :close-on-click-modal="false" customClass="customWidth" width="400px" append-to-body>
                 <el-form label-width="100px">
-                    <el-form-item label="部门" v-if="setupItemId == null">
-                        <!-- 部门筛选 -->
-                        <el-cascader style="width: 220px;" v-if="user.userNameNeedTranslate != 1 && setupItemId == null" ref="deptList" :options="options" :placeholder="$t('qing-xuan-ze-bu-men')"
-                            :props="{value:'id',expandTrigger: 'hover',multiple: true }" collapse-tags :show-all-levels="false" clearable
-                            @change="changeDept()"
-                        >
-                        </el-cascader>
-                        <vueCascader :widthStr="'220'" size="small" :clearable="true" :subject="options" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1 && setupItemId == null" :selectNameChuan="$t('qing-xuan-ze-bu-men')" @selectCal="selectCal"></vueCascader>
-                    </el-form-item>
                     <el-form-item :label="$t('starttimes')">
                         <el-time-picker v-model="restTime.startTime" :placeholder="$t('message.Pleaseselectatime')" format="HH:mm" value-format="HH:mm" @change="timeRule(0)"></el-time-picker>
                     </el-form-item>
                     <el-form-item :label="$t('time.endTime')">
                         <el-time-picker v-model="restTime.endTime" :placeholder="$t('message.Pleaseselectatime')" format="HH:mm" value-format="HH:mm" @change="timeRule(1)"></el-time-picker>
                     </el-form-item>
+            
+                    <div v-if="setupItemId == null" style="max-height: 280px;overflow: auto;">
+                        <el-tree
+                            ref="deptTree"
+                            :props="deptProps"
+                            :data="options"
+                            show-checkbox>
+                            <span class="custom-tree-node" slot-scope="{ node }">
+                                <span v-if="!user.userNameNeedTranslate == 1">{{ node.label }} </span>
+                                <span v-if="user.userNameNeedTranslate == 1">
+                                    <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                                </span>
+                            </span>
+                        </el-tree>
+                    </div>
                 </el-form>
                 <div slot="footer" class="dialog-footer">
                     <el-button @click.native="setupRestAppendDialog = false">{{ $t('btn.cancel') }}</el-button>
@@ -553,6 +559,10 @@
         },
         data() {
             return {
+                deptProps:{
+                    children: 'children',
+                    label: 'label'
+                },
                 settThree: false,
                 settTwo: false,
                 settOne: false,
@@ -638,7 +648,7 @@
                 setupRestDialog: false,
                 setupRestAppendDialog: false,
                 restTime: {
-                    departmentId:[],
+                    departmentId:null,
                     startTime: null,
                     endTime: null
                 },
@@ -830,10 +840,20 @@
                 })
             },
             setupRestSure(){
+                    if(this.setupItemId == null){
+                        var data = this.$refs.deptTree.getCheckedNodes()
+                        var deptId = [];
+                        for(var i in data){
+                            if(data[i].label != '全选'){
+                                deptId.push(data[i].id)
+                            }
+                        }
+                    }
+                    this.restTime.departmentId = deptId
                     if(this.setupItemId != null){
                         this.restTime.id = this.setupItemId
                     }
-                    if(this.setupItemId == null && this.restTime.departmentId == null){
+                    if(this.setupItemId == null && this.restTime.departmentId.length == 0){
                         this.$message("请选择部门")
                         return
                     }
@@ -1399,16 +1419,6 @@
                     this.getWhiteListAll()
                 }
             },
-            changeDept(value){
-                var deptIdList = this.$refs["deptList"].getCheckedNodes();
-                var deptId = [];
-                for (var i=0; i<deptIdList.length; i++) {
-                    if (deptIdList[i].data.label != '全选'){
-                        deptId.push(deptIdList[i].data.id);
-                    }
-                }
-                this.restTime.departmentId = deptId;
-            },
             clearEchartDepartment() {
                 this.searchPersonnelFlgnum = +this.searchPersonnelFlgnum +1
                 this.searchPersonnelFlg = false
@@ -1421,14 +1431,6 @@
                 this.searchPersonnelFlg = false
                 this.whiteListAll = this.whiteListAllTwo
             },
-            // 自定义组件事件
-            vueCasader(obj) {
-                if(obj.distinction == '1') {
-                let arr = []
-                arr.push(obj.id)
-                this.handleSelectionZzjgwillchange = arr
-                }
-            },
 
         },
     };

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue

@@ -3045,7 +3045,7 @@ export default {
       setTimeout(() => {
         var that = this;
         if (i == -2) {
-          //创建子部门
+          //创建子部门user
           that.depForm = {
             id: null,
             name: null,