代码调整

This commit is contained in:
andy 2026-06-01 11:34:42 +08:00
parent a403c2ad67
commit d1fc734393
9 changed files with 115 additions and 19 deletions

View File

@ -8,6 +8,8 @@ ENV = 'development'
VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_URL = 'http://localhost:8081'
#VUE_APP_BASE_API = 'http://192.168.5.232:8081/'
#VUE_APP_BASE_URL = 'http://192.168.5.232:8081'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -6,6 +6,7 @@
"license": "MIT",
"scripts": {
"dev": "vue-cli-service serve",
"build:dev": "vue-cli-service build --mode development",
"build:prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",

View File

@ -17,6 +17,13 @@ export function getAbnormalDetail(id) {
})
}
// 重新抓取考勤结果
export function getAttendanceDetail(id) {
return request({
url: '/attendance/abnormalDetail/attendanceDetail/' + id,
method: 'get'
})
}
// 修改考勤异常详情
export function updateAbnormalDetail(data) {
return request({

View File

@ -60,4 +60,20 @@ export function getAttendanceDetail(id) {
})
}
// 查询考勤记录详细
export function loadAttendance(id) {
return request({
url: '/attendance/attendance/load/' + id,
method: 'get'
})
}
// 查询考勤记录详细
export function loadAttendanceAll(data) {
return request({
url: '/attendance/attendance/load/all',
method: 'put',
data: data
})
}

View File

@ -16,3 +16,10 @@ export function delStatistics(id) {
method: 'delete'
})
}
export function confirmStatistics(id) {
return request({
url: '/finance/financeStatistics/' + id,
method: 'put'
})
}

View File

@ -52,9 +52,18 @@
plain
icon="el-icon-edit"
size="mini"
@click="handleEdit"
@click="handleEdit(1)"
v-hasPermi="['attendance:attendance:edit']"
>批量处理</el-button>
</el-col><el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-refresh"
size="mini"
@click="handleEdit(2)"
v-hasPermi="['attendance:attendance:edit']"
>批量抓取考勤</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -89,6 +98,13 @@
@click="handleUpdate(scope.row)"
v-hasPermi="['attendance:attendance:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-refresh"
@click="handleAttendance(scope.row)"
v-hasPermi="['attendance:attendance:edit']"
>重新获取考勤</el-button>
<el-button
size="mini"
type="text"
@ -215,7 +231,7 @@
</template>
<script>
import { listAttendance, getAttendance, updateAttendance,updateBatchAttendance, getAttendanceDetail } from "@/api/attendance/attendance";
import { listAttendance, getAttendance, updateAttendance,updateBatchAttendance, getAttendanceDetail, loadAttendance,loadAttendanceAll } from "@/api/attendance/attendance";
import { buttonOptionList } from "@/api/equipment/button";
import { getToken } from '@/utils/auth'
import { parseTime } from '../../../utils/ruoyi'
@ -243,6 +259,7 @@ export default {
findDate: false,
open: false,
openDate: false,
type:1,
//
queryParams: {
pageNum: 1,
@ -424,6 +441,12 @@ export default {
this.title = "修改考勤记录";
});
},
handleAttendance(row) {
loadAttendance(row.id).then(response => {
this.handleQuery();
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
@ -445,17 +468,25 @@ export default {
}, `attendance_${new Date().getTime()}.xlsx`)
},
/** 批量处理特殊情况 */
handleEdit(){
handleEdit(type){
this.openDate = true;
this.type = type;
this.title = "考勤时间";
},
banthSubmitForm(){
if(this.type == 1){
updateBatchAttendance(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.openDate = false;
});
},
}else{
loadAttendanceAll(this.form).then(response => {
this.$modal.msgSuccess("重新抓取成功");
this.openDate = false;
});
}
},
}
};
</script>

View File

@ -35,6 +35,7 @@
size="mini"
@click="handleAdd"
v-hasPermi="['finance:financeDetail:add']"
v-if="this.queryParams.type==1"
>计算工资</el-button>
</el-col>
<el-col :span="1.5">
@ -420,7 +421,9 @@ export default {
rules: {}
};
},
created() {
created() {debugger
this.queryParams.type = this.$route.query.type;
console.log(111,this.queryParams.type,this.$route.query.type)
this.getList();
this.getDeptList();
var parms = this.$route.query
@ -571,9 +574,7 @@ export default {
type: 'warning'
});
}else{
exportgzd({
month:this.queryParams.month
}).then(response => {
exportgzd(this.queryParams).then(response => {
this.downloadExcel(response.msg);
this.openExport = false;
})

View File

@ -30,17 +30,26 @@
<el-button
size="mini"
type="text"
icon="el-icon-delete"
icon="el-icon-view"
@click="handleDetail(scope.row)"
v-hasPermi="['finance:financeStatistics:detail']"
>查看详情</el-button>
<!-- <el-button
<el-button
size="mini"
type="text"
v-if="scope.row.status ==='待审核'"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['finance:financeStatistics:remove']"
>删除</el-button> -->
>删除</el-button>
<el-button
size="mini"
type="text"
v-if="scope.row.status ==='待审核'"
icon="el-icon-check"
@click="handleComfirm(scope.row)"
v-hasPermi="['finance:financeStatistics:comfirm']"
>确认发放</el-button>
</template>
</el-table-column>
</el-table>
@ -57,7 +66,7 @@
</template>
<script>
import { listStatistics, delStatistics } from "@/api/finance/financeStatistics";
import { listStatistics, delStatistics, confirmStatistics } from "@/api/finance/financeStatistics";
export default {
name: "FinanceStatistics",
@ -134,6 +143,17 @@ export default {
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
handleComfirm(row) {
this.$modal.confirm('确发放工资统计月份为"' + row.month + '"的数据项?确认后, 无法恢复').then(function() {
return confirmStatistics(row.id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
handleDetail(row){
this.$router.push({
path: "/finance/financeDetail",

View File

@ -10,7 +10,8 @@
/>
</el-form-item>
<el-form-item label="归属部门:" prop="deptId">
<treeselect v-model="queryParams.deptId" :options="deptOptions" style="width: 240px" :show-count="true" placeholder="请选择归属部门" />
<treeselect v-model="queryParams.deptId" :options="deptOptions" style="width: 240px" :show-count="true" :autoSelectAncestors="true" placeholder="请选择归属部门" />
</el-form-item>
<el-form-item label="住宿标识:" prop="zsFlag">
<el-select v-model="queryParams.zsFlag" placeholder="请选择住宿标识" clearable>
@ -429,7 +430,14 @@
</el-col>
<el-col :span="12">
<el-form-item label="归属部门" prop="deptId">
<treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
<!-- <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" /> -->
<el-cascader
v-model="form.deptId"
:options="deptOpt"
value="id"
>
<!--@change="handleChange"-->
</el-cascader>
</el-form-item>
</el-col>
</el-row>
@ -951,6 +959,7 @@ export default {
staffList: [],
//
deptOptions: [],
deptOpt:[],
//
subsidyOptions: [],
//
@ -1131,6 +1140,7 @@ export default {
getDeptList(){
listAllDepts().then(response => {
this.deptOptions = response;
this.deptOpt = JSON.parse(JSON.stringify(this.deptOptions).replaceAll('id','value'))
});
},
@ -1228,6 +1238,7 @@ export default {
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.form.deptId = this.form.deptId[this.form.deptId.length -1]
if (this.form.userId != null) {
updateStaff(this.form).then(response => {
this.$modal.msgSuccess("修改成功");