优化会员、供应商和客户的加载逻辑
This commit is contained in:
@@ -22,7 +22,12 @@
|
|||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :md="4" :sm="24" v-if="organLabel">
|
<a-col :md="4" :sm="24" v-if="organLabel">
|
||||||
<a-form-item :label="organLabel" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
<a-form-item :label="organLabel" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
||||||
<a-select v-model="queryParam.organId" :dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
|
<a-select placeholder="请选择" v-model="queryParam.organId" :dropdownMatchSelectWidth="false" showSearch 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="loadSupplier(organLabel)"><a-icon type="reload" /> 刷新列表</div>
|
||||||
|
</div>
|
||||||
<a-select-option v-for="(item,index) in supplierList" :key="index" :value="item.id">
|
<a-select-option v-for="(item,index) in supplierList" :key="index" :value="item.id">
|
||||||
{{ item.supplier }}
|
{{ item.supplier }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
@@ -104,6 +109,10 @@
|
|||||||
mixins:[JeecgListMixin, mixinDevice],
|
mixins:[JeecgListMixin, mixinDevice],
|
||||||
components: {
|
components: {
|
||||||
BillDetail,
|
BillDetail,
|
||||||
|
VNodes: {
|
||||||
|
functional: true,
|
||||||
|
render: (h, ctx) => ctx.props.vnodes,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -113,7 +122,7 @@
|
|||||||
organLabel: '',
|
organLabel: '',
|
||||||
supplierList: [],
|
supplierList: [],
|
||||||
queryParam: {
|
queryParam: {
|
||||||
organId: "",
|
organId: undefined,
|
||||||
number: "",
|
number: "",
|
||||||
materialParam: "",
|
materialParam: "",
|
||||||
type: "",
|
type: "",
|
||||||
@@ -225,6 +234,29 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleSearchSupplier(value) {
|
||||||
|
let that = this
|
||||||
|
if(this.setTimeFlag != null){
|
||||||
|
clearTimeout(this.setTimeFlag);
|
||||||
|
}
|
||||||
|
if(this.organLabel === '供应商') {
|
||||||
|
this.setTimeFlag = setTimeout(() => {
|
||||||
|
findBySelectSup({ key: value }).then((res) => {
|
||||||
|
if (res) {
|
||||||
|
that.supplierList = res;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
|
} else if(this.organLabel === '客户') {
|
||||||
|
this.setTimeFlag = setTimeout(() => {
|
||||||
|
findBySelectCus({ key: value }).then((res) => {
|
||||||
|
if (res) {
|
||||||
|
that.supplierList = res;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
},
|
||||||
close () {
|
close () {
|
||||||
this.$emit('close');
|
this.$emit('close');
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
|||||||
@@ -23,7 +23,12 @@
|
|||||||
<a-col :md="12" :sm="24">
|
<a-col :md="12" :sm="24">
|
||||||
<a-form-item :label="organType" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item :label="organType" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-select :placeholder="'请选择'+ organType" v-model="queryParam.organId"
|
<a-select :placeholder="'请选择'+ organType" 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">
|
<a-select-option v-for="(item,index) in supList" :key="index" :value="item.id">
|
||||||
{{ item.supplier }}
|
{{ item.supplier }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
@@ -68,6 +73,12 @@
|
|||||||
export default {
|
export default {
|
||||||
name: 'WaitNeedList',
|
name: 'WaitNeedList',
|
||||||
mixins:[JeecgListMixin],
|
mixins:[JeecgListMixin],
|
||||||
|
components: {
|
||||||
|
VNodes: {
|
||||||
|
functional: true,
|
||||||
|
render: (h, ctx) => ctx.props.vnodes,
|
||||||
|
}
|
||||||
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
title: "操作",
|
title: "操作",
|
||||||
@@ -75,6 +86,7 @@
|
|||||||
disableMixinCreated: true,
|
disableMixinCreated: true,
|
||||||
organType: '',
|
organType: '',
|
||||||
actionType: '',
|
actionType: '',
|
||||||
|
setTimeFlag: null,
|
||||||
supList: [],
|
supList: [],
|
||||||
selectBillRows: [],
|
selectBillRows: [],
|
||||||
queryParam: {
|
queryParam: {
|
||||||
@@ -152,6 +164,29 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleSearchSupplier(value) {
|
||||||
|
let that = this
|
||||||
|
if(this.setTimeFlag != null){
|
||||||
|
clearTimeout(this.setTimeFlag);
|
||||||
|
}
|
||||||
|
if(this.organType === '客户') {
|
||||||
|
this.setTimeFlag = setTimeout(() => {
|
||||||
|
findBySelectCus({ key: value }).then((res) => {
|
||||||
|
if (res) {
|
||||||
|
that.supList = res
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
|
} else if(this.organType === '供应商') {
|
||||||
|
this.setTimeFlag = setTimeout(() => {
|
||||||
|
findBySelectSup({ key: value }).then((res) => {
|
||||||
|
if (res) {
|
||||||
|
that.supList = res;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
},
|
||||||
//选择供应商进行付款,选择客户进行收款
|
//选择供应商进行付款,选择客户进行收款
|
||||||
handleAction(record) {
|
handleAction(record) {
|
||||||
let type = ''
|
let type = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user