Commit 5c94a8ef authored by xioln's avatar xioln

移库入库批量移库

parent 96934f31
......@@ -88,7 +88,6 @@ export default {
}
},
computed: {},
watch: {
form: {
immediate: true,
......@@ -111,13 +110,17 @@ export default {
immediate: true,
deep: true,
handler(v) {
if (v) {
if (v !== this.selVal) {
this.selVal = this.value
}
}
}
},
created() {
this.$bus.$on('InStorageMoveform-InStorageMoveTable', (data) => {
this.selVal = null
this.options = []
})
},
methods: {
changeVal() {
......@@ -142,6 +145,12 @@ export default {
},
// 远程搜索物料类别
remoteMethod(query) {
if (sessionStorage.getItem('InStorageMoveform-InStorageMoveTable')) {
this.linkageValue = sessionStorage.getItem('InStorageMoveform-InStorageMoveTable')
}
if (!this.linkageValue) {
this.$utils.showMessageWarning(`请先选择库房!`)
}
this.querys = query// 保存搜索内容
const querys = {
pageFrom: 1,
......
/**
* @Description: 批量移库表
* @author xioln
* @date 2023-11-07
* @FilePath: applications/dee-mes/src/privateComponents/components/MoveLibraryList/index.vue
*/
<template>
<div class="moveLibrary-list">
<dee-as-com
ref="inStorageMoveform"
style="height: 10vh !important;"
:basic-data="basicData"
:lay-config="{ typeName: 'InStorageMove', layKey: 'moveLibraryForm' }"
/>
<dee-as-com
ref="inStorageMoveTable"
style="height: 70vh !important;"
:dis-business="true"
:result-data="basicData.inventory"
:lay-config="{ typeName: 'InStorageMove', layKey: 'moveLibrary' }"
/>
<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: 'MoveLibraryList', // name写在组件的最前方,自定义组件为必填
componentName: '批量移库表',
components: {},
props: {
basicData: {
type: Object,
default: () => {}
}
},
data() {
return {
currForm: {}
}
},
computed: {},
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,
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', params)
this.$utils.showMessageSuccess(reponse.items)
this.$emit('cancel')
},
cancelEvent() {
this.$emit('cancel')
}
}
}
</script>
<style lang='scss'>
.moveLibrary-list{
.foot-btn-box {
display: flex;
margin-top: 10px;
justify-content: center;
align-content: center;
}
}
</style>
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