Commit c02602ef by linjinhong

生产单信息添加素材规格字段

parent 90c24383
[{"head_setting":{"gridShow":1,"gridValue":0,"unit":"inch","language":"cn","autoPrint":false,"gridSpacing":1},"version":"1.0.11","print_setting":{"printer":"","xy":"","byInk":2,"byInkVolume":1,"byDoublePrint":3,"bEcoMode":false,"bMaterialBlack":false,"byHighlight":5,"printNum":1,"bFastMode":false,"bUniPrint":false,"bDivide":false,"bPause":false,"byMask":3,"bTransColor":false,"byChoke":2,"minWhiteInkType":0,"bySaturation":5,"byBrightness":5,"byContrast":5,"iCyanBalance":0,"iMagentaBalance":0,"iBlackBalance":0,"iYellowBalance":0,"byMinWhite":1,"bMultiple":false},"production_no":"GCPSC250530092","print_time":"2025-05-30 14:41:29","position_unit":{"x":460.1,"rate":0.9987730061349693,"sx":0,"zIndex":0,"sh":0,"sw":0,"sy":0,"y":463.1,"w":546.1,"h":546.1,"r":0},"position_after_px":{"x":"0.2","rate":1.1247895622895623,"sx":0,"zIndex":0,"sh":0,"sw":0,"sy":0,"y":"0.2","w":"26.8","h":"30.1","r":0},"position_before_px":{"url":"D:\\work\\electron-printer\\print\\Input\\986671a8-dd05-4292-affc-5312074d3a05.png","fileName":"986671a8-dd05-4292-affc-5312074d3a05.png","rate":1.1247895622895623,"w":807.8399999999999,"zIndex":0,"x":5.080000000000041,"y":5.675000000000011,"h":908.65,"r":0},"send_api_data":{"printer":"","xy":"","byInk":2,"byInkVolume":1,"byDoublePrint":3,"bEcoMode":false,"bMaterialBlack":false,"byHighlight":5,"printNum":1,"bFastMode":false,"bUniPrint":false,"bDivide":false,"bPause":false,"byMask":3,"bTransColor":false,"byChoke":2,"minWhiteInkType":0,"bySaturation":5,"byBrightness":5,"byContrast":5,"iCyanBalance":0,"iMagentaBalance":0,"iBlackBalance":0,"iYellowBalance":0,"byMinWhite":1,"bMultiple":false,"byPlatenSize":1,"cmd":"GTXproCMD.exe print -X \"Profile\\986671a8-dd05-4292-affc-5312074d3a05.xml\" -I \"Input\\986671a8-dd05-4292-affc-5312074d3a05.png\" -A \"Output\\986671a8-dd05-4292-affc-5312074d3a05.arxp\" -S 40014501 -L 00300033 -D 0 -W 1","fileName":"986671a8-dd05-4292-affc-5312074d3a05.png","print_cmd":"GTXproCMD.exe send -A \"Output\\986671a8-dd05-4292-affc-5312074d3a05.arxp\" -P \"导出为WPS PDF"}}]
\ No newline at end of file
......@@ -63,14 +63,14 @@ export default {
};
</script>
<style lang="less" scoped>
.scrollbarBox{
.scrollbarBox {
overflow-x: auto;
overflow-y: hidden;
width: 100%;
white-space: nowrap;
}
.title {
padding: 10px;
padding: 5px 10px;
font-size: 20px;
font-weight: 700;
}
......
......@@ -57,10 +57,10 @@ export default {
setting: {
gridShow: 1,
gridValue: 0,
unit: "mm",
unit: "inch",
language: "cn",
autoPrint: false,
gridSpacing: 10,
gridSpacing: 1,
},
imgList: [],
detail: null,
......@@ -106,10 +106,12 @@ export default {
},
watch: {
setting: {
handler() {
this.$dataStore.set("setting", this.setting);
handler(val) {
this.$dataStore.set("setting", val);
console.log(val, "val");
bus.$emit("busEmit", { type: "updateSystemSetting" });
},
deep: true,
},
},
......@@ -306,6 +308,7 @@ export default {
}
);
this.detail = findByPodProductionNo.data;
console.log("detail111111", findByPodProductionNo);
let imageResList = [];
let designImagesCanvasJsonList = this.detail.drParam;
if (designImagesCanvasJsonList) {
......@@ -418,7 +421,7 @@ export default {
} catch (err) {
console.log(err);
if (!err.data) {
this.$message.error("该生产单号不存在");
this.$message.error("该生产单号未拣胚或已完成");
}
this.productionNo = "";
this.$refs.searchRef.focus();
......
......@@ -6,6 +6,7 @@ export default {
data() {
return {
drawerShow: false,
setting: {},
form: {
x: 0,
rate: 0,
......@@ -43,10 +44,23 @@ export default {
},
item: {
handler() {
console.log(789, this.item);
if (this.item) {
this.getCurrentItem(this.item);
}
},
immediate: true,
deep: true,
},
},
methods: {
pxToUnit,
unitToPx,
getCurrentItem(item) {
let setting = this.$dataStore.get("setting");
this.item.y = this.item.y - this.item.h / 2;
this.item.x = this.item.x - this.item.w / 2;
this.item.y = item.y - item.h / 2;
this.item.x = item.x - item.w / 2;
this.$dataStore.set(
"position_before_px",
JSON.parse(JSON.stringify(this.item))
......@@ -71,15 +85,7 @@ export default {
`position_after_px`,
JSON.parse(JSON.stringify(this.form))
);
}
},
immediate: true,
deep: true,
},
},
methods: {
pxToUnit,
unitToPx,
formChange(t) {
if (t && t === "w") {
this.form.h = this.form.w * this.form.rate;
......@@ -289,7 +295,7 @@ export default {
<style lang="less" scoped>
.img-form {
padding: 10px;
padding: 5px 10px;
border: 1px solid #ececec;
}
......
......@@ -260,8 +260,18 @@ export default {
},
immediate: true,
},
systemSetting: {
handler(newValue) {
if (this.imgList.length > 0) {
this.$refs.imgSetting?.getCurrentItem(this.imgList[this.selectIndex]);
}
},
deep: true,
},
},
methods: {
// 重构为可手动触发的方法
changePrintDialogShow() {
this.printDialogShow = !this.printDialogShow;
},
......@@ -986,6 +996,7 @@ export default {
break;
case "updateSystemSetting":
this.systemSetting = this.$dataStore.get("setting");
break;
case "uploadImage":
this.addFile(value, () => {
......@@ -1044,6 +1055,7 @@ export default {
<template>
<div class="page-main">
<img-setting
ref="imgSetting"
@ev="ev"
@change="formChange"
:item="returnItem"
......@@ -1064,7 +1076,7 @@ export default {
class="img-item"
style="width: 50%;"
>
<img width="150px" :src="img.url" />
<img :src="img.url" />
</div>
</div>
</template>
......@@ -1192,6 +1204,51 @@ export default {
</div>
<div>{{ detail.startStockingTime }}</div>
</div>
<div
v-if="detail.mssWidth && detail.mssHeight"
class="div-item"
style="flex: 100%;"
>
<div>素材规格:</div>
<div class="item-value">
mm:&nbsp;(&nbsp; w:
{{
((Number(detail.mssWidth) * WHproportion * 10) / 10).toFixed(
1
)
}}
&nbsp; h:
{{
((Number(detail.mssHeight) * WHproportion * 10) / 10).toFixed(
1
)
}}&nbsp;)
</div>
</div>
<div
v-if="detail.mssWidth && detail.mssHeight"
class="div-item"
style="flex: 100%;"
>
<div style="opacity: 0;">素材规格:</div>
<div class="item-value">
inch:&nbsp;(&nbsp;w:
{{
(
((Number(detail.mssWidth) / 25.4) * WHproportion * 10) /
10
).toFixed(1)
}}
&nbsp;h:
{{
(
((Number(detail.mssHeight) / 25.4) * WHproportion * 10) /
10
).toFixed(1)
}}&nbsp;)
</div>
</div>
</div>
</div>
</template>
......@@ -1691,6 +1748,9 @@ img {
.product-information {
border: 1px solid #ececec;
border-top: none;
.title {
padding: 5px 10px;
}
.div-content {
padding: 0 10px;
display: flex;
......@@ -1699,7 +1759,7 @@ img {
display: flex;
flex: 50%;
font-size: 12px;
margin-bottom: 6px;
margin-bottom: 5px;
.item-label {
flex: 1;
text-align: right;
......@@ -1711,7 +1771,7 @@ img {
}
}
.title {
padding: 10px;
padding: 5px 10px;
font-size: 20px;
font-weight: 700;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment