init
This commit is contained in:
176
src/pages/xinrui/storage/instorage/FinishMaterInStoreGroup.vue
Normal file
176
src/pages/xinrui/storage/instorage/FinishMaterInStoreGroup.vue
Normal file
@@ -0,0 +1,176 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar title="产成品入库组盘"></nav-bar>
|
||||
<section class="content mgt186 mgb70">
|
||||
<div class="filter-wraper">
|
||||
<search-box
|
||||
label="载具码"
|
||||
v-model="val1"
|
||||
@handleChange="handleChange1"
|
||||
></search-box>
|
||||
<search-box
|
||||
label="桶码"
|
||||
:focused="true"
|
||||
v-model="val2"
|
||||
@handleChange="handleChange2"
|
||||
></search-box>
|
||||
</div>
|
||||
<div class="grid-wraper">
|
||||
<div class="left_fixed">
|
||||
<table class="layout-t left_layout_t">
|
||||
<tr>
|
||||
<th>桶码</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.bucketunique" @click="toCheck(e)" :class="{'checked': e.bucketunique === pkId}">
|
||||
<td>{{e.bucketunique}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slide">
|
||||
<table class="layout-t">
|
||||
<tr>
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
<th>批次</th>
|
||||
<th>重量kg</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.bucketunique" @click="toCheck(e)" :class="{'checked': e.bucketunique === pkId}">
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.storage_qty | numeric(3)}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="calc_value_wraper">
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">总重量</div>
|
||||
<div class="fxcol mgl20">
|
||||
<input type="text" class="filter-input filter-scan-input" v-model="val3">
|
||||
</div>
|
||||
<div class="mgl20">KG</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :class="{'btn-disabled': this.pkId === ''}" @click="deleteList">删除行</button>
|
||||
<button class="btn submit-button" :disabled="disabled" :class="{'btn-disabled': dataList.length === 0}" @click="toSure">确认组盘</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import SearchBox from '@components/SearchBox.vue'
|
||||
import {checkVehicle, checkBucket, confirmVehicle} from '@config/getData2.js'
|
||||
import {accAdd} from '@config/mUtils.js'
|
||||
export default {
|
||||
name: 'FinishMaterInStoreGroup',
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
val1: '',
|
||||
vehicle: {},
|
||||
val2: '',
|
||||
val3: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: '',
|
||||
disabled: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleChange1 (e, type) {
|
||||
if (type) {
|
||||
this._checkVehicle(e, '2')
|
||||
}
|
||||
},
|
||||
handleChange2 (e, type) {
|
||||
if (type) {
|
||||
this._checkBucket(e, '2')
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.bucketunique ? '' : e.bucketunique
|
||||
this.pkObj = this.pkId === e.bucketunique ? e : {}
|
||||
},
|
||||
/** 删除行 */
|
||||
deleteList () {
|
||||
if (this.pkId !== '') {
|
||||
this.dataList.map((el, i) => {
|
||||
if (el.bucketunique === this.pkId) {
|
||||
this.dataList.splice(i, 1)
|
||||
}
|
||||
})
|
||||
this.val3 = '0.000'
|
||||
this.dataList.map(el => {
|
||||
this.val3 = accAdd(this.val3, el.storage_qty)
|
||||
})
|
||||
this.val3 = Number(this.val3).toFixed(3) + ''
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
}
|
||||
},
|
||||
/** 确认组盘 */
|
||||
toSure () {
|
||||
this.disabled = true
|
||||
if (this.dataList.length === 0) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
this._confirmVehicle()
|
||||
},
|
||||
/** 查询载具码 */
|
||||
async _checkVehicle (code, type) {
|
||||
let res = await checkVehicle(code, type)
|
||||
if (res.code === '1') {
|
||||
this.vehicle = res.vehicle_jo
|
||||
this.val1 = res.vehicle_jo.storagevehicle_code
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 查询桶信息 */
|
||||
async _checkBucket (code, type) {
|
||||
let res = await checkBucket(code, type)
|
||||
if (res.code === '1') {
|
||||
if (this.dataList.length) {
|
||||
let arr = this.dataList.filter(el => { return el.bucketunique === res.bucket_jo.bucketunique })
|
||||
if (arr.length) {
|
||||
this.toast('桶码已存在')
|
||||
} else {
|
||||
this.dataList.push(res.bucket_jo)
|
||||
}
|
||||
} else {
|
||||
this.dataList.push(res.bucket_jo)
|
||||
}
|
||||
this.val3 = '0.000'
|
||||
this.dataList.map(el => {
|
||||
this.val3 = accAdd(this.val3, el.storage_qty)
|
||||
})
|
||||
this.val3 = Number(this.val3).toFixed(3) + ''
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
async _confirmVehicle () {
|
||||
try {
|
||||
let res = await confirmVehicle('2', this.vehicle, this.dataList, '')
|
||||
if (res.code === '1') {
|
||||
this.toast(res.desc)
|
||||
Object.assign(this.$data, this.$options.data())
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
263
src/pages/xinrui/storage/instorage/LikuReworkInStoreGroup.vue
Normal file
263
src/pages/xinrui/storage/instorage/LikuReworkInStoreGroup.vue
Normal file
@@ -0,0 +1,263 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar title="立库返工入库组盘"></nav-bar>
|
||||
<section class="content mgt186 mgb70">
|
||||
<div class="filter-wraper">
|
||||
<search-box
|
||||
label="立库载具码"
|
||||
v-model="val1"
|
||||
@handleChange="handleChange1"
|
||||
></search-box>
|
||||
<search-box
|
||||
label="入库站点"
|
||||
:focused="true"
|
||||
v-model="val2"
|
||||
@handleChange="handleChange2"
|
||||
></search-box>
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="fxcol">
|
||||
<search-box
|
||||
class="pad"
|
||||
label="新载具码"
|
||||
:focused="true"
|
||||
v-model="val3"
|
||||
@handleChange="handleChange3"
|
||||
></search-box>
|
||||
</div>
|
||||
<!-- <div class="mgl5">
|
||||
<button class="btn btn1" :class="{'btn-disabled': !(val2 !== '' && (val3 === '' || val3 === undefined))}" @click="getPallet">取空托盘</button>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- <search-box
|
||||
label="桶码"
|
||||
:focused="true"
|
||||
v-model="val4"
|
||||
:seaShow="false"
|
||||
></search-box> -->
|
||||
</div>
|
||||
<div class="grid-wraper">
|
||||
<div class="left_fixed">
|
||||
<table class="layout-t left_layout_t">
|
||||
<tr>
|
||||
<th>需出桶码</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.bucketunique">
|
||||
<td>{{e.bucketunique}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slide">
|
||||
<table class="layout-t">
|
||||
<tr>
|
||||
<th>产品编码</th>
|
||||
<th>批次</th>
|
||||
<th>需入重量</th>
|
||||
<th>入库重量</th>
|
||||
<th>单位</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.bucketunique">
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.qty | numeric(3)}}</td>
|
||||
<td>{{e.storage_qty | numeric(3)}}</td>
|
||||
<td>{{e.qty_unit_name}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="calc_value_wraper">
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">总重量</div>
|
||||
<div class="fxcol mgl20">
|
||||
<input type="text" class="filter-input filter-scan-input" v-model="val5">
|
||||
</div>
|
||||
<div class="mgl20">KG</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :disabled="disabled" :class="{'btn-disabled': dataList.length === 0}" @click="toSure">组盘入库</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import SearchBox from '@components/SearchBox.vue'
|
||||
import {queryLKvehicle, queryPoint, needVehicle, checkVehicle, checkBucket, confirmVehicle} from '@config/getData2.js'
|
||||
import {accAdd} from '@config/mUtils.js'
|
||||
export default {
|
||||
name: 'ProcedureReworkInStoreGroup',
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
val1: '',
|
||||
val2: '',
|
||||
vehicle: {},
|
||||
point: {},
|
||||
val3: '',
|
||||
vehicle_jo: {},
|
||||
val4: '',
|
||||
bucket_jo: {},
|
||||
val5: '',
|
||||
dataList: [],
|
||||
disabled: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleChange1 (e, type) {
|
||||
if (type) {
|
||||
this._queryLKvehicle(e)
|
||||
}
|
||||
},
|
||||
handleChange2 (e, type) {
|
||||
if (this.val1 === '' || this.val1 === undefined) {
|
||||
this.toast('请扫立库载具码')
|
||||
return
|
||||
}
|
||||
if (type) {
|
||||
this._queryPoint(e, this.val1)
|
||||
}
|
||||
},
|
||||
handleChange3 (e, type) {
|
||||
if (this.val1 === '' || this.val1 === undefined) {
|
||||
this.toast('请扫立库载具码')
|
||||
return
|
||||
}
|
||||
if (this.val2 === '' || this.val2 === undefined) {
|
||||
this.toast('请扫入库站点')
|
||||
return
|
||||
}
|
||||
if (type) {
|
||||
this._checkVehicle(e, '4', this.val1)
|
||||
}
|
||||
},
|
||||
getPallet () {
|
||||
if (this.val2 !== '' && (this.val3 === '' || this.val3 === undefined)) {
|
||||
this._needVehicle(this.val2)
|
||||
}
|
||||
},
|
||||
async _needVehicle (code) {
|
||||
let res = await needVehicle(code)
|
||||
if (res.code === '1') {
|
||||
this.toast(res.desc)
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 确认组盘 */
|
||||
toSure () {
|
||||
this.disabled = true
|
||||
let arr = this.dataList.filter(el => { return Number(el.qty) > 0 })
|
||||
if (arr.length === 0) {
|
||||
this.disabled = false
|
||||
this.toast('入库重量需要大于0')
|
||||
return
|
||||
}
|
||||
if (this.dataList.length === 0) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
this._confirmVehicle()
|
||||
},
|
||||
/** 查询立库载具码 */
|
||||
async _queryLKvehicle (code) {
|
||||
let res = await queryLKvehicle(code)
|
||||
if (res.code === '1') {
|
||||
this.dataList = [...res.row]
|
||||
this.val5 = '0.000'
|
||||
this.dataList.map(el => {
|
||||
this.val5 = accAdd(this.val5, el.qty)
|
||||
})
|
||||
this.val5 = Number(this.val5).toFixed(3) + ''
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 查询入库站点 */
|
||||
async _queryPoint (val, val1) {
|
||||
let res = await queryPoint(val, val1)
|
||||
if (res.code === '1') {
|
||||
this.point = res.point
|
||||
this.val2 = res.point.point_code
|
||||
this.vehicle = res.vehicle
|
||||
this.val3 = res.vehicle.storagevehicle_code
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 校验新载具码 */
|
||||
async _checkVehicle (val, type, val1) {
|
||||
let res = await checkVehicle(val, type, val1)
|
||||
if (res.code === '1') {
|
||||
this.vehicle_jo = res.vehicle_jo
|
||||
this.val3 = res.vehicle_jo.storagevehicle_code
|
||||
if (this.dataList.length > 0 && this.val1 === res.storagevehicle_code) {
|
||||
this.dataList.map(el => {
|
||||
el.storage_qty = '0.000'
|
||||
el.qty = el.storage_qty
|
||||
})
|
||||
this.val5 = '0.000'
|
||||
this.dataList.map(el => {
|
||||
this.val5 = accAdd(this.val5, el.qty)
|
||||
})
|
||||
this.val5 = Number(this.val5).toFixed(3) + ''
|
||||
}
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 查询桶码 */
|
||||
async _checkBucket (val, type) {
|
||||
let res = await checkBucket(val, type)
|
||||
if (res.code === '1') {
|
||||
this.bucket_jo = res.bucket_jo
|
||||
this.val4 = res.bucket_jo.bucketunique
|
||||
if (this.dataList.length > 0) {
|
||||
this.dataList.map(el => {
|
||||
if (el.bucketunique === res.bucket_jo.bucketunique) {
|
||||
el.storage_qty = '0.000'
|
||||
el.qty = el.storage_qty
|
||||
}
|
||||
})
|
||||
this.val5 = '0.000'
|
||||
this.dataList.map(el => {
|
||||
this.val5 = accAdd(this.val5, el.qty)
|
||||
})
|
||||
this.val5 = Number(this.val5).toFixed(3) + ''
|
||||
}
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
async _confirmVehicle () {
|
||||
try {
|
||||
let res = await confirmVehicle('4', this.vehicle_jo, this.dataList, this.point)
|
||||
if (res.code === '1') {
|
||||
this.toast(res.desc)
|
||||
Object.assign(this.$data, this.$options.data())
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
>>>.filter-label
|
||||
width 1.5rem
|
||||
.pad
|
||||
padding-top 0
|
||||
.btn1
|
||||
max-width auto
|
||||
font-size .2rem
|
||||
padding 0 .1rem
|
||||
</style>
|
||||
211
src/pages/xinrui/storage/instorage/NewMaterInStoreGroup.vue
Normal file
211
src/pages/xinrui/storage/instorage/NewMaterInStoreGroup.vue
Normal file
@@ -0,0 +1,211 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar title="新料入库组盘"></nav-bar>
|
||||
<section class="content mgt186 mgb70">
|
||||
<div class="filter-wraper">
|
||||
<search-box
|
||||
label="载具码"
|
||||
v-model="val1"
|
||||
@handleChange="handleChange1"
|
||||
></search-box>
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">关联单据</div>
|
||||
<div class="fxcol mgl20">
|
||||
<input type="text" class="filter-input filter-scan-input" v-model="val3" disabled>
|
||||
</div>
|
||||
<div class="mgl20">
|
||||
<button class="btn" @click="searchList">选择</button>
|
||||
</div>
|
||||
</div>
|
||||
<search-box
|
||||
label="桶码"
|
||||
:focused='true'
|
||||
v-model="val2"
|
||||
@handleChange="handleChange2"
|
||||
></search-box>
|
||||
</div>
|
||||
<div class="grid-wraper">
|
||||
<div class="left_fixed">
|
||||
<table class="layout-t left_layout_t">
|
||||
<tr>
|
||||
<th>桶码</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.bucketunique" @click="toCheck(e)" :class="{'checked': e.bucketunique === pkId}">
|
||||
<td>{{e.bucketunique}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slide">
|
||||
<table class="layout-t">
|
||||
<tr>
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
<th>批次</th>
|
||||
<th>重量kg</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.bucketunique" @click="toCheck(e)" :class="{'checked': e.bucketunique === pkId}">
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.storage_qty | numeric(3)}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="calc_value_wraper">
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">总重量</div>
|
||||
<div class="fxcol mgl20">
|
||||
<input type="text" class="filter-input filter-scan-input" v-model="val4">
|
||||
</div>
|
||||
<div class="mgl20">KG</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :class="{'btn-disabled': this.pkId === ''}" @click="deleteList">删除行</button>
|
||||
<button class="btn submit-button" :disabled="disabled" :class="{'btn-disabled': dataList.length === 0}" @click="toSure">确认组盘</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import SearchBox from '@components/SearchBox.vue'
|
||||
import {checkVehicle, checkBucket, confirmVehicle} from '@config/getData2.js'
|
||||
import {accAdd} from '@config/mUtils.js'
|
||||
export default {
|
||||
name: 'NewMaterInStoreGroup',
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
val1: '',
|
||||
vehicle: {},
|
||||
val2: '',
|
||||
val3: '',
|
||||
val4: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: '',
|
||||
disabled: false
|
||||
}
|
||||
},
|
||||
beforeRouteLeave (to, from, next) {
|
||||
if (to.path === '/home' || to.path === '/login') {
|
||||
this.$store.dispatch('setKeepAlive', [])
|
||||
}
|
||||
next()
|
||||
},
|
||||
activated () {
|
||||
this.val3 = this.$store.getters.materObj.source_bill_code
|
||||
},
|
||||
methods: {
|
||||
handleChange1 (e, type) {
|
||||
if (type) {
|
||||
this._checkVehicle(e, '1')
|
||||
}
|
||||
},
|
||||
handleChange2 (e, type) {
|
||||
if (this.val3 === '' || this.val3 === undefined) {
|
||||
this.toast('请先关联单据')
|
||||
return
|
||||
}
|
||||
if (type) {
|
||||
this._checkBucket(e, '1')
|
||||
}
|
||||
},
|
||||
/** 查找关联单据 */
|
||||
async searchList () {
|
||||
this.$router.push({
|
||||
path: '/SearchRelatedBill'
|
||||
})
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.bucketunique ? '' : e.bucketunique
|
||||
this.pkObj = this.pkId === e.bucketunique ? e : {}
|
||||
},
|
||||
/** 删除行 */
|
||||
deleteList () {
|
||||
if (this.pkId !== '') {
|
||||
this.dataList.map((el, i) => {
|
||||
if (el.bucketunique === this.pkId) {
|
||||
this.dataList.splice(i, 1)
|
||||
}
|
||||
})
|
||||
this.val4 = '0.000'
|
||||
this.dataList.map(el => {
|
||||
this.val4 = accAdd(this.val4, el.storage_qty)
|
||||
})
|
||||
this.val4 = Number(this.val4).toFixed(3) + ''
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
}
|
||||
},
|
||||
/** 确认组盘 */
|
||||
toSure () {
|
||||
this.disabled = true
|
||||
if (this.dataList.length === 0) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
this._confirmVehicle()
|
||||
},
|
||||
/** 查询载具码 */
|
||||
async _checkVehicle (code, type) {
|
||||
let res = await checkVehicle(code, type)
|
||||
if (res.code === '1') {
|
||||
this.vehicle = res.vehicle_jo
|
||||
this.val1 = res.vehicle_jo.storagevehicle_code
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 查询桶信息 */
|
||||
async _checkBucket (code, type) {
|
||||
let res = await checkBucket(code, type)
|
||||
if (res.code === '1') {
|
||||
if (this.$store.getters.materObj.material_id === res.bucket_jo.material_id && this.$store.getters.materObj.pcsn === res.bucket_jo.pcsn) {
|
||||
if (this.dataList.length) {
|
||||
let arr = this.dataList.filter(el => { return el.bucketunique === res.bucket_jo.bucketunique })
|
||||
if (arr.length) {
|
||||
this.toast('桶码已存在')
|
||||
} else {
|
||||
this.dataList.push(Object.assign({}, res.bucket_jo, {bill: this.$store.getters.materObj}))
|
||||
}
|
||||
} else {
|
||||
this.dataList.push(Object.assign({}, res.bucket_jo, {bill: this.$store.getters.materObj}))
|
||||
}
|
||||
} else {
|
||||
this.toast('当前物料标识和批次与单据信息不一致')
|
||||
}
|
||||
this.val4 = '0.000'
|
||||
this.dataList.map(el => {
|
||||
this.val4 = accAdd(this.val4, el.storage_qty)
|
||||
})
|
||||
this.val4 = Number(this.val4).toFixed(3) + ''
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
async _confirmVehicle () {
|
||||
try {
|
||||
let bill = this.$store.getters.materObj !== '' ? this.$store.getters.materObj : {}
|
||||
let res = await confirmVehicle('1', this.vehicle, this.dataList, '', bill)
|
||||
if (res.code === '1') {
|
||||
this.toast(res.desc)
|
||||
Object.assign(this.$data, this.$options.data())
|
||||
this.$store.dispatch('materObj', '')
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,234 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar title="工序返工入库组盘"></nav-bar>
|
||||
<section class="content mgt186 mgb70">
|
||||
<div class="filter-wraper">
|
||||
<search-box
|
||||
label="站点"
|
||||
v-model="val1"
|
||||
@handleChange="handleChange1"
|
||||
></search-box>
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="fxcol">
|
||||
<search-box
|
||||
class="pad"
|
||||
label="载具码"
|
||||
:focused="true"
|
||||
v-model="val2"
|
||||
@handleChange="handleChange2"
|
||||
></search-box>
|
||||
</div>
|
||||
<!-- <div class="mgl5">
|
||||
<button class="btn btn1" :class="{'btn-disabled': !(val1 !== '' && (val2 === '' || val2 === undefined))}" @click="getPallet">取空托盘</button>
|
||||
</div> -->
|
||||
</div>
|
||||
<search-box
|
||||
label="桶码"
|
||||
:focused="true"
|
||||
v-model="val3"
|
||||
@handleChange="handleChange3"
|
||||
></search-box>
|
||||
</div>
|
||||
<div class="grid-wraper">
|
||||
<div class="left_fixed">
|
||||
<table class="layout-t left_layout_t">
|
||||
<tr>
|
||||
<th>桶码</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.bucketunique" @click="toCheck(e)" :class="{'checked': e.bucketunique === pkId}">
|
||||
<td>{{e.bucketunique}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slide">
|
||||
<table class="layout-t">
|
||||
<tr>
|
||||
<th>产品编码</th>
|
||||
<th>批次</th>
|
||||
<th>重量kg</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.bucketunique" @click="toCheck(e)" :class="{'checked': e.bucketunique === pkId}">
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.storage_qty | numeric(3)}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="calc_value_wraper">
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">总重量</div>
|
||||
<div class="fxcol mgl20">
|
||||
<input type="text" class="filter-input filter-scan-input" v-model="val4">
|
||||
</div>
|
||||
<div class="mgl20">KG</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :class="{'btn-disabled': this.pkId === ''}" @click="deleteList">删除行</button>
|
||||
<button class="btn submit-button" :disabled="disabled" :class="{'btn-disabled': dataList.length === 0}" @click="toSure">组盘入库</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import SearchBox from '@components/SearchBox.vue'
|
||||
import {queryPoint, needVehicle, checkVehicle, checkBucket, confirmVehicle} from '@config/getData2.js'
|
||||
import {accAdd} from '@config/mUtils.js'
|
||||
export default {
|
||||
name: 'ProcedureReworkInStoreGroup',
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
val1: '',
|
||||
vehicle: {},
|
||||
point: {},
|
||||
val2: '',
|
||||
val3: '',
|
||||
val4: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: '',
|
||||
disabled: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleChange1 (e, type) {
|
||||
if (type) {
|
||||
this._queryPoint(e)
|
||||
}
|
||||
},
|
||||
handleChange2 (e, type) {
|
||||
if (this.val1 === '' || this.val1 === undefined) {
|
||||
this.toast('请先扫站点')
|
||||
return
|
||||
}
|
||||
if (type) {
|
||||
this._checkVehicle(e, '3')
|
||||
}
|
||||
},
|
||||
handleChange3 (e, type) {
|
||||
if (type) {
|
||||
this._checkBucket(e, '3')
|
||||
}
|
||||
},
|
||||
/** 取空托盘 */
|
||||
getPallet () {
|
||||
if (this.val1 !== '' && (this.val2 === '' || this.val2 === undefined)) {
|
||||
this._needVehicle(this.val1)
|
||||
}
|
||||
},
|
||||
async _needVehicle (code) {
|
||||
let res = await needVehicle(code)
|
||||
if (res.code === '1') {
|
||||
this.toast(res.desc)
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.bucketunique ? '' : e.bucketunique
|
||||
this.pkObj = this.pkId === e.bucketunique ? e : {}
|
||||
},
|
||||
/** 删除行 */
|
||||
deleteList () {
|
||||
if (this.pkId !== '') {
|
||||
this.dataList.map((el, i) => {
|
||||
if (el.bucketunique === this.pkId) {
|
||||
this.dataList.splice(i, 1)
|
||||
}
|
||||
})
|
||||
this.val4 = '0.000'
|
||||
this.dataList.map(el => {
|
||||
this.val4 = accAdd(this.val4, el.storage_qty)
|
||||
})
|
||||
this.val4 = Number(this.val4).toFixed(3) + ''
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
}
|
||||
},
|
||||
/** 确认组盘 */
|
||||
toSure () {
|
||||
this.disabled = true
|
||||
if (this.dataList.length === 0) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
this._confirmVehicle()
|
||||
},
|
||||
/** 查询站点 */
|
||||
async _queryPoint (code) {
|
||||
let res = await queryPoint(code, '')
|
||||
if (res.code === '1') {
|
||||
this.vehicle = res.vehicle
|
||||
this.point = res.point
|
||||
this.val1 = res.point.point_code
|
||||
this.val2 = res.vehicle.storagevehicle_code
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 查询载具码 */
|
||||
async _checkVehicle (code, type) {
|
||||
let res = await checkVehicle(code, type)
|
||||
if (res.code === '1') {
|
||||
this.vehicle = res.vehicle_jo
|
||||
this.val2 = res.vehicle_jo.storagevehicle_code
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 查询桶信息 */
|
||||
async _checkBucket (code, type) {
|
||||
let res = await checkBucket(code, type)
|
||||
if (res.code === '1') {
|
||||
if (this.dataList.length) {
|
||||
let arr = this.dataList.filter(el => { return el.bucketunique === res.bucket_jo.bucketunique })
|
||||
if (arr.length) {
|
||||
this.toast('桶码已存在')
|
||||
} else {
|
||||
this.dataList.push(res.bucket_jo)
|
||||
}
|
||||
} else {
|
||||
this.dataList.push(res.bucket_jo)
|
||||
}
|
||||
this.val4 = '0.000'
|
||||
this.dataList.map(el => {
|
||||
this.val4 = accAdd(this.val4, el.storage_qty)
|
||||
})
|
||||
this.val4 = Number(this.val4).toFixed(3) + ''
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
async _confirmVehicle () {
|
||||
try {
|
||||
let res = await confirmVehicle('3', this.vehicle, this.dataList, this.point)
|
||||
if (res.code === '1') {
|
||||
this.toast(res.desc)
|
||||
Object.assign(this.$data, this.$options.data())
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.pad
|
||||
padding-top 0
|
||||
.btn1
|
||||
max-width auto
|
||||
font-size .2rem
|
||||
padding 0 .1rem
|
||||
</style>
|
||||
174
src/pages/xinrui/storage/instorage/RemnantInStoreGroup.vue
Normal file
174
src/pages/xinrui/storage/instorage/RemnantInStoreGroup.vue
Normal file
@@ -0,0 +1,174 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar title="零头粉入库组盘"></nav-bar>
|
||||
<section class="content mgt186 mgb70">
|
||||
<div class="filter-wraper">
|
||||
<search-box
|
||||
label="载具码"
|
||||
v-model="val1"
|
||||
@handleChange="handleChange1"
|
||||
></search-box>
|
||||
<search-box
|
||||
label="桶码"
|
||||
:focused="true"
|
||||
v-model="val2"
|
||||
@handleChange="handleChange2"
|
||||
></search-box>
|
||||
</div>
|
||||
<div class="grid-wraper">
|
||||
<div class="left_fixed">
|
||||
<table class="layout-t left_layout_t">
|
||||
<tr>
|
||||
<th>桶码</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.bucketunique" @click="toCheck(e)" :class="{'checked': e.bucketunique === pkId}">
|
||||
<td>{{e.bucketunique}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slide">
|
||||
<table class="layout-t">
|
||||
<tr>
|
||||
<th>产品编码</th>
|
||||
<th>批次</th>
|
||||
<th>重量kg</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.bucketunique" @click="toCheck(e)" :class="{'checked': e.bucketunique === pkId}">
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.storage_qty | numeric(3)}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="calc_value_wraper">
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">总重量</div>
|
||||
<div class="fxcol mgl20">
|
||||
<input type="text" class="filter-input filter-scan-input" v-model="val3">
|
||||
</div>
|
||||
<div class="mgl20">KG</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :class="{'btn-disabled': this.pkId === ''}" @click="deleteList">删除行</button>
|
||||
<button class="btn submit-button" :disabled="disabled" :class="{'btn-disabled': dataList.length === 0}" @click="toSure">确认组盘</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import SearchBox from '@components/SearchBox.vue'
|
||||
import {checkVehicle, checkBucket, confirmVehicle} from '@config/getData2.js'
|
||||
import {accAdd} from '@config/mUtils.js'
|
||||
export default {
|
||||
name: 'RemnantInStoreGroup',
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
val1: '',
|
||||
vehicle: {},
|
||||
val2: '',
|
||||
val3: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: '',
|
||||
disabled: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleChange1 (e, type) {
|
||||
if (type) {
|
||||
this._checkVehicle(e, '6')
|
||||
}
|
||||
},
|
||||
handleChange2 (e, type) {
|
||||
if (type) {
|
||||
this._checkBucket(e, '6')
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.bucketunique ? '' : e.bucketunique
|
||||
this.pkObj = this.pkId === e.bucketunique ? e : {}
|
||||
},
|
||||
/** 删除行 */
|
||||
deleteList () {
|
||||
if (this.pkId !== '') {
|
||||
this.dataList.map((el, i) => {
|
||||
if (el.bucketunique === this.pkId) {
|
||||
this.dataList.splice(i, 1)
|
||||
}
|
||||
})
|
||||
this.val3 = '0.000'
|
||||
this.dataList.map(el => {
|
||||
this.val3 = accAdd(this.val3, el.storage_qty)
|
||||
})
|
||||
this.val3 = Number(this.val3).toFixed(3) + ''
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
}
|
||||
},
|
||||
/** 确认组盘 */
|
||||
toSure () {
|
||||
this.disabled = true
|
||||
if (this.dataList.length === 0) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
this._confirmVehicle()
|
||||
},
|
||||
/** 查询载具码 */
|
||||
async _checkVehicle (code, type) {
|
||||
let res = await checkVehicle(code, type)
|
||||
if (res.code === '1') {
|
||||
this.vehicle = res.vehicle_jo
|
||||
this.val1 = res.vehicle_jo.storagevehicle_code
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 查询桶信息 */
|
||||
async _checkBucket (code, type) {
|
||||
let res = await checkBucket(code, type)
|
||||
if (res.code === '1') {
|
||||
if (this.dataList.length) {
|
||||
let arr = this.dataList.filter(el => { return el.bucketunique === res.bucket_jo.bucketunique })
|
||||
if (arr.length) {
|
||||
this.toast('桶码已存在')
|
||||
} else {
|
||||
this.dataList.push(res.bucket_jo)
|
||||
}
|
||||
} else {
|
||||
this.dataList.push(res.bucket_jo)
|
||||
}
|
||||
this.val3 = '0.000'
|
||||
this.dataList.map(el => {
|
||||
this.val3 = accAdd(this.val3, el.storage_qty)
|
||||
})
|
||||
this.val3 = Number(this.val3).toFixed(3) + ''
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
async _confirmVehicle () {
|
||||
try {
|
||||
let res = await confirmVehicle('6', this.vehicle, this.dataList, '')
|
||||
if (res.code === '1') {
|
||||
this.toast(res.desc)
|
||||
Object.assign(this.$data, this.$options.data())
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
216
src/pages/xinrui/storage/instorage/SearchPallet.vue
Normal file
216
src/pages/xinrui/storage/instorage/SearchPallet.vue
Normal file
@@ -0,0 +1,216 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar :inner="true" title="查找托盘"></nav-bar>
|
||||
<section class="content mgt186" v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0" infinite-scroll-immediate-check="false">
|
||||
<div class="filter-wraper">
|
||||
<search-box
|
||||
label="桶码"
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
></search-box>
|
||||
</div>
|
||||
<div class="grid-wraper">
|
||||
<div class="left_fixed">
|
||||
<table class="layout-t left_layout_t">
|
||||
<tr>
|
||||
<th>托盘码</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.id" @click="toCheck(e)" :class="{'checked': e.id === pkId}">
|
||||
<td>{{e.storagevehicle_code}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slide">
|
||||
<table class="layout-t">
|
||||
<tr>
|
||||
<th>总桶数</th>
|
||||
<th>软废编码</th>
|
||||
<th>桶数</th>
|
||||
<th>重量kg</th>
|
||||
<th>货位</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.id" @click="toCheck(e)" :class="{'checked': e.id === pkId}">
|
||||
<td>{{e.bucket_num | numeric(3)}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_num | numeric(3)}}</td>
|
||||
<td>{{e.total_qty | numeric(3)}}</td>
|
||||
<td>{{e.struct_code}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="loading-tips">{{desc}}</div>
|
||||
</section>
|
||||
<section class="calc_value_wraper">
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">出库点</div>
|
||||
<div class="fxcol mgl20 visible" >
|
||||
<dropdown-menu
|
||||
:option="option"
|
||||
:active="active"
|
||||
:open="open"
|
||||
:up="true"
|
||||
@toggleItem="toggleItem"
|
||||
@dropdownMenu="dropdownMenu">
|
||||
</dropdown-menu>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :disabled="disabled1" :class="{'btn-disabled': pkId === '' || active === ''}" @click="toSure1">取半满托盘</button>
|
||||
<button class="btn submit-button" :disabled="disabled2" :class="{'btn-disabled': active === ''}" @click="toSure2">取空托盘</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import SearchBox from '@components/SearchBox.vue'
|
||||
import DropdownMenu from '@components/DropdownMenu.vue'
|
||||
import {findVehicle, queryOutPoint, askVehicle, needVehicle} from '@config/getData2.js'
|
||||
export default {
|
||||
name: 'SearchPallet',
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox,
|
||||
DropdownMenu
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
val1: '',
|
||||
option: [],
|
||||
active: '',
|
||||
open: false,
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
page: 1,
|
||||
size: '10',
|
||||
busy: false,
|
||||
desc: '',
|
||||
disabled1: false,
|
||||
disabled2: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._queryOutPoint()
|
||||
},
|
||||
methods: {
|
||||
handleChange (e, type) {
|
||||
if (type) {
|
||||
this._findVehicle()
|
||||
}
|
||||
},
|
||||
toggleItem () {
|
||||
if (!this.open) {
|
||||
this.open = true
|
||||
} else {
|
||||
this.open = false
|
||||
}
|
||||
},
|
||||
dropdownMenu (i) {
|
||||
this.active = i + ''
|
||||
this.open = false
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.id ? '' : e.id
|
||||
this.pkObj = this.pkId === e.id ? e : {}
|
||||
},
|
||||
toSure1 () {
|
||||
this.disabled1 = true
|
||||
if (this.pkId !== '' && this.active !== '') {
|
||||
this._askVehicle(this.pkObj, this.option[this.active].point_code)
|
||||
}
|
||||
},
|
||||
toSure2 () {
|
||||
this.disabled2 = true
|
||||
if (this.active !== '') {
|
||||
this._needVehicle(this.option[this.active].point_code)
|
||||
}
|
||||
},
|
||||
async loadMore () {
|
||||
this.busy = true
|
||||
this.page++
|
||||
this.desc = '加载数据中...'
|
||||
let res = await findVehicle(this.val1, this.page + '', this.size)
|
||||
if (res.code === '1') {
|
||||
this.dataList = [...this.dataList, ...res.vehicle_rows]
|
||||
if (res.vehicle_rows.length < 10) {
|
||||
this.busy = true
|
||||
this.desc = '已加载全部数据'
|
||||
} else {
|
||||
this.busy = false
|
||||
}
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
this.desc = res.desc
|
||||
}
|
||||
},
|
||||
async _findVehicle () {
|
||||
this.page = 1
|
||||
this.busy = false
|
||||
this.desc = ''
|
||||
let res = await findVehicle(this.val1, this.page + '', this.size)
|
||||
if (res.code === '1') {
|
||||
this.dataList = []
|
||||
this.dataList = [...res.vehicle_rows]
|
||||
if (res.vehicle_rows.length < 10) {
|
||||
this.busy = true
|
||||
this.desc = '已加载全部数据'
|
||||
}
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
this.desc = res.desc
|
||||
}
|
||||
},
|
||||
async _queryOutPoint () {
|
||||
let res = await queryOutPoint()
|
||||
if (res.code === '1') {
|
||||
this.option = [...res.point_rows]
|
||||
this.option.map(el => {
|
||||
this.$set(el, 'value', el.point_code)
|
||||
this.$set(el, 'label', el.point_code)
|
||||
})
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 取出托盘 */
|
||||
async _askVehicle (obj, code) {
|
||||
try {
|
||||
let res = await askVehicle(obj, code)
|
||||
if (res.code === '1') {
|
||||
this.toast(res.desc)
|
||||
this.$router.back()
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
this.disabled1 = false
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
/** 取空托盘 */
|
||||
async _needVehicle (code) {
|
||||
try {
|
||||
let res = await needVehicle(code)
|
||||
if (res.code === '1') {
|
||||
this.toast(res.desc)
|
||||
this.$router.back()
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
this.disabled2 = false
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
>>>.content
|
||||
height calc(100% - 2.96rem)
|
||||
overflow-y auto
|
||||
</style>
|
||||
122
src/pages/xinrui/storage/instorage/SearchRelatedBill.vue
Normal file
122
src/pages/xinrui/storage/instorage/SearchRelatedBill.vue
Normal file
@@ -0,0 +1,122 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar :inner="true" title="查找关联单据"></nav-bar>
|
||||
<section class="content mgt196 mgb70" v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0" infinite-scroll-immediate-check="false">
|
||||
<div class="grid-wraper">
|
||||
<div class="left_fixed">
|
||||
<table class="layout-t left_layout_t">
|
||||
<tr>
|
||||
<th>物料编码</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.source_billdtl_id" @click="toCheck(e)" :class="{'checked': e.source_billdtl_id === pkId}">
|
||||
<td>{{e.material_code}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slide">
|
||||
<table class="layout-t">
|
||||
<tr>
|
||||
<th>物料名称</th>
|
||||
<th>批次</th>
|
||||
<th>重量kg</th>
|
||||
<th>待组重量kg</th>
|
||||
<th>单据号</th>
|
||||
<th>单据日期</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.source_billdtl_id" @click="toCheck(e)" :class="{'checked': e.source_billdtl_id === pkId}">
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.receive_qty | numeric(3)}}</td>
|
||||
<td>{{e.need_qty | numeric(3)}}</td>
|
||||
<td>{{e.source_bill_code}}</td>
|
||||
<td>{{e.receive_date}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="loading-tips">{{desc}}</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :class="{'btn-disabled': pkId === ''}" @click="toSure">确认</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import {getBillDtl} from '@config/getData2.js'
|
||||
export default {
|
||||
name: 'SearchRelatedBill',
|
||||
components: {
|
||||
NavBar
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
page: 1,
|
||||
size: '10',
|
||||
busy: false,
|
||||
desc: '加载数据中...'
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._getBillDtl()
|
||||
},
|
||||
methods: {
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.source_billdtl_id ? '' : e.source_billdtl_id
|
||||
this.pkObj = this.pkId === e.source_billdtl_id ? e : {}
|
||||
},
|
||||
toSure () {
|
||||
if (this.pkId !== '') {
|
||||
this.$store.dispatch('materObj', this.pkObj)
|
||||
this.$router.back()
|
||||
} else {
|
||||
this.toast('请选择一行')
|
||||
}
|
||||
},
|
||||
async loadMore () {
|
||||
this.busy = true
|
||||
this.page++
|
||||
let res = await getBillDtl(this.page + '', this.size)
|
||||
if (res.code === '1') {
|
||||
let newArr = []
|
||||
res.rows.map(el => { newArr.push(Object.assign({}, el, {checked: 0})) })
|
||||
this.dataList = [...this.dataList, ...newArr]
|
||||
if (res.rows.length < 10) {
|
||||
this.busy = true
|
||||
this.desc = '已加载全部数据'
|
||||
} else {
|
||||
this.busy = false
|
||||
}
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
this.desc = res.desc
|
||||
}
|
||||
},
|
||||
async _getBillDtl () {
|
||||
let res = await getBillDtl(this.page + '', this.size)
|
||||
if (res.code === '1') {
|
||||
let newArr = []
|
||||
res.rows.map(el => { newArr.push(Object.assign({}, el, {checked: 0})) })
|
||||
this.dataList = [...newArr]
|
||||
if (res.rows.length < 10) {
|
||||
this.busy = true
|
||||
this.desc = '已加载全部数据'
|
||||
}
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
this.desc = res.desc
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
>>>.content
|
||||
height calc(100% - 2.49rem)
|
||||
overflow-y auto
|
||||
</style>
|
||||
140
src/pages/xinrui/storage/instorage/SearchSoftWasteBill.vue
Normal file
140
src/pages/xinrui/storage/instorage/SearchSoftWasteBill.vue
Normal file
@@ -0,0 +1,140 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar :inner="true" title="查找软废采购订单"></nav-bar>
|
||||
<section class="content mgt196" v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0" infinite-scroll-immediate-check="false">
|
||||
<div class="filter-wraper">
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">物料</div>
|
||||
<div class="fxcol mgl20">
|
||||
<input type="text" class="filter-input filter-scan-input" v-model="val1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">单据号</div>
|
||||
<div class="fxcol mgl20">
|
||||
<input type="text" class="filter-input filter-scan-input" v-model="val2">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid-wraper">
|
||||
<div class="left_fixed">
|
||||
<table class="layout-t left_layout_t">
|
||||
<tr>
|
||||
<th>软废编码</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.source_billdtl_id" @click="toCheck(e)" :class="{'checked': e.source_billdtl_id === pkId}">
|
||||
<td>{{e.material_code}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slide">
|
||||
<table class="layout-t">
|
||||
<tr>
|
||||
<th>重量kg</th>
|
||||
<th>待入重量kg</th>
|
||||
<th>订单号</th>
|
||||
<th>订单日期</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.source_billdtl_id" @click="toCheck(e)" :class="{'checked': e.source_billdtl_id === pkId}">
|
||||
<td>{{e.receive_qty | numeric(3)}}</td>
|
||||
<td>{{e.need_qty | numeric(3)}}</td>
|
||||
<td>{{e.source_bill_code}}</td>
|
||||
<td>{{e.receive_date}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="loading-tips">{{desc}}</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" @click="toSearch">查询</button>
|
||||
<button class="btn submit-button" :class="{'btn-disabled': pkId === ''}" @click="toSure">确认</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import {getRecBillDtl} from '@config/getData2.js'
|
||||
export default {
|
||||
name: 'SearchSoftWasteBill',
|
||||
components: {
|
||||
NavBar
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
page: 1,
|
||||
size: '10',
|
||||
busy: false,
|
||||
desc: '',
|
||||
val1: '',
|
||||
val2: ''
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._getRecBillDtl()
|
||||
},
|
||||
methods: {
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.source_billdtl_id ? '' : e.source_billdtl_id
|
||||
this.pkObj = this.pkId === e.source_billdtl_id ? e : {}
|
||||
},
|
||||
toSure () {
|
||||
if (this.pkId !== '') {
|
||||
this.$store.dispatch('materObj', this.pkObj)
|
||||
this.$router.back()
|
||||
}
|
||||
},
|
||||
async loadMore () {
|
||||
this.busy = true
|
||||
this.page++
|
||||
this.desc = '加载数据中...'
|
||||
let res = await getRecBillDtl(this.page + '', this.size, this.val1, this.val2)
|
||||
if (res.code === '1') {
|
||||
this.dataList = [...this.dataList, ...res.rows]
|
||||
if (res.rows.length < 10) {
|
||||
this.busy = true
|
||||
this.desc = '已加载全部数据'
|
||||
} else {
|
||||
this.busy = false
|
||||
}
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
this.desc = res.desc
|
||||
}
|
||||
},
|
||||
async _getRecBillDtl () {
|
||||
let res = await getRecBillDtl(this.page + '', this.size, this.val1, this.val2)
|
||||
if (res.code === '1') {
|
||||
this.dataList = [...res.rows]
|
||||
if (res.rows.length < 10) {
|
||||
this.busy = true
|
||||
this.desc = '已加载全部数据'
|
||||
}
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
this.desc = res.desc
|
||||
}
|
||||
},
|
||||
toSearch () {
|
||||
this.dataList = []
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
this.page = 1
|
||||
this.size = '10'
|
||||
this.busy = false
|
||||
this.desc = ''
|
||||
this._getRecBillDtl()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
>>>.content
|
||||
height calc(100% - 1.96rem)
|
||||
overflow-y auto
|
||||
</style>
|
||||
251
src/pages/xinrui/storage/instorage/SoftWasteInStoreGroup.vue
Normal file
251
src/pages/xinrui/storage/instorage/SoftWasteInStoreGroup.vue
Normal file
@@ -0,0 +1,251 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar title="软废入库组盘"></nav-bar>
|
||||
<section class="content mgt186 mgb70">
|
||||
<div class="filter-wraper">
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="fxcol">
|
||||
<search-box
|
||||
class="pad"
|
||||
label="载具码"
|
||||
v-model="val1"
|
||||
@handleChange="handleChange1"
|
||||
></search-box>
|
||||
</div>
|
||||
<div class="mgl5">
|
||||
<button class="btn btn1" @click="getPallet">查找托盘</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">采购订单</div>
|
||||
<div class="fxcol mgl20">
|
||||
<input type="text" class="filter-input filter-scan-input" v-model="val2" disabled>
|
||||
</div>
|
||||
<div class="mgl20">
|
||||
<button class="btn" :disabled="disabled2" :class="{'btn-disabled': disabled2 === true}" @click="getBill">查找单据</button>
|
||||
</div>
|
||||
</div>
|
||||
<search-box
|
||||
label="桶码"
|
||||
:focused="true"
|
||||
v-model="val3"
|
||||
@handleChange="handleChange3"
|
||||
></search-box>
|
||||
</div>
|
||||
<div class="grid-wraper">
|
||||
<div class="left_fixed">
|
||||
<table class="layout-t left_layout_t">
|
||||
<tr>
|
||||
<th>桶码</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.bucketunique" @click="toCheck(e)" :class="{'checked': e.bucketunique === pkId}">
|
||||
<td>{{e.bucketunique}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slide">
|
||||
<table class="layout-t">
|
||||
<tr>
|
||||
<th>软废编码</th>
|
||||
<th>批次</th>
|
||||
<th>重量kg</th>
|
||||
<th>是否新加</th>
|
||||
<th>订单号</th>
|
||||
</tr>
|
||||
<tr v-for="e in dataList" :key="e.bucketunique" @click="toCheck(e)" :class="{'checked': e.bucketunique === pkId}">
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.storage_qty | numeric(3)}}</td>
|
||||
<td>{{['否', '是'][Number(e.is_new)]}}</td>
|
||||
<td>{{e.bill_code}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="calc_value_wraper">
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">总重量</div>
|
||||
<div class="fxcol mgl20">
|
||||
<input type="text" class="filter-input filter-scan-input" v-model="val4">
|
||||
</div>
|
||||
<div class="mgl20">KG</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :class="{'btn-disabled': this.pkId === ''}" @click="deleteList">删除行</button>
|
||||
<button class="btn submit-button" :disabled="disabled1" :class="{'btn-disabled': dataList.length === 0}" @click="toSure">确认组盘</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import SearchBox from '@components/SearchBox.vue'
|
||||
import {checkVehicle, checkBucket, confirmVehicle} from '@config/getData2.js'
|
||||
import {accAdd} from '@config/mUtils.js'
|
||||
export default {
|
||||
name: 'SoftWasteInStoreGroup',
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
val1: '',
|
||||
vehicle: {},
|
||||
bucket_rows: [],
|
||||
val2: '',
|
||||
val3: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
disabled1: false,
|
||||
disabled2: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
val4 () {
|
||||
let cur = '0.000'
|
||||
this.dataList.map(el => {
|
||||
cur = accAdd(cur, el.storage_qty)
|
||||
})
|
||||
cur = Number(cur).toFixed(3) + ''
|
||||
return cur
|
||||
}
|
||||
},
|
||||
beforeRouteLeave (to, from, next) {
|
||||
if (to.path === '/home' || to.path === '/login') {
|
||||
this.$store.dispatch('setKeepAlive', [])
|
||||
}
|
||||
next()
|
||||
},
|
||||
activated () {
|
||||
if (this.$store.getters.materObj !== '') this.val2 = this.$store.getters.materObj.source_bill_code
|
||||
},
|
||||
methods: {
|
||||
handleChange1 (e, type) {
|
||||
if (type) {
|
||||
this._checkVehicle(e, '5')
|
||||
}
|
||||
},
|
||||
handleChange3 (e, type) {
|
||||
if (this.val1 === '' || this.val1 === undefined) {
|
||||
this.toast('请扫载具码')
|
||||
return
|
||||
}
|
||||
if (type) {
|
||||
this._checkBucket(e, '5')
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.bucketunique ? '' : e.bucketunique
|
||||
this.pkObj = this.pkId === e.bucketunique ? e : {}
|
||||
},
|
||||
/** 查找托盘 */
|
||||
getPallet () {
|
||||
this.$router.push('/SearchPallet')
|
||||
},
|
||||
/** 查找单据 */
|
||||
getBill () {
|
||||
this.$router.push('/SearchSoftWasteBill')
|
||||
},
|
||||
/** 删除行 */
|
||||
deleteList () {
|
||||
if (this.pkId !== '') {
|
||||
if (this.pkObj.is_new === '1') {
|
||||
this.dataList.map((el, i) => {
|
||||
if (el.bucketunique === this.pkId) {
|
||||
this.dataList.splice(i, 1)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.toast('只能删新加的行')
|
||||
}
|
||||
}
|
||||
},
|
||||
/** 确认组盘 */
|
||||
toSure () {
|
||||
this.disabled1 = true
|
||||
let flag = false
|
||||
this.dataList.map(el => {
|
||||
if (el.is_new === '1') {
|
||||
flag = true
|
||||
}
|
||||
})
|
||||
if (!flag) {
|
||||
this.toast('至少添加一个桶码')
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
this._confirmVehicle()
|
||||
},
|
||||
/** 查询载具码 */
|
||||
async _checkVehicle (code, type) {
|
||||
let res = await checkVehicle(code, type)
|
||||
if (res.code === '1') {
|
||||
this.vehicle = res.vehicle_jo
|
||||
this.val1 = res.vehicle_jo.storagevehicle_code
|
||||
this.val3 = ''
|
||||
this.disabled2 = false
|
||||
this.dataList = []
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
this.dataList = [...res.bucket_rows]
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 查询桶码信息 */
|
||||
async _checkBucket (code, type) {
|
||||
let res = await checkBucket(code, type)
|
||||
if (res.code === '1') {
|
||||
let arr = this.dataList.filter(el => { return el.bucketunique === res.bucket_jo.bucketunique })
|
||||
if (arr.length) {
|
||||
this.toast('存在相同的桶码信息')
|
||||
this.val3 = ''
|
||||
return
|
||||
}
|
||||
if (this.val2 !== '' && JSON.stringify(this.$store.getters.materObj) !== '{}' && res.bucket_jo.material_id !== this.$store.getters.materObj.material_id) {
|
||||
this.toast('桶物料编码须与采购订单物料一致')
|
||||
this.val3 = ''
|
||||
return
|
||||
}
|
||||
if (this.val2 !== '') {
|
||||
let obj = Object.assign({}, res.bucket_jo, this.$store.getters.materObj)
|
||||
this.dataList.push(obj)
|
||||
} else {
|
||||
this.dataList.push(res.bucket_jo)
|
||||
this.disabled2 = true
|
||||
}
|
||||
this.val3 = res.bucket_jo.bucketunique
|
||||
} else {
|
||||
this.val3 = ''
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
async _confirmVehicle () {
|
||||
try {
|
||||
let res = await confirmVehicle('5', this.vehicle, this.dataList)
|
||||
if (res.code === '1') {
|
||||
this.toast(res.desc)
|
||||
Object.assign(this.$data, this.$options.data())
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
this.disabled1 = false
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.pad
|
||||
padding-top 0
|
||||
.btn1
|
||||
max-width auto
|
||||
font-size .2rem
|
||||
padding 0 .1rem
|
||||
</style>
|
||||
Reference in New Issue
Block a user