| | |
| | | <rrOperation /> |
| | | </div> |
| | | <!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
| | | <crudOperation :permission="permission" /> |
| | | <crudOperation :permission="permission"> |
| | | <el-button |
| | | slot="right" |
| | | v-permission="permission.seeDivide" |
| | | class="filter-item" |
| | | size="mini" |
| | | type="primary" |
| | | icon="el-icon-circle-check" |
| | | :disabled="crud.selections.length < 1 || !crud.selections.every(selection => selection.approvalStatus === dictGoOutAppRev)" |
| | | style="margin-left: 4px !important;" |
| | | @click="toAgree(1, crud.selections)" |
| | | > |
| | | 批量同意 |
| | | </el-button> |
| | | <el-button |
| | | slot="right" |
| | | class="filter-item" |
| | | size="mini" |
| | | type="primary" |
| | | icon="el-icon-error" |
| | | :disabled="crud.selections.length < 1 || !crud.selections.every(selection => selection.approvalStatus === dictGoOutAppRev)" |
| | | style="margin-left: 4px !important;" |
| | | @click="toAgree(2, crud.selections)" |
| | | > |
| | | 批量拒绝 |
| | | </el-button> |
| | | </crudOperation> |
| | | <!--表单组件--> |
| | | <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px"> |
| | | <el-form ref="form" :model="form" :rules="rules" size="small" label-width="110px"> |
| | |
| | | this.form.outReason = data.outReason |
| | | this.form.remarks = data.remarks |
| | | }, |
| | | // 批量审核 |
| | | toAgree(Number, data) { |
| | | const msg = Number === 2 ? '批量拒绝' : '批量同意' |
| | | const msg1 = Number === 2 ? 'error' : 'success' |
| | | // 确认框 |
| | | this.$confirm('此操作将' + msg + '审核内容是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: msg1 |
| | | }).then(() => { |
| | | const ids = [] |
| | | // 循环数据 |
| | | for (let i = 0; i < data.length; i++) { |
| | | // ID列表 |
| | | ids.push(data[i].id) |
| | | } |
| | | crudAttendanceGoOut.updateAgree({ |
| | | num: Number, |
| | | ids: ids |
| | | }).then(res => { |
| | | // 消息提示 |
| | | this.$message({ |
| | | type: 'success', |
| | | message: msg + '!' |
| | | }) |
| | | // 刷新数据 |
| | | this.crud.refresh() |
| | | }) |
| | | }) |
| | | }, |
| | | // 审核提交功能 |
| | | approveFunction(Number, data) { |
| | | this.form.userId = data.userId |