From 93b80ffb7f7ffc02bc414271b8ebeac82be6bcb9 Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期一, 11 十一月 2024 16:29:00 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue | 64 ++++++++++++++++++++++----------
1 files changed, 44 insertions(+), 20 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..9caaeb7 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: t('reportingWorks.patchCondition')}
+ 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,8 +355,12 @@
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(t('reportingWorks.pleaseNumber10'))
}
- if(titleUploadData.value.reportingWorkId!=null && row.completedQuantity<row.minQuantity){
+ const completedNum =
+ (row.completedQuantity === undefined || row.completedQuantity===null || row.completedQuantity==='') ? 0 : row.completedQuantity
+ if(titleUploadData.value.reportingWorkId!=null && completedNum>row.minQuantity){
return new Error(`${t('reportingWorks.pleaseGreaterThanOrEqual1')}
${row.minQuantity}
${t('reportingWorks.pleaseGreaterThanOrEqual2')}`)
@@ -428,12 +435,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 +448,11 @@
return
}
saveReportingWork(0, 'update')
- }
- } else {
- ElMessage.warning(res.msg)
- }
- })
+ // }
+ // } else {
+ // ElMessage.warning(res.msg)
+ // }
+ // })
break
}
@@ -463,7 +470,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 +797,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 +1020,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) =>{
@@ -1087,7 +1098,7 @@
//璁惧涓嬫媺妗�
titleSelectJson.value.deviceType = res.data.device
//鐝粍涓嬫媺妗�
- titleSelectJson.value.teamsType = res.data.teams
+ //titleSelectJson.value.teamsType = res.data.teams
//褰撳墠娴佺▼鍗″伐搴�
titleSelectJson.value.thisProcessType = res.data.thisProcess
//鍘嗗彶鐝粍
@@ -1292,6 +1303,16 @@
return row?.rowClass
}
+const editConfigDisable = reactive({
+ trigger: 'click',
+ mode: 'cell',
+ beforeEditMethod ({ row }) {
+ if (row.patchStatusOther === '宸茶ˉ鐗�') {
+ return false
+ }
+ return true
+ }
+})
</script>
@@ -1469,6 +1490,7 @@
v-on="gridEvents"
@edit-closed="editClosedEvent"
:cell-class-name="cellClassName"
+ :edit-config="editConfigDisable"
>
@@ -1476,7 +1498,9 @@
<template #num1_filter="{ column, $panel }">
<div>
<div v-for="(option, index) in column.filters" :key="index">
- <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/>
+ <input v-model="option.data" type="type"
+ @keyup.enter.native="$panel.confirmFilter()"
+ @input="changeFilterEvent($event, option, $panel)"/>
</div>
</div>
</template>
--
Gitblit v1.8.0