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{ }else{
newVal.copyContent = '' newVal.copyContent = ''
} }
console.log('newVal.copyContent',newVal.copyContent) // console.log('newVal.copyContent',newVal.copyContent)
}, },
immediate: true, immediate: true,
deep: true deep: true

18
src/mycomponents/scan/winScanPack.vue

@ -20,13 +20,15 @@
</view> </view>
</view> </view>
</uni-popup> </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> <comMessage ref="comMessage" @afterClose="getfocus"></comMessage>
</view> </view>
</template> </template>
<script> <script>
import {
getLabelInfo
} from '@/common/label.js';
import winComScan from '@/mycomponents/scan/winComScan.vue' import winComScan from '@/mycomponents/scan/winComScan.vue'
export default { export default {
@ -57,9 +59,15 @@
}, },
methods: { methods: {
simulateScan(item){ simulateScan(scanMessage){
this.$refs.comscansimulate.setItemCodeSimulate(item.copyContent) getLabelInfo(scanMessage, this.headerType, callback => {
this.$refs.comscansimulate.clickScanMsg(); if (callback.success) {
this.getScanResult(callback);
} else {
this.showMessage(callback.message)
}
})
}, },
openScanPopup() { openScanPopup() {
setTimeout(res => { setTimeout(res => {

46
src/mycomponents/scan/winScanPackAndLocation.vue

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

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

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

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

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

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

@ -79,6 +79,7 @@
status: '1,2', // status: '1,2', //
detailOptions: [], detailOptions: [],
detailGiveupOptions: [], detailGiveupOptions: [],
scanMessage:""
}; };
}, },
props: { props: {
@ -218,11 +219,11 @@
}) })
}, },
openJobDetail(item, packingNumber = '') { openJobDetail(item, scanMessage = '') {
uni.navigateTo({ 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) { showItemList(itemList) {
@ -332,10 +333,11 @@
}, },
selectItem(item) { selectItem(item) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
this.openJobDetail(item, item.packingNumber); this.openJobDetail(item, this.scanMessage);
}, },
getScanResult(result) { getScanResult(result) {
try { try {
this.scanMessage =""
var filters = [{ var filters = [{
column: "packingNumber", column: "packingNumber",
action: "==", action: "==",
@ -381,7 +383,8 @@
filters: filters, filters: filters,
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
}).then(res => { }).then(res => {
this.scanMessage =result.scanMessage
let resultList = res.data.list; let resultList = res.data.list;
if (resultList.length > 0) { if (resultList.length > 0) {
resultList.forEach(item => { 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" <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="">
<locationCompare ref="comScanLocation" title="收货库位" :isShowEdit="jobContent.allowModifyLocation=='TRUE'" :recommendLocationCode="jobToLocationCode" <locationCompare ref="comScanLocation" title="收货库位"
:isShowEdit="jobContent.allowModifyLocation=='TRUE'" :recommendLocationCode="jobToLocationCode"
:locationCode="toLocationCode" @getLocation='scanLocationCode' :locationCode="toLocationCode" @getLocation='scanLocationCode'
:locationAreaTypeList="toLocationAreaTypeList"></locationCompare> :locationAreaTypeList="toLocationAreaTypeList"></locationCompare>
</view> </view>
@ -134,23 +135,23 @@
managementList: [], managementList: [],
jobStatus: "", jobStatus: "",
jobToLocationCode: "", jobToLocationCode: "",
scanedPackingNumber: '', scanMessage: "",
status:'' status: '',
}; };
}, },
onLoad(option) { onLoad(option) {
setTimeout(res=>{ setTimeout(res => {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: option.title+'详情' title: option.title + '详情'
}) })
},50) }, 50)
this.id = option.id; this.id = option.id;
this.scanedPackingNumber = option.scaned || ''; this.scanMessage = option.scanMessage;
this.status = option.status || '' this.status = option.status || ''
}, },
onShow(){ onShow() {
if (this.id != undefined) { if (this.id != undefined) {
// //
if (this.status == "1") { if (this.status == "1") {
@ -224,26 +225,14 @@
that.subList = res.data.subList; that.subList = res.data.subList;
that.jobStatus = res.data.status that.jobStatus = res.data.status
that.jobToLocationCode = that.subList[0].toLocationCode that.jobToLocationCode = that.subList[0].toLocationCode
if(that.jobContent.allowModifyLocation=='FALSE'){ if (that.jobContent.allowModifyLocation == 'FALSE') {
that.toLocationCode = that.subList[0].toLocationCode that.toLocationCode = that.subList[0].toLocationCode
} }
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes) that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList) that.detailSource = getDataSource(that.subList)
that.detailSource.forEach(r => { if (that.scanMessage) {
r.subList.forEach(s => { this.$refs.scanPopup.simulateScan(that.scanMessage);
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
}
})
})
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }
@ -255,7 +244,7 @@
}, },
getScanResult(result) { getScanResult(result) {
let label = result.label; let label = result.label;
var packingNumber = label.packingNumber; var packingNumber = label.packingNumber;
var batch = label.batch; var batch = label.batch;
@ -272,7 +261,7 @@
if (itemDetail == undefined) { if (itemDetail == undefined) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在任务列表中") this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在任务列表中")
} else { } else {
if (!itemDetail.cancleScanedHiht&&itemDetail.scaned) { if (itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描") this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描")
} else { } else {
itemDetail.scaned = true; itemDetail.scaned = true;
@ -421,7 +410,7 @@
ccProductReceiptJobsubmit(params).then(res => { ccProductReceiptJobsubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成装配收货记录<br>" + res.data ) this.showCommitSuccessMessage("提交成功<br>生成装配收货记录<br>" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -7,26 +7,6 @@
扫描箱码 扫描箱码
<text class="fr" @click="closeScanPopup()">关闭</text> <text class="fr" @click="closeScanPopup()">关闭</text>
</view> </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; <view class="uni-flex uni-row" style="align-items: center;
background-color: #fff; background-color: #fff;
@ -120,6 +100,11 @@
import { import {
getDirectoryItemArray getDirectoryItemArray
} from '../../../common/directory.js'; } from '../../../common/directory.js';
import {
getLabelInfo
} from '@/common/label.js';
export default { export default {
name: 'winScanPack', name: 'winScanPack',
@ -152,7 +137,6 @@
expand: true, expand: true,
scanOptions: {}, scanOptions: {},
editItem: {}, editItem: {},
positionInfo: "请选择位置",
positionList: [], positionList: [],
defaultValueList: [], defaultValueList: [],
label: {}, label: {},
@ -174,12 +158,25 @@
this.dataContent = content; this.dataContent = content;
this.jobContent = jobcontent; this.jobContent = jobcontent;
this.initData(); this.initData();
this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
"-" + this.jobContent.subList[0].workStationCode
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
}, 500) }, 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() { closeScanPopup() {
this.$refs.popup.close(); this.$refs.popup.close();
@ -662,10 +659,16 @@
}, },
packGetFocus() { packGetFocus() {
this.$refs.comscan.getfocus(); if(this.$refs.comscan){
this.$refs.comscan.getfocus();
}
}, },
packLoseFocus() { packLoseFocus() {
this.$refs.comscan.losefocus(); if(this.$refs.comscan){
this.$refs.comscan.losefocus();
}
}, },
showMessage(message, callback) { showMessage(message, callback) {
setTimeout(r => { setTimeout(r => {

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

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

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

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

Loading…
Cancel
Save