licp
2024-05-31 d49c28b6dc4b4dd363ec699ecc8a1a51983a10f9
src/components/do/b3-work-time-management/work-time-statistics.vue
@@ -9,16 +9,19 @@
            type="month"
            format="yyyy-MM"
            value-format="yyyy-MM"
            placeholder="选择月" size="small" style="width: 100%;">
            placeholder="选择月" size="small" style="width: 100%;"
            :clearable="false">
          </el-date-picker>
        </div>
         </div>
         <div class="search_thing">
            <div class="search_label">员工:</div>
            <el-select v-model="entity.name" placeholder="全部" size="small" @change="refreshTable()">
            <!-- <el-select v-model="entity.name" placeholder="全部" size="small" @change="refreshTable()" clearable>
               <el-option v-for="item in personList" :key="item.id" :label="item.name" :value="item.id">
               </el-option>
            </el-select>
            </el-select> -->
        <el-input size="small" placeholder="请输入" clearable
          v-model="entity.name" @keyup.enter.native="refreshTable()"></el-input>
         </div>
         <div class="search_thing">
            <div class="search_label">部门:</div>
@@ -51,8 +54,8 @@
    <div class="table">
      <ValueTable ref="ValueTable0"
        v-if="currentTable == 'value0'"
            :url="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours"
            :componentData="componentData" :inputUrl="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours" :downUrl="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours" :key="upIndex" />
            :url="$api.auxiliaryOriginalHours.selectAuxiliaryOriginalHours"
            :componentData="componentData" :downUrl="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours" :key="upIndex" />
      <ValueTable ref="ValueTable1"
        v-if="currentTable == 'value1'"
            :url="$api.auxiliaryCorrectionHours.selectAuxiliaryCorrectionHours"
@@ -79,10 +82,6 @@
                  month: getYearAndMonthAndDays().split('-')[0]+'-'+getYearAndMonthAndDays().split('-')[1],
                  name: null,
                  departLims: null,
                  orderBy: {
                     field: 'id',
                     order: 'desc'
                  }
               },
               isIndex: true,
               showSelect: false,
@@ -94,7 +93,10 @@
               requiredAdd: [],
               requiredUp: [],
          accept: '.xlsx',
          inputType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
          inputType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
          cellSpecialStyle:{
            redColorByKey:'Hours'
          }
         },
      componentData0: {
               entity: {
@@ -152,6 +154,7 @@
    },
    refreshTable(){
      let entity = {...this.entity}
      entity.month = entity.month.split('-')[0]+'-'+entity.month.split('-')[1]
      if(this.currentTable=='value0'){
        this.componentData.entity = {...this.componentData.entity,...entity}
        this.$refs['ValueTable0'].selectList()