作者 小范

库存变更记录添加查询时间段条件

... ... @@ -2,44 +2,64 @@
<el-row>
<el-card style="background-color: #F5F7FA">
<!-- 搜索区域-->
<el-row :gutter="10" class="toolbar">
<el-col :span="5">
<el-input v-model="queryInfo.waybill" prefix-icon="el-icon-search" size="small" style="width: 240px"
placeholder="主单号" clearable>
<template slot="prepend">主单号</template>
</el-input>
</el-col>
<el-col :span="5">
<el-input v-model="queryInfo.billfhl" prefix-icon="el-icon-search" size="small" style="width: 240px"
placeholder="分单号" clearable>
<template slot="prepend">分单号</template>
</el-input>
</el-col>
<el-col :span="5">
<div class="my-text-area">
<div class="el-input-group__prepend prepand">出入库类型</div>
<el-select v-model="queryInfo.ietype" placeholder="出入库类型" size="mini" style="width: 140px">
<el-option label="出入库类型-进" value="I"></el-option>
<el-option label="出入库类型-出" value="E"></el-option>
</el-select>
</div>
<!-- <el-input v-model="queryInfo.ietype" prefix-icon="el-icon-search" size="small" style="width: 240px"-->
<!-- placeholder="类型" clearable>-->
<!-- <template slot="prepend">类型</template>-->
<!-- </el-input>-->
</el-col>
<el-col :span="5">
<el-input v-model="queryInfo.custcode" prefix-icon="el-icon-search" size="small" style="width: 240px"
placeholder="货物单号" clearable>
<template slot="prepend">客户代码</template>
</el-input>
</el-col>
<el-col :span="4">
<el-button type="primary" icon="el-icon-search" size="small" @click="getList()">
查询
</el-button>
<!-- <el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button>-->
</el-col>
<el-row class="toolbar" style="height: 100px">
<el-row style="margin-top: -3px">
<el-col :span="5">
<el-input v-model="queryInfo.waybill" prefix-icon="el-icon-search" size="small" style="width: 240px"
placeholder="主单号" clearable>
<template slot="prepend">主单号</template>
</el-input>
</el-col>
<el-col :span="5">
<el-input v-model="queryInfo.billfhl" prefix-icon="el-icon-search" size="small" style="width: 240px"
placeholder="分单号" clearable>
<template slot="prepend">分单号</template>
</el-input>
</el-col>
<el-col :span="5">
<div class="my-text-area">
<div class="el-input-group__prepend prepand">出入库类型</div>
<el-select v-model="queryInfo.ietype" placeholder="出入库类型" size="mini" style="width: 140px">
<el-option label="出入库类型-进" value="I"></el-option>
<el-option label="出入库类型-出" value="E"></el-option>
</el-select>
</div>
<!-- <el-input v-model="queryInfo.ietype" prefix-icon="el-icon-search" size="small" style="width: 240px"-->
<!-- placeholder="类型" clearable>-->
<!-- <template slot="prepend">类型</template>-->
<!-- </el-input>-->
</el-col>
<el-col :span="5">
<el-input v-model="queryInfo.custcode" prefix-icon="el-icon-search" size="small" style="width: 240px"
placeholder="货物单号" clearable>
<template slot="prepend">客户代码</template>
</el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<div class="my-text-area">
<div class="el-input-group__prepend prepand">时间段</div>
<el-date-picker
v-model="searchTime"
type="daterange"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions">
</el-date-picker>
</div>
</el-col>
<el-col :span="4">
<el-button type="primary" icon="el-icon-search" size="small" @click="getList()">
查询
</el-button>
<!-- <el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button>-->
</el-col>
</el-row>
</el-row>
<el-row>
<el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog.addDialog" width="80%" >
... ... @@ -258,6 +278,33 @@
},
data() {
return {
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
queryInfo: {
waybill:'',
billfhl:'',
... ... @@ -267,7 +314,10 @@
pageNum: 1,
// 每页大小
pageSize: 10,
starttime:'',
endtime:'',
},
creattime:'',
total: 0,
// tableData:[],
dialogMap: {
... ... @@ -352,12 +402,28 @@
},
}
},
computed:{
//选中的时间段
searchTime: {
get:function () {
return this.creattime
},
set:function (val) {
this.creattime = val
if (val && val.length===2){
this.queryInfo.starttime = val[0]
this.queryInfo.endtime = val[1]
}
}
},
},
methods: {
zancun(){
this.zancundata.push(this.addForm);
console.log(this.zancundata)
},
getList() {
console.log("queryinfo---->"+this.queryInfo)
this.$refs.tabulation.getList(this.queryInfo)
},
... ...