Authored by weiqingting

Merge branch 'yohobuy-shop-dev-4.6-20160606' of http://git.yoho.cn/fe/yohobuy-sh…

…op-fe2 into yohobuy-shop-dev-4.6-20160606
... ... @@ -30,20 +30,19 @@
<div class="panel-col">
<input type="text" class="form-control" placeholder="厂家编号" v-model="params.factoryCode">
</div>
<div class="panel-col">
<select class="form-control" v-model="params.sortId">
<option value="">一级类目</option>
<option v-for="select in selects" value="{{select.id}}">{{select.sortName}}</option>
</select>
<div class="panel-col2">
<uc-sort :data-list.sync="params.sortList"></uc-sort>
</div>
</template>
<script>
import calendar from '../../../../components/calendar/index';
import util from 'util';
import sort from '../../../../components/sort/index';
export default {
components: {
comCalendar: calendar
comCalendar: calendar,
ucSort:sort
},
props: {
params: {type: Object, default: {}}
... ... @@ -56,7 +55,7 @@
},
computed: {
EndTime(){
var date=new Date(this.params.beginTime);
let date=new Date(this.params.beginTime);
date.setDate(date.getDate()+7);
this.params.endTime = util.dateFormat(date,"YYYY-MM-dd");
return this.params.endTime;
... ...
... ... @@ -56,7 +56,8 @@
productSkc: "",
productSku: "",
factoryCode: "",
sortId: ""
sortId: "",
sortList:[]
},
grid: {
url: '/report/getReturnGoodsRptList',
... ... @@ -114,6 +115,9 @@
//日报.月报,开始结束时间不传
this.params.beginTime = this.params.endTime = "";
}
if(this.params.sortList.length > 0){
this.params.sortId = this.params.sortList[0].id;
}
var data = {
type: this.params.type,
reqTime: this.getTime(this.params.reqTime),
... ...
... ... @@ -55,7 +55,8 @@
productSkc: "",
productSku: "",
factoryCode: "",
sortId: ""
sortId: "",
sortList:[]
},
grid: {
url: '/report/getOrdersGoodsRptList',
... ... @@ -113,6 +114,10 @@
//月报,日报,开始结束时间不传
this.params.beginTime = this.params.endTime = "";
}
if(this.params.sortList.length > 0){
let length=this.params.sortList.length;
this.params.sortId = this.params.sortList[length-1].id;
}
var data = {
type: this.params.type,
reqTime: this.getTime(this.params.reqTime),
... ...
... ... @@ -18,7 +18,7 @@
<div class="panel">
<div class="panel-heading">
<h2>——4月19日库存报表——</h2>
<h2>——{{dateId}}库存报表——</h2>
</div>
<div class="panel-body nopadding">
... ... @@ -44,7 +44,7 @@
},
data() {
return {
selects: ViewModel.data,
dateId: "",
cards: [
{name: "库存总数量", value: "0"},
{name: "库存总金额(元)", value: "0"},
... ... @@ -58,7 +58,8 @@
productSku: "",
maxSortId: "",
middleSortId: "",
smallSortId: ""
smallSortId: "",
sortList: []
},
grid: {
url: '/bigdata/getStorageStatisticsList',
... ... @@ -96,12 +97,19 @@
this.reload();
},
methods: {
reload() {
reload()
{
if (this.params.sortList.length > 0) {
this.params.maxSortId = this.params.sortList[0]?this.params.sortList[0].id:"";
this.params.middleSortId = this.params.sortList[1]?this.params.sortList[1].id:"";
this.params.smallSortId = this.params.sortList[2]?this.params.sortList[2].id:"";
}
this.$broadcast('grid-reload', this.params);
}
},
events: {
complete(data){
complete(data)
{
let result = data.additionInfo;
if (result) {
this.cards[0].value = result.storageTotalNum ? result.storageTotalNum : 0;
... ... @@ -109,6 +117,10 @@
this.cards[2].value = result.onSaleTotalNum ? result.onSaleTotalNum : 0;
this.cards[3].value = result.preSaleTotalNum ? result.preSaleTotalNum : 0;
this.cards[4].value = result.outSaleTotalNum ? result.outSaleTotalNum : 0;
result.dateId = result.dateId + "";
let month = result.dateId.substr(4, 2);
let date = result.dateId.substr(6, 2);
this.dateId = month + "月" + date + "日";
}
}
... ...
... ... @@ -10,17 +10,17 @@
<div class="panel-col">
<input type="text" class="form-control" placeholder="厂家编号" v-model="params.factory_code">
</div>
<div class="panel-col">
<select class="form-control" v-model="params.maxSortId">
<option value="">一级目录</option>
<option v-for="select in selects" value="{{select.id}}">{{select.sortName}}</option>
</select>
<div class="panel-col2">
<uc-sort :data-list.sync="params.sortList"></uc-sort>
</div>
</template>
<script>
import sort from '../../../../components/sort/index';
export default {
components: {
ucSort:sort
},
props: {
params: {type: Object, default: {}}
},
... ...