From acaf8ca38cd32bc474bb46b593db2a8d75b9bfdd Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期六, 12 十月 2024 08:26:23 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue | 54 +++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 37 insertions(+), 17 deletions(-)
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 9caac38..c4c6653 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
@@ -103,6 +103,10 @@
titleSelectJson.value = res.data.basic
layer= res.data.layer
+ //娣诲姞琛ョ墖鐘舵�佸垪
+ let column = {field: 'patchStatusOther', width: 90,title: res.data.title}
+ gridOptions.columns.push(column)
+
const s01Values = [];
for (let i = 0; i < res.data.reportingWorkDetails.length; i++) {
const s01Values = [];
@@ -145,7 +149,6 @@
})
const data = [{id:1,num:2},{id:1,num:3},{id:2,num:2},{id:1,num:2}];
-
//琛ㄥ熬姹傚拰
const sumNum = (list, field) => {
@@ -352,6 +355,8 @@
return new Error(t('reportingWorks.enterIntegerGreaterThanEqualTo'))
}else if((row.completedQuantity*1+brokenNum*1)>row.quantity*1){
return new Error((`${row.completedQuantity}+${brokenNum}>${row.quantity}`))
+ }else if(row.quantity_card<row.completedQuantity){
+ return new Error("瀹屽伐鏁颁笉鑳藉ぇ浜庢祦绋嬪崱鏁伴噺")
}
if(titleUploadData.value.reportingWorkId!=null && row.completedQuantity<row.minQuantity){
return new Error(`${t('reportingWorks.pleaseGreaterThanOrEqual1')}
@@ -428,12 +433,12 @@
}
case 'update': {
//鏍规嵁琛ョ墖鐘舵�佸垽鏂槸鍚﹁兘淇敼
- request.post(`/reportingWork/getPatchCondition/${route.query.reportingWorkId}`).then(async (res) => {
- if (res.code == 200) {
- if (res.data > 0) {
- ElMessage.error("璇ユ姤宸ュ寘鍚凡琛ョ墖鏁版嵁锛屼笉鍙慨鏀�!")
- return
- } else {
+ // request.post(`/reportingWork/getPatchCondition/${route.query.reportingWorkId}`).then(async (res) => {
+ // if (res.code == 200) {
+ // if (res.data > 0) {
+ // ElMessage.error("璇ユ姤宸ュ寘鍚凡琛ョ墖鏁版嵁锛屼笉鍙慨鏀�!")
+ // return
+ // } else {
getQuantity()
const errMap = await $grid.validate(true)
if (errMap) {
@@ -441,11 +446,11 @@
return
}
saveReportingWork(0, 'update')
- }
- } else {
- ElMessage.warning(res.msg)
- }
- })
+ // }
+ // } else {
+ // ElMessage.warning(res.msg)
+ // }
+ // })
break
}
@@ -463,7 +468,9 @@
const { rows, column, cell } = params; // 瑙f瀯鑾峰彇琛屻�佸垪鍜屽崟鍏冩牸淇℃伅
//鐐瑰嚮娆$牬鏁伴噺鏃舵墦寮�鏄庣粏鐣岄潰
if(column.field=="breakageQuantity"){
- brokenVisible.value = true
+ if (row.patchStatusOther!="宸茶ˉ鐗�"){
+ brokenVisible.value = true
+ }
}
},
menuClick({menu, row, column}) {
@@ -788,14 +795,15 @@
//绗竴娆″姞杞芥暟鎹�
let groupChangeProcess = ref(false)//鐢ㄤ簬鏈彮缁勬樉绀洪棶棰�
-request.post(`/reportingWork/selectProcess`).then((res) => {
+request.post(`/reportingWork/selectProcess/${user.user.userId}`).then((res) => {
if (res.code == 200) {
titleSelectJson.value.processType = res.data.process
if(user.user.address!==null && user.user.address!==''){
titleUploadData.value.thisProcess = user.user.address
titleUploadData.value.teamsGroupsName = user.user.userName
- if (user.user.address!=='鎶�鏈儴澶氭洸'){
- groupChangeProcess.value = true
+ groupChangeProcess.value = true
+ if (user.user.address==='鎶�鏈儴澶氭洸' || user.user.address==='澶硅兌'){
+ groupChangeProcess.value = false
}
gridOptions.toolbarConfig.buttons[1].visible=false
}
@@ -1010,7 +1018,8 @@
process: titleUploadData.value.previousProcess,
processId:processId,
thisProcess:titleUploadData.value.thisProcess,
- technologyStr:technologyStr
+ technologyStr:technologyStr,
+ userName:user.user.userName
}
loadingFlag.value= true
request.post("/reportingWork/reviewReportingWork",reportWork).then((res) =>{
@@ -1292,6 +1301,16 @@
return row?.rowClass
}
+const editConfigDisable = reactive({
+ trigger: 'click',
+ mode: 'cell',
+ beforeEditMethod ({ row }) {
+ if (row.patchStatusOther === '宸茶ˉ鐗�') {
+ return false
+ }
+ return true
+ }
+})
</script>
@@ -1469,6 +1488,7 @@
v-on="gridEvents"
@edit-closed="editClosedEvent"
:cell-class-name="cellClassName"
+ :edit-config="editConfigDisable"
>
--
Gitblit v1.8.0