diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue
index 3199956d..3ec20363 100644
--- a/src/pages/inventoryMove/coms/comMoveRecord.vue
+++ b/src/pages/inventoryMove/coms/comMoveRecord.vue
@@ -41,7 +41,8 @@
+ :locationAreaTypeList="fromLocationAreaTypeList"
+ @clearFromLocation="clearFromLocationCode">
@@ -157,7 +158,7 @@
itemCodeTypeList: [],
isShowEditLocation: false,
isJustReplay: true, //是否只是回显,不走库存余额接口
- fromWarehouseCode:""
+ fromWarehouseCode: ""
}
},
@@ -287,7 +288,7 @@
this.toLocationInfo = location;
},
getScanResult(result, managementTypeParams) {
- this.fromWarehouseCode =result.fromWarehouseCode
+ this.fromWarehouseCode = result.fromWarehouseCode
this.managementType = managementTypeParams
if (this.showOnePop) {
if (this.isJustReplay) {
@@ -373,6 +374,10 @@
return true
},
+ clearFromLocationCode() {
+ this.$refs.okToHoldRecordPackRef.fromLocationCode = ''
+ },
+
getScanResultAfter(result) {
var balance = result.balance;
@@ -543,9 +548,29 @@
if (fromWitch == 'fromLocationScanMsg') {
this.isClearFromLocationCode = false
this.$refs.scanFromLocationCode.getScanResult(result)
- } else if (fromWitch == 'itemCodeScanMsg') {
+ } else if (fromWitch == 'itemCodeScan') {
result.fromLocationCode = this.fromLocationCode
- this.$refs.scanPopup.getScanResult(result)
+ result.label.itemCode = result.label.code
+ this.checkItemCode(result.label.itemCode, callBack => {
+
+ if (callBack) {
+ if (checkDirectoryItemExist(this.itemCodeTypeList, callBack)) {
+ this.$refs.scanPopup.getScanResult(result)
+ } else {
+ this.$refs.okToHoldRecordPackRef.itemCode = ''
+ var hint = getListItemTypeDesc(this.itemCodeTypeList);
+ this.showErrorMessage("扫描物料[" + result.label.itemCode + "]是[" +
+ getItemTypeName(callBack) + "],需要的物料类型是[" + hint + "]")
+ }
+
+ } else {
+ this.$refs.okToHoldRecordPackRef.itemCode = ''
+ this.showErrorMessage('未查找到物料【' + result.label.itemCode + '】');
+ }
+
+ })
+
+
}
},
// 清除来源库位
diff --git a/src/pages/inventoryMove/coms/okToHoldRecordPack.vue b/src/pages/inventoryMove/coms/okToHoldRecordPack.vue
index 73f622e9..09dba246 100644
--- a/src/pages/inventoryMove/coms/okToHoldRecordPack.vue
+++ b/src/pages/inventoryMove/coms/okToHoldRecordPack.vue
@@ -1,53 +1,59 @@
-
+
- 需求信息
+ 需求信息
-
+
来源库位:
-
-
+
+
-
+
零件:
-
-
+
+
-
+
批次:
-
+
数量:
-
+
-
+
-
+
@@ -59,30 +65,36 @@
import {
getBusinessType
} from '@/common/record.js';
-
+
import {
getLabelInfo
} from '../../../common/label.js';
-
-import uom from '@/mycomponents/qty/uom.vue'
-
-
+
+ import {
+ getBasicLocationByCode,
+ } from '@/api/request2.js';
+
+ import uom from '@/mycomponents/qty/uom.vue'
+
+
export default {
components: {
winScanLocation,
uom
},
- emits: ["showFromLocationPopup",'itemCodeClick','confirm','getInputMsgResult','clearFromLocationCode','clickBtnClearItemCode'],
+ emits: ["showFromLocationPopup", 'itemCodeClick', 'confirm', 'getInputMsgResult', 'clearFromLocationCode',
+ 'clickBtnClearItemCode'
+ ],
data() {
return {
- handleQty:0,
- fromLocationCode:'',
- itemCode:'',
- batch:'',
- showOne:false,
- isFromLocationFocus:false,
- uom:""
+ handleQty: 0,
+ fromLocationCode: '',
+ itemCode: '',
+ batch: '',
+ showOne: false,
+ isFromLocationFocus: false,
+ uom: ""
}
},
props: {
@@ -92,33 +104,32 @@ import uom from '@/mycomponents/qty/uom.vue'
default: false
},
},
- mounted() {
- },
+ mounted() {},
methods: {
// 打开扫描来源库位组件
- fromLocationClick(){
+ fromLocationClick() {
// this.$refs.scanLocationCode.openScanPopup()
this.$emit("showFromLocationPopup");
},
// 显示箱码
- itemCodeClick(){
+ itemCodeClick() {
// this.$refs.scanLocationCode.openScanPopup()
- if(!this.fromLocationCode){
+ if (!this.fromLocationCode) {
this.$refs.comMessage.showMessage("请先扫描来源库位")
return
}
this.$emit("itemCodeClick");
},
- confirm(){
+ confirm() {
// this.$refs.scanLocationCode.openScanPopup()
-
+
let obj = {
- fromLocationCode:this.fromLocationCode,
- itemCode:this.itemCode,
- batch:this.batch,
- handleQty:this.handleQty,
+ fromLocationCode: this.fromLocationCode,
+ itemCode: this.itemCode,
+ batch: this.batch,
+ handleQty: this.handleQty,
}
- this.$emit("confirm",obj);
+ this.$emit("confirm", obj);
// if(!obj.fromLocationCode){
// this.$refs.comMessage.showErrorMessage('请选择来源库位');
// return;
@@ -131,26 +142,32 @@ import uom from '@/mycomponents/qty/uom.vue'
// this.$refs.comMessage.showErrorMessage('请输入数量');
// return;
// }
-
+
},
- fromLocationScanMsg(){
- if (this.fromLocationCode) {
- this.scanMsg = this.fromLocationCode
- this.fromWitch = 'fromLocationScanMsg'
- this.isFromLocationFocus = false
- this.handelScanMsg()
- }
+ fromLocationScanMsg() {
+ setTimeout(() => {
+ if (this.fromLocationCode) {
+ this.scanMsg = this.fromLocationCode
+ this.fromWitch = 'fromLocationScanMsg'
+ this.isFromLocationFocus = false
+ this.handelScanMsg()
+ }
+ }, 500);
+
},
- itemCodeScanMsg(){
- if (this.itemCode) {
- if(!this.fromLocationCode){
- this.$refs.comMessage.showMessage("请先扫描来源库位")
- return
- }
- this.fromWitch = 'itemCodeScanMsg'
- this.scanMsg = this.itemCode
- this.handelScanMsg()
- }
+ itemCodeScanMsg() {
+ setTimeout(() => {
+ if (this.itemCode) {
+ if (!this.fromLocationCode) {
+ this.$refs.comMessage.showMessage("请先扫描来源库位")
+ return
+ }
+ this.fromWitch = 'itemCodeScan'
+ this.scanMsg = this.itemCode
+ this.handelScanMsg()
+ }
+ }, 500);
+
},
handelScanMsg() {
//点击了回车
@@ -159,7 +176,7 @@ import uom from '@/mycomponents/qty/uom.vue'
// mask: true
// })
let that = this;
- console.log(777,that.scanMsg)
+ console.log(777, that.scanMsg)
// if(index==-1){
// that.scanMsg =that.scanMsg + "\n";
// }
@@ -179,11 +196,11 @@ import uom from '@/mycomponents/qty/uom.vue'
})
return;
}
-
+
if (that.isShowHistory) {
that.scanList.unshift(content);
}
-
+
getLabelInfo(content, this.headerType, callback => {
// uni.hideLoading();
let scanResult = callback;
@@ -191,7 +208,7 @@ import uom from '@/mycomponents/qty/uom.vue'
if (scanResult.success) {
// that.getfocus();//不能自动获取焦点
console.log(scanResult)
- that.$emit("getInputMsgResult", scanResult,this.fromWitch);
+ that.$emit("getInputMsgResult", scanResult, this.fromWitch);
} else {
that.losefocus();
this.$refs.comMessage.showErrorMessage(scanResult.message, res => {
@@ -210,50 +227,56 @@ import uom from '@/mycomponents/qty/uom.vue'
that.boxfocus = false;
});
},
- clickBtnClearFromLocation(){
+ clickBtnClearFromLocation() {
this.$emit("clickBtnClearFromLocation");
},
- clickBtnClearItemCode(){
+ clickBtnClearItemCode() {
this.$emit("clickBtnClearItemCode");
},
},
watch: {
-
+
}
}
\ No newline at end of file