Commit 8c2fb2d2 authored by jingnan's avatar jingnan 👀

移库管理界面修改

parent facf079f
/**
* @Description: 批量调整库房
* @author xioln
* @date 2023-11-07
* @FilePath: applications/dee-mes/src/privateComponents/components/MoveLibraryList/index.vue
*/
<template>
<div class="moveProductWorkCenter">
<dee-as-com
ref="inStorageMoveform"
style="height: 10vh !important;"
:basic-data="basicData"
:lay-config="{ typeName: 'InStorageMove', layKey: 'moveProductWorkCenterForm' }"
/>
<dee-as-com
ref="inStorageMoveTable"
style="height: 70vh !important;"
:dis-business="true"
:result-data="resultData"
:lay-config="{ typeName: 'InStorageMove', layKey: 'moveProductWorkCenter' }"
/>
<div slot="footer" class="foot-btn-box">
<el-button type="primary" @click="submitEvent">确认</el-button>
<el-button @click="cancelEvent">取消</el-button>
</div>
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
name: 'MoveProductWorkCenter', // name写在组件的最前方,自定义组件为必填
components: {},
props: {
basicData: {
type: Object,
default: () => {}
}
},
data() {
return {
currForm: {}
}
},
computed: {
resultData() {
return this.basicData.inventory.map(item => {
item.inWorkCenter = 'N'
return item
}
)
}
},
watch: {
},
mounted() {
},
methods: {
async submitEvent() {
if (!this.$refs.inStorageMoveform.$refs.asCom.form.extWorkCenterId) {
return this.$utils.showMessageWarning(`请输入必填项!`)
}
const extWorkCenterId = this.$refs.inStorageMoveform.$refs.asCom.form.extWorkCenterId
const params = this.basicData.inventory.map(item => {
return {
inventoryId: item.id,
extWorkCenterId: extWorkCenterId,
// extWorkUnitId: item.currExtWorkUnitId && item.currExtWorkUnitId.split('/') && Number(item.currExtWorkUnitId.split('/')[0]),
outsideAmount: item.currOutsideAmount,
disposeDes: item.currDisposeDes || ''
}
})
if (params.find(item => !item.extWorkCenterId || !item.outsideAmount)) {
return this.$utils.showMessageWarning(`请输入必填项!`)
}
const reponse = await post('InventoryRequest/moveApplication/createMoveStorage?inWorkCenter=N', params)
this.$utils.showMessageSuccess(reponse.items)
this.$bus.$emit('refreshMoveWarehouse')
this.$emit('cancel')
},
cancelEvent() {
this.$emit('cancel')
}
}
}
</script>
<style lang='scss'>
.moveProductWorkCenter{
.foot-btn-box {
display: flex;
margin-top: 10px;
justify-content: center;
align-content: center;
}
}
</style>
/**
* @Description: 批量移库表
* @Description: 批量调整库位
* @author xioln
* @date 2023-11-07
* @FilePath: applications/dee-mes/src/privateComponents/components/MoveLibraryList/index.vue
*/
<template>
<div class="moveLibrary-list">
<div class="moveProductWorkUnit">
<dee-as-com
ref="inStorageMoveform"
style="height: 10vh !important;"
:basic-data="basicData"
:lay-config="{ typeName: 'InStorageMove', layKey: 'moveLibraryForm' }"
:lay-config="{ typeName: 'InStorageMove', layKey: 'moveProductWorkUnitForm' }"
/>
<dee-as-com
ref="inStorageMoveTable"
style="height: 70vh !important;"
:dis-business="true"
:result-data="basicData.inventory"
:lay-config="{ typeName: 'InStorageMove', layKey: 'moveLibrary' }"
:result-data="resultData"
:lay-config="{ typeName: 'InStorageMove', layKey: 'moveProductWorkUnit' }"
/>
<div slot="footer" class="foot-btn-box">
<el-button type="primary" @click="submitEvent">确认</el-button>
......@@ -29,8 +29,7 @@
import { post } from '@/utils/http'
export default {
name: 'MoveLibraryList', // name写在组件的最前方,自定义组件为必填
componentName: '批量移库表',
name: 'MoveProductWorkUnit', // name写在组件的最前方,自定义组件为必填
components: {},
props: {
basicData: {
......@@ -43,7 +42,15 @@ export default {
currForm: {}
}
},
computed: {},
computed: {
resultData() {
return this.basicData.inventory.map(item => {
item.inWorkCenter = 'Y'
return item
}
)
}
},
watch: {
},
mounted() {
......@@ -67,7 +74,7 @@ export default {
if (params.find(item => !item.extWorkCenterId || !item.outsideAmount)) {
return this.$utils.showMessageWarning(`请输入必填项!`)
}
const reponse = await post('InventoryRequest/moveApplication/createMoveStorage', params)
const reponse = await post('InventoryRequest/moveApplication/createMoveStorage?inWorkCenter=Y', params)
this.$utils.showMessageSuccess(reponse.items)
this.$bus.$emit('refreshMoveWarehouse')
this.$emit('cancel')
......@@ -79,7 +86,7 @@ export default {
}
</script>
<style lang='scss'>
.moveLibrary-list{
.moveProductWorkUnit{
.foot-btn-box {
display: flex;
margin-top: 10px;
......
......@@ -253,7 +253,8 @@ export default {
this.print()
},
printMoveLibraryLabel(selection) {
if (selection.find(item => (!item.currExtWorkUnitId))) return this.$utils.showMessageWarning('请选择库位后打印!')
// 批量调整库房(inWorkCenter===N) 批量调整库位(inWorkCenter===Y)
if (selection.find(item => (!item.currExtWorkUnitId && item.inWorkCenter === 'Y' || !item.workunit && item.inWorkCenter === 'N'))) return this.$utils.showMessageWarning('请选择库位后打印!')
// 获取需要打印的数据
this.config.prints = []
selection.forEach((item) => {
......@@ -281,7 +282,7 @@ export default {
item.qualityPeriod &&
item.qualityPeriod.replace(' 00:00:00', '')
},
{ label: '库位号', value: item.currExtWorkUnitId && item.currExtWorkUnitId.split('/') && item.currExtWorkUnitId.split('/')[1] || '' },
{ label: '库位号', value: item.currExtWorkUnitId && item.currExtWorkUnitId.split('/') && item.currExtWorkUnitId.split('/')[1] || item.workunit || '' },
{ label: '备注', value: item.remark || '' }
]
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment