Browse Source

迭代管理增加查询条件

master
qqkj_jiangzijian 5 years ago
parent
commit
49befbbb5c
  1. 89
      src/views/xm/core/xmIteration/XmIterationMng.vue

89
src/views/xm/core/xmIteration/XmIterationMng.vue

@ -2,12 +2,65 @@
<section> <section>
<el-row v-if="!simple" class="app-container"> <el-row v-if="!simple" class="app-container">
<el-checkbox v-model="gstcVisible" >甘特图</el-checkbox> <el-checkbox v-model="gstcVisible" >甘特图</el-checkbox>
<el-input v-model="filters.key" style="width: 20%;" placeholder="模糊查询">
<el-input v-model="filters.key" style="width: 15%;" placeholder="模糊查询">
<template slot="append"> <template slot="append">
<el-button type="primary" v-loading="load.list" :disabled="load.list==true" v-on:click="searchXmIterations" icon="el-icon-search"></el-button> <el-button type="primary" v-loading="load.list" :disabled="load.list==true" v-on:click="searchXmIterations" icon="el-icon-search"></el-button>
</template> </template>
</el-input> </el-input>
<el-button type="primary" @click="showAdd" icon="el-icon-plus">迭代计划</el-button>
<el-button type="primary" @click="showAdd" icon="el-icon-plus">迭代计划</el-button>
<el-col style="display: contents;color: #606266;font-size: 14px;">创建时间:</el-col>
<el-date-picker v-model="dateRanger" type="daterange" align="right" unlink-panels range-separator=""
start-placeholder="开始日期" end-placeholder="完成日期" value-format="yyyy-MM-dd"
:default-time="['00:00:00','23:59:59']" :picker-options="pickerOptions">
</el-date-picker>
<el-col style="display: contents;color: #606266;font-size: 14px;">上线时间:</el-col>
<el-date-picker v-model="dateRangerOnline" type="daterange" align="right" unlink-panels range-separator=""
start-placeholder="开始日期" end-placeholder="完成日期" value-format="yyyy-MM-dd"
:default-time="['00:00:00','23:59:59']" :picker-options="pickerOptions">
</el-date-picker>
<el-button type="primary" @click="getXmIterations" icon="el-icon-search">查询</el-button>
<el-popover
placement="top-start"
title=""
width="400"
trigger="click" >
<el-row>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">创建时间:</font>
<el-date-picker
v-model="dateRanger"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="完成日期"
value-format="yyyy-MM-dd"
:default-time="['00:00:00','23:59:59']"
:picker-options="pickerOptions"
></el-date-picker>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">上线时间:</font>
<el-date-picker
v-model="dateRangerOnline"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="完成日期"
value-format="yyyy-MM-dd"
:default-time="['00:00:00','23:59:59']"
:picker-options="pickerOptions"
></el-date-picker>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-button size="mini" type="primary" icon="el-icon-search" @click="getXmIterations">查询</el-button>
</el-col>
</el-row>
<el-button slot="reference" icon="el-icon-more" circle></el-button>
</el-popover>
</el-row> </el-row>
<el-row v-if="!simple" class="app-container"> <el-row v-if="!simple" class="app-container">
<!--列表 XmIteration 迭代定义--> <!--列表 XmIteration 迭代定义-->
@ -110,10 +163,22 @@
} }
}, },
data() { data() {
const beginDate = new Date();
const endDate = new Date();
beginDate.setTime(beginDate.getTime() - 3600 * 1000 * 24 * 7 * 4 * 3 );
return { return {
filters: { filters: {
key: '' key: ''
}, },
pickerOptions: util.pickerOptions('datarange'),
dateRanger: [
util.formatDate.format(beginDate, "yyyy-MM-dd"),
util.formatDate.format(endDate, "yyyy-MM-dd")
],//
dateRangerOnline: [
util.formatDate.format(beginDate, "yyyy-MM-dd"),
util.formatDate.format(endDate, "yyyy-MM-dd")
],//线
xmIterations: [],// xmIterations: [],//
pageInfo:{// pageInfo:{//
total:0,//0>0 total:0,//0>0
@ -196,6 +261,14 @@
total: this.pageInfo.total, total: this.pageInfo.total,
count:this.pageInfo.count count:this.pageInfo.count
}; };
if(!this.dateRanger || this.dateRanger.length==0){
this.$message({ message: "创建日期范围不能为空", type: 'error' });
return;
}
if(!this.dateRangerOnline || this.dateRangerOnline.length==0){
this.$message({ message: "上线日期范围不能为空", type: 'error' });
return;
}
if(this.pageInfo.orderFields!=null && this.pageInfo.orderFields.length>0){ if(this.pageInfo.orderFields!=null && this.pageInfo.orderFields.length>0){
let orderBys=[]; let orderBys=[];
for(var i=0;i<this.pageInfo.orderFields.length;i++){ for(var i=0;i<this.pageInfo.orderFields.length;i++){
@ -215,7 +288,10 @@
if(!this.productId && !this.menuId){ if(!this.productId && !this.menuId){
params.branchId=this.userInfo.branchId params.branchId=this.userInfo.branchId
} }
params.createTimeStart=this.dateRanger[0]+" 00:00:00"
params.createTimeEnd=this.dateRanger[1]+" 23:59:59"
params.onlineTimeStart=this.dateRanger[0]+" 00:00:00"
params.onlineTimeEnd=this.dateRanger[1]+" 23:59:59"
this.load.list = true; this.load.list = true;
listXmIterationWithState(params).then((res) => { listXmIterationWithState(params).then((res) => {
var tips=res.data.tips; var tips=res.data.tips;
@ -404,6 +480,7 @@
this.tableHeight = window.innerHeight -clientRect.y - this.$refs.table.$el.offsetTop-subHeight; this.tableHeight = window.innerHeight -clientRect.y - this.$refs.table.$el.offsetTop-subHeight;
this.getXmIterations(); this.getXmIterations();
}); });
// console.log(this.dateRanger,this.dateRangerOnline);
/** /**
listOption([{categoryId:'all',itemCode:'sex'},{categoryId:'all',itemCode:'grade'}] ).then(res=>{ listOption([{categoryId:'all',itemCode:'sex'},{categoryId:'all',itemCode:'grade'}] ).then(res=>{
if(res.data.tips.isOk){ if(res.data.tips.isOk){
@ -417,5 +494,9 @@
</script> </script>
<style scoped> <style scoped>
.more-label-font{
text-align:center;
float:left;
padding-top:10px;
}
</style> </style>
Loading…
Cancel
Save