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

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

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

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

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

Loading…
Cancel
Save