79 lines
2.0 KiB
Plaintext
79 lines
2.0 KiB
Plaintext
<template>
|
|
<!-- wms其他出库单批量选择物料 -->
|
|
<div class="app-container" style="width:100%">
|
|
<el-row>
|
|
<el-col :span="24" style="font-size:16px;margin-bottom: 10px;">
|
|
请将物料编码复制到方框中
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<el-input type="textarea" :rows="4" v-model="batchMaterials"></el-input>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row style="margin-top:20px">
|
|
<el-col :span="24">
|
|
<div style="text-align-last: center;">
|
|
<el-button type="primary" @click="submit" v-loading="loading">确 定</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
</div>
|
|
</el-col>
|
|
</el-row>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'arriveBillBatchMaterial',
|
|
props: {
|
|
layerid: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
warehouseId: {
|
|
type: Number,
|
|
default: null,
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
batchMaterials: "",
|
|
loading: false
|
|
}
|
|
},
|
|
watch: {
|
|
|
|
},
|
|
created() {
|
|
|
|
},
|
|
methods: {
|
|
//获取字符串
|
|
submit(){
|
|
var list = this.batchMaterials.split("\n");
|
|
var materialCodes = []
|
|
list.forEach(item =>{
|
|
if(item != ""){
|
|
materialCodes.push(item)
|
|
}
|
|
})
|
|
var params = {
|
|
warehouseId: this.warehouseId,
|
|
codes: materialCodes
|
|
}
|
|
//根据物料编码集合查找物料集合,再返回给父组件
|
|
this.$otheroutBill.getInvsByCodes(params).then(res=>{
|
|
this.$parent.batchSaveMaterialRet(res.data.data)
|
|
this.cancel()
|
|
})
|
|
|
|
},
|
|
//关闭弹窗
|
|
cancel(){
|
|
this.$layer.close(this.layerid)
|
|
}
|
|
|
|
}
|
|
}
|
|
</script>
|