add粉料移库

This commit is contained in:
蔡玲
2024-12-04 15:55:12 +08:00
parent 4ee4068621
commit 64af99d943
5 changed files with 332 additions and 3 deletions

View File

@@ -27,3 +27,23 @@ export const confirmGroupBucketAndBag = (mst, dtl) => post('api/pda/set/bucket/c
mst: mst,
dtl: dtl
})
/** 粉料移库-2024/12/04 */
// 1.1物料库存查询
export const moveQueryMaterialList = (code, page, size) => post('api/pda/st/move/queryMaterialList', {
material_code: code,
page: page,
size: size
})
// export const moveQueryMaterialList = (code, page, size) => {
// let res = {
// code: '1',
// rows: [{turnout_sect_name: 'turnout_sect_name', turnout_struct_code: 'turnout_struct_code', storagevehicle_code: 'storagevehicle_code', material_code: 'material_code', material_name: 'material_name', pcsn: 'pcsn', stockrecord_id: '1', quality_scode: '01', ivt_level: '01', is_active: '01', qty: '100', qty_unit_name: 'pc'}]
// }
// return res
// }
// 1.2确认
export const moveConfirm = (code, dtl) => post('api/pda/st/move/confirm', {
point_code: code,
dtl: dtl
})

View File

@@ -78,6 +78,7 @@
<div class="menu-col fxrow" @click="goInner('/PeifenBarrelPrint')"><p class="fxcol">配粉间桶标签打印</p></div>
<div class="menu-col fxrow" @click="goInner('/AbnormalBarrelPrint')"><p class="fxcol">异常桶标签打印</p></div>
<div class="menu-col fxrow" @click="goInner('/SoftWasteCleanInStore')"><p class="fxcol">软废清洗入库</p></div> -->
<!-- <div class="menu-col fxrow" @click="goInner('/PowderMaterMoveStore')"><p class="fxcol">粉料移库</p></div> -->
</div>
</section>
<section v-if="show === true" class="sec_menu_wraper fxrow">
@@ -122,7 +123,7 @@ export default {
toPage (e) {
// if (e.sonTree.length === 0) {
// let name = e.path.substr(2)
// if (name === 'ProcedureInspection' || name === 'SoftWasteBarrelPrint' || name === 'NewMaterInStoreGroup' || name === 'SoftWasteInStoreGroup' || name === 'FinishProdBarrelPrint' || name === 'ChengPinBarrelPrint' || name === 'BarrelBagUpdate' || name === 'ReworkBarrelPrint' || name === 'SoftWasteBagPrint' || name === 'ChaipanManage' || name === 'RawMaterCheck' || name === 'ProductInstore' || name === 'PeifenOutStore' || name === 'ReturnMaterOutStore' || name === 'OtherOutStore' || name === 'CheckOutStore' || name === 'SaleOutStore' || name === 'SoftWasteCleanOutStore' || name === 'CleaningGroupBarrel' || name === 'PeifenBarrelPrint' || name === 'AbnormalBarrelPrint' || name === 'SoftWasteCleanInStore') {
// if (name === 'ProcedureInspection' || name === 'SoftWasteBarrelPrint' || name === 'NewMaterInStoreGroup' || name === 'SoftWasteInStoreGroup' || name === 'FinishProdBarrelPrint' || name === 'ChengPinBarrelPrint' || name === 'BarrelBagUpdate' || name === 'ReworkBarrelPrint' || name === 'SoftWasteBagPrint' || name === 'ChaipanManage' || name === 'RawMaterCheck' || name === 'ProductInstore' || name === 'PeifenOutStore' || name === 'ReturnMaterOutStore' || name === 'OtherOutStore' || name === 'CheckOutStore' || name === 'SaleOutStore' || name === 'SoftWasteCleanOutStore' || name === 'CleaningGroupBarrel' || name === 'PeifenBarrelPrint' || name === 'AbnormalBarrelPrint' || name === 'SoftWasteCleanInStore' || name === 'PowderMaterMoveStore') {
// this.$store.dispatch('setKeepAlive', [name])
// }
// this.$router.push(e.path.substr(2))
@@ -137,7 +138,7 @@ export default {
},
toPage2 (e) {
let name = e.path.substr(2)
if (name === 'ProcedureInspection' || name === 'SoftWasteBarrelPrint' || name === 'NewMaterInStoreGroup' || name === 'SoftWasteInStoreGroup' || name === 'FinishProdBarrelPrint' || name === 'ChengPinBarrelPrint' || name === 'BarrelBagUpdate' || name === 'ReworkBarrelPrint' || name === 'SoftWasteBagPrint' || name === 'ChaipanManage' || name === 'RawMaterCheck' || name === 'ProductInstore' || name === 'PeifenOutStore' || name === 'ReturnMaterOutStore' || name === 'OtherOutStore' || name === 'CheckOutStore' || name === 'SaleOutStore' || name === 'SoftWasteCleanOutStore' || name === 'CleaningGroupBarrel' || name === 'PeifenBarrelPrint' || name === 'AbnormalBarrelPrint' || name === 'SoftWasteCleanInStore' || name === 'ProcessMakePowder' || name === 'ProcessGrindBall' || name === 'ProcessSpray' || name === 'ProcessMix' || name === 'ProcessDry' || name === 'ProcessSeDry' || name === 'ProcessChuimo' || name === 'ProcessYatuan' || name === 'ProcessGranulation' || name === 'ProcessWipe' || name === 'MaintainExecution' || name === 'MaintainConfirm' || name === 'EquipRepair' || name === 'EquipRepairExecute' || name === 'EquipRepairConfirm' || name === 'SparePartInstore' || name === 'SparePartOutstore' || name === 'UseReturn' || name === 'RunLogFill' || name === 'XingcaiDeliver') {
if (name === 'ProcedureInspection' || name === 'SoftWasteBarrelPrint' || name === 'NewMaterInStoreGroup' || name === 'SoftWasteInStoreGroup' || name === 'FinishProdBarrelPrint' || name === 'ChengPinBarrelPrint' || name === 'BarrelBagUpdate' || name === 'ReworkBarrelPrint' || name === 'SoftWasteBagPrint' || name === 'ChaipanManage' || name === 'RawMaterCheck' || name === 'ProductInstore' || name === 'PeifenOutStore' || name === 'ReturnMaterOutStore' || name === 'OtherOutStore' || name === 'CheckOutStore' || name === 'SaleOutStore' || name === 'SoftWasteCleanOutStore' || name === 'CleaningGroupBarrel' || name === 'PeifenBarrelPrint' || name === 'AbnormalBarrelPrint' || name === 'SoftWasteCleanInStore' || name === 'ProcessMakePowder' || name === 'ProcessGrindBall' || name === 'ProcessSpray' || name === 'ProcessMix' || name === 'ProcessDry' || name === 'ProcessSeDry' || name === 'ProcessChuimo' || name === 'ProcessYatuan' || name === 'ProcessGranulation' || name === 'ProcessWipe' || name === 'MaintainExecution' || name === 'MaintainConfirm' || name === 'EquipRepair' || name === 'EquipRepairExecute' || name === 'EquipRepairConfirm' || name === 'SparePartInstore' || name === 'SparePartOutstore' || name === 'UseReturn' || name === 'RunLogFill' || name === 'XingcaiDeliver' || name === 'PowderMaterMoveStore') {
this.$store.dispatch('setKeepAlive', [name])
}
this.$router.push(e.path.substr(2))
@@ -163,7 +164,7 @@ export default {
},
goInner (path) {
let name = path.substr(1)
if (name === 'ProcedureInspection' || name === 'SoftWasteBarrelPrint' || name === 'NewMaterInStoreGroup' || name === 'SoftWasteInStoreGroup' || name === 'FinishProdBarrelPrint' || name === 'ChengPinBarrelPrint' || name === 'BarrelBagUpdate' || name === 'ReworkBarrelPrint' || name === 'SoftWasteBagPrint' || name === 'ChaipanManage' || name === 'RawMaterCheck' || name === 'ProductInstore' || name === 'PeifenOutStore' || name === 'ReturnMaterOutStore' || name === 'OtherOutStore' || name === 'CheckOutStore' || name === 'SaleOutStore' || name === 'SoftWasteCleanOutStore' || name === 'CleaningGroupBarrel' || name === 'PeifenBarrelPrint' || name === 'AbnormalBarrelPrint' || name === 'SoftWasteCleanInStore' || name === 'ProcessMakePowder' || name === 'ProcessGrindBall' || name === 'ProcessSpray' || name === 'ProcessMix' || name === 'ProcessDry' || name === 'ProcessSeDry' || name === 'ProcessChuimo' || name === 'ProcessYatuan' || name === 'ProcessGranulation' || name === 'ProcessWipe' || name === 'MaintainExecution' || name === 'MaintainConfirm' || name === 'EquipRepair' || name === 'EquipRepairExecute' || name === 'EquipRepairConfirm' || name === 'SparePartInstore' || name === 'SparePartOutstore' || name === 'UseReturn' || name === 'RunLogFill') {
if (name === 'ProcedureInspection' || name === 'SoftWasteBarrelPrint' || name === 'NewMaterInStoreGroup' || name === 'SoftWasteInStoreGroup' || name === 'FinishProdBarrelPrint' || name === 'ChengPinBarrelPrint' || name === 'BarrelBagUpdate' || name === 'ReworkBarrelPrint' || name === 'SoftWasteBagPrint' || name === 'ChaipanManage' || name === 'RawMaterCheck' || name === 'ProductInstore' || name === 'PeifenOutStore' || name === 'ReturnMaterOutStore' || name === 'OtherOutStore' || name === 'CheckOutStore' || name === 'SaleOutStore' || name === 'SoftWasteCleanOutStore' || name === 'CleaningGroupBarrel' || name === 'PeifenBarrelPrint' || name === 'AbnormalBarrelPrint' || name === 'SoftWasteCleanInStore' || name === 'ProcessMakePowder' || name === 'ProcessGrindBall' || name === 'ProcessSpray' || name === 'ProcessMix' || name === 'ProcessDry' || name === 'ProcessSeDry' || name === 'ProcessChuimo' || name === 'ProcessYatuan' || name === 'ProcessGranulation' || name === 'ProcessWipe' || name === 'MaintainExecution' || name === 'MaintainConfirm' || name === 'EquipRepair' || name === 'EquipRepairExecute' || name === 'EquipRepairConfirm' || name === 'SparePartInstore' || name === 'SparePartOutstore' || name === 'UseReturn' || name === 'RunLogFill' || name === 'PowderMaterMoveStore') {
this.$store.dispatch('setKeepAlive', [name])
}
this.$router.push(path)

View File

@@ -0,0 +1,132 @@
<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="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.stockrecord_id" @click="toCheck(e)" :class="{'checked': e.stockrecord_id === pkId}">
<td>{{e.turnout_sect_name}}</td>
</tr>
</table>
</div>
<div class="slide">
<table class="layout-t">
<tr>
<th>货位</th>
<th>载具号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>批次</th>
<th>品质类型</th>
<th>库存等级</th>
<th>是否可用</th>
<th>重量</th>
<th>重量单位</th>
</tr>
<tr v-for="e in dataList" :key="e.stockrecord_id" @click="toCheck(e)" :class="{'checked': e.stockrecord_id === pkId}">
<td>{{e.turnout_struct_code}}</td>
<td>{{e.storagevehicle_code}}</td>
<td>{{e.material_code}}</td>
<td>{{ e.material_name }}</td>
<td>{{ e.pcsn }}</td>
<td>{{ ['待检品', '合格品', '', '中间品'][Number(e.quality_scode)] }}</td>
<td>{{ ['一级', '二级', '三级', '四级', '五级'][Number(e.ivt_level) - 1] }}</td>
<td>{{ ['不可用', '可用'][Number(e.is_active)] }}</td>
<td>{{ e.qty }}</td>
<td>{{ e.qty_unit_name }}</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>
<button class="btn submit-button" @click="$router.back()">取消</button>
</section>
</section>
</template>
<script>
import NavBar from '@components/NavBar.vue'
import { moveQueryMaterialList } from '@config/getData3.js'
export default {
name: 'PowderMater',
components: {
NavBar
},
data () {
return {
dataList: [],
pkId: '',
pkObj: {},
page: 1,
size: '50',
busy: false,
desc: ''
}
},
created () {
this.searchList()
},
methods: {
async searchList () {
this.pkId = ''
this.page = 1
this.size = '50'
this.busy = false
this.desc = ''
let res = await moveQueryMaterialList(this.$route.query.code, this.page + '', this.size)
if (res.code === '1') {
this.dataList = [...res.rows]
if (res.rows.length < 50) {
this.busy = true
this.desc = '已加载全部数据'
}
} else {
this.Dialog(res.desc)
this.desc = res.desc
}
},
async loadMore () {
this.busy = true
this.page++
let res = await moveQueryMaterialList(this.$route.query.code, this.page + '', this.size)
if (res.code === '1') {
this.dataList = [...this.dataList, ...res.rows]
if (res.rows.length < 50) {
this.busy = true
this.desc = '已加载全部数据'
} else {
this.busy = false
}
} else {
this.Dialog(res.desc)
this.desc = res.desc
}
},
toCheck (e) {
this.pkId = this.pkId === e.stockrecord_id ? '' : e.stockrecord_id
this.pkObj = this.pkId === e.stockrecord_id ? e : {}
},
toSure () {
if (this.pkId) {
this.$store.dispatch('materObj', this.pkObj)
this.$router.back()
} else {
this.toast('请选择一行')
}
}
}
}
</script>
<style lang="stylus" scoped>
>>>.content
height calc(100% - 1.96rem)
overflow-y auto
</style>

View File

@@ -0,0 +1,164 @@
<template>
<section>
<nav-bar title="粉料移库"></nav-bar>
<section class="content mgt186">
<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 class="mgl20">
<button class="btn" :class="{'btn-disabled': !val1}" @click="searchList">查询</button>
</div>
</div>
<search-box
label="点位"
v-model="val2"
:seaShow="false"
></search-box>
</div>
<div v-show="JSON.stringify(result) !== '{}'">
<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="result.turnout_sect_name" disabled>
</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="result.turnout_struct_code" disabled>
</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="result.material_code" disabled>
</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="result.material_name" disabled>
</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="result.pcsn" disabled>
</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="['待检品', '合格品', '', '中间品'][Number(result.quality_scode)]" disabled>
</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="['一级', '二级', '三级', '四级', '五级'][Number(result.ivt_level) - 1]" disabled>
</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="['不可用', '可用'][Number(result.is_active)]" disabled>
</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="result.qty" disabled>
</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="result.qty_unit_name" disabled>
</div>
</div>
</div>
</section>
<section class="submit-bar">
<button class="btn submit-button" @click="cancle">清空</button>
<button class="btn submit-button" :disabled="disabled" :class="{'btn-disabled': !val2 || JSON.stringify(result) === '{}'}" @click="_moveConfirm">确认</button>
</section>
</section>
</template>
<script>
import NavBar from '@components/NavBar.vue'
import SearchBox from '@components/SearchBox.vue'
import { moveConfirm } from '@config/getData3.js'
export default {
name: 'PowderMaterMoveStore',
components: {
NavBar,
SearchBox
},
data () {
return {
val1: '',
val2: '',
result: {},
disabled: false
}
},
beforeRouteLeave (to, from, next) {
if (to.path === '/home' || to.path === '/login') {
this.$store.dispatch('setKeepAlive', [])
}
next()
},
activated () {
if (this.$store.getters.materObj !== '') {
this.result = this.$store.getters.materObj
this.$store.dispatch('materObj', '')
}
},
methods: {
handleChange1 (e, type) {
if (type) {
this._queryInfoBybucket(e)
}
},
/** 物料查询 */
async searchList () {
if (this.val1) {
this.$router.push({
path: '/PowderMater',
query: {code: this.val1}
})
}
},
/** 清空 */
cancle () {
Object.assign(this.$data, this.$options.data())
},
async _moveConfirm () {
this.disabled = true
if (!this.val2 || JSON.stringify(this.result) === '{}') {
this.disabled = false
return
}
try {
let res = await moveConfirm(this.val2, [this.result])
if (res.code === '1') {
this.toast(res.desc)
this.cancle()
} else {
this.Dialog(res.desc)
}
this.disabled = false
} catch (e) {
this.disabled = false
}
}
}
}
</script>
<style lang="stylus" scoped>
</style>

View File

@@ -110,6 +110,10 @@ const ScanOutStore = r => require.ensure([], () => r(require('../pages/xinrui/eq
const UseReturn = r => require.ensure([], () => r(require('../pages/xinrui/equipment/UseReturn')), 'UseReturn')
const RunLogFill = r => require.ensure([], () => r(require('../pages/xinrui/equipment/RunLogFill')), 'RunLogFill')
// 移库
const PowderMaterMoveStore = r => require.ensure([], () => r(require('../pages/xinrui/move/PowderMaterMoveStore')), 'move')
const PowderMater = r => require.ensure([], () => r(require('../pages/xinrui/move/PowderMater')), 'move')
// 公用
const EquipSearchRadio = r => require.ensure([], () => r(require('../pages/xinrui/common/EquipSearchRadio')), 'common')
const EquipSearchCheckbox = r => require.ensure([], () => r(require('../pages/xinrui/common/EquipSearchCheckbox')), 'common')
@@ -544,6 +548,14 @@ export default new Router({
{
path: '/InsideSoftWasteInStore', // 内部软废入库
component: InsideSoftWasteInStore
},
{
path: '/PowderMaterMoveStore', // 粉料移库
component: PowderMaterMoveStore
},
{
path: '/PowderMater', // 粉料物料查询
component: PowderMater
}
],
scrollBehavior (to, from, savedPosition) {