|
@@ -347,12 +347,23 @@
|
|
|
@endcan
|
|
@endcan
|
|
|
</div>
|
|
</div>
|
|
|
<div class="row my-3">
|
|
<div class="row my-3">
|
|
|
- <div class="col-6 card">
|
|
|
|
|
- <div class="card-header">
|
|
|
|
|
-
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="card-body">
|
|
|
|
|
- <div id="weight"></div>
|
|
|
|
|
|
|
+ <div class="col-6">
|
|
|
|
|
+ <div class="card">
|
|
|
|
|
+ <div class="card-header">
|
|
|
|
|
+ <div class="row">
|
|
|
|
|
+ <el-date-picker size="small" class="col-6 date" @blur="loadWeightInfo()" type="daterange" align="right"
|
|
|
|
|
+ v-model="searchOption.weightDate" unlink-panels range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd">
|
|
|
|
|
+ </el-date-picker>
|
|
|
|
|
+ <label class="col-3 offset-3">
|
|
|
|
|
+ <select class="form-control rounded" v-model="searchOption.weightSelect" @change="switchWeightDate()">
|
|
|
|
|
+ <option v-for="(date,i) in dateOptions" :value="i">@{{ date.text }}</option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </label>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="card-body row">
|
|
|
|
|
+ <div id="weight" class="col-12" style="min-height: 500px"></div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -419,6 +430,16 @@
|
|
|
}
|
|
}
|
|
|
}]
|
|
}]
|
|
|
},
|
|
},
|
|
|
|
|
+ dateOptions:[{text:'当天',start:moment().format('yyyy-MM-DD'),end:moment().format('yyyy-MM-DD')},
|
|
|
|
|
+ {text:"昨天",start:moment().subtract("1","day").format('yyyy-MM-DD'),end:moment().subtract("1","day").format('yyyy-MM-DD')},
|
|
|
|
|
+ {text:"本周",start:moment().weekday(1).format('yyyy-MM-DD'),end:moment().weekday(7).format('yyyy-MM-DD')},
|
|
|
|
|
+ {text:"上周",start:moment().weekday(-6).format('yyyy-MM-DD'),end:moment().weekday(0).format('yyyy-MM-DD')},
|
|
|
|
|
+ {text:"本月",start:moment().startOf("month").format('yyyy-MM-DD'),end:moment().endOf("month").format('yyyy-MM-DD')},
|
|
|
|
|
+ {text:"上月",start:moment().month(moment().month() - 1).startOf('month').format('yyyy-MM-DD'),end:moment().month(moment().month() - 1).endOf('month').format('yyyy-MM-DD')},
|
|
|
|
|
+ {text:"本季度",start:moment(moment().quarter(moment().quarter()).startOf('quarter').valueOf()).format('yyyy-MM-DD'),end:moment(moment().quarter(moment().quarter()).endOf('quarter').valueOf()).format('yyyy-MM-DD')},
|
|
|
|
|
+ {text:"上季度",start:moment(moment().quarter(moment().quarter() - 1).startOf('quarter').valueOf()).format('yyyy-MM-DD'),end:moment(moment().quarter(moment().quarter() - 1).endOf('quarter').valueOf()).format('yyyy-MM-DD')},
|
|
|
|
|
+ {text:"本年",start:moment(moment().year(moment().year()).startOf('year').valueOf()).format('yyyy-MM-DD'),end:moment(moment().year(moment().year()).endOf('year').valueOf()).format('yyyy-MM-DD')},
|
|
|
|
|
+ {text:"去年",start:moment(moment().year(moment().year() - 1).startOf('year').valueOf()).format('yyyy-MM-DD'),end:moment(moment().year(moment().year() - 1).endOf('year').valueOf()).format('yyyy-MM-DD')}],
|
|
|
logisticsCountingRecordsData: [moment().subtract('1', 'month').format('yyyy-MM-DD'),
|
|
logisticsCountingRecordsData: [moment().subtract('1', 'month').format('yyyy-MM-DD'),
|
|
|
moment(new Date()).format('yyyy-MM-DD')],
|
|
moment(new Date()).format('yyyy-MM-DD')],
|
|
|
warehouseCountingRecordsData: [moment().subtract('1', 'month').format('yyyy-MM-DD'),
|
|
warehouseCountingRecordsData: [moment().subtract('1', 'month').format('yyyy-MM-DD'),
|
|
@@ -464,7 +485,11 @@
|
|
|
laborReportsCountingRecordsYearShow: false,
|
|
laborReportsCountingRecordsYearShow: false,
|
|
|
laborReportsCountingRecordsStart: moment().subtract('1', 'month').format('yyyy-MM-DD'),
|
|
laborReportsCountingRecordsStart: moment().subtract('1', 'month').format('yyyy-MM-DD'),
|
|
|
laborReportsCountingRecordsEnd: moment(new Date()).format('yyyy-MM-DD'),
|
|
laborReportsCountingRecordsEnd: moment(new Date()).format('yyyy-MM-DD'),
|
|
|
- load:{},
|
|
|
|
|
|
|
+ cardPool:{},
|
|
|
|
|
+ searchOption:{
|
|
|
|
|
+ weightDate:[],
|
|
|
|
|
+ weightSelect:"",
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
watch:{
|
|
watch:{
|
|
|
selectOrderOwners:function(val,oldval){
|
|
selectOrderOwners:function(val,oldval){
|
|
@@ -485,6 +510,8 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted: function () {
|
|
mounted: function () {
|
|
|
|
|
+ this.searchOption.weightSelect = 5;
|
|
|
|
|
+ this.searchOption.weightDate = [this.dateOptions[5].start,this.dateOptions[5].end];
|
|
|
$('#list').removeClass('d-none');
|
|
$('#list').removeClass('d-none');
|
|
|
let _this = this;
|
|
let _this = this;
|
|
|
this.warehouses = {
|
|
this.warehouses = {
|
|
@@ -517,6 +544,8 @@
|
|
|
this.laborReportsUserGroupsCountChart = echarts.init(document.getElementById('laborReportsUserGroupsCount'));
|
|
this.laborReportsUserGroupsCountChart = echarts.init(document.getElementById('laborReportsUserGroupsCount'));
|
|
|
this.initLaborReportsUserGroupsCountChart();
|
|
this.initLaborReportsUserGroupsCountChart();
|
|
|
|
|
|
|
|
|
|
+ this.cardPool.weight = echarts.init(document.getElementById("weight"));
|
|
|
|
|
+ this.loadWeightInfo();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
switchDataPanel_forOrderCountingRecords(fromUnit, toUnit) {
|
|
switchDataPanel_forOrderCountingRecords(fromUnit, toUnit) {
|
|
@@ -855,10 +884,56 @@
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
loadWeightInfo(){
|
|
loadWeightInfo(){
|
|
|
- this.$set(this.load,"weight",true);
|
|
|
|
|
- /*window.tempTip.postBasicRequest("{{url('apiLocal/control/panel/menu/weightApi')}}",{},res=>{
|
|
|
|
|
-
|
|
|
|
|
- });*/
|
|
|
|
|
|
|
+ window.tempTip.setDuration(3000);
|
|
|
|
|
+ if (!this.searchOption.weightDate[0]){
|
|
|
|
|
+ window.tempTip.show("开始时间未选择");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!this.searchOption.weightDate[1]){
|
|
|
|
|
+ window.tempTip.show("结束时间未选择");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.cardPool.weight.showLoading('default',{text:"加 载 中",color:'#C0C0C0'});
|
|
|
|
|
+ let url = "{{url('apiLocal/control/panel/menu/weightApi')}}";
|
|
|
|
|
+ let params = {start:this.searchOption.weightDate[0],end:this.searchOption.weightDate[1]};
|
|
|
|
|
+ window.tempTip.postBasicRequest(url,params,res=>{
|
|
|
|
|
+ this.cardPool.weight.hideLoading();
|
|
|
|
|
+ this.cardPool.weight.setOption(this._setWeightData(res.title,res.data));
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ switchWeightDate(){
|
|
|
|
|
+ let obj = this.dateOptions[this.searchOption.weightSelect];
|
|
|
|
|
+ this.searchOption.weightDate = [obj.start,obj.end];
|
|
|
|
|
+ this.loadWeightInfo();
|
|
|
|
|
+ },
|
|
|
|
|
+ _setWeightData(title, data){
|
|
|
|
|
+ return {
|
|
|
|
|
+ tooltip: {
|
|
|
|
|
+ trigger: 'item',
|
|
|
|
|
+ formatter: function (params) {
|
|
|
|
|
+ return params.data.date+"<br>"+"总量:<span class='text-success font-weight-bold'>"+params.data.total+"</span><br>"+"未称:<span class='text-info font-weight-bold'>"+params.data.count+"</span>";
|
|
|
|
|
+ }
|
|
|
|
|
+ }, xAxis: {
|
|
|
|
|
+ data: title
|
|
|
|
|
+ }, yAxis: {
|
|
|
|
|
+ axisLabel: {
|
|
|
|
|
+ show: true,
|
|
|
|
|
+ interval: 'auto',
|
|
|
|
|
+ formatter: '{value} %'
|
|
|
|
|
+ },
|
|
|
|
|
+ }, label:{
|
|
|
|
|
+ show:true,
|
|
|
|
|
+ position: 'top',
|
|
|
|
|
+ formatter: '{c}%',
|
|
|
|
|
+ color:"red"
|
|
|
|
|
+ }, series: [{
|
|
|
|
|
+ type: "bar",
|
|
|
|
|
+ data: data,
|
|
|
|
|
+ itemStyle:{
|
|
|
|
|
+ color:"RGB(62,157,231)",
|
|
|
|
|
+ }
|
|
|
|
|
+ }]
|
|
|
|
|
+ };
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|