Commit fec46376 authored by 沈翠玲's avatar 沈翠玲

库存盘点

parent 3abb27f0
......@@ -60,6 +60,8 @@ const install = (Vue, vm) => {
sapCasePlnr2: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/pda_case/pda_case_plnr2?sap-language=ZH&sap-client=' + client, params),
// 待盘点
sapInventory: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/search/sch_inventory?sap-language=ZH&sap-client='+ client, params),
// 回传盘点结果
postInventory: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/post_inventory?sap-client='+ client, params),
// 工厂调拨查询
sapSearchAllot: (params = {}, client = sapClient) => vm.$u.post(config.adminPath + '/sap/bc/erp_ep/pda_allot/search_allot?sap-language=ZH&sap-client='+ client, params),
// 工厂调拨下架
......
......@@ -3,7 +3,7 @@
<StickyNavBar>
<NavBar title="库存盘点"></NavBar>
<view class="btn">
<uni-easyinput prefixIcon="search" class="topSearch" v-model="nlpla" focus placeholder="请扫盘点凭证码" @change="handleInputNlpla"></uni-easyinput>
<uni-easyinput prefixIcon="search" class="topSearch" v-model="nlpla" focus placeholder="请扫盘点凭证码" @input="handleInputNlpla"></uni-easyinput>
</view>
</StickyNavBar>
<waitInventoried ref="waitInventoriedRef" />
......@@ -52,7 +52,8 @@ export default {
this[row.way]();
},
handleInputNlpla(e) {
this.$refs.waitInventoriedRef.getList(e);
const params = JSON.parse(e)
this.$refs.waitInventoriedRef.getList(params);
},
goBack() {
console.log('返回了');
......
......@@ -27,7 +27,7 @@
<view class="items">物料名称:{{item.MAKTX}}</view>
</view>
<view class="boxRight">
<view class="items">0 / {{item.GESME}} {{ item.MEINS }}</view>
<view class="items">{{sumMENGA(item)}} / {{item.GESME}} {{ item.MEINS }}</view>
</view>
</view>
<view class="listBottom">
......@@ -44,17 +44,20 @@
</view>
</view>
<view v-if="!item.show" class="bottomBox">
<view class="boxAll" v-for="itm in item.list">
<view class="boxAll" v-for="(itm, inde) in item.list" :key="inde">
<view class="bottomItem">
<view class="items">仓位:{{ itm.LGPLA }}</view>
<view class="items">存储地点:{{ itm.LGOBE }}</view>
</view>
<view class="boxRight">
<view class="items">{{ itm.MENGA }} / {{itm.PACMG}} {{itm.MEINS}}</view>
<view class="itemsBtn">
<view class="items">
<u-input v-model="itm.MENGA" style="width: 120rpx;"/>
<view>/ {{itm.PACMG}} {{itm.MEINS}}</view>
</view>
<!-- <view class="itemsBtn">
<u-button size="mini" class="" type="primary" @click="checkShowModel = true">盘点
</u-button>
</view>
</view> -->
</view>
</view>
</view>
......@@ -127,6 +130,15 @@
}
})
},
computed: {
sumMENGA(){
return function(item){
return item.list.reduce((pre, item) => {
return pre + Number(item['MENGA'])
}, 0)
}
}
},
methods: {
setGoodsList() {
this.goodsList = this.inventoryList.reduce((acc, cur) => {
......@@ -149,7 +161,13 @@
}, [])
},
handleInput(e) {
console.log(e, 'eee');
this.goodsList.forEach(element => {
element.list.forEach(item => {
if (item['PLNR'] === e) {
item.MENGA = item.PACMG
}
})
})
},
toggleShow(item, index) {
console.log('触发了当前选项!', item)
......@@ -157,8 +175,30 @@
this.$set(this.goodsList, index, item)
},
getBtnHandle(row) {
console.log('getBtnHandle', row);
this[row.way]();
let params
if (this.isIm) {
params = {
RDATA_IM: this.inventoryList,
RDATA_WM: []
}
} else {
params = {
RDATA_IM: [],
RDATA_WM: this.inventoryList
}
}
this.$u.api.sapApi
.postInventory(params)
.then((res) => {
if(res && res[0]) {
if (res[0]['TYPE'] === 'S') {
this[row.way]();
} else {
this.$u.toast(res[0].MESSAGE)
}
}
})
},
goBack() {
console.log('返回了');
......@@ -270,6 +310,8 @@
font-size: 24rpx;
height: 40rpx;
line-height: 40rpx;
align-items: center;
display: flex;
}
.itemsBtn {
......@@ -299,4 +341,4 @@
padding: 0;
}
}
</style>
</style>
......@@ -75,13 +75,7 @@ export default {
},
methods: {
getList(params) {
this.params = params || {
IBLNR: "",
GJAHR: "2024",
IVNUM: "28",
NVERS: "00",
FLAG: 'X'
}
this.params = params
this.$u.api.sapApi
.sapInventory(this.params)
.then((res) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment