Compare commits

...

2 Commits

  1. 8
      .env.development
  2. 76
      src/mycomponents/scan/winComScanBalance.vue
  3. 2
      src/pages.json
  4. 9
      src/pages/issue/record/directIssue.vue
  5. 21
      src/pages/repleinsh/record/directRepleinshRecord.vue

8
.env.development

@ -1,11 +1,11 @@
VITE_BASE_URL=http://172.21.32.14:81/api/admin-api
VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api
VITE_BASE_URL=http://172.22.32.9:81/api/admin-api
VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api
# 租户配置
VITE_TENANT='[{"text":"长春1379","value":1}]'
VITE_TENANT='[{"text":"长春1379","value":1},{"text":"成都1397","value":2},{"text":"长春2379","value":3}]'
# 是否是测试环境
VITE_isDevelopment=true
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.14:90'
VITE_JMREPORT_BASE_URL='http://172.22.32.9:90'

76
src/mycomponents/scan/winComScanBalance.vue

@ -34,7 +34,8 @@
import {
getBalanceByParams,
getBasicItemByCode
getBasicItemByCode,
getBalanceByFilter
} from '@/api/request2.js';
import {
@ -91,6 +92,8 @@
fromLocation: '',
fromLocationList: [],
fromLocationAreaTypeList: [],
toLocationAreaTypeList: [],
locationOnFocus: false,
businessType: {},
inventoryStatus: [],
@ -109,9 +112,9 @@
this.businessType = businessType
this.fromInventoryStatuses = getDirectoryItemArray(businessType.outInventoryStatuses)
this.fromLocationAreaTypeList = getDirectoryItemArray(businessType.outAreaTypes)
this.toLocationAreaTypeList = getDirectoryItemArray(businessType.inAreaTypes)
this.itemTypesList = getDirectoryItemArray(businessType.itemTypes)
this.$refs.popup.open('bottom')
},
getScanResult(result) {
@ -121,7 +124,68 @@
return;
}
this.getItemCodeType(result.package.itemCode, callBack => {
this.queryBalance(this.resultData)
this.getToLocationBalance(this.resultData)
//this.queryBalance(this.resultData)
})
},
//
getToLocationBalance(result) {
uni.showLoading({
title: '查询中',
mask: true
})
var filters = []
if (result.package.parentNumber) {
var packingNumber = result.package.parentNumber + "," + result.package.number;
filters.push({
column: "packingNumber",
action: "in",
value: packingNumber
})
} else {
filters.push({
column: "packingNumber",
action: "==",
value: result.package.packingNumber
})
}
filters.push({
column: "itemCode",
action: "==",
value: result.package.itemCode
})
filters.push({
column: "batch",
action: "==",
value: result.package.batch
})
filters.push({
column: "areaType",
action: "in",
value: this.toLocationAreaTypeList.join(',')
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getBalanceByFilter(params).then(res => {
uni.hideLoading()
if (res.data.list.length > 0) {
this.showErrorMessage("包装在库位【" + res.data.list[0].locationCode + "】已有库存余额");
} else {
this.queryBalance(this.resultData);
}
// callback(res.data)
}).catch(err => {
this.showErrorMessage(err.message);
})
},
@ -186,9 +250,7 @@
if (this.verifyCategory) {
if (result.category == 'LCJ' || result.category == 'BJ') {
callBack()
}
else
{
} else {
this.showErrorMessage("扫描物料的种类不是【量产件】或者【备件】")
}
} else {
@ -213,6 +275,7 @@
this.showErrorMessage(error)
})
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
@ -222,6 +285,7 @@
}
});
},
selectBalanceItem(item) {
this.resultData.balance = item
this.$emit("getBalance", this.resultData)

2
src/pages.json

@ -686,7 +686,7 @@
{
"path": "pages/repleinsh/record/repleinshRecord",
"style": {
"navigationBarTitleText": "补料记录",
"navigationBarTitleText": "超市先进先出补料",
"enablePullDownRefresh": false,
"titleNView": {
"autoBackButton": "true"

9
src/pages/issue/record/directIssue.vue

@ -229,7 +229,6 @@
this.resultData = result;
let packageInfo = result.package;
this.getBalance(result.label, packageInfo, balances => {
//
let s = '';
if (!result.package.parentNumber) {
@ -260,8 +259,6 @@
let subParentPackitems = balances.list.filter(r => r.packingNumber ==
packageInfo
.parentNumber && r.locationCode == this.fromLocationCode)
//
if (subPackitems.length == 0) {
//
@ -289,11 +286,13 @@
.fromLocationCode)
if (manyBlances.length > 0) {
locationCode = manyBlances[0].locationCode;
}
}
this.showErrorMessage('该包装【' + packageInfo.number + '】在库位【' +
locationCode +
'】已经有库存余额,请重新扫描')
} else {
this.afterGetBalance(result);
}
}
}
}
}

21
src/pages/repleinsh/record/directRepleinshRecord.vue

@ -6,10 +6,11 @@
</view>
<view class="page-wraper" v-if="detailSource.length>0">
<view class="page-header">
<view class="header-view">
<view class="header_item" style="font-size:35rpx; padding: 10rpx;">
来源库位 : {{fromLocationCode}}
</view>
<u-line />
</view>
</view>
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
@ -17,11 +18,9 @@
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent"
:isShowFromLocation="false" @removeItem="removeItem(index,item)"
:isShowToLocation="false"
@updateData="updateData" @removePack="removePack">
:isShowToLocation="false" @updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</view>
</view>
</scroll-view>
</view>
@ -31,7 +30,8 @@
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode"
@getLocation='getToLocationCode' :locationAreaTypeList="toLocationAreaTypeList"></requiredLocation>
@getLocation='getToLocationCode' :locationAreaTypeList="toLocationAreaTypeList">
</requiredLocation>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -214,8 +214,11 @@
let balance = result.balance;
let label = result.label;
let pack = result.package;
if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位["+this.fromLocationCode+"]没有库存余额")
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位[" + this
.fromLocationCode + "]没有库存余额")
return;
}
@ -408,8 +411,7 @@
// detail.toLocationCode = detail.toLocationCode
submitItem.qty = detail.handleQty;
submitItem.package = "";
submitItem.recordList=[
{
submitItem.recordList = [{
toInventoryStatus: detail.inventoryStatus,
fromPackingNumber: info.packingNumber,
fromParentPackingNumber: detail.parentNumber,
@ -425,8 +427,7 @@
toPackUnit: detail.packUnit,
fromPackQty: detail.packQty,
toPackQty: detail.packQty
}
]
}]
subList.push(submitItem)
}
})

Loading…
Cancel
Save