缠膜,验重

master
Mr.sun 2 years ago
parent 2877b50df6
commit 6bc56e5235
  1. 247
      src/views/warehousing/otherStore/index.vue

@ -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">
<!-- <el-button>已选D23.145.36.7 钢管外丝1寸D29.182.12.8 回炉料3#</el-button>-->
<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
const _that = this
return {
form:{},
form: {},
dialogVisible: false,
searchForm:{
},
searchForm: {},
tableData: [],
tableProps:{},
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: {
@ -179,28 +240,30 @@ export default {
size: 10, //
total: 0
},
WarehousingList:[],
handleSelect:[],
chooselist:[],
classifyList:[{
WarehousingList: [],
handleSelect: [],
chooselist: [],
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()
@ -209,14 +272,14 @@ export default {
methods: {
//
handleNodeClick(data) {
this.searchForm.classify=data.value
this.paging.page=1
this.searchForm.classify = data.value
this.paging.page = 1
this.queryTable()
},
//
getBranchList(){
getBranchList().then((res)=>{
this.WarehousingList=res.rows
getBranchList() {
getBranchList().then((res) => {
this.WarehousingList = res.rows
})
},
//
@ -234,88 +297,90 @@ export default {
this.loading = false
},
//
onSubmit(){
if(!this.form.warehouseNo){
onSubmit() {
if (!this.form.warehouseNo) {
this.$message.error('请选择入库仓库!')
return;
return
}
if(this.chooselist.length==0){
if (this.chooselist.length == 0) {
this.$message.error('请选择物料!')
return;
return
}
if(!this.form.containerNo){
if (!this.form.containerNo) {
this.$message.error('请输入容器编码!')
return;
return
}
const obj={
syncType:"A",
orderType:11,
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,
const obj = {
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
}
InitInOrder(obj).then((res)=>{
if(res.code==200){
InitInOrder(obj).then((res) => {
if (res.code == 200) {
this.$message.success('入库成功!')
this.reset()
}
})
},
//
reset(){
this.form={}
this.chooselist=[]
reset() {
this.form = {}
this.chooselist = []
},
//
handleselection(row){
handleselection(row) {
this.handleSelect = row
},
chooseGoods(){
if(!this.form.warehouseNo){
chooseGoods() {
if (!this.form.warehouseNo) {
this.$message.error('请选择入库仓库!')
return;
return
}
this.dialogVisible = true
},
//
choose(){
this.chooselist=[]
this.handleSelect.forEach((item)=>{
let newItem={
lineId:0,
goodsNo:item.goodNo,
goodName:item.goodName,
unitMsr:item.specifications,
warehouseNo:this.form.warehouseNo,
choose() {
this.chooselist = []
this.handleSelect.forEach((item) => {
let newItem = {
lineId: 0,
goodsNo: item.goodNo,
goodName: item.goodName,
unitMsr: item.specifications,
warehouseNo: this.form.warehouseNo
}
this.chooselist.push(newItem)
})
this.searchForm={}
this.searchForm = {}
this.dialogVisible = false
},
//
cancel(){
this.searchForm={}
cancel() {
this.searchForm = {}
this.dialogVisible = false
},
//
searchList(){
this.paging.page=1
searchList() {
this.paging.page = 1
this.queryTable()
}
},
};
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.app-container{
.app-container {
display: flex;
justify-content: center;
align-items: center;
}
.el-dropdown-link {
cursor: pointer;
color: #409EFF;
color: #409eff;
}
.el-icon-arrow-down {
font-size: 12px;

Loading…
Cancel
Save