mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-23 17:55:39 +08:00
讲师管理bug
This commit is contained in:
@@ -134,7 +134,7 @@ const props = defineProps({
|
||||
}
|
||||
});
|
||||
onMounted(()=>{
|
||||
onlineLearningList()
|
||||
// onlineLearningList()
|
||||
})
|
||||
const courseList = ref([])
|
||||
const onlineLearningList = () =>{
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="content">
|
||||
<div class="box">
|
||||
<div style="margin-bottom: 20px;font-size: 18px;font-weight: 700;">选择讲师费汇总:<span style="color:red;margin-left:20px;">{{payableExpense||0}}元</span></div>
|
||||
<div class="table">
|
||||
<div class="table" style="padding-bottom:72px;">
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:data-source="tableData"
|
||||
@@ -72,6 +72,9 @@ watch(()=>props.visible,(val)=>{
|
||||
message.error(err.data.msg)
|
||||
loading.value = false
|
||||
})
|
||||
}else{
|
||||
selectedRowKeys.value = []
|
||||
selectsData.value = []
|
||||
}
|
||||
})
|
||||
const loading = ref(false)
|
||||
@@ -90,7 +93,7 @@ const payableExpense = ref(0)
|
||||
watch(()=>selectsData.value.length,(val)=>{
|
||||
if(val){
|
||||
payableExpense.value = selectsData.value.reduce((a,b)=>{
|
||||
return a + b.payableExpense
|
||||
return Number(a) + Number(b.payableExpense)
|
||||
},0)
|
||||
}else{
|
||||
payableExpense.value = 0
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
<div class="text">汇总金额</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="org" :title="item?.trainOrgName">{{item?.trainOrgName}}</div>
|
||||
<div class="text org" :title="item?.summaryTotal">{{item?.summaryTotal}}</div>
|
||||
<div class="org" :title="item?.trainOrgName">{{item?.trainOrgName||'-'}}</div>
|
||||
<div class="text org" :title="item?.summaryTotal">{{item?.summaryTotal||'-'}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -148,17 +148,20 @@ const handleConfirm = () => {
|
||||
message.success('提交成功')
|
||||
close()
|
||||
closeDrawer()
|
||||
emit('visibleFalse',false)
|
||||
}).catch(err=>{
|
||||
message.destroy()
|
||||
message.error(err.data.msg)
|
||||
close()
|
||||
closeDrawer()
|
||||
emit('visibleFalse',false)
|
||||
})
|
||||
}).catch(err=>{
|
||||
message.destroy()
|
||||
message.error(err.data.msg)
|
||||
close()
|
||||
closeDrawer()
|
||||
emit('visibleFalse',false)
|
||||
})
|
||||
}
|
||||
const forData = ref()
|
||||
@@ -187,6 +190,7 @@ watch(()=>props.visible,(val)=>{
|
||||
expenseList.value = res.data.data[indexList.value]?.expenseList || []
|
||||
}
|
||||
loadingData.value = false
|
||||
resetData()
|
||||
}).catch(()=>{
|
||||
message.error('获取数据失败,请重新尝试')
|
||||
loadingData.value = false
|
||||
@@ -236,7 +240,7 @@ const searchData = (val) => {
|
||||
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;
|
||||
return isNameMatch && isDateInRange;
|
||||
});
|
||||
searchList.value = filteredList;
|
||||
}
|
||||
@@ -378,6 +382,12 @@ const qureyDrawer = () => {
|
||||
console.log(res,'resssss')
|
||||
message.success('提交成功')
|
||||
closeDrawer()
|
||||
emit('visibleFalse',false)
|
||||
}).catch(err=>{
|
||||
message.destroy()
|
||||
message.error(err.data.msg)
|
||||
closeDrawer()
|
||||
emit('visibleFalse',false)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<script setup>
|
||||
import {computed, defineEmits, defineProps, onMounted, ref, watch} from "vue";
|
||||
import {useThrottlePage} from "@/api/request";
|
||||
import {USER_LIST} from "@/api/apis";
|
||||
import {USER_LIST_NEW} from "@/api/apis";
|
||||
|
||||
const props = defineProps({
|
||||
value: {
|
||||
@@ -56,12 +56,12 @@ const emit = defineEmits({})
|
||||
|
||||
const isOpen = ref(false)
|
||||
|
||||
const memberParam = ref({keyword: '', pageNo:1, pageSize: 20})
|
||||
const memberParam = ref({name: '', pageNo:1, pageSize: 20})
|
||||
|
||||
const {data: userList, loading} = useThrottlePage(USER_LIST, memberParam.value, false)
|
||||
const {data: userList, loading} = useThrottlePage(USER_LIST_NEW, memberParam.value, false)
|
||||
|
||||
const options = computed(() => userList.value.filter(e => !(props.value + '').includes(e.id)).map(e => ({
|
||||
label: e.realName + e.userNo,
|
||||
label: e.name + e.mobile,
|
||||
value: e.id //,
|
||||
// ...e,
|
||||
// audienceList: null
|
||||
@@ -93,18 +93,18 @@ const searchMember = (keyword) => {
|
||||
isOpen.value = true
|
||||
userList.value = []
|
||||
memberParam.value.pageNo = 1
|
||||
memberParam.value.keyword = keyword
|
||||
memberParam.value.name = keyword
|
||||
console.log('searchMember', memberParam.value)
|
||||
};
|
||||
|
||||
function blur() {
|
||||
isOpen.value = false
|
||||
memberParam.value.keyword = ''
|
||||
memberParam.value.name = ''
|
||||
memberParam.value.pageNo = 1
|
||||
}
|
||||
|
||||
function change(e, l) {
|
||||
memberParam.value.keyword = ''
|
||||
memberParam.value.name = ''
|
||||
memberParam.value.pageNo = 1
|
||||
isOpen.value = false
|
||||
Array.isArray(l) && (selectOptions.value = l)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<script setup>
|
||||
import {computed, defineEmits, defineProps, onMounted, ref, watch} from "vue";
|
||||
import {useThrottlePage} from "@/api/request";
|
||||
import {USER_LIST} from "@/api/apis";
|
||||
import {USER_LIST_NEW} from "@/api/apis";
|
||||
|
||||
const props = defineProps({
|
||||
value: {
|
||||
@@ -56,12 +56,12 @@ const emit = defineEmits({})
|
||||
|
||||
const isOpen = ref(false)
|
||||
|
||||
const memberParam = ref({keyword: '', pageNo:1, pageSize: 20})
|
||||
const memberParam = ref({name: '', pageNo:1, pageSize: 20})
|
||||
|
||||
const {data: userList, loading} = useThrottlePage(USER_LIST, memberParam.value, false)
|
||||
const {data: userList, loading} = useThrottlePage(USER_LIST_NEW, memberParam.value, false)
|
||||
|
||||
const options = computed(() => userList.value.filter(e => !(props.value + '').includes(e.id)).map(e => ({
|
||||
label: e.realName + e.userNo,
|
||||
label: e.name + e.mobile,
|
||||
value: e.id // ,
|
||||
// ...e,
|
||||
// audienceList: null
|
||||
@@ -93,18 +93,18 @@ const searchMember = (keyword) => {
|
||||
isOpen.value = true
|
||||
userList.value = []
|
||||
memberParam.value.pageNo = 1
|
||||
memberParam.value.keyword = keyword
|
||||
memberParam.value.name = keyword
|
||||
console.log('searchMember', memberParam.value)
|
||||
};
|
||||
|
||||
function blur() {
|
||||
isOpen.value = false
|
||||
memberParam.value.keyword = ''
|
||||
memberParam.value.name = ''
|
||||
memberParam.value.pageNo = 1
|
||||
}
|
||||
|
||||
function change(e, l) {
|
||||
memberParam.value.keyword = ''
|
||||
memberParam.value.name = ''
|
||||
memberParam.value.pageNo = 1
|
||||
isOpen.value = false
|
||||
Array.isArray(l) && (selectOptions.value = l)
|
||||
|
||||
@@ -224,7 +224,7 @@ watch(visible, (val)=>{
|
||||
formData.value.two = filterList(formData.value.affiliationUserList,2)
|
||||
formData.value.three = filterList(formData.value.affiliationUserList,3)
|
||||
formData.value.tableData = res.data.data.affiliationOrgList
|
||||
formData.value.tableDataTwo = res.data.data.affiliationOrgList
|
||||
// formData.value.tableDataTwo = res.data.data.affiliationOrgList
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user