add:中鼎回传业务处理

This commit is contained in:
zhangzq
2026-10-26 18:01:37 +08:00
parent 1ff93f38f8
commit 8cb10a6d3c
23 changed files with 519 additions and 55 deletions

View File

@@ -48,7 +48,8 @@
icon="el-icon-s-promotion"
size="mini"
:loading="pushZdLoading"
:disabled="crud.selections.length === 0"
:disabled="isPushZdDisabled()"
title="仅存储地点为R001且已创建的单据可下推中鼎WMS"
@click="pushZd"
>下推中鼎WMS</el-button>
<el-button
@@ -83,6 +84,7 @@
<el-table-column prop="mjahr" label="年份" width="80" />
<el-table-column prop="billtypeName" label="业务类型" width="120" />
<el-table-column prop="lifnr" label="供应商" min-width="110" show-overflow-tooltip />
<el-table-column prop="lgort" label="存储地点" width="90" align="center" />
<el-table-column prop="bldat" label="凭证日期" width="110" />
<el-table-column prop="budat" label="过账日期" width="110" />
<el-table-column prop="statusName" label="状态" width="90">
@@ -174,6 +176,16 @@ export default {
canEdit(row) {
return row.status === 'CREATED' || row.status === 'CANCELED'
},
isR001(row) {
return !!row && String(row.lgort || '').trim() === 'R001'
},
isPushZdDisabled() {
const selections = (this.crud && this.crud.selections) || []
if (!selections.length) {
return true
}
return selections.some(item => item.status !== 'CREATED' || !this.isR001(item))
},
statusTagType(status) {
const map = { CREATED: 'warning', POSTED: 'primary', COMPLETED: 'success', CANCELED: 'info' }
return map[status] || ''
@@ -225,6 +237,11 @@ export default {
this.crud.notify('仅已创建状态的单据可下推中鼎WMS', CRUD.NOTIFICATION_TYPE.WARNING)
return
}
const notR001 = selections.filter(item => !this.isR001(item))
if (notR001.length) {
this.crud.notify('仅存储地点为R001的单据可下推中鼎WMS', CRUD.NOTIFICATION_TYPE.WARNING)
return
}
const nos = selections.map(item => item.mblnr).join('、')
const title = (this.crud && this.crud.title) || '单据'
this.$confirm('确认将以下 ' + selections.length + ' 张' + title + '下推中鼎WMS?\n' + nos, '下推中鼎WMS', {

View File

@@ -36,6 +36,7 @@
icon="el-icon-s-promotion"
size="mini"
:disabled="isPushDisabled()"
title="存储地点不为R001且已创建的单据可下推出库"
@click="handlePush"
>下推出库</el-button>
<el-button
@@ -46,7 +47,8 @@
icon="el-icon-s-promotion"
size="mini"
:loading="pushZdLoading"
:disabled="crud.selections.length === 0"
:disabled="isPushZdDisabled()"
title="仅存储地点为R001且已创建的单据可下推中鼎WMS"
@click="pushZd"
>下推中鼎WMS</el-button>
</crudOperation>
@@ -72,6 +74,7 @@
<el-table-column prop="mjahr" label="年份" width="80" />
<el-table-column prop="billtypeName" label="业务类型" width="130" />
<el-table-column prop="lifnr" label="供应商" min-width="110" show-overflow-tooltip />
<el-table-column prop="lgort" label="存储地点" width="90" align="center" />
<el-table-column prop="bldat" label="凭证日期" width="110" />
<el-table-column prop="budat" label="过账日期" width="110" />
<el-table-column prop="statusName" label="状态" width="90">
@@ -152,6 +155,9 @@ export default {
canEdit(row) {
return row.status === 'CREATED' || row.status === 'CANCELED'
},
isR001(row) {
return !!row && String(row.lgort || '').trim() === 'R001'
},
statusTagType(status) {
const map = { CREATED: 'warning', POSTED: 'primary', COMPLETED: 'success', CANCELED: 'info' }
return map[status] || ''
@@ -164,18 +170,30 @@ export default {
if (this.multipleSelection.length !== 1) {
return true
}
return this.multipleSelection[0].status !== 'CREATED'
const row = this.multipleSelection[0]
return row.status !== 'CREATED' || this.isR001(row)
},
isPushZdDisabled() {
const selections = (this.crud && this.crud.selections) || []
if (!selections.length) {
return true
}
return selections.some(item => item.status !== 'CREATED' || !this.isR001(item))
},
toView(row) {
this.mstrow = row
this.viewShow = true
},
handlePush() {
if (this.isPushDisabled()) {
if (this.multipleSelection.length !== 1 || this.multipleSelection[0].status !== 'CREATED') {
this.$message.warning('请勾选一张已创建状态的出库凭证')
return
}
const row = this.multipleSelection[0]
if (this.isR001(row)) {
this.$message.warning('存储地点为R001的单据不能下推出库,请下推中鼎WMS')
return
}
this.$confirm('确认下推物料凭证 ' + row.mblnr + ' 生成出库单?', '下推出库', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -198,6 +216,11 @@ export default {
this.crud.notify('仅已创建状态的单据可下推中鼎WMS', CRUD.NOTIFICATION_TYPE.WARNING)
return
}
const notR001 = selections.filter(item => !this.isR001(item))
if (notR001.length) {
this.crud.notify('仅存储地点为R001的单据可下推中鼎WMS', CRUD.NOTIFICATION_TYPE.WARNING)
return
}
const nos = selections.map(item => item.mblnr).join('、')
const title = (this.crud && this.crud.title) || '单据'
this.$confirm('确认将以下 ' + selections.length + ' 张' + title + '下推中鼎WMS?\n' + nos, '下推中鼎WMS', {

View File

@@ -63,6 +63,7 @@
</template>
</el-table-column>
<el-table-column prop="lifnr" label="供应商" min-width="120" show-overflow-tooltip />
<el-table-column prop="lgort" label="存储地点" width="90" align="center" />
<el-table-column prop="lfart" label="交货类型" width="90" align="center" />
<el-table-column prop="billtype" label="单据类型" min-width="140" show-overflow-tooltip>
<template slot-scope="scope">

View File

@@ -63,6 +63,7 @@
</template>
</el-table-column>
<el-table-column prop="lifnr" label="供应商" min-width="120" show-overflow-tooltip />
<el-table-column prop="lgort" label="存储地点" width="90" align="center" />
<el-table-column prop="lfart" label="交货类型" width="90" align="center" />
<el-table-column prop="billtype" label="单据类型" min-width="140" show-overflow-tooltip>
<template slot-scope="scope">

View File

@@ -235,6 +235,7 @@
</template>
</el-table-column>
<el-table-column prop="lifnr" label="供应商" min-width="120" show-overflow-tooltip />
<el-table-column prop="lgort" label="存储地点" width="90" align="center" />
<el-table-column prop="lfart" label="交货类型" width="90" align="center" />
<el-table-column prop="billtype" label="单据类型" min-width="140" show-overflow-tooltip>
<template slot-scope="scope">

View File

@@ -160,6 +160,7 @@
</template>
</el-table-column>
<el-table-column prop="lifnr" label="供应商" min-width="110" show-overflow-tooltip />
<el-table-column prop="lgort" label="存储地点" width="90" align="center" />
<el-table-column prop="bsart" label="凭证类型" width="100" />
<el-table-column prop="bedat" label="凭证日期" width="110" />
<el-table-column prop="ekorg" label="采购组织" width="100" />