From e728c55c65d943ad90a6cf6e1c619003b4c9a077 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 29 三月 2025 17:52:26 +0800
Subject: [PATCH] 质量监控、监督计划-流程修改
---
src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue | 8 +++-
src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue | 24 +++++++++---
src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue | 18 ++++++--
src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue | 12 ++++-
src/views/CNAS/process/ensureResults/qualityControlPlan/components/processingSheet.vue | 25 ++++++++----
src/views/CNAS/process/ensureResults/qualityControlPlan/components/rectifyDialogNew.vue | 25 ++++++++----
6 files changed, 80 insertions(+), 32 deletions(-)
diff --git a/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue
index 1249f83..70a291d 100644
--- a/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue
+++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue
@@ -146,8 +146,8 @@
<span slot="footer" class="dialog-footer">
<el-button @click="closeCarryOutDia">鍙� 娑�</el-button>
<el-button v-if="currentStep === 0" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
- <el-button v-if="currentStep === 1" :loading="editLoad" @click="handleEdit(0)">涓嶉�氳繃</el-button>
- <el-button v-if="currentStep === 1" :loading="editLoad" type="primary" @click="handleEdit(1)">閫�
+ <el-button v-if="currentStep === 1 && userId == ratifyUserId" :loading="editLoad" @click="handleEdit(0)">涓嶉�氳繃</el-button>
+ <el-button v-if="currentStep === 1 && userId == ratifyUserId" :loading="editLoad" type="primary" @click="handleEdit(1)">閫�
杩�</el-button>
</span>
</el-dialog>
@@ -161,6 +161,7 @@
getQualityMonitorRatify
} from "@/api/cnas/process/ensureResults/qualityMonitor";
import { selectUserCondition } from "@/api/business/inspectionTask";
+import {mapGetters} from "vuex";
export default {
name: 'carryOutDialog',
@@ -189,7 +190,11 @@
personList: [],
editLoad: false,
isCarryOut: false, // 鏄惁涓哄疄鏂�
+ ratifyUserId: ''
};
+ },
+ computed: {
+ ...mapGetters(["userId"]),
},
// 鏂规硶闆嗗悎
methods: {
@@ -204,7 +209,7 @@
// 鏈塪etailsRatifyId鍒欒鏄庢彁浜よ繃瀹炴柦淇℃伅
if (res.data.ratifyUserId) {
// 鏄惁缁撴潫0:鏈粨鏉�, 1:宸茬粨鏉�
- if (res.data.isFinish == 0) {
+ if (res.data.isFinish != 1) {
this.currentStep = 1
} else if (res.data.isFinish == 1) {
this.currentStep = 2
@@ -213,6 +218,7 @@
this.currentStep = 0
}
this.form = res.data
+ this.ratifyUserId = res.data.ratifyUserId
}).catch(err => {
console.log('err---', err);
})
diff --git a/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue
index 25b9c4d..27ebc61 100644
--- a/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue
+++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue
@@ -387,8 +387,10 @@
if (params === 0) {
return '鏈紑濮�';
} else if (params === 1) {
- return '寰呮壒鍑�';
- } else if (params === 2) {
+ return '寰呰瘎浠�';
+ } else if (params === 2) {
+ return '涓嶆壒鍑�';
+ } else if (params === 3) {
return '宸叉壒鍑�';
} else {
return null;
@@ -400,6 +402,8 @@
} else if (params === 1) {
return 'warning';
} else if (params === 2) {
+ return 'danger';
+ } else if (params === 3) {
return 'success';
} else {
return null;
diff --git a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/processingSheet.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/processingSheet.vue
index 97b3b36..5d2f2c8 100644
--- a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/processingSheet.vue
+++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/processingSheet.vue
@@ -297,9 +297,9 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="closeProcessingDia">鍙� 娑�</el-button>
- <el-button v-if="currentStep === 0" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
- <el-button v-if="currentStep === 1" :loading="editLoad" @click="handleEdit(0)">涓嶉�氳繃</el-button>
- <el-button v-if="currentStep === 1" :loading="editLoad" type="primary" @click="handleEdit(1)">閫�
+ <el-button v-if="currentStep === 0 && userId == supervisedUserId" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
+ <el-button v-if="currentStep === 1 && userId == approverUserId" :loading="editLoad" @click="handleEdit(0)">涓嶉�氳繃</el-button>
+ <el-button v-if="currentStep === 1 && userId == approverUserId" :loading="editLoad" type="primary" @click="handleEdit(1)">閫�
杩�</el-button>
</span>
</el-dialog>
@@ -312,6 +312,7 @@
getSuperviseDetailAccording
} from "@/api/cnas/process/ensureResults/qualitySupervise";
import {selectUserCondition} from "@/api/business/inspectionTask";
+import {mapGetters} from "vuex";
export default {
name: 'processingSheet',
@@ -356,13 +357,19 @@
editLoad: false,
personList: [],
supervisedUserList: [],
+ supervisedUserId: '',
+ approverUserId: ''
};
+ },
+ computed: {
+ ...mapGetters(["userId"]),
},
// 鏂规硶闆嗗悎
methods: {
openDia (row) {
this.formDia = true
this.form.superviseDetailsId = row.superviseDetailsId
+ this.supervisedUserId = row.supervisedUserId
this.searchInfo(row)
this.form.approveId = row.approveId
this.getAuthorizedPerson() // 鑾峰彇浜哄憳鍒楄〃
@@ -373,17 +380,19 @@
getSuperviseDetailAccording({superviseDetailsId: this.form.superviseDetailsId}).then(res => {
this.form.supervisedUserId = res.data.supervisedUserId
this.form.supervisedUserName = res.data.supervisedUserName
- if (!res.data.approverUserId) {
- this.currentStep = 0
- } else {
- if (res.data.isFinish === 0) {
+ if (res.data.approverUserId) {
+ // 鏄惁缁撴潫0:鏈粨鏉�, 1:宸茬粨鏉�
+ if (res.data.isFinish != 1) {
this.currentStep = 1
- } else {
+ } else if (res.data.isFinish == 1) {
this.currentStep = 2
}
+ } else {
+ this.currentStep = 0
}
this.form = res.data
this.form.superviseDetailsId = row.superviseDetailsId
+ this.approverUserId = res.data.approverUserId
}).catch(err => {
console.log('err---', err);
})
diff --git a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue
index 73041e3..9a8bf6b 100644
--- a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue
+++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue
@@ -235,9 +235,9 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="closeRecordsDia">鍙� 娑�</el-button>
- <el-button v-if="currentStep === 0" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
- <el-button v-if="currentStep === 1" :loading="editLoad" @click="handleEdit(0)">涓嶉�氳繃</el-button>
- <el-button v-if="currentStep === 1" :loading="editLoad" type="primary" @click="handleEdit(1)">閫�
+ <el-button v-if="currentStep === 0 && userId == supervisedUserId" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
+ <el-button v-if="currentStep === 1 && userId == ratifyUserId" :loading="editLoad" @click="handleEdit(0)">涓嶉�氳繃</el-button>
+ <el-button v-if="currentStep === 1 && userId == ratifyUserId" :loading="editLoad" type="primary" @click="handleEdit(1)">閫�
杩�</el-button>
</span>
</el-dialog>
@@ -251,6 +251,7 @@
getSuperviseDetailRecord
} from "@/api/cnas/process/ensureResults/qualitySupervise";
import {selectUserCondition} from "@/api/business/inspectionTask";
+import {mapGetters} from "vuex";
export default {
name: 'recordsDialog',
@@ -288,12 +289,18 @@
editLoad: false,
personList: [],
recordUserList: [],
+ supervisedUserId: '',
+ ratifyUserId: '',
};
+ },
+ computed: {
+ ...mapGetters(["userId"]),
},
// 鏂规硶闆嗗悎
methods: {
openDia(row) {
this.formDia = true
+ this.supervisedUserId = row.supervisedUserId
this.searchInfo(row)
this.getAuthorizedPerson()
},
@@ -309,9 +316,9 @@
// 鏈塻uperviseDetailsRecordId璇存槑鎻愪氦杩囪褰�
if (res.data.ratifyUserId) {
// 鏄惁缁撴潫0:鏈粨鏉�, 1:宸茬粨鏉�
- if (res.data.isFinish === 0) {
+ if (res.data.isFinish != 1) {
this.currentStep = 1
- } else if (res.data.isFinish === 1) {
+ } else if (res.data.isFinish == 1) {
this.currentStep = 2
}
} else {
@@ -319,6 +326,7 @@
}
this.form = res.data
this.form.superviseDetailsId = row.superviseDetailsId
+ this.ratifyUserId = res.data.ratifyUserId
this.getRecordUser()
}).catch(err => {
console.log('err---', err);
diff --git a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/rectifyDialogNew.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/rectifyDialogNew.vue
index b3838eb..344497c 100644
--- a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/rectifyDialogNew.vue
+++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/rectifyDialogNew.vue
@@ -242,9 +242,9 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="closeRectifyDia">鍙� 娑�</el-button>
- <el-button v-if="currentStep === 0" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
- <el-button v-if="currentStep === 1" :loading="editLoad" @click="handleEdit(0)">涓嶉�氳繃</el-button>
- <el-button v-if="currentStep === 1" :loading="editLoad" type="primary" @click="handleEdit(1)">閫�
+ <el-button v-if="currentStep === 0 && userId == supervisedUserId" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
+ <el-button v-if="currentStep === 1 && userId == approverUserId" :loading="editLoad" @click="handleEdit(0)">涓嶉�氳繃</el-button>
+ <el-button v-if="currentStep === 1 && userId == approverUserId" :loading="editLoad" type="primary" @click="handleEdit(1)">閫�
杩�</el-button>
</span>
</el-dialog>
@@ -258,6 +258,7 @@
} from "@/api/cnas/process/ensureResults/qualitySupervise";
import {selectUserCondition} from "@/api/business/inspectionTask";
import {getThisYearTrainingDetailed} from "@/api/cnas/systemManagement/correctiveAction";
+import {mapGetters} from "vuex";
export default {
name: 'rectifyDialog',
@@ -298,7 +299,12 @@
editLoad: false,
personList: [],
yearTrainingDetailed: [],
+ supervisedUserId: '',
+ approverUserId: ''
};
+ },
+ computed: {
+ ...mapGetters(["userId"]),
},
// 鏂规硶闆嗗悎
methods: {
@@ -307,6 +313,7 @@
this.searchInfo(row)
this.form.superviseDetailsId = row.superviseDetailsId
this.form.approveId = row.approveId
+ this.supervisedUserId = row.supervisedUserId
this.getAuthorizedPerson() // 鑾峰彇浜哄憳鍒楄〃
this.getYearTrainingDetailed() // 鑾峰彇鍩硅璁″垝
},
@@ -314,16 +321,18 @@
searchInfo (row) {
this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId
getSuperviseDetailCorrect({superviseDetailsId: row.superviseDetailsId}).then(res => {
- if (!res.data.approverUserId) {
- this.currentStep = 0
- } else {
- if (res.data.isFinish === 0) {
+ if (res.data.approverUserId) {
+ // 鏄惁缁撴潫0:鏈粨鏉�, 1:宸茬粨鏉�
+ if (res.data.isFinish != 1) {
this.currentStep = 1
- } else {
+ } else if (res.data.isFinish == 1) {
this.currentStep = 2
}
+ } else {
+ this.currentStep = 0
}
this.form = res.data
+ this.approverUserId = res.data.approverUserId
}).catch(err => {
console.log('err---', err);
})
diff --git a/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue
index 9086b86..ca56ba6 100644
--- a/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue
+++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue
@@ -280,8 +280,10 @@
if (params === 0) {
return '鏈紑濮�';
} else if (params === 1) {
- return '寰呮壒鍑�';
- } else if (params === 2) {
+ return '寰呰瘎浠�';
+ } else if (params === 2) {
+ return '涓嶆壒鍑�';
+ } else if (params === 3) {
return '宸叉壒鍑�';
} else {
return null;
@@ -293,6 +295,8 @@
} else if (params === 1) {
return 'warning';
} else if (params === 2) {
+ return 'danger';
+ } else if (params === 3) {
return 'success';
} else {
return null;
@@ -307,8 +311,10 @@
if (params === 0) {
return '鏈紑濮�';
} else if (params === 1) {
- return '寰呮壒鍑�';
- } else if (params === 2) {
+ return '寰呰瘎浠�';
+ } else if (params === 2) {
+ return '涓嶆壒鍑�';
+ } else if (params === 3) {
return '宸叉壒鍑�';
} else {
return null;
@@ -320,6 +326,8 @@
} else if (params === 1) {
return 'warning';
} else if (params === 2) {
+ return 'danger';
+ } else if (params === 3) {
return 'success';
} else {
return null;
@@ -334,8 +342,10 @@
if (params === 0) {
return '鏈紑濮�';
} else if (params === 1) {
- return '寰呮壒鍑�';
- } else if (params === 2) {
+ return '寰呰瘎浠�';
+ } else if (params === 2) {
+ return '涓嶆壒鍑�';
+ } else if (params === 3) {
return '宸叉壒鍑�';
} else {
return null;
@@ -347,6 +357,8 @@
} else if (params === 1) {
return 'warning';
} else if (params === 2) {
+ return 'danger';
+ } else if (params === 3) {
return 'success';
} else {
return null;
--
Gitblit v1.9.3