增加领料发布驳回界面及API
This commit is contained in:
parent
cf7bd4b1d0
commit
f751b760af
|
|
@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -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()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue