|
@@ -294,6 +294,10 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
+
|
|
|
|
+ <el-input type="textarea" v-model="item.checkMessage"></el-input>
|
|
|
|
+
|
|
|
|
+ <refuseReason @selectRefuseReason="(refuseReason) => selectRefuseReason(refuseReason, item)" />
|
|
<div class="btns">
|
|
<div class="btns">
|
|
<el-button :disabled="getShowBtn(item)" class="btn" @click="debouncedPassClick(index, 4, item.id)">拒绝</el-button>
|
|
<el-button :disabled="getShowBtn(item)" class="btn" @click="debouncedPassClick(index, 4, item.id)">拒绝</el-button>
|
|
<el-button :disabled="getShowBtn(item)" class="btn" type="primary" @click="debouncedPassClick(index, 3, item.id)">通过</el-button>
|
|
<el-button :disabled="getShowBtn(item)" class="btn" type="primary" @click="debouncedPassClick(index, 3, item.id)">通过</el-button>
|
|
@@ -301,6 +305,22 @@
|
|
</el-card>
|
|
</el-card>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+ <!-- 审核弹窗 -->
|
|
|
|
+ <el-dialog title="审核" :close-on-click-modal="false" :visible.sync="reviewDialog" top="12vh" width="50%" center :before-close="handleClose">
|
|
|
|
+ <div class="reviewContent" v-loading="loading">
|
|
|
|
+ <el-form :model="taskForm" :rules="rules" ref="taskForm" label-width="100px">
|
|
|
|
+ <el-form-item label="意见说明:" prop="checkMessage" class="formitem-box">
|
|
|
|
+ <el-input type="textarea" v-model="taskForm.checkMessage"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <refuseReason @selectRefuseReason="formSelectRefuseReason" />
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="handleClose">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="checkForm" v-loading="loading">确 定</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
</basic-container>
|
|
</basic-container>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -316,9 +336,10 @@ import QRCode from 'qrcode';
|
|
import request from '@/router/axios';
|
|
import request from '@/router/axios';
|
|
import ElImageViewer from 'element-ui/packages/image/src/image-viewer';
|
|
import ElImageViewer from 'element-ui/packages/image/src/image-viewer';
|
|
import { mapGetters } from 'vuex';
|
|
import { mapGetters } from 'vuex';
|
|
|
|
+import refuseReason from '@/components/refuseReason';
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- components: { ElImageViewer },
|
|
|
|
|
|
+ components: { ElImageViewer, refuseReason },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
form: {
|
|
form: {
|
|
@@ -338,7 +359,20 @@ export default {
|
|
column2Height: 270,
|
|
column2Height: 270,
|
|
imgTypeList: ['jpeg', 'jpg', 'png', 'git', 'bmp'], // 能查看的文件类型
|
|
imgTypeList: ['jpeg', 'jpg', 'png', 'git', 'bmp'], // 能查看的文件类型
|
|
showViewer: false,
|
|
showViewer: false,
|
|
- viewerList: []
|
|
|
|
|
|
+ viewerList: [],
|
|
|
|
+ reviewDialog: false,
|
|
|
|
+ taskForm: {
|
|
|
|
+ checkMessage: ''
|
|
|
|
+ },
|
|
|
|
+ rules: {
|
|
|
|
+ checkMessage: [
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ message: '请输入审批说明',
|
|
|
|
+ trigger: 'blur'
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -397,6 +431,21 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
+ handleClose() {
|
|
|
|
+ this.taskForm.checkMessage = '';
|
|
|
|
+ this.reviewDialog = false;
|
|
|
|
+ },
|
|
|
|
+ formSelectRefuseReason(reason) {
|
|
|
|
+ this.taskForm.checkMessage = reason;
|
|
|
|
+ },
|
|
|
|
+ checkForm() {
|
|
|
|
+ this.$refs.taskForm.validate(async (valid) => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ this.allPassClick();
|
|
|
|
+ this.reviewDialog = false;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
// 判断审核按钮展示
|
|
// 判断审核按钮展示
|
|
getShowBtn(row) {
|
|
getShowBtn(row) {
|
|
let flag = false;
|
|
let flag = false;
|
|
@@ -513,6 +562,11 @@ export default {
|
|
this.$message.error('请先选择数据!');
|
|
this.$message.error('请先选择数据!');
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ const checkMessage = this.taskForm.checkMessage;
|
|
|
|
+ if (type == 4 && !this.taskForm.checkMessage) {
|
|
|
|
+ this.reviewDialog = true;
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
const taskIdToNodeIdMap = {};
|
|
const taskIdToNodeIdMap = {};
|
|
this.list.forEach((item) => {
|
|
this.list.forEach((item) => {
|
|
if (item.checked) {
|
|
if (item.checked) {
|
|
@@ -539,10 +593,10 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
if (this.$route.query.type == '1') {
|
|
if (this.$route.query.type == '1') {
|
|
- console.log('taskIdToNodeIdMap', taskIdToNodeIdMap);
|
|
|
|
let obj = {
|
|
let obj = {
|
|
id: this.checkedIds.join(','),
|
|
id: this.checkedIds.join(','),
|
|
taskIdToNodeIdMap: taskIdToNodeIdMap,
|
|
taskIdToNodeIdMap: taskIdToNodeIdMap,
|
|
|
|
+ checkMessage: checkMessage,
|
|
taskStatus: type
|
|
taskStatus: type
|
|
};
|
|
};
|
|
await batchApprovalTask(obj);
|
|
await batchApprovalTask(obj);
|
|
@@ -552,6 +606,7 @@ export default {
|
|
reportId: this.$route.query.id,
|
|
reportId: this.$route.query.id,
|
|
taskIdToNodeIdMap: taskIdToNodeIdMap,
|
|
taskIdToNodeIdMap: taskIdToNodeIdMap,
|
|
taskIds: this.checkedIds.join(','),
|
|
taskIds: this.checkedIds.join(','),
|
|
|
|
+ checkMessage: checkMessage,
|
|
approvalOpinion: approvalOpinion
|
|
approvalOpinion: approvalOpinion
|
|
};
|
|
};
|
|
await wmreportBatchApprovalTask(obj);
|
|
await wmreportBatchApprovalTask(obj);
|
|
@@ -561,6 +616,9 @@ export default {
|
|
let curr = this.taskList.find((item) => item.id == taskType);
|
|
let curr = this.taskList.find((item) => item.id == taskType);
|
|
if (curr) return curr.taskTypeName;
|
|
if (curr) return curr.taskTypeName;
|
|
},
|
|
},
|
|
|
|
+ selectRefuseReason(refuseReason, item) {
|
|
|
|
+ item.checkMessage = refuseReason;
|
|
|
|
+ },
|
|
async getList() {
|
|
async getList() {
|
|
let res;
|
|
let res;
|
|
if (this.$route.query.type === '1') {
|
|
if (this.$route.query.type === '1') {
|
|
@@ -578,6 +636,7 @@ export default {
|
|
}
|
|
}
|
|
await res.data.data.forEach(async (item) => {
|
|
await res.data.data.forEach(async (item) => {
|
|
if (item.config && item.config.length != 0) {
|
|
if (item.config && item.config.length != 0) {
|
|
|
|
+ item.checkMessage = '';
|
|
item.config.forEach((iten) => {
|
|
item.config.forEach((iten) => {
|
|
iten.taskFiledType = iten.taskFiledType.trim();
|
|
iten.taskFiledType = iten.taskFiledType.trim();
|
|
if (iten.taskFiledType == 'img') {
|
|
if (iten.taskFiledType == 'img') {
|
|
@@ -888,6 +947,12 @@ export default {
|
|
return address;
|
|
return address;
|
|
},
|
|
},
|
|
async passClick(index, type, id) {
|
|
async passClick(index, type, id) {
|
|
|
|
+ const curr = this.list[index];
|
|
|
|
+ const checkMessage = curr.checkMessage;
|
|
|
|
+ if (type == 4 && !checkMessage) {
|
|
|
|
+ return this.$message.warning('请完善拒绝原因');
|
|
|
|
+ }
|
|
|
|
+
|
|
this.list[index].show = false;
|
|
this.list[index].show = false;
|
|
this.column1Height = 270;
|
|
this.column1Height = 270;
|
|
this.column2Height = 270;
|
|
this.column2Height = 270;
|
|
@@ -897,11 +962,11 @@ export default {
|
|
this.maps[id].setMap && this.maps[id].setMap(null);
|
|
this.maps[id].setMap && this.maps[id].setMap(null);
|
|
}
|
|
}
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
-
|
|
|
|
if (this.$route.query.type == '1') {
|
|
if (this.$route.query.type == '1') {
|
|
const obj = {
|
|
const obj = {
|
|
id: id,
|
|
id: id,
|
|
taskStatus: type,
|
|
taskStatus: type,
|
|
|
|
+ checkMessage: checkMessage,
|
|
taskIdToNodeIdMap: {
|
|
taskIdToNodeIdMap: {
|
|
[id]: this.list[index].taskInfo.checkState.curNodeId
|
|
[id]: this.list[index].taskInfo.checkState.curNodeId
|
|
}
|
|
}
|
|
@@ -920,6 +985,7 @@ export default {
|
|
let obj = {
|
|
let obj = {
|
|
reportId: this.$route.query.id,
|
|
reportId: this.$route.query.id,
|
|
taskIds: id,
|
|
taskIds: id,
|
|
|
|
+ checkMessage: checkMessage,
|
|
taskIdToNodeIdMap: {
|
|
taskIdToNodeIdMap: {
|
|
[id]: nodeId
|
|
[id]: nodeId
|
|
},
|
|
},
|
|
@@ -1083,4 +1149,8 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+::v-deep .refuse-reason {
|
|
|
|
+ padding-left: 0 !important;
|
|
|
|
+ margin-top: 5px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|