diff --git a/fe/PDA/api/index.js b/fe/PDA/api/index.js index a929aa479..423acdff2 100644 --- a/fe/PDA/api/index.js +++ b/fe/PDA/api/index.js @@ -2194,10 +2194,10 @@ export const getPoNumberByPackingCode = (toPackingCode) => promise( }) //获取客户信息 -export const getCustomerList = (id) => request( - devUrl + "/api/pda/customer/get-all/", { // - data: {}, - method: "get" +export const getCustomerList = (params) => request( + devUrl + "/api/pda/customer/get-list/", { // + data: params, + method: "post" }); diff --git a/fe/PDA/common/basic.js b/fe/PDA/common/basic.js index 2865f1ee0..3df22de49 100644 --- a/fe/PDA/common/basic.js +++ b/fe/PDA/common/basic.js @@ -401,6 +401,30 @@ export function scanErrorAudio() { }); } +export function scanSuccessAudio() { + var music = null; + music = uni.createInnerAudioContext(); //创建播放器对象 + music.src = "../../static/video/scan_success.mp3"; + music.volume = 1; + music.play(); //执行播放 + music.onEnded(() => { + //播放结束 + music = null; + }); +} + +export function scanFailedAudio() { + var music = null; + music = uni.createInnerAudioContext(); //创建播放器对象 + music.src = "../../static/video/scan_failed.mp3"; + music.volume = 1; + music.play(); //执行播放 + music.onEnded(() => { + //播放结束 + music = null; + }); +} + export function newMessageAudio() { var music = null; diff --git a/fe/PDA/components/uni-combox/uni-combox.vue b/fe/PDA/components/uni-combox/uni-combox.vue index f93fb13fa..38e02570f 100644 --- a/fe/PDA/components/uni-combox/uni-combox.vue +++ b/fe/PDA/components/uni-combox/uni-combox.vue @@ -87,9 +87,10 @@ } }, filterCandidates() { - return this.candidates.filter((item) => { - return item.toString().indexOf(this.inputVal) > -1 - }) + return this.candidates; + // return this.candidates.filter((item) => { + // return item.toString().indexOf(this.inputVal) > -1 + // }) }, filterCandidatesLength() { return this.filterCandidates.length @@ -173,6 +174,7 @@ font-size: 16px; height: 22px; line-height: 22px; + padding-left: 20rpx; } .uni-combox__input-arrow { diff --git a/fe/PDA/mycomponents/common/comMessage.vue b/fe/PDA/mycomponents/common/comMessage.vue index b75e72ed9..1a60c11bb 100644 --- a/fe/PDA/mycomponents/common/comMessage.vue +++ b/fe/PDA/mycomponents/common/comMessage.vue @@ -68,7 +68,7 @@ //扫描消息 showScanMessage(content) { this.openMessage(content, 'scan'); - scanErrorAudio(); //播放语音 + // scanErrorAudio(); //播放语音 }, //显示是否的确认消息 diff --git a/fe/PDA/mycomponents/wincom/winScanByPack.vue b/fe/PDA/mycomponents/wincom/winScanByPack.vue index e2eb98c4a..0a89209e1 100644 --- a/fe/PDA/mycomponents/wincom/winScanByPack.vue +++ b/fe/PDA/mycomponents/wincom/winScanByPack.vue @@ -31,6 +31,10 @@ import { getInventoryLabel } from '@/api/index.js'; + + import { + scanFailedAudio + } from '@/common/basic.js'; export default { name: 'winScanByPack', @@ -85,10 +89,13 @@ uni.hideLoading(); this.callBack(); } else { + scanFailedAudio() this.showMessage('标签【' + result.data.code + '】,在标签表中不存在') uni.hideLoading(); + } }).catch(err => { + scanFailedAudio() uni.hideLoading(); this.showMessage(err.message) }); diff --git a/fe/PDA/mycomponents/wincom/winScanByProductCode.vue b/fe/PDA/mycomponents/wincom/winScanByProductCode.vue index 81858d36d..cc743385a 100644 --- a/fe/PDA/mycomponents/wincom/winScanByProductCode.vue +++ b/fe/PDA/mycomponents/wincom/winScanByProductCode.vue @@ -32,6 +32,10 @@ getitems, getMesBarCode } from '@/api/index.js'; + import { + scanSuccessAudio, + scanFailedAudio + } from '@/common/basic.js'; export default { name: 'winScanByPack', @@ -95,10 +99,12 @@ }; this.callBack(); } else { + scanFailedAudio() this.losefocus(); this.showMessage('单件码【' + result.data.code + '】,不存在') } }).catch(err => { + scanFailedAudio() uni.hideLoading(); this.showMessage(err.message) }); diff --git a/fe/PDA/mycomponents/wincom/winScanLocationCode.vue b/fe/PDA/mycomponents/wincom/winScanLocationCode.vue index 513e103fd..1b86192b7 100644 --- a/fe/PDA/mycomponents/wincom/winScanLocationCode.vue +++ b/fe/PDA/mycomponents/wincom/winScanLocationCode.vue @@ -22,6 +22,10 @@ import { locations } from '@/api/index.js'; + import { + scanSuccessAudio, + scanFailedAudio + } from '@/common/basic.js'; import winComScan from '@/mycomponents/wincom/winComScan.vue' import comMessage from '@/mycomponents/common/comMessage.vue' export default { @@ -79,6 +83,7 @@ this.locationInfo=res this.callBack() } else { + scanFailedAudio() this.showMessage('未查找到库位【' + code + '】'); this.locationInfo=null } diff --git a/fe/PDA/pages/assemble/assembleTransfer.vue b/fe/PDA/pages/assemble/assembleTransfer.vue index 7b830a0f5..e115e58b5 100644 --- a/fe/PDA/pages/assemble/assembleTransfer.vue +++ b/fe/PDA/pages/assemble/assembleTransfer.vue @@ -84,7 +84,9 @@ import { showConfirmMsg, goHome, - getRemoveOption + getRemoveOption, + scanSuccessAudio, + scanFailedAudio } from '@/common/basic.js'; import winBlankView from '@/mycomponents/wincom/winBlankView.vue' @@ -196,6 +198,7 @@ }) if (datas.length > 0) { + scanFailedAudio() showConfirmMsg('物料【' + code + '】已经存在,是否要重新扫描?', confirm => { if (confirm) { that.itemList.forEach((r, i) => { @@ -219,9 +222,10 @@ fromStatus: 2, toStatus:2 } - + this.itemList.unshift(item); this.$refs.scanPackPopup.closeScanPopup() + scanSuccessAudio() } }, @@ -258,18 +262,22 @@ if (res) { //不要待检、隔离、在途、 if (res.type == 1 || res.type == 6 || res.type == 13) { + scanFailedAudio() that.showMessage("目标库位不可以是待检、隔离、在途库位类型"); } else { + scanSuccessAudio() that.toLocationCode = code; that.toLocationErpCode = res.erpLocationCode; } } else { + scanFailedAudio() that.toLocationCode = '' that.showMessage('目标库位【' + code + '】不存在'); this.$refs.location.clearLocation() this.locationGotFocus = true; } }).catch(err => { + scanFailedAudio() that.toLocationCode = '' this.locationGotFocus = true; that.showMessage(err.message); diff --git a/fe/PDA/pages/cotaing/coatingTransfer.vue b/fe/PDA/pages/cotaing/coatingTransfer.vue index 1a02b5cf0..7d5ebd1c6 100644 --- a/fe/PDA/pages/cotaing/coatingTransfer.vue +++ b/fe/PDA/pages/cotaing/coatingTransfer.vue @@ -84,7 +84,9 @@ import { showConfirmMsg, goHome, - getRemoveOption + getRemoveOption, + scanSuccessAudio, + scanFailedAudio } from '@/common/basic.js'; import winBlankView from '@/mycomponents/wincom/winBlankView.vue' @@ -259,18 +261,22 @@ if (res) { //不要待检、隔离、在途、 if (res.type == 1 || res.type == 6 || res.type == 13) { + scanFailedAudio() that.showMessage("目标库位不可以是待检、隔离、在途库位类型"); } else { + scanSuccessAudio() that.toLocationCode = code; that.toLocationErpCode = res.erpLocationCode; } } else { + scanFailedAudio() that.toLocationCode = '' that.showMessage('目标库位【' + code + '】不存在'); this.$refs.location.clearLocation() this.locationGotFocus = true; } }).catch(err => { + scanFailedAudio() that.toLocationCode = '' this.locationGotFocus = true; that.showMessage(err.message); diff --git a/fe/PDA/pages/injection/injectionTransfer.vue b/fe/PDA/pages/injection/injectionTransfer.vue index f870dead3..4e29b8a46 100644 --- a/fe/PDA/pages/injection/injectionTransfer.vue +++ b/fe/PDA/pages/injection/injectionTransfer.vue @@ -84,7 +84,9 @@ import { showConfirmMsg, goHome, - getRemoveOption + getRemoveOption, + scanSuccessAudio, + scanFailedAudio } from '@/common/basic.js'; import winBlankView from '@/mycomponents/wincom/winBlankView.vue' @@ -197,6 +199,7 @@ }) if (datas.length > 0) { + scanFailedAudio() showConfirmMsg('物料【' + code + '】已经存在,是否要重新扫描?', confirm => { if (confirm) { that.itemList.forEach((r, i) => { @@ -223,6 +226,7 @@ this.itemList.unshift(item); this.$refs.scanPackPopup.closeScanPopup() + scanSuccessAudio() } }, @@ -259,12 +263,15 @@ if (res) { //不要待检、隔离、在途、 if (res.type == 1 || res.type == 6 || res.type == 13) { + scanFailedAudio() that.showMessage("目标库位不可以是待检、隔离、在途库位类型"); } else { + scanSuccessAudio() that.toLocationCode = code; that.toLocationErpCode = res.erpLocationCode; } } else { + scanFailedAudio() that.toLocationCode = '' that.showMessage('目标库位【' + code + '】不存在'); this.$refs.location.clearLocation() @@ -272,6 +279,7 @@ } }).catch(err => { + scanFailedAudio() that.toLocationCode = '' this.locationGotFocus = true; that.showMessage(err.message); diff --git a/fe/PDA/pages/inventory/comTransfer.vue b/fe/PDA/pages/inventory/comTransfer.vue index 040e4a212..1df244558 100644 --- a/fe/PDA/pages/inventory/comTransfer.vue +++ b/fe/PDA/pages/inventory/comTransfer.vue @@ -45,7 +45,9 @@ import { showConfirmMsg, goHome, - getRemoveOption + getRemoveOption, + scanSuccessAudio, + scanFailedAudio } from '@/common/basic.js'; import winBlankView from '@/mycomponents/wincom/winBlankView.vue' @@ -140,6 +142,7 @@ }) if (datas.length > 0) { + scanFailedAudio() showConfirmMsg('箱码【' + code + '】已经存在,是否要重新扫描?', confirm => { if (confirm) { that.itemList.forEach((r, i) => { @@ -173,18 +176,23 @@ .then(res => { try { if (res.totalCount === 0) { + scanFailedAudio() this.showMessage('箱码【' + packingCode + '】在【原料库、成品库、半成品库】未查询到库存信息'); } else if (res.totalCount === 1) { + scanSuccessAudio() this.pushItem(res.items[0]); } else { + scanSuccessAudio() this.$refs.balanceItems.openPopup(res.items); } } catch (e) { + scanFailedAudio() this.showMessage(e.message); } uni.hideLoading(); }) .catch(err => { + scanFailedAudio() this.showMessage(err.message); uni.hideLoading(); }); @@ -195,20 +203,24 @@ if (this.itemList.length == 0) { this.locationErpCode = balanceItem.locationErpCode; this.itemList.unshift(item); + scanSuccessAudio() } else { if (this.transferType == 'Transfer_Inside') //储位内移库 { if (this.locationErpCode != balanceItem.locationErpCode) { + scanFailedAudio() this.showMessage('箱码【' + balanceItem.packingCode + '】的ERP储位【' + balanceItem.locationErpCode + '】与默认的ERP储位[' + this .locationErpCode + '】不是同一ERP储位,不可以进行储位内移库'); } else { this.itemList.unshift(item); + scanSuccessAudio() } } else if (this.transferType == 'Transfer_Area') //储位调拨 { this.itemList.unshift(item); + scanSuccessAudio() } } }, @@ -279,6 +291,7 @@ let that = this; locations(code).then(res => { if (res == null) { + scanFailedAudio() that.toLocationCode = '' that.showMessage('目标库位【' + code + '】不存在'); this.$refs.location.clearLocation() @@ -290,12 +303,14 @@ that.showMessage('目标库位的ERP储位【' + res.erpLocationCode + '】与【' + this .locationErpCode + '】不是同一ERP储位,请重新扫描目标库位'); + scanFailedAudio() that.toLocationCode = '' that.$refs.location.clearLocation(); this.locationGotFocus = true; } else { that.toLocationCode = code; that.toLocationErpCode = res.erpLocationCode; + scanSuccessAudio() } } else //储位调拨 @@ -314,14 +329,17 @@ that.toLocationCode = '' that.$refs.location.clearLocation(); this.locationGotFocus = true; + scanFailedAudio() } else { that.toLocationCode = res.code; that.toLocationErpCode = res.erpLocationCode; + scanSuccessAudio() } } } uni.hideLoading(); }).catch(err => { + scanFailedAudio() that.toLocationCode = '' this.locationGotFocus = true; that.showMessage(err.message); diff --git a/fe/PDA/pages/inventory/scrap.vue b/fe/PDA/pages/inventory/scrap.vue index c00fa6cb5..f369748aa 100644 --- a/fe/PDA/pages/inventory/scrap.vue +++ b/fe/PDA/pages/inventory/scrap.vue @@ -47,7 +47,9 @@ import { showConfirmMsg, goHome, - getRemoveOption + getRemoveOption, + scanSuccessAudio, + scanFailedAudio } from '@/common/basic.js'; import VUE from 'vue' import winBlankView from '@/mycomponents/wincom/winBlankView.vue' @@ -130,6 +132,7 @@ }) if (items.length > 0) { + scanFailedAudio() this.showRescanMessage('箱码【' + code + '】已经存在,是否要重新扫描?'); // showConfirmMsg('箱码【' + code + '】已经存在,是否要重新扫描?', confirm => { // if (confirm) { @@ -179,6 +182,7 @@ }; getBalancesByFilter(params).then(res => { if (res.totalCount == 0) { + scanFailedAudio() this.showScanMessage('箱码【' + code + '】在【原料库】未查询到库存信息'); } else if (res.totalCount == 1) { let balanceItem = res.items[0]; @@ -186,11 +190,14 @@ let item = this.createItem(balanceItem); that.itemList.unshift(item) that.scanPopupGetFocus(); + scanSuccessAudio() } else { + scanSuccessAudio() this.$refs.balanceItems.openPopup(res.items); } uni.hideLoading(); }).catch(ex => { + scanFailedAudio() uni.hideLoading(); that.showMessage(ex.message); }); @@ -267,15 +274,18 @@ let that = this; locations(code).then(res => { if (res) { + scanSuccessAudio() that.toLocationCode = res.code; that.toLocationErpCode = res.erpLocationCode; } else { + scanFailedAudio() that.toLocationCode = ''; that.toLocationErpCode = ''; that.showMessage('目标库位不存在'); } uni.hideLoading(); }).catch(err => { + scanFailedAudio() that.toLocationCode = ''; that.toLocationErpCode = ''; that.showMessage(err.message); diff --git a/fe/PDA/pages/putaway/purchasePutaway.vue b/fe/PDA/pages/putaway/purchasePutaway.vue index 5a7450c20..042012cf0 100644 --- a/fe/PDA/pages/putaway/purchasePutaway.vue +++ b/fe/PDA/pages/putaway/purchasePutaway.vue @@ -87,7 +87,9 @@ import { showConfirmMsg, goHome, - getRemoveOption + getRemoveOption, + scanSuccessAudio, + scanFailedAudio } from '@/common/basic.js'; import winBlankView from '@/mycomponents/wincom/winBlankView.vue' @@ -240,6 +242,7 @@ let balanceRes = await getBalancesByFilterAsync(params); if (balanceRes.totalCount === 0) { + scanFailedAudio() that.showScanMessage('箱码【' + packingCode + '】在【待检库】未查询到库存状态为【合格】的库存信息'); } else if (balanceRes.totalCount === 1) { let balanceItem = balanceRes.items[0]; @@ -268,6 +271,7 @@ //根据ERP料号和箱码获取采购信息 let purchaseDetail = await getPurchaseDetailNewAsync(balanceItem.itemCode, fromTopPackingCode); if (purchaseDetail.error) { + scanFailedAudio() that.showScanMessage(purchaseDetail.error.message); } else { that.createBalanceItem(balanceItem, purchaseDetail); @@ -355,6 +359,7 @@ let newLabel = this.createLabel(balanceItem, purchaseDetail); this.addLabel(itemInfo, newLabel); this.scanPopupGetFocus(); + scanSuccessAudio() }, createLabel(balanceItem, purchaseDetail) { @@ -472,25 +477,30 @@ let that = this; locations(code).then(res => { if (res == null) { + scanFailedAudio() that.showMessage('目标库位【' + code + '】不存在'); this.$refs.comCollapseLocation.clearLocation(); } else { if (res.type != 2) { + scanFailedAudio() this.showMessage('目标库位必须是原材料库') this.$refs.comCollapseLocation.clearLocation(); } else { if (that.recommendErpLocationCode != res.erpLocationCode) { + scanFailedAudio() that.showMessage('目标库位的ERP储位【' + res.erpLocationCode + '】与【' + this .recommendErpLocationCode + '】不是同一ERP储位,请重新扫描'); this.$refs.comCollapseLocation.clearLocation(); } else { + scanSuccessAudio() this.location = res; } } } uni.hideLoading(); }).catch(err => { + scanFailedAudio() that.location = null; that.showMessage(err.message); uni.hideLoading(); diff --git a/fe/PDA/pages/putaway/rapReceipt.vue b/fe/PDA/pages/putaway/rapReceipt.vue index dcb1148df..3ebc6b7c7 100644 --- a/fe/PDA/pages/putaway/rapReceipt.vue +++ b/fe/PDA/pages/putaway/rapReceipt.vue @@ -52,7 +52,9 @@ maxPageSize, showConfirmMsg, goHome, - getRemoveOption + getRemoveOption, + scanSuccessAudio, + scanFailedAudio } from '@/common/basic.js'; export default { @@ -241,8 +243,10 @@ .then(res => { if (res != null) { if (res.type != 2) { + scanFailedAudio() this.showMessage('目标库位必须是【原材料库】') } else { + scanSuccessAudio() this.location = res; } } else { @@ -251,6 +255,7 @@ uni.hideLoading(); }) .catch(err => { + scanFailedAudio() this.showMessage(err.message); uni.hideLoading(); }); diff --git a/fe/PDA/pages/putaway/semiPutaway.vue b/fe/PDA/pages/putaway/semiPutaway.vue index 58167d89e..6ae124c57 100644 --- a/fe/PDA/pages/putaway/semiPutaway.vue +++ b/fe/PDA/pages/putaway/semiPutaway.vue @@ -60,7 +60,9 @@ showConfirmMsg, goHome, getRemoveOption, - getLocationTypeDesc + getLocationTypeDesc, + scanSuccessAudio, + scanFailedAudio } from '@/common/basic.js'; import winBlankView from '@/mycomponents/wincom/winBlankView.vue' @@ -354,17 +356,21 @@ let that = this; locations(code).then(res => { if (res == null) { + scanFailedAudio() that.showMessage('目标库位【' + code + '】不存在'); that.$refs.comToLocation.clearLocation(); } else { if (res.type != 3) { + scanFailedAudio() this.showMessage('目标库位必须是【半成品库】') } else { + scanSuccessAudio() this.toLocation = res; } } uni.hideLoading(); }).catch(err => { + scanFailedAudio() that.toLocationCode = '' that.showMessage(err.message); uni.hideLoading(); diff --git a/fe/PDA/pages/query/item.vue b/fe/PDA/pages/query/item.vue index 7352d592f..4545ac48d 100644 --- a/fe/PDA/pages/query/item.vue +++ b/fe/PDA/pages/query/item.vue @@ -51,7 +51,9 @@ import { getItemTypeStyle, getItemStatusDesc, - goHome + goHome, + scanSuccessAudio, + scanFailedAudio } from '@/common/basic.js'; import comItem from '@/mycomponents/coms/query/comItem.vue' import comSummary from '@/mycomponents/coms/query/comSummary.vue' @@ -160,16 +162,19 @@ setTimeout(() => { getitems(code).then((res) => { if (res != null) { + scanSuccessAudio() this.closeScanPopup(); this.itemCode = code; this.itemDetail = res; this.getContentByTab(this.tabIndex) } else { + scanFailedAudio() this.showMessage('未查找到ERP料号【' + code + '】'); this.itemCode = ""; } uni.hideLoading(); }).catch((err) => { + scanFailedAudio() this.showMessage(err.message); this.itemCode = ""; uni.hideLoading(); diff --git a/fe/PDA/pages/query/location.vue b/fe/PDA/pages/query/location.vue index 5545dd99e..5de82750d 100644 --- a/fe/PDA/pages/query/location.vue +++ b/fe/PDA/pages/query/location.vue @@ -43,7 +43,9 @@ maxPageSize, goHome, getInventoryTypeStyle, - getInventoryStatusDesc + getInventoryStatusDesc, + scanSuccessAudio, + scanFailedAudio } from '@/common/basic.js'; import comLocation from '@/mycomponents/coms/query/comLocation.vue' @@ -141,6 +143,7 @@ }); locations(code).then((res) => { if (res != null) { + scanSuccessAudio() this.closeScanPopup(); this.locationCode = code; this.locationDetail = res @@ -149,11 +152,13 @@ this.locationDetail.locationErpCode = res.erpLocationCode this.getContentByTab(this.tabIndex); } else { + scanFailedAudio() this.showMessage('未查找到库位【' + code + '】'); this.locationCode = '' } uni.hideLoading(); }).catch((err) => { + scanFailedAudio() this.showMessage(err.message); this.locationCode = ''; uni.hideLoading(); diff --git a/fe/PDA/pages/record/completeInventoryTransfer.vue b/fe/PDA/pages/record/completeInventoryTransfer.vue index da6f2f874..dfe201f8b 100644 --- a/fe/PDA/pages/record/completeInventoryTransfer.vue +++ b/fe/PDA/pages/record/completeInventoryTransfer.vue @@ -98,7 +98,9 @@ import { showConfirmMsg, goHome, - getRemoveOption + getRemoveOption, + scanSuccessAudio, + scanFailedAudio } from '@/common/basic.js'; import winBlankView from '@/mycomponents/wincom/winBlankView.vue' @@ -301,16 +303,19 @@ let that = this; locations(code).then(res => { if (res == null) { + scanFailedAudio() that.toLocationCode = '' that.showMessage('目标库位【' + code + '】不存在'); this.$refs.location.clearLocation() this.locationGotFocus = true; } else { + scanSuccessAudio() that.toLocationCode = code; that.toLocationErpCode = res.erpLocationCode; } uni.hideLoading(); }).catch(err => { + scanFailedAudio() that.toLocationCode = '' this.locationGotFocus = true; that.showMessage(err.message); diff --git a/fe/PDA/pages/record/productionReturn.vue b/fe/PDA/pages/record/productionReturn.vue index c2913a4c8..2846bed5f 100644 --- a/fe/PDA/pages/record/productionReturn.vue +++ b/fe/PDA/pages/record/productionReturn.vue @@ -1,8 +1,20 @@