BAOLH
2026-07-28 ffe6e492b6a0238e7d109dd4a6f765fe8e0afd13
eladmin-web-master/src/views/project/projectReimburse/index.vue
@@ -300,14 +300,24 @@
        <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>
@@ -322,6 +332,7 @@
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'
@@ -329,7 +340,7 @@
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() {
@@ -472,6 +483,16 @@
      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
    },
@@ -699,6 +720,22 @@
          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)
    }
  }
}