半成品盘点
This commit is contained in:
@@ -26,7 +26,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
title () {
|
||||
let res = ['半成品入库', '半成品入库查询', '半成品出库', '半成品出库查询', '半成品盘点', '半成品盘点查询', '半成品拼盘查询', '物料查询', '物料查询'][Number(this.$route.meta.guidePath) - 1]
|
||||
let res = ['半成品入库', '半成品入库查询', '半成品出库', '半成品出库查询', '半成品盘点', '半成品盘点查询', '半成品拼盘查询', '物料查询', '物料查询', '货位物料查询'][Number(this.$route.meta.guidePath) - 1]
|
||||
return res
|
||||
},
|
||||
...mapGetters(['keepAlive'])
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item_2 flexend">
|
||||
<button class="button button--primary">添加盘点物料</button>
|
||||
<button class="button button--primary" @click="searchMater">添加盘点物料</button>
|
||||
<button class="button button--primary">删除一行</button>
|
||||
<button class="button button--primary">生产盘点单</button>
|
||||
<button class="button button--primary">盘点作业</button>
|
||||
@@ -71,16 +71,16 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in [1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7]" :key="i">
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<td>序号</td>
|
||||
<tr v-for="(e, i) in dataList" :key="e.struct_name" :class="{'selected_icon': pkId === e.struct_name}" @click="toRadio(e)">
|
||||
<td>{{ i + 1 }}</td>
|
||||
<td>{{ e.sect_name }}</td>
|
||||
<td>{{e.struct_name}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.canuse_qty | numeric(3)}}</td>
|
||||
<td>{{ e.unit_weight | numeric(3) }}</td>
|
||||
<td>{{ e.base_qty | numeric(3) }}</td>
|
||||
<td>{{ e.storagevehicle_code }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -89,8 +89,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {accMul, accDiv} from '@config/utils.js'
|
||||
import {checkGetBcpStor} from '@config/getData2.js'
|
||||
export default {
|
||||
name: 'semifinishedcheck',
|
||||
data () {
|
||||
return {
|
||||
options1: [],
|
||||
@@ -101,11 +103,31 @@ export default {
|
||||
value3: ''
|
||||
}
|
||||
},
|
||||
beforeRouteLeave (to, from, next) {
|
||||
if (to.path === '/home' || to.path === '/login') {
|
||||
this.$store.dispatch('setKeepAlive', [])
|
||||
}
|
||||
next()
|
||||
},
|
||||
activated () {
|
||||
if (this.$store.getters.materArr.length > 0) {
|
||||
this.dataList = [...this.dataList, ...this.$store.getters.materArr]
|
||||
this.dataList.map(el => {
|
||||
let res = accMul(el.canuse_qty, el.unit_weight)
|
||||
res = accDiv(res, 1000)
|
||||
this.$set(el, 'base_qty', res)
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 仓库下拉框
|
||||
async _checkGetBcpStor () {
|
||||
let res = await checkGetBcpStor()
|
||||
this.options1 = [...res.data]
|
||||
},
|
||||
searchMater () {
|
||||
this.$store.dispatch('setMaterObj', '')
|
||||
this.$router.push('/structmatersearch')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,6 +113,9 @@ export default {
|
||||
this.pkObj = this.pkId === e.material_code ? e : {}
|
||||
},
|
||||
toSure () {
|
||||
if (!this.pkId) {
|
||||
return
|
||||
}
|
||||
this.$store.dispatch('setMaterObj', JSON.stringify(this.pkObj))
|
||||
this.colseUp()
|
||||
},
|
||||
|
||||
@@ -43,13 +43,13 @@
|
||||
<div class="search-item">
|
||||
<div class="search-label">物料</div>
|
||||
<div class="filter_input_wraper">
|
||||
<input type="text" class="filter-input">
|
||||
<input type="text" class="filter-input" v-model="material_code">
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-label">载具号</div>
|
||||
<div class="filter_input_wraper">
|
||||
<input type="text" class="filter-input">
|
||||
<input type="text" class="filter-input" v-model="storagevehicle_code">
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item flexend" style="width: 100%">
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<div class="search-item">
|
||||
<div class="search-label">物料</div>
|
||||
<div class="filter_input_wraper pointer" @click="searchMater">
|
||||
<input type="text" class="filter-input" v-model="material_code">
|
||||
<input type="text" class="filter-input" v-model="material_code" disabled>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
<th>货位</th>
|
||||
<th>物料编号</th>
|
||||
<th>物料名称</th>
|
||||
<th>物料规格</th>
|
||||
<th>数量</th>
|
||||
<th>单重(g)</th>
|
||||
<th>载具号</th>
|
||||
@@ -45,6 +46,7 @@
|
||||
<td>{{e.struct_name}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{ e.material_spec }}</td>
|
||||
<td>{{e.canuse_qty | numeric(3)}}</td>
|
||||
<td>{{ e.unit_weight | numeric(3) }}</td>
|
||||
<td>{{ e.storagevehicle_code }}</td>
|
||||
@@ -113,6 +115,9 @@ export default {
|
||||
this.pkObj = this.pkId === e.struct_name ? e : {}
|
||||
},
|
||||
toSure () {
|
||||
if (!this.pkId) {
|
||||
return
|
||||
}
|
||||
this.$store.dispatch('setMaterObj', JSON.stringify(this.pkObj))
|
||||
this.colseUp()
|
||||
},
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<div class="search-item">
|
||||
<div class="search-label">物料</div>
|
||||
<div class="filter_input_wraper pointer" @click="searchMater">
|
||||
<input type="text" class="filter-input" v-model="material_code">
|
||||
<input type="text" class="filter-input" v-model="material_code" disabled>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
@@ -73,7 +73,7 @@
|
||||
<div class="search-item">
|
||||
<div class="search-label">出库点</div>
|
||||
<div class="filter_input_wraper">
|
||||
<el-select v-model="value3" filterable clearable placeholder="请选择" disabled>
|
||||
<el-select v-model="value3" filterable clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options3"
|
||||
:key="item.point_code"
|
||||
@@ -145,7 +145,7 @@ export default {
|
||||
this.material_id = JSON.parse(this.$store.getters.materObj).material_id
|
||||
this.material_code = JSON.parse(this.$store.getters.materObj).material_code
|
||||
this.material_spec = JSON.parse(this.$store.getters.materObj).material_spec
|
||||
this.unit_weight = Number(JSON.parse(this.$store.getters.materObj).net_weight).toFixed(3)
|
||||
this.unit_weight = Number(JSON.parse(this.$store.getters.materObj).unit_weight).toFixed(3)
|
||||
this.qty = Number(JSON.parse(this.$store.getters.materObj).canuse_qty).toFixed(3)
|
||||
this.struct_code = JSON.parse(this.$store.getters.materObj).struct_name
|
||||
this.storagevehicle_code = JSON.parse(this.$store.getters.materObj).storagevehicle_code
|
||||
|
||||
142
src/pages/modules/semifinished/struct-mater-search.vue
Normal file
142
src/pages/modules/semifinished/struct-mater-search.vue
Normal file
@@ -0,0 +1,142 @@
|
||||
<template>
|
||||
<div class="order-wraper">
|
||||
<div class="search-confirm-wrap">
|
||||
<div class="search-wrap">
|
||||
<div class="search-item">
|
||||
<div class="search-label">货位</div>
|
||||
<div class="filter_input_wraper">
|
||||
<input type="text" class="filter-input" v-model="val1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-label">物料</div>
|
||||
<div class="filter_input_wraper">
|
||||
<input type="text" class="filter-input" v-model="val2">
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item flexend">
|
||||
<button class="button button--primary" @click="_checkGetMaterialIvt">查询</button>
|
||||
<button class="button button--primary" :class="{'button--defalut': checkArr.length === 0}" @click="toSure">确定</button>
|
||||
<button class="button button--primary" @click="clearUp">清除</button>
|
||||
<button class="button button--primary" @click="colseUp">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_wraper" v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0" infinite-scroll-immediate-check="false">
|
||||
<table class="filter-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>选择</th>
|
||||
<th>库区</th>
|
||||
<th>货位</th>
|
||||
<th>物料编号</th>
|
||||
<th>物料名称</th>
|
||||
<th>数量</th>
|
||||
<th>单重(g)</th>
|
||||
<th>载具号</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="e in dataList" :key="e.struct_name" @click="toRadio(e)">
|
||||
<td>
|
||||
<button class="iconfont select_icon select_square_icon" :class="e.checked ? 'selected_icon' : 'unselect_icon'"></button>
|
||||
</td>
|
||||
<td>{{ e.sect_name }}</td>
|
||||
<td>{{e.struct_name}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.canuse_qty | numeric(3)}}</td>
|
||||
<td>{{ e.unit_weight | numeric(3) }}</td>
|
||||
<td>{{ e.storagevehicle_code }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="loading-tips">{{desc}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {checkGetMaterialIvt} from '@config/getData2.js'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
val1: '',
|
||||
val2: '',
|
||||
dataList: [],
|
||||
checkArr: [],
|
||||
page: 1,
|
||||
size: '30',
|
||||
busy: false,
|
||||
desc: ''
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._checkGetMaterialIvt()
|
||||
},
|
||||
methods: {
|
||||
// grid
|
||||
async _checkGetMaterialIvt () {
|
||||
this.page = 1
|
||||
this.busy = false
|
||||
this.desc = ''
|
||||
let res = await checkGetMaterialIvt(this.val2, this.val1, this.page + '', this.size)
|
||||
this.dataList = []
|
||||
res.data.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
this.dataList = [...res.data]
|
||||
if (res.data.length < 30) {
|
||||
this.busy = true
|
||||
this.desc = '已加载全部数据'
|
||||
}
|
||||
},
|
||||
async loadMore () {
|
||||
this.busy = true
|
||||
this.page++
|
||||
let res = await checkGetMaterialIvt(this.val2, this.val1, this.page + '', this.size)
|
||||
res.data.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
this.dataList = [...this.dataList, ...res.data]
|
||||
if (res.data.length < 30) {
|
||||
this.busy = true
|
||||
this.desc = '已加载全部数据'
|
||||
} else {
|
||||
this.busy = false
|
||||
}
|
||||
},
|
||||
colseUp () {
|
||||
this.$router.push('/semifinishedcheck')
|
||||
},
|
||||
toSure () {
|
||||
if (this.checkArr.length === 0) {
|
||||
return
|
||||
}
|
||||
this.$store.dispatch('setMaterArr', this.checkArr)
|
||||
this.colseUp()
|
||||
},
|
||||
clearUp () {
|
||||
this.checkArr = []
|
||||
},
|
||||
toRadio (e) {
|
||||
e.checked = !e.checked
|
||||
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '~@style/mixin.styl'
|
||||
.search-item
|
||||
width 27%
|
||||
&:nth-child(3)
|
||||
width 42%
|
||||
.filter_radius
|
||||
_fj()
|
||||
margin-right 15px
|
||||
.filter_radius_label
|
||||
margin-left 5px
|
||||
_font(12px, 30px, #fff,,)
|
||||
</style>
|
||||
Reference in New Issue
Block a user