This commit is contained in:
caoqianming 2024-10-25 09:34:27 +08:00
commit 0449684caf
20 changed files with 1529 additions and 361 deletions

View File

@ -1401,8 +1401,8 @@ const routes = [
// component: "wpm_gx/chart",
// },
// {
// name: "printTest",
// path: "/wpm_gx/print",
// name: "prints",
// path: "/wpm_gx/prints",
// meta: {
// title: "打印测试",
// icon: "el-icon-files",
@ -1420,7 +1420,6 @@ const routes = [
// },
// component: "setting/print/A4",
// },
{
name: "qiepian",
path: "/wpm_gx/qiepian",
@ -1622,13 +1621,23 @@ const routes = [
},
component: "qm/process",
},
{
name: "qmProcess_gx",
path: "/qm/qmProcess_gx",
meta: {
title: "过程自检",
// icon: "el-icon-cellphone",
perms: ["ptest_gx"],
},
component: "qm/process_gx",
},
{
name: "qmProcess2",
path: "/qm/qmProcess2",
meta: {
title: "过程抽检",
// icon: "el-icon-cellphone",
perms: ["ptest"],
perms: ["ptest_cj"],
},
component: "qm/process2",
},
@ -1678,7 +1687,7 @@ const routes = [
meta: {
title: "外观检验",
// icon: "el-icon-cellphone",
perms: ["productstest__wg"],
perms: ["productstest_wg"],
},
component: "qm/products_wg",
},
@ -3035,6 +3044,18 @@ const routes = [
},
component: "bigScreen/index_photon",
},
//光芯—数据大屏
// {
// path: "/bigScreengx",
// name: "bigScreengx",
// meta: {
// title: "数据大屏",
// icon: "el-icon-platform",
// perms: ["bigScreengx"],
// fullpage: true,
// },
// component: "bigScreen/index_gx",
// },
//排放——数据大屏
{
path: "/bigScreenEnp",

View File

@ -21,7 +21,7 @@ class PdfLoader {
async getPDF(resolve) {
const ele = this.ele;
let eleme = this.ele;
eleme.style.width="800px";
// eleme.style.width="800px";
const pdfFileName = this.pdfFileName
const eleW = ele.offsetWidth// 获得该容器的宽
const eleH = ele.scrollHeight;// 获得该容器的高

View File

@ -18,23 +18,23 @@
<div class="totalNumContnier">
<div class="totalNumWrap totalNum_orange">
<img class="" src="img/number_bg_orange.png" />
<span class="totalNumText">产量</span>
<span class="totalNumText">本月熟料产量</span>
<div class="totalNumber">
{{ totalData.total_production }}
{{ totalData.shuliao }}
</div>
</div>
<div class="totalNumWrap totalNumWrap_green">
<img src="img/number_bg_green.png" />
<span class="totalNumText">实物煤耗</span>
<span class="totalNumText">本月水泥产量</span>
<div class="totalNumber">
{{ totalData.pcoal_consume }}
{{ totalData.cement }}
</div>
</div>
<div class="totalNumWrap totalNum_blue">
<img src="img/number_bg_blue.png" />
<span class="totalNumText">综合电耗</span>
<span class="totalNumText">本月水泥出厂</span>
<div class="totalNumber">
{{ totalData.celec_consume_unit }}
{{ totalData.out_cement }}
</div>
</div>
</div>
@ -106,6 +106,13 @@
</div>
</div>
</div>
<div class="flexItem">
<div class="itemTitle">
<div class="itemTitleIcon"></div>
<div>压缩空气用水量</div>
</div>
<div class="itemBody" id="line2"></div>
</div>
<!-- <div class="flexItem">
<div class="itemTitle">
<div class="itemTitleIcon"></div>
@ -420,9 +427,9 @@ export default {
水泥储存及散装库: "水泥包装",
},
totalData: {
total_production: 0,
pcoal_consume: 0,
celec_consume_unit: 0,
shuliao: 0,
cement: 0,
out_cement: 0,
},
rateData: [
{ name: "电石渣", value: 0 },
@ -506,6 +513,45 @@ export default {
},
series: [],
},
option2 :{
color: ["#80FFA5", "#00DDFF", "#37A2FF", "#FF0087", "#FFBF00"],
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
legend: {
data: []
},
toolbox: {
feature: {
saveAsImage: {}
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: [
{
type: 'category',
boundaryGap: false,
data: []
}
],
yAxis: [
{
type: 'value'
}
],
series: [],
},
radarSeriesData: [0, 0, 0, 0, 0],
radarOption: {
radar: {
@ -636,6 +682,8 @@ export default {
that.$nextTick(() => {
//
that.productNum();
that.waterAirData();
that.getMonthData();
//
that.eqRate();
//
@ -652,135 +700,369 @@ export default {
that.timerTime = setInterval(() => {
that.showTime();
}, 1000);
that.qualityTimer = setInterval(() => {
let lineDom = document.getElementById("line3");
if (lineDom) {
that.KHData = [];
that.SMData = [];
that.IMData = [];
if (that.deptName == "出磨熟料") {
that.deptName = "入窑生料";
for (let i = 0; i < day; i++) {
that.KHData.push(that.shengliaoData.KH[i]);
that.SMData.push(that.shengliaoData.SM[i]);
that.IMData.push(that.shengliaoData.IM[i]);
}
} else {
that.deptName = "出磨熟料";
for (let i = 0; i < day; i++) {
that.KHData.push(that.shuliaoData.KH[i]);
that.SMData.push(that.shuliaoData.SM[i]);
that.IMData.push(that.shuliaoData.IM[i]);
}
}
that.initChart();
}
}, 5000);
// that.timerTime = setInterval(() => {
// that.productNum();
// that.eqRate();
// that.generation();
// that.proceElec();
// that.dataCollect();
// }, 3600000);
// that.qualityTimer = setInterval(() => {
// let lineDom = document.getElementById("line3");
// if (lineDom) {
// that.KHData = [];
// that.SMData = [];
// that.IMData = [];
// if (that.deptName == "") {
// that.deptName = "";
// for (let i = 0; i < day; i++) {
// that.KHData.push(that.shengliaoData.KH[i]);
// that.SMData.push(that.shengliaoData.SM[i]);
// that.IMData.push(that.shengliaoData.IM[i]);
// }
// } else {
// that.deptName = "";
// for (let i = 0; i < day; i++) {
// that.KHData.push(that.shuliaoData.KH[i]);
// that.SMData.push(that.shuliaoData.SM[i]);
// that.IMData.push(that.shuliaoData.IM[i]);
// }
// }
// that.initChart();
// }
// }, 5000);
});
},
methods: {
//
productNum() {
let that = this;
this.$API.mtm.mgroup.list
.req({ page: 0, search: "回转窑" })
.then((res) => {
// console.log("", res);
that.huihzuanyaoId = res[0].id;
let query = {};
query.page = 0;
query.year_s = that.currentYear;
query.month_s = that.currentMonth;
query.type = "day_s";
query.mgroup = that.huihzuanyaoId;
this.$API.enm.enstat.req(query).then((response) => {
let seriesData = [];
let data = response;
data.forEach((item) => {
let ind = item.day_s - 1;
seriesData[ind] = item.total_production;
if (item.day_s == that.currentDay) {
that.totalData.total_production =
item.total_production;
that.totalData.pcoal_consume =
item.pcoal_consume;
that.totalData.celec_consume_unit =
item.celec_consume_unit;
}
});
let option1 = that.deepCopy(that.option);
let chartDom = document.getElementById("line1");
let myChart = echarts.init(chartDom);
option1.legend.data = [
// {
// name: "",
// textStyle: {
// color: "#fff",
// },
// borderRadius: 2,
// itemStyle: {
// color: that.linearGradientColors[0],
// },
// },
// {
// name: "",
// textStyle: {
// color: "#fff",
// },
// borderRadius: 2,
// itemStyle: {
// color: that.linearGradientColors[1],
// },
// },
];
option1.series = [
{
name: "",
type: "line",
stack: "Total",
smooth: true,
lineStyle: {
width: 0,
},
showSymbol: false,
areaStyle: {
opacity: 0.8,
color: that.linearGradientColors[0],
},
emphasis: {
focus: "series",
},
data: seriesData,
},
{
name: "",
type: "line",
stack: "Total",
smooth: true,
lineStyle: {
width: 0,
},
showSymbol: false,
areaStyle: {
opacity: 0.8,
color: that.linearGradientColors[1],
},
emphasis: {
focus: "series",
},
data: that.tezhongData,
},
];
myChart.setOption(option1);
let that = this;
// option1
let option1 = that.deepCopy(that.option);
let chartDom = document.getElementById("line1");
let myChart = echarts.init(chartDom);
let seriesData = new Array(31).fill(0); // 310
let seriesData1 = new Array(31).fill(0);
let seriesData2 = new Array(31).fill(0);
//
this.$API.mtm.mgroup.list.req({ page: 0, search: "回转窑" }).then((res) => {
that.huihzuanyaoId = res[0]?.id;
let query = {
page: 0,
year_s: that.currentYear,
month_s: that.currentMonth,
type: "day_s",
mgroup: that.huihzuanyaoId,
};
return this.$API.enm.enstat.req(query);
}).then((response) => {
response.forEach((item) => {
let ind = item.day_s - 1;
seriesData[ind] = item.total_production || 0; //
});
}).then(() => {
//
return this.$API.mtm.mgroup.list.req({ page: 0, search: "水泥磨" });
}).then((res) => {
that.shuinimoId = res[0]?.id;
let query = {
page: 0,
year_s: that.currentYear,
month_s: that.currentMonth,
type: "day_s",
mgroup: that.shuinimoId,
};
return this.$API.enm.enstat.req(query);
}).then((response) => {
response.forEach((item) => {
let ind = item.day_s - 1;
seriesData1[ind] = item.total_production || 0;
});
}).then(() => {
//
return this.$API.mtm.mgroup.list.req({ page: 0, search: "水泥包装" });
}).then((res) => {
that.shuinimoId = res[0]?.id;
let query = {
page: 0,
year_s: that.currentYear,
month_s: that.currentMonth,
type: "day_s",
mgroup: that.shuinimoId,
};
return this.$API.enm.enstat.req(query);
}).then((response) => {
response.forEach((item) => {
let ind = item.day_s - 1;
seriesData2[ind] = item.total_production || 0;
});
//
option1.legend.data = [
{
name: "熟料",
textStyle: {
color: "#fff",
},
borderRadius: 2,
itemStyle: {
color: that.linearGradientColors[0],
},
},
{
name: "水泥",
textStyle: {
color: "#fff",
},
borderRadius: 2,
itemStyle: {
color: that.linearGradientColors[1],
},
},
{
name: "出厂水泥",
textStyle: {
color: "#fff",
},
borderRadius: 2,
itemStyle: {
color: that.linearGradientColors[2],
},
},
];
option1.series = [
{
name: "熟料",
type: "line",
stack: "Total",
smooth: true,
lineStyle: {
width: 0,
},
showSymbol: false,
areaStyle: {
opacity: 0.8,
color: that.linearGradientColors[0],
},
emphasis: {
focus: "series",
},
data: seriesData,
},
{
name: "水泥",
type: "line",
stack: "Total",
smooth: true,
lineStyle: {
width: 0,
},
showSymbol: false,
areaStyle: {
opacity: 0.8,
color: that.linearGradientColors[1],
},
emphasis: {
focus: "series",
},
data: seriesData1,
},
{
name: "出厂水泥",
type: "line",
stack: "Total",
smooth: true,
lineStyle: {
width: 0,
},
showSymbol: false,
areaStyle: {
opacity: 0.8,
color: that.linearGradientColors[2],
},
emphasis: {
focus: "series",
},
data: seriesData2,
},
];
myChart.setOption(option1);
});
},
getMonthData() {
//
let that = this;
this.$API.mtm.mgroup.list.req({ page: 0, search: "回转窑" }).then((res) => {
that.huihzuanyaoId = res[0]?.id; //id
let query = {
page: 0,
year_s: that.currentYear,
month_s: that.currentMonth,
type: "month_s",
mgroup: that.huihzuanyaoId,
};
return this.$API.enm.enstat.req(query);
}).then((response) => {
response.forEach((item) => {
if (item.month_s == that.currentMonth) {
that.totalData.shuliao = item.total_production; //
}
})
}).then(() => {
//
return this.$API.mtm.mgroup.list.req({ page: 0, search: "水泥磨" });
}).then((res) => {
that.shuinimoId = res[0]?.id; //id
let query = {
page: 0,
year_s: that.currentYear,
month_s: that.currentMonth,
type: "month_s",
mgroup: that.shuinimoId,
};
return that.$API.enm.enstat.req(query);
}).then((response) => {
response.forEach((item) => {
if (item.month_s == that.currentMonth) {
that.totalData.cement = item.total_production; //
}
})
}).then(() => {
//
return this.$API.mtm.mgroup.list.req({ page: 0, search: "水泥包装" });
}).then((res) => {
that.out_cement = res[0]?.id; //id
let query = {
page: 0,
year_s: that.currentYear,
month_s: that.currentMonth,
type: "month_s",
mgroup: that.out_cement,
};
return that.$API.enm.enstat.req(query);
}).then((response) => {
response.forEach((item) => {
if (item.month_s == that.currentMonth) {
that.totalData.out_cement = item.total_production; //
}
})
})
},
waterAirData() {
let that = this;
// option2
let option3 = that.deepCopy(that.option); // this.option
let chartDom = document.getElementById("line2");
let myChart = echarts.init(chartDom);
// series
let seriesData = new Array(31).fill(0); //
let seriesData1 = new Array(31).fill(0); //
let seriesData2 = new Array(31).fill(0); //
let seriesData3 = new Array(31).fill(0); //
let seriesData4 = new Array(31).fill(0); //
let seriesData5 = new Array(31).fill(0); //
//
function generateQuery(deptId) {
return {
page: 0,
year_s: that.currentYear,
month_s: that.currentMonth,
type: "day_s",
mgroup__belong_dept: deptId,
};
}
// API
let query1 = generateQuery("3626222645575802880");
this.$API.enm.enstat.req(query1).then((response) => {
response.forEach((item) => {
if (item.mgroup_name === "原料压缩空气") {
let ind = item.day_s - 1;
seriesData[ind] = item.cair_consume || 0;
} else if (item.mgroup_name === "原料车间用水") {
let ind = item.day_s - 1;
seriesData1[ind] = item.water_consume || 0;
}
});
// API
let query2 = generateQuery("3626252143184752640");
return this.$API.enm.enstat.req(query2);
}).then((response) => {
response.forEach((item) => {
if (item.mgroup_name === "烧成压缩空气") {
let ind = item.day_s - 1;
seriesData2[ind] = item.cair_consume || 0;
} else if (item.mgroup_name === "烧成车间用水") {
let ind = item.day_s - 1;
seriesData3[ind] = item.water_consume || 0;
}
});
// API
let query3 = generateQuery("3626252144132665344");
return this.$API.enm.enstat.req(query3);
}).then((response) => {
response.forEach((item) => {
if (item.mgroup_name === "水泥压缩空气") {
let ind = item.day_s - 1;
seriesData4[ind] = item.cair_consume || 0;
} else if (item.mgroup_name === "水泥车间用水") {
let ind = item.day_s - 1;
seriesData5[ind] = item.water_consume || 0;
}
});
//
option3.series = [
{
name: '原料压缩空气',
type: 'line',
stack: 'Total',
data: seriesData
},
{
name: '原料车间用水',
type: 'line',
stack: 'Total',
data: seriesData1
},
{
name: '烧成压缩空气',
type: 'line',
stack: 'Total',
data: seriesData2
},
{
name: '烧成车间用水',
type: 'line',
stack: 'Total',
data: seriesData3
},
{
name: '水泥压缩空气',
type: 'line',
stack: 'Total',
data: seriesData4
},
{
name: '水泥车间用水',
type: 'line',
stack: 'Total',
data: seriesData5
}
]
myChart.setOption(option3); //
});
},
//
getShiNengMouData() {
let that = this;
let query = {};
query.page = 0;
query.year_s = that.currentYear;
query.month_s = that.currentMonth;
query.type = "month_s";
this.$API.enm.enstat.req(query).then((response) => {
})
},
//
eqRate() {
@ -848,7 +1130,6 @@ export default {
});
});
},
// //
// this.$API.enm.mpoint.list
// .req({
// page: 0,
@ -896,7 +1177,6 @@ export default {
};
that.$API.enm.enstat.req(params).then((res) => {
let data = res.results;
console.log("工序电耗", data);
let seriesData = [0, 0, 0, 0, 0];
data.forEach((item, index) => {
if (item.mgroup_name == "电石渣") {
@ -927,7 +1207,140 @@ export default {
});
},
//---
qualAnalys() {},
qualAnalys() {
let that = this;
// option2
let option5 = that.deepCopy(that.option); // this.option
let chartDom = document.getElementById("line3");
let myChart = echarts.init(chartDom);
// series
let seriesData = new Array(31).fill(0);
let seriesData1 = new Array(31).fill(0);
let seriesData2 = new Array(31).fill(0);
let seriesData3 = new Array(31).fill(0);
let seriesData4 = new Array(31).fill(0);
//
function generateQuery(mgroupId) {
return {
page: 0,
year_s: that.currentYear,
month_s: that.currentMonth,
type: "day_s",
mgroup: mgroupId,
};
}
// API
let query1 = generateQuery("3626253029718056960");
this.$API.enm.enstat.req(query1).then((response) => {
response.forEach((item) => {
if (item.qua_data.length > 0) {
let ind = item.day_s - 1;
seriesData[ind] = item.出窑熟料_fCaO_rate_pass || 0;
seriesData1[ind] = item.出窑熟料_立升重_rate_pass || 0;
}
});
let query2 = generateQuery("3626253601661739008");
return this.$API.enm.enstat.req(query2);
}).then((response) => {
response.forEach((item) => {
if (item.qua_data.length > 0) {
let ind = item.day_s - 1;
seriesData2[ind] = item.出磨水泥_SO3_rate_pass || 0;
seriesData3[ind] = item.出磨水泥_比表面积_rate_pass || 0;
seriesData4[ind] = item.出磨水泥_掺量_rate_pass || 0;
}
});
//
option5.legend.data = [
{
name: "f-CaO",
textStyle: {
color: "#fff",
},
borderRadius: 2,
itemStyle: {
color: that.linearGradientColors[0],
},
},
{
name: "立升重",
textStyle: {
color: "#fff",
},
borderRadius: 2,
itemStyle: {
color: that.linearGradientColors[1],
},
},
{
name: "SO3",
textStyle: {
color: "#fff",
},
borderRadius: 2,
itemStyle: {
color: that.linearGradientColors[2],
},
},
{
name: "比表面积",
textStyle: {
color: "#fff",
},
borderRadius: 2,
itemStyle: {
color: that.linearGradientColors[3],
},
},
{
name: "掺量",
textStyle: {
color: "#fff",
},
borderRadius: 2,
itemStyle: {
color: that.linearGradientColors[4],
},
},
];
option5.series = [
{
name: 'f-CaO',
type: 'line',
stack: 'Total',
data: seriesData
},
{
name: '立升重',
type: 'line',
stack: 'Total',
data: seriesData1
},
{
name: 'SO3',
type: 'line',
stack: 'Total',
data: seriesData2
},
{
name: '比表面积',
type: 'line',
stack: 'Total',
data: seriesData3
},
{
name: '掺量',
type: 'line',
stack: 'Total',
data: seriesData4
},
]
myChart.setOption(option5); //
});
},
//
dataCollect() {
let that = this;
@ -942,7 +1355,6 @@ export default {
return typeof variable;
}
that.$API.enm.mpoint.list.req(params).then((res) => {
console.log("数据采集", res);
let success_num = 0;
let error_num = 0;
res.forEach((item, index) => {
@ -958,7 +1370,6 @@ export default {
}
that.tableData.push(item);
});
console.log("数据采集tableData", that.tableData);
// let chartDom6 = document.getElementById("pieChart");
// let myChart6 = echarts.init(chartDom6);
@ -1079,6 +1490,7 @@ export default {
that.resizeChart("line1");
// that.resizeChart("pieChart");
that.resizeChart("radar");
that.resizeChart("line2");
that.resizeChart("line3");
},
resizeChart(name) {
@ -2173,56 +2585,58 @@ export default {
border-radius: 5px;
background: rgb(255, 0, 135);
}
/deep/ .el-table,
.el-table__body,
/deep/ .el-table .el-table__body-wrapper {
background: transparent !important;
:deep(.el-table),
:deep(.el-table__body),
:deep(.el-table .el-table__body-wrapper) {
background: transparent !important;
}
/deep/ .el-table .el-table__header-wrapper {
background: rgba(32, 93, 74, 0.83) !important;
:deep(.el-table .el-table__header-wrapper) {
background: rgba(32, 93, 74, 0.83);
}
/deep/ .el-table .el-table__body-wrapper {
background: rgba(46, 139, 155, 0.48) !important;
:deep(.el-table .el-table__body-wrapper) {
background: rgba(46, 139, 155, 0.48);
}
/deep/ .el-table th {
background-color: transparent !important;
:deep(.el-table th),
:deep(.el-table tr),
:deep(.el-table tr:hover) {
background-color: transparent;
}
/deep/ .el-table tr {
background-color: transparent !important;
:deep(.el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell) {
background-color: transparent;
}
/deep/ .el-table tr :hover {
background-color: transparent !important;
/* 清除鼠标移入效果 */
:deep(.el-table__body tr.hover-row > td) {
background-color: transparent;
}
/deep/
.el-table--enable-row-hover
.el-table__body
tr:hover
> td.el-table__cell {
background-color: transparent !important;
/* 行底边线 */
:deep(.el-table .el-table__body-wrapper :deep(.el-table td.el-table__cell)),
:deep(.el-table th.el-table__cell.is-leaf) {
background: transparent;
}
/* //清除鼠标移入效果 */
/deep/.el-table__body tr.hover-row > td {
background-color: transparent !important;
}
/* // 行底边线 */
/deep/ .el-table .el-table__body-wrapper /deep/ .el-table td.el-table__cell,
.el-table th.el-table__cell.is-leaf {
background: transparent !important;
}
/deep/ .el-table td.el-table__cell,
/deep/ .el-table th.el-table__cell.is-leaf {
border-bottom: 1px solid rgb(25, 111, 115, 0.82) !important;
:deep(.el-table td.el-table__cell),
:deep(.el-table th.el-table__cell.is-leaf) {
border-bottom: 1px solid rgba(25, 111, 115, 0.82);
}
/* 改变radio选中时的样式 */
/deep/ .el-radio.elRadio > .el-radio__label {
color: #ffffff;
:deep(.el-radio.elRadio > .el-radio__label) {
color: #ffffff;
}
/deep/ .el-radio__input.is-checked .el-radio__inner {
background: #13f1df;
border-color: #13f1df;
:deep(.el-radio__input.is-checked .el-radio__inner) {
background: #13f1df;
border-color: #13f1df;
}
/deep/ .el-table__inner-wrapper:before {
background-color: rgba(0, 0, 0, 0) !important;
:deep(.el-table__inner-wrapper:before) {
background-color: rgba(0, 0, 0, 0);
}
/* 改变radio选中时的样式 */
</style>

View File

@ -70,6 +70,11 @@
</el-table-column>
<el-table-column label="更新时间" prop="update_time">
</el-table-column>
<el-table-column width="90">
<template #default="scope">
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
@ -143,6 +148,7 @@ export default {
paramsWm: { count__gte: 1, material__type: 10 },
// processOptions: [],
queryWm: {},
printer_name:localStorage.getItem("printer_name")
};
},
mounted() {
@ -169,6 +175,31 @@ export default {
resetQuery() {
this.query = {};
},
//
printMaterial(row){
let that = this;
let code = "";
that.$API.cm.labelmat.fromMb.req({tid:row.id}).then((res) => {
code = res.code_label;
let str = [
"SIZE 40 mm,70 mm",
"GAP 7 mm,7 mm",
"CLS",
"REFERENCE 0,0",
'QRCODE 30,400,H,5,A,0,"' +code +'"',
"WINTEXT 200,550,28,90,0,0,Simhei," + res.material_name,
"WINTEXT 240,550,28,90,0,0,Simhei," + res.batch,
];
if(res.notok_sign!==null){
str.push("WINTEXT 280,550,28,90,0,0,Simhei," +res.notok_sign_name,)
}
str.push("PRINT 1",)
let obj = {};
obj.printer_commands = str;
obj.printer_name = that.printer_name;
this.$API.wpm.prints.req(obj).then((response) => {});
})
},
},
};
</script>

View File

@ -70,6 +70,11 @@
</el-table-column>
<el-table-column label="更新时间" prop="update_time">
</el-table-column>
<el-table-column width="90">
<template #default="scope">
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
@ -152,6 +157,7 @@ export default {
paramsWm: { count__gte: 1 },
processOptions: [],
queryWm: {},
printer_name:localStorage.getItem("printer_name")
};
},
mounted() {
@ -178,6 +184,32 @@ export default {
resetQuery() {
this.query = {};
},
//
printMaterial(row){
let that = this;
let code = "";
that.$API.cm.labelmat.fromMb.req({tid:row.id}).then((res) => {
code = res.code_label;
let str = [
"SIZE 40 mm,70 mm",
"GAP 7 mm,7 mm",
"CLS",
"REFERENCE 0,0",
'QRCODE 30,400,H,5,A,0,"' +code +'"',
"WINTEXT 200,550,28,90,0,0,Simhei," + res.material_name,
"WINTEXT 240,550,28,90,0,0,Simhei," + res.batch,
];
if(res.notok_sign!==null){
str.push("WINTEXT 280,550,28,90,0,0,Simhei," +res.notok_sign_name,)
}
str.push("PRINT 1",)
let obj = {};
obj.printer_commands = str;
obj.printer_name = that.printer_name;
this.$API.wpm.prints.req(obj).then((response) => {});
})
},
},
};
</script>

View File

@ -57,6 +57,11 @@
</el-table-column>
<el-table-column label="更新时间" prop="update_time">
</el-table-column>
<el-table-column width="90">
<template #default="scope">
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
@ -71,6 +76,7 @@ export default {
selection: [],
query: {},
warehouseOptions: [],
printer_name:localStorage.getItem("printer_name")
};
},
mounted() {
@ -88,6 +94,32 @@ export default {
resetQuery() {
this.query = {};
},
//
printMaterial(row){
let that = this;
let code = "";
that.$API.cm.labelmat.fromMb.req({tid:row.id}).then((res) => {
code = res.code_label;
let str = [
"SIZE 40 mm,70 mm",
"GAP 7 mm,7 mm",
"CLS",
"REFERENCE 0,0",
'QRCODE 30,400,H,5,A,0,"' +code +'"',
"WINTEXT 200,550,28,90,0,0,Simhei," + res.material_name,
"WINTEXT 240,550,28,90,0,0,Simhei," + res.batch,
];
if(res.notok_sign!==null){
str.push("WINTEXT 280,550,28,90,0,0,Simhei," +res.notok_sign_name,)
}
str.push("PRINT 1",)
let obj = {};
obj.printer_commands = str;
obj.printer_name = that.printer_name;
this.$API.wpm.prints.req(obj).then((response) => {});
})
},
},
};
</script>

View File

@ -57,6 +57,11 @@
</el-table-column>
<el-table-column label="更新时间" prop="update_time">
</el-table-column>
<el-table-column width="90">
<template #default="scope">
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
@ -71,6 +76,7 @@ export default {
selection: [],
query: {},
warehouseOptions: [],
printer_name:localStorage.getItem("printer_name")
};
},
mounted() {
@ -88,6 +94,32 @@ export default {
resetQuery() {
this.query = {};
},
//
printMaterial(row){
let that = this;
let code = "";
that.$API.cm.labelmat.fromMb.req({tid:row.id}).then((res) => {
code = res.code_label;
let str = [
"SIZE 40 mm,70 mm",
"GAP 7 mm,7 mm",
"CLS",
"REFERENCE 0,0",
'QRCODE 30,400,H,5,A,0,"' +code +'"',
"WINTEXT 200,550,28,90,0,0,Simhei," + res.material_name,
"WINTEXT 240,550,28,90,0,0,Simhei," + res.batch,
];
if(res.notok_sign!==null){
str.push("WINTEXT 280,550,28,90,0,0,Simhei," +res.notok_sign_name,)
}
str.push("PRINT 1",)
let obj = {};
obj.printer_commands = str;
obj.printer_name = that.printer_name;
this.$API.wpm.prints.req(obj).then((response) => {});
})
},
},
};
</script>

View File

@ -9,7 +9,7 @@
<div style="padding: 8px">
<div>
<el-card style="width: 100%" header="基本信息" shadow="hover">
<el-button type="primary" @click="handlePrint" style="position: absolute;right: 20px;">打印</el-button>
<el-button type="primary" @click="handlePrint" style="position: absolute;right: 40px;">打印</el-button>
<el-descriptions>
<el-descriptions-item label="编号">{{
mioObj.number
@ -210,7 +210,7 @@
>
</check-dialog>
<el-dialog v-model="printVisible" width="1200px">
<print :baseData="mioObj" :tableData="tableData" :type="mioObj.type" mtype="20"/>
<print :baseData="mioObj" :tableData="tableData" :type="mioObj.type" @closePrint="printVisible=false"/>
</el-dialog>
</template>
<script>

View File

@ -51,9 +51,11 @@
<el-link type="primary" v-if="scope.row.submit_user==null" @click="table_submit(scope.row)">提交</el-link>
<el-divider direction="vertical" v-if="scope.row.submit_user==null"></el-divider>
<el-link type="primary" v-if="scope.row.submit_user==null" @click="table_edit(scope.row)">编辑</el-link>
<el-link type="primary" v-else @click="table_show(scope.row)">查看</el-link>
<el-divider direction="vertical" v-if="scope.row.submit_user==null"></el-divider>
<el-link type="danger" v-if="scope.row.submit_user==null" @click="table_del(scope.row)">删除</el-link>
<el-link type="primary" v-if="scope.row.submit_user!==null" @click="handlePrint(scope.row)">打印</el-link>
<el-divider direction="vertical" v-if="scope.row.submit_user!==null"></el-divider>
<el-link type="primary" v-if="scope.row.submit_user!==null" @click="table_show(scope.row)">查看</el-link>
<!-- <el-link type="danger" v-else @click="table_revert(scope.row)">撤回</el-link> -->
</template>
</el-table-column>
@ -69,9 +71,13 @@
@closed="dialog.save = false"
>
</save-dialog>
<el-dialog v-model="printVisible" width="1200px">
<print :baseData="rowItem" :type="type" @closePrint="printVisible=false"/>
</el-dialog>
</el-container>
</template>
<script>
import print from "./../setting/print/A4.vue";
import saveDialog from "./products_form.vue";
export default {
@ -84,7 +90,7 @@ export default {
},
name: "mlog",
components: {
saveDialog,
saveDialog,print
},
data() {
return {
@ -95,20 +101,25 @@ export default {
save: false,
detail: false,
},
type:'',
tableData: [],
selection: [],
rowItem:{},
mtask: "",
mlogId: "",
deptId: null,
processId: "",
processCate: "",
printVisible:false,
};
},
mounted() {
let that = this;
if(that.mgroupName == "size"){
this.type = "productstest_cc";
this.params.material__process__name = "一次超洗";
}else{
this.type = "productstest_wg";
this.params.material__process__name = "二次超洗";
}
that.apiObj= this.$API.qm.ftestwork.list;
@ -185,6 +196,11 @@ export default {
this.dialog.save = true;
this.$refs.table.refresh();
},
//
handlePrint(row){
this.rowItem = row;
this.printVisible = true;
},
},
};
</script>

View File

@ -102,6 +102,16 @@
</el-table-column>
<el-table-column label="抽检时间" prop="submit_time" width="150">
</el-table-column>
<el-table-column label="操作" width="60" fixed="right">
<template #default="scope">
<el-button
type="text"
size="small"
@click="handlePrint(scope.row)"
>打印</el-button
>
</template>
</el-table-column>
</scTable>
</el-main>
<el-dialog title="选择物料" v-model="materialsVisible" width="90%">
@ -111,13 +121,17 @@
@choseChange="choseChange"
></materials>
</el-dialog>
<el-dialog v-model="printVisible" width="1200px">
<print :baseData="rowItem" type="ptest_gx" @closePrint="printVisible=false"/>
</el-dialog>
</el-container>
</template>
<script>
import print from "./../setting/print/A4.vue";
import materials from "./../mtm/materials.vue";
export default {
components: {
materials,
materials,print
},
name: "rparty",
data() {
@ -137,7 +151,9 @@ export default {
10: "",
20: "",
},
rowItem:{},
mgroupOption: [],
printVisible:false,
exportLoading:false,
materialsVisible: false,
};
@ -165,6 +181,11 @@ export default {
resetQuery() {
this.query = {};
},
//
handlePrint(row){
this.rowItem = row;
this.printVisible = true;
},
exportExcel() {
this.exportLoading = true;
this.$XLSX('#myTable',"过程抽检表")

180
src/views/qm/process_gx.vue Normal file
View File

@ -0,0 +1,180 @@
<template>
<el-container>
<el-header>
<div class="left-panel">
<el-button type="primary" icon="el-icon-download" v-loading="exportLoading" @click="exportExcel">导出</el-button>
</div>
<div class="right-panel">
<el-select
v-model="query.mgroup"
clearable
style="width: 150px"
>
<el-option
v-for="item in mgroupOption"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
<el-date-picker
v-model="query.handle_date"
type="date"
placeholder="选择日期"
value-format="YYYY-MM-DD"
style="width: 150px"
/>
<el-input
v-model="query.search"
placeholder="批次号"
clearable
style="width: 150px"
></el-input>
<el-button type="primary" @click="materialsChoses()"
>选择物料</el-button
>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
>查询</el-button
>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
id="myTable"
:query="query"
>
<el-table-column type="index" width="50" />
<el-table-column label="物料" prop="material_out_name" show-overflow-tooltip min-width="120">
</el-table-column>
<el-table-column label="工序" prop="mgroup_name">
</el-table-column>
<el-table-column label="生产数" prop="count_real">
</el-table-column>
<el-table-column label="合格数" prop="count_ok">
</el-table-column>
<el-table-column label="不合格数" prop="count_notok">
</el-table-column>
<el-table-column label="不合格原因" align="center">
<el-table-column label="厚度" prop="count_n_hd">
</el-table-column>
<el-table-column label="气泡" prop="count_n_qp">
</el-table-column>
<el-table-column label="水纹" prop="count_n_swen">
</el-table-column>
<el-table-column label="崩边" prop="count_n_bb">
</el-table-column>
<el-table-column label="划伤" prop="count_n_hs">
</el-table-column>
<el-table-column label="麻点" prop="count_n_md">
</el-table-column>
<el-table-column label="线痕" prop="count_n_xh">
</el-table-column>
<el-table-column label="产品外径" prop="count_n_cpwj">
</el-table-column>
<el-table-column label="产品圆度" prop="count_n_cpyd">
</el-table-column>
<el-table-column label="产品同心度" prop="count_n_cptxd">
</el-table-column>
</el-table-column>
<el-table-column label="班组" prop="shift_name">
</el-table-column>
<el-table-column label="所属车间" prop="belong_dept_name">
</el-table-column>
<el-table-column label="操作时间" prop="handle_date">
</el-table-column>
<el-table-column label="处理人" prop="handle_user_name">
</el-table-column>
<el-table-column label="操作" width="60" fixed="right">
<template #default="scope">
<el-button
type="text"
size="small"
@click="handlePrint(scope.row)"
>打印</el-button
>
</template>
</el-table-column>
</scTable>
</el-main>
<el-dialog title="选择物料" v-model="materialsVisible" width="90%">
<materials style="height: 500px" ref="materialsChose" @choseChange="choseChange">
</materials>
</el-dialog>
<el-dialog v-model="printVisible" width="1200px">
<print :baseData="rowItem" type="ptest_gx" @closePrint="printVisible=false"/>
</el-dialog>
</el-container>
</template>
<script>
import print from "./../setting/print/A4.vue";
import materials from "./../mtm/materials.vue";
export default {
components: {
materials,print
},
name: "rparty",
data() {
return {
apiObj: this.$API.wpm.mlog.list,
query: {
search: "",
material: "",
mgroup: "",
handle_date: "",
},
selection: [],
state_: {
10: "",
20: "",
},
rowItem:{},
mgroupOption: [],
printVisible:false,
exportLoading:false,
materialsVisible: false,
};
},
mounted() {
this.getMgroup();
},
methods: {
materialsChoses() {
this.materialsVisible = true;
},
choseChange(data) {
this.query.material = data;
this.$refs.table.queryData(this.query);
this.materialsVisible = false;
},
getMgroup() {
this.$API.mtm.mgroup.list.req({ page: 0 }).then((res) => {
this.mgroupOption = res;
});
},
handleQuery() {
this.$refs.table.queryData(this.query);
},
resetQuery() {
this.query = {};
},
//
handlePrint(row){
this.rowItem = row;
this.printVisible = true;
},
exportExcel() {
this.exportLoading = true;
this.$XLSX('#myTable',"过程自检记录表")
this.exportLoading = false;
},
},
};
</script>

View File

@ -2,27 +2,29 @@
<el-container>
<!--基本信息!-->
<el-main v-loading="mainLoading" style="margin-top: -10px;">
<el-button type="primary" @click="handleExport">导出</el-button>
<el-button type="primary" @click="handlePrint">打印</el-button>
<div id="exportDiv" class="exportDiv">
<div id="exportDiv" v-if="codeVisible" class="exportDiv">
<scQrCode :text="value"></scQrCode>
<!-- <div ref="qrCodeUrl" id="qrcode" v-if="codeVisible"></div> -->
<!-- <canvas id="barcode"></canvas> -->
<!-- 入库信息 -->
<div class="containersDom" v-if="type=='do_in'||type=='pur_in'">
<ul class="export_ul">
<li class="export_ulli export_ulli_title">入库信息单</li>
</ul>
<ul class="export_ul">
<li class="export_ulli">入库信息单编号</li>
<li class="export_ulli">入库日期</li>
<li class="export_ulli" v-if="mtype=='10'||mtype=='20'">执行部门-工段</li>
<li class="export_ulli" v-if="mtype=='10'||mtype=='20'">交送人</li>
<li class="export_ulli">仓库接收人</li>
<li class="export_ulli">仓库</li>
<li class="export_ulli" v-if="mtype=='30'||mtype=='40'">采购订单</li>
<li class="export_ulli" v-if="mtype=='30'||mtype=='40'">供应商名称</li>
<li class="export_ulli export_ulli_h">入库信息单编号</li>
<li class="export_ulli export_ulli_h">入库日期</li>
<li class="export_ulli export_ulli_h" v-if="mtype=='10'||mtype=='20'">执行部门-工段</li>
<li class="export_ulli export_ulli_h" v-if="mtype=='10'||mtype=='20'">交送人</li>
<li class="export_ulli export_ulli_h">仓库接收人</li>
<li class="export_ulli export_ulli_h">仓库</li>
<li class="export_ulli export_ulli_h" v-if="mtype=='30'||mtype=='40'">采购订单</li>
<li class="export_ulli export_ulli_h" v-if="mtype=='30'||mtype=='40'">供应商名称</li>
</ul>
<ul class="export_ul">
<li class="export_ulli">{{baseData.number}}</li>
<li class="export_ulli">{{baseData.submit_time.slice(0,16)}}</li>
<li class="export_ulli">{{baseData.inout_date}}</li>
<!-- <li class="export_ulli" v-else>{{baseData.submit_time.slice(0,16)}}</li> -->
<li class="export_ulli" v-if="mtype=='10'||mtype=='20'">{{baseData.belong_dept_name}}</li>
<li class="export_ulli" v-if="mtype=='10'||mtype=='20'">{{baseData.do_user_name}}</li>
<li class="export_ulli">{{baseData.mio_user_name}}</li>
@ -35,17 +37,17 @@
<li class="export_ulli export_ulli_title">物料清单</li>
</ul>
<ul class="export_ul">
<li class="export_ulli">物料名称</li>
<li class="export_ulli">型号</li>
<li class="export_ulli">所在工序</li>
<li class="export_ulli">批次号</li>
<li class="export_ulli">数量</li>
<li class="export_ulli export_ulli_h flex2">物料名称</li>
<!-- <li class="export_ulli export_ulli_h">型号</li> -->
<li class="export_ulli export_ulli_h">所在工序</li>
<li class="export_ulli export_ulli_h flex2">批次号</li>
<li class="export_ulli export_ulli_h">数量</li>
</ul>
<ul class="export_ul" v-for="item in tableData" :key="item.id">
<li class="export_ulli">{{ item.material_name }}</li>
<li class="export_ulli" v-if="item.material_">{{ item.material_.model }}</li>
<li class="export_ulli flex2">{{ item.material_name }}</li>
<!-- <li class="export_ulli" v-if="item.material_">{{ item.material_.model }}</li> -->
<li class="export_ulli" v-if="item.material_">{{ item.material_.process_name }}</li>
<li class="export_ulli">{{ item.batch }}</li>
<li class="export_ulli flex2">{{ item.batch }}</li>
<li class="export_ulli">{{ item.count }}</li>
</ul>
</div>
@ -119,8 +121,8 @@
<li class="export_ulli">{{ item.count }}</li>
</ul>
</div>
<!-- 检验结果 -->
<div class="containersDom" v-else-if="type=='check_out'">
<!-- 过程检验/过程抽检-->
<div class="containersDom" v-else-if="type=='ptest_gx'||type=='ptest_cj'">
<ul class="export_ul">
<li class="export_ulli export_ulli_title">XXX检验结果</li>
</ul>
@ -160,6 +162,7 @@
<li class="export_ulli"></li>
<li class="export_ulli"></li>
</ul>
<!-- 过程检验 -->
<ul class="export_ul">
<li class="export_ulli">厚度</li>
<li class="export_ulli">气泡</li>
@ -184,6 +187,99 @@
<li class="export_ulli">{{baseData.count_n_cpyd}}</li>
<li class="export_ulli">{{baseData.count_n_cptxd}}</li>
</ul>
</div>
<!-- 尺寸检验/外观检验 -->
<div class="containersDom" v-else-if="type=='productstest_cc'||type=='productstest_wg'">
<ul class="export_ul">
<li class="export_ulli export_ulli_title" v-if="type=='productstest_cc'">尺寸检验</li>
<li class="export_ulli export_ulli_title" v-else>外观检验</li>
</ul>
<ul class="export_ul">
<li class="export_ulli">批次号</li>
<li class="export_ulli">总数</li>
<li class="export_ulli">检验数</li>
<li class="export_ulli">检验人</li>
<li class="export_ulli">检验日期</li>
<li class="export_ulli">班次</li>
</ul>
<ul class="export_ul">
<li class="export_ulli">{{ baseData.material_mame }}</li>
<li class="export_ulli">{{ baseData.count_real }}</li>
<li class="export_ulli">{{ baseData.count_use }}</li>
<li class="export_ulli">{{ baseData.handle_user_name }}</li>
<li class="export_ulli">{{ baseData.count_ok }}</li>
<li class="export_ulli">{{ baseData.test_time }}</li>
</ul>
<ul class="export_ul">
<li class="export_ulli">合格数</li>
<li class="export_ulli">不合格数</li>
<li class="export_ulli"></li>
<li class="export_ulli"></li>
<li class="export_ulli"></li>
<li class="export_ulli"></li>
</ul>
<ul class="export_ul">
<li class="export_ulli">{{ baseData.count_ok }}</li>
<li class="export_ulli">{{baseData.count_notok}}</li>
<li class="export_ulli"></li>
<li class="export_ulli"></li>
<li class="export_ulli"></li>
<li class="export_ulli"></li>
</ul>
<!-- 尺寸检验 -->
<ul class="export_ul" v-if="type=='productstest_cc'">
<li class="export_ulli">黑圈内径</li>
<li class="export_ulli">黑圈内径圆度</li>
<li class="export_ulli">黑圈外径</li>
<li class="export_ulli">黑圈外径圆度</li>
<li class="export_ulli">产品外径</li>
<li class="export_ulli">产品圆度</li>
<li class="export_ulli">产品同心度</li>
<li class="export_ulli">厚度</li>
<li class="export_ulli">准合格</li>
<li class="export_ulli">圆准</li>
</ul>
<!-- 外观检验 -->
<ul class="export_ul" v-else>
<li class="export_ulli"></li>
<li class="export_ulli">气泡</li>
<li class="export_ulli">水纹</li>
<li class="export_ulli">崩边</li>
<li class="export_ulli">棕边</li>
<li class="export_ulli">棕圈</li>
<li class="export_ulli">划伤</li>
<li class="export_ulli">麻点</li>
<li class="export_ulli">黑圈变形</li>
<li class="export_ulli">倒角</li>
<li class="export_ulli">破损</li>
<li class="export_ulli">蓝圈</li>
</ul>
<ul class="export_ul" v-if="type=='productstest_cc'">
<li class="export_ulli">{{baseData.count_n_hd}}</li>
<li class="export_ulli">{{baseData.count_n_qp}}</li>
<li class="export_ulli">{{baseData.count_n_swen}}</li>
<li class="export_ulli">{{baseData.count_n_bb}}</li>
<li class="export_ulli">{{baseData.count_n_hs}}</li>
<li class="export_ulli">{{baseData.count_n_md}}</li>
<li class="export_ulli">{{baseData.count_n_xh}}</li>
<li class="export_ulli">{{baseData.count_n_cpwj}}</li>
<li class="export_ulli">{{baseData.count_n_cpyd}}</li>
<li class="export_ulli">{{baseData.count_n_cptxd}}</li>
</ul>
<ul class="export_ul" v-else>
<li class="export_ulli">{{baseData.count_n_hd}}</li>
<li class="export_ulli">{{baseData.count_n_qp}}</li>
<li class="export_ulli">{{baseData.count_n_swen}}</li>
<li class="export_ulli">{{baseData.count_n_bb}}</li>
<li class="export_ulli">{{baseData.count_n_hs}}</li>
<li class="export_ulli">{{baseData.count_n_md}}</li>
<li class="export_ulli">{{baseData.count_n_xh}}</li>
<li class="export_ulli">{{baseData.count_n_cpwj}}</li>
<li class="export_ulli">{{baseData.count_n_cpyd}}</li>
<li class="export_ulli">{{baseData.count_n_cptxd}}</li>
<li class="export_ulli">{{baseData.count_n_cptxd}}</li>
<li class="export_ulli">{{baseData.count_n_cptxd}}</li>
</ul>
</div>
<!-- 任务分解单 -->
<div class="containersDom" v-else-if="type=='mtask'">
@ -192,101 +288,155 @@
</ul>
<ul class="export_ul">
<li class="export_ulli">任务编号</li>
<li class="export_ulli">工艺路线</li>
<li class="export_ulli">所在工段</li>
<li class="export_ulli">产品名称</li>
<li class="export_ulli">任务总数量</li>
</ul>
<ul class="export_ul">
<li class="export_ulli">11111111111</li>
<li class="export_ulli">CNC</li>
<li class="export_ulli">CNC玻璃</li>
<li class="export_ulli">100000</li>
<li class="export_ulli">{{ baseData.number }}</li>
<li class="export_ulli">{{ baseData.mgroup_name }}</li>
<li class="export_ulli">{{ baseData.material_out_name }}</li>
<li class="export_ulli">{{ baseData.count }}</li>
</ul>
<ul class="export_ul">
<li class="export_ulli export_ulli_title">任务分解表</li>
</ul>
<ul class="export_ul">
<li class="export_ulli">子任务编号</li>
<li class="export_ulli">人员</li>
<li class="export_ulli">数量</li>
</ul>
<ul class="export_ul">
<li class="export_ulli">11111111101</li>
<li class="export_ulli">张三</li>
<li class="export_ulli">5000</li>
<ul class="export_ul" v-for="item in baseData.mtaskb" :key="item.id">
<li class="export_ulli">{{ item.handle_user_name }}</li>
<li class="export_ulli">{{ item.count }}</li>
</ul>
</div>
<!-- 日志记录 -->
<div class="containersDom" v-else-if="type=='mlogs'">
<div class="containersDom" v-else-if="type=='mlogs12'">
<ul class="export_ul">
<li class="export_ulli export_ulli_title">日志记录</li>
</ul>
<ul class="export_ul">
<li class="export_ulli">任务编号</li>
<li class="export_ulli">工艺路线</li>
<li class="export_ulli">产品名称</li>
<li class="export_ulli">任务总数</li>
<li class="export_ulli">备注</li>
<!-- <li class="export_ulli">任务总数</li> -->
</ul>
<ul class="export_ul">
<li class="export_ulli">11111111111</li>
<li class="export_ulli">CNC</li>
<li class="export_ulli">CNC玻璃</li>
<li class="export_ulli">100000</li>
<li class="export_ulli">{{baseData.mtask_number}}</li>
<li class="export_ulli">{{baseData.routepack_name}}</li>
<li class="export_ulli">{{baseData.note}}</li>
<!-- <li class="export_ulli">{{baseData.routepack_name}}</li> -->
</ul>
<ul class="export_ul">
<li class="export_ulli export_ulli_title">物料清单</li>
</ul>
<!-- 循环子任务 -->
<div style="display: flex;">
<div style="width: 40px; border-top: 1px solid #aaaaaa;border-left: 1px solid #aaaaaa;">1</div>
<div style="display: flex;" v-for="(item,index) in tableData" :key="item.id">
<div style="width: 40px; border-top: 1px solid #aaaaaa;border-left: 1px solid #aaaaaa;">{{ index+1 }}</div>
<div style="flex: 1;">
<ul class="export_ul">
<li class="export_ulli">设备编号</li>
<li class="export_ulli">操作人</li>
<li class="export_ulli">班次</li>
<li class="export_ulli">开始时间</li>
<li class="export_ulli" v-if="mgroupName=='黑化'">温度</li>
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">保温时间</li>
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">冷却时间</li>
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">预估结束时间</li>
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">备注层数</li>
</ul>
<ul class="export_ul">
<li class="export_ulli">TH11101</li>
<li class="export_ulli">张三</li>
<li class="export_ulli">白班</li>
<li class="export_ulli">1900</li>
<li class="export_ulli" v-if="mgroupName=='黑化'">温度</li>
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">600</li>
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">120</li>
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">0500</li>
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">1到10层</li>
<li class="export_ulli">{{ item.equipment_name }}</li>
<li class="export_ulli">{{ item.handle_user_name }}</li>
<li class="export_ulli">{{ item.shift_name }}</li>
<li class="export_ulli">{{ item.work_start_time }}</li>
</ul>
<ul class="export_ul">
<li class="export_ulli">输入物料批次号</li>
<li class="export_ulli flex2">输入物料批次号</li>
<li class="export_ulli">领料数量</li>
<li class="export_ulli">加工数量</li>
<li class="export_ulli">加工前不良数量</li>
<li class="export_ulli">输出物料批次号</li>
<li class="export_ulli flex2">输出物料批次号</li>
<li class="export_ulli">合格数量</li>
<li class="export_ulli">不合格数量</li>
<li class="export_ulli">不合格原因</li>
<!-- <li class="export_ulli">不合格原因</li> -->
<!-- <li class="export_ulli">工段</li> -->
</ul>
<ul class="export_ul">
<li class="export_ulli">20241011</li>
<li class="export_ulli">5000</li>
<li class="export_ulli">4000</li>
<li class="export_ulli">10</li>
<li class="export_ulli">20241011-TH01</li>
<li class="export_ulli">3950</li>
<li class="export_ulli">40</li>
<li class="export_ulli">崩边</li>
<li class="export_ulli flex2" v-if="item.mlogb_full&&item.mlogb_full[0]">{{item.mlogb_full[0].batch}}</li>
<li class="export_ulli" v-if="item.mlogb_full&&item.mlogb_full[0]">{{item.mlogb_full[0].count_use}}</li>
<li class="export_ulli">{{item.count_real}}</li>
<li class="export_ulli">{{ item.count_pn_jgqbl }}</li>
<li class="export_ulli flex2" v-if="item.mlogb_full&&item.mlogb_full[1]">{{item.mlogb_full[1].batch}}</li>
<li class="export_ulli">{{item.count_ok}}</li>
<li class="export_ulli">{{item.count_notok}}</li>
<!-- <li class="export_ulli">{{item.mgroup_name}}</li> -->
</ul>
</div>
</div>
</div>
<!-- 日志记录 -->
<div class="containersDom" v-else-if="type=='mlogs23'">
<ul class="export_ul">
<li class="export_ulli export_ulli_title">日志记录</li>
</ul>
<ul class="export_ul">
<li class="export_ulli">工艺路线</li>
<li class="export_ulli">工段</li>
<li class="export_ulli flex2">输入物料</li>
<li class="export_ulli flex2">输出物料</li>
<li class="export_ulli">生产设备</li>
<li class="export_ulli">处理人</li>
<li class="export_ulli">开始时间</li>
</ul>
<ul class="export_ul">
<li class="export_ulli">{{baseData.routepack_name}}</li>
<li class="export_ulli">{{baseData.mgroup_name}}</li>
<li class="export_ulli flex2">{{baseData.material_in_name}}</li>
<li class="export_ulli flex2">{{baseData.material_out_name}}</li>
<li class="export_ulli">{{baseData.equipment_name}}</li>
<li class="export_ulli">{{baseData.handle_user_name}}</li>
<li class="export_ulli">{{baseData.work_start_time}}</li>
</ul>
<ul class="export_ul">
<li class="export_ulli" v-if="mgroupName=='黑化'">温度</li>
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">保温时间</li>
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">冷却时间</li>
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">预估结束时间</li>
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">备注层数</li>
</ul>
<ul class="export_ul">
<li class="export_ulli" v-if="mgroupName=='黑化'">温度</li>
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">600</li>
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">120</li>
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">0500</li>
<li class="export_ulli" v-if="mgroupName=='黑化'||mgroupName=='退火'">1到10层</li>
</ul>
<ul class="export_ul">
<li class="export_ulli export_ulli_title">物料清单</li>
</ul>
<!-- 循环子任务 -->
<div style="display: flex;" v-for="(item,index) in tableData" :key="item.id">
<div style="width: 40px; border-top: 1px solid #aaaaaa;border-left: 1px solid #aaaaaa;">{{ index+1 }}</div>
<div style="flex: 1;">
<ul class="export_ul">
<li class="export_ulli flex2">输入物料批次号</li>
<li class="export_ulli">领料数量</li>
<li class="export_ulli">加工数量</li>
<li class="export_ulli">加工前不良数</li>
<li class="export_ulli flex2">输出物料批次号</li>
<li class="export_ulli">合格数量</li>
<li class="export_ulli">不合格数量</li>
</ul>
<ul class="export_ul">
<li class="export_ulli flex2">{{item.batch}}</li>
<li class="export_ulli">{{item.count_use}}</li>
<li class="export_ulli">{{item.count_real}}</li>
<li class="export_ulli">{{ item.count_pn_jgqbl }}</li>
<li class="export_ulli flex2">{{tableData2[index].batch}}</li>
<li class="export_ulli">{{tableData2[index].count_ok}}</li>
<li class="export_ulli">{{tableData2[index].count_notok}}</li>
</ul>
</div>
</div>
</div>
<!-- 交接记录 -->
<div class="containersDom" v-else-if="type=='handover'">
@ -303,27 +453,27 @@
<li class="export_ulli">备注</li>
</ul>
<ul class="export_ul">
<li class="export_ulli">1111</li>
<li class="export_ulli">2222</li>
<li class="export_ulli">3333</li>
<li class="export_ulli">4444</li>
<li class="export_ulli">5555</li>
<li class="export_ulli">6666</li>
<li class="export_ulli">7777</li>
<li class="export_ulli">{{ baseData.send_mgroup_name }}</li>
<li class="export_ulli">{{ baseData.send_user_name }}</li>
<li class="export_ulli">{{ baseData.recive_mgroup_name }}</li>
<li class="export_ulli">{{ baseData.recive_user_name }}</li>
<li class="export_ulli">{{ baseData.send_date }}</li>
<li class="export_ulli">{{ baseData.recive_date }}</li>
<li class="export_ulli">{{ baseData.note }}</li>
</ul>
<ul class="export_ul">
<li class="export_ulli export_ulli_title">物料清单</li>
</ul>
<ul class="export_ul">
<li class="export_ulli">物料名称</li>
<!-- <li class="export_ulli">物料名称</li> -->
<li class="export_ulli">批次号</li>
<li class="export_ulli">数量</li>
</ul>
<ul class="export_ul">
<li class="export_ulli">11111111111</li>
<li class="export_ulli">22222222222</li>
<li class="export_ulli">33333333333</li>
<ul class="export_ul" v-for="item in tableData" :key="item.id">
<!-- <li class="export_ulli">{{ item.material_name }}</li> -->
<li class="export_ulli">{{ item.batch }}</li>
<li class="export_ulli">{{ item.count }}</li>
</ul>
</div>
<!-- 成品尺寸检测记录单 -->
@ -391,6 +541,8 @@
</ul>
</div>
</div>
<el-button type="primary" @click="handleExport">导出</el-button>
<el-button type="primary" @click="handlePrint">打印</el-button>
</el-main>
</el-container>
</template>
@ -419,6 +571,12 @@
return [];
},
},
tableData2: {
type: Array,
default: () => {
return [];
},
},
mgroupId: {
type: String,
default: "",
@ -431,37 +589,36 @@
data() {
return {
mainLoading: false,
issave: false, //
search: {
keyword: null,
},
oplcateCode: 'fire',
operationId: "",
oplId: "",
ticketId:'',
codeVisible:false,
value:''
};
},
mounted() {
let that = this;
this.$nextTick(()=>{})
// 'BARCODE 0,130,"128",108,0,0,2,4,"'
let that = this;
that.printId = that.baseData.id;
that.value = that.type + ":" + that.printId+",url:'/wpm_gx/qiepian'";
that.codeVisible = true;
// var canvas = document.getElementById("barcode");
// var context = canvas.getContext("2d");
// context.clearRect(0, 0, context.width, context.height);
// JsBarcode("#barcode", that.printId, {
// format: "CODE128",
// displayValue: true,
// fontSize: 20,
// lineColor: "#000000",
// });
},
methods: {
handlePrint(){
this.$PRINT("#exportDiv");
this.$emit('closePrint')
},
handleExport() {
let exportDiv = document.getElementById('exportDiv') // id
this.pdfDownLoader = new PdfLoader(exportDiv, '作业许可证', 'exportDiv') // fileName -->, question-table -->class
this.pdfDownLoader.outPutPdfFn('test');
},
//
getworkerList() {
this.$API.opm.worker.list.req({opl: this.oplId, page: 0}).then((res) => {
this.workerData = res;
});
this.$emit('closePrint');
},
},
}
@ -496,5 +653,17 @@
}
.export_ulli_title{
text-align: center;
/* color: #ffffff; */
background-color: #e3e3e3;
}
.export_ulli_h{
background-color: #e3e3e3;
}
.flex2{
flex:2
}
#barcode {
width: 200px;
height: 60px;
}
</style>

View File

@ -0,0 +1,40 @@
<template>
<div>
<el-button type="primary" @click="open" style="margin-left: 10px;">扫码添加</el-button>
<el-dialog
title="扫描二维码"
v-model="visible"
destroy-on-close
>
<el-input
ref="codeInput"
v-model="codeText"
clearable
@change="$emit('closed',codeText)"
></el-input>
</el-dialog>
</div>
</template>
<script>
export default {
data(){
return{
visible:false,
codeText:''
}
},
methods:{
open(){
this.codeText = '';
this.visible = true;
setTimeout(() => {
this.$refs.codeInput.focus();
}, 200);
return this;
},
closed(){
this.visible = false;
}
}
}
</script>

View File

@ -6,23 +6,23 @@
destroy-on-close
@closed="$emit('closed')"
>
<el-container>
<el-header style="height:100px;padding:0">
<el-card style="width: 100%" header="基本信息" shadow="never">
<el-descriptions>
<el-descriptions-item label="工艺路线">{{
fmlogItem.routepack_name
}}</el-descriptions-item>
<el-descriptions-item label="任务编号">{{
fmlogItem.mtask_number
}}</el-descriptions-item>
<el-descriptions-item label="部门/车间">{{
fmlogItem.belong_dept_name
}}</el-descriptions-item>
</el-descriptions>
</el-card>
</el-header>
<el-container>
<el-header style="height:100px;padding:0">
<el-card style="width: 100%" header="基本信息" shadow="never">
<el-button type="primary" @click="handlePrint" style="position: absolute;right: 20px;">打印</el-button>
<el-descriptions>
<el-descriptions-item label="工艺路线">{{
fmlogItem.routepack_name
}}</el-descriptions-item>
<el-descriptions-item label="任务编号">{{
fmlogItem.mtask_number
}}</el-descriptions-item>
<el-descriptions-item label="部门/车间">{{
fmlogItem.belong_dept_name
}}</el-descriptions-item>
</el-descriptions>
</el-card>
</el-header>
<!-- mlog -->
<el-main style="padding-top: 40px;position: relative;">
<el-button
@ -145,11 +145,15 @@
>
</check-dialog>
</el-container>
<el-dialog v-model="printVisible" width="1200px">
<print :baseData="fmlogItem" :tableData="tableData" type="mlogs12" @closePrint="printVisible=false"/>
</el-dialog>
</el-drawer>
</template>
<script>
import saveDialog from "./f_mlogs_form.vue";
import checkDialog from "./mlogb_check.vue";
import print from "./../setting/print/A4.vue";
export default {
props: {
fmlogId: {
@ -160,6 +164,7 @@ export default {
components: {
saveDialog,
checkDialog,
print
},
emits: ["success", "closed"],
data() {
@ -192,10 +197,12 @@ export default {
强度落球:'',
},
fileList:[],
tableData:[],
test_file:'',
deptId: "",
visible: false,
isSaveing: false,
printVisible:false,
options: [],
saveInDialog: false,
ticketDialog:false,
@ -305,6 +312,17 @@ export default {
this.selectionFilters = filters;
this.setFiltersVisible = true;
},
handlePrint(){
let that = this;
that.$API.wpm.mlog.list.req(that.params).then((res) => {
that.tableData = res;
// console.log('that.tableData',that.tableData);
// console.log('that.fmlogItem',that.fmlogItem);
that.$nextTick(() => {
that.printVisible = true;
})
});
},
},
};
</script>

View File

@ -226,9 +226,13 @@
<el-button type="primary" @click="savePrinter">保存</el-button>
</el-footer>
</el-dialog>
<el-dialog v-model="printVisible" width="1200px">
<print :baseData="handoverItem" :tableData="handoverItem.handoverb" :type="'handover'" @closePrint="printVisible=false"/>
</el-dialog>
</template>
<script>
import saveDialog from "./handover_form.vue";
import print from "./../setting/print/A4.vue";
export default {
props: {
mgroupName: {
@ -238,7 +242,7 @@ export default {
},
name: "handover",
components: {
saveDialog,
saveDialog,print
},
data() {
return {
@ -263,7 +267,7 @@ export default {
options: ["交送", "接收"],
tableData: [],
selection: [],
handoverItem: {},
handoverItem:{},
values: "交送",
deptId:'',
mtask: "",
@ -272,7 +276,9 @@ export default {
processId: "",
processCate: "",
printer_name: "",
printVisible:false,
setNameVisible: false,
testCode: "mat:3689278065261125632",
};
},
mounted() {
@ -320,36 +326,39 @@ export default {
printSetting(){
this.setNameVisible = true;
},
handoverPrint() {
handoverPrint(row) {
let that = this;
let str = [
"SIZE 70 mm,90 mm",
"GAP 2 mm,0 mm",
"SIZE 60 mm,90 mm",
"GAP 0 mm,0 mm",
"CLS",
"WINTEXT 50,80,36,0,0,0,Simhei,光芯科技——交接单",
'BARCODE 50,140,"128",108,0,0,3,5,"' +
that.handoverItem.id +
'"',
"WINTEXT 50,280,36,0,0,0,Simhei," +
that.handoverItem.material_name,
"WINTEXT 50,340,36,0,0,0,Simhei,批次:" +
that.handoverItem.batch,
"WINTEXT 50,400,36,0,0,0,Simhei,数量:" +
that.handoverItem.count,
"WINTEXT 50,460,36,0,0,0,Simhei,日期:" +
that.handoverItem.send_date,
"WINTEXT 50,520,36,0,0,0,Simhei,送料:" +
that.handoverItem.send_mgroup_name +
"——" +
that.handoverItem.send_user_name,
"WINTEXT 50,580,36,0,0,0,Simhei,收料:" +
that.handoverItem.recive_mgroup_name +
"——" +
that.handoverItem.recive_user_name,
"PRINT 1",
];
// -
// -
'QRCODE 0,60,H,5,A,0,"' +that.testCode +'"',
"WINTEXT 0,200,36,0,0,0,Simhei," +row.material_name,
"WINTEXT 0,240,36,0,0,0,Simhei,批次:" +
row.batch,
];
if(row.wm_notok_sign!==null){
str.push("WINTEXT 0,280,36,0,0,0,Simhei,不合格原因:" +
row.wm_notok_sign,)
}
//----
// if(row.type==30||row.type==40){
// str.push("WINTEXT 50,460,36,0,0,0,Simhei," +
// row.supplier_name,)
// }
str.push("PRINT 1",)
// let str = [
// "SIZE 60 mm,90 mm",
// "GAP 0 mm,0 mm",
// "CLS",
// "WINTEXT 0,10,36,0,0,0,Simhei," +row.material_name,
// 'QRCODE 0,60,H,5,A,0,"' +that.testCode +'"',
// "WINTEXT 50,340,36,0,0,0,Simhei," +
// row.batch,
// "WINTEXT 50,400,36,0,0,0,Simhei," +
// row.wm_notok_sign,
// "PRINT 1",
// ];
let obj = {};
obj.printer_commands = str;
obj.printer_name = that.printer_name;
@ -432,20 +441,22 @@ export default {
});
},
table_print(row) {
//
let that = this;
if (
that.printer_name == null ||
that.printer_name == "" ||
that.printer_name == undefined
) {
this.setNameVisible = true;
} else {
that.$API.wpm.handover.item.req(row.id).then((res) => {
that.handoverItem = res;
that.handoverPrint();
});
}
that.handoverItem = row;
that.printVisible = true;
//
// if (
// that.printer_name == null ||
// that.printer_name == "" ||
// that.printer_name == undefined
// ) {
// this.setNameVisible = true;
// } else {
// that.$API.wpm.handover.item.req(row.id).then((res) => {
// that.handoverItem = res;
// that.handoverPrint(row);
// });
// }
},
savePrinter() {
let that = this;

View File

@ -113,15 +113,16 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="交接物料">
<el-button type="primary" icon="el-icon-plus" @click="addMaterial" v-if="mode!=='show'"></el-button>
<el-button type="primary" @click="addMaterial" v-if="mode!=='show'">手动添加</el-button>
<scan-dialog ref="scanDialog" @closed="scanClose"> </scan-dialog>
<!-- <el-button type="primary" @click="scanCode" v-if="mode!=='show'">扫码添加</el-button> -->
</el-form-item>
</el-row>
<el-row v-for="(listItem,$index) in form.handoverb" :key="listItem">
<el-col :span="11">
<el-col :span="10">
<el-form-item label="交接物料">
<el-select
v-if="mode!=='show'"
@ -129,6 +130,7 @@
placeholder="交接物料"
filterable
clearable
@change="materialChange($index)"
style="width: 100%"
>
<el-option
@ -149,13 +151,19 @@
<el-input v-else v-model="listItem.batch" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-col :span="5">
<el-form-item label="总数量">
<span>{{ listItem.counts }}</span>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="交接数量">
<el-input-number
v-model="listItem.count"
controls-position="right"
:min="0"
step="1"
:max="listItem.counts"
:disabled="mode==='show'"
:step-strictly="true"
style="width: 100%"
@ -170,14 +178,19 @@
</el-row>
</el-form>
<el-footer v-if="mode!=='show'">
<el-button type="primary" v-loading="isSaveing" @click="submit"
>确定</el-button
>
<el-button type="primary" v-loading="isSaveing" @click="submit">确定</el-button>
<el-button @click="visible = false">取消</el-button>
</el-footer>
</el-dialog>
<!-- <scan-dialog
v-if="scanVisible"
ref="scanDialog"
@closed="scanClose"
>
</scan-dialog> -->
</template>
<script>
import scanDialog from "./../template/scan.vue";
export default {
emits: ["success", "closed"],
props: {
@ -194,6 +207,9 @@ export default {
default: "",
},
},
components: {
scanDialog
},
data() {
return {
yseorno: ["是", "否"],
@ -212,7 +228,7 @@ export default {
send_mgroup: null,
recive_user: null,
recive_mgroup: null,
handoverb:[{wm:'',count:''}],
handoverb:[],
},
rules: {
batch: [
@ -270,6 +286,7 @@ export default {
mgroupOptions: [],
materialOptions: [],
visible: false,
scanVisible:false,
isSaveing: false,
setFiltersVisible: false,
};
@ -440,7 +457,7 @@ export default {
});
},
addMaterial(){
this.form.handoverb.push({wm:'',count:''});
this.form.handoverb.push({wm:'',count:'',counts:null});
},
delMaterial(index){
this.form.handoverb.splice(index,1);
@ -451,11 +468,14 @@ export default {
this.visible = true;
return this;
},
materialChange(val) {
materialChange(index) {
let val = this.form.handoverb[index].wm;
let data = this.materialOptions.filter((item) => {
return item.id == val;
});
this.form.batch = data[0].batch;
this.form.handoverb[index].batch = data[0].batch;
this.form.handoverb[index].counts = data[0].count;
this.form.handoverb[index].count = data[0].count;
},
//
submit() {
@ -514,6 +534,47 @@ export default {
this.selectionFilters = filters;
this.setFiltersVisible = true;
},
//
scanCode(){
let that = this;
that.scanVisible = true;
// that.$nextTick(() => {
// that.$refs.scanDialog.open();
// });
},
scanClose(data){
if(data==''||data==undefined||data==null){
return;
}
let that = this;
let id =data.split(':')[1];
console.log('id',id);
this.$API.cm.labelmat.item.req(id).then((res) => {
console.log('res',res);
let arr = that.form.handoverb.filter((item) => {
return item.batch == res.batch;
})
console.log('arr',arr);
if(arr.length>0){
that.$message.error("该批次已存在")
}else{
that.materialOptions.forEach((item) => {
if(item.batch == res.batch){
let arr = that.form.handoverb
let obj = {};
obj.wm = item.id;
obj.batch = item.batch;
obj.counts = item.count;
obj.count = item.count;
that.form.handoverb.push(obj)
that.$refs.scanDialog.closed();
}
})
}
})
//
this.scanVisible = false;
},
},
};
</script>

View File

@ -93,7 +93,7 @@
fixed="right"
align="center"
width="120"
v-if="mgroupName!=='size'&&mgroupName!=='facade'"
>
<template #default="scope">
<el-button
@ -101,16 +101,17 @@
@click="table_Check(scope.row)"
v-auth="'ftestwork.create'"
type="primary"
v-if="scope.row.notok_sign_name == null"
v-if="mgroupName!=='size'&&mgroupName!=='facade'&&scope.row.notok_sign_name == null"
>检验
</el-button>
<el-button
link size="small"
type="warning"
@click="tableCheckList(scope.row)"
v-if="scope.row.notok_sign_name == null"
v-if="mgroupName!=='size'&&mgroupName!=='facade'&&scope.row.notok_sign_name == null"
>检验记录
</el-button>
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
</template>
</el-table-column>
</scTable>
@ -208,6 +209,7 @@ export default {
process:'',
materialType: "wm",
visibleDrawer: false,
printer_name:localStorage.getItem("printer_name")
};
},
mounted() {
@ -312,6 +314,32 @@ export default {
this.dialog.save = false;
this.$refs.table.refresh();
},
//
printMaterial(row){
let that = this;
that.$API.cm.labelmat.fromWm.req({tid:row.id}).then((res) => {
console.log(res)
let code = res.code_label;
let str = [
"SIZE 40 mm,70 mm",
"GAP 7 mm,7 mm",
"CLS",
"REFERENCE 0,0",
'QRCODE 30,400,H,5,A,0,"' +code +'"',
"WINTEXT 200,550,28,90,0,0,Simhei," + res.material_name,
"WINTEXT 240,550,28,90,0,0,Simhei," + res.batch,
];
if(res.notok_sign!==null){
str.push("WINTEXT 280,550,28,90,0,0,Simhei," +res.notok_sign_name,)
}
str.push("PRINT 1",)
let obj = {};
obj.printer_commands = str;
obj.printer_name = that.printer_name;
this.$API.wpm.prints.req(obj).then((response) => {});
})
},
},
};
</script>

View File

@ -264,6 +264,11 @@
show-overflow-tooltip
>
</el-table-column>
<el-table-column width="90">
<template #default="scope">
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
</template>
</el-table-column>
</scTable>
</el-card>
<save-dialog
@ -277,7 +282,7 @@
@closed="dialog.save = false"
></save-dialog>
<el-dialog v-model="printVisible" width="1200px">
<print :baseData="form" :tableData="tableData" :type="form.type" mtype="20"/>
<print :baseData="form" :tableData="tableData" :type="form.type" mtype="20" @closePrint="printVisible=false"/>
</el-dialog>
</el-drawer>
</template>
@ -336,6 +341,7 @@ export default {
userOptions: [],//
deptOptions: [],
mgroupOptions: [],
printer_name:localStorage.getItem("printer_name")
};
},
mounted() {
@ -465,9 +471,34 @@ export default {
});
},
submitOut() {},
//
handlePrint(){
this.printVisible = true;
},//
},
//
printMaterial(row){
let that = this;
that.$API.cm.labelmat.fromMioitem.req({tid:row.id}).then((res) => {
let code = res.code_label;
let str = [
"SIZE 40 mm,70 mm",
"GAP 7 mm,7 mm",
"CLS",
"REFERENCE 0,0",
'QRCODE 30,400,H,5,A,0,"' +code +'"',
"WINTEXT 200,550,28,90,0,0,Simhei," + res.material_name,
"WINTEXT 240,550,28,90,0,0,Simhei," + res.batch,
];
if(res.notok_sign!==null){
str.push("WINTEXT 280,550,28,90,0,0,Simhei," +res.notok_sign_name,)
}
str.push("PRINT 1",)
let obj = {};
obj.printer_commands = str;
obj.printer_name = that.printer_name;
this.$API.wpm.prints.req(obj).then((response) => {});
})
},
//
handleSaveSuccess() {
this.$refs.tables.refresh();

View File

@ -8,6 +8,7 @@
>
<div>
<el-card style="width: 100%" header="基本信息" shadow="never">
<el-button type="primary" @click="handlePrint" style="position: absolute;right: 20px;">打印</el-button>
<el-descriptions>
<el-descriptions-item label="工艺路线">{{
mlogItem.routepack_name
@ -385,6 +386,9 @@
>
</template>
</el-dialog>
<el-dialog v-model="printVisible" width="1200px">
<print :baseData="mlogItem" :tableData="tableData" :tableData2="tableData2" type="mlogs23" @closePrint="printVisible=false"/>
</el-dialog>
</div>
</el-drawer>
</template>
@ -392,6 +396,7 @@
import editDialog from "./mlog_form.vue";
import saveDialog from "./mlogb_form.vue";
import checkDialog from "./mlogb_check.vue";
import print from "./../setting/print/A4.vue";
export default {
props: {
mlogId: {
@ -403,6 +408,7 @@ export default {
editDialog,
saveDialog,
checkDialog,
print
},
emits: ["success", "closed"],
data() {
@ -454,8 +460,11 @@ export default {
visible: false,
isSaveing: false,
options: [],
tableData:[],
tableData2:[],
saveInDialog: false,
ticketDialog:false,
printVisible:false,
setFiltersVisible: false,
rules: {
count_use: [
@ -469,11 +478,18 @@ export default {
};
},
mounted() {
let that = this;
this.getMlogItem();
this.paramsIn.mlog = this.mlogId;
this.paramsOut.mlog = this.mlogId;
this.apiObj = this.$API.wpm.mlogb.list;
this.getInit();
that.$API.wpm.mlogb.list.req(that.paramsIn).then((res) => {
that.tableData = res;
})
that.$API.wpm.mlogb.list.req(that.paramsOut).then((res) => {
that.tableData2 = res;
})
},
methods: {
open() {
@ -638,6 +654,10 @@ export default {
this.selectionFilters = filters;
this.setFiltersVisible = true;
},
handlePrint(){
let that = this;
that.printVisible = true;
},
},
};
</script>

View File

@ -7,6 +7,7 @@
@closed="$emit('closed')"
>
<div>
<el-button type="primary" @click="handlePrint" style="position: absolute;right: 20px;">打印</el-button>
<el-card style="width: 100%" header="基本信息" shadow="never">
<el-descriptions>
<el-descriptions-item label="名称">{{
@ -67,10 +68,15 @@
<el-button type="primary" @click="mtaskb_submit">提交</el-button>
</div>
</div>
<el-dialog v-model="printVisible" width="1200px">
<print :baseData="mtaskObj" type="mtask" @closePrint="printVisible=false"/>
</el-dialog>
</el-drawer>
</template>
<script>
import print from "./../setting/print/A4.vue";
export default {
components: { print },
props: {
mgroup: {
type: String,
@ -89,6 +95,7 @@ export default {
loading: false,
visible: false,
isSaveing: false,
printVisible:false,
mtaskObj:{},
userList:[],
cUserList:[],//
@ -182,6 +189,10 @@ export default {
this.selectionFilters = filters;
this.setFiltersVisible = true;
},
//
handlePrint(){
this.printVisible = true;
},
},
};
</script>