north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet3.vue
@@ -215,29 +215,33 @@ <template v-for="(item, index) in itme1.data" :key="index" > <thead> <tr v-if="index===0"> <th style="width: 9%;">楼层编号</th> <th style="width: 14%;" colspan="1">宽X高</th> <th style="width: 8%;">数量</th> <th style="width: 9%;">面积</th> <th style="width: 9%;">单价</th> <th style="width: 9.5%;">金额</th> <th style="width: 6%;">面积</th> <th style="width: 6%;">单价</th> <th style="width: 6.5%;">金额</th> <th style="width: 1%;"></th> <th style="width: 9%;">楼层编号</th> <th style="width: 14%;" colspan="1">宽X高</th> <th style="width: 8%;">数量</th> <th style="width: 9%;">面积</th> <th style="width: 9%;">单价</th> <th style="width: 9.5%;">金额</th> <th style="width: 6%;">面积</th> <th style="width: 6%;">单价</th> <th style="width: 6.5%;">金额</th> <th style="width: 1%;"></th> </tr> </thead> <tr> <td style="font-size: 15px;text-align: left" colspan="5">产品名称:<span>{{item.DeliveryDetail.orderDetail.productName}}</span></td> <td style="font-size: 15px;text-align: left" colspan="6">产品名称:<span>{{item.DeliveryDetail.orderDetail.productName}}</span></td> <td style="font-size: 15px;text-align: left" colspan="3">批次:<span>{{item.DeliveryDetail.order.batch}}</span></td> <td style="font-size: 15px;text-align: left" colspan="3">订单编号:<span>{{item.DeliveryDetail.orderDetail.orderId}}</span></td> <td style="font-size: 15px;text-align: left" colspan="4">订单编号:<span>{{item.DeliveryDetail.orderDetail.orderId}}</span></td> </tr> <tr class="day-in" v-for="(group, groupIndex) in item.groupedDeliveryDetails" :key="groupIndex"> <!-- 第一列数据(组内第一条) --> <td>{{ group[0].buildingNumber }}</td> <td style="font-size: 15px;font-weight: bold;"> {{ group[0].parsedOtherColumns?.S02 ? `(${group[0].parsedOtherColumns.S02})` : '' }} {{ group[0].width }}x{{ group[0].height }} @@ -249,6 +253,7 @@ <td></td> <!-- 分隔列 --> <!-- 第二列数据(组内第二条,若存在) --> <td v-if="group[1]">{{ group[1].buildingNumber }}</td> <td style="font-size: 15px;font-weight: bold;" v-if="group[1]"> {{ group[1].parsedOtherColumns?.S02 ? `(${group[1].parsedOtherColumns.S02})` : '' }} {{ group[1].width }}x{{ group[1].height }} @@ -262,7 +267,7 @@ <td v-else colspan="5"></td> </tr> <tr class="day-in" > <td style="font-size: 15px;" colspan="7">小计:</td> <td style="font-size: 15px;" colspan="9">小计:</td> <td>{{item.DeliveryDetail.quantity}}</td> <td>{{item.DeliveryDetail.area}}</td> <td></td> @@ -271,14 +276,14 @@ </template> <tr class="day-in"> <td style="font-size: 15px;" colspan="7">合计:</td> <td style="font-size: 15px;" colspan="9">合计:</td> <td>{{itme1.delivery.quantity}}</td> <td>{{itme1.delivery.area}}</td> <td></td> <td>{{parseFloat(itme1.sumMoney.toFixed(2))}}</td> </tr> <tr class="day-in"> <td style="text-align: left;border-width: 0 1px 0 0; border-style: solid; border-color: #d3dce6" colspan="6"> <td style="text-align: left;border-width: 0 1px 0 0; border-style: solid; border-color: #d3dce6" colspan="7"> <div style="display: flex;font-size: 10px;text-align: center;"> <span style="width: 25%;font-weight: bold;font-size: 12px">加工费用</span> <span style="width: 25%;font-weight: bold;font-size: 12px">单价</span> @@ -286,10 +291,10 @@ <span style="width: 25%;font-weight: bold;font-size: 12px">金额</span> </div> </td> <td style="text-align: left;border:none;font-size: 15px;" colspan="5">总金额: {{itme1.delivery.money}}</td> <td style="text-align: left;border:none;font-size: 15px;" colspan="6">总金额: {{itme1.delivery.money}}</td> </tr> <tr class="day-in"> <td style="text-align: left;border-width: 0 1px 0 0; border-style: solid; border-color: #d3dce6;" colspan="6" > <td style="text-align: left;border-width: 0 1px 0 0; border-style: solid; border-color: #d3dce6;" colspan="7" > <div style="display: flex;font-size: 10px;text-align: center" v-for="(item, index2) in itme1.otherMoney1" :key="index2"> <span style="width: 25%">{{item.DeliveryDetailOtherMoney.alias}}</span> <span style="width: 25%">{{item.DeliveryDetailOtherMoney.price}}</span> @@ -303,7 +308,7 @@ <span style="width: 25%">{{itme1.delivery.freight}}</span> </div> </td> <td style="text-align: left;border:none;font-size: 15px;" colspan="5">大写金额: {{itme1.money}}</td> <td style="text-align: left;border:none;font-size: 15px;" colspan="6">大写金额: {{itme1.money}}</td> </tr> @@ -317,7 +322,7 @@ </el-row>--> <tr class="day-in" style="border: 0;" v-if="company.showDeliveryCreator"> <td colspan="11" style="border: 0"> <td colspan="13" style="border: 0"> <div style="display:flex;text-align: left" class="bottom"> <div style="width: 15%">制单员:{{ itme1.delivery.creator }}</div> <div style="width: 25%">制单日期:{{ itme1.delivery.createTime }}</div> @@ -329,7 +334,7 @@ </td> </tr> <tr class="day-in" style="border: 0;" v-if="company.showDeliveryCreator"> <td colspan="11" style="border: 0;"> <td colspan="13" style="border: 0;"> <div style="display:flex;" class="bottom"> 架子 只 {{takeCare}} @@ -337,7 +342,7 @@ </td> </tr> <tr class="day-in" style="border: 0;"> <td colspan="11" style="border: 0;"> <td colspan="13" style="border: 0;"> <div style="display:flex;text-align: left;border: 0;margin-top: 10px " class="bottom" > <el-input type="textarea" :autosize="{ minRows: 7, maxRows: 20 }" v-model="remark"/> </div> north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet4.vue
@@ -215,11 +215,13 @@ <template v-for="(item, index) in itme1.data" :key="index" > <thead> <tr v-if="index===0"> <th style="width: 14%;" colspan="3">宽X高</th> <th style="width: 9%;">楼层编号</th> <th style="width: 14%;" colspan="2">宽X高</th> <th style="width: 8%;">数量</th> <th style="width: 9%;">面积</th> <th style="width: 1%;"></th> <th style="width: 14%;" colspan="3">宽X高</th> <th style="width: 9%;">楼层编号</th> <th style="width: 14%;" colspan="2">宽X高</th> <th style="width: 8%;">数量</th> <th style="width: 9%;">面积</th> </tr> @@ -234,7 +236,8 @@ <tr class="day-in" v-for="(group, groupIndex) in item.groupedDeliveryDetails" :key="groupIndex"> <!-- 第一列数据(组内第一条) --> <td style="font-size: 15px;font-weight: bold;" colspan="3"> <td>{{ group[0].buildingNumber }}</td> <td style="font-size: 15px;font-weight: bold;" colspan="2"> {{ group[0].parsedOtherColumns?.S02 ? `(${group[0].parsedOtherColumns.S02})` : '' }} {{ group[0].width }}x{{ group[0].height }} </td> @@ -243,7 +246,8 @@ <td></td> <!-- 分隔列 --> <!-- 第二列数据(组内第二条,若存在) --> <td style="font-size: 15px;font-weight: bold;" colspan="3" v-if="group[1]"> <td v-if="group[1]">{{ group[1].buildingNumber }}</td> <td style="font-size: 15px;font-weight: bold;" colspan="2" v-if="group[1]"> {{ group[1].parsedOtherColumns?.S02 ? `(${group[1].parsedOtherColumns.S02})` : '' }} {{ group[1].width }}x{{ group[1].height }} </td> north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/OptimizationRect.vue
@@ -53,10 +53,6 @@ class="layout-glassDetail" :style="rectStyle(glassDetail, layoutIndex)" @contextmenu.prevent="handleRectRightClick(layoutIndex, rectIndex)" @mousedown="handleRectDragStart(layoutIndex, rectIndex)" @mousemove="handleRectDragging" @mouseup="handleRectDragEnd" @mouseleave="handleRectDragEnd" @click="handleRectClick(layoutIndex, rectIndex)" > <div class="glassDetail-content"> @@ -108,9 +104,9 @@ const rectClass = ref('layout-glassDetail'); const selectedLayoutIndex = ref(0); const currentRect = ref(null); const dragging = ref(false); const dragStartPos = ref({ x: 0, y: 0 }); const dragRect = ref(null); // const dragging = ref(false); // const dragStartPos = ref({ x: 0, y: 0 }); // const dragRect = ref(null); const showJiaHao = ref(false); const showProcessId = ref(false); const themeColor = ref(null); @@ -344,9 +340,9 @@ //点击小片 const handleRectClick = (layoutIndex, rectIndex) => { if (dragging.value) { return; } // if (dragging.value) { // return; // } focusIndex.value = { layoutIndex, rectIndex }; emit('rectClicked', layoutIndex, rectIndex); @@ -535,122 +531,122 @@ }; //小片鼠标按下事件 const handleRectDragStart = (layoutIndex, rectIndex) => { const layout = layouts.value[layoutIndex]; const glassDetail = layout.glassDetails[rectIndex]; if (glassDetail.isRemain) return; // const handleRectDragStart = (layoutIndex, rectIndex) => { // const layout = layouts.value[layoutIndex]; // const glassDetail = layout.glassDetails[rectIndex]; // if (glassDetail.isRemain) return; // // dragRect.value = { layoutIndex, rectIndex }; // dragStartPos.value = { // x: event.clientX, // y: event.clientY // }; // }; dragRect.value = { layoutIndex, rectIndex }; dragStartPos.value = { x: event.clientX, y: event.clientY }; }; // //小片鼠标移动事件 // const handleRectDragging = (event) => { // if (!dragRect.value) return; // // // 如果还没确认是拖拽,则先判断是否达到拖拽阈值(例如5像素) // if (!dragging.value) { // const deltaX = event.clientX - dragStartPos.value.x; // const deltaY = event.clientY - dragStartPos.value.y; // const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY); // // // 如果移动距离小于阈值,则认为是点击而非拖拽 // if (distance < 5) { // return; // } // // // 达到阈值,确认是拖拽操作 // dragging.value = true; // } // // const layoutIndex = dragRect.value.layoutIndex; // const rectIndex = dragRect.value.rectIndex; // const layout = layouts.value[layoutIndex]; // const glassDetail = layout.glassDetails[rectIndex]; // // // 保存原始坐标用于计算偏移量 // const originalX = glassDetail.x; // const originalY = glassDetail.y; // // const scale = Math.min( // (props.gw - 100) / layout.width, // (props.gh - 100) / layout.height // ); // // const deltaX = event.clientX - dragStartPos.value.x; // const deltaY = event.clientY - dragStartPos.value.y; // // const newRect = { ...glassDetail }; // newRect.x += deltaX / scale; // newRect.y += deltaY / scale; // // const otherRects = layout.glassDetails.filter(r => !r.isRemain && r !== glassDetail); // let isValidMove = true; // // otherRects.forEach(otherRect => { // if (checkOverlap(newRect, otherRect)) { // isValidMove = false; // } // }); // // if (newRect.x < 0 || newRect.y < 0 || // newRect.x + newRect.width > layout.width || // newRect.y + newRect.height > layout.height) { // isValidMove = false; // } // // if (isValidMove) { // glassDetail.x = newRect.x; // glassDetail.y = newRect.y; // // // 更新glassPoint坐标 // if (glassDetail.glassPoint && Array.isArray(glassDetail.glassPoint)) { // const offsetX = glassDetail.x - originalX; // const offsetY = glassDetail.y - originalY; // // glassDetail.glassPoint.forEach(point => { // point.X += offsetX; // point.Y += offsetY; // // 添加精度控制 // point.X = parseFloat(point.X.toFixed(2)); // point.Y = parseFloat(point.Y.toFixed(2)); // }); // } // // dragStartPos.value = { // x: event.clientX, // y: event.clientY // }; // adjustGrayRectangles(layoutIndex); // } // }; //小片鼠标移动事件 const handleRectDragging = (event) => { if (!dragRect.value) return; // 如果还没确认是拖拽,则先判断是否达到拖拽阈值(例如5像素) if (!dragging.value) { const deltaX = event.clientX - dragStartPos.value.x; const deltaY = event.clientY - dragStartPos.value.y; const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY); // 如果移动距离小于阈值,则认为是点击而非拖拽 if (distance < 5) { return; } // 达到阈值,确认是拖拽操作 dragging.value = true; } const layoutIndex = dragRect.value.layoutIndex; const rectIndex = dragRect.value.rectIndex; const layout = layouts.value[layoutIndex]; const glassDetail = layout.glassDetails[rectIndex]; // 保存原始坐标用于计算偏移量 const originalX = glassDetail.x; const originalY = glassDetail.y; const scale = Math.min( (props.gw - 100) / layout.width, (props.gh - 100) / layout.height ); const deltaX = event.clientX - dragStartPos.value.x; const deltaY = event.clientY - dragStartPos.value.y; const newRect = { ...glassDetail }; newRect.x += deltaX / scale; newRect.y += deltaY / scale; const otherRects = layout.glassDetails.filter(r => !r.isRemain && r !== glassDetail); let isValidMove = true; otherRects.forEach(otherRect => { if (checkOverlap(newRect, otherRect)) { isValidMove = false; } }); if (newRect.x < 0 || newRect.y < 0 || newRect.x + newRect.width > layout.width || newRect.y + newRect.height > layout.height) { isValidMove = false; } if (isValidMove) { glassDetail.x = newRect.x; glassDetail.y = newRect.y; // 更新glassPoint坐标 if (glassDetail.glassPoint && Array.isArray(glassDetail.glassPoint)) { const offsetX = glassDetail.x - originalX; const offsetY = glassDetail.y - originalY; glassDetail.glassPoint.forEach(point => { point.X += offsetX; point.Y += offsetY; // 添加精度控制 point.X = parseFloat(point.X.toFixed(2)); point.Y = parseFloat(point.Y.toFixed(2)); }); } dragStartPos.value = { x: event.clientX, y: event.clientY }; adjustGrayRectangles(layoutIndex); } }; //小片鼠标松开事件 const handleRectDragEnd = () => { dragging.value = false; dragRect.value = null; dragStartPos.value = { x: 0, y: 0 }; if (dragRect.value) { const layoutIndex = dragRect.value.layoutIndex; const rectIndex = dragRect.value.rectIndex; const glassDetail = layouts.value[layoutIndex].glassDetails[rectIndex]; const layout = layouts.value[layoutIndex]; const scale = Math.min( (props.gw - 100) / layout.width, (props.gh - 100) / layout.height ); glassDetail.x = parseFloat(glassDetail.x.toFixed(2)); glassDetail.y = parseFloat(glassDetail.y.toFixed(2)); adjustAlignmentPosition(layoutIndex, rectIndex); } dragging.value = false; dragRect.value = null; }; // //小片鼠标松开事件 // const handleRectDragEnd = () => { // dragging.value = false; // dragRect.value = null; // dragStartPos.value = { x: 0, y: 0 }; // if (dragRect.value) { // const layoutIndex = dragRect.value.layoutIndex; // const rectIndex = dragRect.value.rectIndex; // const glassDetail = layouts.value[layoutIndex].glassDetails[rectIndex]; // const layout = layouts.value[layoutIndex]; // const scale = Math.min( // (props.gw - 100) / layout.width, // (props.gh - 100) / layout.height // ); // // glassDetail.x = parseFloat(glassDetail.x.toFixed(2)); // glassDetail.y = parseFloat(glassDetail.y.toFixed(2)); // adjustAlignmentPosition(layoutIndex, rectIndex); // } // // dragging.value = false; // dragRect.value = null; // }; const adjustAlignmentPosition = (layoutIndex, rectIndex) => { const layout = layouts.value[layoutIndex]; north-glass-erp/src/main/java/com/example/erp/service/pp/GlassOptimizeService.java
@@ -47,7 +47,7 @@ @Autowired SysErrorService sysErrorService; @Value("${mesIp:10.153.19.31}") @Value("${mesIp:localhost}") private String mesIp; RabbitMQUtil rabbitMQUtil;