From b6732643bc72951c819ab2ce46b0d029ddce92a0 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期五, 23 八月 2024 13:13:03 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override
---
north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue | 31 ++++++++++-----
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java | 5 +-
north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue | 2
north-glass-erp/northglass-erp/src/views/pp/rework/PrintReworkFlowCard.vue | 2
north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue | 18 ++++++++-
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue | 25 +++++++++---
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue | 4 +
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml | 20 ++++++----
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml | 9 ++--
9 files changed, 80 insertions(+), 36 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue b/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
index ecd4e32..1160db8 100644
--- a/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
@@ -141,21 +141,30 @@
technologyNumber = produceList.value[i].detail[0].qrcode.toString(); // 杞崲涓哄瓧绗︿覆浠ヤ究澶勭悊姣忎釜瀛楃,鍚堝苟鏍囩
}else {
technologyNumber = produceList.value[i].detail[0].technologyNumber.toString(); // 杞崲涓哄瓧绗︿覆浠ヤ究澶勭悊姣忎釜瀛楃
+ console.log(produceList.value[i].detail[0])
}
produceList.value[i].detail[0]["qrcodeList"] = []; // 鍒濆鍖栦竴涓┖鏁扮粍鐢ㄦ潵瀛樺偍 QR Code
- for (let j = 0; j < technologyNumber.length; j++) {
- const processId = produceList.value[i].detail[0].process_id;
- const url = `${processId}/${technologyNumber[j]}`;
+ const processId = produceList.value[i].detail[0].process_id;
+ const url = `${processId}/${technologyNumber}`;
+ // 鐢熸垚 QR Code 骞跺瓨鍌ㄥ埌鏁扮粍涓�
+ const qrcodeData = await QRCode.toDataURL(url);
+ produceList.value[i].detail[0]["qrcodeList"].push({
+ qrcode: qrcodeData,
+ technologyNumber: technologyNumber
+ });
- // 鐢熸垚 QR Code 骞跺瓨鍌ㄥ埌鏁扮粍涓�
- const qrcodeData = await QRCode.toDataURL(url);
- produceList.value[i].detail[0]["qrcodeList"].push({
- qrcode: qrcodeData,
- technologyNumber: technologyNumber[j]
- });
-
- }
+ // for (let j = 0; j < technologyNumber.length; j++) {
+ // const processId = produceList.value[i].detail[0].process_id;
+ // const url = `${processId}/${technologyNumber[j]}`;
+ // // 鐢熸垚 QR Code 骞跺瓨鍌ㄥ埌鏁扮粍涓�
+ // const qrcodeData = await QRCode.toDataURL(url);
+ // produceList.value[i].detail[0]["qrcodeList"].push({
+ // qrcode: qrcodeData,
+ // technologyNumber: technologyNumber[j]
+ // });
+ //
+ // }
}
};
diff --git a/north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue b/north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue
index 8eee227..6bdf3b8 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue
@@ -324,7 +324,7 @@
{field: 'patch_area', title: t('order.area'),width:80},
{field: 'responsible_team', title: t('reportingWorks.responsibleTeam'),width:110},
{field: 'responsible_equipment', title: t('reportingWorks.responsibleEquipment'),width:110},
- {field: 'responsible_personnel', title: t('reportingWorks.responsiblePersonnel'),width:110},
+ {field: 'responsible_personnel', title: '璐d换淇℃伅',width:110},
{field: 'patch_type', title: t('reportingWorks.breakageType'),width:110},
{field: 'patch_reason', title: t('reportingWorks.breakageReason'),width:110},
{field: 'patch_processes', title: t('reportingWorks.responsibleProcess'),width:110},
diff --git a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
index 8eca868..503fe4c 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
@@ -743,8 +743,12 @@
return row.order_number === brokenRow.value.order_number
})
const maxQuantity = Math.max(...equalByOrderNum.map(item =>item.breakageQuantity || 0))
+ let process = titleUploadData.value.thisProcess
equalByOrderNum.forEach((row) =>{
- row.completedQuantity= brokenRow.value.quantity*1-maxQuantity
+ if (process=='澶硅兌' || process=='涓┖' || process=='鍖呰' ||process=='鎵撹兌鍜岀矘妗�'){
+ row.completedQuantity= brokenRow.value.quantity*1-maxQuantity
+ }
+
})
@@ -831,9 +835,9 @@
const notFinishList = xGrid.value.getTableData().fullData.filter(item =>{
return item.saveFlag === 0
})
-
+ let process = titleUploadData.value.thisProcess
for(let item of uniqueByOrderNum){
- if(!checkSameNumForId(notFinishList,item.order_number )){
+ if(!checkSameNumForId(notFinishList,item.order_number ) && (process=='澶硅兌' || process=='涓┖' || process=='鍖呰' ||process=='鎵撹兌鍜岀矘妗�')){
ElMessage.error(`${t('reportingWorks.pleaseCheckTheOrderNumber1')}':'
${item.order_number}
${t('reportingWorks.pleaseCheckTheOrderNumber1')}`)
@@ -861,7 +865,6 @@
userName:user.user.userName,
qualityInsStatus:status
}
- console.log('requestData',requestData)
gridOptions.toolbarConfig.buttons[0].disabled=true
gridOptions.toolbarConfig.buttons[1].disabled=true
//鍒ゆ柇淇濆瓨杩樻槸淇敼
@@ -967,10 +970,19 @@
ElMessage.warning(t('reportingWorks.firstProcessNotReview'))
return
}
+ //鍖归厤鈥�/鈥濆墠鍚庡瓧绗︿覆
+ const regex = /([^\/]+)\/([^\/]+)/;
+ //鏌ユ壘鍖归厤鐨勫瓧绗︿覆
+ const result = processId.match(regex);
+ //娴佺▼鍗″彿
+ let processIdStr = result[1];
+ //灞傚彿
+ let technologyStr = result[2];
const reportWork = {
process: titleUploadData.value.previousProcess,
processId:processId,
- thisProcess:titleUploadData.value.thisProcess
+ thisProcess:titleUploadData.value.thisProcess,
+ technologyStr:technologyStr
}
loadingFlag.value= true
request.post("/reportingWork/reviewReportingWork",reportWork).then((res) =>{
@@ -1150,9 +1162,10 @@
}
const editClosedEvent = ({ row, column }) => {
+ let process = titleUploadData.value.thisProcess
if (column.property==='completedQuantity') {
xGrid.value.getTableData().fullData.forEach((item, index) =>{
- if(item.order_number===row.order_number){
+ if(item.order_number===row.order_number && (process=='澶硅兌' || process=='涓┖' || process=='鍖呰' ||process=='鎵撹兌鍜岀矘妗�')){
item.completedQuantity=row.completedQuantity
}
})
diff --git a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue
index ab8ffe6..610c34f 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue
@@ -27,7 +27,9 @@
case 'delete':{
let userId=user.user.userId;
let userName=user.user.userName;
- request.post(`/reportingWork/deleteWork/${row.reportingWorkId}/${row.processId}/${row.thisProcess}/${userId}/${userName}`).then((res) => {
+ const str=row.processId
+ let processId=str.split('/')[0];
+ request.post(`/reportingWork/deleteWork/${row.reportingWorkId}/${processId}/${row.thisProcess}/${userId}/${userName}`).then((res) => {
if (res.code == 200 && res.data===true) {
ElMessage.success(t('workOrder.deleteOk'))
router.push({path: '/main/reportingWorks/SelectReportingWorks', query: {random:Math.random()}})
diff --git a/north-glass-erp/northglass-erp/src/views/pp/rework/PrintReworkFlowCard.vue b/north-glass-erp/northglass-erp/src/views/pp/rework/PrintReworkFlowCard.vue
index 7c2f277..efe6572 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/rework/PrintReworkFlowCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/rework/PrintReworkFlowCard.vue
@@ -300,7 +300,7 @@
{field: 'rework_area', title: t('order.area'),width:70},
{field: 'rework_team', title: t('reportingWorks.responsibleTeam'),width:90},
{field: 'responsible_equipment', title: t('reportingWorks.responsibleEquipment'),width:120},
- {field: 'responsible_personnel', title: t('reportingWorks.responsiblePersonnel'),width:100},
+ {field: 'responsible_personnel', title: '璐d换淇℃伅',width:100},
{field: 'rework_type', title: t('reportingWorks.breakageType'),width:80},
{field: 'rework_reason', title: t('reportingWorks.breakageReason'),width:90},
{field: 'rework_processes', title: t('reportingWorks.responsibleProcess'),width:80},
diff --git a/north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue b/north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue
index 02646df..c6251b6 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue
@@ -108,7 +108,7 @@
})
-const saveProduct = () => {
+const saveProduct = (type) => {
if(productDetailList.value.length===0){
ElMessage.warning(t('product.msg.productLength'))
return
@@ -140,6 +140,11 @@
})
productTotal.value.productName=productName
productTotal.value.productAbbreviation=productTotal.value.productAbbreviation.trim()
+ if(type==='copy'){
+ productTotal.value.id = null
+ productTotal.value.state = 0
+ }
+
let product = {
title: productTotal.value,
detail:productDetailList.value
@@ -404,6 +409,7 @@
})
return productName
})
+
@@ -789,8 +795,16 @@
</div>
<el-button
+ v-if="productTotal.state===1"
+ @click="saveProduct('copy')"
+ style="float: left;
+ margin-left: 0.5rem;"
+ size="large"
+ type="primary"
+ round>{{"澶嶅埗"}}</el-button>
+ <el-button
:disabled="productTotal.state===1"
- @click="saveProduct"
+ @click="saveProduct(null)"
style="float: right;
margin-right: 0.5rem;"
size="large"
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
index 6cfd6a3..e4026c8 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -329,8 +329,9 @@
String thisProcess = reportingWork.get("thisProcess");
int index = processId.lastIndexOf("/") + 1;
String result = processId.substring(index);
+ String technologyStr = reportingWork.get("technologyStr");
-if (thisProcess.equals("澶硅兌") || thisProcess.equals("涓┖") || thisProcess.equals("浠撳偍")){
+if (thisProcess.equals("澶硅兌") || thisProcess.equals("涓┖") || thisProcess.equals("鍖呰")){
LambdaUpdateWrapper
<ReportingWork> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper
@@ -340,7 +341,7 @@
.setSql("reviewed_state =1");
reportingWorkMapper.update(null, updateWrapper);
}else {
- reportingWorkMapper.ReviewReportingWorkMp(processId.substring(0, 14),reportingWork.get("process"),result);
+ reportingWorkMapper.ReviewReportingWorkMp(processId.substring(0, 14),reportingWork.get("process"),technologyStr);
}
return true;
diff --git a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
index 7f34b09..f1250c5 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -889,7 +889,7 @@
od.building_number as buildingNumber,
od.product_name as productName,
od.edging_type as edgingType,
- p.remarks,
+ od.remarks,
c.customer_abbreviation as customerAbbreviation,
p.product_abbreviation as productAbbreviation,
fc.process_id as processId,
@@ -1023,7 +1023,8 @@
from sd.order_detail as od
left join flow_card as fc on od.order_id = fc.order_id and od.order_number = fc.order_number
where fc.process_id = #{processId}
- and fc.technology_number = #{technologyNumber}
+ and POSITION(fc.technology_number in #{technologyNumber})
+ GROUP BY other_columns
order by IF(fc.sort != NULL or fc.sort != '', fc.sort, fc.order_number)
</select>
@@ -1506,7 +1507,7 @@
od.building_number as buildingNumber,
od.product_name as productName,
od.edging_type as edgingType,
- p.remarks,
+ od.remarks,
c.customer_abbreviation as customerAbbreviation,
p.product_abbreviation as productAbbreviation,
CONCAT(fc.process_id, '/', fc.technology_number) as processId,
@@ -1986,7 +1987,7 @@
od.building_number as buildingNumber,
od.product_name as productName,
od.edging_type as edgingType,
- p.remarks,
+ od.remarks,
c.customer_abbreviation as customerAbbreviation,
p.product_abbreviation as productAbbreviation,
fc.process_id as processId,
diff --git a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
index fdc9834..1863856 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -83,11 +83,13 @@
process_id,a.reporting_work_id
from reporting_work as a
left join reporting_work_detail as b on a.reporting_work_id = b.reporting_work_id
- where this_process=#{previousProcess} and reviewed_state=0 and process_id=#{processIdStr} and b.technology_number=#{technologyStr}) as rw
+ where this_process=#{previousProcess} and reviewed_state=0 and process_id=#{processIdStr}
+ and POSITION(b.technology_number in #{technologyStr})
+ ) as rw
on rw.process_id = fc.process_id
left join reporting_work_detail as rwd on rw.reporting_work_id = rwd.reporting_work_id and rwd.technology_number=fc.technology_number
where fc.process_id = #{processIdStr}
- and fc.technology_number = #{technologyStr}
+ and POSITION(fc.technology_number in #{technologyStr})
and if(#{reportType}=1,o.order_type!='鏍峰搧璁㈠崟',o.order_id!='')
GROUP BY fc.process_id
</select>
@@ -109,7 +111,7 @@
select ifnull((select ogd.process
from sd.order_glass_detail as ogd
where ogd.production_id = LEFT(#{processIdStr}, 11)
- and ogd.technology_number=#{technologyStr}
+ and POSITION(ogd.technology_number in #{technologyStr})
limit 1),'') as process
</select>
@@ -160,7 +162,7 @@
where
reporting_work.this_process = #{process}
and a.process_id=#{processIdStr}
- and a.technology_number = #{technologyStr}
+ and POSITION(a.technology_number in #{technologyStr})
and a.review_status = 1
group by a.process_id,a.order_sort,a.technology_number
) as patch
@@ -171,9 +173,11 @@
WHERE
fc.process_id = #{processIdStr}
- AND fc.technology_number = #{technologyStr}
+ AND POSITION(fc.technology_number in #{technologyStr})
AND odpd.process = #{process}
and if(#{reportType}=1,o.order_type!='鏍峰搧璁㈠崟',o.order_id!='')
+ group by fc.order_number,
+ ogd.technology_number
order by fc.order_number
</select>
@@ -211,7 +215,7 @@
from sd.order_glass_detail
where order_id = ogd.order_id
and order_number = ogd.order_number
- and technology_number =#{technologyStr}
+ and POSITION(technology_number in #{technologyStr})
limit 1)
</if>
@@ -249,7 +253,7 @@
WHERE
fc.process_id = #{processIdStr}
<if test="process != '涓┖' and process != '澶硅兌' and process != '鍖呰' and process != '鎵撹兌鍜岀矘妗�' ">
- AND fc.technology_number = #{technologyStr}
+ AND POSITION(fc.technology_number in #{technologyStr})
</if>
AND odpd.process = #{process}
order by fc.order_number
@@ -796,7 +800,7 @@
left join reporting_work_detail as rwd on rw.reporting_work_id = rwd.reporting_work_id
set rw.reviewed_state = 1
where rw.process_id = #{substring} and rw.this_process=#{process}
- and rwd.technology_number = #{result} and reviewed_state=0
+ and POSITION(rwd.technology_number in #{result}) and reviewed_state=0
</update>
<select id="getPatchConditionMp">
--
Gitblit v1.8.0