mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-21 00:36:46 +08:00
讲师管理审批
This commit is contained in:
@@ -43,3 +43,11 @@ export const CreateMonthSummary= (obj) => http.post('/admin/expenseSummary/Creat
|
||||
export const expenseSummaryList= (obj) => http.get('/admin/expenseSummary/list',{params:obj})
|
||||
//提交/撤回
|
||||
export const isConfirm= (obj) => http.post('/admin/expenseBill/isConfirm',obj)
|
||||
//汇总讲师费审批数据
|
||||
export const CreateSummary= () => http.post('/admin/expenseBill/CreateSummary')
|
||||
//审批列表中编辑讲师费审批弹框-查询讲师费
|
||||
export const queryExpnseByBillId= (obj) => http.get('/admin/expenseBill/queryExpnseByBillId',{params:obj})
|
||||
//
|
||||
export const CreateSummaryAgain= () => http.post('/admin/expenseBill/CreateSummaryAgain')
|
||||
//
|
||||
export const submitApproval= (obj) => http.post('/admin/expenseBill/submitApproval',obj)
|
||||
@@ -15,12 +15,12 @@
|
||||
</div>
|
||||
<div class="desc">
|
||||
<a-descriptions :column="2" bordered>
|
||||
<a-descriptions-item label="培训发生组织编号">{{formData?.affiliationCode||'-'}}</a-descriptions-item>
|
||||
<a-descriptions-item label="培训发生组名称">{{formData?.affiliationName||'-'}}</a-descriptions-item>
|
||||
<a-descriptions-item label="培训发生组织编号">{{formData?.code||'-'}}</a-descriptions-item>
|
||||
<a-descriptions-item label="培训发生组名称">{{formData?.trainOrgName||'-'}}</a-descriptions-item>
|
||||
<a-descriptions-item label="是否为根节点">{{formData?.isParent==1?'否':'是'}}</a-descriptions-item>
|
||||
<a-descriptions-item label="组织担当">{{formData?.act||'-'}}</a-descriptions-item>
|
||||
<a-descriptions-item label="状态">
|
||||
{{['-','待审核', '审核中', '已完成', '审核失败'][formData?.type]}}
|
||||
{{{0:'待确认' ,1:'待提交' ,2:'审核中', 3:'审核通过', 4:'审核拒绝'}[formData?.status]}}
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</div>
|
||||
@@ -31,10 +31,10 @@
|
||||
<div class="desc">
|
||||
<div class="input_box">
|
||||
<div class="input">
|
||||
<a-input style="height:40px;border-radius:8px;" v-model:value="userNoName" placeholder="请输入工号/讲师名称进行搜索" allowClear />
|
||||
<a-input style="height:40px;border-radius:8px;" v-model:value="params.userNoName" placeholder="请输入工号/讲师名称进行搜索" allowClear />
|
||||
</div>
|
||||
<div class="input">
|
||||
<a-range-picker style="height:40px;border-radius:8px;" format="YYYY-MM-DD" v-model:value="dateValue" />
|
||||
<a-range-picker style="height:40px;border-radius:8px;" @change="dateChange" valueFormat="YYYY-MM-DD" format="YYYY-MM-DD" v-model:value="dateValue" />
|
||||
</div>
|
||||
<div class="input">
|
||||
<a-button style="margin-right: 15px;height:40px;border-radius:8px;" type="primary" @click="search">搜索</a-button>
|
||||
@@ -52,6 +52,7 @@
|
||||
:dataSource="dataList"
|
||||
:loading="loading"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
:pagination="pagination"
|
||||
>
|
||||
<template #appEdit="{ record }">
|
||||
<a-button type="link" @click="edit(record)">编辑</a-button>
|
||||
@@ -63,8 +64,7 @@
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn2" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="closeDrawer">保存</button>
|
||||
<button class="btn2" @click="closeDrawer">保存并提交</button>
|
||||
<button class="btn2" @click="paramsDrawer">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
<a-drawer v-model:visible="teacherdialog" placement="right" @closa="cancelTeacherDialog" :maskClosable="true" dropdown-style="drawaer"
|
||||
@@ -219,7 +219,7 @@
|
||||
zIndex: 1,
|
||||
}">
|
||||
<a-button class="drabtn" @click="cancelTeacherDialog">取消</a-button>
|
||||
<a-button class="drabtn" type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存
|
||||
<a-button class="drabtn" type="primary" @click="createTeacherDialog">保存
|
||||
</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
@@ -262,10 +262,10 @@
|
||||
</template>
|
||||
|
||||
<script lang="jsx">
|
||||
import { ref, reactive,toRefs,watch } from 'vue'
|
||||
import { updateTeacherFee,getTeacherFeeDetail,withdrawRecord } from "../../api/lecturerFeeManagement";
|
||||
import { ref, reactive,toRefs,watch,onMounted,computed } from 'vue'
|
||||
import { submitApproval,updateTeacherFee,getTeacherFeeDetail,withdrawRecord,queryById,queryExpnseByBillId,CreateSummaryAgain, } from "../../api/lecturerFeeManagement";
|
||||
import SearchTeacher from "@/components/project/SearchTeacher";
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useRouter,useRoute } from 'vue-router'
|
||||
import dialog from '@/utils/dialog'
|
||||
import dayjs from "dayjs";
|
||||
import { message } from 'ant-design-vue';
|
||||
@@ -275,7 +275,17 @@ export default {
|
||||
},
|
||||
setup () {
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const state = reactive({
|
||||
params: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 100,
|
||||
userNoName: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
},
|
||||
paramsId: route.query.id,
|
||||
copyName: null,
|
||||
modalVisible: false,
|
||||
tSystemNames:{
|
||||
@@ -284,6 +294,9 @@ export default {
|
||||
levelVoList: []
|
||||
},
|
||||
teachingDate:null,
|
||||
formData: {
|
||||
|
||||
},
|
||||
formParam: {
|
||||
teachingDate:null ,
|
||||
teachingTime:null,
|
||||
@@ -305,15 +318,80 @@ export default {
|
||||
remark:null,
|
||||
},
|
||||
teacherdialog: false,
|
||||
userNoName: '',
|
||||
dateValue: [],
|
||||
dataList: [{name:'诶嘿',id:1},{name:'诶嘿,复制成功了',id:2}],
|
||||
dataList: [],
|
||||
loading: false,
|
||||
})
|
||||
onMounted(()=>{
|
||||
queryById({id: state.paramsId}).then(res=>{
|
||||
state.formData = res.data.data
|
||||
})
|
||||
getTableList()
|
||||
})
|
||||
const getTableList = () => {
|
||||
state.loading = true
|
||||
queryExpnseByBillId({
|
||||
id: state.paramsId,
|
||||
pageNo: state.params.pageNo,
|
||||
pageSize: state.params.pageSize,
|
||||
name: state.params.userNoName,
|
||||
startTime: state.params.startTime,
|
||||
endTime: state.params.endTime
|
||||
}).then(res => {
|
||||
state.dataList = res.data.data.records
|
||||
state.params.total = Number(res.data.data.total);
|
||||
state.loading = false
|
||||
})
|
||||
}
|
||||
const dateChange = (e) => {
|
||||
if(e){
|
||||
state.params.startTime = e[0];
|
||||
state.params.endTime = e[1];
|
||||
}else{
|
||||
state.params.startTime = null;
|
||||
state.params.endTime = null;
|
||||
}
|
||||
}
|
||||
const pagination = computed(() => ({
|
||||
total: state.params.total,
|
||||
showSizeChanger: false,
|
||||
showQuickJumper:true,
|
||||
current: state.params.pageNo,
|
||||
pageSize: state.params.pageSize,
|
||||
onChange: paginationChange,
|
||||
}));
|
||||
const paginationChange = (e,pageSize) => {
|
||||
state.params.pageNo = e;
|
||||
state.params.pageSize = pageSize
|
||||
getTableList();
|
||||
};
|
||||
const close = () => {
|
||||
state.modalVisible = false;
|
||||
state.copyName = null;
|
||||
}
|
||||
const search = () => {
|
||||
state.params.pageNo = 1
|
||||
getTableList()
|
||||
}
|
||||
const reset = () => {
|
||||
state.params.userNoName = null
|
||||
state.params.startTime = null
|
||||
state.params.endTime = null
|
||||
state.dateValue = []
|
||||
search()
|
||||
}
|
||||
const searchResetPrevious = () => {
|
||||
dialog({
|
||||
content: '正在重新汇总数据,请稍后...',
|
||||
ok: () => {
|
||||
CreateSummaryAgain().then(res=>{
|
||||
search();
|
||||
}).catch(err=>{
|
||||
message.error(err.data.msg)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleConfirm = () => {
|
||||
navigator.clipboard.writeText(state.copyName).then(() => {
|
||||
message.success('复制成功')
|
||||
@@ -376,10 +454,16 @@ export default {
|
||||
}
|
||||
state.formParam = {...state.formParam,...state.tSystemNames}
|
||||
state.formParam.name = state.formParam?.name?.split('/')[0]
|
||||
dialog({
|
||||
content: '是否确定提交',
|
||||
ok: ()=>{
|
||||
updateTeacherFee(state.formParam).then(res => {
|
||||
message.success("修改成功");
|
||||
state.teacherdialog = false;
|
||||
search()
|
||||
});
|
||||
}
|
||||
})
|
||||
};
|
||||
const cancelTeacherDialog = () => {
|
||||
formRef.value.resetFields();
|
||||
@@ -430,7 +514,21 @@ export default {
|
||||
expense: [{ required: true, message: '',log:'计划费用不能为空' }],
|
||||
}
|
||||
const closeDrawer = () => {
|
||||
router.go(-1)
|
||||
reset()
|
||||
router.push({
|
||||
path: '/lecturerfeemanagement',
|
||||
query:{activeKey:true}
|
||||
})
|
||||
}
|
||||
const paramsDrawer = () => {
|
||||
dialog({
|
||||
content: '是否确定提交',
|
||||
ok: ()=>{
|
||||
submitApproval().then(res=>{
|
||||
closeDrawer()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const edit = (record) => {
|
||||
console.log(record,'record')
|
||||
@@ -465,6 +563,7 @@ export default {
|
||||
ids: [record.id]
|
||||
}).then(res=>{
|
||||
message.success('移除成功')
|
||||
search()
|
||||
}).catch(err=>{
|
||||
message.error(err.msg)
|
||||
})
|
||||
@@ -553,6 +652,7 @@ export default {
|
||||
...toRefs(state),
|
||||
columns,
|
||||
closeDrawer,
|
||||
paramsDrawer,
|
||||
edit,
|
||||
rules,
|
||||
recome,
|
||||
@@ -568,6 +668,13 @@ export default {
|
||||
clearNonNumber,
|
||||
close,
|
||||
handleConfirm,
|
||||
search,
|
||||
dateChange,
|
||||
getTableList,
|
||||
reset,
|
||||
searchResetPrevious,
|
||||
pagination,
|
||||
paginationChange,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,14 +123,14 @@
|
||||
<span>讲师费用详情</span>
|
||||
<a-descriptions bordered :column="2" :contentStyle="rowCenter" :labelStyle="rowCenter">
|
||||
<a-descriptions-item label="审批编号">{{formParam?.teacherName}}</a-descriptions-item>
|
||||
<a-descriptions-item label="培训发生组织">{{formParam?.trainOrg}}</a-descriptions-item>
|
||||
<a-descriptions-item label="培训发生组织">{{formParam?.trainOrgName}}</a-descriptions-item>
|
||||
<a-descriptions-item v-if="activeKey==2" label="汇总周期" >{{formParam?.summaryDate}}</a-descriptions-item>
|
||||
<a-descriptions-item label="提交时间">{{formParam?.payableExpense}}</a-descriptions-item>
|
||||
<a-descriptions-item label="汇总金额">{{formParam?.totalFee}}</a-descriptions-item>
|
||||
<a-descriptions-item label="状态">{{formParam?.status=="A10"?'待审核' :formParam?.status=="A20"?'已提交':formParam?.status== "A30" ?'审核中':formParam?.status== "E10" ?'审核打回':formParam?.status=="S20"?'审核通过':''}}</a-descriptions-item>
|
||||
<a-descriptions-item label="提交时间">{{formParam?.summaryTime}}</a-descriptions-item>
|
||||
<a-descriptions-item label="汇总金额">{{formParam?.summaryTotal}}</a-descriptions-item>
|
||||
<a-descriptions-item label="状态">{{{0:'待确认' ,1:'待提交' ,2:'审核中', 3:'审核通过', 4:'审核拒绝'}[formParam?.status]}}</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
<span class="line"></span>
|
||||
<!-- <span>审批详情</span> -->
|
||||
<span class="line" style="margin-top:12px;"></span>
|
||||
<a-tabs v-model:activeKey="activeKey">
|
||||
<a-tab-pane key="1" tab="讲师费列表">
|
||||
<div style="padding: 10px 0;">
|
||||
@@ -139,7 +139,7 @@
|
||||
<a-input style="height:40px;border-radius:8px;" v-model:value="userNoOrName" placeholder="请输入工号/讲师名称进行搜索" />
|
||||
</div>
|
||||
<div style="margin-right:20px;">
|
||||
<a-range-picker style="height:40px;border-radius:8px;" valueFormat="YYYY-MM-DD" format="YYYY-MM-DD" v-model:value="seeDateValue" />
|
||||
<a-range-picker style="height:40px;border-radius:8px;" @change="seeDateChange" valueFormat="YYYY-MM-DD" format="YYYY-MM-DD" v-model:value="seeDateValue" />
|
||||
</div>
|
||||
<div style="margin-right:20px;">
|
||||
<a-button style="margin-right:15px;height:40px;border-radius:8px;" type="primary" @click="searchTeacherFeeApprovalList()">搜索</a-button>
|
||||
@@ -173,7 +173,7 @@
|
||||
zIndex: 1,
|
||||
}">
|
||||
<a-button class="drabtn" @click="cancelTeachingDialog">取消</a-button>
|
||||
<a-button class="drabtn" type="primary" @click="cancelTeachingDialog" :loading="buttonLoading">提交讲师费
|
||||
<a-button class="drabtn" type="primary" @click="cancelTeachingDialog" :loading="buttonLoading">确定
|
||||
</a-button>
|
||||
<!-- <a-button class="drabtn" @click="cancelTeachingDialog" type="primary" danger>拒绝</a-button> -->
|
||||
</div>
|
||||
@@ -217,7 +217,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="jsx">
|
||||
import { reactive, toRefs, ref ,watch} from "vue";
|
||||
import { reactive, toRefs, ref ,watch,computed} from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { message } from "ant-design-vue";
|
||||
import dayjs from "dayjs";
|
||||
@@ -230,7 +230,7 @@
|
||||
DownloadOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||
import {expenseBillList,queryById,getTeacherFeeApprovalList ,updateTeacherFee,updateStatusSubmit,approveTeacherFee,getTrainOrg,isConfirm} from "../../api/lecturerFeeManagement";
|
||||
import {expenseBillList,queryById,queryExpnseByBillId ,updateTeacherFee,updateStatusSubmit,approveTeacherFee,getTrainOrg,isConfirm} from "../../api/lecturerFeeManagement";
|
||||
import { getTeacherSystemList } from "../../api/Lecturer";
|
||||
// lecturerFeeManagement
|
||||
// import {getProjSt} from "../../api/indexProjStu";
|
||||
@@ -248,8 +248,15 @@
|
||||
setup() {
|
||||
const router = useRouter()
|
||||
const state = reactive({
|
||||
tableDataParams:{
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
},
|
||||
userNoOrName: null,
|
||||
seeDateValue: [],
|
||||
seeBegin: null,
|
||||
seeEnd: null,
|
||||
activeKey: '1',
|
||||
moreid:1,
|
||||
byPid:null,
|
||||
@@ -402,8 +409,8 @@
|
||||
|
||||
{
|
||||
title: '培训发生组织 ',
|
||||
dataIndex: 'trainOrg',
|
||||
key: 'trainOrg',
|
||||
dataIndex: 'trainOrgName',
|
||||
key: 'trainOrgName',
|
||||
elipsis: true, align: "center",
|
||||
width: 120,
|
||||
},
|
||||
@@ -413,22 +420,22 @@
|
||||
key: 'summaryDate',
|
||||
elipsis: true,
|
||||
align: "center",
|
||||
width:300
|
||||
width:200
|
||||
},
|
||||
{
|
||||
title: '汇总金额 ',
|
||||
dataIndex: 'totalFee',
|
||||
key: 'totalFee',
|
||||
dataIndex: 'summaryTotal',
|
||||
key: 'summaryTotal',
|
||||
elipsis: true,
|
||||
align: "center",
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: '提交时间(未命名)',
|
||||
dataIndex: 'trainOrg',
|
||||
key: 'trainOrg',
|
||||
dataIndex: 'summaryTime',
|
||||
key: 'summaryTime',
|
||||
elipsis: true, align: "center",
|
||||
width: 120,
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: '状态 ',
|
||||
@@ -437,20 +444,22 @@
|
||||
elipsis: true,
|
||||
align: "center",
|
||||
width: 120,
|
||||
customCell: (record) => {return{style:{color:['#67C23A','#F56C6C'][record.status]}}},
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
{value.record.status == "A10" || value.record.status == "A20" ||value.record.status == "A30" ||value.record.status == "E10"||value.record.status == "S20"
|
||||
? {
|
||||
"A10": "待审核",
|
||||
"A20": "已提交",
|
||||
"A30": "审核中",
|
||||
"E10": "审核打回",
|
||||
"S20": "审核通过",
|
||||
}[value.record.status + ""] || ""
|
||||
: "-"}
|
||||
</div>
|
||||
)
|
||||
switch (value.record.status) {
|
||||
case 0:
|
||||
return "待确认 "
|
||||
case 1:
|
||||
return "待提交"
|
||||
case 2:
|
||||
return "审核中"
|
||||
case 3:
|
||||
return "审核通过"
|
||||
case 4:
|
||||
return "审核拒绝"
|
||||
default:
|
||||
return "-"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -512,8 +521,6 @@
|
||||
tableData.value = res.data.data.records
|
||||
state.tableDataTotal = Number(res.data.data.total);
|
||||
state.tableLoading=false
|
||||
console.log("获取讲师tableData", tableData);
|
||||
tableData.value.push({name:'xixixi',id:'111'})
|
||||
})
|
||||
};
|
||||
getTableDate()
|
||||
@@ -578,11 +585,10 @@
|
||||
}
|
||||
}
|
||||
const goDdit = (record) => {
|
||||
console.log(record,'record')
|
||||
router.push({
|
||||
path:'/LecturerAppEdit',
|
||||
query:{
|
||||
id:'5'
|
||||
id: record.id
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -635,14 +641,53 @@
|
||||
console.log("详情", err);
|
||||
});
|
||||
}
|
||||
const tableDataExamine = ref([
|
||||
])
|
||||
const searchTeacherFeeApprovalList = () => {
|
||||
state.tableDataParams.pageNo = 1
|
||||
gettableDataExamine()
|
||||
}
|
||||
const resetSearch = () => {
|
||||
state.userNoOrName = null
|
||||
state.seeDateValue = []
|
||||
state.seeBegin = null
|
||||
state.seeEnd = null
|
||||
searchTeacherFeeApprovalList()
|
||||
}
|
||||
const seeDateChange = (e) => {
|
||||
if(e){
|
||||
state.seeBegin = e[0]
|
||||
state.seeEnd = e[1]
|
||||
}else{
|
||||
state.seeBegin = null
|
||||
state.seeEnd = null
|
||||
}
|
||||
}
|
||||
const tableDataExamine = ref([])
|
||||
const gettableDataExamine = () => {
|
||||
getTeacherFeeApprovalList({id : state.id})
|
||||
.then((res) => {
|
||||
queryExpnseByBillId({
|
||||
id : state.id,
|
||||
pageNo: state.tableDataParams.pageNo,
|
||||
pageSize: state.tableDataParams.pageSize,
|
||||
name: state.userNoOrName,
|
||||
startTime: state.seeBegin,
|
||||
endTime: state.seeEnd
|
||||
}).then((res) => {
|
||||
tableDataExamine.value = res.data.data.records
|
||||
state.tableDataParams.total = Number(res.data.data.total);
|
||||
})
|
||||
};
|
||||
const pagination = computed(() => ({
|
||||
total: state.tableDataParams.total,
|
||||
showSizeChanger: true,
|
||||
showQuickJumper:true,
|
||||
current: state.tableDataParams.pageNo,
|
||||
pageSize: state.tableDataParams.pageSize,
|
||||
onChange: paginationChange,
|
||||
}));
|
||||
const paginationChange = (e,pageSize) => {
|
||||
state.tableDataParams.pageNo = e;
|
||||
state.tableDataParams.pageSize = pageSize
|
||||
gettableDataExamine();
|
||||
};
|
||||
const columnsExamineTwo = ref([
|
||||
{
|
||||
title: '审批层级 ',
|
||||
@@ -866,6 +911,7 @@
|
||||
columnsExamineTwo,
|
||||
tableData,
|
||||
tableDataExamine,
|
||||
seeDateChange,
|
||||
changePagination,
|
||||
addTeacher,
|
||||
cancelTeachingDialog,
|
||||
@@ -882,6 +928,10 @@
|
||||
TeacherSystem,
|
||||
infoteacherList,
|
||||
getinfoteacher,
|
||||
pagination,
|
||||
paginationChange,
|
||||
searchTeacherFeeApprovalList,
|
||||
resetSearch,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -14,9 +14,10 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="jsx">
|
||||
import { reactive, toRefs, ref, watch } from "vue";
|
||||
import { reactive, toRefs, ref, watch,onMounted } from "vue";
|
||||
import LecturerFee from "../lecturer/LecturerFee.vue"
|
||||
import LecturerApproval from "../lecturer/LecturerApproval.vue"
|
||||
import { useRoute } from "vue-router";
|
||||
export default {
|
||||
name: "LecturerFeeManagement",
|
||||
components: {
|
||||
@@ -24,11 +25,17 @@ import LecturerApproval from "../lecturer/LecturerApproval.vue"
|
||||
LecturerApproval
|
||||
},
|
||||
setup() {
|
||||
const route = useRoute();
|
||||
const state = reactive({
|
||||
activeKey:'1'
|
||||
activeKey:'1',
|
||||
})
|
||||
watch(
|
||||
)
|
||||
onMounted(() => {
|
||||
if(route.query.activeKey){
|
||||
state.activeKey = '2'
|
||||
}
|
||||
})
|
||||
return {
|
||||
...toRefs(state),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user