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 * @author xioln
* @date 2023-11-07 * @date 2023-11-07
* @FilePath: applications/dee-mes/src/privateComponents/components/MoveLibraryList/index.vue * @FilePath: applications/dee-mes/src/privateComponents/components/MoveLibraryList/index.vue
*/ */
<template> <template>
<div class="moveLibrary-list"> <div class="moveProductWorkUnit">
<dee-as-com <dee-as-com
ref="inStorageMoveform" ref="inStorageMoveform"
style="height: 10vh !important;" style="height: 10vh !important;"
:basic-data="basicData" :basic-data="basicData"
:lay-config="{ typeName: 'InStorageMove', layKey: 'moveLibraryForm' }" :lay-config="{ typeName: 'InStorageMove', layKey: 'moveProductWorkUnitForm' }"
/> />
<dee-as-com <dee-as-com
ref="inStorageMoveTable" ref="inStorageMoveTable"
style="height: 70vh !important;" style="height: 70vh !important;"
:dis-business="true" :dis-business="true"
:result-data="basicData.inventory" :result-data="resultData"
:lay-config="{ typeName: 'InStorageMove', layKey: 'moveLibrary' }" :lay-config="{ typeName: 'InStorageMove', layKey: 'moveProductWorkUnit' }"
/> />
<div slot="footer" class="foot-btn-box"> <div slot="footer" class="foot-btn-box">
<el-button type="primary" @click="submitEvent">确认</el-button> <el-button type="primary" @click="submitEvent">确认</el-button>
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
import { post } from '@/utils/http' import { post } from '@/utils/http'
export default { export default {
name: 'MoveLibraryList', // name写在组件的最前方,自定义组件为必填 name: 'MoveProductWorkUnit', // name写在组件的最前方,自定义组件为必填
componentName: '批量移库表',
components: {}, components: {},
props: { props: {
basicData: { basicData: {
...@@ -43,7 +42,15 @@ export default { ...@@ -43,7 +42,15 @@ export default {
currForm: {} currForm: {}
} }
}, },
computed: {}, computed: {
resultData() {
return this.basicData.inventory.map(item => {
item.inWorkCenter = 'Y'
return item
}
)
}
},
watch: { watch: {
}, },
mounted() { mounted() {
...@@ -67,7 +74,7 @@ export default { ...@@ -67,7 +74,7 @@ export default {
if (params.find(item => !item.extWorkCenterId || !item.outsideAmount)) { if (params.find(item => !item.extWorkCenterId || !item.outsideAmount)) {
return this.$utils.showMessageWarning(`请输入必填项!`) 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.$utils.showMessageSuccess(reponse.items)
this.$bus.$emit('refreshMoveWarehouse') this.$bus.$emit('refreshMoveWarehouse')
this.$emit('cancel') this.$emit('cancel')
...@@ -79,7 +86,7 @@ export default { ...@@ -79,7 +86,7 @@ export default {
} }
</script> </script>
<style lang='scss'> <style lang='scss'>
.moveLibrary-list{ .moveProductWorkUnit{
.foot-btn-box { .foot-btn-box {
display: flex; display: flex;
margin-top: 10px; margin-top: 10px;
......
...@@ -253,7 +253,8 @@ export default { ...@@ -253,7 +253,8 @@ export default {
this.print() this.print()
}, },
printMoveLibraryLabel(selection) { 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 = [] this.config.prints = []
selection.forEach((item) => { selection.forEach((item) => {
...@@ -281,7 +282,7 @@ export default { ...@@ -281,7 +282,7 @@ export default {
item.qualityPeriod && item.qualityPeriod &&
item.qualityPeriod.replace(' 00:00:00', '') 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 || '' } { 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