给采购、销售、零售统计页面增加供应商、客户的查询条件

This commit is contained in:
季圣华
2023-04-10 23:38:46 +08:00
parent 711b0c309a
commit 32f4c28d7a
3 changed files with 67 additions and 0 deletions

View File

@@ -41,6 +41,16 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<template v-if="toggleSearchStatus"> <template v-if="toggleSearchStatus">
<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">
<a-select-option v-for="(item,index) in supList" :key="index" :value="item.id">
{{ item.supplier }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<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 <a-select
@@ -101,6 +111,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getNowFormatYear, getMpListShort, openDownloadDialog, sheet2blob} from "@/utils/util" import { getNowFormatYear, getMpListShort, openDownloadDialog, sheet2blob} from "@/utils/util"
import {getAction} from '@/api/manage' import {getAction} from '@/api/manage'
import {findBySelectSup} from '@/api/api'
import JEllipsis from '@/components/jeecg/JEllipsis' import JEllipsis from '@/components/jeecg/JEllipsis'
import moment from 'moment' import moment from 'moment'
import Vue from 'vue' import Vue from 'vue'
@@ -123,6 +134,7 @@
materialParam:'', materialParam:'',
beginTime: getNowFormatYear() + '-01-01', beginTime: getNowFormatYear() + '-01-01',
endTime: moment().format('YYYY-MM-DD'), endTime: moment().format('YYYY-MM-DD'),
organId: '',
depotId: '', depotId: '',
mpList: getMpListShort(Vue.ls.get('materialPropertyList')), mpList: getMpListShort(Vue.ls.get('materialPropertyList')),
roleType: Vue.ls.get('roleType'), roleType: Vue.ls.get('roleType'),
@@ -134,6 +146,7 @@
dateFormat: 'YYYY-MM-DD', dateFormat: 'YYYY-MM-DD',
currentDay: moment().format('YYYY-MM-DD'), currentDay: moment().format('YYYY-MM-DD'),
defaultTimeStr: '', defaultTimeStr: '',
supList: [],
depotList: [], depotList: [],
realityPriceTotal: '', realityPriceTotal: '',
tabKey: "1", tabKey: "1",
@@ -163,6 +176,7 @@
} }
}, },
created () { created () {
this.initSupplier()
this.getDepotData() this.getDepotData()
this.defaultTimeStr = [moment(getNowFormatYear() + '-01-01', this.dateFormat), moment(this.currentDay, this.dateFormat)] this.defaultTimeStr = [moment(getNowFormatYear() + '-01-01', this.dateFormat), moment(this.currentDay, this.dateFormat)]
}, },
@@ -204,6 +218,14 @@
this.loading = false; this.loading = false;
}) })
}, },
initSupplier() {
let that = this;
findBySelectSup({}).then((res)=>{
if(res) {
that.supList = res
}
});
},
getDepotData() { getDepotData() {
getAction('/depot/findDepotByCurrentUser').then((res)=>{ getAction('/depot/findDepotByCurrentUser').then((res)=>{
if(res.code === 200){ if(res.code === 200){

View File

@@ -41,6 +41,16 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<template v-if="toggleSearchStatus"> <template v-if="toggleSearchStatus">
<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">
<a-select-option v-for="(item,index) in retailList" :key="index" :value="item.id">
{{ item.supplier }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<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 <a-select
@@ -101,6 +111,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getNowFormatYear, getMpListShort, openDownloadDialog, sheet2blob} from "@/utils/util" import { getNowFormatYear, getMpListShort, openDownloadDialog, sheet2blob} from "@/utils/util"
import {getAction} from '@/api/manage' import {getAction} from '@/api/manage'
import {findBySelectRetail} from '@/api/api'
import JEllipsis from '@/components/jeecg/JEllipsis' import JEllipsis from '@/components/jeecg/JEllipsis'
import moment from 'moment' import moment from 'moment'
import Vue from 'vue' import Vue from 'vue'
@@ -123,6 +134,7 @@
materialParam:'', materialParam:'',
beginTime: getNowFormatYear() + '-01-01', beginTime: getNowFormatYear() + '-01-01',
endTime: moment().format('YYYY-MM-DD'), endTime: moment().format('YYYY-MM-DD'),
organId: '',
depotId: '', depotId: '',
mpList: getMpListShort(Vue.ls.get('materialPropertyList')), mpList: getMpListShort(Vue.ls.get('materialPropertyList')),
roleType: Vue.ls.get('roleType'), roleType: Vue.ls.get('roleType'),
@@ -134,6 +146,7 @@
dateFormat: 'YYYY-MM-DD', dateFormat: 'YYYY-MM-DD',
currentDay: moment().format('YYYY-MM-DD'), currentDay: moment().format('YYYY-MM-DD'),
defaultTimeStr: '', defaultTimeStr: '',
retailList: [],
depotList: [], depotList: [],
realityPriceTotal: '', realityPriceTotal: '',
tabKey: "1", tabKey: "1",
@@ -163,6 +176,7 @@
} }
}, },
created () { created () {
this.initRetail()
this.getDepotData() this.getDepotData()
this.defaultTimeStr = [moment(getNowFormatYear() + '-01-01', this.dateFormat), moment(this.currentDay, this.dateFormat)] this.defaultTimeStr = [moment(getNowFormatYear() + '-01-01', this.dateFormat), moment(this.currentDay, this.dateFormat)]
}, },
@@ -206,6 +220,14 @@
this.loading = false; this.loading = false;
}) })
}, },
initRetail() {
let that = this;
findBySelectRetail({}).then((res)=>{
if(res) {
that.retailList = res
}
});
},
getDepotData() { getDepotData() {
getAction('/depot/findDepotByCurrentUser').then((res)=>{ getAction('/depot/findDepotByCurrentUser').then((res)=>{
if(res.code === 200){ if(res.code === 200){

View File

@@ -41,6 +41,16 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<template v-if="toggleSearchStatus"> <template v-if="toggleSearchStatus">
<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">
<a-select-option v-for="(item,index) in cusList" :key="index" :value="item.id">
{{ item.supplier }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<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 <a-select
@@ -101,6 +111,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getNowFormatYear, getMpListShort, openDownloadDialog, sheet2blob} from "@/utils/util" import { getNowFormatYear, getMpListShort, openDownloadDialog, sheet2blob} from "@/utils/util"
import {getAction} from '@/api/manage' import {getAction} from '@/api/manage'
import {findBySelectCus} from '@/api/api'
import JEllipsis from '@/components/jeecg/JEllipsis' import JEllipsis from '@/components/jeecg/JEllipsis'
import moment from 'moment' import moment from 'moment'
import Vue from 'vue' import Vue from 'vue'
@@ -123,6 +134,8 @@
materialParam:'', materialParam:'',
beginTime: getNowFormatYear() + '-01-01', beginTime: getNowFormatYear() + '-01-01',
endTime: moment().format('YYYY-MM-DD'), endTime: moment().format('YYYY-MM-DD'),
organId: '',
depotId: '',
mpList: getMpListShort(Vue.ls.get('materialPropertyList')), mpList: getMpListShort(Vue.ls.get('materialPropertyList')),
roleType: Vue.ls.get('roleType'), roleType: Vue.ls.get('roleType'),
}, },
@@ -133,6 +146,7 @@
dateFormat: 'YYYY-MM-DD', dateFormat: 'YYYY-MM-DD',
currentDay: moment().format('YYYY-MM-DD'), currentDay: moment().format('YYYY-MM-DD'),
defaultTimeStr: '', defaultTimeStr: '',
cusList: [],
depotList: [], depotList: [],
realityPriceTotal: '', realityPriceTotal: '',
tabKey: "1", tabKey: "1",
@@ -162,6 +176,7 @@
} }
}, },
created () { created () {
this.initCustomer()
this.getDepotData() this.getDepotData()
this.defaultTimeStr = [moment(getNowFormatYear() + '-01-01', this.dateFormat), moment(this.currentDay, this.dateFormat)] this.defaultTimeStr = [moment(getNowFormatYear() + '-01-01', this.dateFormat), moment(this.currentDay, this.dateFormat)]
}, },
@@ -205,6 +220,14 @@
this.loading = false; this.loading = false;
}) })
}, },
initCustomer() {
let that = this;
findBySelectCus({}).then((res)=>{
if(res) {
that.cusList = res
}
});
},
getDepotData() { getDepotData() {
getAction('/depot/findDepotByCurrentUser').then((res)=>{ getAction('/depot/findDepotByCurrentUser').then((res)=>{
if(res.code === 200){ if(res.code === 200){