|
@@ -36,6 +36,15 @@
|
|
:colsWidth="colsWidth"
|
|
:colsWidth="colsWidth"
|
|
:title="`${moment(fromParams.month).format('YYYY年MM月')}-考勤数据表`"
|
|
:title="`${moment(fromParams.month).format('YYYY年MM月')}-考勤数据表`"
|
|
/>
|
|
/>
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="porps.deptsName == '公司'"
|
|
|
|
+ type="warning"
|
|
|
|
+ plain
|
|
|
|
+ @click="handleImport"
|
|
|
|
+ v-hasPermi="['adm:attendance-sheet:import']"
|
|
|
|
+ >
|
|
|
|
+ <Icon icon="ep:upload" /> 导入
|
|
|
|
+ </el-button>
|
|
<el-button type="success" style="background-color: #05ce9e" v-if="false">
|
|
<el-button type="success" style="background-color: #05ce9e" v-if="false">
|
|
<img src="@/assets/imgs/OA/kq/kqqrIcon.png" class="mr-8px" alt="" />
|
|
<img src="@/assets/imgs/OA/kq/kqqrIcon.png" class="mr-8px" alt="" />
|
|
考勤确认</el-button
|
|
考勤确认</el-button
|
|
@@ -143,6 +152,8 @@
|
|
|
|
|
|
<DepsUpdataDetail ref="depsDetailRef" @updataInit="updataInit" />
|
|
<DepsUpdataDetail ref="depsDetailRef" @updataInit="updataInit" />
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- 用户导入对话框 -->
|
|
|
|
+ <AttendanceSheetImportForm ref="importFormRef" @success="init" />
|
|
</template>
|
|
</template>
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
defineOptions({ name: 'AttendanceDep' })
|
|
defineOptions({ name: 'AttendanceDep' })
|
|
@@ -155,6 +166,7 @@ import moment from 'moment'
|
|
import { depsState } from './depsState'
|
|
import { depsState } from './depsState'
|
|
import ExportToExcel from '@/components/ExportToExcel/index.vue'
|
|
import ExportToExcel from '@/components/ExportToExcel/index.vue'
|
|
import { getUserInfo } from '@/utils/tool'
|
|
import { getUserInfo } from '@/utils/tool'
|
|
|
|
+import AttendanceSheetImportForm from './components/attendanceSheetImportForm.vue'
|
|
const userInfo = getUserInfo()
|
|
const userInfo = getUserInfo()
|
|
|
|
|
|
const porps = defineProps(['deptsName'])
|
|
const porps = defineProps(['deptsName'])
|
|
@@ -358,7 +370,14 @@ const getExcelTable = (attendanceData) => {
|
|
return [...tableHead, ...tableBody]
|
|
return [...tableHead, ...tableBody]
|
|
}
|
|
}
|
|
|
|
|
|
-onMounted(() => {
|
|
|
|
|
|
+/** 考勤导入 */
|
|
|
|
+const importFormRef = ref()
|
|
|
|
+const handleImport = () => {
|
|
|
|
+ importFormRef.value.open()
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/** 初始化 */
|
|
|
|
+const init = () => {
|
|
let toMonth = moment().format('YYYY-MM')
|
|
let toMonth = moment().format('YYYY-MM')
|
|
fromParams.value.month = toMonth
|
|
fromParams.value.month = toMonth
|
|
// 加载部门树
|
|
// 加载部门树
|
|
@@ -367,6 +386,10 @@ onMounted(() => {
|
|
toMoseMonths[0] = moment().startOf('months').format('YYYY-MM-DD') + ' 00:00:00'
|
|
toMoseMonths[0] = moment().startOf('months').format('YYYY-MM-DD') + ' 00:00:00'
|
|
toMoseMonths[1] = moment().endOf('months').format('YYYY-MM-DD') + ' 23:59:59'
|
|
toMoseMonths[1] = moment().endOf('months').format('YYYY-MM-DD') + ' 23:59:59'
|
|
initInsMouth(toMoseMonths)
|
|
initInsMouth(toMoseMonths)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+onMounted(() => {
|
|
|
|
+ init()
|
|
})
|
|
})
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|