优化报表中会员、供应商和客户的加载逻辑
This commit is contained in:
@@ -10,7 +10,12 @@
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-form-item label="供应商" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-select placeholder="请选择供应商" v-model="queryParam.organId"
|
||||
:dropdownMatchSelectWidth="false" showSearch allow-clear optionFilterProp="children">
|
||||
:dropdownMatchSelectWidth="false" showSearch allow-clear optionFilterProp="children" @search="handleSearchSupplier">
|
||||
<div slot="dropdownRender" slot-scope="menu">
|
||||
<v-nodes :vnodes="menu" />
|
||||
<a-divider style="margin: 4px 0;" />
|
||||
<div class="dropdown-btn" @mousedown="e => e.preventDefault()" @click="initSupplier"><a-icon type="reload" /> 刷新列表</div>
|
||||
</div>
|
||||
<a-select-option v-for="(item,index) in supList" :key="index" :value="item.id">
|
||||
{{ item.supplier }}
|
||||
</a-select-option>
|
||||
@@ -148,7 +153,11 @@
|
||||
mixins:[JeecgListMixin],
|
||||
components: {
|
||||
DebtAccountList,
|
||||
JEllipsis
|
||||
JEllipsis,
|
||||
VNodes: {
|
||||
functional: true,
|
||||
render: (h, ctx) => ctx.props.vnodes,
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
@@ -175,6 +184,7 @@
|
||||
supList: [],
|
||||
firstTotal: '',
|
||||
lastTotal: '',
|
||||
setTimeFlag: null,
|
||||
tabKey: "1",
|
||||
pageName: 'vendorAccount',
|
||||
// 默认索引
|
||||
@@ -227,6 +237,19 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
handleSearchSupplier(value) {
|
||||
let that = this
|
||||
if(this.setTimeFlag != null){
|
||||
clearTimeout(this.setTimeFlag);
|
||||
}
|
||||
this.setTimeFlag = setTimeout(()=>{
|
||||
findBySelectSup({key: value}).then((res) => {
|
||||
if(res) {
|
||||
that.supList = res;
|
||||
}
|
||||
})
|
||||
},500)
|
||||
},
|
||||
onDateChange: function (value, dateString) {
|
||||
this.queryParam.beginTime=dateString[0]
|
||||
this.queryParam.endTime=dateString[1]
|
||||
|
||||
Reference in New Issue
Block a user