给商品库存流水界面增加查询条件
This commit is contained in:
parent
69c13f64b3
commit
eb7fc23fa5
@ -15,6 +15,36 @@
|
||||
<template slot="footer">
|
||||
<a-button key="back" @click="handleCancel">取消</a-button>
|
||||
</template>
|
||||
<!-- 查询区域 -->
|
||||
<div class="table-page-search-wrapper">
|
||||
<!-- 搜索区域 -->
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="8" :sm="24">
|
||||
<a-form-item label="单据编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入单据编号" v-model="queryParam.number"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="8" :sm="24">
|
||||
<a-form-item label="单据日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-range-picker
|
||||
style="width:100%"
|
||||
v-model="queryParam.createTimeRange"
|
||||
format="YYYY-MM-DD"
|
||||
:placeholder="['开始时间', '结束时间']"
|
||||
@change="onDateChange"
|
||||
@ok="onDateOk"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="8" :sm="24">
|
||||
<a-button type="primary" @click="searchQuery">查询</a-button>
|
||||
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
|
||||
<a-button style="margin-left: 8px" @click="exportExcel" icon="download">导出</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- table区域-begin -->
|
||||
<a-table
|
||||
bordered
|
||||
@ -40,8 +70,10 @@
|
||||
import BillDetail from '../../bill/dialog/BillDetail'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import JEllipsis from '@/components/jeecg/JEllipsis'
|
||||
import {findBillDetailByNumber, findFinancialDetailByNumber} from '@/api/api'
|
||||
import {mixinDevice} from '@/utils/mixin'
|
||||
import { findBillDetailByNumber } from '@/api/api'
|
||||
import { openDownloadDialog, sheet2blob} from "@/utils/util"
|
||||
import { mixinDevice } from '@/utils/mixin'
|
||||
|
||||
export default {
|
||||
name: "MaterialInOutList",
|
||||
mixins:[JeecgListMixin, mixinDevice],
|
||||
@ -55,10 +87,17 @@
|
||||
visible: false,
|
||||
disableMixinCreated: false,
|
||||
toFromType: '',
|
||||
currentMaterialId: '',
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
depotIds: '',
|
||||
materialId:'',
|
||||
number: '',
|
||||
beginTime: '',
|
||||
endTime: '',
|
||||
},
|
||||
ipagination:{
|
||||
pageSizeOptions: ['10', '20', '30', '100', '200']
|
||||
},
|
||||
tabKey: "1",
|
||||
// 表头
|
||||
@ -101,14 +140,16 @@
|
||||
},
|
||||
methods: {
|
||||
getQueryParams() {
|
||||
let param = Object.assign({}, this.queryParam, this.isorter);
|
||||
param.field = this.getQueryField();
|
||||
param.currentPage = this.ipagination.current;
|
||||
param.pageSize = this.ipagination.pageSize;
|
||||
return param;
|
||||
let param = Object.assign({}, this.queryParam, this.isorter)
|
||||
param.field = this.getQueryField()
|
||||
param.materialId = this.currentMaterialId
|
||||
param.currentPage = this.ipagination.current
|
||||
param.pageSize = this.ipagination.pageSize
|
||||
return param
|
||||
},
|
||||
show(record, depotIds) {
|
||||
this.model = Object.assign({}, record);
|
||||
this.currentMaterialId = record.id
|
||||
this.visible = true;
|
||||
this.queryParam.depotIds = depotIds
|
||||
this.queryParam.materialId = record.id
|
||||
@ -121,6 +162,13 @@
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
onDateChange: function (value, dateString) {
|
||||
this.queryParam.beginTime=dateString[0];
|
||||
this.queryParam.endTime=dateString[1];
|
||||
},
|
||||
onDateOk(value) {
|
||||
console.log(value);
|
||||
},
|
||||
myHandleDetail(record) {
|
||||
let that = this
|
||||
this.toFromType = record.fromType
|
||||
@ -131,6 +179,15 @@
|
||||
that.$refs.billDetail.title="详情";
|
||||
}
|
||||
})
|
||||
},
|
||||
exportExcel() {
|
||||
let aoa = [['单据编号', '类型', '条码', '名称', '仓库名称', '数量', '日期']]
|
||||
for (let i = 0; i < this.dataSource.length; i++) {
|
||||
let ds = this.dataSource[i]
|
||||
let item = [ds.number, ds.type, ds.barCode, ds.materialName, ds.depotName, ds.basicNumber, ds.operTime]
|
||||
aoa.push(item)
|
||||
}
|
||||
openDownloadDialog(sheet2blob(aoa), '商品库存流水')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user