Commit da6698b3 authored by 我在何方's avatar 我在何方

收款单收款账户分页

parent f2fac7d0
...@@ -320,7 +320,7 @@ ...@@ -320,7 +320,7 @@
style="margin-bottom: 0" style="margin-bottom: 0"
:prop="`receiptAccountList.${scope.$index}.platformAccountId`" :prop="`receiptAccountList.${scope.$index}.platformAccountId`"
> >
<el-select <!-- <el-select
v-model="scope.row.platformAccountId" v-model="scope.row.platformAccountId"
:placeholder="$t('请选择收款账户')" :placeholder="$t('请选择收款账户')"
@change="(platformAccountId)=>changePlatformAccountId(platformAccountId,scope.$index)" @change="(platformAccountId)=>changePlatformAccountId(platformAccountId,scope.$index)"
...@@ -331,6 +331,21 @@ ...@@ -331,6 +331,21 @@
:label="item.baAccountName + '(' + item.baAccountNum + ')'" :label="item.baAccountName + '(' + item.baAccountNum + ')'"
:value="item.id" :value="item.id"
/> />
</el-select> -->
<el-select
filterable
clear
v-model="scope.row.platformAccountId"
:placeholder="$t('请选择收款账户')"
@change="(platformAccountId)=>changePlatformAccountId(platformAccountId,scope.$index)"
v-el-select-loadmore="loadmore"
:loading="codeLoading">
<el-option
v-for="(item, i) in bankData"
:key="'opt-code' + i"
:label="item.baAccountName + '(' + item.baAccountNum + ')'"
:value="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
...@@ -743,7 +758,13 @@ export default { ...@@ -743,7 +758,13 @@ export default {
warehouseList:[], warehouseList:[],
selectedUsers:[], selectedUsers:[],
dialogVisible:false, dialogVisible:false,
isUpdate:false isUpdate:false,
codeLoading: false,
codePage: {
pageNo: 1,
pageSize: 100
},
pages:1
}; };
}, },
activated(){ activated(){
...@@ -759,6 +780,22 @@ export default { ...@@ -759,6 +780,22 @@ export default {
this.removeData() this.removeData()
} }
}, },
directives: {
'el-select-loadmore': {
bind (el, binding) {
const SELECTWRAP_DOM = el.querySelector(
'.el-select-dropdown .el-select-dropdown__wrap'
)
SELECTWRAP_DOM.addEventListener('scroll', function () {
const condition =
this.scrollHeight - this.scrollTop <= this.clientHeight
if (condition) {
binding.value()
}
})
}
}
},
async created() { async created() {
getUserProfile().then(res => { getUserProfile().then(res => {
this.discountForm.author = res.data.username this.discountForm.author = res.data.username
...@@ -802,9 +839,7 @@ export default { ...@@ -802,9 +839,7 @@ export default {
listSimpleUsers().then((res) => (that.creatorData = res.data)); listSimpleUsers().then((res) => (that.creatorData = res.data));
getChannelList().then((res) => (that.channelList = res.data)); getChannelList().then((res) => (that.channelList = res.data));
getTradeCityList().then((res) => (that.tradeCityList = res.data)); getTradeCityList().then((res) => (that.tradeCityList = res.data));
getBankAccountPage(that.params).then( this.getCodeList()
(res) => (that.bankData = res.data.list)
);
listSimpleDepts().then((res) => { listSimpleDepts().then((res) => {
res.data.forEach((item) => { res.data.forEach((item) => {
if (item.parentId == 0) { if (item.parentId == 0) {
...@@ -856,6 +891,29 @@ export default { ...@@ -856,6 +891,29 @@ export default {
} }
}, },
methods: { methods: {
// 懒加载
loadmore () {
this.codePage.pageNo++
// 大于页码不请求了
console.log(111)
if (this.codePage.pageNo > this.pages) {
return
}
this.getCodeList()
},
getCodeList (flag) {
if (flag) {
this.bankData = []
this.codeLoading = true
}
setTimeout(() => {
getBankAccountPage(this.codePage).then(res => {
this.codeLoading = false
this.pages = res.data.pages
this.bankData = this.bankData.concat(res.data.list)
})
}, 200)
},
getReceivableData(){ getReceivableData(){
getReceiptInfoByIds({ id: this.id }).then(res => { getReceiptInfoByIds({ id: this.id }).then(res => {
if(res.data.rateValidateDate) res.data.rateValidateDate = dayjs(res.data.rateValidateDate).format('YYYY-MM-DD HH:mm:ss') if(res.data.rateValidateDate) res.data.rateValidateDate = dayjs(res.data.rateValidateDate).format('YYYY-MM-DD HH:mm:ss')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment