增加领料发布驳回界面及API

This commit is contained in:
syruan 2025-07-24 16:30:00 +08:00
parent cf7bd4b1d0
commit f751b760af
2 changed files with 60 additions and 1 deletions

View File

@ -107,3 +107,12 @@ export function getLeaseRequestVoApi(data) {
params: data params: data
}) })
} }
// 领料出库-驳回
export function rejectLeaseOut(data) {
return request({
url: '/material/leaseTask/leasePublishReject',
method: 'post',
data: data
})
}

View File

@ -251,6 +251,18 @@
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" /> <el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="待出库数量" align="center" prop="outNum" :show-overflow-tooltip="true" /> <el-table-column label="待出库数量" align="center" prop="outNum" :show-overflow-tooltip="true" />
<el-table-column label="已出库数量" align="center" prop="alNum" :show-overflow-tooltip="true" /> <el-table-column label="已出库数量" align="center" prop="alNum" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" width="120px" v-if="checkShowRejectButton()">
<template slot-scope="scope">
<el-button
size="mini"
type="danger"
@click="handleReject(scope.row)"
v-if="scope.row.alNum == 0"
>
驳回
</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="ViewTotal > 0" v-show="ViewTotal > 0"
@ -657,7 +669,7 @@
<script> <script>
import { getListLeaseApply, getApplyInfo, getCheckInfo } from '@/api/lease/apply' 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 vueEasyPrint from 'vue-easy-print'
// import chapter from '../../../../utils/chapter'; // import chapter from '../../../../utils/chapter';
import printJS from 'print-js' 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) { create5star(context, sx, sy, radius, color, rotato) {
context.save() context.save()