|
@@ -159,7 +159,29 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="整改结果" align="center" prop="changeResult" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="整改结果" align="center" prop="changeResult" :show-overflow-tooltip="true">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.changeResult==null&&scope.row.changeFile!=null">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-circle-check"
|
|
|
+ @click="checkRecord(scope.row,'合格')"
|
|
|
+ v-hasPermi="['production:record:approve']"
|
|
|
+ >合格
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-circle-close"
|
|
|
+ @click="checkRecord(scope.row,'不合格')"
|
|
|
+ v-hasPermi="['production:record:approve']"
|
|
|
+ >不合格
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <div v-else>{{ scope.row.changeResult }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column label="操作" align="center" fixed="right" width="200" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
@@ -167,7 +189,7 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-tickets"
|
|
|
- @click="openDetail(scope.row.id)"
|
|
|
+ @click="openDetail(scope.row)"
|
|
|
v-hasPermi="['production:record:edit']"
|
|
|
>整改记录
|
|
|
</el-button>
|
|
@@ -320,6 +342,7 @@
|
|
|
icon="el-icon-plus"
|
|
|
size="mini"
|
|
|
@click="handleChange"
|
|
|
+ v-if="detail.flag"
|
|
|
>添加整改记录
|
|
|
</el-button>
|
|
|
</el-col>
|
|
@@ -343,29 +366,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="整改内容" align="center" prop="changeContent" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="整改结果" align="center" prop="changeResult" :show-overflow-tooltip="true">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div v-if="scope.row.changeResult==null">
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-circle-check"
|
|
|
- @click="checkRecord(scope.row,'合格')"
|
|
|
- v-hasPermi="['production:record:approve']"
|
|
|
- >合格
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-circle-close"
|
|
|
- @click="checkRecord(scope.row,'不合格')"
|
|
|
- v-hasPermi="['production:record:approve']"
|
|
|
- >不合格
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
- <div v-else>{{ scope.row.changeResult }}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column label="整改结果" align="center" prop="changeResult" :show-overflow-tooltip="true"/>
|
|
|
</el-table>
|
|
|
</el-dialog>
|
|
|
|
|
@@ -431,6 +432,7 @@ export default {
|
|
|
detail: {
|
|
|
open: false,
|
|
|
recordId: null,
|
|
|
+ flag: true
|
|
|
},
|
|
|
file: {
|
|
|
title: "",
|
|
@@ -555,20 +557,19 @@ export default {
|
|
|
methods: {
|
|
|
checkRecord(row, result) {
|
|
|
console.log(row)
|
|
|
- approveRecord({id: row.id, recordId: row.recordId, changeResult: result}).then(res => {
|
|
|
- this.getDetailList(row.recordId);
|
|
|
+ approveRecord({id: row.id, changeResult: result}).then(res => {
|
|
|
this.getList();
|
|
|
})
|
|
|
},
|
|
|
- handleRemove(file, fileList){
|
|
|
- console.log(this.fileIds,this.personFiles)
|
|
|
+ handleRemove(file, fileList) {
|
|
|
+ console.log(this.fileIds, this.personFiles)
|
|
|
console.log(file)
|
|
|
- if(file.response.data!=null){
|
|
|
- if (this.fileIds.indexOf(file.response.data)>=0){
|
|
|
- this.fileIds.splice(this.fileIds.indexOf(file.response.data),1)
|
|
|
+ if (file.response.data != null) {
|
|
|
+ if (this.fileIds.indexOf(file.response.data) >= 0) {
|
|
|
+ this.fileIds.splice(this.fileIds.indexOf(file.response.data), 1)
|
|
|
}
|
|
|
}
|
|
|
- console.log(this.fileIds,this.personFiles)
|
|
|
+ console.log(this.fileIds, this.personFiles)
|
|
|
},
|
|
|
changeRecord(row, result) {
|
|
|
this.$refs["form"].validate(valid => {
|
|
@@ -605,10 +606,11 @@ export default {
|
|
|
this.form.position = this.regionList.find((o) => o.orderNo === event).position
|
|
|
this.form.owner = this.regionList.find((o) => o.orderNo === event).personLiable
|
|
|
},
|
|
|
- openDetail(id) {
|
|
|
- this.detail.recordId = id;
|
|
|
+ openDetail(row) {
|
|
|
+ this.detail.recordId = row.id;
|
|
|
this.detail.open = true;
|
|
|
- this.getDetailList(id);
|
|
|
+ this.detail.flag = row.changeResult === '合格' ? false : true;
|
|
|
+ this.getDetailList(row.id);
|
|
|
},
|
|
|
getDetailList(id) {
|
|
|
listDetails({recordId: id}).then(response => {
|
|
@@ -722,11 +724,11 @@ export default {
|
|
|
const id = row.id || this.ids
|
|
|
getRecord(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
- if (this.form.checkFile!=null){
|
|
|
+ if (this.form.checkFile != null) {
|
|
|
let ids = this.form.checkFile.split(',')
|
|
|
for (const id of ids) {
|
|
|
- getFile(id).then(res=>{
|
|
|
- let item = {url: process.env.VUE_APP_BASE_API +res.data.url,response: {msg: res.data.url,data:id} }
|
|
|
+ getFile(id).then(res => {
|
|
|
+ let item = {url: process.env.VUE_APP_BASE_API + res.data.url, response: {msg: res.data.url, data: id}}
|
|
|
this.fileList.push(item)
|
|
|
this.fileIds.push(id)
|
|
|
})
|