lijuncheng 11 months ago
parent
commit
5b6350606c
  1. 16
      api/request2.js
  2. 43
      common/balance.js
  3. 1
      common/record.js
  4. 1
      common/style/pdabasic.css
  5. 13
      mycomponents/location/requiredLocation.vue
  6. 2
      mycomponents/scan/winScanContainer.vue
  7. 2
      mycomponents/scan/winScanPackAndLocation.vue
  8. 2
      pages/package/record/mergePackageRecord.vue
  9. 2
      pages/package/record/overPackageRecord.vue
  10. 2
      pages/package/record/splitPackageRecord.vue
  11. 2
      pages/pallet/record/unBindPalletRecord.vue
  12. 214
      pages/putaway/record/putawayRecord.vue
  13. 94
      pages/transfer/job/receiptDetail.vue

16
api/request2.js

@ -304,6 +304,22 @@ export function getBasicLocationByCode(code) {
}); });
} }
/**
* 校验库位零件关系
* @param {*}
*
*/
export function validateItemAndLocation(parmas) {
return request({
url: baseApi + "/wms/location/validate",
method: "post",
data: parmas,
});
}
/** /**
* 查询物品信息接口 * 查询物品信息接口
* @param {*} code 物品代码 * @param {*} code 物品代码

43
common/balance.js

@ -4,6 +4,47 @@ import {
getBalanceByFilter getBalanceByFilter
} from '@/api/request2.js'; } from '@/api/request2.js';
/**
*
获取管理精度查询策略参数
* @param {*}
*
*/
export function getPrecisionStrategyParams(dataSource) {
}
/**
*
获取管理精度查询策略参数
* @param {*}
*
*/
export function getPrecisionStrategyParamsByLocation(detailSource,toLocationCode) {
var itemList = []
detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
detail.toLocationCode = toLocationCode;
var filterResult = itemList.filter(res => {
if (res.itemCode == item.itemCode &&
res.locationCode == detail.toLocationCode) {
return res
}
})
//去掉重复元素
if (filterResult.length == 0) {
var result = {
itemCode: item.itemCode,
locationCode: detail.toLocationCode
}
itemList.push(result)
}
}
})
})
return itemList;
}
/** /**
* "itemCode": [], * "itemCode": [],
@ -19,7 +60,7 @@ export function getPrecisionStrategyList(itemList, callback) {
success: true, success: true,
message: '' message: ''
}; };
getPrecisionStrategy(itemList).then(res => { getPrecisionStrategy(itemList).then(res => {
if (res.data == null) { if (res.data == null) {
result.success = false result.success = false

1
common/record.js

@ -19,6 +19,7 @@ export function createItemInfo(balance, pack) {
} }
return item; return item;
} }
export function createDetailInfo(data, pack) { export function createDetailInfo(data, pack) {
data.scaned = true; data.scaned = true;
// data.toInventoryStatus = this.toInventoryStatus == "" ? data.inventoryStatus : this.toInventoryStatus; // data.toInventoryStatus = this.toInventoryStatus == "" ? data.inventoryStatus : this.toInventoryStatus;

1
common/style/pdabasic.css

@ -725,6 +725,7 @@ page {
.page-header .header_item { .page-header .header_item {
/* padding-left: 10rpx; */ /* padding-left: 10rpx; */
padding: 5rpx 10rpx; padding: 5rpx 10rpx;
font-size:15px ;
} }
.page-header .header_job_top { .page-header .header_job_top {

13
mycomponents/location/requiredLocation.vue

@ -5,9 +5,12 @@
padding-right: 10rpx; padding-right: 10rpx;
font-size:32rpx;"> font-size:32rpx;">
<view class="uni-flex uni-row u-col-center" @click="showLocation"> <view class="uni-flex uni-row u-col-center" @click="showLocation">
<text style="font-size: 35rpx;">{{title}} </text> <view>
<text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">&nbsp 请扫描</text> {{title}}
<text style="font-size: 35rpx;color:#3FBAFF;">&nbsp {{locationCode}}</text> <!-- <text style="font-size: 35rpx;">{{title}}&nbsp {{locationCode}} </text> -->
<text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">&nbsp 请扫描</text>
<text style="font-size: 35rpx;color:#3FBAFF;">&nbsp {{locationCode}}</text>
</view>
<image v-if="isShowEdit" style="width:45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image> <image v-if="isShowEdit" style="width:45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image>
</view> </view>
<win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation'
@ -59,10 +62,10 @@
}, },
methods: { methods: {
showLocation() { showLocation() {
if(this.isShowEdit){ if (this.isShowEdit) {
this.$refs.scanLocationCode.openScanPopup(); this.$refs.scanLocationCode.openScanPopup();
} }
}, },
// //
getLocation(location, code) { getLocation(location, code) {

2
mycomponents/scan/winScanContainer.vue

@ -12,7 +12,7 @@
</view> </view>
<view class=""> <view class="">
<view class=""> <view class="">
<win-com-scan ref="scan" @getResult="getScanResult" :placeholder='title' :clearResult="false" <win-com-scan ref="scan" headerType='HCQ' @getResult="getScanResult" :placeholder='title' :clearResult="false"
:boxFocus="true" :isShowHistory="isShowHistory"> :boxFocus="true" :isShowHistory="isShowHistory">
</win-com-scan> </win-com-scan>
</view> </view>

2
mycomponents/scan/winScanPackAndLocation.vue

@ -27,7 +27,7 @@
<view v-if='allowModifyLocation'> <view v-if='allowModifyLocation'>
<uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请扫描来源库位" <uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请扫描来源库位"
@confirm="scanLocation"></uni-combox> @confirm="scanLocation" style='height: 30px;'></uni-combox>
</view> </view>
<view v-else> <view v-else>
<text style="padding: 5px"> <text style="padding: 5px">

2
pages/package/record/mergePackageRecord.vue

@ -35,7 +35,7 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
</view> </view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' allowModifyLocation="false"></win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location> :locationTypeList="fromlocationTypeList"></win-scan-location>
<com-message ref="comMessage"></com-message> <com-message ref="comMessage"></com-message>

2
pages/package/record/overPackageRecord.vue

@ -30,7 +30,7 @@
</view> </view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' allowModifyLocation="false"></win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location> :locationTypeList="fromlocationTypeList"></win-scan-location>
<win-scan-button @goScan='showScanPopupPack'></win-scan-button> <win-scan-button @goScan='showScanPopupPack'></win-scan-button>

2
pages/package/record/splitPackageRecord.vue

@ -29,7 +29,7 @@
</view> </view>
</view> </view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' allowModifyLocation="false"></win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location> :locationTypeList="fromlocationTypeList"></win-scan-location>
<win-scan-button @goScan='showScanPopupPack'></win-scan-button> <win-scan-button @goScan='showScanPopupPack'></win-scan-button>

2
pages/pallet/record/unBindPalletRecord.vue

@ -297,7 +297,7 @@
this.scanPopupGetFocus(); this.scanPopupGetFocus();
}, },
getContainer(containerInfo) { getContainer(containerInfo) {
this.containerCode = containerInfo.Number; this.containerCode = containerInfo.number;
getContainerDetailByNumber(this.containerCode).then(res => { getContainerDetailByNumber(this.containerCode).then(res => {
if (res.data.length > 0) { if (res.data.length > 0) {
this.detailSource = this.getDataSource(res.data) this.detailSource = this.getDataSource(res.data)

214
pages/putaway/record/putawayRecord.vue

@ -17,13 +17,12 @@
</scroll-view> </scroll-view>
</view> </view>
<requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode"
@getLocation='getToLocationCode' :locationTypeList="tolocationTypeList"></requiredLocation>
<view class="page-footer"> <view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10" <view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
<view class=""> <view class="">
<requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode"
@getLocation='getToLocationCode' :locationTypeList="tolocationTypeList"></requiredLocation>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -42,7 +41,8 @@
<script> <script>
import { import {
putawayRequestSubmit, putawayRequestSubmit,
putawayRecordSubmit putawayRecordSubmit,
validateItemAndLocation
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
@ -56,12 +56,6 @@
getDirectoryItemArray getDirectoryItemArray
} from '@/common/directory.js'; } from '@/common/directory.js';
import {
getDetailOption,
getDetailRemoveOption,
getDetailEditRemoveOption
} from '@/common/array.js';
import { import {
getBusinessType, getBusinessType,
createItemInfo, createItemInfo,
@ -70,7 +64,9 @@
} from '@/common/record.js'; } from '@/common/record.js';
import { import {
getManagementPrecisions getManagementPrecisions,
getPrecisionStrategyList,
getPrecisionStrategyParamsByLocation
} from '@/common/balance.js'; } from '@/common/balance.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
@ -96,35 +92,20 @@
data() { data() {
return { return {
id: '', id: '',
receiptJob: {},
received: false,
dataContent: {}, // dataContent: {}, //
detailSource: [], // detailSource: [], //
locationTypeList: [],
businessTypeInfo: {},
fromLocationInfo: {}, fromLocationInfo: {},
fromLocationCode: "", fromLocationCode: "",
toLocationCode: "", toLocationCode: "",
isShowLocation: false,
fromlocationTypeList: [], fromlocationTypeList: [],
tolocationTypeList: [], tolocationTypeList: [],
inInventoryStatus: "", // inInventoryStatus: "", //
outInventoryStatus: "", // outInventoryStatus: "", //
businessType: {}, businessType: {},
fromType: "",
showToLoaction: true showToLoaction: true
}; };
}, },
onLoad(option) { onLoad(option) {
this.fromType = option.fromType
if (this.fromType == "requestType") {
this.showToLoaction = false
updateTitle("原料上架申请")
} else {
updateTitle("原料上架记录")
this.showToLoaction = true
}
var typeCode = "PurchasePutaway" var typeCode = "PurchasePutaway"
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
@ -188,10 +169,10 @@
showErrorMessage(message) { showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {}
}
}); });
}, },
calcHandleQty() { calcHandleQty() {
for (let item of this.detailSource) { for (let item of this.detailSource) {
item.qty = 0; item.qty = 0;
@ -207,6 +188,7 @@
updateData() { updateData() {
this.calcHandleQty(); this.calcHandleQty();
}, },
removeItem(index, item) { removeItem(index, item) {
this.detailSource.splice(index, 1) this.detailSource.splice(index, 1)
}, },
@ -228,6 +210,7 @@
} }
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType); this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
}, },
showFromLocationPopup() { showFromLocationPopup() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.scanLocationCode.openScanPopup(); this.$refs.scanLocationCode.openScanPopup();
@ -254,115 +237,122 @@
return; return;
} }
uni.showLoading({ //
title: "提交中....",
mask: true // uni.showLoading({
// title: "....",
// mask: true
// });
//
//1:
// var itemCodes = []
// let conditions = [];
// this.detailSource.forEach(item => {
// debugger;
// let condition = {
// itemCode: item.itemCode,
// batch: item.batch,
// inventoryStatus: item.inInventoryStatus,
// locationCode: this.toLocationCode
// };
// conditions.push(condition)
// })
let itemAndLocationRelations = this.getItemAndLocationRelations();
validateItemAndLocation(itemAndLocationRelations, res => {
debugger;
}); });
if (this.fromType == "requestType") { let precisionStrategyParams = getPrecisionStrategyParamsByLocation(this.detailSource, this.toLocationCode);
var params = this.setRequestParams()
console.log("提交" + JSON.stringify(params)) return;
// putawayRequestSubmit(params).then(res => {
// uni.hideLoading() //2:
// if (res.data) { // getManagementPrecisions(itemCodes, this.toLocationCode, res => {
// this.showCommitSuccessMessage("<br>" + res.data, ) // if (res.success) {
// } else { // this.managementList = res.list;
// this.showErrorMessage("[" + res.msg + "]") // var params = this.setRecordParams(true)
// } // console.log("", JSON.stringify(params));
// }).catch(error => {
// uni.hideLoading() // putawayRecordSubmit(params).then(res => {
// this.showErrorMessage(error) // uni.hideLoading()
// }) // if (res.data) {
} else { // this.showCommitSuccessMessage("<br>" + res.data, )
// // } else {
var itemCodes = [] // this.showErrorMessage("[" + res.msg + "]")
this.detailSource.forEach(item => { // }
itemCodes.push(item.itemCode) // }).catch(error => {
}) // uni.hideLoading()
// // this.showErrorMessage(error)
getManagementPrecisions(itemCodes, this.toLocationCode, res => { // })
if (res.success) { // } else {
this.managementList = res.list; // uni.hideLoading();
var params = this.setRecordParams(true) // this.showErrorMessage(res.message);
console.log("提交参数", JSON.stringify(params)); // }
// });
// putawayRecordSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, )
// } else {
// this.showErrorMessage("[" + res.msg + "]")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
});
}
}, },
setRecordParams(queryModel) {
var subList = [] getItemAndLocationRelations() {
var creator = this.$store.state.user.id var itemList = []
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
if (queryModel) { detail.toLocationCode = this.toLocationCode;
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, var filterResult = itemList.filter(res => {
detail.packingNumber, detail.batch); if (res.itemCode == item.itemCode &&
detail.toPackingNumber = info.packingNumber;; res.locationCode == detail.toLocationCode &&
detail.toContainerNumber = detail.containerNumber res.batch == detail.batch &&
detail.toBatch = info.batch; res.inventoryStatus == detail.inventoryStatus) {
detail.toInventoryStatus = detail.inventoryStatus return res
detail.toLocationCode = this.toLocationCode }
} else { })
// detail.toPackingNumber = detail.packingNumber; //
// detail.toContainerNumber = detail.containerNumber if (filterResult.length == 0) {
// detail.toBatch = detail.toBatch; var result = {
// detail.toInventoryStatus = detail.inventoryStatus itemCode: item.itemCode,
// detail.toLocationCode = "" locationCode: detail.toLocationCode,
batch: detail.batch,
inventoryStatus: detail.inventoryStatus,
}
itemList.push(result)
} }
subList.push(detail)
} }
}) })
}) })
this.dataContent.subList = subList return itemList;
this.dataContent.creator = creator;
return this.dataContent;
}, },
setRequestParams(){ setRecordParams(queryModel) {
var subList = [] var subList = []
var supplierCode="" var creator = this.$store.state.user.id
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
if(supplierCode==""){ var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
supplierCode = detail.package.supplierCode detail.packingNumber, detail.batch);
} detail.toPackingNumber = info.packingNumber;;
detail.toContainerNumber = detail.containerNumber
detail.toBatch = info.batch;
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = this.toLocationCode
detail.package = null;
subList.push(detail) subList.push(detail)
} }
}) })
}) })
this.dataContent.subList = subList this.dataContent.subList = subList
this.dataContent.supplierCode = supplierCode this.dataContent.creator = creator;
this.dataContent.businessType = "PurchasePutaway"
this.dataContent.departmentCode= "研发部门";
this.dataContent.status= 1 ;
this.dataContent.autoCommit = "FALSE";
this.dataContent.autoAgree = "FALSE";
this.dataContent.autoExecute = "FALSE";
this.dataContent.directCreateRecord = "FALSE";
return this.dataContent; return this.dataContent;
}, },
showMessage(message) { showMessage(message) {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) {} if (res) {}

94
pages/transfer/job/receiptDetail.vue

@ -7,6 +7,9 @@
<view class="header_item"> <view class="header_item">
申请单号 : {{jobContent.requestNumber}} 申请单号 : {{jobContent.requestNumber}}
</view> </view>
<view class="header_item">
来源仓库 : {{jobContent.fromWarehouseCode}}
</view>
<u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line> <u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line>
</view> </view>
<view class="page-main"> <view class="page-main">
@ -37,7 +40,8 @@
</view> </view>
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> <win-scan-pack ref="scanPopup" @getResult='getScanResult'></win-scan-pack>
<!-- <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> -->
<detail-info-popup ref="detailInfoPopup"></detail-info-popup> <detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<com-message ref="comMessage"></com-message> <com-message ref="comMessage"></com-message>
@ -57,7 +61,8 @@
navigateBack, navigateBack,
getPackingNumberAndBatch, getPackingNumberAndBatch,
getInventoryStatusName, getInventoryStatusName,
getDirectoryItemArray getDirectoryItemArray,
compareAsc
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
@ -75,17 +80,18 @@
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import comMessage from '@/mycomponents/common/comMessage.vue' import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import winScanPack from "@/mycomponents/scan/winScanPack.vue"
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue" import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import detailInfoPopup from '@/pages/transfer/coms/detailInfoPopup.vue' import detailInfoPopup from '@/pages/transfer/coms/detailInfoPopup.vue'
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
export default { export default {
name: 'returnDetail', name: 'returnDetail',
components: { components: {
winScanButton, winScanButton,
requiredLocation, requiredLocation,
comMessage, comMessage,
winScanPackAndLocation, winScanPack,
comDetailCard, comDetailCard,
detailInfoPopup, detailInfoPopup,
jobTop jobTop
@ -101,7 +107,7 @@
toLocationCode: "", toLocationCode: "",
businessTypeInfo: {}, businessTypeInfo: {},
managementList: [], managementList: [],
tolocationTypeList:[] tolocationTypeList: []
}; };
}, },
onLoad(option) { onLoad(option) {
@ -227,29 +233,45 @@
}, },
openScanPopup() { openScanPopup() {
let fromlocationCode = ''; this.$refs.scanPopup.openScanPopup();
let fromlocationList = []; },
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i]; getScanResult(result) {
item.subList.forEach(l => { try {
// var packingNumber = result.label.packingNumber;
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) var batch = result.label.batch;
if (location.length == 0) { var qty = result.label.qty;
fromlocationList.push(l.fromLocationCode); var itemCode = result.label.itemCode;
} var detail = this.detailSource.find(r => r.itemCode == itemCode);
// if (detail == undefined) {
if (fromlocationCode == '') { this.showMessage("物料号【" + itemCode + "】不在列表中")
if (!l.scaned) { } else {
fromlocationCode = l.fromLocationCode; var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch);
if (itemDetail == undefined) {
this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中")
} else {
if (itemDetail.scaned) {
this.showMessage("箱码【" + packingNumber + "】已经扫描")
} else {
itemDetail.scaned = true;
this.detailSource[0].subList.sort(compareAsc('scaned')); //
itemDetail.handleQty = Number(result.label.qty);
itemDetail.toLocationCode = this.toLocationCode;
itemDetail.labelQty = Number(result.label.qty);
calcHandleQty(this.detailSource);
this.continueScan()
this.$forceUpdate()
var list = this.detailSource[0].subList;
} }
} }
}) }
} catch (e) {
this.showErrorMessage(e.message)
} }
this.$refs.scanPopup.openScanPopupForJob(fromlocationCode, fromlocationList, this.jobContent);
}, },
getScanResult1(result) {
getScanResult(result) {
try { try {
var packingNumber = result.label.packingNumber; var packingNumber = result.label.packingNumber;
var batch = result.label.batch; var batch = result.label.batch;
@ -272,15 +294,16 @@
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) { if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
if(this.jobContent.allowModifyInventoryStatus=="TRUE"){ if (this.jobContent.allowModifyInventoryStatus == "TRUE") {
this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,是否继续入库?', res => { ']不一致,是否继续入库?', res => {
if (res) { if (res) {
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(result.balance.qty) ; itemDetail.handleQty = Number(result.balance.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus itemDetail.toInventoryStatus = result.balance.inventoryStatus
itemDetail.balance = result.balance; itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty) ; itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) itemDetail.balance.stdPackQty = Number(result.package.stdPackQty)
itemDetail.balance.stdPackUnit = result.package.stdPackUnit itemDetail.balance.stdPackUnit = result.package.stdPackUnit
this.calcHandleQty(); this.calcHandleQty();
@ -288,20 +311,21 @@
this.scanPopupGetFocus(); this.scanPopupGetFocus();
} }
}); });
}else { } else {
this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,不允许转移!', res => { ']不一致,不允许转移!', res => {
this.scanPopupGetFocus(); this.scanPopupGetFocus();
}); });
} }
} else { } else {
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(result.balance.qty) ; itemDetail.handleQty = Number(result.balance.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus itemDetail.toInventoryStatus = result.balance.inventoryStatus
itemDetail.balance = result.balance; itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty) ; itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) itemDetail.balance.stdPackQty = Number(result.package.stdPackQty)
itemDetail.balance.stdPackUnit = result.package.stdPackUnit itemDetail.balance.stdPackUnit = result.package.stdPackUnit
this.calcHandleQty(); this.calcHandleQty();
@ -350,7 +374,7 @@
}, },
submitJob() { submitJob() {
uni.showLoading({ uni.showLoading({
title: "提交中....", title: "提交中....",
mask: true mask: true
@ -379,7 +403,7 @@
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showErrorMessage(error) this.showErrorMessage(error)

Loading…
Cancel
Save