Commit 1353b6a1 authored by 罗林杰's avatar 罗林杰

增加驳回意见填写

parent 4d53def6
...@@ -191,10 +191,30 @@ ...@@ -191,10 +191,30 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button v-if="!isEdit" class="cancelBtn" @click="cancel">取 消</el-button> <el-button v-if="!isEdit" class="cancelBtn" @click="cancel">取 消</el-button>
<el-button v-if="isEdit" class="cancelBtn" @click="handleChange('2')">驳 回</el-button> <el-button v-if="isEdit" class="cancelBtn" @click="rejection">驳 回</el-button>
<el-button v-if="isEdit" class="cancelBtn" type="primary" @click="handleChange('1')">通 过</el-button> <el-button v-if="isEdit" class="cancelBtn" type="primary" @click="handleChange('1')">通 过</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="驳回意见" :visible.sync="rejectionOpen" width="500px" append-to-body>
<el-form ref="deviceFormRef" :model="form" label-position="right" label-width="auto">
<el-row :gutter="20">
<el-col :span="24">
<el-input
v-model.trim="form.remarks"
label="驳回意见"
type="textarea"
show-word-limit
maxlength="300"
placeholder="请输入内容"
/>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button class="cancelBtn" @click="cancelRejection">取 消</el-button>
<el-button class="cancelBtn" type="primary" @click="handleChange('2')">驳 回</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
...@@ -216,6 +236,7 @@ export default { ...@@ -216,6 +236,7 @@ export default {
return { return {
pageKey: 0, pageKey: 0,
open: false, open: false,
rejectionOpen: false,
title: '', title: '',
hasAddPerm: ['sys:topic:add'], hasAddPerm: ['sys:topic:add'],
hasUpdatePerm: ['sys:topic:update'], hasUpdatePerm: ['sys:topic:update'],
...@@ -319,6 +340,9 @@ export default { ...@@ -319,6 +340,9 @@ export default {
this.open = false this.open = false
this.reset() this.reset()
}, },
cancelRejection() {
this.rejectionOpen = false
},
// 表单重置 // 表单重置
reset() { reset() {
this.form = {} this.form = {}
...@@ -433,16 +457,27 @@ export default { ...@@ -433,16 +457,27 @@ export default {
}, },
/** 审核 */ /** 审核 */
handleChange(row) { handleChange(row) {
if (row === '2' && this.form.remarks === null) {
return this.$message({
message: '请填写驳回原因',
type: 'warning'
})
}
const form = { const form = {
businessId: this.form.businessId, businessId: this.form.businessId,
examStatus: row examStatus: row,
remarks: this.form.remarks
} }
updateOpmArticle(form).then(response => { updateOpmArticle(form).then(response => {
this.msgSuccess('操作成功') this.msgSuccess('操作成功')
this.open = false this.open = false
this.rejectionOpen = false
this.loadData() this.loadData()
}) })
}, },
rejection() {
this.rejectionOpen = true
},
async deleteComment(row) { async deleteComment(row) {
this.$confirm('是否确认删除评论?', '提示', { this.$confirm('是否确认删除评论?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment