优化报表中供应商和客户的加载逻辑
This commit is contained in:
@@ -45,7 +45,12 @@
|
|||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
<a-form-item label="供应商" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="供应商" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-select placeholder="请选择供应商" v-model="queryParam.organId"
|
<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">
|
<a-select-option v-for="(item,index) in supList" :key="index" :value="item.id">
|
||||||
{{ item.supplier }}
|
{{ item.supplier }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
@@ -160,7 +165,11 @@
|
|||||||
name: "BuyInReport",
|
name: "BuyInReport",
|
||||||
mixins:[JeecgListMixin],
|
mixins:[JeecgListMixin],
|
||||||
components: {
|
components: {
|
||||||
JEllipsis
|
JEllipsis,
|
||||||
|
VNodes: {
|
||||||
|
functional: true,
|
||||||
|
render: (h, ctx) => ctx.props.vnodes,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -190,6 +199,7 @@
|
|||||||
orgaTree: [],
|
orgaTree: [],
|
||||||
categoryTree:[],
|
categoryTree:[],
|
||||||
realityPriceTotal: '',
|
realityPriceTotal: '',
|
||||||
|
setTimeFlag: null,
|
||||||
tabKey: "1",
|
tabKey: "1",
|
||||||
pageName: 'buyInReport',
|
pageName: 'buyInReport',
|
||||||
// 默认索引
|
// 默认索引
|
||||||
@@ -279,6 +289,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)
|
||||||
|
},
|
||||||
getDepotData() {
|
getDepotData() {
|
||||||
getAction('/depot/findDepotByCurrentUser').then((res)=>{
|
getAction('/depot/findDepotByCurrentUser').then((res)=>{
|
||||||
if(res.code === 200){
|
if(res.code === 200){
|
||||||
|
|||||||
@@ -45,7 +45,12 @@
|
|||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
<a-form-item label="会员卡号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="会员卡号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-select placeholder="请选择会员卡号" v-model="queryParam.organId"
|
<a-select placeholder="请选择会员卡号" v-model="queryParam.organId"
|
||||||
:dropdownMatchSelectWidth="false" showSearch allow-clear optionFilterProp="children">
|
:dropdownMatchSelectWidth="false" showSearch allow-clear optionFilterProp="children" @search="handleSearchRetail">
|
||||||
|
<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="initRetail"><a-icon type="reload" /> 刷新列表</div>
|
||||||
|
</div>
|
||||||
<a-select-option v-for="(item,index) in retailList" :key="index" :value="item.id">
|
<a-select-option v-for="(item,index) in retailList" :key="index" :value="item.id">
|
||||||
{{ item.supplier }}
|
{{ item.supplier }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
@@ -160,7 +165,11 @@
|
|||||||
name: "RetailOutReport",
|
name: "RetailOutReport",
|
||||||
mixins:[JeecgListMixin],
|
mixins:[JeecgListMixin],
|
||||||
components: {
|
components: {
|
||||||
JEllipsis
|
JEllipsis,
|
||||||
|
VNodes: {
|
||||||
|
functional: true,
|
||||||
|
render: (h, ctx) => ctx.props.vnodes,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -192,6 +201,7 @@
|
|||||||
orgaTree: [],
|
orgaTree: [],
|
||||||
categoryTree:[],
|
categoryTree:[],
|
||||||
realityPriceTotal: '',
|
realityPriceTotal: '',
|
||||||
|
setTimeFlag: null,
|
||||||
tabKey: "1",
|
tabKey: "1",
|
||||||
pageName: 'retailOutReport',
|
pageName: 'retailOutReport',
|
||||||
// 默认索引
|
// 默认索引
|
||||||
@@ -281,6 +291,19 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleSearchRetail(value) {
|
||||||
|
let that = this
|
||||||
|
if(this.setTimeFlag != null){
|
||||||
|
clearTimeout(this.setTimeFlag);
|
||||||
|
}
|
||||||
|
this.setTimeFlag = setTimeout(()=>{
|
||||||
|
findBySelectRetail({key: value}).then((res) => {
|
||||||
|
if(res) {
|
||||||
|
that.supList = res;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},500)
|
||||||
|
},
|
||||||
getDepotData() {
|
getDepotData() {
|
||||||
getAction('/depot/findDepotByCurrentUser').then((res)=>{
|
getAction('/depot/findDepotByCurrentUser').then((res)=>{
|
||||||
if(res.code === 200){
|
if(res.code === 200){
|
||||||
|
|||||||
@@ -45,7 +45,12 @@
|
|||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
<a-form-item label="客户" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="客户" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-select placeholder="请选择客户" v-model="queryParam.organId"
|
<a-select placeholder="请选择客户" v-model="queryParam.organId"
|
||||||
:dropdownMatchSelectWidth="false" showSearch allow-clear optionFilterProp="children">
|
:dropdownMatchSelectWidth="false" showSearch allow-clear optionFilterProp="children" @search="handleSearchCustomer">
|
||||||
|
<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="initCustomer"><a-icon type="reload" /> 刷新列表</div>
|
||||||
|
</div>
|
||||||
<a-select-option v-for="(item,index) in cusList" :key="index" :value="item.id">
|
<a-select-option v-for="(item,index) in cusList" :key="index" :value="item.id">
|
||||||
{{ item.supplier }}
|
{{ item.supplier }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
@@ -160,7 +165,11 @@
|
|||||||
name: "SaleOutReport",
|
name: "SaleOutReport",
|
||||||
mixins:[JeecgListMixin],
|
mixins:[JeecgListMixin],
|
||||||
components: {
|
components: {
|
||||||
JEllipsis
|
JEllipsis,
|
||||||
|
VNodes: {
|
||||||
|
functional: true,
|
||||||
|
render: (h, ctx) => ctx.props.vnodes,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -190,6 +199,7 @@
|
|||||||
orgaTree: [],
|
orgaTree: [],
|
||||||
categoryTree:[],
|
categoryTree:[],
|
||||||
realityPriceTotal: '',
|
realityPriceTotal: '',
|
||||||
|
setTimeFlag: null,
|
||||||
tabKey: "1",
|
tabKey: "1",
|
||||||
pageName: 'saleOutReport',
|
pageName: 'saleOutReport',
|
||||||
// 默认索引
|
// 默认索引
|
||||||
@@ -281,6 +291,19 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleSearchCustomer(value) {
|
||||||
|
let that = this
|
||||||
|
if(this.setTimeFlag != null){
|
||||||
|
clearTimeout(this.setTimeFlag);
|
||||||
|
}
|
||||||
|
this.setTimeFlag = setTimeout(()=>{
|
||||||
|
findBySelectCus({key: value}).then((res) => {
|
||||||
|
if(res) {
|
||||||
|
that.supList = res;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},500)
|
||||||
|
},
|
||||||
getDepotData() {
|
getDepotData() {
|
||||||
getAction('/depot/findDepotByCurrentUser').then((res)=>{
|
getAction('/depot/findDepotByCurrentUser').then((res)=>{
|
||||||
if(res.code === 200){
|
if(res.code === 200){
|
||||||
|
|||||||
Reference in New Issue
Block a user