Browse Source

Merge branch 'intex' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-uniapp into intex

intex_online20241205
lijuncheng 3 months ago
parent
commit
82113369ab
  1. 2
      src/mycomponents/detail/comJobDetailCardBatch.vue
  2. 6
      src/mycomponents/detail/comRecommendDetailCard.vue
  3. 12
      src/mycomponents/package/packageList.vue
  4. 1
      src/mycomponents/qty/compareQty.vue
  5. 3
      src/mycomponents/scan/winScanPackAndLocation.vue
  6. 10
      src/pages/inventoryMove/coms/comMoveRecord.vue
  7. 14
      src/pages/inventoryMove/coms/okToHoldRecordPack.vue
  8. 2
      src/pages/issue/job/issueDetailBatch.vue
  9. 10
      src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue
  10. 31
      src/pages/purchaseReceipt/job/receiptDetail.vue
  11. 300
      src/pages/putaway/job/putawayDetail.vue
  12. 4
      src/pages/unPlanned/job/receiptJobDetail.vue

2
src/mycomponents/detail/comJobDetailCardBatch.vue

@ -13,7 +13,7 @@
@updateData="updateData" @updateData="updateData"
:isShowStatus="isShowStatus" :isShowStatus="isShowStatus"
:isShowPackListStatus="isShowPackListStatus" :isShowPackListStatus="isShowPackListStatus"
></package-list> >{</package-list>
</uni-collapse-item> </uni-collapse-item>
</uni-collapse> </uni-collapse>

6
src/mycomponents/detail/comRecommendDetailCard.vue

@ -13,14 +13,12 @@
<uni-swipe-action-item @click="swipeClick($event,item)" <uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions" :right-options="item.scaned?scanOptions:detailOptions"
style='padding:0px 0px 5px 0px;align-items: center;'> style='padding:0px 0px 5px 0px;align-items: center;'>
<view v-if="item.isRecommend" class="uni-flex" style="flex-direction: row; align-items: center;"> <view v-if="item.isRecommend" class="uni-flex" style="flex-direction: row; align-items: center;">
<view class="" style="font-size: 32rpx; color: #3c9cff; font-weight: bold; text-align: center;padding: 10px;"> <view class="" style="font-size: 32rpx; color: #3c9cff; font-weight: bold; text-align: center;padding: 10px;">
<br/> <br/>
</view> </view>
<recommend :detail="item" :isShowStatus="isShowStatus" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation" style="flex:1" :isShowBatch='item.batch ? true:false'>
<recommend :detail="item" :isShowStatus="isShowStatus" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation" style="flex:1">
</recommend> </recommend>
</view> </view>
@ -30,7 +28,7 @@
</view> </view>
<recommend :detail="item" :isShowStatus="isShowStatus" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation" style="flex:1"> <recommend :detail="item" :isShowStatus="isShowStatus" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation" style="flex:1" :isShowBatch='item.batch? true:false'>
</recommend> </recommend>
</view> </view>

12
src/mycomponents/package/packageList.vue

@ -131,13 +131,13 @@
this.edit(item) this.edit(item)
} else if (e.content.text == "移除") { } else if (e.content.text == "移除") {
if (type == 'parent') { if (type == 'parent') {
this.removeParent(item); this.removeParent(item,type);
} else { } else {
this.remove(item,index,ele) this.remove(item,type,index,ele)
} }
} }
}, },
removeParent(item) { removeParent(item,type) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?", this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => { res => {
if (res) { if (res) {
@ -148,7 +148,7 @@
subItem.handleQty = null; subItem.handleQty = null;
}) })
this.$emit('updateData') this.$emit('updateData',type,item)
this.$forceUpdate() this.$forceUpdate()
} }
}); });
@ -156,14 +156,14 @@
remove(item,index,ele) { remove(item,type,index,ele) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?", this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => { res => {
if (res) { if (res) {
item.scaned = false item.scaned = false
item.handleQty = null; item.handleQty = null;
this.collapseChange() this.collapseChange()
this.$emit('updateData',ele,index) this.$emit('updateData',type,item,index,ele)
this.$forceUpdate() this.$forceUpdate()
} }
}); });

1
src/mycomponents/qty/compareQty.vue

@ -3,6 +3,7 @@
<status v-show="isShowStatus && dataContent.inventoryStatus" :status='dataContent.inventoryStatus'></status> <status v-show="isShowStatus && dataContent.inventoryStatus" :status='dataContent.inventoryStatus'></status>
<view class="uni-flex uni-row center"> <view class="uni-flex uni-row center">
<view class="uni-flex uni-row "> <view class="uni-flex uni-row ">
<view v-if="Number(handleQty)!=0"> <view v-if="Number(handleQty)!=0">
<view v-if="isShowRecommendQty"> <view v-if="isShowRecommendQty">
<view v-if="Number(recommendQty)>Number(handleQty)" class="text_greater"> <view v-if="Number(recommendQty)>Number(handleQty)" class="text_greater">

3
src/mycomponents/scan/winScanPackAndLocation.vue

@ -320,14 +320,11 @@
// return; // return;
// } else // } else
// //
console.log(88,businessType)
if(businessType){ if(businessType){
this.businessType = businessType; this.businessType = businessType;
this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses) this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); // this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.outAreaTypes); // this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.outAreaTypes); //
console.log(99,this.fromInventoryStatuses)
console.log(99,this.balanceFromInventoryStatuses)
} }

10
src/pages/inventoryMove/coms/comMoveRecord.vue

@ -237,6 +237,7 @@
openScanPopup() { openScanPopup() {
this.isJustReplay = true this.isJustReplay = true
this.fromLocationCode = this.$refs.okToHoldRecordPackRef.fromLocationCode || ' '
if (this.fromLocationCode == "") { if (this.fromLocationCode == "") {
this.showFromLocationPopup(); this.showFromLocationPopup();
return return
@ -244,6 +245,7 @@
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType); this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
}, },
showFromLocationPopup() { showFromLocationPopup() {
// this.$refs.scanPopup.
this.$refs.scanFromLocationCode.openScanPopup(); this.$refs.scanFromLocationCode.openScanPopup();
}, },
showPopup() { showPopup() {
@ -444,7 +446,7 @@
} }
console.log(detail) console.log(detail)
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfoForLabel(balance, pack, result.label);
// newDetail.inventoryStatus = balance.inventoryStatus; // newDetail.inventoryStatus = balance.inventoryStatus;
if (this.businessTypeCode == "Move") { if (this.businessTypeCode == "Move") {
newDetail.toInventoryStatus = balance.inventoryStatus; newDetail.toInventoryStatus = balance.inventoryStatus;
@ -452,9 +454,9 @@
newDetail.toInventoryStatus = this.toInventoryStatus; newDetail.toInventoryStatus = this.toInventoryStatus;
} }
if (newDetail.packingNumber == '') { // if (newDetail.packingNumber == '') {
newDetail.packingNumber = pack.number; // newDetail.packingNumber = pack.number;
} // }
newDetail.toLocationCode = this.toLocationCode; newDetail.toLocationCode = this.toLocationCode;
newDetail.managementTypeParams = managementTypeParams; newDetail.managementTypeParams = managementTypeParams;
newDetail.fromLocationCode = result.fromLocationCode newDetail.fromLocationCode = result.fromLocationCode

14
src/pages/inventoryMove/coms/okToHoldRecordPack.vue

@ -10,7 +10,8 @@
<view class="item"> <view class="item">
<view class="label">来源库位</view> <view class="label">来源库位</view>
<view class="value"> <view class="value">
<u-input v-model="fromLocationCode" clearable @blur="fromLocationScanMsg"></u-input> <u-input v-model="fromLocationCode"></u-input>
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="fromLocationCode=''" v-if="fromLocationCode"></u-icon>
</view> </view>
<view class="searchIcon"> <view class="searchIcon">
<image src="/static/search.svg" mode="" @click="fromLocationClick"/> <image src="/static/search.svg" mode="" @click="fromLocationClick"/>
@ -19,7 +20,8 @@
<view class="item"> <view class="item">
<view class="label">零件</view> <view class="label">零件</view>
<view class="value"> <view class="value">
<u-input v-model="itemCode" clearable></u-input> <u-input v-model="itemCode"></u-input>
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="itemCode=''" v-if="itemCode"></u-icon>
</view> </view>
<view class="searchIcon"> <view class="searchIcon">
<image src="/static/search.svg" mode="" @click="itemCodeClick"/> <image src="/static/search.svg" mode="" @click="itemCodeClick"/>
@ -28,7 +30,8 @@
<view class="item"> <view class="item">
<view class="label">批次</view> <view class="label">批次</view>
<view class="value"> <view class="value">
<u-input v-model='batch' clearable></u-input> <u-input v-model='batch'></u-input>
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="batch = ''" v-if="batch"></u-icon>
</view> </view>
<view class="searchIcon"></view> <view class="searchIcon"></view>
</view> </view>
@ -73,7 +76,8 @@
fromLocationCode:'', fromLocationCode:'',
itemCode:'', itemCode:'',
batch:'', batch:'',
showOne:false showOne:false,
isFromLocationFocus:false
} }
}, },
props: { props: {
@ -126,9 +130,9 @@
}, },
fromLocationScanMsg(){ fromLocationScanMsg(){
if (this.fromLocationCode) { if (this.fromLocationCode) {
console.log(111,this.fromLocationCode)
this.scanMsg = this.fromLocationCode this.scanMsg = this.fromLocationCode
this.fromWitch = 'fromLocationScanMsg' this.fromWitch = 'fromLocationScanMsg'
this.isFromLocationFocus = false
this.handelScanMsg() this.handelScanMsg()
} }
}, },

2
src/pages/issue/job/issueDetailBatch.vue

@ -617,7 +617,7 @@
autoCommit(){ autoCommit(){
// this.$throttle(this.submit, 2000, this)() // this.$throttle(this.submit, 2000, this)()
// this.jobContent.allowSmallerQty = 'FALSE' // this.jobContent.allowSmallerQty = 'FALSE'
this.jobContent.allowBiggerQty = 'FALSE' // this.jobContent.allowBiggerQty = 'FALSE'
let str="" let str=""
let str1="" let str1=""
let str2="" let str2=""

10
src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue

@ -174,13 +174,11 @@
item.subList.forEach(lst => { item.subList.forEach(lst => {
lst.scaned = false; lst.scaned = false;
lst.handleQty = null; lst.handleQty = null;
lst.packList.forEach(pack => { lst.packList=[]
pack.scaned = false;
pack.handleQty = null;
})
}) })
// this.$forceUpdate() // this.$forceUpdate()
// this.$emit('remove', item) // this.$emit('remove', item)
this.updateData()
} }
}); });
}, },
@ -200,8 +198,8 @@
this.editItem.handleQty = qty; this.editItem.handleQty = qty;
this.$emit('updateData') this.$emit('updateData')
}, },
updateData(index,packList) { updateData(item,type,index,ele) {
this.$emit('updateData',index,packList) this.$emit('updateData',item,type,index,ele)
} }
} }
} }

31
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -575,19 +575,36 @@
} }
}, },
updateData(ele,index) { updateData(type,item,index,ele) {
// if(this.managementType == 'BY_BATCH'){ if(type == 'parent'){
// }else{ item.packList=[]
// calcTreeHandleQty(this.detailSource) item.scaned = false
// } }else if(type == 'child'){
if(ele){ console.log(ele)
ele.packList.splice(index,1) ele.packList.splice(index,1)
if(ele.packList.length == 0){ if(ele.packList.length == 0){
ele.scaned = false ele.scaned = false
} }
this.packingNumberList.splice(index,1)
} }
this.packingNumberList = []
this.detailSource.forEach(item=>{
item.subList.forEach(cur=>{
if(cur.packList.length>0){
cur.packList.forEach(i=>{
this.packingNumberList.push(i)
})
}
})
})
setTimeout(()=>{
this.$refs.comReceiptDetailCardBacthRef.forEach(item=>{
item.resizeCollapse()
item.$refs.packageListRef.$refs.collapse2.forEach(cur=>{
cur.resize()
})
})
},500)
calcTreeHandleQty(this.detailSource); calcTreeHandleQty(this.detailSource);
}, },

300
src/pages/putaway/job/putawayDetail.vue

@ -16,7 +16,7 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<!-- 物料按照批次的组件 批次不显示包装 --> <!-- 物料按照批次的组件 批次不显示包装 -->
<comJobDetailCardBatch :dataContent="item" :index="index" :settingParam="jobContent" :isShowStatus="true" <comJobDetailCardBatch ref='comJobDetailCardBatchRef' :dataContent="item" :index="index" :settingParam="jobContent" :isShowStatus="true"
@remove="updateData" @updateData="updateData" :locationAreaTypeList='toLocationAreaTypeList' @remove="updateData" @updateData="updateData" :locationAreaTypeList='toLocationAreaTypeList'
:isShowPackListStatus="false" v-if="managementType == 'BY_BATCH'"> :isShowPackListStatus="false" v-if="managementType == 'BY_BATCH'">
</comJobDetailCardBatch> </comJobDetailCardBatch>
@ -277,7 +277,11 @@
updateData() { updateData() {
console.log("updateData") console.log("updateData")
// this.calcHandleQty(); // this.calcHandleQty();
if (this.managementType == 'BY_BATCH' || managementPrecision == 'BY_QUANTITY') {
calcHandleQty(this.detailSource);
} else {
calcTreeHandleQty(this.detailSource) calcTreeHandleQty(this.detailSource)
}
}, },
// //
openScanPopupSimulate(message) { openScanPopupSimulate(message) {
@ -329,8 +333,55 @@
}, },
getScanResult(result, managementPrecision) { getScanResult(result, managementPrecision) {
try {
this.managementType = managementPrecision this.managementType = managementPrecision
let array1 = []//
let array2 = []//
this.detailSource.forEach(item=>{
item.subList.forEach(cur=>{
array1.push(cur.fromLocationCode)
array2.push(cur.batch)
})
})
//
const obj1 = array1.find(item=>item == result.fromLocationCode)
const obj2 = array2.find(item=>item == result.label.batch)
// this.jobContent.allowModifyLocation = 'FALSE'
// this.jobContent.allowModifyBatch = 'FALSE'
if(this.jobContent.allowModifyLocation == 'FALSE'){
if(!obj1){
this.showErrorMessage(`不可以扫描推荐库位【${array1.join(',')}】以外的库位`)
return
}
}
if(this.jobContent.allowModifyBatch == 'FALSE'){
if(!obj2){
this.showErrorMessage(`不可以扫描推荐批次【${array2.join(',')}】以外的批次`)
return
}
}
if(!obj1){
this.recommendQty = 0
}else{
this.recommendQty = result.balance.qty
}
//
if (this.managementType == 'BY_BATCH' || managementPrecision == 'BY_QUANTITY') {
this.setDataBatch(result, managementPrecision)
} else {
this.setData(result, managementPrecision)
}
},
resizeCollapse() {
this.$nextTick(r => {
this.$refs.comJobDetailCardBatchRef.forEach(r => {
r.resizeCollapse();
})
});
},
//
setDataBatch(result, managementPrecision){
try {
var packingNumber = result.label.packingNumber; var packingNumber = result.label.packingNumber;
var batch = result.label.batch; var batch = result.label.batch;
var qty = result.label.qty; var qty = result.label.qty;
@ -349,56 +400,34 @@
this.showErrorMessage("物料号【" + itemCode + "】不在列表中") this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else { } else {
detail.scaned = true detail.scaned = true
if (this.managementType == 'BY_BATCH') {
this.verificationBatch(detail, packingNumber, batch, qty, itemCode, locationCode, result)
} else {
var itemDetail = detail.subList.find(r => { var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber && return r.batch == batch &&
r.batch == batch &&
r.fromLocationCode == result.fromLocationCode r.fromLocationCode == result.fromLocationCode
}) })
if (itemDetail == undefined) { if (itemDetail == undefined) {
var isExit; // let newItemDetail = {}
for (let subItem of detail.subList) { detail.subList.push({
var item; scaned:true,
for (let pack of subItem.packList) { fromLocationCode:result.fromLocationCode,
if (pack.packingNumber == packingNumber && toLocationCode:this.toLocationCode,
pack.batch == batch) { batch:result.label.batch,
item = pack; handleQty:result.label.qty,
isExit = pack; qty:this.recommendQty,
break; inventoryStatus:result.balance.inventoryStatus,
} toLocation:result.balance.toLocation,
} balance:result.balance,
if (item != undefined) { balanceQty:result.balance.qty,
subItem.scaned = true packQty:result.package.packQty,
subItem.handleQty = 0; packUnit:result.package.packUnit,
item = undefined uom:result.balance.uom,
} })
} setTimeout(r => {
if (isExit == undefined) { this.resizeCollapse();
this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【" + result
.fromLocationCode + "】不在列表中")
} else {
if (!isExit.cancleScanedHiht && isExit.scaned) {
this.showMessage("箱码【" + packingNumber + "】已经扫描")
} else {
isExit.scaned = true
let qty = 0;
if (result.balance != null) {
qty = Number(result.balance.qty);
} else {
qty = Number(result.label.qty);
}
isExit.handleQty = Number(result.label.qty);
isExit.toLocationCode = this.toLocationCode;
}
}
calcTreeHandleQty(this.detailSource);
this.continueScan()
this.$forceUpdate() this.$forceUpdate()
}, 100)
calcHandleQty(this.detailSource);
} else { } else {
var scanedLength = 0; var scanedLength = 0;
itemDetail.packList.forEach(res => { itemDetail.packList.forEach(res => {
@ -412,9 +441,12 @@
if (!itemDetail.cancleScanedHiht && itemDetail.scaned && scanedLength == itemDetail.packList if (!itemDetail.cancleScanedHiht && itemDetail.scaned && scanedLength == itemDetail.packList
.length) { .length) {
this.showMessage("箱码【" + packingNumber + "】已经扫描") // this.showMessage("" + packingNumber + "")
// this.showMessage("" + batch + "")
itemDetail.handleQty = calc.add(Number(result.label.qty),itemDetail.handleQty)
} else { } else {
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.balanceQty = result.balance.qty;
this.detailSource[0].subList.sort(compareAsc('scaned')); // this.detailSource[0].subList.sort(compareAsc('scaned')); //
itemDetail.handleQty = result.label.qty; itemDetail.handleQty = result.label.qty;
// itemDetail.toInventoryStatus = "OK" // itemDetail.toInventoryStatus = "OK"
@ -424,28 +456,42 @@
pac.toLocationCode = this.toLocationCode; pac.toLocationCode = this.toLocationCode;
}) })
calcTreeHandleQty(this.detailSource);
this.continueScan() this.continueScan()
this.$forceUpdate() this.$forceUpdate()
} }
calcHandleQty(this.detailSource);
} }
} }
}
if (this.managementType == 'BY_BATCH') {
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.packingNumber = ''
})
})
}
} catch (e) { } catch (e) {
this.showMessage(e.message) this.showMessage(e.message)
} }
}, },
//
verificationBatch(detail,packingNumber,batch,qty,itemCode,locationCode,result){ setData(result, managementPrecision){
try {
var packingNumber = result.label.packingNumber;
var batch = result.label.batch;
var qty = result.label.qty;
var itemCode = result.label.itemCode;
var locationCode = result.fromLocationCode;
if (!result.balance) {
this.showMessage("箱码【" + packingNumber + "】没有库存余额")
return;
}
// var inventoryStatus = "OK";
var detail = this.detailSource.find(r => r.itemCode == itemCode);
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
detail.scaned = true
var itemDetail = detail.subList.find(r => { var itemDetail = detail.subList.find(r => {
return r.batch == batch && return r.packingNumber == packingNumber &&
r.batch == batch &&
r.fromLocationCode == result.fromLocationCode r.fromLocationCode == result.fromLocationCode
}) })
@ -454,7 +500,8 @@
for (let subItem of detail.subList) { for (let subItem of detail.subList) {
var item; var item;
for (let pack of subItem.packList) { for (let pack of subItem.packList) {
if (pack.batch == batch) { if (pack.packingNumber == packingNumber &&
pack.batch == batch) {
item = pack; item = pack;
isExit = pack; isExit = pack;
break; break;
@ -466,14 +513,12 @@
item = undefined item = undefined
} }
} }
if (isExit == undefined) { if (isExit == undefined) {
this.showErrorMessage("批次【" + batch + "】库位【" + result this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【" + result
.fromLocationCode + "】不在列表中") .fromLocationCode + "】不在列表中")
} else { } else {
if (!isExit.cancleScanedHiht && isExit.scaned) { if (!isExit.cancleScanedHiht && isExit.scaned) {
// this.showMessage("" + batch + "") this.showMessage("箱码【" + packingNumber + "】已经扫描")
isExit.handleQty = calc.add(Number(result.label.qty),isExit.handleQty)
} else { } else {
isExit.scaned = true isExit.scaned = true
let qty = 0; let qty = 0;
@ -503,9 +548,7 @@
if (!itemDetail.cancleScanedHiht && itemDetail.scaned && scanedLength == itemDetail.packList if (!itemDetail.cancleScanedHiht && itemDetail.scaned && scanedLength == itemDetail.packList
.length) { .length) {
// this.showMessage("" + packingNumber + "") this.showMessage("箱码【" + packingNumber + "】已经扫描")
// this.showMessage("" + batch + "")
itemDetail.handleQty = calc.add(Number(result.label.qty),itemDetail.handleQty)
} else { } else {
itemDetail.scaned = true; itemDetail.scaned = true;
this.detailSource[0].subList.sort(compareAsc('scaned')); // this.detailSource[0].subList.sort(compareAsc('scaned')); //
@ -517,12 +560,22 @@
pac.toLocationCode = this.toLocationCode; pac.toLocationCode = this.toLocationCode;
}) })
calcTreeHandleQty(this.detailSource);
this.continueScan() this.continueScan()
this.$forceUpdate() this.$forceUpdate()
} }
calcTreeHandleQty(this.detailSource);
} }
}
if (this.managementType == 'BY_BATCH') {
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.packingNumber = ''
})
})
}
} catch (e) {
this.showMessage(e.message)
}
}, },
scanLocationCode(location, code) { scanLocationCode(location, code) {
this.toLocationCode = code this.toLocationCode = code
@ -556,21 +609,81 @@
} }
}); });
}, },
//
check(){
//
if (this.scanCount == this.subList.length) {
this.submitJob();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else {
//
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
if (res) {
this.openScanPopup(this.jobToLocationCode);
}
});
}
}
commit() { },
this.scanCount = getScanCount(this.subList); //
if (this.scanCount == 0) { checkBatch(){
//
let str = ''
let str1 = ''
let str2 = ''
var scanCount=0;
// this.jobContent.allowBiggerQty = "FALSE"
// this.jobContent.allowSmallerQty = "FALSE"
// this.jobContent.allowPartialComplete = "TRUE"
this.detailSource.forEach((item) => {
item.subList.forEach(cur=>{
if(cur.scaned){
scanCount++;
if(parseFloat(cur.qty)>parseFloat(cur.handleQty)){
str += `物料号【${item.itemCode}】批次【${cur.batch}】实际提交数量【${cur.handleQty}】不可以小于任务数量【${cur.qty}\n`
}
if(parseFloat(cur.qty)<parseFloat(cur.handleQty)){
str1 += `物料号【${item.itemCode}】批次【${cur.batch}】实际提交数量【${cur.handleQty}】不可以大于任务数量【${cur.qty}\n`
}
if(parseFloat(cur.handleQty)>parseFloat(cur.balanceQty)){
str2 += `物料号【${item.itemCode}】批次【${cur.batch}】实际提交数量【${cur.handleQty}】不可以大于库存数量【${cur.qty}\n`
}
}
})
})
if (scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描") this.showErrorMessage("扫描数为0,请先扫描")
return; return;
} }
if (!this.checkLocation()) { if (!this.checkLocation()) {
return return
} }
if(this.jobContent.allowBiggerQty == "FALSE"){
// if(str1){
if (this.scanCount == this.subList.length) { this.$refs.comMessage.showErrorMessage(str1);
this.submitJob(); return;
} else if (this.scanCount < this.subList.length) { }
}
if(this.jobContent.allowSmallerQty == "FALSE"){
if(str){
this.$refs.comMessage.showErrorMessage(str);
return;
}
}
if(str2){
this.$refs.comMessage.showErrorMessage(str2);
return;
}
if(this.scanCount < this.subList.length){
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
@ -583,28 +696,42 @@
// //
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup(this.jobToLocationCode);
} }
}); });
} }
}else{
this.submitJob();
} }
}, },
submitJob() { commit() {
uni.showLoading({
title: "提交中....",
mask: true
});
var itemCodes = [] var itemCodes = []
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
itemCodes.push(item.itemCode) itemCodes.push(item.itemCode)
}) })
// //
getManagementPrecisions(itemCodes, this.toLocationCode, res => { getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) { if (res.success) {
this.managementList = res.list; this.managementList = res.list;
this.managementType = this.managementList&&this.managementList[0]&&this.managementList[0].ManagementPrecision ? this.managementList[0].ManagementPrecision : 'BY_PACKAGING'
if(this.managementType == 'BY_BATCH' || this.managementType == 'BY_QUANTITY'){
this.checkBatch()
}else{
this.check()
}
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
})
},
submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
});
var params = this.setParams() var params = this.setParams()
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
putawayJobSubmit(params).then(res => { putawayJobSubmit(params).then(res => {
@ -618,11 +745,6 @@
uni.hideLoading() uni.hideLoading()
this.showErrorMessage(error) this.showErrorMessage(error)
}) })
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
});
}, },
setParams() { setParams() {

4
src/pages/unPlanned/job/receiptJobDetail.vue

@ -105,7 +105,7 @@
managementList: [], managementList: [],
managementType:'', managementType:'',
jobStatus: "", jobStatus: "",
jobToLocationCode: "" jobToLocationCode: "",
}; };
}, },
onLoad(option) { onLoad(option) {
@ -385,8 +385,6 @@
return; return;
} }
} }
console.log(11,scanCount)
console.log(11,this.subList.length)
if (scanCount < this.subList.length){ if (scanCount < this.subList.length){
if(this.jobContent.allowPartialComplete == "TRUE"){ if(this.jobContent.allowPartialComplete == "TRUE"){
this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {

Loading…
Cancel
Save