add:添加调拨其他出库下推功能 fix:修复sys菜单组件名称问题

This commit is contained in:
zhangzq
2026-07-14 20:42:54 +08:00
parent 7be392563a
commit daa7151a83
14 changed files with 394 additions and 102 deletions

View File

@@ -28,6 +28,7 @@
</div>
<crudOperation :permission="permission">
<el-button slot="right" class="filter-item" type="warning" icon="el-icon-s-promotion" size="mini" :disabled="audit_flag" @click="issueReturnBill">下发回传单</el-button>
<el-button slot="right" class="filter-item" type="success" icon="el-icon-s-promotion" size="mini" :disabled="!multipleSelection.length || multipleSelection.length>1" @click="handleBatchPush">下推出库</el-button>
</crudOperation>
<el-table ref="table" v-loading="crud.loading" size="mini" :data="crud.data" highlight-current-row style="width: 100%;" @selection-change="crud.selectionChangeHandler" @current-change="handleCurrentChange" @select="handleSelectionChange">
<el-table-column type="selection" width="55" />
@@ -108,6 +109,7 @@ export default {
},
viewShow: false,
mstrow: {},
multipleSelection: [],
currentRow: null,
audit_flag: true,
billStatusOptions: [
@@ -173,6 +175,35 @@ export default {
querytable() {
this.crud.toQuery()
},
handleBatchPush() {
if (!this.multipleSelection.length) {
this.$message.warning('请先勾选要下推的调拨出库单')
return
}
// eslint-disable-next-line eqeqeq
const invalidRows = this.multipleSelection.filter(item => String(item.bill_status) === '99')
if (invalidRows.length) {
this.$message.warning('仅支持批量下推状态为“分配”的需求单')
return
}
this.$confirm(`确认批量下推已勾选的 ${this.multipleSelection.length} 条需求单吗?`, '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
crudPurchase.outPush(this.multipleSelection[0]).then(res => {
if (res.code === 200) {
this.$message.success('下推成功')
this.crud.toQuery()
} else {
this.$message.error(res.message)
}
}).catch(() => {
this.$message.error('下推失败')
})
}).catch(() => {})
},
issueReturnBill() {
const selections = this.crud.selections
if (!selections || selections.length === 0) {