| | |
| | | <el-table-column v-if="checkPer(['admin','projectReimburse:edit','projectReimburse:del'])" label="操作" width="150px" align="center" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <udOperation |
| | | v-if="!scope.row.wecomSpNo" |
| | | :data="scope.row" |
| | | :permission="permission" |
| | | /> |
| | | <el-button |
| | | v-if="scope.row.wecomSpNo && user.id === scope.row.userId && scope.row.approvalStatus === dictReimburseApproveStatusRefuse" |
| | | size="mini" |
| | | type="primary" |
| | | icon="el-icon-refresh-right" |
| | | @click="reAdd(scope.row)" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!--分页组件--> |
| | | <pagination /> |
| | | |
| | | <cp-approval-del-dialog ref="cpApprovalDelDialog" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | import udOperation from '@crud/UD.operation' |
| | | import pagination from '@crud/Pagination' |
| | | import approvalLine from '@/components/ApprovalLine' |
| | | import cpApprovalDelDialog from '@/components/CpApprovalDelDialog' |
| | | import fileUpload from '@/views/assembly/fileUpload' |
| | | import { mapGetters } from 'vuex' |
| | | import constant from '@/utils/constant' |
| | |
| | | const defaultForm = { id: null, userId: null, approvalUserId: null, projectId: null, reimburseType: null, reimburseReason: null, expenseType: null, startTime: null, endTime: null, expenseAmount: null, expenseComment: null, originFileName: null, filePath: null, approvalStatus: null, approvalDescription: null, createTime: null, createBy: null, updateTime: null, updateBy: null, wecomSpNo: null, event: null, userName: null, appUserName: null, projectName: null, reimburseTypes: null, expenseTypes: null } |
| | | export default { |
| | | name: 'ProjectReimburse', |
| | | components: { pagination, crudOperation, rrOperation, udOperation, approvalLine, fileUpload }, |
| | | components: { pagination, crudOperation, rrOperation, udOperation, approvalLine, fileUpload, cpApprovalDelDialog }, |
| | | mixins: [presenter(), header(), form(defaultForm), crud()], |
| | | dicts: [constant.REIMBURSE_APPROVE_STATUS, constant.REIMBURSE_TYPE, constant.REIMBURSE_EXPENSE_TYPE, constant.APPROVAL_SITE_TYPE], |
| | | cruds() { |
| | |
| | | const that = this |
| | | that.$set(that.form, 'reimburseTypes', undefined) |
| | | that.$set(that.form, 'expenseTypes', undefined) |
| | | return true |
| | | }, |
| | | // 钩子:删除 - 之前 |
| | | [CRUD.HOOK.beforeDelete]() { |
| | | const that = this |
| | | if (that.crud.selections.some(selection => selection.wecomSpNo !== null && selection.wecomSpNo !== undefined && selection.wecomSpNo !== '')) { |
| | | that.$refs.cpApprovalDelDialog.handleOpen() |
| | | that.crud.delAllLoading = false |
| | | return false |
| | | } |
| | | return true |
| | | }, |
| | | |
| | |
| | | return |
| | | } |
| | | } |
| | | }, |
| | | // 再新增(企微) |
| | | reAdd(data) { |
| | | const that = this |
| | | that.crud.toAdd() |
| | | that.$set(that.form, 'userId', data.userId) |
| | | that.$set(that.form, 'approvalUserId', data.approvalUserId) |
| | | that.$set(that.form, 'projectId', data.projectId) |
| | | that.$set(that.form, 'reimburseTypes', data.reimburseType.split(',')) |
| | | that.$set(that.form, 'reimburseReason', data.reimburseReason) |
| | | that.$set(that.form, 'expenseTypes', data.expenseType.split(',')) |
| | | that.$set(that.form, 'startTime', data.startTime) |
| | | that.$set(that.form, 'endTime', data.endTime) |
| | | that.$set(that.form, 'expenseAmount', data.expenseAmount) |
| | | that.$set(that.form, 'expenseComment', data.expenseComment) |
| | | that.$set(that.form, 'filePath', data.filePath) |
| | | } |
| | | } |
| | | } |