Mr.sun 2 years ago
parent 96841c2441
commit 40839deb06
  1. 120
      src/views/warehousing/otherStore/index.vue

@ -5,7 +5,7 @@
<el-form-item label="入库仓库">
<el-select
style="width: 500px"
v-model="form.no"
v-model="form.warehouseNo"
placeholder="请选择"
clearable
>
@ -21,11 +21,11 @@
<el-form-item label="物料信息">
<div v-if="chooselist.length>0">
<div v-for="(item,index) in chooselist" :key="index" style="margin-top: 10px">
<span>{{ item.goodName+'-'+item.goodsNo+'-'+item.specifications }}</span>
<span>{{ item.goodName+'-'+item.goodsNo+'-'+item.unitMsr }}</span>
<el-input v-model="item.qty" style="width: 100px;margin-left: 50px" placeholder="入库数量"></el-input>
</div>
</div>
<el-button style="margin-top: 20px" @click="dialogVisible = true">选择物料</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>
@ -62,7 +62,7 @@
>
<el-input
v-model="searchForm.goodNo"
placeholder="请输入商品编码"
placeholder="请输入物料编码"
clearable
></el-input>
</el-form-item>
@ -71,7 +71,7 @@
>
<el-input
v-model="searchForm.goodName"
placeholder="请输入商品名称"
placeholder="请输入物料名称"
clearable
></el-input>
</el-form-item>
@ -128,7 +128,7 @@ import {getBranchList, InitInOrder} from "@/api/system/branch";
import {getGoods} from "@/api/basicData/goods";
export default {
name: "index",
dicts: ["goods_classify"],
dicts: ["good_class"],
data() {
const _that=this
return {
@ -137,27 +137,19 @@ export default {
searchForm:{
},
tableData: [
{
goodNo:1,
goodName:'shh'
},
{
goodNo:2,
goodName:'cdgf'
}],
tableData: [],
tableProps:{},
config: [
//
{ label: "复选框", type: "selection", prop: "selection", istrue: true },
{
label: '商品编号',
label: '物料编号',
prop: 'goodNo',
width: 160,
istrue: true
},
{
label: '商品名称',
label: '物料名称',
prop: 'goodName',
width: 150,
istrue: true
@ -167,17 +159,17 @@ export default {
prop: 'specifications',
istrue: true
},
{
label: '型号',
prop: '',
istrue: true
},
// {
// label: '',
// prop: '',
// istrue: true
// },
{
label: '所属分类',
prop: 'specialMana',
prop: 'classify',
istrue: true,
filter(row, value) {
return getDictLabel(value, _that.dict.type.goods_classify);
return getDictLabel(value, _that.dict.type.good_class);
},
},
],
@ -192,28 +184,7 @@ export default {
chooselist:[],
classifyList:[{
label: '物料分类',
children: [{
label: '成品',
id:110
},{
label: '铝合金锭',
id:100
},{
label: '锌合金锭',
id:101
},{
label: '模具配件',
id:111
},{
label: '配件',
id:102
},{
label: '辅料',
id:108
},{
label: '模具',
id:101
}]
children: []
}],
defaultProps: {
children: 'children',
@ -222,13 +193,23 @@ export default {
};
},
mounted() {
//
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.getBranchList()
this.queryTable()
},
methods: {
//
//
handleNodeClick(data) {
this.searchForm.chiff=data.id
this.searchForm.classify=data.value
this.paging.page=1
this.queryTable()
},
@ -238,7 +219,7 @@ export default {
this.WarehousingList=res.rows
})
},
//
//
async queryTable() {
this.loading = true
const request = {
@ -254,19 +235,30 @@ export default {
},
//
onSubmit(){
if(!this.form.no){
if(!this.form.warehouseNo){
this.$message.error('请选择入库仓库!')
return;
}
if(this.chooselist.length==0){
this.$message.error('请选择物料!')
return;
}
if(!this.form.containerNo){
this.$message.error('请输入容器编码!')
return;
}
const obj={
no:this.form.no,
syncType:"A",
orderType:11,
orderDate:'2024-05-30',
containerNo:this.form.containerNo,
detail:this.chooselist
detail:this.chooselist,
}
// console.log('',obj)
InitInOrder(obj).then((res)=>{
console.log(res)
if(res.code==200){
this.$message.success('入库成功!')
this.reset()
}
})
},
//
@ -274,15 +266,18 @@ export default {
this.form={}
this.chooselist=[]
},
//
handleCommand(command) {
this.$message('click on item ' + command);
},
//
handleselection(row){
this.handleSelect = row
},
//
chooseGoods(){
if(!this.form.warehouseNo){
this.$message.error('请选择入库仓库!')
return;
}
this.dialogVisible = true
},
//
choose(){
this.chooselist=[]
this.handleSelect.forEach((item)=>{
@ -290,9 +285,8 @@ export default {
lineId:0,
goodsNo:item.goodNo,
goodName:item.goodName,
specifications:item.specifications,
unitMsr:'kg',
warehouseNo:102
unitMsr:item.specifications,
warehouseNo:this.form.warehouseNo,
}
this.chooselist.push(newItem)
})
@ -304,7 +298,7 @@ export default {
this.searchForm={}
this.dialogVisible = false
},
//
//
searchList(){
this.paging.page=1
this.queryTable()

Loading…
Cancel
Save