From f751b760afee6d94142207e94330de05db2bba72 Mon Sep 17 00:00:00 2001 From: syruan <15555146157@163.com> Date: Thu, 24 Jul 2025 16:30:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A2=86=E6=96=99=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E9=A9=B3=E5=9B=9E=E7=95=8C=E9=9D=A2=E5=8F=8AAPI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/lease/out.js | 9 ++++ src/views/material/lease/outBound/index.vue | 52 ++++++++++++++++++++- 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/src/api/lease/out.js b/src/api/lease/out.js index 56e61fdf..40cc774b 100644 --- a/src/api/lease/out.js +++ b/src/api/lease/out.js @@ -107,3 +107,12 @@ export function getLeaseRequestVoApi(data) { params: data }) } + +// 领料出库-驳回 +export function rejectLeaseOut(data) { + return request({ + url: '/material/leaseTask/leasePublishReject', + method: 'post', + data: data + }) +} diff --git a/src/views/material/lease/outBound/index.vue b/src/views/material/lease/outBound/index.vue index 2b41c07e..9a1b9344 100644 --- a/src/views/material/lease/outBound/index.vue +++ b/src/views/material/lease/outBound/index.vue @@ -251,6 +251,18 @@ + + + import { getListLeaseApply, getApplyInfo, getCheckInfo } from '@/api/lease/apply' -import { outInfoList, getDetailsByTypeId, submitOut, submitNumOut } from '@/api/lease/out' +import { outInfoList, getDetailsByTypeId, submitOut, submitNumOut, rejectLeaseOut } from '@/api/lease/out' import vueEasyPrint from 'vue-easy-print' // import chapter from '../../../../utils/chapter'; import printJS from 'print-js' @@ -1179,6 +1191,44 @@ export default { } }, + // 检查是否显示驳回按钮 + checkShowRejectButton() { + // 检查列表中是否有已出库数量为0的数据 + return this.getListOutInfo && this.getListOutInfo.some(item => item.alNum == 0) + }, + + // 处理驳回操作 + handleReject(row) { + this.$confirm('确定要驳回此条数据吗?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + // 调用驳回API + const rejectData = { + id: row.id, + parentId: row.parentId, + taskId: row.taskId, + typeId: row.typeId, + publishTask: this.publishTask, + outNum: row.outNum, // 待出库数量 + remark: '已出库数量为0,执行驳回操作' + } + + rejectLeaseOut(rejectData).then(response => { + this.$modal.msgSuccess('驳回成功') + // 刷新查看弹窗的数据 + this.getListView() + // 刷新主列表数据 + this.getList() + }).catch(error => { + this.$modal.msgError('驳回失败: ' + (error.message || '未知错误')) + }) + }).catch(() => { + // 用户取消操作 + }) + }, + //绘制五角星 create5star(context, sx, sy, radius, color, rotato) { context.save()