工艺文件维护修改

dev-scheduling
jinna 1 week ago
parent a5dbfba928
commit d273cea8aa
  1. 4
      src/api/qualityManagement/inspectionArchiving/rbFilePreserve.js
  2. 63
      src/views/qualityManagement/inspectionArchiving/rbFilePreserve/index.vue

@ -110,11 +110,11 @@ export const updateStatus = (data) =>{
} }
// 发布接口 // 发布接口
export const release = (data) =>{ export const release = (params) =>{
return request({ return request({
url:'/api/blade-desk/QA/ProReTemplate/publish', url:'/api/blade-desk/QA/ProReTemplate/publish',
method:'post', method:'post',
data params
}) })
} }

@ -45,7 +45,7 @@
<el-button type="text" @click="releaseData(scope.row)" v-if="scope.row.status == 0 && permission.rbFilePreserve_issue" <el-button type="text" @click="releaseData(scope.row)" v-if="scope.row.status == 0 && permission.rbFilePreserve_issue"
>发布</el-button >发布</el-button
> >
<el-button type="text" @click="auditData(scope.row)" v-if="scope.row.status == 1" <el-button type="text" @click="auditData(scope.row)" v-if="scope.row.status == 1 || scope.row.status == 2"
>审核</el-button >审核</el-button
> >
<el-button type="text" @click="updateStatus(scope.row, 3)" v-if="scope.row.status == 3 && permission.rbFilePreserve_cancellation" <el-button type="text" @click="updateStatus(scope.row, 3)" v-if="scope.row.status == 3 && permission.rbFilePreserve_cancellation"
@ -63,10 +63,10 @@
<template #status="{row}"> <template #status="{row}">
<span v-if="row.status == 0" style="cursor:pointer;">新建</span> <span v-if="row.status == 0" style="cursor:pointer;">新建</span>
<span v-if="row.status == 1" style="cursor:pointer;" @click="hadleHistory(row)">待审核</span> <span v-if="row.status == 1" style="cursor:pointer;" @click="hadleHistory(row)">待审核</span>
<span v-if="row.status == 2" style="cursor:pointer;">审核中</span> <span v-if="row.status == 2" style="cursor:pointer;" @click="hadleHistory(row)">审核中</span>
<span v-if="row.status == 3" style="cursor:pointer;">使用中</span> <span v-if="row.status == 3" style="cursor:pointer;" @click="hadleHistory(row)">使用中</span>
<span v-if="row.status == 4" style="cursor:pointer;">废弃</span> <span v-if="row.status == 4" style="cursor:pointer;" @click="hadleHistory(row)">废弃</span>
<span v-if="row.status == 5" style="cursor:pointer;">审核不通过</span> <span v-if="row.status == 5" style="cursor:pointer;" @click="hadleHistory(row)">审核不通过</span>
</template> </template>
</avue-crud> </avue-crud>
<detailRb <detailRb
@ -122,13 +122,7 @@
</template> </template>
</el-dialog> </el-dialog>
<el-dialog width="30%" v-model="checkHistory" title="审核历史"> <el-dialog width="30%" v-model="checkHistory" title="审核历史">
<div style="height: 300px;"> <checkLine v-if="checkHistory" :data="historyData"></checkLine>
<el-steps direction="vertical" :active="1">
<el-step v-for="(item,index) in historyData" :key="item.id" :title="`${index == historyData.length -1 ? '提交人:' : '审核人:'} `"></el-step>
<!-- <el-step title="步骤 2"></el-step>
<el-step title="步骤 3" description="这是一段很长很长很长的描述性文字"></el-step> -->
</el-steps>
</div>
</el-dialog> </el-dialog>
</basic-container> </basic-container>
@ -142,7 +136,9 @@ import {
deleteRecords, deleteRecords,
copyData, copyData,
updateStatus, updateStatus,
release release,
audit,
auditHistory
} from '@/api/qualityManagement/inspectionArchiving/rbFilePreserve'; } from '@/api/qualityManagement/inspectionArchiving/rbFilePreserve';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import detailRb from './detailRb2.vue'; import detailRb from './detailRb2.vue';
@ -151,6 +147,7 @@ import approvalStandard from '@/views/oem/components/approval/index.vue';
import editTable from './editTable.vue'; import editTable from './editTable.vue';
import basicImport from '@/components/basic-import/main.vue'; import basicImport from '@/components/basic-import/main.vue';
import addPreserve from './addPreserve.vue'; import addPreserve from './addPreserve.vue';
import checkLine from "./checkLine.vue"
export default { export default {
components: { components: {
detailRb, detailRb,
@ -159,6 +156,7 @@ export default {
editTable, editTable,
basicImport, basicImport,
addPreserve, addPreserve,
checkLine
}, },
data() { data() {
return { return {
@ -170,10 +168,6 @@ export default {
currentPage: 1, currentPage: 1,
total: 0, total: 0,
}, },
historyData:[
{id:2,name:'张三',time:'2021-01-01',result:'审核通过'},
{id:1,name:'李四',time:'2021-01-01',result:'审核通过'},
],
form: {}, form: {},
query: {}, query: {},
loading: true, loading: true,
@ -185,6 +179,7 @@ export default {
remark:[{ required: false, message: '请填写审核意见', trigger: 'blur' }] remark:[{ required: false, message: '请填写审核意见', trigger: 'blur' }]
}, },
checkHistory:false, checkHistory:false,
historyData:[],
option: { option: {
tip: false, tip: false,
height: 'auto', height: 'auto',
@ -463,6 +458,25 @@ export default {
.catch(() => {}); .catch(() => {});
}, },
//
releaseData(row){
this.$confirm('确定发布此模板?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
release({
id: row.id,
}).then((res) => {
this.$message({
message: '发布成功',
type: 'success',
});
this.onLoad(this.page, this.query);
});
})
},
auditData(row){ auditData(row){
this.checkId = row.id this.checkId = row.id
this.auditForm = { this.auditForm = {
@ -487,12 +501,25 @@ export default {
...this.auditForm, ...this.auditForm,
id:this.checkId id:this.checkId
} }
audit(params).then(res =>{
if(res.data.code == 200){
this.$message.success('审核成功')
this.onLoad()
this.approveDialog = false
}
})
} }
}) })
}, },
hadleHistory(row){ hadleHistory(row){
this.checkHistory = true auditHistory({
id:row.id
}).then(res =>{
console.log('res----------------',res)
this.historyData = res.data.data
this.checkHistory = true
})
}, },
// //

Loading…
Cancel
Save