|
|
|
|
@ -1,7 +1,11 @@ |
|
|
|
|
<template> |
|
|
|
|
<div class="app-container"> |
|
|
|
|
<div> |
|
|
|
|
<el-form ref="form" :model="form" label-width="80px"> |
|
|
|
|
<el-form |
|
|
|
|
ref="form" |
|
|
|
|
:model="form" |
|
|
|
|
label-width="80px" |
|
|
|
|
> |
|
|
|
|
<el-form-item label="入库仓库"> |
|
|
|
|
<el-select |
|
|
|
|
style="width: 500px" |
|
|
|
|
@ -20,30 +24,84 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="物料信息"> |
|
|
|
|
<div v-if="chooselist.length>0"> |
|
|
|
|
<div v-for="(item,index) in chooselist" :key="index" style="margin-top: 10px"> |
|
|
|
|
<div |
|
|
|
|
v-for="(item,index) in chooselist" |
|
|
|
|
:key="index" |
|
|
|
|
style="margin-top: 10px" |
|
|
|
|
> |
|
|
|
|
<span>{{ item.goodName+'-'+item.goodsNo+'-'+item.unitMsr }}</span> |
|
|
|
|
<el-input v-model="item.qty" style="width: 100px;margin-left: 50px" placeholder="入库数量"></el-input> |
|
|
|
|
<el-input |
|
|
|
|
v-model="item.qty" |
|
|
|
|
style="width: 100px;margin-left: 50px" |
|
|
|
|
placeholder="入库数量" |
|
|
|
|
></el-input> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<el-button style="margin-top: 20px" @click="chooseGoods()">选择物料</el-button> |
|
|
|
|
<el-button |
|
|
|
|
style="margin-top: 20px" |
|
|
|
|
@click="chooseGoods()" |
|
|
|
|
>选择物料</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="容器编码"> |
|
|
|
|
<el-input style="width: 500px" v-model="form.containerNo" placeholder="请扫描或录入容器编码"></el-input> |
|
|
|
|
<el-input |
|
|
|
|
style="width: 500px" |
|
|
|
|
v-model="form.containerNo" |
|
|
|
|
placeholder="请扫描或录入容器编码" |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="是否缠膜"> |
|
|
|
|
<el-select |
|
|
|
|
style="width: 500px" |
|
|
|
|
v-model="form.isWrap" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
clearable |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in dict.type.is_use" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="是否验重"> |
|
|
|
|
<el-select |
|
|
|
|
style="width: 500px" |
|
|
|
|
v-model="form.isVerWeight" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
clearable |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in dict.type.is_use" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button type="primary" @click="onSubmit">确认入库</el-button> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
@click="onSubmit" |
|
|
|
|
>确认入库</el-button> |
|
|
|
|
<el-button @click="reset()">重置</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
<!--物料选择--> |
|
|
|
|
<el-dialog |
|
|
|
|
title="选择物料" |
|
|
|
|
:visible.sync="dialogVisible" |
|
|
|
|
width="50%"> |
|
|
|
|
width="50%" |
|
|
|
|
> |
|
|
|
|
<div style="display: flex"> |
|
|
|
|
<div> |
|
|
|
|
<el-tree :data="classifyList" |
|
|
|
|
<el-tree |
|
|
|
|
:data="classifyList" |
|
|
|
|
:props="defaultProps" |
|
|
|
|
default-expand-all |
|
|
|
|
@node-click="handleNodeClick" |
|
|
|
|
@ -57,27 +115,21 @@ |
|
|
|
|
:model="searchForm" |
|
|
|
|
ref="searchForm" |
|
|
|
|
> |
|
|
|
|
<el-form-item |
|
|
|
|
prop="orderNo" |
|
|
|
|
> |
|
|
|
|
<el-form-item prop="orderNo"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="searchForm.goodNo" |
|
|
|
|
placeholder="请输入物料编码" |
|
|
|
|
clearable |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item |
|
|
|
|
prop="orderNo" |
|
|
|
|
> |
|
|
|
|
<el-form-item prop="orderNo"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="searchForm.goodName" |
|
|
|
|
placeholder="请输入物料名称" |
|
|
|
|
clearable |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item |
|
|
|
|
prop="orderNo" |
|
|
|
|
> |
|
|
|
|
<el-form-item prop="orderNo"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="searchForm.mnemonic" |
|
|
|
|
placeholder="请输入助记码" |
|
|
|
|
@ -85,7 +137,12 @@ |
|
|
|
|
></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item style="margin-left: 15px"> |
|
|
|
|
<el-button style="margin-left: 10px" size="small" type="primary" @click="searchList()">搜索</el-button> |
|
|
|
|
<el-button |
|
|
|
|
style="margin-left: 10px" |
|
|
|
|
size="small" |
|
|
|
|
type="primary" |
|
|
|
|
@click="searchList()" |
|
|
|
|
>搜索</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
@ -114,34 +171,38 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<span |
|
|
|
|
slot="footer" |
|
|
|
|
class="dialog-footer" |
|
|
|
|
> |
|
|
|
|
<!-- <el-button>已选:D23.145.36.7 钢管外丝1寸;D29.182.12.8 回炉料3#</el-button>--> |
|
|
|
|
<el-button @click="cancel()">取 消</el-button> |
|
|
|
|
<el-button type="primary" @click="choose()">确认选择</el-button> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
@click="choose()" |
|
|
|
|
>确认选择</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import {dealEmptyQueryCondition, getDictLabel} from "@/utils"; |
|
|
|
|
import {getBranchList, InitInOrder} from "@/api/system/branch"; |
|
|
|
|
import {getGoods} from "@/api/basicData/goods"; |
|
|
|
|
import { dealEmptyQueryCondition, getDictLabel } from '@/utils' |
|
|
|
|
import { getBranchList, InitInOrder } from '@/api/system/branch' |
|
|
|
|
import { getGoods } from '@/api/basicData/goods' |
|
|
|
|
export default { |
|
|
|
|
name: "index", |
|
|
|
|
dicts: ["good_class"], |
|
|
|
|
name: 'index', |
|
|
|
|
dicts: ['good_class', 'is_use'], |
|
|
|
|
data() { |
|
|
|
|
const _that = this |
|
|
|
|
return { |
|
|
|
|
form: {}, |
|
|
|
|
dialogVisible: false, |
|
|
|
|
searchForm:{ |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
searchForm: {}, |
|
|
|
|
tableData: [], |
|
|
|
|
tableProps: {}, |
|
|
|
|
config: [ |
|
|
|
|
// 表头数据 |
|
|
|
|
{ label: "复选框", type: "selection", prop: "selection", istrue: true }, |
|
|
|
|
{ label: '复选框', type: 'selection', prop: 'selection', istrue: true }, |
|
|
|
|
{ |
|
|
|
|
label: '物料编号', |
|
|
|
|
prop: 'goodNo', |
|
|
|
|
@ -169,9 +230,9 @@ export default { |
|
|
|
|
prop: 'classify', |
|
|
|
|
istrue: true, |
|
|
|
|
filter(row, value) { |
|
|
|
|
return getDictLabel(value, _that.dict.type.good_class); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
return getDictLabel(value, _that.dict.type.good_class) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
loading: false, |
|
|
|
|
paging: { |
|
|
|
|
@ -182,25 +243,27 @@ export default { |
|
|
|
|
WarehousingList: [], |
|
|
|
|
handleSelect: [], |
|
|
|
|
chooselist: [], |
|
|
|
|
classifyList:[{ |
|
|
|
|
classifyList: [ |
|
|
|
|
{ |
|
|
|
|
label: '物料分类', |
|
|
|
|
children: [] |
|
|
|
|
}], |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
defaultProps: { |
|
|
|
|
children: 'children', |
|
|
|
|
label: 'label' |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
// 物料分类的树结构 |
|
|
|
|
this.getDicts("good_class").then((res)=>{ |
|
|
|
|
this.getDicts('good_class').then((res) => { |
|
|
|
|
res.data.forEach((item) => { |
|
|
|
|
let newItem = { |
|
|
|
|
label: item.dictLabel, |
|
|
|
|
value: item.dictValue |
|
|
|
|
}; |
|
|
|
|
this.classifyList[0].children.push(newItem); |
|
|
|
|
} |
|
|
|
|
this.classifyList[0].children.push(newItem) |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
this.getBranchList() |
|
|
|
|
@ -237,22 +300,24 @@ export default { |
|
|
|
|
onSubmit() { |
|
|
|
|
if (!this.form.warehouseNo) { |
|
|
|
|
this.$message.error('请选择入库仓库!') |
|
|
|
|
return; |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (this.chooselist.length == 0) { |
|
|
|
|
this.$message.error('请选择物料!') |
|
|
|
|
return; |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (!this.form.containerNo) { |
|
|
|
|
this.$message.error('请输入容器编码!') |
|
|
|
|
return; |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
const obj = { |
|
|
|
|
syncType:"A", |
|
|
|
|
syncType: 'A', |
|
|
|
|
orderType: 11, |
|
|
|
|
isWrap: this.form.isWrap, |
|
|
|
|
isVerWeight: this.form.isVerWeight, |
|
|
|
|
orderDate: `${new Date().getFullYear()}-${String(new Date().getMonth() + 1).padStart(2, '0')}-${String(new Date().getDate()).padStart(2, '0')}`, |
|
|
|
|
containerNo: this.form.containerNo, |
|
|
|
|
detail:this.chooselist, |
|
|
|
|
detail: this.chooselist |
|
|
|
|
} |
|
|
|
|
InitInOrder(obj).then((res) => { |
|
|
|
|
if (res.code == 200) { |
|
|
|
|
@ -273,7 +338,7 @@ export default { |
|
|
|
|
chooseGoods() { |
|
|
|
|
if (!this.form.warehouseNo) { |
|
|
|
|
this.$message.error('请选择入库仓库!') |
|
|
|
|
return; |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
this.dialogVisible = true |
|
|
|
|
}, |
|
|
|
|
@ -286,7 +351,7 @@ export default { |
|
|
|
|
goodsNo: item.goodNo, |
|
|
|
|
goodName: item.goodName, |
|
|
|
|
unitMsr: item.specifications, |
|
|
|
|
warehouseNo:this.form.warehouseNo, |
|
|
|
|
warehouseNo: this.form.warehouseNo |
|
|
|
|
} |
|
|
|
|
this.chooselist.push(newItem) |
|
|
|
|
}) |
|
|
|
|
@ -303,8 +368,8 @@ export default { |
|
|
|
|
this.paging.page = 1 |
|
|
|
|
this.queryTable() |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped> |
|
|
|
|
@ -315,7 +380,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
.el-dropdown-link { |
|
|
|
|
cursor: pointer; |
|
|
|
|
color: #409EFF; |
|
|
|
|
color: #409eff; |
|
|
|
|
} |
|
|
|
|
.el-icon-arrow-down { |
|
|
|
|
font-size: 12px; |
|
|
|
|
|