完善供应商、客户、会员查询,支持模糊查询,支持1万数量级的快速查询

This commit is contained in:
jishenghua
2025-09-26 22:51:30 +08:00
parent 62415c51e4
commit 2fdcc41393
12 changed files with 175 additions and 19 deletions

View File

@@ -27,7 +27,12 @@
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="付款会员" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select placeholder="请选择付款会员" showSearch allow-clear optionFilterProp="children" v-model="queryParam.organId">
<a-select placeholder="请选择付款会员" showSearch allow-clear optionFilterProp="children" v-model="queryParam.organId" @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(0)"><a-icon type="reload" /> 刷新列表</div>
</div>
<a-select-option v-for="(item,index) in retailList" :key="index" :value="item.id">
{{ item.supplier }}
</a-select-option>
@@ -149,7 +154,11 @@
AdvanceInModal,
FinancialDetail,
BillExcelIframe,
JDate
JDate,
VNodes: {
functional: true,
render: (h, ctx) => ctx.props.vnodes,
}
},
data () {
return {

View File

@@ -27,7 +27,12 @@
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="往来单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select placeholder="请选择往来单位" showSearch allow-clear optionFilterProp="children" v-model="queryParam.organId">
<a-select placeholder="请选择往来单位" showSearch allow-clear optionFilterProp="children" v-model="queryParam.organId" @search="handleSearchOrgan">
<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="initOrgan(0)"><a-icon type="reload" /> 刷新列表</div>
</div>
<a-select-option v-for="(item,index) in organList" :key="index" :value="item.id">
{{ item.supplier }}
</a-select-option>
@@ -167,7 +172,11 @@
ItemInModal,
FinancialDetail,
BillExcelIframe,
JDate
JDate,
VNodes: {
functional: true,
render: (h, ctx) => ctx.props.vnodes,
}
},
data () {
return {

View File

@@ -27,7 +27,12 @@
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="往来单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select placeholder="请选择往来单位" showSearch allow-clear optionFilterProp="children" v-model="queryParam.organId">
<a-select placeholder="请选择往来单位" showSearch allow-clear optionFilterProp="children" v-model="queryParam.organId" @search="handleSearchOrgan">
<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="initOrgan(0)"><a-icon type="reload" /> 刷新列表</div>
</div>
<a-select-option v-for="(item,index) in organList" :key="index" :value="item.id">
{{ item.supplier }}
</a-select-option>
@@ -167,7 +172,11 @@
ItemOutModal,
FinancialDetail,
BillExcelIframe,
JDate
JDate,
VNodes: {
functional: true,
render: (h, ctx) => ctx.props.vnodes,
}
},
data () {
return {

View File

@@ -27,7 +27,12 @@
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="客户" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select placeholder="请选择客户" showSearch allow-clear optionFilterProp="children" v-model="queryParam.organId">
<a-select placeholder="请选择客户" showSearch allow-clear optionFilterProp="children" v-model="queryParam.organId" @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(0)"><a-icon type="reload" /> 刷新列表</div>
</div>
<a-select-option v-for="(item,index) in cusList" :key="index" :value="item.id">
{{ item.supplier }}
</a-select-option>
@@ -167,7 +172,11 @@
MoneyInModal,
FinancialDetail,
BillExcelIframe,
JDate
JDate,
VNodes: {
functional: true,
render: (h, ctx) => ctx.props.vnodes,
}
},
data () {
return {

View File

@@ -27,7 +27,12 @@
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="供应商" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select placeholder="请选择供应商" showSearch allow-clear optionFilterProp="children" v-model="queryParam.organId">
<a-select placeholder="请选择供应商" showSearch allow-clear optionFilterProp="children" v-model="queryParam.organId" @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(0)"><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>
@@ -166,7 +171,11 @@
MoneyOutModal,
FinancialDetail,
BillExcelIframe,
JDate
JDate,
VNodes: {
functional: true,
render: (h, ctx) => ctx.props.vnodes,
}
},
data () {
return {

View File

@@ -11,6 +11,7 @@ export const FinancialListMixin = {
checkFlag: true,
/* 单据Excel是否开启 */
isShowExcel: false,
setTimeFlag: null,
billExcelUrl: '',
prefixNo: '',
waitTotal: 0,
@@ -191,6 +192,58 @@ export const FinancialListMixin = {
}
})
},
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)
},
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)
},
handleSearchOrgan(value) {
let that = this
if(this.setTimeFlag != null){
clearTimeout(this.setTimeFlag);
}
this.setTimeFlag = setTimeout(()=>{
findBySelectOrgan({key: value}).then((res) => {
if(res) {
that.organList = res;
}
})
},500)
},
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)
},
onDateChange: function (value, dateString) {
this.queryParam.beginTime=dateString[0]
this.queryParam.endTime=dateString[1]

View File

@@ -27,6 +27,7 @@ export const FinancialModalMixin = {
},
/* 原始审核是否开启 */
checkFlag: true,
setTimeFlag: null,
spans: {
labelCol1: {span: 2},
wrapperCol1: {span: 22},
@@ -100,7 +101,7 @@ export const FinancialModalMixin = {
},
initSupplier() {
let that = this;
findBySelectSup({}).then((res)=>{
findBySelectSup({organId: this.model.organId}).then((res)=>{
if(res) {
that.supList = res;
}
@@ -108,7 +109,7 @@ export const FinancialModalMixin = {
},
initCustomer() {
let that = this;
findBySelectCus({}).then((res)=>{
findBySelectCus({organId: this.model.organId}).then((res)=>{
if(res) {
that.cusList = res;
}
@@ -116,7 +117,7 @@ export const FinancialModalMixin = {
},
initOrgan() {
let that = this;
findBySelectOrgan({}).then((res)=>{
findBySelectOrgan({organId: this.model.organId}).then((res)=>{
if(res) {
that.organList = res;
}
@@ -124,7 +125,7 @@ export const FinancialModalMixin = {
},
initRetail() {
let that = this;
findBySelectRetail({}).then((res)=>{
findBySelectRetail({organId: this.model.organId}).then((res)=>{
if(res) {
that.retailList = res;
}
@@ -187,6 +188,58 @@ export const FinancialModalMixin = {
}
})
},
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)
},
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)
},
handleSearchOrgan(value) {
let that = this
if(this.setTimeFlag != null){
clearTimeout(this.setTimeFlag);
}
this.setTimeFlag = setTimeout(()=>{
findBySelectOrgan({key: value}).then((res) => {
if(res) {
that.organList = res;
}
})
},500)
},
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)
},
//选择供应商或客户的触发事件
onChangeOrgan(value) {
this.accountTable.dataSource = []

View File

@@ -24,7 +24,12 @@
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款会员">
<a-select placeholder="请选择付款会员" v-decorator="[ 'organId', validatorRules.organId ]"
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
:dropdownMatchSelectWidth="false" showSearch 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">
{{ item.supplier }}
</a-select-option>

View File

@@ -24,7 +24,7 @@
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="往来单位">
<a-select placeholder="请选择往来单位" v-decorator="[ 'organId', validatorRules.organId ]"
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children" @search="handleSearchOrgan">
<div slot="dropdownRender" slot-scope="menu">
<v-nodes :vnodes="menu" />
<a-divider style="margin: 4px 0;" />

View File

@@ -24,7 +24,7 @@
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="往来单位">
<a-select placeholder="请选择往来单位" v-decorator="[ 'organId', validatorRules.organId ]"
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children" @search="handleSearchOrgan">
<div slot="dropdownRender" slot-scope="menu">
<v-nodes :vnodes="menu" />
<a-divider style="margin: 4px 0;" />

View File

@@ -24,7 +24,7 @@
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户">
<a-select placeholder="请选择客户" v-decorator="[ 'organId', validatorRules.organId ]"
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children" @change="onChangeOrgan">
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children" @change="onChangeOrgan" @search="handleSearchCustomer">
<div slot="dropdownRender" slot-scope="menu">
<v-nodes :vnodes="menu" />
<a-divider style="margin: 4px 0;" />

View File

@@ -24,7 +24,7 @@
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商">
<a-select placeholder="请选择供应商" v-decorator="[ 'organId', validatorRules.organId ]"
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children" @change="onChangeOrgan">
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children" @change="onChangeOrgan" @search="handleSearchSupplier">
<div slot="dropdownRender" slot-scope="menu">
<v-nodes :vnodes="menu" />
<a-divider style="margin: 4px 0;" />