diff --git a/fe/PDA/api/index.js b/fe/PDA/api/index.js
index e07de4f7f..02a30df7e 100644
--- a/fe/PDA/api/index.js
+++ b/fe/PDA/api/index.js
@@ -207,6 +207,13 @@ export const getBalancesByItemCode = (params) => promise(
method: 'post',
data: params
});
+
+// ERP料号模糊匹配查询所有物料数据
+export const getItemCodeByLike = (itemCode,pageIndex,pageSize) => promise(
+ devUrl + "/api/pda/item/get-fuzzy?itemCode="+itemCode+"&pageIndex="+pageIndex+"&pageSize="+pageSize, {
+ method: 'get',
+ data: {}
+ });
//根据库位查询库存
diff --git a/fe/PDA/mycomponents/wincom/winScanByCode.vue b/fe/PDA/mycomponents/wincom/winScanByCode.vue
index 2c2450200..c269a274c 100644
--- a/fe/PDA/mycomponents/wincom/winScanByCode.vue
+++ b/fe/PDA/mycomponents/wincom/winScanByCode.vue
@@ -55,11 +55,17 @@
},
getfocus() {
if (this.isShow) {
- this.$refs.scan.getfocus()
+ if(this.$refs.scan){
+ this.$refs.scan.getfocus()
+ }
+
}
},
losefocus() {
- this.$refs.scan.losefocus()
+ if(this.$refs.scan){
+ this.$refs.scan.losefocus()
+ }
+
},
scanClick() {
diff --git a/fe/PDA/mycomponents/wincom/winScanByProductCode.vue b/fe/PDA/mycomponents/wincom/winScanByProductCode.vue
index e1e25f154..81858d36d 100644
--- a/fe/PDA/mycomponents/wincom/winScanByProductCode.vue
+++ b/fe/PDA/mycomponents/wincom/winScanByProductCode.vue
@@ -80,8 +80,9 @@
getMesBarCode(result.data.code).then(item=>{
+ uni.hideLoading();
if (item) {
- this.losefocus(); //扫描完失去焦点,扫描完成后在业务里调用getfocus()方法
+ //扫描完失去焦点,扫描完成后在业务里调用getfocus()方法
this.scanResult = {
scanCode:result.data.code,
itemCode:item.itemCode,
@@ -92,11 +93,10 @@
qty:item.qty,
locationCode:item.locationCode
};
- uni.hideLoading();
this.callBack();
} else {
+ this.losefocus();
this.showMessage('单件码【' + result.data.code + '】,不存在')
- uni.hideLoading();
}
}).catch(err => {
uni.hideLoading();
diff --git a/fe/PDA/pages/query/item.vue b/fe/PDA/pages/query/item.vue
index c2e7d9b5f..7352d592f 100644
--- a/fe/PDA/pages/query/item.vue
+++ b/fe/PDA/pages/query/item.vue
@@ -142,7 +142,7 @@
},
getScanCode(code) {
if (code == "") {
- this.showMessage('零件号不能为空')
+ this.showMessage('ERP料号不能为空')
return;
}
this.itemCode = '';
@@ -153,7 +153,7 @@
},
getItemInfo(code) {
uni.showLoading({
- title: "正在查询零件信息...",
+ title: "正在查询ERP料号信息...",
mask: true
});
@@ -165,7 +165,7 @@
this.itemDetail = res;
this.getContentByTab(this.tabIndex)
} else {
- this.showMessage('未查找到零件【' + code + '】');
+ this.showMessage('未查找到ERP料号【' + code + '】');
this.itemCode = "";
}
uni.hideLoading();
diff --git a/fe/PDA/pages/task/unProducePickWipDetail.vue b/fe/PDA/pages/task/unProducePickWipDetail.vue
index 6c197e974..f302b5da8 100644
--- a/fe/PDA/pages/task/unProducePickWipDetail.vue
+++ b/fe/PDA/pages/task/unProducePickWipDetail.vue
@@ -6,8 +6,8 @@
-
+
@@ -46,8 +46,8 @@
@click="showLocation(item)">扫描库位
-
-
+
+
@@ -67,7 +67,7 @@
-
+
@@ -76,7 +76,7 @@
-;
+ ;
@@ -89,11 +89,16 @@
+
+
+
+
+
+ @afterCloseScanMessage='closeScanMessage' @afterClose="closeScanMessage">
@@ -103,6 +108,8 @@
takeIssueJob,
cancelTakeIssueJob,
finshUnProducePickJob,
+ getitems,
+ getItemCodeByLike
} from '@/api/index.js';
import {
getJobStatuStyle,
@@ -116,6 +123,8 @@
} from '@/common/basic.js';
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
+ import winScanButtonTop from '@/mycomponents/wincom/winScanButtonTop.vue'
+ import winScanButtonBottom from '@/mycomponents/wincom/winScanButtonBottom.vue'
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue'
import comBalance from '@/mycomponents/common/comBalance.vue'
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue'
@@ -123,18 +132,22 @@
import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue'
import winScanLocationCode from '@/mycomponents/wincom/winScanLocationCode.vue';
+ import winScanByCode from '@/mycomponents/wincom/winScanByCode.vue'
export default {
components: {
comMessage,
winScanButton,
+ winScanButtonTop,
+ winScanButtonBottom,
winMulitScan,
comBalance,
comJobScanDetail,
winScanByPack,
comNumberBox,
winScanByProductCode,
- winScanLocationCode
+ winScanLocationCode,
+ winScanByCode
},
data() {
return {
@@ -149,6 +162,11 @@
scanCount: 0,
isPack: true,
titleArray: ['箱标签'],
+ userForm: {
+ names: [],
+ values: [],
+ origin: []
+ }
}
},
filters: {
@@ -204,8 +222,9 @@
},
getToLocation(locationInfo) {
- if(this.currentItem.recommendFromLocationCode!=locationInfo.code){
- this.showMessage("扫描库位["+locationInfo.code+"]与推荐来源库位["+this.currentItem.recommendFromLocationCode+"]不一致")
+ if (this.currentItem.recommendFromLocationCode != locationInfo.code) {
+ this.showMessage("扫描库位[" + locationInfo.code + "]与推荐来源库位[" + this.currentItem
+ .recommendFromLocationCode + "]不一致")
return;
}
this.currentItem.handledFromLocationCode = locationInfo.code;
@@ -222,6 +241,43 @@
// }
this.$refs.scanPackPopup.openScanPopup();
},
+ openItemScanPopup() {
+ this.$refs.scanPopupItem.openScanPopup();
+ },
+ queryItemCode(){
+ this.$refs.wzSelectPopup.open({
+ mode: 'radio', //radio checkbox 单选、多选
+ // dataList:[], //如果dataList传入了数组则直接使用传入的数组渲染,无需再配置proxyConfig
+ selected: this.userForm.values, //已选中的数据
+ proxyConfig: { //组件内部代理请求数据配置
+ reqFun: this.reqGetList, //请求方法,在方法中请返回Promise.resolve([])
+ localPaging: false //前端本地分页
+ },
+ search: {
+ type: 'remote', //local本地数据搜索 | remote请求接口
+ },
+ fields: {
+ label: 'name',
+ value: 'code'
+ }
+ })
+
+ },
+
+ reqGetList(data) {
+
+ let params = {
+ pageSize: data.pageSize,
+ pageIndex: data.pageIndex,
+ itemCode: data.searchValue,
+ };
+ return getItemCodeByLike(data.searchValue,data.pageIndex,data.pageSize);
+ },
+
+ selectCheckbox(mode, result){
+ this.getScanResult(result,false)
+ },
+
//加载零件信息
getDetail() {
let that = this;
@@ -262,19 +318,51 @@
});
},
- getScanResult(result) {
+ getScanCode(code) {
+ if (code == "") {
+ this.showMessage('ERP料号不能为空')
+ return;
+ }
+ getitems(code).then((res) => {
+ uni.hideLoading();
+ if (res) {
+ var result ={
+ itemCode:res.code
+ }
+ this.getScanResult(result,false)
+ } else {
+ this.showMessage('未查找到ERP料号【' + code + '】');
+ }
+ }).catch((err) => {
+ this.showMessage(err.message);
+ uni.hideLoading();
+ })
+
+ },
+
+ getScanResult(result,isMesCode=true) {
// AH240321AM0153 AH240321AM0198 AH240321AM0199
let item = this.details.find(r => {
return r.itemCode == result.itemCode
});
if (item == undefined) {
- this.showMessage('在任务详情中,单件码【' + result.scanCode + '】所对应的ERP料号与任务中的ERP料号不一致,请重新扫描');
+ if(isMesCode){
+ this.showMessage('在任务详情中,单件码【' + result.scanCode + '】所对应的ERP料号与任务中的ERP料号不一致,请重新扫描');
+ }else {
+ this.showMessage('在任务详情中,没有找到ERP料号[' + result.itemCode+"]的信息,请重新扫描");
+ }
+
return;
}
- if(item.scaned){
- this.showMessage('单件码['+result.scanCode+"]已经扫描")
- }else {
+ if (item.scaned) {
+ if(isMesCode){
+ this.showMessage('单件码[' + result.scanCode + "]已经扫描")
+ }else {
+ this.showMessage('ERP料号[' + result.itemCode + "]已经扫描")
+ }
+
+ } else {
item.scaned = true;
item.scanDate = new Date()
this.details.sort(compareDesc('scanDate'));
@@ -282,7 +370,7 @@
this.calcScanCount()
this.$forceUpdate()
}
-
+
},
qtyChanged(value, item, index) {
@@ -326,7 +414,7 @@
if (items.length == this.details.length) {
this.finsh();
} else {
- this.showMessage("还有未扫描的单件码或库位")
+ this.showMessage("还有未扫描的ERP物料或库位")
}
},
@@ -363,17 +451,17 @@
that.datacontent.details = that.details;
let params = JSON.stringify(that.datacontent);
console.log("提交", params);
- finshUnProducePickJob(that.id, params)
- .then(res => {
- uni.hideLoading();
- if (res != null) {
- that.showCommitSuccessMessage();
- }
- })
- .catch(err => {
- that.showMessage(err.message);
- uni.hideLoading();
- });
+ // finshUnProducePickJob(that.id, params)
+ // .then(res => {
+ // uni.hideLoading();
+ // if (res != null) {
+ // that.showCommitSuccessMessage();
+ // }
+ // })
+ // .catch(err => {
+ // that.showMessage(err.message);
+ // uni.hideLoading();
+ // });
},
//返回任务列表页
@@ -392,14 +480,19 @@
this.getDetail();
},
showMessage(message) {
+ this.$refs.scanPackPopup.losefocus();
+ this.$refs.scanPopupItem.losefocus();
this.$refs.comMessage.showMessage(message);
},
showScanMessage(message) {
+ this.$refs.scanPackPopup.losefocus();
+ this.$refs.scanPopupItem.losefocus();
this.$refs.comMessage.showScanMessage(message);
},
closeScanMessage() {
this.$refs.scanPackPopup.getfocus();
+ this.$refs.scanPopupItem.getfocus();
},
calcScanCount() {
@@ -419,11 +512,9 @@
closeScanPopup() {
if (this.allCount == this.scanCount) {
this.$refs.scanPackPopup.closeScanPopup();
+ this.$refs.scanPopupItem.closeScanPopup();
}
},
- scanPopupGetFocus() {
- this.$refs.scanPackPopup.getfocus();
- },
}
}
diff --git a/fe/PDA/pages/task/unProduceReturnWipDetail.vue b/fe/PDA/pages/task/unProduceReturnWipDetail.vue
index 499dada88..b297ea5de 100644
--- a/fe/PDA/pages/task/unProduceReturnWipDetail.vue
+++ b/fe/PDA/pages/task/unProduceReturnWipDetail.vue
@@ -89,11 +89,16 @@
+
+
+
+
+
+ @afterCloseScanMessage='closeScanMessage' @afterClose="closeScanMessage">
@@ -103,6 +108,8 @@
takeIssueJob,
cancelTakeIssueJob,
finshUnProduceReturnJob,
+ getitems,
+ getItemCodeByLike
} from '@/api/index.js';
import {
getJobStatuStyle,
@@ -116,6 +123,8 @@
} from '@/common/basic.js';
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
+ import winScanButtonTop from '@/mycomponents/wincom/winScanButtonTop.vue'
+ import winScanButtonBottom from '@/mycomponents/wincom/winScanButtonBottom.vue'
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue'
import comBalance from '@/mycomponents/common/comBalance.vue'
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue'
@@ -123,18 +132,22 @@
import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue'
import winScanLocationCode from '@/mycomponents/wincom/winScanLocationCode.vue';
+ import winScanByCode from '@/mycomponents/wincom/winScanByCode.vue'
export default {
components: {
comMessage,
winScanButton,
+ winScanButtonTop,
+ winScanButtonBottom,
winMulitScan,
comBalance,
comJobScanDetail,
winScanByPack,
comNumberBox,
winScanByProductCode,
- winScanLocationCode
+ winScanLocationCode,
+ winScanByCode
},
data() {
return {
@@ -149,6 +162,11 @@
scanCount: 0,
isPack: true,
titleArray: ['箱标签'],
+ userForm: {
+ names: [],
+ values: [],
+ origin: []
+ }
}
},
filters: {
@@ -222,6 +240,42 @@
// }
this.$refs.scanPackPopup.openScanPopup();
},
+ openItemScanPopup() {
+ this.$refs.scanPopupItem.openScanPopup();
+ },
+ queryItemCode(){
+ this.$refs.wzSelectPopup.open({
+ mode: 'radio', //radio checkbox 单选、多选
+ // dataList:[], //如果dataList传入了数组则直接使用传入的数组渲染,无需再配置proxyConfig
+ selected: this.userForm.values, //已选中的数据
+ proxyConfig: { //组件内部代理请求数据配置
+ reqFun: this.reqGetList, //请求方法,在方法中请返回Promise.resolve([])
+ localPaging: false //前端本地分页
+ },
+ search: {
+ type: 'remote', //local本地数据搜索 | remote请求接口
+ },
+ fields: {
+ label: 'name',
+ value: 'code'
+ }
+ })
+
+ },
+
+ reqGetList(data) {
+
+ let params = {
+ pageSize: data.pageSize,
+ pageIndex: data.pageIndex,
+ itemCode: data.searchValue,
+ };
+ return getItemCodeByLike(data.searchValue,data.pageIndex,data.pageSize);
+ },
+
+ selectCheckbox(mode, result){
+ this.getScanResult(result,false)
+ },
//加载零件信息
getDetail() {
let that = this;
@@ -262,18 +316,50 @@
});
},
- getScanResult(result) {
+ getScanCode(code) {
+ if (code == "") {
+ this.showMessage('ERP料号不能为空')
+ return;
+ }
+ getitems(code).then((res) => {
+ uni.hideLoading();
+ if (res) {
+ var result ={
+ itemCode:res.code
+ }
+ this.getScanResult(result,false)
+ } else {
+ this.showMessage('未查找到ERP料号【' + code + '】');
+ }
+ }).catch((err) => {
+ this.showMessage(err.message);
+ uni.hideLoading();
+ })
+
+ },
+
+ getScanResult(result,isMesCode=true) {
// AH240321AM0153 AH240321AM0198 AH240321AM0199
let item = this.details.find(r => {
return r.itemCode == result.itemCode
});
if (item == undefined) {
- this.showMessage('在任务详情中,单件码【' + result.scanCode + '】所对应的ERP料号与任务中的ERP料号不一致,请重新扫描');
+ if(isMesCode){
+ this.showMessage('在任务详情中,单件码【' + result.scanCode + '】所对应的ERP料号与任务中的ERP料号不一致,请重新扫描');
+ }else {
+ this.showMessage('在任务详情中,没有找到ERP料号[' + result.itemCode+"]的信息,请重新扫描");
+ }
+
return;
}
if (item.scaned) {
- this.showMessage('单件码[' + result.scanCode + "]已经扫描")
+ if(isMesCode){
+ this.showMessage('单件码[' + result.scanCode + "]已经扫描")
+ }else {
+ this.showMessage('ERP料号[' + result.itemCode + "]已经扫描")
+ }
+
} else {
item.scaned = true;
item.scanDate = new Date()
@@ -387,14 +473,19 @@
this.getDetail();
},
showMessage(message) {
+ this.$refs.scanPackPopup.losefocus();
+ this.$refs.scanPopupItem.losefocus();
this.$refs.comMessage.showMessage(message);
},
showScanMessage(message) {
+ this.$refs.scanPackPopup.losefocus();
+ this.$refs.scanPopupItem.losefocus();
this.$refs.comMessage.showScanMessage(message);
},
closeScanMessage() {
this.$refs.scanPackPopup.getfocus();
+ this.$refs.scanPopupItem.getfocus();
},
calcScanCount() {
@@ -414,11 +505,9 @@
closeScanPopup() {
if (this.allCount == this.scanCount) {
this.$refs.scanPackPopup.closeScanPopup();
+ this.$refs.scanPopupItem.closeScanPopup();
}
},
- scanPopupGetFocus() {
- this.$refs.scanPackPopup.getfocus();
- },
}
}
diff --git a/fe/PDA/uni_modules/wz-select-popup/components/wz-select-popup/util/utils.js b/fe/PDA/uni_modules/wz-select-popup/components/wz-select-popup/util/utils.js
new file mode 100644
index 000000000..179dbcee3
--- /dev/null
+++ b/fe/PDA/uni_modules/wz-select-popup/components/wz-select-popup/util/utils.js
@@ -0,0 +1,11 @@
+export function debounceSetting(fn, wait) {
+ let timeout = null;
+ wait = wait || 600;
+ return function () {
+ let that = this;
+ if(timeout !== null) clearTimeout(timeout);
+ timeout = setTimeout(() => {
+ fn.apply(that);
+ }, wait);
+ }
+}
\ No newline at end of file
diff --git a/fe/PDA/uni_modules/wz-select-popup/components/wz-select-popup/wz-select-popup.vue b/fe/PDA/uni_modules/wz-select-popup/components/wz-select-popup/wz-select-popup.vue
index 7e3b04f90..9765e854e 100644
--- a/fe/PDA/uni_modules/wz-select-popup/components/wz-select-popup/wz-select-popup.vue
+++ b/fe/PDA/uni_modules/wz-select-popup/components/wz-select-popup/wz-select-popup.vue
@@ -1,6 +1,6 @@
-
+