mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 19:36:46 +08:00
Merge branch 'zcwy-teacher-manage' into master_1202
This commit is contained in:
@@ -22,9 +22,9 @@
|
||||
<div class="item">
|
||||
<a-input @pressEnter="searchData(true)" style="border-radius: 8px;width:240px;height: 40px;" v-model:value="nameUserNo" placeholder="请输入工号/讲师名称进行搜索" allowClear />
|
||||
</div>
|
||||
<!-- <div class="item">
|
||||
<div class="item">
|
||||
<a-range-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD" style="border-radius: 8px;width:360px;height: 40px;" v-model:value="dateValue" />
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="item">
|
||||
<a-button type="primary" @click="searchData(true)" style="margin-right:20px;border-radius:8px;width: 100px;height: 40px;">搜索</a-button>
|
||||
<a-button type="primary" @click="resetData()" style="border-radius:8px;width: 100px;height: 40px;">重置</a-button>
|
||||
@@ -34,9 +34,9 @@
|
||||
<a-table
|
||||
ref="drawerContent"
|
||||
:columns="columns"
|
||||
:data-source="tableData"
|
||||
:data-source="searchTrue?timesList:tableData"
|
||||
:pagination="false"
|
||||
:scroll="{ x: 'max-content',y:tableData.length? pageHeight : null }"
|
||||
:scroll="{ x: 'max-content',y:searchTrue?timesList.length?pageHeight : null:tableData.length?pageHeight : null, }"
|
||||
row-key="id"
|
||||
:loading="loading"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
@@ -44,8 +44,8 @@
|
||||
>
|
||||
<template #action="{ record }">
|
||||
<div class="action">
|
||||
<div style="color: #1890ff;cursor: pointer;" class="btn" v-if="selectedRowKeys.includes(record.id)" @click="removeList(record)">取消选择</div>
|
||||
<div style="color: #1890ff;cursor: pointer;" class="btn" v-else @click="addList(record)">选择</div>
|
||||
<div style="color: #1890ff;cursor: pointer;" class="btn" v-if="selectedRowKeys.includes(record.id)" @click.stop="removeList(record)">取消选择</div>
|
||||
<div style="color: #1890ff;cursor: pointer;" class="btn" v-else @click.stop="addList(record)">选择</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-table>
|
||||
@@ -79,6 +79,15 @@ const customRow = (record) => {
|
||||
style:{
|
||||
backgroundColor: searchTrue.value && searchList.value.some(item => item.id === record.id) ? '#a6dff9' : '',
|
||||
},
|
||||
onClick() {
|
||||
if(selectedRowKeys.value.some(item => item === record.id)){
|
||||
selectedRowKeys.value = selectedRowKeys.value.filter(item => item !== record.id)
|
||||
selectsData.value = selectsData.value.filter(item => item.id !== record.id)
|
||||
}else{
|
||||
selectedRowKeys.value.push(record.id)
|
||||
selectsData.value.push(record)
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
const pageHeight = computed(() => {
|
||||
@@ -87,6 +96,7 @@ const pageHeight = computed(() => {
|
||||
watch(()=>props.visible,(val)=>{
|
||||
if(val){
|
||||
loading.value = true
|
||||
tableData.value = []
|
||||
api.getListByStatus().then(res=>{
|
||||
if(res.data.code == 200 ){
|
||||
tableData.value = res.data.data
|
||||
@@ -96,7 +106,6 @@ watch(()=>props.visible,(val)=>{
|
||||
loading.value = false
|
||||
}).catch(err=>{
|
||||
loading.value = false
|
||||
tableData.value = []
|
||||
message.error(err.data.msg)
|
||||
})
|
||||
}else{
|
||||
@@ -110,39 +119,70 @@ const nameUserNo = ref(null)
|
||||
const dateValue = ref(null)
|
||||
const searchTrue = ref(false)
|
||||
const searchList = ref([])
|
||||
const timesList = ref([])
|
||||
const resetData = () => {
|
||||
nameUserNo.value = null
|
||||
dateValue.value = null
|
||||
searchData(false)
|
||||
}
|
||||
let timeout = null
|
||||
const searchData = (val) => {
|
||||
// drawerContent.value.scrollTo({top:200,behavior: 'smooth'})
|
||||
searchTrue.value = val
|
||||
loading.value = true
|
||||
if(timeout) {
|
||||
clearTimeout(timeout);
|
||||
}
|
||||
timeout = setTimeout(() => {
|
||||
loading.value = false
|
||||
if(!nameUserNo.value&&!dateValue.value){
|
||||
searchList.value = [];
|
||||
timesList.value = tableData.value
|
||||
return
|
||||
}
|
||||
//搜索 数组expenseList.value 参数名字或者工号:nameUserNo.value 日期:dateValue.value
|
||||
const filteredList = tableData.value.filter(item => {
|
||||
const isNameMatch = (item.name + item.userNo).includes(nameUserNo.value);
|
||||
// const filteredList = tableData.value.filter(item => {
|
||||
// const isNameMatch = (item.name + item.userNo).includes(nameUserNo.value);
|
||||
// const teachingDateTimestamp = new Date(item.teachingDate).getTime();
|
||||
// if(dateValue.value==null){
|
||||
// return isNameMatch
|
||||
// }
|
||||
// const startDateTimestamp = new Date(dateValue.value[0]).getTime();
|
||||
// const endDateTimestamp = new Date(dateValue.value[1]).getTime();
|
||||
// const isDateInRange = teachingDateTimestamp >= startDateTimestamp && teachingDateTimestamp <= endDateTimestamp;
|
||||
// if(nameUserNo.value&&startDateTimestamp&&endDateTimestamp){
|
||||
// return isNameMatch && isDateInRange;
|
||||
// }
|
||||
// return isNameMatch || isDateInRange;
|
||||
// });
|
||||
const timesLists = tableData.value.filter(item => {
|
||||
const teachingDateTimestamp = new Date(item.teachingDate).getTime();
|
||||
if(dateValue.value==null){
|
||||
return isNameMatch
|
||||
return tableData.value
|
||||
}
|
||||
const startDateTimestamp = new Date(dateValue.value[0]).getTime();
|
||||
const endDateTimestamp = new Date(dateValue.value[1]).getTime();
|
||||
const isDateInRange = teachingDateTimestamp >= startDateTimestamp && teachingDateTimestamp <= endDateTimestamp;
|
||||
if(nameUserNo.value&&startDateTimestamp&&endDateTimestamp){
|
||||
return isNameMatch && isDateInRange;
|
||||
}
|
||||
return isNameMatch || isDateInRange;
|
||||
return isDateInRange;
|
||||
});
|
||||
selectedRowKeys.value = selectedRowKeys.value.filter(id =>
|
||||
timesLists.some(item => item.id === id)
|
||||
);
|
||||
selectsData.value = selectsData.value.filter(item =>
|
||||
timesLists.some(item2 => item2.id === item.id)
|
||||
);
|
||||
const filteredList = timesLists.filter(item => {
|
||||
const isNameMatch = (item.name + item.userNo).includes(nameUserNo.value);
|
||||
return isNameMatch
|
||||
});
|
||||
searchList.value = filteredList;
|
||||
timesList.value = timesLists
|
||||
let scrollHeight = null
|
||||
filteredList.length && (scrollHeight = tableData.value.findIndex(item => item.id === filteredList[0].id))
|
||||
filteredList.length && (scrollHeight = timesLists.findIndex(item => item.id === filteredList[0].id))
|
||||
if(scrollHeight||scrollHeight==0){
|
||||
drawerContent.value?.$el.querySelector('.ant-table-body')?.scrollTo({top:scrollHeight*55,behavior: 'smooth'})
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
const loading = ref(false)
|
||||
const selectedRowKeys = ref([])
|
||||
@@ -155,6 +195,7 @@ const emit = defineEmits(['selectedRowKeys','update:visible'])
|
||||
const addList = (item) => {
|
||||
selectedRowKeys.value.push(item.id)
|
||||
selectsData.value.push(item)
|
||||
console.log(selectedRowKeys.value)
|
||||
}
|
||||
const expense = ref(0)
|
||||
watch(()=>selectsData.value.length,(val)=>{
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="org" :title="item?.trainOrgName">{{item?.trainOrgName||'-'}}</div>
|
||||
<div class="text org" :title="item?.summaryTotal">{{item?.summaryTotal?item?.summaryTotal+'元':'-'}}</div>
|
||||
<div class="text org" :title="Number(item?.summaryTotal).toFixed(2)">{{item?.summaryTotal?Number(item?.summaryTotal).toFixed(2)+'元':'-'}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -34,9 +34,9 @@
|
||||
<div class="item">
|
||||
<a-input @pressEnter="searchData(true)" style="border-radius: 8px;width:240px;height: 40px;" v-model:value="nameUserNo" placeholder="请输入工号/讲师名称进行搜索" allowClear />
|
||||
</div>
|
||||
<!-- <div class="item">
|
||||
<div class="item">
|
||||
<a-range-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD" style="border-radius: 8px;width:360px;height: 40px;" v-model:value="dateValue" />
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="item">
|
||||
<a-button type="primary" @click="searchData(true)" style="margin-right:20px;border-radius:8px;width: 100px;height: 40px;">搜索</a-button>
|
||||
<a-button type="primary" @click="resetData()" style="border-radius:8px;width: 100px;height: 40px;">重置</a-button>
|
||||
@@ -46,7 +46,7 @@
|
||||
<a-table
|
||||
ref="drawerContent"
|
||||
:columns="columns"
|
||||
:data-source="expenseList"
|
||||
:data-source="searchTrue?timesList:expenseList"
|
||||
:pagination="false"
|
||||
:scroll="{ x: 'max-content',y:expenseList.length? pageHeight : null }"
|
||||
:loading="loadingData"
|
||||
@@ -141,9 +141,17 @@ const handleConfirm = () => {
|
||||
// numTime.value+=1
|
||||
// localStorage.setItem('numTime',numTime.value)
|
||||
const ids = forData.value.flatMap(item => item.expenseList.map(item => item.id));
|
||||
// let ids = []
|
||||
// if(searchTrue.value){
|
||||
// ids = timesList.value.map(item=>item.id)
|
||||
// }else{
|
||||
// ids = expenseList.value.map(item=>item.id)
|
||||
// }
|
||||
if(!ids.length){
|
||||
return message.error('暂无可提交的数据')
|
||||
}
|
||||
modalVisible.value = false;
|
||||
emit('example',true)
|
||||
api.teacherExpenseConfirm({ids:ids?.join(',')}).then(res=>{
|
||||
console.log(res,'resssss')
|
||||
api.submitApproval({ids:res.data?.data?.join(',')}).then(res=>{
|
||||
@@ -152,12 +160,14 @@ const handleConfirm = () => {
|
||||
close()
|
||||
closeDrawer()
|
||||
emit('visibleFalse',false)
|
||||
emit('example',false)
|
||||
}).catch(err=>{
|
||||
message.destroy()
|
||||
message.error(err.data.msg)
|
||||
close()
|
||||
closeDrawer()
|
||||
emit('visibleFalse',false)
|
||||
emit('example',false)
|
||||
})
|
||||
}).catch(err=>{
|
||||
message.destroy()
|
||||
@@ -171,6 +181,7 @@ const forData = ref()
|
||||
const indexList = ref(0)
|
||||
const expenseList = ref([])
|
||||
const searchList = ref([])
|
||||
const timesList = ref([])
|
||||
const clickItem = (item,i) => {
|
||||
expenseList.value = item.expenseList
|
||||
indexList.value = i
|
||||
@@ -182,6 +193,8 @@ const pageHeight = computed(() => {
|
||||
watch(()=>props.visible,(val)=>{
|
||||
if(val){
|
||||
loadingData.value = true
|
||||
forData.value = []
|
||||
expenseList.value = []
|
||||
// numTime.value = Number(localStorage.getItem('numTime')||0)
|
||||
api.getListByAffiliation(
|
||||
{
|
||||
@@ -200,8 +213,6 @@ watch(()=>props.visible,(val)=>{
|
||||
}).catch(()=>{
|
||||
message.error('获取数据失败,请重新尝试')
|
||||
loadingData.value = false
|
||||
forData.value = []
|
||||
expenseList.value = []
|
||||
})
|
||||
}else{
|
||||
nameUserNo.value = null
|
||||
@@ -222,7 +233,8 @@ const removeId = (e,i) =>{
|
||||
})
|
||||
})
|
||||
if(searchTrue.value){
|
||||
searchList.value = searchList.value.filter(item=>item.id !== e.id)
|
||||
// searchList.value = searchList.value.filter(item=>item.id !== e.id)
|
||||
timesList.value = timesList.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)
|
||||
@@ -246,33 +258,59 @@ const customRow = (record) => {
|
||||
}
|
||||
};
|
||||
};
|
||||
let timeout = null
|
||||
const searchData = (val) => {
|
||||
searchTrue.value = val
|
||||
loadingData.value = true
|
||||
if (timeout) {
|
||||
clearTimeout(timeout);
|
||||
}
|
||||
timeout = setTimeout(() => {
|
||||
loadingData.value = false;
|
||||
if(!nameUserNo.value&&!dateValue.value){
|
||||
searchList.value = [];
|
||||
timesList.value = expenseList.value
|
||||
forData.value[indexList.value].summaryTotal = expenseList.value.reduce((sum, item) => sum + (Number(item.expense) || 0), 0);
|
||||
return
|
||||
}
|
||||
//搜索 数组expenseList.value 参数名字或者工号:nameUserNo.value 日期:dateValue.value
|
||||
const filteredList = expenseList.value.filter(item => {
|
||||
const isNameMatch = (item.name + item.userNo).includes(nameUserNo.value);
|
||||
// const filteredList = expenseList.value.filter(item => {
|
||||
// const isNameMatch = (item.name + item.userNo).includes(nameUserNo.value);
|
||||
// const teachingDateTimestamp = new Date(item.teachingDate).getTime();
|
||||
// if(dateValue.value==null){
|
||||
// return isNameMatch
|
||||
// }
|
||||
// const startDateTimestamp = new Date(dateValue.value[0]).getTime();
|
||||
// const endDateTimestamp = new Date(dateValue.value[1]).getTime();
|
||||
// const isDateInRange = teachingDateTimestamp >= startDateTimestamp && teachingDateTimestamp <= endDateTimestamp;
|
||||
// if(nameUserNo.value&&startDateTimestamp&&endDateTimestamp){
|
||||
// return isNameMatch && isDateInRange;
|
||||
// }
|
||||
// return isNameMatch || isDateInRange;
|
||||
// });
|
||||
const timesLists = expenseList.value.filter(item => {
|
||||
const teachingDateTimestamp = new Date(item.teachingDate).getTime();
|
||||
if(dateValue.value==null){
|
||||
return isNameMatch
|
||||
return expenseList.value
|
||||
}
|
||||
const startDateTimestamp = new Date(dateValue.value[0]).getTime();
|
||||
const endDateTimestamp = new Date(dateValue.value[1]).getTime();
|
||||
const isDateInRange = teachingDateTimestamp >= startDateTimestamp && teachingDateTimestamp <= endDateTimestamp;
|
||||
if(nameUserNo.value&&startDateTimestamp&&endDateTimestamp){
|
||||
return isNameMatch && isDateInRange;
|
||||
}
|
||||
return isNameMatch || isDateInRange;
|
||||
return isDateInRange;
|
||||
});
|
||||
const filteredList = timesLists.filter(item => {
|
||||
const isNameMatch = (item.name + item.userNo).includes(nameUserNo.value);
|
||||
return isNameMatch
|
||||
});
|
||||
searchList.value = filteredList;
|
||||
timesList.value = timesLists
|
||||
forData.value[indexList.value].summaryTotal = timesLists.reduce((sum, item) => sum + (Number(item.expense) || 0), 0);
|
||||
let scrollHeight = null
|
||||
filteredList.length && (scrollHeight = expenseList.value.findIndex(item => item.id === filteredList[0].id))
|
||||
filteredList.length && (scrollHeight = timesLists.findIndex(item => item.id === filteredList[0].id))
|
||||
if(scrollHeight||scrollHeight==0){
|
||||
drawerContent.value?.$el.querySelector('.ant-table-body')?.scrollTo({top:scrollHeight*55,behavior: 'smooth'})
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
const resetData = () => {
|
||||
nameUserNo.value = null
|
||||
@@ -446,21 +484,31 @@ const columns = [
|
||||
const closeDrawer = () => emit("update:visible", false);
|
||||
const qureyDrawer = () => {
|
||||
const ids = forData.value.flatMap(item => item.expenseList.map(item => item.id));
|
||||
// let ids = []
|
||||
// if(searchTrue.value){
|
||||
// ids = timesList.value.map(item=>item.id)
|
||||
// }else{
|
||||
// ids = expenseList.value.map(item=>item.id)
|
||||
// }
|
||||
if(!ids.length){
|
||||
return message.error('暂无可提交的数据')
|
||||
}
|
||||
console.log(ids,'idssssss')
|
||||
dialog({
|
||||
content: '是否确认讲师费信息无误?提交后按“培训发生组织”汇总至审批中心,等待验证后“提交”进入审批流程。',
|
||||
ok: () => {
|
||||
emit('example',true)
|
||||
api.teacherExpenseConfirm({ids:ids?.join(',')}).then(res=>{
|
||||
console.log(res,'resssss')
|
||||
message.success('提交成功')
|
||||
closeDrawer()
|
||||
emit('example',false)
|
||||
emit('visibleFalse',false)
|
||||
}).catch(err=>{
|
||||
message.destroy()
|
||||
message.error(err.data.msg)
|
||||
closeDrawer()
|
||||
emit('example',false)
|
||||
emit('visibleFalse',false)
|
||||
})
|
||||
}
|
||||
@@ -471,6 +519,15 @@ const config = () => {
|
||||
message.error('暂无可提交的数据')
|
||||
return
|
||||
}
|
||||
// let ids = []
|
||||
// if(searchTrue.value){
|
||||
// ids = timesList.value.map(item=>item.id)
|
||||
// }else{
|
||||
// ids = expenseList.value.map(item=>item.id)
|
||||
// }
|
||||
// if(!ids.length){
|
||||
// return message.error('暂无可提交的数据')
|
||||
// }
|
||||
modalVisible.value = true;
|
||||
}
|
||||
</script>
|
||||
@@ -662,7 +719,7 @@ const config = () => {
|
||||
.right{
|
||||
color: #646C9A;
|
||||
.org{
|
||||
max-width: 148px;
|
||||
max-width: 136px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
@@ -686,11 +743,13 @@ const config = () => {
|
||||
padding-bottom: 80px;
|
||||
.top{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
// margin-bottom: 20px;
|
||||
margin-top: 10px;
|
||||
.item{
|
||||
margin-right: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
.table{
|
||||
|
||||
@@ -753,6 +753,7 @@ export default {
|
||||
getTeacherById({id:state.id}).then((res) => {
|
||||
console.log("外部讲师详情", res.data);
|
||||
state.formParam = res.data.data
|
||||
state.formParam.defaultTeachingTime = state.formParam.defaultTeachingTime == null ? 0 : state.formParam.defaultTeachingTime
|
||||
state.formParam.description = state.formParam.description == null ? '<p><br></p>' : state.formParam.description
|
||||
state.formParam.photo = state.formParam.photo == null ? null : state.formParam.photo.includes('upload') ? res.data.data.photo : '/upload'+res.data.data.photo
|
||||
})
|
||||
|
||||
@@ -81,9 +81,9 @@
|
||||
</a-form>
|
||||
<div style="width: 100%;"></div>
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<a-button @click="addTeacher()" type="primary" class="langbtn">
|
||||
<!-- <a-button @click="addTeacher()" type="primary" class="langbtn">
|
||||
<div class="search"></div> 添加授课记录
|
||||
</a-button>
|
||||
</a-button> -->
|
||||
<!-- <div style="margin-left: 20px ;">
|
||||
<a-button @click="addTeacher()" class="langbtn">
|
||||
<UploadOutlined /> 一键生成讲师费
|
||||
|
||||
@@ -65,9 +65,9 @@
|
||||
<div class="search"></div> 新增讲师
|
||||
</a-button>
|
||||
<div>
|
||||
<a-button @click="handleExport()" class="resetbtn">
|
||||
<!-- <a-button @click="handleExport()" class="resetbtn">
|
||||
<UploadOutlined /> 导出
|
||||
</a-button>
|
||||
</a-button> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
@@ -1294,6 +1294,7 @@ export default {
|
||||
// objA.neworgName= objA.neworgName[objA.neworgName.length-1]
|
||||
// }
|
||||
state.formParam = res.data.data
|
||||
state.formParam.defaultTeachingTime = state.formParam.defaultTeachingTime == null ? 0 : state.formParam.defaultTeachingTime
|
||||
state.formParam.description = state.formParam.description == null ? '<p><br></p>' : state.formParam.description
|
||||
state.formParam.workExperience = state.formParam.workExperience == null ? '<p><br></p>' : state.formParam.workExperience
|
||||
state.formParam.courses = state.formParam.courses == null ? '<p><br></p>' : state.formParam.courses
|
||||
|
||||
@@ -94,13 +94,13 @@
|
||||
</a-form>
|
||||
<div style="width: 100%;"></div>
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<a-button @click="addTeacher()" type="primary" class="langbtn">
|
||||
<!-- <a-button @click="addTeacher()" type="primary" class="langbtn">
|
||||
<div class="search"></div> 添加授课记录
|
||||
</a-button>
|
||||
</a-button> -->
|
||||
<!-- <a-upload multiple :headers="headers" :show-upload-list="false" :before-upload="beforeUpload2"> -->
|
||||
<a-button class="resetbtn" @click="handleImport()">
|
||||
<!-- <a-button class="resetbtn" @click="handleImport()">
|
||||
<DownloadOutlined /> 导入
|
||||
</a-button>
|
||||
</a-button> -->
|
||||
<!-- </a-upload> -->
|
||||
<a-button @click="handleExport()" class="resetbtn">
|
||||
<UploadOutlined /> 导出
|
||||
@@ -291,7 +291,7 @@
|
||||
/>
|
||||
授课/课程日期 :
|
||||
</template>
|
||||
<a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" format="YYYY-MM-DD HH:mm"
|
||||
<a-date-picker :locale="locale" class="draitem" v-model:value="teachingDate" style="width:100%" format="YYYY-MM-DD HH:mm"
|
||||
:show-time="{ format: 'HH:mm' }" type="datetime" placeholder="请选择课程日期" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -502,6 +502,8 @@ import {
|
||||
DownloadOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import dayjs from "dayjs";
|
||||
import locale from 'ant-design-vue/es/date-picker/locale/zh_CN';
|
||||
import 'dayjs/locale/zh-cn';
|
||||
// import Editor from "@/components/project/Editor";
|
||||
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||
import { message } from "ant-design-vue";
|
||||
@@ -1521,7 +1523,8 @@ export default {
|
||||
// searchTimeChange,
|
||||
cancelTeachingDialog,
|
||||
// editTimeChange,
|
||||
scoreChange
|
||||
scoreChange,
|
||||
locale
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<template>
|
||||
<a-drawer class="largeDrawerInside" :visible="visible" placement="right" :closable="false" :maskClosable="false"
|
||||
width="60%" :title="false">
|
||||
width="60%" :title="false">
|
||||
<div v-if="mask" style="width:100%;height:100%;background:rgba(0, 0, 0, 0.45);position: fixed;
|
||||
z-index: 999;"></div>
|
||||
<div class="appedit">
|
||||
<div class="header" style="margin-top: -24px;">
|
||||
<div class="headerTitle">汇总讲师费</div>
|
||||
@@ -457,6 +459,7 @@ export default {
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const state = reactive({
|
||||
mask: false,
|
||||
orgList: [],
|
||||
params: {
|
||||
pageNo: 1,
|
||||
@@ -517,6 +520,7 @@ export default {
|
||||
})
|
||||
const getTableList = () => {
|
||||
state.loading = true
|
||||
state.mask = true
|
||||
queryExpnseByBillId({
|
||||
billId: props.id,
|
||||
pageNo: state.params.pageNo,
|
||||
@@ -528,6 +532,11 @@ export default {
|
||||
state.dataList = res.data.data.records
|
||||
state.params.total = Number(res.data.data.total);
|
||||
state.loading = false
|
||||
state.mask = false
|
||||
}).catch(err=>{
|
||||
state.loading = false
|
||||
state.mask = false
|
||||
message.error(err.data?.msg)
|
||||
})
|
||||
}
|
||||
const dateChange = (e) => {
|
||||
@@ -576,6 +585,7 @@ export default {
|
||||
state.formData = res.data.data
|
||||
})
|
||||
search();
|
||||
emits.emit('successParams',true)
|
||||
}).catch(err=>{
|
||||
message.destroy()
|
||||
message.error(err.data.msg)
|
||||
@@ -769,6 +779,7 @@ export default {
|
||||
dialog({
|
||||
content: '请仔细核对讲师费信息,确认无误后,将自动进入(BPM系统)审批流程',
|
||||
ok: ()=>{
|
||||
emits.emit('example',true)
|
||||
isConfirm({
|
||||
id: props.id,
|
||||
status: 2
|
||||
@@ -778,7 +789,14 @@ export default {
|
||||
emits.emit('successParams',true)
|
||||
closeDrawer();
|
||||
}
|
||||
emits.emit('example',false)
|
||||
}).catch(err=>{
|
||||
emits.emit('example',false)
|
||||
if(err.message=='timeout of 15000ms exceeded'){
|
||||
message.destroy()
|
||||
message.error('请求超时,请重试')
|
||||
return
|
||||
}
|
||||
message.destroy()
|
||||
message.error(err.data.msg)
|
||||
})
|
||||
@@ -837,9 +855,10 @@ export default {
|
||||
}).then(res=>{
|
||||
message.success('移除成功')
|
||||
search()
|
||||
emits.emit('successParams',true)
|
||||
state.formData.summaryTotal = (Number(state.formData.summaryTotal) - Number(record.expense)).toFixed(2)
|
||||
}).catch(err=>{
|
||||
message.error(err.msg)
|
||||
message.error(err.data?.msg)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -227,8 +227,11 @@
|
||||
</a-modal>
|
||||
</div>
|
||||
<!-- <div> <Upload/> </div> -->
|
||||
<LecturerAppEdit @successParams="successParams" v-model:visible="editTeacherDialog" :id="editId" ></LecturerAppEdit>
|
||||
</div>
|
||||
<LecturerAppEdit @example="getExample" @successParams="successParams" v-model:visible="editTeacherDialog" :id="editId" ></LecturerAppEdit>
|
||||
<div class="example" v-if="example">
|
||||
<a-spin />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="jsx">
|
||||
import { reactive, toRefs, ref ,watch,computed,onMounted} from "vue";
|
||||
@@ -277,6 +280,7 @@
|
||||
})
|
||||
const router = useRouter()
|
||||
const state = reactive({
|
||||
example: false,
|
||||
editId: null,
|
||||
editTeacherDialog: false,
|
||||
tableDataExamineLoading: false,
|
||||
@@ -734,6 +738,9 @@
|
||||
const successParams = () => {
|
||||
getTableDate();
|
||||
}
|
||||
const getExample = (val) => {
|
||||
state.example = val
|
||||
}
|
||||
const withdraw = (record) => {
|
||||
console.log(record,'record')
|
||||
dialog({
|
||||
@@ -1097,6 +1104,7 @@
|
||||
tabsChange,
|
||||
withdraw,
|
||||
successParams,
|
||||
getExample,
|
||||
goDdit,
|
||||
cancel,
|
||||
handleOperate,
|
||||
@@ -1118,6 +1126,18 @@
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped >
|
||||
.example{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.45);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999999;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.select .ant-picker {
|
||||
width: 410px !important;
|
||||
}
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
/>
|
||||
授课/课程日期 :
|
||||
</template>
|
||||
<a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" :show-time="{ format: 'HH:mm' }" format="YYYY-MM-DD HH:mm" valueFormat="YYYY-MM-DD HH:mm"
|
||||
<a-date-picker :locale="locale" class="draitem" v-model:value="teachingDate" style="width:100%" :show-time="{ format: 'HH:mm' }" format="YYYY-MM-DD HH:mm" valueFormat="YYYY-MM-DD HH:mm"
|
||||
placeholder="请选择课程日期" @select="handleSelect" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -560,11 +560,14 @@
|
||||
</a-button>
|
||||
</div> -->
|
||||
</div>
|
||||
</a-drawer>
|
||||
<ImportWork v-model:showWork="showWork" :template="'讲师费导入模板-20241220.xlsx'" :url="'/admin/export/importTeacherExpense'" :fileName="uploadFile" :title="title"></ImportWork>
|
||||
</a-drawer>
|
||||
<ImportWork v-model:showWork="showWork" :template="'讲师费导入模板-20241220.xlsx'" :url="'/admin/export/importTeacherExpense'" :fileName="uploadFile" :title="title"></ImportWork>
|
||||
</div>
|
||||
<div class="example" v-if="example">
|
||||
<a-spin />
|
||||
</div>
|
||||
<!-- 一键确认讲师费 -->
|
||||
<ConfirmLecturer @visibleFalse="visibleAll" :ids="selectsIds" v-model:visible="visibleConfirm" :name="'确认讲师费'" />
|
||||
<ConfirmLecturer @example="getexample" @visibleFalse="visibleAll" :ids="selectsIds" v-model:visible="visibleConfirm" :name="'确认讲师费'" />
|
||||
<!-- 批量确认讲师费 -->
|
||||
<BatchLecturer @selectedRowKeys="selectedRowKey" v-model:visible="allFeedialog" :name="'批量审批'" />
|
||||
</template>
|
||||
@@ -572,6 +575,8 @@
|
||||
import { reactive, toRefs, ref ,watch,onMounted} from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import dayjs from "dayjs";
|
||||
import locale from 'ant-design-vue/es/date-picker/locale/zh_CN';
|
||||
import 'dayjs/locale/zh-cn';
|
||||
import {
|
||||
DownOutlined,
|
||||
UpOutlined,
|
||||
@@ -608,6 +613,7 @@
|
||||
setup() {
|
||||
const formRef = ref();
|
||||
const state = reactive({
|
||||
example: false,
|
||||
tableDataSee: [],
|
||||
SeeLoading: false,
|
||||
orgList: [],
|
||||
@@ -1542,6 +1548,9 @@ getAllLevelList().then((res) => {
|
||||
state.allFeedialog = val
|
||||
searchSubmit()
|
||||
}
|
||||
const getexample = (val) => {
|
||||
state.example = val
|
||||
}
|
||||
const selectedRowKey = (val) => {
|
||||
state.selectsIds = val?.join(',');
|
||||
state.visibleConfirm = true;
|
||||
@@ -1855,6 +1864,7 @@ const column = ref([
|
||||
allFee,
|
||||
selectedRowKey,
|
||||
visibleAll,
|
||||
getexample,
|
||||
column,
|
||||
tableDatas,
|
||||
tlevelChange,
|
||||
@@ -1866,6 +1876,7 @@ const column = ref([
|
||||
scoreNumber,
|
||||
clearPayableExpense,
|
||||
payExpense,
|
||||
locale,
|
||||
}
|
||||
},
|
||||
};
|
||||
@@ -1874,6 +1885,18 @@ const column = ref([
|
||||
.select .ant-picker {
|
||||
width: 410px !important;
|
||||
}
|
||||
.example{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.45);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999999;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.headers {
|
||||
height: 57px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
v-on:keydown.enter="enterPressHadlerSearch"/>
|
||||
</a-form-item>
|
||||
<a-form-item class="select " >
|
||||
<a-date-picker picker="month" style="width: 235px; height: 40px; border-radius: 8px" v-model:value="searchdate"
|
||||
<a-date-picker :locale="locale" picker="month" style="width: 235px; height: 40px; border-radius: 8px" v-model:value="searchdate"
|
||||
:placeholder="[ '请选择汇总周期']" @change="searchTimeChange" format="YYYY-MM" valueFormat="YYYY-MM"
|
||||
v-on:keydown.enter="enterPressHadlerSearch" />
|
||||
</a-form-item >
|
||||
@@ -171,6 +171,8 @@
|
||||
<MonthlyStatistics v-model:visible="opendrawer" :id="drawerId" ></MonthlyStatistics>
|
||||
</template>
|
||||
<script lang="jsx">
|
||||
import locale from 'ant-design-vue/es/date-picker/locale/zh_CN';
|
||||
import 'dayjs/locale/zh-cn';
|
||||
import { reactive, toRefs, ref, watch,onMounted } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import dayjs from "dayjs";
|
||||
@@ -247,14 +249,14 @@ export default {
|
||||
watch(
|
||||
)
|
||||
const columns = ref([
|
||||
{
|
||||
title: '编号 ',
|
||||
dataIndex: 'trainOrgId',
|
||||
key: 'trainOrgId',
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
width:'100px',
|
||||
},
|
||||
// {
|
||||
// title: '编号 ',
|
||||
// dataIndex: 'trainOrgId',
|
||||
// key: 'trainOrgId',
|
||||
// ellipsis: true,
|
||||
// align: "center",
|
||||
// width:'100px',
|
||||
// },
|
||||
{
|
||||
title: '培训发生组织 ',
|
||||
dataIndex: 'trainOrgName',
|
||||
@@ -823,7 +825,7 @@ export default {
|
||||
columnstableDetailList,
|
||||
columnstableFeeList,
|
||||
searchResetPrevious,
|
||||
|
||||
locale,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -90,6 +90,9 @@
|
||||
</a-modal>
|
||||
</div>
|
||||
<!-- 抽屉 -->
|
||||
<div class="example" v-if="example">
|
||||
<a-spin />
|
||||
</div>
|
||||
<a-drawer class="largeDrawerInside" v-model:visible="teacherdialog" :closable="false" :title="false" placement="right" width="60%" :maskClosable="false" >
|
||||
<div style="padding:24px;">
|
||||
<div class="headers" style="margin-top: -24px">
|
||||
@@ -318,6 +321,7 @@ export default{
|
||||
setup() {
|
||||
const formRef = ref();
|
||||
const state = reactive({
|
||||
example: false,
|
||||
editParams: true,
|
||||
editIndex: 0,
|
||||
tableDataTotal: 0,
|
||||
@@ -816,6 +820,7 @@ const getTableDate = (obj) => {
|
||||
dialog({
|
||||
content: val?'是否确认提交,一旦提交将进入(BPM系统)审核流程。':'是否确认保存?',
|
||||
ok: () => {
|
||||
state.example = true;
|
||||
if (state.vf == false) {
|
||||
updateTrainOrg(state.formParam).then(res => {
|
||||
if(res.data.code == 200){
|
||||
@@ -826,10 +831,12 @@ const getTableDate = (obj) => {
|
||||
message.error(res.data.msg)
|
||||
}
|
||||
state.teacherdialog = false;
|
||||
state.example = false;
|
||||
}).catch(err=>{
|
||||
message.destroy();
|
||||
message.error(err.data.msg)
|
||||
state.teacherdialog = false;
|
||||
state.example = false;
|
||||
cancel()
|
||||
})
|
||||
}else {
|
||||
@@ -838,11 +845,13 @@ const getTableDate = (obj) => {
|
||||
state.teacherdialog = false;
|
||||
cancel()
|
||||
searchSubmit();
|
||||
state.example = false;
|
||||
}).catch(err=>{
|
||||
message.destroy();
|
||||
message.error(err.data.msg)
|
||||
state.teacherdialog = false;
|
||||
cancel()
|
||||
state.example = false;
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -903,6 +912,18 @@ const getTableDate = (obj) => {
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.example{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.45);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999999;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.headers {
|
||||
height: 73px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
|
||||
Reference in New Issue
Block a user