From 39639216e7c25789d3c195b40cdd698bc33f5614 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期五, 02 八月 2024 13:47:08 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/src/main/resources/mapper/sd/DeliveryMapper.xml | 9 ++++
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue | 4 +-
north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue | 5 ++
north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryMapper.java | 2 +
north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java | 36 ++++++++++++-----
north-glass-erp/northglass-erp/public/importTemplate.xlsx | 0
north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabel.vue | 20 +++++-----
7 files changed, 52 insertions(+), 24 deletions(-)
diff --git a/north-glass-erp/northglass-erp/public/importTemplate.xlsx b/north-glass-erp/northglass-erp/public/importTemplate.xlsx
index 794f349..b6a4644 100644
--- a/north-glass-erp/northglass-erp/public/importTemplate.xlsx
+++ b/north-glass-erp/northglass-erp/public/importTemplate.xlsx
Binary files differ
diff --git a/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabel.vue b/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabel.vue
index 035f700..57eca48 100644
--- a/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabel.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabel.vue
@@ -56,7 +56,6 @@
}
}
}
-
} else {
ElMessage.warning(res.msg)
router.push("/login")
@@ -79,6 +78,8 @@
});
// 杈撳叆鐨勫��
const newValue = event.target.innerText;
+ const parts = newValue.split('锛�');
+ const result = parts[1]; // 鑾峰彇鍐掑彿鍚庣殑閮ㄥ垎
// 鑾峰彇鏄犲皠涓墍鏈夌殑閿�
const keys = Object.keys(propertyMapping);
@@ -100,11 +101,11 @@
// 鏍规嵁 propertyName 鏇存柊灞炴��
if (propertyName === 'productAbbreviation' && prefix === obj.processId.substring(0, 11)) {
- obj.productAbbreviation = newValue;
+ obj.productAbbreviation = result;
}
if (propertyName === 'project' && orderId === obj.orderId) {
- obj.project = newValue;
+ obj.project = result;
}
});
}
@@ -118,9 +119,9 @@
<div v-for="(item1,id) in lastList" :class="company.printLabel.className.custom.entiretyName()">
<div class="row4">{{ faceOrientation }}</div>
<div v-for="(item,id) in labelList" :class="company.printLabel.className.custom.contentRowName()">
- <div v-if="item1[item.name] != null && item1[item.name] !== ''" class="row1">{{ item.title }}</div>
+ <div v-if="item1[item.name] != null && item1[item.name] !== ''" class="row1" contenteditable="true" @input="updateProductName($event, id)" v-text="item.title+'锛�'+item1[item.name]"></div>
<!-- <div class="row2" style="width: 100%;"><input class="contentRow2" v-model="item1[item.name]" @keyup="updataProductName()" style="border: none;"/></div>-->
- <div v-if="item1[item.name] != null && item1[item.name] !== ''" class="row2" style="width: 100%;" contenteditable="true" @input="updateProductName($event, id)" v-text="item1[item.name]"></div>
+<!-- <div v-if="item1[item.name] != null && item1[item.name] !== ''" class="row2" style="width: 100%;" contenteditable="true" @input="updateProductName($event, id)" v-text="item1[item.name]"></div>-->
</div>
<div v-html="company.printLabel.custom(item1)"></div>
</div>
@@ -155,7 +156,7 @@
body {
overflow: hidden;
font-family: Arial;
- font-size: 10px;
+ font-size: 7px;
}
#printButton {
@@ -216,14 +217,13 @@
}
.contentRow .row1 {
- width: 20%;
- font-weight: bolder;
+ width: 100%;
}
.entirety_finished .row4 {
font-weight: bolder;
text-align: right;
- margin-right: 10px;
+ margin-right: 20px;
}
.contentRow .row1, .contentRow .row2 {
@@ -238,7 +238,7 @@
@page {
size: auto; /* auto is the initial value */
- margin: 18mm 4mm 0mm 4mm; /* this affects the margin in the printer settings */
+ margin: 13mm 5mm 0mm 7mm; /* this affects the margin in the printer settings */
}
@media print {
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue
index f7c1c9d..58085bf 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue
@@ -336,8 +336,8 @@
:close-on-click-modal="false"
:close-on-press-escape="false"
v-model="titleStyleVisible">
-<!-- <tag-style style="width: 100%;height: 100%"/>-->
- <tag-style-designer style="width: 100%;height: 100%"/>
+ <tag-style style="width: 100%;height: 100%"/>
+<!-- <tag-style-designer style="width: 100%;height: 100%"/>-->
</el-dialog>
<el-dialog
diff --git a/north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue b/north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue
index e0c8e4d..433afec 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue
@@ -13,6 +13,7 @@
import OrderOtherMoney from "@/components/sd/order/OrderOtherMoney.vue";
import footSum from "@/hook/footSum";
import {changeFilterEvent,filterChanged} from "@/hook"
+import companyInfo from "@/stores/sd/companyInfo";
//璇█鑾峰彇
const { t } = useI18n()
@@ -21,6 +22,7 @@
const userStore = useUserInfoStore()
const username = userStore.user.userName
const userid = userStore.user.userId
+const company = companyInfo()
let produceList = ref([])
let cellArea = ref()
let otherMoneyVisible = ref(false)
@@ -407,7 +409,8 @@
delivery: selectRecords,
title: titleUploadData.value,
deliveryId: route.query.deliveryID,
- otherMoney:otherMoney.value
+ otherMoney:otherMoney.value,
+ deliveryIdType:company.deliveryIdType
})
request.post("/Delivery/insertDelivery", flowData.value).then((res) => {
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryMapper.java
index 4b9d97e..7decd16 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryMapper.java
@@ -52,6 +52,8 @@
Integer getmaximum(@Param("type") String type);
+ Integer getmaximumMonth();
+
Boolean updatedelivery(@Param("area") Double area,
@Param("quantity") Integer quantity,
@Param("money") Double money,
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java b/north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java
index 80443e2..dbc234f 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java
@@ -168,6 +168,7 @@
} else {
deliveryId = "";
}
+ String deliveryIdType = object.get("deliveryIdType").toString();
Delivery delivery = JSONObject.parseObject(JSONObject.toJSONString(object.get("title")), Delivery.class);
List<OrderDetail> orderDetaillist = JSONArray.parseArray(JSONObject.toJSONString(object.get("delivery")), OrderDetail.class);
List<DeliveryOtherMoney> deliveryOtherMoneyList = JSONArray.parseArray(JSONObject.toJSONString(object.get("otherMoney")), DeliveryOtherMoney.class);
@@ -206,7 +207,7 @@
deliveryMapper.updateDelivery(delivery, oddNumber, orderDetaillist.get(0).getOrderId());
} else {
//鑾峰彇鍗曞彿
- oddNumber = orderNumberSetting("鍙戣揣");
+ oddNumber = orderNumberSetting("鍙戣揣",deliveryIdType);
//鏂板鍙戣揣琛ㄦ暟鎹�
deliveryMapper.insertDelivery(delivery, oddNumber, orderDetaillist.get(0).getOrderId());
}
@@ -738,21 +739,34 @@
}
}
- public String orderNumberSetting(String type) {
+ public String orderNumberSetting(String type,String deliveryIdType) {
//鏍规嵁绫诲瀷鑷姩鐢熸垚涓嶅悓鐨勬搷浣滃崟鍙�
String alias="";
if(Objects.equals(type, "鍙戣揣")){
alias="FH";
}
- //鏌ヨ褰撳ぉ鐨勬渶澶ф暟閲�
- Integer maximum=deliveryMapper.getmaximum(type);
- //璁剧疆涓や綅涓嶅琛�0
- String formattedNumber = String.format("%02d", maximum+1);
- //鏍煎紡鍖栧綋鍓嶆棩鏈�
- Date currentDate = new Date();
- SimpleDateFormat dateFormat = new SimpleDateFormat("yyMMdd");
- String formattedDate = dateFormat.format(currentDate);
- String oddNumbers = alias+formattedDate+formattedNumber;
+ String oddNumbers="";
+
+ if(deliveryIdType.equals("day")){
+ //鏌ヨ褰撳ぉ鐨勬渶澶ф暟閲�
+ Integer maximum=deliveryMapper.getmaximum(type);
+ //璁剧疆涓や綅涓嶅琛�0
+ String formattedNumber = String.format("%02d", maximum+1);
+ //鏍煎紡鍖栧綋鍓嶆棩鏈�
+ Date currentDate = new Date();
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyMMdd");
+ String formattedDate = dateFormat.format(currentDate);
+ oddNumbers = alias+formattedDate+formattedNumber;
+ }else if(deliveryIdType.equals("month")){
+ Integer maximum = deliveryMapper.getmaximumMonth();
+ String formattedNumber = String.format("%04d", maximum+1);
+ Date currentDate = new Date();
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyMM");
+ String formattedDate = dateFormat.format(currentDate);
+ oddNumbers = alias+formattedDate+formattedNumber;
+
+ }
+
return oddNumbers;
}
}
diff --git a/north-glass-erp/src/main/resources/mapper/sd/DeliveryMapper.xml b/north-glass-erp/src/main/resources/mapper/sd/DeliveryMapper.xml
index 0e8b152..00c823a 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/DeliveryMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/DeliveryMapper.xml
@@ -45,6 +45,15 @@
select count(*) from sd.delivery where date(create_time)=CURDATE()
</select>
+ <select id="getmaximumMonth">
+ select
+ ifnull(SUBSTR(max(delivery_id) from 7),0)
+ from
+ sd.delivery as a
+ where
+ date(a.create_time) BETWEEN DATE_FORMAT(DATE(NOW()), '%Y-%m-01') AND DATE(NOW())
+ </select>
+
<select id="getDeliveryConut" >
select count(*) from sd.delivery where delivery_id=#{deliveryId}
</select>
--
Gitblit v1.8.0