学生资助、学生奖惩等内容提交
This commit is contained in:
@@ -210,6 +210,13 @@
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:record:remove']"
|
||||
>删除</el-button> -->
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="openEditSqly(scope.row)"
|
||||
>修改申请理由</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -920,13 +927,32 @@
|
||||
<el-button @click="cancel">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
class="edit-reason-dialog"
|
||||
title="修改申请理由"
|
||||
:visible.sync="editReasonVisible"
|
||||
width="600px"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-form :model="editReasonForm" label-width="90px">
|
||||
<el-form-item label="申请理由">
|
||||
<el-input class="with-border" v-model="editReasonForm.sqly" type="textarea" :rows="6" placeholder="请输入申请理由" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer">
|
||||
<el-button @click="editReasonVisible=false">取消</el-button>
|
||||
<el-button type="primary" :loading="editReasonLoading" @click="submitEditSqly">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {list} from '@/api/stuYear/index'
|
||||
import { listFdyView } from '@/api/zxj/record'
|
||||
import { revoke } from '@/api/zxj/apply'
|
||||
import { revoke, updateApply, getApply, updateSqly } from '@/api/zxj/apply'
|
||||
import { listRecord } from '@/api/zxj/record'
|
||||
export default {
|
||||
name: 'Record',
|
||||
@@ -968,6 +994,9 @@ export default {
|
||||
title: '',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
editReasonVisible: false,
|
||||
editReasonLoading: false,
|
||||
editReasonForm: { id: null, sqly: '' },
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@@ -983,7 +1012,7 @@ export default {
|
||||
printobj: {
|
||||
id: 'apply',
|
||||
popTitle: '打印', // 打印配置页上方标题
|
||||
extraHead: '', //最上方的头部文字,附加在head标签上的额外标签,使用逗号分隔
|
||||
extraHead: '<style>@media print{ #apply .signature{display:none!important;} #apply .signature img{display:none!important;} }</style>', //最上方的头部文字,附加在head标签上的额外标签,使用逗号分隔
|
||||
preview: '', // 是否启动预览模式,默认是false(开启预览模式,可以先预览后打印)
|
||||
previewTitle: '', // 打印预览的标题(开启预览模式后出现),
|
||||
previewPrintBtnLabel: '', // 打印预览的标题的下方按钮文本,点击可进入打印(开启预览模式后出现)
|
||||
@@ -1144,6 +1173,42 @@ export default {
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
openEditSqly(row) {
|
||||
this.editReasonLoading = true
|
||||
getApply(row.id).then(res => {
|
||||
const data = res.data || {}
|
||||
this.editReasonForm = {
|
||||
id: data.id,
|
||||
sqly: data.sqly || ''
|
||||
}
|
||||
// 备份完整对象用于提交
|
||||
this._fullApplyData = data
|
||||
this.editReasonVisible = true
|
||||
this.editReasonLoading = false
|
||||
}).catch(() => { this.editReasonLoading = false })
|
||||
},
|
||||
submitEditSqly() {
|
||||
const payload = { id: this.editReasonForm.id, sqly: this.editReasonForm.sqly }
|
||||
this.editReasonLoading = true
|
||||
updateSqly(payload)
|
||||
.then((res) => {
|
||||
this.editReasonLoading = false
|
||||
const ok = res && res.code !== 500
|
||||
if (ok) {
|
||||
this.editReasonVisible = false
|
||||
this.$modal && this.$modal.msgSuccess ? this.$modal.msgSuccess('已更新申请理由') : this.$message.success('已更新申请理由')
|
||||
this.getList()
|
||||
} else {
|
||||
const msg = (res && res.msg) || '操作失败'
|
||||
this.$message.error(msg)
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
this.editReasonLoading = false
|
||||
const msg = (err && err.message) || '操作失败'
|
||||
this.$message.error(msg)
|
||||
})
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleDetail(row) {
|
||||
const nid = row.id || this.ids
|
||||
@@ -1249,6 +1314,10 @@ td {
|
||||
.bj >>> .el-input .el-input__inner {
|
||||
width: 255px;
|
||||
}
|
||||
@media print {
|
||||
#apply .signature { display: none !important; }
|
||||
#apply .signature img { display: none !important; }
|
||||
}
|
||||
.class-info >>> .el-input__inner {
|
||||
padding: 0px 10px;
|
||||
text-align: right;
|
||||
@@ -1406,3 +1475,16 @@ td {
|
||||
border-width: 1px;
|
||||
}
|
||||
</style>
|
||||
.edit-reason-dialog >>> .el-textarea__inner {
|
||||
border: 1px solid #dcdfe6 !important;
|
||||
box-shadow: none !important;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.edit-reason-dialog >>> .el-input__inner {
|
||||
border: 1px solid #dcdfe6 !important;
|
||||
box-shadow: none !important;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.edit-reason-dialog >>> .with-border .el-textarea__inner {
|
||||
border: 1px solid #606266 !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user