Browse Source

表格高度+get-print-start-hostsn2接口增加Groupname+写死数据自动化

master
安虹睿 2 years ago
parent
commit
03d1dbeea7
  1. 6
      vue/src/views/pg-fis/basedate/m100Online/budaMB.vue
  2. 6
      vue/src/views/pg-fis/basedate/m100Online/budaZHB.vue
  3. 333
      vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue

6
vue/src/views/pg-fis/basedate/m100Online/budaMB.vue

@ -145,14 +145,14 @@
</el-table> </el-table>
<div class="table-footer"> <div class="table-footer">
<!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"--> <!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"-->
<pagination <!-- <pagination
v-show="totalCount > 0" v-show="totalCount > 0"
:total="totalCount" :total="totalCount"
style="margin-bottom: -5px; float: right" style="margin-bottom: -5px; float: right"
:page.sync="page" :page.sync="page"
:limit.sync="listQuery.MaxResultCount" :limit.sync="listQuery.MaxResultCount"
@pagination="getList" @pagination="getList"
/> /> -->
</div> </div>
</div> </div>
</div> </div>
@ -274,7 +274,7 @@ export default {
isEdit: false, isEdit: false,
formLoading: false, formLoading: false,
tableHeight: document.documentElement.clientHeight - 335, tableHeight: document.documentElement.clientHeight - 335,
tableHeightMB: document.documentElement.clientHeight - 300, tableHeightMB: document.documentElement.clientHeight - 240,
detailTableHeight: 250, detailTableHeight: 250,
details: [], // details: [], //
PLList: [], //线 PLList: [], //线

6
vue/src/views/pg-fis/basedate/m100Online/budaZHB.vue

@ -145,14 +145,14 @@
</el-table> </el-table>
<div class="table-footer"> <div class="table-footer">
<!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"--> <!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"-->
<pagination <!-- <pagination
v-show="totalCount > 0" v-show="totalCount > 0"
:total="totalCount" :total="totalCount"
style="margin-bottom: -5px; float: right" style="margin-bottom: -5px; float: right"
:page.sync="page" :page.sync="page"
:limit.sync="listQuery.MaxResultCount" :limit.sync="listQuery.MaxResultCount"
@pagination="getList" @pagination="getList"
/> /> -->
</div> </div>
</div> </div>
</div> </div>
@ -274,7 +274,7 @@ export default {
isEdit: false, isEdit: false,
formLoading: false, formLoading: false,
tableHeight: document.documentElement.clientHeight - 335, tableHeight: document.documentElement.clientHeight - 335,
tableHeightZHB: document.documentElement.clientHeight - 300, tableHeightZHB: document.documentElement.clientHeight - 240,
detailTableHeight: 250, detailTableHeight: 250,
details: [], // details: [], //
PLList: [], //线 PLList: [], //线

333
vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue

@ -1,8 +1,8 @@
<!--日常打印M100信息模块--> <!--日常打印M100信息模块-->
<template> <template>
<div class="cr-body-content"> <div class="cr-body-content normalPritIndexPage">
<div ref="box"> <div ref="box">
<flexbox class="content-header"> <div class="content-header" id="normalPritIndex-content-header">
<el-form <el-form
:model="listQuery" :model="listQuery"
ref="queryForm" ref="queryForm"
@ -159,23 +159,22 @@
>2Z >2Z
<el-button plain @click="open"> 不会自动关闭 </el-button> --> <el-button plain @click="open"> 不会自动关闭 </el-button> -->
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<div id="app"> <div class="tipper" v-if="tipper != ''" v-html="tipper"></div>
<div style="border: solid 1px darkgray;border-radius: 5px;margin: 5px;padding: 5px;"> <!-- <div class="tipper">
<span ref="sp01">{{ content01 }}</span> <span ref="sp01">{{ content01 }}</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span ref="sp05">{{ content05 }}</span> <span ref="sp05">{{ content05 }}</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span ref="sp07">{{ content07 }}</span> <span ref="sp07">{{ content07 }}</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span ref="sp08">{{ content08 }}</span> <span ref="sp08">{{ content08 }}</span>
</div> </div> -->
</div>
</el-form-item> </el-form-item>
<!-- </el-row> --> <!-- </el-row> -->
</el-form> </el-form>
</flexbox> </div>
</div> </div>
<!--门板重打--> <!--门板重打-->
<el-drawer <el-drawer
@ -307,7 +306,16 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-row> <el-row>
<el-col :md="10" :xs="24"> <el-col :span="24">
<el-form-item
label="产线:"
prop="printNum"
v-show="this.listQuery.productType === 1"
>
{{ this.getPrintProductName(1) }}
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item <el-form-item
label="要打印数量:" label="要打印数量:"
prop="printNum" prop="printNum"
@ -321,19 +329,18 @@
></el-input-number> ></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="10" :xs="24">
<el-form-item
label="产线:"
prop="printNum"
v-show="this.listQuery.productType === 1"
>
{{ this.productName }}
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-row> <el-row>
<el-col :md="10" :xs="24"> <el-col :span="24">
<el-form-item
label="产线:"
v-show="this.listQuery.productType === 2"
>
{{ this.getPrintProductName(2) }}
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item <el-form-item
label="要打印数量:" label="要打印数量:"
prop="printNumZHB" prop="printNumZHB"
@ -347,14 +354,6 @@
></el-input-number> ></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="10" :xs="24">
<el-form-item
label="产线:"
v-show="this.listQuery.productType === 2"
>
{{ this.productName }}
</el-form-item>
</el-col>
</el-row> </el-row>
</el-row> </el-row>
<el-form-item <el-form-item
@ -509,10 +508,11 @@ export default {
} }
}; };
return { return {
content01: "", tipper:"",
content05: "", // content01: "",
content07: "", // content05: "",
content08: "", // content07: "",
// content08: "",
// minute01: this.timeoutMinutes, // minute01: this.timeoutMinutes,
// minute05: this.timeoutMinutes, // minute05: this.timeoutMinutes,
// lastTime01: "14:00", // lastTime01: "14:00",
@ -610,6 +610,7 @@ export default {
}, },
hostSNQuery: { hostSNQuery: {
productLine: undefined, productLine: undefined,
Groupname: undefined
}, },
hostCheckQuery: { hostCheckQuery: {
printType: undefined, //0:;1:;2:; printType: undefined, //0:;1:;2:;
@ -666,12 +667,10 @@ export default {
}; };
}, },
mounted() { mounted() {
this.$nextTick(() => { let _this = this
var offsetHei = document.documentElement.clientHeight; window.addEventListener('resize',function(){
let boxH = this.$refs.box.offsetHeight; _this.changeMainTableHeight()
this.tableHeight = offsetHei - boxH - 67 - 79 - 70; //57footer79 })
//this.tableHeight = offsetHei -260
});
this.getPLChildGroupList() this.getPLChildGroupList()
let timer = setInterval(() => { let timer = setInterval(() => {
this.open(); this.open();
@ -757,6 +756,17 @@ export default {
...mapGetters(["userInfo"]), // ...mapGetters(["userInfo"]), //
}, },
methods: { methods: {
//
changeMainTableHeight(){
this.$nextTick(()=>{
var offsetHei = document.documentElement.clientHeight;
// let boxH = this.$refs.box.offsetHeight;
let headerH = document.getElementById("normalPritIndex-content-header").clientHeight
let footerH = this.totalCount > 0 ? 67 : 0 //footer
this.tableHeight = offsetHei - headerH - 67 - 79; //79
//this.tableHeight = offsetHei -260
})
},
opens() { opens() {
this.getList(); this.getList();
}, },
@ -767,10 +777,10 @@ export default {
// }); // });
//let productLineList = { productLineList: [this.listQuery.productLine] }; //let productLineList = { productLineList: [this.listQuery.productLine] };
this.$refs.sp01.Visible = false; // this.$refs.sp01.Visible = false;
this.$refs.sp05.Visible = false; // this.$refs.sp05.Visible = false;
this.$refs.sp07.Visible = false; // this.$refs.sp07.Visible = false;
this.$refs.sp08.Visible = false; // this.$refs.sp08.Visible = false;
let productLineListMain = { productLineList: [] }; let productLineListMain = { productLineList: [] };
@ -795,64 +805,78 @@ export default {
console.log("超时提醒-接口传过来的值:" + JSON.stringify(response.item)); console.log("超时提醒-接口传过来的值:" + JSON.stringify(response.item));
if (response.item !== null) { if (response.item !== null) {
this.tipper = ""
response.item.forEach((JKITEM) => { response.item.forEach((JKITEM) => {
if (JKITEM.productLine == "01") { let _item = ""
this.$refs.sp01.Visible = true; let _style = ""
this.content01 = if (JKITEM.timeoutMinutes >= JKITEM.configMinutes) {
"01生产线已经" +
JKITEM.timeoutMinutes +
"分钟没收到报文\xa0\xa0\xa0\xa0";
if (JKITEM.timeoutMinutes >= JKITEM.configMinutes) {
//
this.$refs.sp01.style.color = "red";
this.$refs.sp01.style.fontWeight = "bold";
} else {
this.$refs.sp01.style.color = "green";
}
}
if (JKITEM.productLine == "05") {
this.$refs.sp05.Visible = true;
this.content05 =
"05生产线已经" +
JKITEM.timeoutMinutes +
"分钟没收到报文\xa0\xa0\xa0\xa0";
if (JKITEM.timeoutMinutes >= JKITEM.configMinutes) {
//
this.$refs.sp05.style.color = "red";
this.$refs.sp05.style.fontWeight = "bold";
} else {
this.$refs.sp05.style.color = "green";
}
}
if (JKITEM.productLine == "07") {
this.$refs.sp07.Visible = true;
this.content07 =
"07生产线已经" +
JKITEM.timeoutMinutes +
"分钟没收到报文\xa0\xa0\xa0\xa0";
if (JKITEM.timeoutMinutes >= JKITEM.configMinutes) {
//
this.$refs.sp07.style.color = "red";
this.$refs.sp07.style.fontWeight = "bold";
} else {
this.$refs.sp07.style.color = "green";
}
}
if (JKITEM.productLine == "08") {
this.$refs.sp08.Visible = true;
this.content08 =
JKITEM.productLine +
"生产线已经" +
JKITEM.timeoutMinutes +
"分钟没收到报文";
if (JKITEM.timeoutMinutes >= JKITEM.configMinutes) {
// //
this.$refs.sp08.style.color = "red"; _style = "color:red;font-weight:bold"
this.$refs.sp08.style.fontWeight = "bold"; // this.$refs.sp01.style.color = "red";
// this.$refs.sp01.style.fontWeight = "bold";
} else { } else {
this.$refs.sp08.style.color = "green"; _style = "color:green"
// this.$refs.sp01.style.color = "green";
} }
} _item = `<span style=${_style}>${JKITEM.productLine}生产线已经${JKITEM.timeoutMinutes}分钟没收到报文\xa0\xa0\xa0\xa0</span>`
this.tipper += _item
// if (JKITEM.productLine == "01") {
// this.$refs.sp01.Visible = true;
// this.content01 =
// "01线" +
// JKITEM.timeoutMinutes +
// "\xa0\xa0\xa0\xa0";
// if (JKITEM.timeoutMinutes >= JKITEM.configMinutes) {
// //
// this.$refs.sp01.style.color = "red";
// this.$refs.sp01.style.fontWeight = "bold";
// } else {
// this.$refs.sp01.style.color = "green";
// }
// }
// if (JKITEM.productLine == "05") {
// this.$refs.sp05.Visible = true;
// this.content05 =
// "05线" +
// JKITEM.timeoutMinutes +
// "\xa0\xa0\xa0\xa0";
// if (JKITEM.timeoutMinutes >= JKITEM.configMinutes) {
// //
// this.$refs.sp05.style.color = "red";
// this.$refs.sp05.style.fontWeight = "bold";
// } else {
// this.$refs.sp05.style.color = "green";
// }
// }
// if (JKITEM.productLine == "07") {
// this.$refs.sp07.Visible = true;
// this.content07 =
// "07线" +
// JKITEM.timeoutMinutes +
// "\xa0\xa0\xa0\xa0";
// if (JKITEM.timeoutMinutes >= JKITEM.configMinutes) {
// //
// this.$refs.sp07.style.color = "red";
// this.$refs.sp07.style.fontWeight = "bold";
// } else {
// this.$refs.sp07.style.color = "green";
// }
// }
// if (JKITEM.productLine == "08") {
// this.$refs.sp08.Visible = true;
// this.content08 =
// JKITEM.productLine +
// "线" +
// JKITEM.timeoutMinutes +
// "";
// if (JKITEM.timeoutMinutes >= JKITEM.configMinutes) {
// //
// this.$refs.sp08.style.color = "red";
// this.$refs.sp08.style.fontWeight = "bold";
// } else {
// this.$refs.sp08.style.color = "green";
// }
// }
}); });
} else { } else {
this.$message({ this.$message({
@ -862,6 +886,7 @@ export default {
return; return;
} }
} }
this.changeMainTableHeight()
}); });
}, },
debounceClick() { debounceClick() {
@ -1144,6 +1169,7 @@ export default {
.catch(() => { .catch(() => {
this.listLoading = false; this.listLoading = false;
}); });
this.changeMainTableHeight()
}, },
getDetialList(partCode) { getDetialList(partCode) {
@ -1237,6 +1263,25 @@ export default {
}, },
closeDialog() {}, closeDialog() {},
// 线
getPrintProductName(type){
//
let _name = ""
let _productLineName = ""
this.PLChildList.forEach(item=>{
if(item.productLineCode == this.listQuery.productLine){
_productLineName = item.productLineName
}
})
if(type == 1){
_name = this.productTypeList[0].name + ': ' + _productLineName
}
//
else if(type == 2){
_name = this.productTypeList[1].name + ': ' + _productLineName + ' (' + this.listQuery.productGroup + ')'
}
return _name
},
/**打印 */ /**打印 */
print() { print() {
(this.hostPrintQuery = { (this.hostPrintQuery = {
@ -1248,13 +1293,17 @@ export default {
endVin: undefined, endVin: undefined,
Groupname: undefined, Groupname: undefined,
}), }),
(this.hostCheckQuery.printType = 0); (this.hostCheckQuery.printType = 0);
this.hostPrintQuery.printType = 0; this.hostPrintQuery.printType = 0;
this.vinPrintQuery.printType = 0; this.vinPrintQuery.printType = 0;
if ( if (this.listQuery.productLine === "" ||this.listQuery.productLine === undefined) {
this.listQuery.productLine === "" || this.$message({
this.listQuery.productLine === undefined message: "请选择生产线",
) { type: "warning",
});
return;
}
if(this.listQuery.productType == '2' && (this.listQuery.productGroup === "" || this.listQuery.productGroup === undefined)){
this.$message({ this.$message({
message: "请选择生产线", message: "请选择生产线",
type: "warning", type: "warning",
@ -1266,6 +1315,8 @@ export default {
(this.hostSNQuery.productLine = this.listQuery.productLine); (this.hostSNQuery.productLine = this.listQuery.productLine);
this.hostPrintQuery.productLine = this.listQuery.productLine; this.hostPrintQuery.productLine = this.listQuery.productLine;
this.hostPrintQuery.Groupname = this.listQuery.productGroup; this.hostPrintQuery.Groupname = this.listQuery.productGroup;
this.hostSNQuery.Groupname = this.listQuery.productGroup
// //
if (this.listQuery.productType === 1) { if (this.listQuery.productType === 1) {
// //
@ -1325,30 +1376,29 @@ export default {
}); });
} }
if (this.$refs.btn1.$el.innerText === "打印门板发货排序单") { if (this.$refs.btn1.$el.innerText === "打印门板发货排序单") {
this.productName = ""; // this.productName = "";
switch (this.listQuery.productLine) { // switch (this.listQuery.productLine) {
case "01": // case "01":
this.productName = "总装-01"; // this.productName = "-01";
break; // break;
case "05": // case "05":
this.productName = "总装-05"; // this.productName = "-05";
break; // break;
case "07": // case "07":
this.productName = "总装-07"; // this.productName = "-07";
break; // break;
case "08": // case "08":
this.productName = "总装-08"; // this.productName = "-08";
break; // break;
} // }
this.formTitle = "打印-门板发货排序单"; this.formTitle = "打印-门板发货排序单";
} else { } else {
this.productName = ""; // this.productName = "";
switch (this.listQuery.productLine) { // switch (this.listQuery.productLine) {
case "08": // case "08":
this.productName = "总装-柱护板"; // this.productName = "-";
break; // break;
} // }
this.formTitle = "打印-柱护板发货排序单"; this.formTitle = "打印-柱护板发货排序单";
} }
//this.formTitle = ""; //this.formTitle = "";
@ -1383,6 +1433,13 @@ export default {
}); });
return; return;
} }
if(this.listQuery.productType == '2' && (this.listQuery.productGroup === "" || this.listQuery.productGroup === undefined)){
this.$message({
message: "请选择生产线",
type: "warning",
});
return;
}
this.formTitle = "重打"; this.formTitle = "重打";
this.hostPrintQuery.productLine = this.listQuery.productLine; this.hostPrintQuery.productLine = this.listQuery.productLine;
this.dialogFormVisible = true; this.dialogFormVisible = true;
@ -1416,6 +1473,13 @@ export default {
}); });
return; return;
} }
if(this.listQuery.productType == '2' && (this.listQuery.productGroup === "" || this.listQuery.productGroup === undefined)){
this.$message({
message: "请选择生产线",
type: "warning",
});
return;
}
this.formTitle = "补打"; this.formTitle = "补打";
this.hostPrintQuery.productLine = this.listQuery.productLine; this.hostPrintQuery.productLine = this.listQuery.productLine;
this.dialogFormVisible = true; this.dialogFormVisible = true;
@ -1670,7 +1734,6 @@ export default {
*/ */
private_printZhuHuBan(isSelAll = true) private_printZhuHuBan(isSelAll = true)
{ {
console.log(1702,this.hostPrintQuery)
// /api/newjit/bill-m100/save-zhuhuban-report // /api/newjit/bill-m100/save-zhuhuban-report
// //
this.$axios this.$axios
@ -1776,6 +1839,7 @@ export default {
).sort((a, b) => { ).sort((a, b) => {
return a.productLineCode - b.productLineCode; return a.productLineCode - b.productLineCode;
}); });
this.changeMainTableHeight()
// //
if (this.listQuery.productType === 1) { if (this.listQuery.productType === 1) {
this.$refs.btn1.$el.innerText = "打印门板发货排序单"; this.$refs.btn1.$el.innerText = "打印门板发货排序单";
@ -1884,7 +1948,7 @@ export default {
this.PLChildGroupList= response.item; this.PLChildGroupList= response.item;
} }
}); });
} },
}, },
}; };
</script> </script>
@ -1915,6 +1979,13 @@ export default {
margin-left: 5px; margin-left: 5px;
margin-right: 5px; margin-right: 5px;
} }
.tipper{
border: solid 1px #ddd;
border-radius: 5px;
display: inline-block;
padding: 10px;
line-height: 20px;
}
</style> </style>

Loading…
Cancel
Save