|
|
|
@ -1,27 +1,51 @@
|
|
|
|
|
<template>
|
|
|
|
|
<!-- 中标审批列表 -->
|
|
|
|
|
<div>
|
|
|
|
|
<HeaderFilter :listType="listType" :spList="spList" @onListQuery="handleListQuery" :paramProp="listQuery" />
|
|
|
|
|
<RMList :moreLoading.sync="moreLoading" :refreshing.sync="refreshing" :finished.sync="finished" @onLoad="handleLoad" @onRefresh="handleRefresh" isMore :tableList="tableList">
|
|
|
|
|
<HeaderFilter
|
|
|
|
|
:listType="listType"
|
|
|
|
|
:spList="spList"
|
|
|
|
|
@onListQuery="handleListQuery"
|
|
|
|
|
:paramProp="listQuery"
|
|
|
|
|
/>
|
|
|
|
|
<RMList
|
|
|
|
|
:moreLoading.sync="moreLoading"
|
|
|
|
|
:refreshing.sync="refreshing"
|
|
|
|
|
:finished.sync="finished"
|
|
|
|
|
@onLoad="handleLoad"
|
|
|
|
|
@onRefresh="handleRefresh"
|
|
|
|
|
isMore
|
|
|
|
|
:tableList="tableList"
|
|
|
|
|
>
|
|
|
|
|
<div>
|
|
|
|
|
<MySupplierListCard v-for="(item,index) in tableList" :key="item.id" :itemData="item" :listType="listType" @onUpdataInfo="handleUpdataInfo($event, index)" @onAllRefresh="handleAllRefresh" />
|
|
|
|
|
<MySupplierListCard
|
|
|
|
|
v-for="(item, index) in tableList"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:itemData="item"
|
|
|
|
|
:listType="listType"
|
|
|
|
|
@onUpdataInfo="handleUpdataInfo($event, index)"
|
|
|
|
|
@onAllRefresh="handleAllRefresh"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</RMList>
|
|
|
|
|
<div class="common-bottom-btns" style="bottom:8rem">
|
|
|
|
|
<div class="common-bottom-btns" style="bottom: 8rem">
|
|
|
|
|
<div class="common-bottom-btn" @click="handleTopPage">
|
|
|
|
|
<img src="@/assets/images/icons/top.png" alt="">
|
|
|
|
|
<img src="@/assets/images/icons/top.png" alt="" />
|
|
|
|
|
<span>回到顶部</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="common-bottom-btns" v-hasPermi="['bs:supplier-contract:create']" style="bottom:10rem">
|
|
|
|
|
<div
|
|
|
|
|
class="common-bottom-btns"
|
|
|
|
|
v-hasPermi="['bs:supplier-contract:create']"
|
|
|
|
|
style="bottom: 10rem"
|
|
|
|
|
>
|
|
|
|
|
<div class="common-bottom-btn" @click="handleToAdd">
|
|
|
|
|
<img src="@/assets/images/icons/add.png" alt="">
|
|
|
|
|
<img src="@/assets/images/icons/add.png" alt="" />
|
|
|
|
|
<span>添加申请</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="common-bottom-btns" style="bottom:6rem">
|
|
|
|
|
<div class="common-bottom-btns" style="bottom: 6rem">
|
|
|
|
|
<div class="common-bottom-btn" @click="handleBack">
|
|
|
|
|
<img src="@/assets/images/icons/home.png" alt="">
|
|
|
|
|
<img src="@/assets/images/icons/home.png" alt="" />
|
|
|
|
|
<span>返回首页</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -30,13 +54,13 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { getScrollTop } from '@/utils'
|
|
|
|
|
import { getSupplierCompanyPage } from "@/api/bs/quotationSheet";
|
|
|
|
|
import { getSupplierContractPage } from "@/api/bs/supplierContract";
|
|
|
|
|
import { getSupplierCompanyPage } from '@/api/bs/quotationSheet'
|
|
|
|
|
import { getSupplierContractPage } from '@/api/bs/supplierContract'
|
|
|
|
|
import { mapState } from 'vuex'
|
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
|
export default {
|
|
|
|
|
props: {
|
|
|
|
|
listType: String // EnrollmentOrder: 报名订单 EnrollmentCollection: 报名收款 ShiftRecord: 换班记录 WaitPay: 待支付
|
|
|
|
|
listType: String, // EnrollmentOrder: 报名订单 EnrollmentCollection: 报名收款 ShiftRecord: 换班记录 WaitPay: 待支付
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
HeaderFilter: () => import('./HeaderFilter.vue'),
|
|
|
|
@ -60,7 +84,6 @@ export default {
|
|
|
|
|
contractName: null,
|
|
|
|
|
contractType: null,
|
|
|
|
|
supplierName: null,
|
|
|
|
|
status: null,
|
|
|
|
|
amount: null,
|
|
|
|
|
receivedAmount: null,
|
|
|
|
|
projectId: null,
|
|
|
|
@ -81,9 +104,9 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
...mapState({
|
|
|
|
|
singlePageSize: state => state.common.setting.singlePageSize,
|
|
|
|
|
pageSize: state => state.common.setting.pageSize,
|
|
|
|
|
})
|
|
|
|
|
singlePageSize: (state) => state.common.setting.singlePageSize,
|
|
|
|
|
pageSize: (state) => state.common.setting.pageSize,
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
activated() {
|
|
|
|
|
this.handleScrollInit()
|
|
|
|
@ -113,35 +136,44 @@ export default {
|
|
|
|
|
pageNo: 1,
|
|
|
|
|
pageSize: this.singlePageSize,
|
|
|
|
|
}
|
|
|
|
|
getSupplierContractPage(listQuery).then((res) => {
|
|
|
|
|
let arr = (res.data && res.data.list || []).filter(item => item.id == id)
|
|
|
|
|
resolve(arr)
|
|
|
|
|
}).catch((err) => {
|
|
|
|
|
reject(err)
|
|
|
|
|
})
|
|
|
|
|
getSupplierContractPage(listQuery)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
let arr = ((res.data && res.data.list) || []).filter(
|
|
|
|
|
(item) => item.id == id
|
|
|
|
|
)
|
|
|
|
|
resolve(arr)
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
reject(err)
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleUpdataInfo(id, index) {
|
|
|
|
|
this.$loading(true, 'singleReset')
|
|
|
|
|
this.handleSetSingle(id).then(arr => {
|
|
|
|
|
if (arr.length) {
|
|
|
|
|
this.tableList.splice(index, 1, arr[0])
|
|
|
|
|
}
|
|
|
|
|
this.$loading(false, 'singleReset')
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.$loading(false, 'singleReset')
|
|
|
|
|
})
|
|
|
|
|
this.handleSetSingle(id)
|
|
|
|
|
.then((arr) => {
|
|
|
|
|
if (arr.length) {
|
|
|
|
|
this.tableList.splice(index, 1, arr[0])
|
|
|
|
|
}
|
|
|
|
|
this.$loading(false, 'singleReset')
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.$loading(false, 'singleReset')
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleListQuery(paramProp) {
|
|
|
|
|
this.listQuery = {
|
|
|
|
|
...paramProp,
|
|
|
|
|
invoiceDate: paramProp.startDate && [dayjs(paramProp.startDate).format('YYYY-MM-DD HH:ss:mm'), dayjs(paramProp.endDate).format('YYYY-MM-DD HH:ss:mm')]
|
|
|
|
|
invoiceDate: paramProp.startDate && [
|
|
|
|
|
dayjs(paramProp.startDate).format('YYYY-MM-DD HH:ss:mm'),
|
|
|
|
|
dayjs(paramProp.endDate).format('YYYY-MM-DD HH:ss:mm'),
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
this.finished = false
|
|
|
|
|
this.handleRefresh()
|
|
|
|
|
},
|
|
|
|
|
handleScroll() {
|
|
|
|
|
getScrollTop().then(height => {
|
|
|
|
|
getScrollTop().then((height) => {
|
|
|
|
|
this.height = height
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
@ -159,8 +191,8 @@ export default {
|
|
|
|
|
this.$router.push({
|
|
|
|
|
path: '/supplier',
|
|
|
|
|
query: {
|
|
|
|
|
type: 'add'
|
|
|
|
|
}
|
|
|
|
|
type: 'add',
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleAllRefresh() {
|
|
|
|
@ -191,31 +223,33 @@ export default {
|
|
|
|
|
getTableList(val) {
|
|
|
|
|
// const { shellIdsLocal, collegeInfoIdLocal, startDate, endDate, keyword, type, method, targets, usePersonId, teacherIds, chargePersonIds } = this.listQuery
|
|
|
|
|
const query = {
|
|
|
|
|
...this.listQuery
|
|
|
|
|
...this.listQuery,
|
|
|
|
|
}
|
|
|
|
|
this.moreLoading = true
|
|
|
|
|
this.$loading(true, 'tableLoading')
|
|
|
|
|
getSupplierContractPage(query).then(res => {
|
|
|
|
|
let resList = res.data && res.data.list || []
|
|
|
|
|
if (['init', 'refresh'].includes(val)) {
|
|
|
|
|
this.tableList = resList
|
|
|
|
|
this.handleScrollToTop()
|
|
|
|
|
} else {
|
|
|
|
|
this.tableList = this.tableList.concat(resList)
|
|
|
|
|
}
|
|
|
|
|
if (resList.length < this.pageSize) {
|
|
|
|
|
this.finished = true
|
|
|
|
|
}
|
|
|
|
|
}).finally(() => {
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.moreLoading = false
|
|
|
|
|
this.refreshing = false
|
|
|
|
|
this.$loading(false, 'tableLoading')
|
|
|
|
|
getSupplierContractPage(query)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
let resList = (res.data && res.data.list) || []
|
|
|
|
|
if (['init', 'refresh'].includes(val)) {
|
|
|
|
|
this.tableList = resList
|
|
|
|
|
this.handleScrollToTop()
|
|
|
|
|
} else {
|
|
|
|
|
this.tableList = this.tableList.concat(resList)
|
|
|
|
|
}
|
|
|
|
|
if (resList.length < this.pageSize) {
|
|
|
|
|
this.finished = true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.moreLoading = false
|
|
|
|
|
this.refreshing = false
|
|
|
|
|
this.$loading(false, 'tableLoading')
|
|
|
|
|
})
|
|
|
|
|
// this.$loading(false, `cTableLoading_${this.listType}`)
|
|
|
|
|
})
|
|
|
|
|
// this.$loading(false, `cTableLoading_${this.listType}`)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|