Browse Source

修改跳转任务自动扫描

hella_online_20240829
lijuncheng 4 months ago
parent
commit
c14f45f9b6
  1. 29
      src/common/scan.js
  2. 2
      src/mycomponents/package/packageCard.vue
  3. 18
      src/mycomponents/scan/winScanPack.vue
  4. 46
      src/mycomponents/scan/winScanPackAndLocation.vue
  5. 29
      src/pages/issue/coms/comScanIssuePack.vue
  6. 26
      src/pages/productPutaway/job/productPutawayDetail.vue
  7. 13
      src/pages/productPutaway/job/productPutawayJob.vue
  8. 47
      src/pages/productReceipt/job/ccProductReceiptDetail.vue
  9. 24
      src/pages/productReceipt/job/ccProductReceiptJob.vue
  10. 16
      src/pages/productReceipt/job/fgProductReceiptDetail.vue
  11. 27
      src/pages/productReceipt/job/productReceiptDetail.vue
  12. 27
      src/pages/productionReceipt/job/productionReceiptDetail.vue
  13. 12
      src/pages/productionReceipt/job/productionReceiptJob.vue
  14. 33
      src/pages/purchaseReceipt/job/receiptDetail.vue
  15. 11
      src/pages/purchaseReceipt/job/receiptJob.vue
  16. 28
      src/pages/putaway/job/putawayDetail.vue
  17. 15
      src/pages/putaway/job/putawayJob.vue
  18. 53
      src/pages/repleinsh/coms/comScanReplishPack.vue
  19. 9
      src/pages/repleinsh/job/repleinshDetail.vue
  20. 5
      src/pages/repleinsh/job/repleinshJob.vue

29
src/common/scan.js

@ -1,29 +0,0 @@
import {
getLabelInfo
} from '@/common/label.js';
// export function getLabelInfoResult(scanMsg, headerType callBackInfo) {
// let index = scanMsg.indexOf('\n');
// if (index >= 0) {
// // let content = uni.$u.trim(scanMsg)
// let content = scanMsg
// if (content == "") {
// return ""
// }
// getLabelInfo(content, headerType, callback => {
// let scanResult = callback;
// scanResult.scanMessage = content
// if (scanResult.success) {
// return scanResult
// } else {
// return ""
// }
// });
// }
// }
export function getLabelInfoResult(){
}

2
src/mycomponents/package/packageCard.vue

@ -101,7 +101,7 @@
}else{
newVal.copyContent = ''
}
console.log('newVal.copyContent',newVal.copyContent)
// console.log('newVal.copyContent',newVal.copyContent)
},
immediate: true,
deep: true

18
src/mycomponents/scan/winScanPack.vue

@ -20,13 +20,15 @@
</view>
</view>
</uni-popup>
<!-- 模拟扫描功能 -->
<win-com-scan v-show="false" ref="comscansimulate" @getResult="getScanResult" :headerType="headerType" :isShowHistory="false" :clearResult="true"></win-com-scan>
<comMessage ref="comMessage" @afterClose="getfocus"></comMessage>
</view>
</template>
<script>
import {
getLabelInfo
} from '@/common/label.js';
import winComScan from '@/mycomponents/scan/winComScan.vue'
export default {
@ -57,9 +59,15 @@
},
methods: {
simulateScan(item){
this.$refs.comscansimulate.setItemCodeSimulate(item.copyContent)
this.$refs.comscansimulate.clickScanMsg();
simulateScan(scanMessage){
getLabelInfo(scanMessage, this.headerType, callback => {
if (callback.success) {
this.getScanResult(callback);
} else {
this.showMessage(callback.message)
}
})
},
openScanPopup() {
setTimeout(res => {

46
src/mycomponents/scan/winScanPackAndLocation.vue

@ -1,6 +1,6 @@
<template>
<view>
<uni-popup ref="popup" @change="change" :mask-click="false" >
<uni-popup ref="popup" @change="change" :mask-click="false">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx;">
@ -46,9 +46,6 @@
</view>
</uni-popup>
<balance-select ref="balanceSelect" @onSelectItem='selectBalanceItem'></balance-select>
<!-- 模拟扫描功能 -->
<win-com-scan v-show="false" ref="comscansimulate" @getResult="getScanResult" :headerType="headerType"
:isShowHistory="false" :clearResult="true"></win-com-scan>
</view>
<comMessage ref="comMessage"></comMessage>
@ -65,6 +62,11 @@
getBasicLocationByCode,
} from '@/api/request2.js';
import {
getLabelInfo
} from '@/common/label.js';
import {
getListLocationAreaTypeDesc,
checkDirectoryItemExist,
@ -144,7 +146,7 @@
},
methods: {
handleConfirm() {
this.$emit('confirm', this.fromLocationCode)
},
@ -162,7 +164,7 @@
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.outAreaTypes); //
if (!this.show) {
setTimeout(res => {
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
}
@ -189,16 +191,10 @@
this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); //
},
//
openScanPopupForJobSimulate(fromLocationCode, fromLocationList, jobContent, item) {
openScanPopupForJobSimulate(fromLocationCode, fromLocationList, jobContent, scanMessage) {
this.fromLocationCode = fromLocationCode;
this.fromLocationList = fromLocationList;
if (fromLocationCode != '') {
// this.packGetFocus();
if (this.$refs.comscansimulate != undefined) {
this.$refs.comscansimulate.getfocus();
}
} else {
if (!fromLocationCode) {
if (this.fromLocationList.length == 0) {
// this.locationGetFocus();
alert('没有来源库位:List')
@ -210,14 +206,14 @@
this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); //
let timer = setTimeout(res => {
if (timer) {
clearTimeout(timer)
getLabelInfo(scanMessage, this.headerType, callback => {
if (callback.success) {
this.getScanResult(callback);
} else {
this.showErrorMessage(callback.message, res => {})
}
this.$refs.comscansimulate.setItemCodeSimulate(item.copyContent)
this.$refs.comscansimulate.clickScanMsg();
}, 500)
})
},
@ -252,7 +248,7 @@
getBasicLocationByCode(this.fromLocationCode).then(res => {
if (res.data.total > 0) {
let result = res.data.list[0];
if(result.code!=this.fromLocationCode){
if (result.code != this.fromLocationCode) {
this.showErrorMessage('未查询到库位[' + this.fromLocationCode + ']')
return;
}
@ -313,7 +309,7 @@
// mask: true
// })
// -- fromInventoryStatuses
getBalanceByManagementPrecisionByPacking(result.label,result.package, this.fromLocationCode, this
getBalanceByManagementPrecisionByPacking(result.label, result.package, this.fromLocationCode, this
.balanceFromInventoryStatuses ? this.fromInventoryStatuses : undefined,
res => {
uni.hideLoading();
@ -339,16 +335,16 @@
if (this.allowNullBalance) {
this.allowNoneBalance(datas);
} else if (this.noShowBalanceMessage) {
if(this.isCount){
if (this.isCount) {
this.countCallBack(datas);
}else {
} else {
if (Array.isArray(datas)) {
this.countCallBack(datas[0]);
} else {
this.countCallBack(datas);
}
}
} else {
this.mustHavaBalance(datas);
}

29
src/pages/issue/coms/comScanIssuePack.vue

@ -96,9 +96,9 @@
<comMessage ref="comMessage"></comMessage>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="true"></balance-qty-edit>
<!-- 模拟扫描功能 -->
<win-com-scan v-show="false" ref="comscansimulate" placeholder="箱标签" @getResult="onScan" :clearResult="true"
<!-- <win-com-scan v-show="false" ref="comscansimulate" placeholder="箱标签" @getResult="onScan" :clearResult="true"
headerType="HPQ,HMQ" :isShowHistory="false">
</win-com-scan>
</win-com-scan> -->
</view>
</template>
@ -119,6 +119,10 @@
import {
uniqueArray
} from '@/common/basic.js';
import {
getLabelInfo
} from '@/common/label.js';
import {
calc
@ -185,18 +189,15 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
this.dataContent = content;
this.jobContent = jobcontent;
this.initData();
// this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
// "-" + this.jobContent.subList[0].workStationCode
if (this.$refs.comscansimulate != undefined) {
this.$refs.comscansimulate.getfocus();
}
let timer = setTimeout(res => {
if(timer){
clearTimeout(timer)
}
this.$refs.comscansimulate.setItemCodeSimulate(scanMessage)
this.$refs.comscansimulate.clickScanMsg();
}, 500)
getLabelInfo(scanMessage, "HPQ,HMQ", callback => {
if (callback.success) {
this.onScan(callback);
} else {
this.showErrorMessage(callback.message, res => {})
}
})
},
openScanPopup(content, jobcontent) {

26
src/pages/productPutaway/job/productPutawayDetail.vue

@ -113,7 +113,7 @@
type: "",
isCheckLocation: false,
switchCode: "",
scanedPackingNumber: '',
scanMessage: '',
hintTitle:"",
status:''
};
@ -122,7 +122,7 @@
this.id = option.id;
this.type = option.type;
this.scanedPackingNumber = option.scaned || '';
this.scanMessage = option.scanMessage ;
this.status = option.status || ''
if (this.type == 'predict') {
this.switchCode = "SemiPutawayLocationCodeValidate"
@ -218,19 +218,11 @@
that.toLocationCode = ""
} else {
that.toLocationCode = that.jobToLocationCode;
}
that.detailSource.forEach(r => {
r.subList.forEach(s => {
if (this.scanedPackingNumber && this.scanedPackingNumber == s
.packingNumber) {
s.scaned = true
s.cancleScanedHiht = true
// s.handleQty =s.qty
this.openScanPopupSimulate(s)
this.scanedPackingNumber = ''
}
})
})
}
if(this.scanMessage){
this.openScanPopupSimulate(this.scanMessage)
}
} else {
that.showMessage('列表数据为0');
}
@ -264,7 +256,7 @@
openDetail(item) {
this.$refs.detailInfoPopup.openPopup(item)
},
openScanPopupSimulate(item) {
openScanPopupSimulate(scanMessage) {
let fromlocationCode = '';
let fromlocationList = [];
for (var i = 0; i < this.detailSource.length; i++) {
@ -281,7 +273,7 @@
}
})
}
this.$refs.scanPopup.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, this.jobContent,item);
this.$refs.scanPopup.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, this.jobContent,scanMessage);
},
openScanPopup() {

13
src/pages/productPutaway/job/productPutawayJob.vue

@ -79,6 +79,7 @@
status: '1,2', //
detailOptions: [],
detailGiveupOptions: [],
scanMessage:""
};
},
props: {
@ -218,11 +219,11 @@
})
},
openJobDetail(item, packingNumber = '') {
openJobDetail(item, scanMessage = '') {
uni.navigateTo({
url: './productPutawayDetail?id=' + item.masterId + '&status=' + item.status + '&type=' + item.type + '&scaned=' + packingNumber +'&title='+this.title
url: './productPutawayDetail?id=' + item.masterId + '&status=' + item.status + '&type=' + item.type + '&scanMessage=' + this.scanMessage +'&title='+this.title
});
this.scanMessage=""
},
showItemList(itemList) {
@ -332,10 +333,11 @@
},
selectItem(item) {
this.$refs.scanPopup.closeScanPopup();
this.openJobDetail(item, item.packingNumber);
this.openJobDetail(item, this.scanMessage);
},
getScanResult(result) {
try {
this.scanMessage =""
var filters = [{
column: "packingNumber",
action: "==",
@ -381,7 +383,8 @@
filters: filters,
pageNo: 1,
pageSize: 100,
}).then(res => {
}).then(res => {
this.scanMessage =result.scanMessage
let resultList = res.data.list;
if (resultList.length > 0) {
resultList.forEach(item => {

47
src/pages/productReceipt/job/ccProductReceiptDetail.vue

@ -53,7 +53,8 @@
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<locationCompare ref="comScanLocation" title="收货库位" :isShowEdit="jobContent.allowModifyLocation=='TRUE'" :recommendLocationCode="jobToLocationCode"
<locationCompare ref="comScanLocation" title="收货库位"
:isShowEdit="jobContent.allowModifyLocation=='TRUE'" :recommendLocationCode="jobToLocationCode"
:locationCode="toLocationCode" @getLocation='scanLocationCode'
:locationAreaTypeList="toLocationAreaTypeList"></locationCompare>
</view>
@ -134,23 +135,23 @@
managementList: [],
jobStatus: "",
jobToLocationCode: "",
scanedPackingNumber: '',
status:''
scanMessage: "",
status: '',
};
},
onLoad(option) {
setTimeout(res=>{
setTimeout(res => {
uni.setNavigationBarTitle({
title: option.title+'详情'
title: option.title + '详情'
})
},50)
}, 50)
this.id = option.id;
this.scanedPackingNumber = option.scaned || '';
this.scanMessage = option.scanMessage;
this.status = option.status || ''
},
onShow(){
onShow() {
if (this.id != undefined) {
//
if (this.status == "1") {
@ -224,26 +225,14 @@
that.subList = res.data.subList;
that.jobStatus = res.data.status
that.jobToLocationCode = that.subList[0].toLocationCode
if(that.jobContent.allowModifyLocation=='FALSE'){
if (that.jobContent.allowModifyLocation == 'FALSE') {
that.toLocationCode = that.subList[0].toLocationCode
}
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList)
that.detailSource.forEach(r => {
r.subList.forEach(s => {
if (this.scanedPackingNumber && this.scanedPackingNumber == s
.packingNumber){
s.scaned = true
s.cancleScanedHiht = true
s.copyContent = "HMQ;V1.0;I" + s.itemCode + ";P" + s.packingNumber + ";B" + s.batch + ";Q" + s.qty
this.$refs.scanPopup.simulateScan(s);
this.scanedPackingNumber = ''
// s.handleQty =s.qty
}
})
})
if (that.scanMessage) {
this.$refs.scanPopup.simulateScan(that.scanMessage);
}
} else {
that.showMessage('列表数据为0');
}
@ -255,7 +244,7 @@
},
getScanResult(result) {
let label = result.label;
var packingNumber = label.packingNumber;
var batch = label.batch;
@ -272,7 +261,7 @@
if (itemDetail == undefined) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在任务列表中")
} else {
if (!itemDetail.cancleScanedHiht&&itemDetail.scaned) {
if (itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描")
} else {
itemDetail.scaned = true;
@ -421,7 +410,7 @@
ccProductReceiptJobsubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成装配收货记录<br>" + res.data )
this.showCommitSuccessMessage("提交成功<br>生成装配收货记录<br>" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}

24
src/pages/productReceipt/job/ccProductReceiptJob.vue

@ -80,7 +80,8 @@
detailOptions: [],
detailGiveupOptions: [],
type: 'assemble',
title:""
title:"",
scanMessage:""
};
},
// type = 'assemble'
@ -208,11 +209,12 @@
})
},
openJobDetail(item, packingNumber = '') {
openJobDetail(item, scanMessage = '') {
uni.navigateTo({
url: './ccProductReceiptDetail?id=' + item.masterId + '&status=' + item.status + '&scaned=' +
packingNumber + '&title=' + this.title
url: './ccProductReceiptDetail?id=' + item.masterId + '&status=' + item.status + '&scanMessage=' +
scanMessage + '&title=' + this.title
});
this.scanMessage =""
// if (this.type == 'predict') {
// uni.navigateTo({
// url: './productReceiptDetail?id=' + item.masterId + '&status=' + item.status + '&scaned=' + packingNumber +'&title='+this.title
@ -342,10 +344,11 @@
},
selectItem(item) {
this.$refs.scanPopup.closeScanPopup();
this.openJobDetail(item, item.packingNumber);
this.openJobDetail(item, this.scanMessage);
},
getScanResult(result) {
try {
this.scanMessage =""
var filters = [{
column: "packingNumber",
action: "==",
@ -375,18 +378,19 @@
column: "status",
action: "in",
value: '1,2',
},
{
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
}
// {
// column: "fromLocationCode",
// action: "==",
// value: result.label.fromLocationCode
// }
]
getProductReceiptJobList({
filters: filters,
pageNo: 1,
pageSize: 100,
}).then(res => {
this.scanMessage =result.scanMessage
let resultList = res.data.list;
if (resultList.length > 0) {
resultList.forEach(item => {

16
src/pages/productReceipt/job/fgProductReceiptDetail.vue

@ -143,7 +143,7 @@
jobToLocationCode: "",
fgList: [],
itemCode: "",
scanedPackingNumber: ''
scanMessage: "",
};
},
onLoad(option) {
@ -151,7 +151,7 @@
title: option.title+'详情'
})
this.id = option.id;
this.scanedPackingNumber = option.scaned || '';
this.scanMessage = option.scanMessage ;
if (this.id != undefined) {
//
if (option.status == "1") {
@ -231,18 +231,6 @@
}
that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
that.detailSource = getDataSource(that.subList)
that.detailSource.forEach(r => {
r.subList.forEach(s => {
if (this.scanedPackingNumber && this.scanedPackingNumber == s
.packingNumber) {
s.scaned = true
//
this.$refs.scanPopup.simulateScan(s);
this.scanedPackingNumber = ''
}
})
})
} else {
that.showMessage('列表数据为0');

27
src/pages/productReceipt/job/productReceiptDetail.vue

@ -134,8 +134,8 @@
managementList: [],
jobStatus: "",
jobToLocationCode: "",
scanedPackingNumber: '',
status:''
status:'',
scanMessage:""
};
},
onLoad(option) {
@ -144,7 +144,7 @@
})
this.id = option.id;
this.scanedPackingNumber = option.scaned || '';
this.scanMessage =option.scanMessage;
this.status = option.status || ''
},
@ -227,21 +227,10 @@
}
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList)
that.detailSource.forEach(r => {
r.subList.forEach(s => {
if (this.scanedPackingNumber && this.scanedPackingNumber == s
.packingNumber){
s.scaned = true
s.cancleScanedHiht = true
s.copyContent = "HMQ;V1.0;I" + s.itemCode + ";P" + s.packingNumber + ";B" + s.batch + ";Q" + s.qty
this.$refs.scanPopup.simulateScan(s);
this.scanedPackingNumber = ''
// s.handleQty =s.qty
}
})
})
if(that.scanMessage){
this.$refs.scanPopup.simulateScan(that.scanMessage);
}
} else {
that.showMessage('列表数据为0');
}
@ -270,7 +259,7 @@
if (itemDetail == undefined) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在任务列表中")
} else {
if (!itemDetail.cancleScanedHiht&&itemDetail.scaned) {
if (itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描")
} else {
itemDetail.scaned = true;

27
src/pages/productionReceipt/job/productionReceiptDetail.vue

@ -109,7 +109,7 @@
jobStatus: "",
jobToLocationCode: "",
isCheckLocation: false,
scanedPackingNumber: ''
scanMessage: ''
};
},
onLoad(option) {
@ -117,7 +117,7 @@
title: option.title+'详情'
})
this.id = option.id;
this.scanedPackingNumber = option.scaned || '';
this.scanMessage = option.scanMessage;
if (this.id != undefined) {
//
if (option.status == "1") {
@ -195,20 +195,9 @@
} else {
that.toLocationCode = that.jobToLocationCode;
}
that.detailSource.forEach(r => {
r.subList.forEach(s => {
if (this.scanedPackingNumber && this.scanedPackingNumber == s
.packingNumber) {
s.scaned = true
s.cancleScanedHiht = true
//
this.openScanPopupSimulate(s);
this.scanedPackingNumber = ''
}
})
})
if(this.scanMessage){
this.openScanPopupSimulate(this.scanMessage);
}
} else {
that.showMessage('列表数据为0');
}
@ -270,7 +259,7 @@
},
//
openScanPopupSimulate(item) {
openScanPopupSimulate(scanMessage) {
let fromlocationCode = '';
let fromlocationList = [];
@ -291,7 +280,7 @@
})
}
this.$refs.scanPopup.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, this.jobContent,
item);
scanMessage);
},
getScanResult(result) {
@ -321,7 +310,7 @@
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]库位[" + locationCode +
"]不在列表中")
} else {
if (!itemDetail.cancleScanedHiht&&itemDetail.scaned) {
if (itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]库位[" + locationCode +
"]已经扫描")
} else {

12
src/pages/productionReceipt/job/productionReceiptJob.vue

@ -80,7 +80,8 @@
status: '1,2', //
detailOptions: [],
detailGiveupOptions: [],
title:''
title:'',
scanMessage:""
};
},
onLoad(option){
@ -195,10 +196,11 @@
})
},
openJobDetail(item, packingNumber = '') {
openJobDetail(item, scanMessage = '') {
uni.navigateTo({
url: './productionReceiptDetail?id=' + item.masterId + '&status=' + item.status+'&scaned=' + packingNumber +'&title='+this.title
url: './productionReceiptDetail?id=' + item.masterId + '&status=' + item.status+'&scanMessage=' + scanMessage +'&title='+this.title
});
this.scanMessage=""
},
showItemList(itemList) {
@ -308,10 +310,11 @@
},
selectItem(item) {
this.$refs.scanPopup.closeScanPopup();
this.openJobDetail(item,item.packingNumber);
this.openJobDetail(item,this.scanMessage);
},
getScanResult(result) {
try {
this.scanMessage=""
var filters = [{
column: "packingNumber",
action: "==",
@ -338,6 +341,7 @@
pageNo: 1,
pageSize: 100,
}).then(res => {
this.scanMessage = result.scanMessage
let resultList = res.data.list;
if (resultList.length > 0) {
resultList.forEach(item => {

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

@ -141,7 +141,7 @@
jobStatus: "",
isAllReceived: false,
operation: '',
scanedPackingNumber: '',
scanMessage: '',
status: '',
switchCode:"",
isCheckLocation: 'purchaseReceiptLocationCodeValidate',//
@ -152,7 +152,7 @@
onLoad(option) {
this.id = option.id;
this.scanedPackingNumber = option.scaned || '';
this.scanMessage = option.scanMessage;
this.operation = option.operation;
this.status = option.status;
this.switchCode = "purchasereceiptPrintPDA"//pda
@ -248,24 +248,11 @@
that.toLocationCode = that.jobToLocationCode;
}
that.isAllReceived = false;
nextTick(() => {
that.detailSource.forEach(r => {
r.subList.forEach(s => {
if (this.scanedPackingNumber && this
.scanedPackingNumber == s
.packingNumber) {
s.scaned = true
s.cancleScanedHiht = true
s.copyContent = "HPQ;V1.0;I" + s.itemCode +
";P" + s.packingNumber + ";B" + s.batch +
";Q" + s.qty
this.$refs.scanPopup.simulateScan(s);
this.scanedPackingNumber = ''
}
})
})
})
//ASN
if(this.scanMessage){
this.$refs.scanPopup.simulateScan(this.scanMessage);
}
} else {
that.showMessage('列表数据为0');
}
@ -292,7 +279,7 @@
if (itemDetail.length == 0) {
this.showErrorMessage("物料【" + itemCode + "】、托码【" + containerNumber + "】不在列表中")
} else {
if (!itemDetail[0].cancleScanedHiht && itemDetail[0].scaned) {
if (itemDetail[0].scaned) {
this.showErrorMessage("物料【" + itemCode + "】、托码【" + containerNumber + "】已经扫描")
} else {
itemDetail.forEach(item => {
@ -339,7 +326,7 @@
if (isExit == undefined) {
this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中")
} else {
if (!isExit.cancleScanedHiht && isExit.scaned) {
if ( isExit.scaned) {
this.showMessage("箱码【" + packingNumber + "】已经扫描")
} else {
isExit.scaned = true
@ -357,7 +344,7 @@
scanedLength++;
}
})
if (!itemDetail.cancleScanedHiht && itemDetail.scaned && scanedLength == itemDetail
if (itemDetail.scaned && scanedLength == itemDetail
.packList.length) {
this.showMessage("箱码【" + packingNumber + "】已经扫描")
} else {

11
src/pages/purchaseReceipt/job/receiptJob.vue

@ -78,6 +78,7 @@
status: '1,2', //
detailOptions: [],
detailGiveupOptions: [],
scanMessage:""
};
},
@ -286,11 +287,12 @@
})
},
openJobDetail(item, packingNumber = '') {
openJobDetail(item, scanMessage = '') {
uni.navigateTo({
url: './receiptDetail?id=' + item.masterId + '&status=' + item.status + '&operation=' + this
.operation + '&scaned=' + packingNumber
.operation + '&scanMessage=' + scanMessage
});
this.scanMessage=""
},
showItemList(itemList) {
@ -367,14 +369,14 @@
if(isScanedASN){
this.openJobDetail(item)
}else{
;
this.openJobDetail(item, item.packingNumber);
this.openJobDetail(item, this.scanMessage);
}
},
getScanResult(result) {
try {
this.scanMessage=""
let filters = []
if (result.label.barType == "BarCode") {
// ASN
@ -430,6 +432,7 @@
pageNo: 1,
pageSize: 100,
}).then(res => {
this.scanMessage =result.scanMessage
let resultList = res.data.list;
if (resultList.length > 0) {
resultList.forEach(item => {

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

@ -52,7 +52,7 @@
import {
getManagementPrecisions,
} from '@/common/balance.js';
import {
getPutawayJobDetail,
putawayJobSubmit,
@ -110,7 +110,7 @@
jobStatus: "",
jobToLocationCode: "",
isCheckLocation: false,
scanedPackingNumber: ''
scanMessage:""
};
},
onLoad(option) {
@ -118,7 +118,7 @@
title: option.title+'详情'
})
this.id = option.id;
this.scanedPackingNumber = option.scaned || '';
this.scanMessage =option.scanMessage
if (this.id != undefined) {
//
if (option.status == "1") {
@ -202,20 +202,10 @@
} else {
that.toLocationCode = that.jobToLocationCode;
}
that.detailSource.forEach(r => {
r.subList.forEach(s => {
if (this.scanedPackingNumber && this.scanedPackingNumber == s
.packingNumber) {
s.scaned = true
s.cancleScanedHiht = true
s.packList.forEach(item=>item.scaned = true)
s.inventoryStatus = s.inspectResult; //
this.openScanPopupSimulate(s)
this.scanedPackingNumber = ''
}
})
})
//
if(this.scanMessage){
this.openScanPopupSimulate(this.scanMessage)
}
} else {
that.showMessage('列表数据为0');
@ -261,7 +251,7 @@
calcTreeHandleQty(this.detailSource)
},
//
openScanPopupSimulate(item){
openScanPopupSimulate(message){
let fromlocationCode = '';
let fromlocationList = [];
@ -279,7 +269,7 @@
}
})
}
this.$refs.scanPopup.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, this.jobContent,item);
this.$refs.scanPopup.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, this.jobContent,message);
},
openScanPopup() {

15
src/pages/putaway/job/putawayJob.vue

@ -83,7 +83,8 @@ import { Exception } from 'sass';
status: '1,2', //
detailOptions: [],
detailGiveupOptions: [],
title:''
title:'',
scanMessage:""
};
},
@ -202,6 +203,7 @@ import { Exception } from 'sass';
uni.navigateTo({
url: './putawayDetail?id=' + item.masterId + '&status=' + item.status + '&title='+this.title
});
this.scanMessage=""
},
showItemList(itemList) {
@ -316,11 +318,18 @@ import { Exception } from 'sass';
selectItem(item) {
this.$refs.scanPopup.closeScanPopup();
uni.navigateTo({
url: './putawayDetail?id=' + item.masterId + '&status=' + item.status+'&scaned='+item.packingNumber+ '&title='+this.title
url: './putawayDetail?id='
+ item.masterId
+ '&status=' + item.status
+'&scaned='+item.packingNumber
+ '&title='+this.title
+"&scanMessage="+this.scanMessage
});
this.scanMessage=""
},
getScanResult(result) {
try {
this.scanMessage =""
var filters = [{
column: "packingNumber",
action: "==",
@ -362,7 +371,7 @@ import { Exception } from 'sass';
pageNo: 1,
pageSize: 100,
}).then(res => {
console.log('getPutawayJobList', getPutawayJobList)
this.scanMessage =result.scanMessage
let resultList = res.data.list;
if (resultList.length > 0) {
resultList.forEach(item => {

53
src/pages/repleinsh/coms/comScanReplishPack.vue

@ -7,26 +7,6 @@
扫描箱码
<text class="fr" @click="closeScanPopup()">关闭</text>
</view>
<!-- <view class="uni-flex uni-row" style="align-items: center;
background-color: #fff;
margin-left: 20rpx;
margin-right: 20rpx;
padding:20rpx;
border-radius: 8rpx;">
<view class="uni-center">
位置 :
</view>
<view class="" style="width: 75%;padding: 0rpx">
<view class="uni-flex u-col-center uni-row" @click="showSelect">
<view class="" style="margin-left: 15rpx;font-size: 30rpx;">
{{positionInfo}}
</view>
<u-select v-model="show" mode="mutil-column-auto" :list="positionList" :defaultValue="defaultValueList"
@confirm="confirmSelect"></u-select>
</view>
</view>
</view> -->
<!-- <u-line class='line_color'></u-line> -->
<view class="uni-flex uni-row" style="align-items: center;
background-color: #fff;
@ -120,6 +100,11 @@
import {
getDirectoryItemArray
} from '../../../common/directory.js';
import {
getLabelInfo
} from '@/common/label.js';
export default {
name: 'winScanPack',
@ -152,7 +137,6 @@
expand: true,
scanOptions: {},
editItem: {},
positionInfo: "请选择位置",
positionList: [],
defaultValueList: [],
label: {},
@ -174,12 +158,25 @@
this.dataContent = content;
this.jobContent = jobcontent;
this.initData();
this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
"-" + this.jobContent.subList[0].workStationCode
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
openScanPopupForJobSimulate(content, jobcontent,scanMessage) {
this.issueRecord = [];
this.dataContent = content;
this.jobContent = jobcontent;
this.initData();
getLabelInfo(scanMessage, this.headerType, callback => {
if (callback.success) {
this.onScan(callback);
} else {
this.showErrorMessage(callback.message)
}
})
},
closeScanPopup() {
this.$refs.popup.close();
@ -662,10 +659,16 @@
},
packGetFocus() {
this.$refs.comscan.getfocus();
if(this.$refs.comscan){
this.$refs.comscan.getfocus();
}
},
packLoseFocus() {
this.$refs.comscan.losefocus();
if(this.$refs.comscan){
this.$refs.comscan.losefocus();
}
},
showMessage(message, callback) {
setTimeout(r => {

9
src/pages/repleinsh/job/repleinshDetail.vue

@ -98,7 +98,8 @@
scanOptions: [],
toLocationCode: '',
toLocationAreaTypeList: [],
jobStatus: ""
jobStatus: "",
scanMessage:""
};
},
@ -111,6 +112,7 @@
title: option.title+'详情'
})
this.id = option.id;
this.scanMessage =option.scanMessage
if (this.id != undefined) {
//
if (option.status == "1") {
@ -188,7 +190,10 @@
that.toLocationCode = that.subList[0].toLocationCode
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.detailSource, that.subList)
if(that.scanMessage){
this.$refs.comScanIssuePack.openScanPopupForJobSimulate(this.detailSource, this.jobContent,that.scanMessage);
}
setTimeout(r => {
that.resizeCollapse();
}, 100)

5
src/pages/repleinsh/job/repleinshJob.vue

@ -77,7 +77,8 @@
status: '1,2', //
detailOptions: [],
detailGiveupOptions: [],
title:''
title:'',
scanMessage:""
};
},
onLoad(option){
@ -209,6 +210,7 @@
uni.navigateTo({
url: './repleinshDetail?id=' + item.masterId + '&status=' + item.status+'&scanMessage=' + scanMessage +'&title='+this.title
});
this.scanMessage=""
},
showItemList(itemList) {
@ -318,6 +320,7 @@
this.openJobDetail(item,this.scanMessage);
},
getScanResult(result) {
this.scanMessage=""
if(!result.label.batch){
this.showMessage("批次为空")
return;

Loading…
Cancel
Save