From 5a354d67a0e62c63bef598dfcc96e3d54f50d2b2 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期四, 24 七月 2025 09:05:01 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
---
north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml | 2
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyang.vue | 28 +-
north-glass-erp/northglass-erp/src/components/mm/PrintPackingListLuoyang.vue | 2
north-glass-erp/northglass-erp/src/components/sd/order/UpdateAlienEditor.vue | 468 ++++++++++++++++++++++++++++++++++++++++++++++
north-glass-erp/src/main/resources/mapper/pp/Report.xml | 18 +
north-glass-erp/northglass-erp/src/components/sd/order/OrderProcess.vue | 12
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java | 7
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyangDetails.vue | 31 +-
8 files changed, 520 insertions(+), 48 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/components/mm/PrintPackingListLuoyang.vue b/north-glass-erp/northglass-erp/src/components/mm/PrintPackingListLuoyang.vue
index f8d17b8..f2b41b1 100644
--- a/north-glass-erp/northglass-erp/src/components/mm/PrintPackingListLuoyang.vue
+++ b/north-glass-erp/northglass-erp/src/components/mm/PrintPackingListLuoyang.vue
@@ -234,7 +234,7 @@
<tr id="footsum" v-else style="border: 0;font-size: 10px">
<td colspan="5" style="border: 0;">
<div style="display:flex;">
- <div>鏈灦鏁伴噺</div>
+ <div>鏈〉鏁伴噺</div>
<div>{{row.sum.quantity}}</div>
<div>闈㈢Н</div>
<div>{{row.sum.area}}(m虏)</div>
diff --git a/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyang.vue b/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyang.vue
index 08d56a6..da4ca67 100644
--- a/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyang.vue
+++ b/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyang.vue
@@ -213,14 +213,14 @@
<div >
<el-row id="footsum" :gutter="20" >
<el-col :span="19"></el-col>
- <el-col :span="5" style="font-weight: bolder;font-size: 19px" >{{delivery.creator}}</el-col>
+ <el-col :span="5" style="font-size: 17px" >{{delivery.creator}}</el-col>
</el-row>
<el-row id="footsum1" :gutter="20" >
<el-col :span="2" ></el-col>
- <el-col :span="3" style="font-weight: bolder;font-size: 19px">{{ delivery.contacts }}</el-col>
- <el-col :span="7" style="font-weight: bolder;font-size: 19px">{{ delivery.contactNumber }}</el-col>
+ <el-col :span="3" style="font-size: 17px">{{ delivery.contacts }}</el-col>
+ <el-col :span="7" style="font-size: 17px">{{ delivery.contactNumber }}</el-col>
<el-col :span="1" ></el-col>
- <el-col :span="11" style="font-weight: bolder;font-size: 19px">{{ delivery.deliveryAddress }}</el-col>
+ <el-col :span="11" style="font-size: 17px">{{ delivery.deliveryAddress }}</el-col>
</el-row>
<table class="content1" v-for="(page,pageIndex) in pageData" >
@@ -234,11 +234,11 @@
<el-col :span="8">
<input v-model="companyName"
style="border: 0;width: 100%;
- height: 100%;font-size:19px;font-weight: bolder "/>
+ height: 100%;font-size:19px;font-weight: bold "/>
</el-col>
- <el-col :span="6" style="font-size:19px;font-weight: bolder"> {{deliveryId}} </el-col>
+ <el-col :span="6" style="font-size:19px;font-weight: bold"> {{deliveryId}} </el-col>
<el-col :span="3"></el-col>
- <el-col :span="5" style="white-space: nowrap;font-size:19px;font-weight: bolder">{{deliveryDate}}</el-col>
+ <el-col :span="5" style="white-space: nowrap;font-size:19px;font-weight: bold">{{deliveryDate}}</el-col>
</el-row>
</td>
</tr>
@@ -248,9 +248,9 @@
<td colspan="6">
<el-row :gutter="20">
<el-col :span="2"></el-col>
- <el-col :span="14" style="font-size: 19px;font-weight: bolder">{{delivery.customerName }}</el-col>
+ <el-col :span="12" style="font-size: 16px;">{{delivery.customerName }}</el-col>
- <el-col :span="8" style="font-size: 19px;font-weight: bolder;white-space: nowrap;"> {{delivery.project }}</el-col>
+ <el-col :span="10" style="font-size: 16px;white-space: nowrap;"> {{delivery.project }}</el-col>
</el-row>
</td>
</tr>
@@ -258,7 +258,7 @@
<td colspan="6">
<el-row :gutter="20">
<el-col :span="2"></el-col>
- <el-col :span="12" style="font-size: 17px;font-weight: bolder"> {{delivery.orderId }}</el-col>
+ <el-col :span="12" style="font-size: 17px;font-weight: bold"> {{delivery.orderId }}</el-col>
</el-row>
</td>
</tr>
@@ -278,7 +278,6 @@
<td style="width: 150px" >
<el-input class="textarea aaa" type="textarea"
- style="font-weight: bolder;"
:autosize="{ minRows: 1, maxRows: 20 }"
v-model="item.DeliveryDetail.orderId" />
@@ -351,13 +350,13 @@
text-align: center;
}
tbody *{
- font-size: 16px; font-weight: bolder;
+ font-size: 16px;
}
tbody *{
- font-size: 16px; font-weight: bolder;
+ font-size: 16px;
}
#footsum1,#footsum{
- font-weight: bolder;font-size: 17px;
+ font-weight: bold;font-size: 17px;
}
@media print {
@@ -383,7 +382,6 @@
width: 100%;
}
:deep(.el-textarea__inner){
- font-weight: bolder;
color: #333333;
font-family: 'Microsoft YaHei', '寰蒋闆呴粦', sans-serif;
}
diff --git a/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyangDetails.vue b/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyangDetails.vue
index 80b13f3..b4fe38e 100644
--- a/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyangDetails.vue
+++ b/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyangDetails.vue
@@ -197,14 +197,14 @@
<div >
<el-row id="footsum" :gutter="20" >
<el-col :span="20"></el-col>
- <el-col :span="4" style="font-weight: bolder;font-size: 19px" >{{delivery.creator}}</el-col>
+ <el-col :span="4" style="font-size: 17px" >{{delivery.creator}}</el-col>
</el-row>
<el-row id="footsum1" :gutter="20" >
<el-col :span="2" ></el-col>
- <el-col :span="3" style="font-weight: bolder;font-size: 19px">{{ delivery.contacts }}</el-col>
- <el-col :span="7" style="font-weight: bolder;font-size: 19px">{{ delivery.contactNumber }}</el-col>
+ <el-col :span="3" style="font-size: 17px">{{ delivery.contacts }}</el-col>
+ <el-col :span="7" style="font-size: 17px">{{ delivery.contactNumber }}</el-col>
<el-col :span="1" ></el-col>
- <el-col :span="11" style="font-weight: bolder;font-size: 19px">{{ delivery.deliveryAddress }}</el-col>
+ <el-col :span="11" style="font-size: 17px">{{ delivery.deliveryAddress }}</el-col>
</el-row>
<table class="content1" v-for="(page,pageIndex) in pageData" >
@@ -218,11 +218,11 @@
<el-col :span="9">
<input v-model="companyName"
style="border: 0;width: 100%;
- height: 100%;font-size:19px;font-weight: bolder "/>
+ height: 100%;font-size:19px;font-weight: bold "/>
</el-col>
- <el-col :span="5" style="font-size:19px;font-weight: bolder"> {{deliveryId}} </el-col>
+ <el-col :span="5" style="font-size:19px;font-weight: bold"> {{deliveryId}} </el-col>
<el-col :span="6"></el-col>
- <el-col :span="2" style="white-space: nowrap;font-size:19px;font-weight: bolder">{{deliveryDate}}</el-col>
+ <el-col :span="2" style="white-space: nowrap;font-size:19px;font-weight: bold">{{deliveryDate}}</el-col>
</el-row>
</td>
</tr>
@@ -232,9 +232,9 @@
<td colspan="6">
<el-row :gutter="20">
<el-col :span="2"></el-col>
- <el-col :span="17" style="font-size: 17px;font-weight: bolder">{{delivery.customerName }}</el-col>
+ <el-col :span="17" style="font-size: 16px;">{{delivery.customerName }}</el-col>
- <el-col :span="5" style="font-size: 17px;font-weight: bolder;white-space: nowrap;"> {{delivery.project }}</el-col>
+ <el-col :span="5" style="font-size: 16px;white-space: nowrap;"> {{delivery.project }}</el-col>
</el-row>
</td>
</tr>
@@ -243,7 +243,7 @@
<td colspan="6">
<el-row :gutter="20">
<el-col :span="2"></el-col>
- <el-col :span="12" style="font-size: 17px;font-weight: bolder"> {{delivery.orderId }}</el-col>
+ <el-col :span="12" style="font-size: 17px;font-weight: bold"> {{delivery.orderId }}</el-col>
</el-row>
</td>
</tr>
@@ -266,14 +266,12 @@
<td style="width: 2cm">
<el-input class="textarea" type="textarea"
- style="font-weight: bolder;"
:autosize="{ minRows: 1, maxRows: 20 }"
v-model="items.width" />
</td>
<td style="width: 2cm">
<el-input class="textarea" type="textarea"
- style="font-weight: bolder;"
:autosize="{ minRows: 1, maxRows: 20 }"
v-model="items.height" />
@@ -351,13 +349,13 @@
text-align: center;
}
tbody *{
- font-size: 16px; font-weight: bolder;
+ font-size: 16px;
}
tbody *{
- font-size: 16px; font-weight: bolder;
+ font-size: 16px;
}
#footsum1,#footsum{
- font-weight: bolder;font-size: 17px;
+ font-size: 17px;
}
@media print {
@@ -386,12 +384,11 @@
font-size: 16px;
border:none;
text-align: right;
- font-weight: bolder;
+ font-weight: bold;
width: 100%;
height: 100%;
}*/
:deep(.el-textarea__inner){
- font-weight: bolder;
color: #333333;
font-family: 'Microsoft YaHei', '寰蒋闆呴粦', sans-serif;
}
diff --git a/north-glass-erp/northglass-erp/src/components/sd/order/OrderProcess.vue b/north-glass-erp/northglass-erp/src/components/sd/order/OrderProcess.vue
index 47b7497..8fc4d58 100644
--- a/north-glass-erp/northglass-erp/src/components/sd/order/OrderProcess.vue
+++ b/north-glass-erp/northglass-erp/src/components/sd/order/OrderProcess.vue
@@ -45,7 +45,7 @@
custom: true
},
cellClassName ({ row, column,columnIndex}) {
- if (columnIndex>10 && row.quantity*1 === row.reportWorkQuantity[column.title]*1){
+ if (columnIndex>10 && row.thisQuantity*1 === row.reportWorkQuantity[column.title]*1){
return 'row-green'
}
return null
@@ -86,7 +86,7 @@
{field: 'inventoryArea',width: 120, title: t('report.inventoryArea')},
{field: 'broken_num',width: 90, title: t('reportingWorks.quantityBroken')},
]
-let column = [0,1,3,6,7,8,9]
+let column = [0,1,3,6,7,8,9,10,11,12]
onMounted(()=>{
@@ -100,6 +100,7 @@
const getWorkOrder = () => {
+ gridOptions.loading = true
request.post(`/report/processCardProgress/${props.orderId}`,column).then(async (res) => {
if (res.code == 200) {
@@ -107,7 +108,7 @@
gridOptions.columns.forEach(item =>{
item.filterMethod = filterChanged
})
- list.value = ['quantity']
+ list.value = ['quantity','inventory','inventoryArea','gross_area']
res.data.title.forEach((item,index) =>{
list.value.push('reportWorkQuantity.'+item.process)
let column = {slots: { default: 'quantitySum'},
@@ -120,8 +121,11 @@
item.reportWorkQuantity=JSON.parse(item.reportWorkQuantity)
item.reportWorkQuantityCount=JSON.parse(item.reportWorkQuantityCount)
})
- //gridOptions.mergeCells= res.data.mergeCells
+
await xGrid.value.loadData(res.data.data)
+ //await xGrid.value.setMergeCells(res.data.mergeCells)
+ gridOptions.loading = false
+
} else {
ElMessage.warning(res.msg)
}
diff --git a/north-glass-erp/northglass-erp/src/components/sd/order/UpdateAlienEditor.vue b/north-glass-erp/northglass-erp/src/components/sd/order/UpdateAlienEditor.vue
new file mode 100644
index 0000000..9136cc3
--- /dev/null
+++ b/north-glass-erp/northglass-erp/src/components/sd/order/UpdateAlienEditor.vue
@@ -0,0 +1,468 @@
+<script setup>
+import {computed, onMounted, onUpdated, reactive, ref, watch} from "vue"
+import {filterChanged} from "@/hook"
+import {useI18n} from "vue-i18n"
+import {ElMessage, ElMessageBox,} from "element-plus"
+import request from "@/utils/request"
+import {useRouter,useRoute} from "vue-router"
+import {Ellipse, Leafer, Line, Path, Polygon} from "leafer-ui";
+import {round} from "xe-utils";
+import DxfParser from "dxf-parser";
+import { saveAs } from 'file-saver';
+import DXFWriter from 'dxf-writer';
+
+
+const { t } = useI18n()
+const router = useRouter()
+const route = useRoute()
+let width = ref("")
+let height = ref("null")
+let rowIndex = ref(null)
+const xGrid = ref()
+
+//鐢ㄤ簬鎺ユ敹鐖剁粍浠跺弬鏁�
+let prop = defineProps({
+ rowIndex:{}
+})
+onMounted(()=>{
+ if(Object.keys(prop.rowIndex).length === 0){
+ return
+ }
+ rowIndex.value=prop.rowIndex
+ width.value=prop.rowIndex.width
+ height.value=prop.rowIndex.height
+ ongetproject(rowIndex.value)
+})
+
+const emits = defineEmits(['getUploadPicture'])
+
+
+
+let dxfData=ref(null)
+let state=ref(false)
+let points=ref([])
+let data1=ref(0);let data2=ref(0);let data3=ref(0);let data4=ref(0)
+let data5=ref(0);let data6=ref(0);let data7=ref(0);let data8=ref(0)
+
+let datas1=ref(0);let datas2=ref(0);let datas3=ref(0);let datas4=ref(0)
+let datas5=ref(0);let datas6=ref(0);let datas7=ref(0);let datas8=ref(0)
+let big=0
+let leafer;
+let parsedDXFData = ref([]);
+let orderDetailWidth=ref(0)
+let orderDetailHeight=ref(0)
+let widthAgv=ref(0)
+let heightAgv=ref(0)
+
+const ongetproject = (row) => {
+
+ if(row.fileName==null||row.fileName==""){
+ orderDetailWidth.value=row.width
+ orderDetailHeight.value=row.height
+ const main =document.getElementById('mains')
+ const width =document.getElementById('width')
+ const height =document.getElementById('height')
+ if(orderDetailWidth.value/400>orderDetailHeight.value/250){
+ big=orderDetailWidth.value/400
+ }else{
+ big=orderDetailHeight.value/250
+ }
+ let widthAgv=orderDetailWidth.value/big
+ let heightAgv=orderDetailHeight.value/big
+ main.style.width=widthAgv+"px"
+ main.style.height=heightAgv+"px"
+ main.style.backgroundColor = "#8d9095"
+ datas2.value=heightAgv
+ datas8.value=heightAgv
+ datas5.value=widthAgv
+ datas7.value=widthAgv
+ if(leafer!==undefined){
+ leafer.clear()
+ }
+ leafer=new Leafer({ view: 'canvas' })
+ points.value=[0, heightAgv, 0, 0, widthAgv, 0, widthAgv,heightAgv]
+ const polygon = new Polygon({
+ points: points.value,
+ fill: '#32cd79',
+ origin: [0, 0]
+ })
+ setTimeout(() => {
+ leafer.add(polygon);
+ }, 30)
+ state.value=true
+ }else{
+ const b64Data = row.fileData;
+ const byteCharacters = atob(b64Data);
+ const parser = new DxfParser();
+ dxfData.value = parser.parseSync(byteCharacters)
+ state.value=false
+ handleFileUpload()
+ }
+
+
+}
+
+const getproject = () => {
+ if (state.value){
+ leafer = new Leafer({view: 'canvas'})
+ points.value = [datas1.value + (parseInt(data7.value) / big), datas2.value - (parseInt(data8.value) / big), datas3.value + (parseInt(data1.value) / big), datas4.value + (parseInt(data2.value) / big),
+ datas5.value - (parseInt(data3.value) / big), datas6.value + (parseInt(data4.value) / big), datas7.value - (parseInt(data5.value) / big), datas8.value - (parseInt(data6.value) / big)]
+ const polygon = new Polygon({
+ points: points.value,
+ fill: '#32cd79',
+ origin: [0, 0]
+ })
+ leafer.add(polygon)
+ exportToDXF(1)
+ }
+}
+
+const exportToDXF = async (value) => {
+ const dxf = new DXFWriter();
+ const polygonPoints = points.value.map((coord, index) => ({
+ x: index % 2 === 0 ? coord : undefined,
+ y: index % 2 !== 0 ? -coord : undefined
+ })).filter(point => point.x !== undefined && point.y !== undefined);
+
+ let arr=[]
+ for (let i=0;i<points.value.length;i++){
+ let a=[]
+ if(i % 2 === 0){
+ a.push(points.value[i]*big)
+ a.push((points.value[i+1]*big))
+ a.push(0)
+ arr.push(a)
+ }
+
+ }
+ let minX = Infinity, minY = Infinity;
+ let maxX = -Infinity, maxY = -Infinity;
+ arr.forEach(p => {
+ minX = Math.min(Math.abs(p[0]),minX );
+ minY = Math.min(Math.abs(p[1]),minY);
+ maxX = Math.max(Math.abs(p[0]),maxX );
+ maxY = Math.max(Math.abs(p[1]),maxY);
+ });
+
+ arr.forEach(p => {
+ p[1]=maxY-minY-p[1]
+ });
+
+
+ dxf.drawPolyline(arr,{ closed: true, layer: '0' })
+
+ const blob = new Blob([dxf.toDxfString()], {type: 'text/plain;charset=utf-8'});
+ const base64 = await fileToBase64(blob);
+ if(value===1){
+ emits('getUploadPicture', "map.dxf",base64.replace(/^data:.+;base64,/, ""),)
+ }
+ else if(value===2&&state.value){
+ saveAs(blob, 'map.dxf');
+ }else{
+ ElMessage.warning("璇ユ牸寮忎笉鏀寔瀵煎嚭")
+ }
+}
+
+
+
+const fileToBase64 = (file) => {
+ return new Promise((resolve, reject) => {
+ const reader = new FileReader();
+ reader.onload = () => resolve(reader.result);
+ reader.onerror = reject;
+ reader.readAsDataURL(file);
+ });
+};
+
+function toBottomOrigin(y, canvasHeight) {
+ return canvasHeight - y; // 灏嗗乏涓婅Y鍧愭爣杞崲涓哄乏涓嬭鍧愭爣绯�
+}
+
+const handleFile = async (event) => {
+ state.value=false
+ const main = document.getElementById('mains')
+ const width = document.getElementById('width')
+ const height = document.getElementById('height')
+ if(leafer!==undefined){
+ leafer.clear()
+ }
+ leafer = new Leafer({view: 'canvas'});
+ const file = event.target.files[0];
+ if (file) {
+ const reader = new FileReader();
+ reader.onload = async (e) => {
+ const text = e.target.result;
+ try {
+ const base64 = await fileToBase64(file);
+ const parser = new DxfParser();
+ dxfData.value = parser.parseSync(text);
+ handleFileUpload()
+
+ emits('getUploadPicture', file.name,base64.replace(/^data:.+;base64,/, ""))
+ } catch (error) {
+ console.error('瑙f瀽DXF鏂囦欢鏃跺嚭閿�:', error);
+ }
+ };
+ reader.readAsText(file);
+ }
+}
+
+const handleFileUpload = () => {
+ const main =document.getElementById('mains')
+ const width =document.getElementById('width')
+ const height =document.getElementById('height')
+ if(leafer!==undefined){
+ leafer.clear()
+ }
+ leafer = new Leafer({ view: 'canvas' });
+ try {
+ let minX = Infinity, minY = Infinity;
+ let maxX = -Infinity, maxY = -Infinity;
+ dxfData.value.entities.forEach(entity => {
+ if (entity.type === 'LINE' || entity.type === 'LWPOLYLINE') {
+ entity.vertices.forEach(vertices => {
+ minX = Math.min(vertices.x, minX);
+ minY = Math.min(vertices.y, minY);
+ maxX = Math.max(vertices.x, maxX);
+ maxY = Math.max(vertices.y, maxY);
+ })
+ }
+ if (entity.type === 'ARC') {
+ const center = {x: entity.center.x, y: entity.center.y};
+ const radius = entity.radius;
+ const startAngle = entity.startAngle * (180 / Math.PI);
+ const endAngle = entity.endAngle * (180 / Math.PI);
+
+ const points = [];
+ const steps = 32;
+ for (let i = 0; i <= steps; i++) {
+ const angle = startAngle + (endAngle - startAngle) * (i / steps);
+ const x = center.x + radius * Math.cos(angle * Math.PI / 180);
+ const y = center.y + radius * Math.sin(angle * Math.PI / 180);
+ points.push({x, y});
+ }
+
+
+ points.forEach(p => {
+ minX = Math.min(minX, p.x);
+ minY = Math.min(minY, p.y);
+ maxX = Math.max(maxX, p.x);
+ maxY = Math.max(maxY, p.y);
+ });
+ }
+ });
+ if ((maxX - minX) / 400 > (maxY - minY) / 250) {
+ big = (maxX - minX) / 400
+ } else {
+ big = (maxY - minY) / 250
+ }
+
+ Object.values(dxfData.value.entities).forEach(entity => {
+ switch (entity.type) {
+ case 'LINE':
+ main.style.width = (maxX - minX) / big + "px"
+ main.style.height = (maxY - minY) / big + "px"
+ main.style.backgroundColor = "#8d9095"
+ width.innerHTML = round(maxX - minX, 2)
+ height.innerHTML = round(maxY - minY, 2)
+ const line = new Line({
+ points: [(entity.vertices[0].x - minX) / big, ((maxY - minY) - (entity.vertices[0].y- minY)) / big,
+ (entity.vertices[1].x - minX) / big, ((maxY - minY) - (entity.vertices[1].y - minY)) / big],
+ stroke: '#f00',
+ strokeWidth: 1
+ })
+ setTimeout(() => {
+ leafer.add(line);
+ }, 30);
+ break;
+ case 'LWPOLYLINE':
+
+ main.style.width = (maxX - minX) / big + "px"
+ main.style.height = (maxY - minY) / big + "px"
+ main.style.backgroundColor = "#8d9095"
+ width.innerHTML = round(maxX - minX, 2)
+ height.innerHTML = round(maxY - minY, 2)
+ if(entity.vertices.length==4){
+ state.value=true
+ datas1.value=0
+ datas2.value=(maxY - minY) / big
+ datas3.value=0
+ datas4.value=0
+ datas5.value=(maxX - minX) / big
+ datas6.value=0
+ datas7.value=(maxX - minX) / big
+ datas8.value=(maxY - minY) / big
+
+ points.value=[0, heightAgv, 0, 0, widthAgv, 0, widthAgv,heightAgv]
+
+ }
+ let point = entity.vertices.map(v => [
+ (v.x - minX) / big,
+ toBottomOrigin((v.y - minY) / big, (maxY - minY) / big),
+ ]).flat()
+ const polygon = new Polygon({
+ points: point,
+ fill: '#32cd79',
+ })
+ setTimeout(() => {
+ leafer.add(polygon);
+ }, 30);
+
+ break;
+ case 'CIRCLE':
+ big = (entity.radius * 2) / 400
+ main.style.width = entity.radius * 2 / big + "px"
+ main.style.height = entity.radius * 2 / big + "px"
+ width.innerHTML = round(entity.radius * 2, 2)
+ height.innerHTML = round(entity.radius * 2, 2)
+ const ellipse = new Ellipse({
+ width: entity.radius * 2 / big,
+ height: entity.radius * 2 / big,
+ fill: "#32cd79"
+ })
+ setTimeout(() => {
+ leafer.add(ellipse);
+ }, 30);
+
+ break;
+ case 'ELLIPSE':
+ console.log(entity)
+
+ const {majorAxisEndPoint, axisRatio} = entity;
+
+ const dx = majorAxisEndPoint.x;
+ const dy = majorAxisEndPoint.y;
+ const a = Math.sqrt(dx ** 2 + dy ** 2);
+ const c = a * axisRatio;
+ const 胃 = Math.atan2(dy, dx);
+ const l = axisRatio * (180 / Math.PI);
+
+ if ((a * 2) / 400 > (c * 2) / 250) {
+ big = (a * 2) / 400
+ } else {
+ big = (c * 2) / 250
+ }
+
+ main.style.width = a * 2 / big + "px"
+ main.style.height = c * 2 / big + "px"
+ width.innerHTML = round(a * 2, 2)
+ height.innerHTML = round(c * 2, 2)
+ const ellipse2 = new Ellipse({
+ width: a * 2 / big,
+ height: c * 2 / big,
+ fill: "#32cd79",
+ })
+
+ setTimeout(() => {
+ leafer.add(ellipse2);
+ }, 30);
+
+ break;
+ case 'ARC':
+ const center = {x: entity.center.x, y: entity.center.y};
+ const radius = entity.radius;
+ const startAngle = entity.startAngle * (180 / Math.PI);
+ const endAngle = entity.endAngle * (180 / Math.PI);
+
+ if ((maxX - minX) / 400 > (maxY - minY) / 250) {
+ big = (maxX - minX) / 400
+ } else {
+ big = (maxY - minY) / 250
+ }
+
+
+ // 璁$畻鍦嗗姬鐨勮捣鐐瑰拰缁堢偣
+ const startX = (center.x + radius * Math.cos(entity.startAngle) - minX);
+ const startY = (maxY - minY) - ((center.y + radius * Math.sin(entity.startAngle)) - minY);
+ const endX = (center.x + radius * Math.cos(entity.endAngle) - minX);
+ const endY = (maxY - minY) - ((center.y + radius * Math.sin(entity.endAngle)) - minY);
+
+ // 鍒涘缓鍦嗗姬璺緞
+ const path = new Path({
+ path: `M ${startX / big} ${startY / big} A ${radius / big} ${radius / big} 0 ${endAngle - startAngle > 180 ? 1 : 0} 0 ${endX / big} ${endY / big}`,
+ stroke: '#f00',
+ strokeWidth: 1,
+ });
+
+
+ setTimeout(() => {
+ leafer.add(path);
+ }, 30);
+
+
+ break;
+
+ }
+ })
+ } catch (error) {
+ console.error('瑙f瀽DXF鏂囦欢鏃跺嚭閿�:', error);
+ }
+
+};
+
+const validate = async () => {
+ data1.value=0
+ data2.value=0
+ data3.value=0
+ data4.value=0
+ data5.value=0
+ data6.value=0
+ data7.value=0
+ data8.value=0
+ big=0
+ return true
+}
+defineExpose({
+ validate
+})
+
+
+</script>
+
+<template>
+ <div style="width: 404px;height: 254px;border: 2px solid #000;float: left;
+ position: relative;display: flex;justify-content: center;align-content: center;margin-left: 100px">
+ <div id="mains" ref="parent" >
+ <canvas id="canvas" ></canvas>
+ </div>
+ </div>
+ <div id="width" style="height: 20px;position: absolute;top: 37px;left: 300px;">{{orderDetailWidth}}</div>
+ <div id="height" style="width: 60px;position: absolute;top: 178px;left: 60px;">{{orderDetailHeight}}</div>
+ <div style="float: left;margin-top: 30px;margin-left: 150px">
+ <el-input class="contactNumber" @blur="getproject" type="text" v-model="data1" />
+ <el-input class="contactNumber" @blur="getproject" type="text" v-model="data2" />
+ <el-input class="contactNumber" @blur="getproject" type="text" v-model="data3" />
+ <el-input class="contactNumber" @blur="getproject" type="text" v-model="data4" /><br>
+ <el-input class="contactNumber" @blur="getproject" type="text" v-model="data5" />
+ <el-input class="contactNumber" @blur="getproject" type="text" v-model="data6" />
+ <el-input class="contactNumber" @blur="getproject" type="text" v-model="data7" />
+ <el-input class="contactNumber" @blur="getproject" type="text" v-model="data8" /><br>
+ </div>
+ <div id="width" style="height: 20px;position: absolute;top: 342px;left: 145px;">涓�</div>
+ <div id="width" style="height: 20px;position: absolute;top: 364px;left: 145px;">涓�</div>
+ <div id="width" style="height: 20px;position: absolute;top: 322px;left: 185px;">妯�</div>
+ <div id="width" style="height: 20px;position: absolute;top: 322px;left: 255px;">绔�</div>
+ <div id="width" style="height: 20px;position: absolute;top: 322px;left: 320px;">妯�</div>
+ <div id="width" style="height: 20px;position: absolute;top: 322px;left: 385px;">绔�</div>
+ <div style="float: left;margin-top: 20px;margin-left: 80px;">
+ <input type="file" @change="handleFile" accept=".dxf" />
+ <el-button type="primary" @click="exportToDXF(2)">瀵煎嚭DXF</el-button>
+ </div>
+
+
+
+</template>
+
+<style scoped>
+.contactNumber{
+ width: 60px;
+ height:20px;
+ border: none;
+ box-shadow: none;
+ font-size: 15px;
+}
+
+#mains {
+ position: relative;
+}
+</style>
\ No newline at end of file
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
index 23d1089..0c9ab51 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
@@ -188,12 +188,7 @@
getRowCount.forEach(row -> {
Map<String, Integer> getRow = new HashMap<>();
// { row: 0, col: 1, rowspan: 3, colspan: 0},
- Object rowNumObj = row.get("RowNum");
- if (rowNumObj instanceof Double) {
- getRow.put("row", ((Double) rowNumObj).intValue());
- } else if (rowNumObj instanceof Integer) {
- getRow.put("row", (Integer) rowNumObj);
- }
+ getRow.put("row", row.get("RowNum"));
getRow.put("col", col);
getRow.put("rowspan", row.get("rowCount"));
getRow.put("colspan", 0);
diff --git a/north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml b/north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
index 4fd0c76..edcf65d 100644
--- a/north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
+++ b/north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
@@ -890,7 +890,7 @@
left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number
left join sd.`order` o on o.order_id=fol.order_id
left join sd.product p on od.product_id=p.id
- left join (select teams_groups_name,process_id,previous_process,reporting_work_time from pp.reporting_work where this_process='鍖呰') aaa on aaa.process_id=fol.process_id
+ left join (select teams_groups_name,process_id,previous_process,reporting_work_time from pp.reporting_work where this_process='鍖呰' group by process_id) aaa on aaa.process_id=fol.process_id
diff --git a/north-glass-erp/src/main/resources/mapper/pp/Report.xml b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
index ecacbed..e91b6b1 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/Report.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -172,17 +172,27 @@
c.technology_number,
b.child_width,
b.child_height,
+# if(c.technology_number=1,c.quantity,0) as quantity,
c.quantity,
+ c.quantity as thisQuantity,/*鐢ㄤ簬鍒ゆ柇鏄惁鏀瑰彉棰滆壊*/
e.reportWorkQuantity,
e.reportWorkQuantityCount,
e.reportWorkTime,
e.broken_num,
+
c.quantity*a.area as gross_area,
- ifnull(f.inventory, 0) as inventory,
- round(ifnull(f.inventory, 0) * a.area, 2) as inventoryArea,
- ifnull(dd.quantity, 0) as shippedQuantity,
+ ifnull(f.inventory, 0) as inventory,
+ round(ifnull(f.inventory, 0) * a.area, 2) as inventoryArea,
+ ifnull(dd.quantity, 0) as shippedQuantity,
+
+# if(c.technology_number=1,c.quantity*a.area,0) as gross_area,
+# if(c.technology_number=1,ifnull(f.inventory, 0) ,0) as inventory,
+# if(c.technology_number=1,round(ifnull(f.inventory, 0) * a.area, 2),0) as inventoryArea,
+# if(c.technology_number=1,ifnull(dd.quantity, 0) ,0) as shippedQuantity,
+
+ ifnull(dd.quantity, 0) as shippedQuantity,
ifnull(JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')),'') AS glassNumber
- from flow_card as c
+ from pp.flow_card as c
left join
sd.order_detail as a
on c.order_id = a.order_id
--
Gitblit v1.8.0