|
|
@@ -156,25 +156,27 @@
|
|
|
<div class="card">
|
|
|
<div class="card-header">
|
|
|
<div class="block row">
|
|
|
- <span class="demonstration"></span>
|
|
|
- <el-date-picker
|
|
|
- size="small"
|
|
|
- style="width: 60%;"
|
|
|
- @blur="logisticsCountingRecordsApi()"
|
|
|
- v-model="logisticsCountingRecordsData"
|
|
|
- type="daterange"
|
|
|
- align="right"
|
|
|
- unlink-panels
|
|
|
- range-separator="-"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- :picker-options="pickerOptions">
|
|
|
- </el-date-picker>
|
|
|
- <el-select placeholder="请选择对应货主" multiple v-model="selectLogisticsOwners" size="small" style="width: 50%" @change="logisticsCountingRecordsApi('')">
|
|
|
- <el-option label="选择所有" value="all"></el-option>
|
|
|
- <el-option v-for="item in owners" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
|
|
- </el-select>
|
|
|
+ <span class="demonstration"></span>
|
|
|
+ <el-date-picker
|
|
|
+ size="small"
|
|
|
+ style="width: 60%;"
|
|
|
+ @blur="logisticsCountingRecordsApi()"
|
|
|
+ v-model="logisticsCountingRecordsData"
|
|
|
+ type="daterange"
|
|
|
+ align="right"
|
|
|
+ unlink-panels
|
|
|
+ range-separator="-"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ :picker-options="pickerOptions">
|
|
|
+ </el-date-picker>
|
|
|
+ <el-select placeholder="请选择对应货主" multiple v-model="selectLogisticsOwners" size="small"
|
|
|
+ style="width: 50%" @change="logisticsCountingRecordsApi('')">
|
|
|
+ <el-option label="选择所有" value="all"></el-option>
|
|
|
+ <el-option v-for="item in owners" :label="item.name" :value="item.id"
|
|
|
+ :key="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="card-body row">
|
|
|
@@ -205,7 +207,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="card-body row">
|
|
|
- <div id="warehouseCountingRecords" class="col-12"
|
|
|
+ <div id="warehouseCountingRecords" class="col-12"
|
|
|
style=min-height:500px;"></div>
|
|
|
|
|
|
</div>
|
|
|
@@ -302,6 +304,16 @@
|
|
|
v-model="laborReportsCountingRecordUnit">年
|
|
|
</el-button>
|
|
|
</div>
|
|
|
+
|
|
|
+ <div class="ml-2">
|
|
|
+ <el-select placeholder="请选择对应仓库组" multiple v-model="selectUserGroups"
|
|
|
+ size="small"
|
|
|
+ @change="laborReportsCountingRecordApi('')">
|
|
|
+ <el-option label="选择所有" value="all"></el-option>
|
|
|
+ <el-option v-for="item in userWorkgroups" :label="item.name" :value="item.id"
|
|
|
+ :key="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="card-body row">
|
|
|
@@ -330,7 +342,7 @@
|
|
|
</el-date-picker>
|
|
|
</div>
|
|
|
<div class="card-body row">
|
|
|
- <div id="laborReportsUserGroupsCount"
|
|
|
+ <div id="laborReportsUserGroupsCount"
|
|
|
class="col-12"
|
|
|
style="min-height:500px;"></div>
|
|
|
</div>
|
|
|
@@ -340,33 +352,35 @@
|
|
|
</div>
|
|
|
<div class="row my-3">
|
|
|
@can("控制台-称重统计")
|
|
|
- <div class="col-6">
|
|
|
- <div class="card">
|
|
|
- <div class="card-header">
|
|
|
- <div class="row">
|
|
|
- <el-date-picker size="small" class="col-4 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">
|
|
|
- <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>
|
|
|
- <el-select class="col-3" placeholder="请选择对应货主" multiple v-model="selectWeightOwners" size="small" style="width: 50%" @change="loadWeightInfo()">
|
|
|
- <el-option label="选择所有" value="all"></el-option>
|
|
|
- <el-option v-for="item in owners" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
|
|
- </el-select>
|
|
|
+ <div class="col-6">
|
|
|
+ <div class="card">
|
|
|
+ <div class="card-header">
|
|
|
+ <div class="row">
|
|
|
+ <el-date-picker size="small" class="col-4 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">
|
|
|
+ <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>
|
|
|
+ <el-select class="col-3" placeholder="请选择对应货主" multiple v-model="selectWeightOwners"
|
|
|
+ size="small" style="width: 50%" @change="loadWeightInfo()">
|
|
|
+ <el-option label="选择所有" value="all"></el-option>
|
|
|
+ <el-option v-for="item in owners" :label="item.name" :value="item.id"
|
|
|
+ :key="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="card-body row">
|
|
|
+ <div id="weight" class="col-12" style="min-height: 500px"></div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="card-body row">
|
|
|
- <div id="weight" class="col-12" style="min-height: 500px"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
@endcan
|
|
|
{{--异常分布图--}}
|
|
|
<div class="col-6">
|
|
|
@@ -375,13 +389,17 @@
|
|
|
<div class="flex-column">
|
|
|
<el-date-picker size="small" class="col-6 date" @blur="loadExceptionTypeInfo()"
|
|
|
type="daterange" align="right"
|
|
|
- v-model="searchOption.exceptionTypeDate" unlink-panels range-separator="-"
|
|
|
+ v-model="searchOption.exceptionTypeDate" unlink-panels
|
|
|
+ range-separator="-"
|
|
|
start-placeholder="开始日期" end-placeholder="结束日期"
|
|
|
value-format="yyyy-MM-dd">
|
|
|
</el-date-picker>
|
|
|
- <el-select class="col-3" placeholder="请选择对应货主" multiple v-model="selectExceptionTypeOwners" size="small" style="width: 20%" @change="loadExceptionTypeInfo()">
|
|
|
+ <el-select class="col-3" placeholder="请选择对应货主" multiple
|
|
|
+ v-model="selectExceptionTypeOwners" size="small" style="width: 20%"
|
|
|
+ @change="loadExceptionTypeInfo()">
|
|
|
<el-option label="选择所有" value="all"></el-option>
|
|
|
- <el-option v-for="item in owners" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
|
|
+ <el-option v-for="item in owners" :label="item.name" :value="item.id"
|
|
|
+ :key="item.id"></el-option>
|
|
|
</el-select>
|
|
|
<label class="col-3 ">
|
|
|
<select class="form-control rounded" v-model="searchOption.exceptionTypeSelect"
|
|
|
@@ -403,14 +421,17 @@
|
|
|
<div class="card">
|
|
|
<div class="card-header">
|
|
|
<div class="row">
|
|
|
- <el-date-picker size="small" class="col-6 date" @blur="loadOrderPackageReceivedSyncRecordInfo()"
|
|
|
+ <el-date-picker size="small" class="col-6 date"
|
|
|
+ @blur="loadOrderPackageReceivedSyncRecordInfo()"
|
|
|
type="daterange" align="right"
|
|
|
- v-model="searchOption.OrderPackageReceivedSyncRecordDate" unlink-panels range-separator="-"
|
|
|
+ v-model="searchOption.OrderPackageReceivedSyncRecordDate" 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.OrderPackageReceivedSyncRecordSelect"
|
|
|
+ <select class="form-control rounded"
|
|
|
+ v-model="searchOption.OrderPackageReceivedSyncRecordSelect"
|
|
|
@change="switchOrderPackageReceivedSyncRecordDate()">
|
|
|
<option v-for="(date,i) in dateOptions" :value="i">@{{ date.text }}</option>
|
|
|
</select>
|
|
|
@@ -434,22 +455,25 @@
|
|
|
el: "#list",
|
|
|
data: {
|
|
|
myChart: null,
|
|
|
- menus:{!! $menus !!},
|
|
|
- owners:{!! $owners !!},
|
|
|
+ menus: {!! $menus !!},
|
|
|
+ owners: {!! $owners !!},
|
|
|
+ userWorkgroups: {!! $userWorkgroups !!},
|
|
|
selectOrderOwners: [],
|
|
|
+ selectUserGroups: [],
|
|
|
selectLogisticsOwners: [],
|
|
|
selectWeightOwners: [],
|
|
|
selectExceptionTypeOwners: [],
|
|
|
- warehousesOrders:{!! $warehousesOrders !!},
|
|
|
- orderCountingRecords:{},
|
|
|
- logisticsCountingRecords:{},
|
|
|
- warehouseCountingRecords:{},
|
|
|
- laborReportsCountingRecords:{},
|
|
|
- laborReportsUserGroupsCount:{},
|
|
|
+ warehousesOrders: {!! $warehousesOrders !!},
|
|
|
+ orderCountingRecords: {},
|
|
|
+ logisticsCountingRecords: {},
|
|
|
+ warehouseCountingRecords: {},
|
|
|
+ laborReportsCountingRecords: {},
|
|
|
+ laborReportsUserGroupsCount: {},
|
|
|
warehouses: {
|
|
|
"WH01": '松江一仓',
|
|
|
"WH02": '松江二仓',
|
|
|
- "WH03": '嘉定一仓',},
|
|
|
+ "WH03": '嘉定一仓',
|
|
|
+ },
|
|
|
totalOrders: {
|
|
|
total: null,
|
|
|
createOrder: null,
|
|
|
@@ -489,16 +513,52 @@
|
|
|
}
|
|
|
}]
|
|
|
},
|
|
|
- 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')}],
|
|
|
+ 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'),
|
|
|
moment(new Date()).format('yyyy-MM-DD')],
|
|
|
warehouseCountingRecordsData: [moment().subtract('1', 'month').format('yyyy-MM-DD'),
|
|
|
@@ -538,32 +598,40 @@
|
|
|
laborReportsCountingRecordsYearShow: false,
|
|
|
laborReportsCountingRecordsStart: moment().subtract('1', 'month').format('yyyy-MM-DD'),
|
|
|
laborReportsCountingRecordsEnd: moment(new Date()).format('yyyy-MM-DD'),
|
|
|
- cardPool:{},
|
|
|
- searchOption:{
|
|
|
- weightDate:[],
|
|
|
+ cardPool: {},
|
|
|
+ searchOption: {
|
|
|
+ weightDate: [],
|
|
|
exceptionTypeDate: [],
|
|
|
- weightSelect:"",
|
|
|
- exceptionTypeSelect:"",
|
|
|
+ weightSelect: "",
|
|
|
+ exceptionTypeSelect: "",
|
|
|
OrderPackageReceivedSyncRecordDate: [],
|
|
|
- OrderPackageReceivedSyncRecordSelect:"",
|
|
|
+ OrderPackageReceivedSyncRecordSelect: "",
|
|
|
},
|
|
|
},
|
|
|
- watch:{
|
|
|
- selectOrderOwners:function(val,oldval){
|
|
|
- let newindex = val.indexOf('all');
|
|
|
- let oldindex = oldval.indexOf('all');
|
|
|
- if(newindex!=-1 && oldindex==-1 && val.length>1)
|
|
|
- this.selectOrderOwners=['all'];
|
|
|
- else if(newindex!=-1 && oldindex!=-1 && val.length>1)
|
|
|
- this.selectOrderOwners.splice(val.indexOf('all'),1)
|
|
|
+ watch: {
|
|
|
+ selectOrderOwners: function (val, oldval) {
|
|
|
+ let newindex = val.indexOf('all');
|
|
|
+ let oldindex = oldval.indexOf('all');
|
|
|
+ if (newindex != -1 && oldindex == -1 && val.length > 1)
|
|
|
+ this.selectOrderOwners = ['all'];
|
|
|
+ else if (newindex != -1 && oldindex != -1 && val.length > 1)
|
|
|
+ this.selectOrderOwners.splice(val.indexOf('all'), 1)
|
|
|
},
|
|
|
- selectLogisticsOwners:function(val,oldval){
|
|
|
- let newindex = val.indexOf('all');
|
|
|
- let oldindex = oldval.indexOf('all');
|
|
|
- if(newindex!=-1 && oldindex==-1 && val.length>1)
|
|
|
- this.selectLogisticsOwners=['all'];
|
|
|
- else if(newindex!=-1 && oldindex!=-1 && val.length>1)
|
|
|
- this.selectLogisticsOwners.splice(val.indexOf('all'),1)
|
|
|
+ selectUserGroups: function (val, oldval) {
|
|
|
+ let newindex = val.indexOf('all');
|
|
|
+ let oldindex = oldval.indexOf('all');
|
|
|
+ if (newindex != -1 && oldindex == -1 && val.length > 1)
|
|
|
+ this.selectUserGroups = ['all'];
|
|
|
+ else if (newindex != -1 && oldindex != -1 && val.length > 1)
|
|
|
+ this.selectUserGroups.splice(val.indexOf('all'), 1)
|
|
|
+ },
|
|
|
+ selectLogisticsOwners: function (val, oldval) {
|
|
|
+ let newindex = val.indexOf('all');
|
|
|
+ let oldindex = oldval.indexOf('all');
|
|
|
+ if (newindex != -1 && oldindex == -1 && val.length > 1)
|
|
|
+ this.selectLogisticsOwners = ['all'];
|
|
|
+ else if (newindex != -1 && oldindex != -1 && val.length > 1)
|
|
|
+ this.selectLogisticsOwners.splice(val.indexOf('all'), 1)
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -598,7 +666,7 @@
|
|
|
this.warehouseCountingRecordsApi();
|
|
|
|
|
|
@can('人事管理-临时工报表-可见全部组')
|
|
|
- this.laborReportsCountingRecordsChart = echarts.init(document.getElementById('laborReportsCountingRecords'));
|
|
|
+ this.laborReportsCountingRecordsChart = echarts.init(document.getElementById('laborReportsCountingRecords'));
|
|
|
this.initLaborReportsCountingRecordsChart();
|
|
|
this.laborReportsCountingRecordApi('日');
|
|
|
|
|
|
@@ -607,11 +675,11 @@
|
|
|
this.laborReportsUserGroupsCountApi();
|
|
|
@endcan
|
|
|
|
|
|
- @can("控制台-称重统计")
|
|
|
- this.cardPool.weight = echarts.init(document.getElementById("weight"));
|
|
|
+ @can("控制台-称重统计")
|
|
|
+ this.cardPool.weight = echarts.init(document.getElementById("weight"));
|
|
|
this.loadWeightInfo();
|
|
|
@endcan
|
|
|
- this.cardPool.orderPackageReceivedSyncRecord = echarts.init(document.getElementById("orderPackageReceivedSyncRecord"));
|
|
|
+ this.cardPool.orderPackageReceivedSyncRecord = echarts.init(document.getElementById("orderPackageReceivedSyncRecord"));
|
|
|
this.loadOrderPackageReceivedSyncRecordInfo();
|
|
|
this.cardPool.exceptionType = echarts.init(document.getElementById("exceptionType"));
|
|
|
this.loadExceptionTypeInfo();
|
|
|
@@ -926,6 +994,7 @@
|
|
|
formData.append('start', this.laborReportsCountingRecordsStart);
|
|
|
formData.append('end', this.laborReportsCountingRecordsEnd);
|
|
|
formData.append('unit', laborReportsCountingRecordUnit);
|
|
|
+ formData.append('user_workgroup_ids', this.selectUserGroups);
|
|
|
let _this = this;
|
|
|
axios.post('{{url('apiLocal/control/panel/menu/laborReportsCountingRecordApi')}}', formData).then(function (res) {
|
|
|
if (res.status === 200) {
|
|
|
@@ -952,22 +1021,26 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- loadWeightInfo(){
|
|
|
+ loadWeightInfo() {
|
|
|
window.tempTip.setDuration(3000);
|
|
|
- if (!this.searchOption.weightDate[0]){
|
|
|
+ if (!this.searchOption.weightDate[0]) {
|
|
|
window.tempTip.show("开始时间未选择");
|
|
|
return;
|
|
|
}
|
|
|
- if (!this.searchOption.weightDate[1]){
|
|
|
+ if (!this.searchOption.weightDate[1]) {
|
|
|
window.tempTip.show("结束时间未选择");
|
|
|
return;
|
|
|
}
|
|
|
- this.cardPool.weight.showLoading('default',{text:"加 载 中",color:'#C0C0C0'});
|
|
|
+ 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],owner_ids:this.selectWeightOwners};
|
|
|
- window.tempTip.postBasicRequest(url,params,res=>{
|
|
|
+ let params = {
|
|
|
+ start: this.searchOption.weightDate[0],
|
|
|
+ end: this.searchOption.weightDate[1],
|
|
|
+ owner_ids: this.selectWeightOwners
|
|
|
+ };
|
|
|
+ window.tempTip.postBasicRequest(url, params, res => {
|
|
|
this.cardPool.weight.hideLoading();
|
|
|
- let myechart = this.cardPool.weight, option = this._setWeightData(res.title,res.data);
|
|
|
+ let myechart = this.cardPool.weight, option = this._setWeightData(res.title, res.data);
|
|
|
myechart.on('updateAxisPointer', function (event) {
|
|
|
var xAxisInfo = event.axesInfo[0];
|
|
|
if (xAxisInfo) {
|
|
|
@@ -989,60 +1062,70 @@
|
|
|
myechart.setOption(option);
|
|
|
});
|
|
|
},
|
|
|
- loadOrderPackageReceivedSyncRecordInfo(){
|
|
|
+ loadOrderPackageReceivedSyncRecordInfo() {
|
|
|
window.tempTip.setDuration(3000);
|
|
|
- if (!this.searchOption.OrderPackageReceivedSyncRecordDate[0]){
|
|
|
+ if (!this.searchOption.OrderPackageReceivedSyncRecordDate[0]) {
|
|
|
window.tempTip.show("开始时间未选择");
|
|
|
return;
|
|
|
}
|
|
|
- if (!this.searchOption.OrderPackageReceivedSyncRecordDate[1]){
|
|
|
+ if (!this.searchOption.OrderPackageReceivedSyncRecordDate[1]) {
|
|
|
window.tempTip.show("结束时间未选择");
|
|
|
return;
|
|
|
}
|
|
|
- this.cardPool.orderPackageReceivedSyncRecord.showLoading('default',{text:"加 载 中",color:'#C0C0C0'});
|
|
|
+ this.cardPool.orderPackageReceivedSyncRecord.showLoading('default', {
|
|
|
+ text: "加 载 中",
|
|
|
+ color: '#C0C0C0'
|
|
|
+ });
|
|
|
let url = "{{url('apiLocal/control/panel/menu/orderPackageReceivedSyncRecordApi')}}";
|
|
|
- let params = {start:this.searchOption.OrderPackageReceivedSyncRecordDate[0],end:this.searchOption.OrderPackageReceivedSyncRecordDate[1]};
|
|
|
- window.tempTip.postBasicRequest(url,params,res=>{
|
|
|
+ let params = {
|
|
|
+ start: this.searchOption.OrderPackageReceivedSyncRecordDate[0],
|
|
|
+ end: this.searchOption.OrderPackageReceivedSyncRecordDate[1]
|
|
|
+ };
|
|
|
+ window.tempTip.postBasicRequest(url, params, res => {
|
|
|
this.cardPool.orderPackageReceivedSyncRecord.hideLoading();
|
|
|
this.cardPool.orderPackageReceivedSyncRecord.setOption(this._setOrderPackageReceivedSyncRecordData(res.title, res.data));
|
|
|
});
|
|
|
},
|
|
|
loadExceptionTypeInfo() {
|
|
|
window.tempTip.setDuration(3000);
|
|
|
- if (!this.searchOption.exceptionTypeDate[0]){
|
|
|
+ if (!this.searchOption.exceptionTypeDate[0]) {
|
|
|
window.tempTip.show("开始时间未选择");
|
|
|
return;
|
|
|
}
|
|
|
- if (!this.searchOption.exceptionTypeDate[1]){
|
|
|
+ if (!this.searchOption.exceptionTypeDate[1]) {
|
|
|
window.tempTip.show("结束时间未选择");
|
|
|
return;
|
|
|
}
|
|
|
- this.cardPool.exceptionType.showLoading('default',{text:"加 载 中",color:'#C0C0C0'});
|
|
|
+ this.cardPool.exceptionType.showLoading('default', {text: "加 载 中", color: '#C0C0C0'});
|
|
|
let url = "{{url('apiLocal/control/panel/menu/exceptionTypeApi')}}";
|
|
|
- let params = {start:this.searchOption.exceptionTypeDate[0],end:this.searchOption.exceptionTypeDate[1],owner_ids:this.selectExceptionTypeOwners};
|
|
|
- window.tempTip.postBasicRequest(url,params,res=>{
|
|
|
+ let params = {
|
|
|
+ start: this.searchOption.exceptionTypeDate[0],
|
|
|
+ end: this.searchOption.exceptionTypeDate[1],
|
|
|
+ owner_ids: this.selectExceptionTypeOwners
|
|
|
+ };
|
|
|
+ window.tempTip.postBasicRequest(url, params, res => {
|
|
|
this.cardPool.exceptionType.hideLoading();
|
|
|
this.cardPool.exceptionType.setOption(this._setExceptionTypeData(res.data));
|
|
|
});
|
|
|
},
|
|
|
- switchWeightDate(){
|
|
|
+ switchWeightDate() {
|
|
|
let obj = this.dateOptions[this.searchOption.weightSelect];
|
|
|
- this.searchOption.weightDate = [obj.start,obj.end];
|
|
|
+ this.searchOption.weightDate = [obj.start, obj.end];
|
|
|
this.loadWeightInfo();
|
|
|
},
|
|
|
- switchOrderPackageReceivedSyncRecordDate(){
|
|
|
+ switchOrderPackageReceivedSyncRecordDate() {
|
|
|
let obj = this.dateOptions[this.searchOption.OrderPackageReceivedSyncRecordSelect];
|
|
|
- this.searchOption.OrderPackageReceivedSyncRecordDate = [obj.start,obj.end];
|
|
|
+ this.searchOption.OrderPackageReceivedSyncRecordDate = [obj.start, obj.end];
|
|
|
this.loadOrderPackageReceivedSyncRecordInfo();
|
|
|
},
|
|
|
- switchExceptionTypeDate(){
|
|
|
+ switchExceptionTypeDate() {
|
|
|
let obj = this.dateOptions[this.searchOption.exceptionTypeSelect];
|
|
|
- this.searchOption.exceptionTypeDate = [obj.start,obj.end];
|
|
|
+ this.searchOption.exceptionTypeDate = [obj.start, obj.end];
|
|
|
this.loadExceptionTypeInfo();
|
|
|
},
|
|
|
- _setWeightData(title, data){
|
|
|
- let temp = [],len = data.length -1;
|
|
|
- for (let i=0; i < len; i++){
|
|
|
+ _setWeightData(title, data) {
|
|
|
+ let temp = [], len = data.length - 1;
|
|
|
+ for (let i = 0; i < len; i++) {
|
|
|
temp.push({type: 'line', smooth: true, seriesLayoutBy: 'row', emphasis: {focus: 'series'}});
|
|
|
}
|
|
|
temp.push({
|
|
|
@@ -1052,7 +1135,7 @@
|
|
|
center: ['50%', '32%'],
|
|
|
emphasis: {focus: 'data'},
|
|
|
label: {
|
|
|
- formatter: '{b}: {@'+title+'} ({d}%)'
|
|
|
+ formatter: '{b}: {@' + title + '} ({d}%)'
|
|
|
},
|
|
|
encode: {
|
|
|
itemName: 'product',
|
|
|
@@ -1061,7 +1144,7 @@
|
|
|
}
|
|
|
});
|
|
|
console.log(temp)
|
|
|
- return {
|
|
|
+ return {
|
|
|
legend: {},
|
|
|
tooltip: {
|
|
|
trigger: 'axis',
|
|
|
@@ -1076,7 +1159,7 @@
|
|
|
series: temp
|
|
|
};
|
|
|
},
|
|
|
- _setOrderPackageReceivedSyncRecordData(title,data){
|
|
|
+ _setOrderPackageReceivedSyncRecordData(title, data) {
|
|
|
return {
|
|
|
title: {
|
|
|
text: '快递信息同步成功失败占比',
|
|
|
@@ -1085,7 +1168,7 @@
|
|
|
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><br>"+ "承运商:<span class='text-info font-weight-bold'>" + params.data.logistic_name + "</span>";
|
|
|
+ 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><br>" + "承运商:<span class='text-info font-weight-bold'>" + params.data.logistic_name + "</span>";
|
|
|
}
|
|
|
}, xAxis: {
|
|
|
data: title
|
|
|
@@ -1114,8 +1197,8 @@
|
|
|
let resData = [];
|
|
|
data.forEach(item => {
|
|
|
resData.push({
|
|
|
- value:item.count,
|
|
|
- name:item.exception_type
|
|
|
+ value: item.count,
|
|
|
+ name: item.exception_type
|
|
|
})
|
|
|
})
|
|
|
return {
|