-
+
@@ -134,19 +134,25 @@ const handleConfirm = () => {
}
numTime.value+=1
localStorage.setItem('numTime',numTime.value)
- close()
+ const obj = {
+ id: '1',
+ status: 1
+ }
+ api.isConfirm(obj).then(res=>{
+ console.log(res,'resssss')
+ message.success('提交成功')
+ close()
+ closeDrawer()
+ })
}
-const forData = ref([
- {name:'a',id:1},
- {name:'b',id:2},
- {name:'c',id:3},
- {name:'c',id:3},
- {name:'c',id:3},
- {name:'c',id:3},
-])
-const indexList = ref(1)
+const forData = ref()
+const indexList = ref(0)
+const expenseList = ref([])
+const searchList = ref([])
const clickItem = (item,i) => {
- indexList.value = i+1
+ expenseList.value = item.expenseList
+ indexList.value = i
+ resetData()
}
watch(()=>props.visible,(val)=>{
if(val){
@@ -159,10 +165,49 @@ watch(()=>props.visible,(val)=>{
endTime: '',
}
).then(res=>{
- console.log(res,'resss')
+ if(res.data.code === 200){
+ forData.value = res.data.data
+ expenseList.value = res.data.data[indexList.value]?.expenseList
+ }
})
+ }else{
+ nameUserNo.value = null
+ dateValue.value = null
}
})
+const removeId = (e,i) =>{
+ if(searchTrue.value){
+ searchList.value = searchList.value.filter(item=>item.id !== e.id)
+ expenseList.value = expenseList.value.filter(item=>item.id !== e.id)
+ }else{
+ expenseList.value = expenseList.value.filter(item=>item.id !== e.id)
+ }
+}
+const nameUserNo = ref(null)
+const dateValue = ref(null)
+const searchTrue = ref(false)
+const searchData = (val) => {
+ searchTrue.value = val
+ if(!nameUserNo.value&&!dateValue.value){
+ searchList.value = expenseList.value;
+ return
+ }
+ //搜索 数组expenseList.value 参数名字或者工号:nameUserNo.value 日期:dateValue.value
+ const filteredList = expenseList.value.filter(item => {
+ const isNameMatch = (item.name + item.userNo).includes(nameUserNo.value);
+ const teachingDateTimestamp = new Date(item.teachingDate).getTime();
+ const startDateTimestamp = new Date(dateValue.value[0]).getTime();
+ const endDateTimestamp = new Date(dateValue.value[1]).getTime();
+ const isDateInRange = teachingDateTimestamp >= startDateTimestamp && teachingDateTimestamp <= endDateTimestamp;
+ return isNameMatch || isDateInRange;
+ });
+ searchList.value = filteredList;
+}
+const resetData = () => {
+ nameUserNo.value = null
+ dateValue.value = null
+ searchData(false)
+}
const emit = defineEmits({})
const columns = [
{
@@ -173,8 +218,8 @@ const columns = [
},
{
title: '讲师工号',
- dataIndex: 'name',
- key: 'name',
+ dataIndex: 'userNo',
+ key: 'userNo',
align: 'center',
},
{
@@ -192,76 +237,92 @@ const columns = [
},
{
title: '讲师等级',
- dataIndex: 'name',
- key: 'name',
+ dataIndex: 'tlevelName',
+ key: 'tlevelName',
align: 'center',
},
{
title: '发薪地',
- dataIndex: 'name',
- key: 'name',
+ dataIndex: 'payrollPlace',
+ key: 'payrollPlace',
align: 'center',
},
{
title: '课程类型',
- dataIndex: 'name',
- key: 'name',
+ dataIndex: 'courseType',
+ key: 'courseType',
align: 'center',
+ customRender: ({ text,record })=>{
+ switch (text) {
+ case 0:
+ return "在线"
+ case 1:
+ return "面授"
+ case 2:
+ return "授课"
+ case 3:
+ return "课程开发"
+ case 4:
+ return "作业员如模培训"
+ default:
+ return "-"
+ }
+ }
},
{
title: '课程名称',
- dataIndex: 'name',
- key: 'name',
+ dataIndex: 'courseName',
+ key: 'courseName',
align: 'center',
},
{
title: '授课/开发课程日期',
- dataIndex: 'name',
- key: 'name',
+ dataIndex: 'teachingDate',
+ key: 'teachingDate',
align: 'center',
},
{
title: '授课/开发课程时长',
- dataIndex: 'name',
- key: 'name',
+ dataIndex: 'teachingTime',
+ key: 'teachingTime',
align: 'center',
},
{
title: '参训人数',
- dataIndex: 'name',
- key: 'name',
+ dataIndex: 'studys',
+ key: 'studys',
align: 'center',
},
{
title: '评分',
- dataIndex: 'name',
- key: 'name',
+ dataIndex: 'score',
+ key: 'score',
align: 'center',
},
{
title: '课酬基准',
- dataIndex: 'name',
- key: 'name',
+ dataIndex: 'levelPay',
+ key: 'levelPay',
align: 'center',
},
{
title: '计划费用',
- dataIndex: 'name',
- key: 'name',
+ dataIndex: 'expense',
+ key: 'expense',
align: 'center',
},
{
title: '应发费用',
- dataIndex: 'name',
- key: 'name',
+ dataIndex: 'payableExpense',
+ key: 'payableExpense',
align: 'center',
},
{
title: '操作',
align: 'center',
fixed: 'right',
- scopedSlots: { customRender: "action" },
+ slots: { customRender: "action" },
},
]
const closeDrawer = () => emit("update:visible", false);
@@ -269,7 +330,12 @@ const qureyDrawer = () => {
dialog({
content: '是否确认讲师费信息无误?提交后按“培训发生组织”汇总至审批中心,等待验证后“提交”进入审批流程。',
ok: () => {
- closeDrawer()
+ const ids = expenseList.value.map(item=>item.id)
+ api.teacherExpenseConfirm(ids).then(res=>{
+ console.log(res,'resssss')
+ message.success('提交成功')
+ closeDrawer()
+ })
}
})
}
@@ -460,6 +526,7 @@ const config = () => {
}
}
.box{
+ padding-bottom: 80px;
.top{
display: flex;
align-items: center;
@@ -483,7 +550,7 @@ const config = () => {
justify-content: end;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
background-color: #fff;
-
+ z-index: 9;
.btn2 {
width: 100px;
height: 40px;
diff --git a/src/components/project/SearchTeacher.vue b/src/components/project/SearchTeacher.vue
index c1cb26b6..c17a0831 100644
--- a/src/components/project/SearchTeacher.vue
+++ b/src/components/project/SearchTeacher.vue
@@ -169,7 +169,7 @@ const searchMember = (keyword) => {
level: item.realName+'('+item.userNo+')'+item.sLevelName,
key: item.id,
orgName: item.orgName,
- orgId: item.kid,
+ orgId: item.departId,
tSystemName:item.tSystemName,
sLevelName:item.sLevelName
}
@@ -237,7 +237,7 @@ function stuStuOrgSelect(e, {selected: bool, selectedNodes, node, event}) {
if(selectedNodes[0].isLeaf){
teacherName.value = selectedNodes[0].name
orgName.value = selectedNodes[0].orgName
- orgId.value = selectedNodes[0].kid
+ orgId.value = selectedNodes[0].departId
// systemName.value = selectedNodes[0].systemName
levelName.value = selectedNodes[0].levelName
teacherId.value = selectedNodes[0].id
diff --git a/src/views/lecturer/LecturerFee.vue b/src/views/lecturer/LecturerFee.vue
index 0f8fb4c4..bc98722c 100644
--- a/src/views/lecturer/LecturerFee.vue
+++ b/src/views/lecturer/LecturerFee.vue
@@ -232,7 +232,7 @@
-
+
@@ -241,13 +241,13 @@
-
-
+
- {{
- (formParam.defaultTeachingTime / 60).toFixed(2) }}小时
- 0.00小时
+ {{
+ (formParam.teachingTime / 60).toFixed(2) }}小时
+ 0.00小时
@@ -467,7 +467,7 @@
teachingDate:null,
formParam: {
teachingDate:null ,
- defaultTeachingTime:null,
+ teachingTime:null,
name: null,
userNo: null
},
@@ -499,6 +499,7 @@
},
tSystemNames:{
systemName:null,
+ systemId: null,
levelVoList: []
},
})
@@ -878,6 +879,7 @@ console.log( "讲师体系id" +val);
state.formParam.expense = String(state.formParam.expense)
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD").toString() : ""
state.formParam.tSystemName = state.tSystemNames.systemName
+ state.formParam.tSystemId = state.tSystemNames.systemId
const formItemNames = Object.keys(rules);
for(let i=0;i
{
- state.formParam.defaultTeachingTime = state.formParam.defaultTeachingTime.replace(/\D/g, '');
- state.formParam.expense = state.formParam.levelPay*state.formParam.defaultTeachingTime
+ state.formParam.teachingTime = state.formParam.teachingTime.replace(/\D/g, '');
+ state.formParam.expense = state.formParam.levelPay*state.formParam.teachingTime
}
const clearstudysNumber = () => {
state.formParam.studys = state.formParam.studys.replace(/\D/g, '');
@@ -1074,7 +1076,7 @@ console.log( "讲师体系id" +val);
}
const clearlevelPayNumber = () => {
state.formParam.levelPay = state.formParam.levelPay.replace(/\D/g, '');
- state.formParam.expense = state.formParam.levelPay*state.formParam.defaultTeachingTime
+ state.formParam.expense = state.formParam.levelPay*state.formParam.teachingTime
}
const rules = {
name: [{ required: true, message:'',log: '讲师不能为空' }],
@@ -1086,7 +1088,7 @@ console.log( "讲师体系id" +val);
courseType: [{ required: true, message: '',log:'费用类型不能为空' }],
courseName: [{ required: true, message:'',log: '课程名称不能为空' }],
teachingDate: [{ required: true, message:'',log: '授课日期不能为空' }],
- defaultTeachingTime: [{ required: true, message:'',log: ' 授课时长不能为空' }],
+ teachingTime: [{ required: true, message:'',log: ' 授课时长不能为空' }],
studys: [{ required: true, message: '',log:' 参训人数不能为空' }],
score: [{ required: true, message:'',log: ' 评分不能为空' }],
levelPay: [{ required: true, message:'',log: '课酬基准 不能为空' }],
diff --git a/src/views/lecturer/LecturerFeeStatistics.vue b/src/views/lecturer/LecturerFeeStatistics.vue
index 74d761b7..85aa2b4a 100644
--- a/src/views/lecturer/LecturerFeeStatistics.vue
+++ b/src/views/lecturer/LecturerFeeStatistics.vue
@@ -183,7 +183,8 @@ import { useRouter } from "vue-router";
import { getOrganization } from "../../api/Teaching";
import { queryTeacherFeeMonthly, getTeacherFeeDetailListByTeacherNo, getTeacherFeeListByTeacherNo} from "../../api/lecturerFeeStatistics"
;
-import {getTeacherFeeList,getTrainOrg} from "../../api/lecturerFeeManagement";
+import {expenseSummaryList,getTrainOrg,CreateMonthSummary} from "../../api/lecturerFeeManagement";
+import dialog from '@/utils/dialog'
export default {
name: "LecturerFeeStatistics",
components: {
@@ -306,7 +307,7 @@ export default {
let objA = { ...state.searchParam };
objA.searchdate=state.searchdate!==null? state.searchdate: "",
console.log(objA)
- getTeacherFeeList(objA)
+ expenseSummaryList(objA)
.then((res) => {
tableData.value = res.data.data.records
state.tableDataTotal = Number(res.data.data.total);
@@ -316,23 +317,14 @@ export default {
getTableDate()
//重新汇总上月数据
const searchResetPrevious=()=>{
- state.tableLoading = true
- const now = new Date();
- const year = now.getFullYear();
- const month = now.getMonth();
-
- const lastMonthStart = new Date(year, month - 1, 1); // 上个月的月初
- const lastMonthEnd = new Date(year, month, 1); // 上个月的月末
- let obj = {
- beginTime:'',
- endTime:'',
- }
- obj.beginTime = lastMonthStart.toISOString().split('T')[0];
- obj.endTime = lastMonthEnd.toISOString().split('T')[0];
- getTeacherFeeList(obj).then((res)=>{
- tableData.value = res.data.data.records
- state.tableDataTotal = Number(res.data.data.total);
- state.tableLoading = false
+ dialog({
+ content: '正在重新汇总上月数据,请稍后手动刷新列表...',
+ ok: () => {
+ CreateMonthSummary().then(res=>{
+ console.log(res,'ersssss')
+ getTableDate();
+ })
+ }
})
}
//重置
@@ -431,7 +423,7 @@ export default {
}
//表格内查看数据操作
const handleLook = (record) => {
- let id = record.summaryDate
+ let id = record.id
router.push({ path: '/MonthlyStatistics', query: { id } })
// state.teacherdialog = true;
// state.teacherdialogtitle = '讲师费月度统计详情'
diff --git a/src/views/lecturer/MonthlyStatistics.vue b/src/views/lecturer/MonthlyStatistics.vue
index 8fb579c3..f2ed2a68 100644
--- a/src/views/lecturer/MonthlyStatistics.vue
+++ b/src/views/lecturer/MonthlyStatistics.vue
@@ -125,7 +125,7 @@