|
@@ -2,7 +2,20 @@
|
|
|
<template>
|
|
|
<div class="steel_inbound">
|
|
|
<div class="sache">
|
|
|
- <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
|
|
|
+ <span>详单时间:</span>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="startTime"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="选择日期"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ <span>至</span>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="endTime"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="选择日期"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
<el-button type="primary" class="btn" @click="onclick">
|
|
|
<i class="el-icon-search"></i>查询
|
|
|
</el-button>
|
|
@@ -33,9 +46,12 @@
|
|
|
|
|
|
<script>
|
|
|
import { getCookie } from "@/utils/util.js";
|
|
|
+import { sjTime } from '@/utils/sharedJsFile';
|
|
|
export default {
|
|
|
data(){
|
|
|
return{
|
|
|
+ startTime: null,
|
|
|
+ endTime: null,
|
|
|
//合计净重
|
|
|
totalNetWeight:null,
|
|
|
//合计金额
|
|
@@ -90,41 +106,71 @@ export default {
|
|
|
methods:{
|
|
|
func(res){
|
|
|
console.log(res.list)
|
|
|
+ var totalWeight = 0;
|
|
|
+ var totalAllMoney = 0;
|
|
|
res.list.forEach(e => {
|
|
|
console.log(e.resultNetWeight)
|
|
|
- this.totalNetWeight = this.totalNetWeight + e.resultNetWeight
|
|
|
- this.totalMoney = this.totalMoney + e.detailsAmount
|
|
|
+ totalWeight = totalWeight + e.resultNetWeight
|
|
|
+ totalAllMoney = totalAllMoney + e.detailsAmount
|
|
|
console.log(e.detailsAmount);
|
|
|
});
|
|
|
+ this.totalNetWeight = totalWeight.toFixed(2) + 't';
|
|
|
+ this.totalMoney = totalAllMoney.toFixed(2) + '元'
|
|
|
},
|
|
|
//未结算数据
|
|
|
options1GetRequestUrl(){
|
|
|
if(getCookie("orgCode") == "chengyunshang"){
|
|
|
this.ssoId=getCookie('userId');
|
|
|
- this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&carrierSsoId="+ getCookie('userId');
|
|
|
+ this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&carrierSsoId="+ getCookie('userId') + "&startTime=null&endTime=null&i=" +new Date();
|
|
|
}else if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode")=="zidonghuabu"||getCookie("orgCode")=="wuliuchuyunzhongxin"){
|
|
|
- this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0"
|
|
|
+ this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&startTime=null&endTime=null&i=" +new Date();
|
|
|
}else{
|
|
|
- this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&userId=" + getCookie("orgCode");
|
|
|
+ this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&userId=" + getCookie("orgCode") + "&startTime=null&endTime=null&i=" +new Date();
|
|
|
}
|
|
|
},
|
|
|
//已结算数据
|
|
|
options2GetRequestUrl(){
|
|
|
if(getCookie("orgCode") == "chengyunshang"){
|
|
|
this.ssoId=getCookie('userId');
|
|
|
- this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&carrierSsoId="+ getCookie('userId');
|
|
|
+ this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&carrierSsoId="+ getCookie('userId') + "&startTime=null&endTime=null&i=" +new Date();
|
|
|
}else if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode")=="zidonghuabu"||getCookie("orgCode")=="wuliuchuyunzhongxin"){
|
|
|
- this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1"
|
|
|
+ this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" + "&startTime=null&endTime=null&i=" +new Date();
|
|
|
}else{
|
|
|
- this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&userId=" + getCookie("orgCode");
|
|
|
+ this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&userId=" + getCookie("orgCode") + "&startTime=null&endTime=null&i=" +new Date();
|
|
|
}
|
|
|
},
|
|
|
toInsert() {
|
|
|
this.$router.push("/insertCheckInventory");
|
|
|
},
|
|
|
onclick(){
|
|
|
- console.log("查询待定值")
|
|
|
- // this.options.requestUrl = "/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=1&con="+this.input;
|
|
|
+ let startTime = null;
|
|
|
+ let endTime = null;
|
|
|
+ if(this.startTime){
|
|
|
+ startTime = sjTime(this.startTime);
|
|
|
+ }
|
|
|
+ if(this.endTime){
|
|
|
+ endTime = sjTime(this.endTime);
|
|
|
+ }
|
|
|
+ if(startTime && endTime){
|
|
|
+ if(startTime < endTime){
|
|
|
+ if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"||getCookie("orgCode")=="wuliuchuyunzhongxin"){
|
|
|
+ this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0" + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
|
|
|
+ this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
|
|
|
+ }else if(getCookie("orgCode") == "chengyunshang"){
|
|
|
+ this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&carrierSsoId="+ getCookie('userId') + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
|
|
|
+ this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&carrierSsoId="+ getCookie('userId') + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
|
|
|
+ }else{
|
|
|
+ this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&userId=" + getCookie("orgCode") + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
|
|
|
+ this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&userId=" + getCookie("orgCode") + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.startTime = null;
|
|
|
+ this.endTime = null;
|
|
|
+ this.$message.warning('开始时间要比结束时间早')
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
},
|
|
|
//运输订单点击浏览的事件
|
|
|
select(){
|