qita物料组盘入库

This commit is contained in:
2026-06-30 09:47:56 +08:00
parent 08d298b262
commit 0433b439e0
6 changed files with 389 additions and 0 deletions

View File

@@ -128,6 +128,12 @@ export const getBillDtl = (page, size, pcsn) => post('api/pda/st/in/getBillDtl',
size: size,
pcsn: pcsn
})
// 1.3获取单据信息-新料其他入库组盘
export const getBillDtl2 = (page, size, pcsn) => post('api/pda/st/in/getBillDtl2', {
page: page,
size: size,
pcsn: pcsn
})
// 1.4 确认组盘
export const confirmVehicle = (option, vehicle, rows, point, bill, level) => post('api/pda/st/in/confirmVehicle', {
accountId: accountId,
@@ -138,6 +144,16 @@ export const confirmVehicle = (option, vehicle, rows, point, bill, level) => pos
bill: bill,
ivt_level: level
})
// 1.4 确认组盘-新料其他入库组盘
export const confirmVehicleOther = (option, vehicle, rows, point, bill, level) => post('api/pda/st/in/confirmVehicle2', {
accountId: accountId,
option: option,
vehicle: vehicle,
bucket_rows: rows,
point: point,
bill: bill,
ivt_level: level
})
/** 工序返工入库 */
// 1.1查询站点
export const queryPoint = (code, carr) => post('api/pda/st/in/queryPoint', {

View File

@@ -125,6 +125,14 @@ export const authority = () => {
"menu_id": "290",
"username": "admin"
},
{
"accountid": "1",
"path": "RFNewMaterOtherInStoreGroup",
"component": "2",
"name": "新料其他入库组盘",
"menu_id": "2902",
"username": "admin"
},
{
"accountid": "1",
"path": "RFFinishMaterInStoreGroup",

View File

@@ -49,6 +49,7 @@
<div class="menu-col fxrow" @click="goInner('/ChengPinBarrelPrint')"><p class="fxcol">成品组桶标签打印</p></div>
<div class="menu-col fxrow" @click="goInner('/BarrelBagUpdate')"><p class="fxcol">桶袋标签更新</p></div>
<div class="menu-col fxrow" @click="goInner('/NewMaterInStoreGroup')"><p class="fxcol">新料入库组盘</p></div>
<div class="menu-col fxrow" @click="goInner('/NewMaterOtherInStoreGroup')"><p class="fxcol">新料其他入库组盘</p></div>
<div class="menu-col fxrow" @click="goInner('/FinishMaterInStoreGroup')"><p class="fxcol">产成品入库组盘</p></div>
<div class="menu-col fxrow" @click="goInner('/ProcedureReworkInStoreGroup')"><p class="fxcol">工序返工入库</p></div>
<div class="menu-col fxrow" @click="goInner('/LikuReworkInStoreGroup')"><p class="fxcol">立库返工入库</p></div>

View 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, confirmVehicleOther} 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: '/SearchRelatedBill2'
})
},
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._confirmVehicleOther()
},
/** 查询载具码 */
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 _confirmVehicleOther () {
try {
let bill = this.$store.getters.materObj !== '' ? this.$store.getters.materObj : {}
let res = await confirmVehicleOther('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>

View File

@@ -0,0 +1,143 @@
<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="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" placeholder="批次号" v-model="val1">
</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>物料名称</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" @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 {getBillDtl} from '@config/getData2.js'
export default {
name: 'SearchRelatedBill',
components: {
NavBar
},
data () {
return {
val1: '',
dataList: [],
pkId: '',
pkObj: {},
page: 1,
size: '10',
busy: false,
desc: ''
}
},
created () {
// this._getBillDtl()
},
methods: {
toSearch () {
this.dataList = []
this.pkId = ''
this.pkObj = {}
this.page = 1
this.size = '10'
this.busy = false
this.desc = ''
this._getBillDtl()
},
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++
this.desc = '加载数据中...'
let res = await getBillDtl(this.page + '', this.size, this.val1)
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, this.val1)
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>

View File

@@ -21,7 +21,9 @@ const BarrelBagUpdate = r => require.ensure([], () => r(require('../pages/xinrui
const PeifenBarrelPrint = r => require.ensure([], () => r(require('../pages/xinrui/storage/settings/PeifenBarrelPrint')), 'settings')
const AbnormalBarrelPrint = r => require.ensure([], () => r(require('../pages/xinrui/storage/settings/AbnormalBarrelPrint')), 'settings')
const NewMaterInStoreGroup = r => require.ensure([], () => r(require('../pages/xinrui/storage/instorage/NewMaterInStoreGroup')), 'instorage')
const NewMaterOtherInStoreGroup = r => require.ensure([], () => r(require('../pages/xinrui/storage/instorage/NewMaterOtherInStoreGroup')), 'instorage')
const SearchRelatedBill = r => require.ensure([], () => r(require('../pages/xinrui/storage/instorage/SearchRelatedBill')), 'instorage')
const SearchRelatedBill2 = r => require.ensure([], () => r(require('../pages/xinrui/storage/instorage/SearchRelatedBill2')), 'instorage')
const FinishMaterInStoreGroup = r => require.ensure([], () => r(require('../pages/xinrui/storage/instorage/FinishMaterInStoreGroup')), 'instorage')
const ProcedureReworkInStoreGroup = r => require.ensure([], () => r(require('../pages/xinrui/storage/instorage/ProcedureReworkInStoreGroup')), 'instorage')
const LikuReworkInStoreGroup = r => require.ensure([], () => r(require('../pages/xinrui/storage/instorage/LikuReworkInStoreGroup')), 'instorage')
@@ -216,10 +218,18 @@ export default new Router({
path: '/NewMaterInStoreGroup', // 新料入库组盘
component: NewMaterInStoreGroup
},
{
path: '/NewMaterOtherInStoreGroup', // 新料其他入库组盘
component: NewMaterOtherInStoreGroup
},
{
path: '/SearchRelatedBill', // 查找关联单据
component: SearchRelatedBill
},
{
path: '/SearchRelatedBill2', // 查找关联单据(新料入库组盘)
component: SearchRelatedBill2
},
{
path: '/FinishMaterInStoreGroup', // 产成品入库组盘
component: FinishMaterInStoreGroup