缠膜,验重

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

@ -1,7 +1,11 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div> <div>
<el-form ref="form" :model="form" label-width="80px"> <el-form
ref="form"
:model="form"
label-width="80px"
>
<el-form-item label="入库仓库"> <el-form-item label="入库仓库">
<el-select <el-select
style="width: 500px" style="width: 500px"
@ -20,34 +24,88 @@
</el-form-item> </el-form-item>
<el-form-item label="物料信息"> <el-form-item label="物料信息">
<div v-if="chooselist.length>0"> <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> <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>
</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>
<el-form-item label="容器编码"> <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-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-button @click="reset()">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<!--物料选择--> <!--物料选择-->
<el-dialog <el-dialog
title="选择物料" title="选择物料"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="50%"> width="50%"
>
<div style="display: flex"> <div style="display: flex">
<div> <div>
<el-tree :data="classifyList" <el-tree
:props="defaultProps" :data="classifyList"
default-expand-all :props="defaultProps"
@node-click="handleNodeClick" default-expand-all
highlight-current @node-click="handleNodeClick"
highlight-current
></el-tree> ></el-tree>
</div> </div>
<div style="margin-left: 50px"> <div style="margin-left: 50px">
@ -57,27 +115,21 @@
:model="searchForm" :model="searchForm"
ref="searchForm" ref="searchForm"
> >
<el-form-item <el-form-item prop="orderNo">
prop="orderNo"
>
<el-input <el-input
v-model="searchForm.goodNo" v-model="searchForm.goodNo"
placeholder="请输入物料编码" placeholder="请输入物料编码"
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item prop="orderNo">
prop="orderNo"
>
<el-input <el-input
v-model="searchForm.goodName" v-model="searchForm.goodName"
placeholder="请输入物料名称" placeholder="请输入物料名称"
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item prop="orderNo">
prop="orderNo"
>
<el-input <el-input
v-model="searchForm.mnemonic" v-model="searchForm.mnemonic"
placeholder="请输入助记码" placeholder="请输入助记码"
@ -85,7 +137,12 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item style="margin-left: 15px"> <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-item>
</el-form> </el-form>
</div> </div>
@ -114,34 +171,38 @@
</div> </div>
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span
<!-- <el-button>已选D23.145.36.7 钢管外丝1寸D29.182.12.8 回炉料3#</el-button>--> 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 @click="cancel()"> </el-button>
<el-button type="primary" @click="choose()">确认选择</el-button> <el-button
type="primary"
@click="choose()"
>确认选择</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {dealEmptyQueryCondition, getDictLabel} from "@/utils"; import { dealEmptyQueryCondition, getDictLabel } from '@/utils'
import {getBranchList, InitInOrder} from "@/api/system/branch"; import { getBranchList, InitInOrder } from '@/api/system/branch'
import {getGoods} from "@/api/basicData/goods"; import { getGoods } from '@/api/basicData/goods'
export default { export default {
name: "index", name: 'index',
dicts: ["good_class"], dicts: ['good_class', 'is_use'],
data() { data() {
const _that=this const _that = this
return { return {
form:{}, form: {},
dialogVisible: false, dialogVisible: false,
searchForm:{ searchForm: {},
},
tableData: [], tableData: [],
tableProps:{}, tableProps: {},
config: [ config: [
// //
{ label: "复选框", type: "selection", prop: "selection", istrue: true }, { label: '复选框', type: 'selection', prop: 'selection', istrue: true },
{ {
label: '物料编号', label: '物料编号',
prop: 'goodNo', prop: 'goodNo',
@ -169,9 +230,9 @@ export default {
prop: 'classify', prop: 'classify',
istrue: true, istrue: true,
filter(row, value) { filter(row, value) {
return getDictLabel(value, _that.dict.type.good_class); return getDictLabel(value, _that.dict.type.good_class)
}, }
}, }
], ],
loading: false, loading: false,
paging: { paging: {
@ -179,28 +240,30 @@ export default {
size: 10, // size: 10, //
total: 0 total: 0
}, },
WarehousingList:[], WarehousingList: [],
handleSelect:[], handleSelect: [],
chooselist:[], chooselist: [],
classifyList:[{ classifyList: [
label: '物料分类', {
children: [] label: '物料分类',
}], children: []
}
],
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label'
}, }
}; }
}, },
mounted() { mounted() {
// //
this.getDicts("good_class").then((res)=>{ this.getDicts('good_class').then((res) => {
res.data.forEach((item) => { res.data.forEach((item) => {
let newItem = { let newItem = {
label: item.dictLabel, label: item.dictLabel,
value: item.dictValue value: item.dictValue
}; }
this.classifyList[0].children.push(newItem); this.classifyList[0].children.push(newItem)
}) })
}) })
this.getBranchList() this.getBranchList()
@ -209,14 +272,14 @@ export default {
methods: { methods: {
// //
handleNodeClick(data) { handleNodeClick(data) {
this.searchForm.classify=data.value this.searchForm.classify = data.value
this.paging.page=1 this.paging.page = 1
this.queryTable() this.queryTable()
}, },
// //
getBranchList(){ getBranchList() {
getBranchList().then((res)=>{ getBranchList().then((res) => {
this.WarehousingList=res.rows this.WarehousingList = res.rows
}) })
}, },
// //
@ -234,88 +297,90 @@ export default {
this.loading = false this.loading = false
}, },
// //
onSubmit(){ onSubmit() {
if(!this.form.warehouseNo){ if (!this.form.warehouseNo) {
this.$message.error('请选择入库仓库!') this.$message.error('请选择入库仓库!')
return; return
} }
if(this.chooselist.length==0){ if (this.chooselist.length == 0) {
this.$message.error('请选择物料!') this.$message.error('请选择物料!')
return; return
} }
if(!this.form.containerNo){ if (!this.form.containerNo) {
this.$message.error('请输入容器编码!') this.$message.error('请输入容器编码!')
return; return
} }
const obj={ const obj = {
syncType:"A", syncType: 'A',
orderType:11, orderType: 11,
orderDate:`${new Date().getFullYear()}-${String(new Date().getMonth() + 1).padStart(2, '0')}-${String(new Date().getDate()).padStart(2, '0')}`, isWrap: this.form.isWrap,
containerNo:this.form.containerNo, isVerWeight: this.form.isVerWeight,
detail:this.chooselist, 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)=>{ InitInOrder(obj).then((res) => {
if(res.code==200){ if (res.code == 200) {
this.$message.success('入库成功!') this.$message.success('入库成功!')
this.reset() this.reset()
} }
}) })
}, },
// //
reset(){ reset() {
this.form={} this.form = {}
this.chooselist=[] this.chooselist = []
}, },
// //
handleselection(row){ handleselection(row) {
this.handleSelect = row this.handleSelect = row
}, },
chooseGoods(){ chooseGoods() {
if(!this.form.warehouseNo){ if (!this.form.warehouseNo) {
this.$message.error('请选择入库仓库!') this.$message.error('请选择入库仓库!')
return; return
} }
this.dialogVisible = true this.dialogVisible = true
}, },
// //
choose(){ choose() {
this.chooselist=[] this.chooselist = []
this.handleSelect.forEach((item)=>{ this.handleSelect.forEach((item) => {
let newItem={ let newItem = {
lineId:0, lineId: 0,
goodsNo:item.goodNo, goodsNo: item.goodNo,
goodName:item.goodName, goodName: item.goodName,
unitMsr:item.specifications, unitMsr: item.specifications,
warehouseNo:this.form.warehouseNo, warehouseNo: this.form.warehouseNo
} }
this.chooselist.push(newItem) this.chooselist.push(newItem)
}) })
this.searchForm={} this.searchForm = {}
this.dialogVisible = false this.dialogVisible = false
}, },
// //
cancel(){ cancel() {
this.searchForm={} this.searchForm = {}
this.dialogVisible = false this.dialogVisible = false
}, },
// //
searchList(){ searchList() {
this.paging.page=1 this.paging.page = 1
this.queryTable() this.queryTable()
} }
}, }
}; }
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
.app-container{ .app-container {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.el-dropdown-link { .el-dropdown-link {
cursor: pointer; cursor: pointer;
color: #409EFF; color: #409eff;
} }
.el-icon-arrow-down { .el-icon-arrow-down {
font-size: 12px; font-size: 12px;

Loading…
Cancel
Save