|
@@ -2,15 +2,38 @@
|
|
<!-- 出库 -->
|
|
<!-- 出库 -->
|
|
<div class="homeworkPath">
|
|
<div class="homeworkPath">
|
|
<div class="top">
|
|
<div class="top">
|
|
- <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
|
|
|
|
-
|
|
|
|
|
|
+ <el-input placeholder="请输入内容" v-model="input" clearable style="width:200px"> </el-input>
|
|
|
|
+ <el-date-picker style="margin: 10px;width:250px" v-model="startTime" type="datetime" placeholder="起始日期"></el-date-picker>
|
|
|
|
+ <el-date-picker style="margin: 10px;width:250px" v-model="endTime" type="datetime" placeholder="结束日期"></el-date-picker>
|
|
<el-button type="primary" class="btn" @click="onclick">
|
|
<el-button type="primary" class="btn" @click="onclick">
|
|
<i class="el-icon-search"></i>查询
|
|
<i class="el-icon-search"></i>查询
|
|
</el-button>
|
|
</el-button>
|
|
<el-button type="primary" class="btn" @click="insert"> 出库 </el-button>
|
|
<el-button type="primary" class="btn" @click="insert"> 出库 </el-button>
|
|
|
|
+ <el-button type="primary" @click="exportData()" ><i class="el-icon-download"></i>导出(Excel)</el-button>
|
|
</div>
|
|
</div>
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
- <mergeRowTable v-bind.sync="option1" ref="table">
|
|
|
|
|
|
+ <el-tab-pane label="全部" name="first">
|
|
|
|
+ <mergeRowTable v-bind.sync="option1" ref="excelDom" @func="calculate">
|
|
|
|
+ <el-table-column fixed="right" label="操作" width="50">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button
|
|
|
|
+ @click="click(scope.row.resultId)"
|
|
|
|
+ type="text"
|
|
|
|
+ size="small"
|
|
|
|
+ :disabled="scope.row.isEdit!=1"
|
|
|
|
+ >修改</el-button
|
|
|
|
+ >
|
|
|
|
+ <!-- <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ size="small"
|
|
|
|
+ @click="deleteclick(scope.row.resultId)"
|
|
|
|
+ >删除</el-button > -->
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </mergeRowTable>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+ <el-tab-pane label="待计量" name="second">
|
|
|
|
+ <mergeRowTable v-bind.sync="option1" ref="excelDom">
|
|
<el-table-column fixed="right" label="操作" width="50">
|
|
<el-table-column fixed="right" label="操作" width="50">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
<el-button
|
|
@@ -28,12 +51,18 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</mergeRowTable>
|
|
</mergeRowTable>
|
|
|
|
+ </el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
|
|
+ <div class="count" style="margin-right:50px;font-size:18px;">
|
|
|
|
+ <div style="display:flex;flex-direction:row-reverse">总车数:{{dataTabel.length}}</div>
|
|
|
|
+ <div style="display:flex;flex-direction:row-reverse">标重总吨位:{{sum}}</div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { getCookie } from "@/utils/util.js";
|
|
import { getCookie } from "@/utils/util.js";
|
|
|
|
+import { sjTime } from "@/utils/sharedJsFile";
|
|
export default {
|
|
export default {
|
|
name: "inplantTMS",
|
|
name: "inplantTMS",
|
|
data() {
|
|
data() {
|
|
@@ -47,34 +76,70 @@ export default {
|
|
comparison: "resultNumber",
|
|
comparison: "resultNumber",
|
|
columnIndexs: [0, 1, 2, 3, 4, 5],
|
|
columnIndexs: [0, 1, 2, 3, 4, 5],
|
|
},
|
|
},
|
|
|
|
+ startTime: null,
|
|
|
|
+ endTime: null,
|
|
|
|
+ tableTitle: "港口出库表",
|
|
|
|
+ dataTabel:[],
|
|
|
|
+ sum:0,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
filters: {},
|
|
filters: {},
|
|
|
|
+ mounted(){
|
|
|
|
+ this.onclick();
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
onclick() {
|
|
onclick() {
|
|
if (this.activeName == "first") {
|
|
if (this.activeName == "first") {
|
|
- this.option1.requestUrl =
|
|
|
|
- "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input;
|
|
|
|
|
|
+ if(this.checkSEDate()==true){
|
|
|
|
+ this.option1.requestUrl =
|
|
|
|
+ "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input
|
|
|
|
+ +"&activeName="+this.activeName
|
|
|
|
+ +"&startTime="+sjTime(this.startTime)
|
|
|
|
+ +"&endTime="+sjTime(this.endTime);
|
|
|
|
+ }else{
|
|
|
|
+ this.option1.requestUrl =
|
|
|
|
+ "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input
|
|
|
|
+ +"&activeName="+this.activeName;
|
|
|
|
+ }
|
|
|
|
+ }else if(this.activeName == "second"){
|
|
|
|
+ if(this.checkSEDate()==true){
|
|
|
|
+ this.option1.requestUrl =
|
|
|
|
+ "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input
|
|
|
|
+ +"&activeName="+this.activeName
|
|
|
|
+ +"&startTime="+sjTime(this.startTime)
|
|
|
|
+ +"&endTime="+sjTime(this.endTime);
|
|
|
|
+ }else{
|
|
|
|
+ this.option1.requestUrl =
|
|
|
|
+ "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input
|
|
|
|
+ +"&activeName="+this.activeName;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
insert() {
|
|
insert() {
|
|
this.$router.push("/addWagonLoadCopy");
|
|
this.$router.push("/addWagonLoadCopy");
|
|
},
|
|
},
|
|
handleClick(tab, event) {
|
|
handleClick(tab, event) {
|
|
- console.log(tab, event);
|
|
|
|
|
|
+ this.onclick();
|
|
},
|
|
},
|
|
click(resultId) {
|
|
click(resultId) {
|
|
- console.log("res",getCookie("orgCode"));
|
|
|
|
- if (
|
|
|
|
- getCookie("orgCode") == "yuanliaogongsi" ||
|
|
|
|
- getCookie("orgCode") == "dagangadmin"
|
|
|
|
- ) {
|
|
|
|
- this.$router.push("/editOutBoundWagon/" + resultId);
|
|
|
|
-
|
|
|
|
- } else {
|
|
|
|
- this.$message.warning("权限不足,请联系部门管理员!");
|
|
|
|
- }
|
|
|
|
|
|
+ this.$router.push("/editOutBoundWagon/" + resultId);
|
|
},
|
|
},
|
|
|
|
+ //起止时间校验
|
|
|
|
+ checkSEDate(){
|
|
|
|
+ if(this.startTime && this.endTime && this.startTime<=this.endTime){
|
|
|
|
+ return true;
|
|
|
|
+ }else{
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ calculate(res){
|
|
|
|
+ console.log("res",res);
|
|
|
|
+ this.dataTabel=res.list;
|
|
|
|
+ this.sum=0
|
|
|
|
+ this.dataTabel.forEach(item => {
|
|
|
|
+ this.sum+=item.weight;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|