diff --git a/api/request2.js b/api/request2.js
index d1791264..cbe3dcaf 100644
--- a/api/request2.js
+++ b/api/request2.js
@@ -96,6 +96,19 @@ export function updateUserPwd(oldPassword, newPassword) {
})
}
+/**
+ * 获取仓库代码
+ * @param {*}
+ *
+ */
+export function getWarehouseCodeList(pageNo,pageSize) {
+ return request({
+ url: baseApi + "/wms/warehouse/page?pageNo="+pageNo+"&pageSize="+pageSize,
+ method: "get",
+ data: {},
+ });
+}
+
/**
* 获取消息列表
* @param {*}
diff --git a/common/directory.js b/common/directory.js
index 844cf38a..934b4322 100644
--- a/common/directory.js
+++ b/common/directory.js
@@ -1,5 +1,6 @@
let jobStatusList = [];
let itemStatusList = [];
+let itemTypeList =[];
let locationTypeList = [];
let uomList = [];
let inventoryStatusList = [];
@@ -39,6 +40,7 @@ export function getBusinessTypeDesc(type) {
export function clearCacheData() {
jobStatusList = [];
itemStatusList = [];
+ itemTypeList =[];
locationTypeList = [];
uomList = [];
inventoryStatusList = [];
@@ -143,16 +145,57 @@ export function getJobStateStyle(value) {
}
}
-//获取库位描述
-export function getListLocationTypeDesc(lst) {
+//获取库位描述(多个库位)
+export function getListLocationTypeDesc(list) {
let desc = '';
- lst.forEach(res => {
+ list.forEach(res => {
desc += getLocationTypeInfo(res).label + ","
})
desc = desc.slice(0, -1);
return desc;
}
+
+//获取物品状态(多个状态)
+export function getListItemStateDesc(list) {
+ let desc = '';
+ list.forEach(res => {
+ desc += getItemStateInfo(res).label + ","
+ })
+ desc = desc.slice(0, -1);
+ return desc;
+}
+
+//获取物品类型(多个)
+export function getListItemTypeDesc(list) {
+ let desc = '';
+ list.forEach(res => {
+ desc += getItemTypeInfo(res).label + ","
+ })
+ desc = desc.slice(0, -1);
+ return desc;
+}
+
+//获取物品类型
+export function getItemTypeInfo(value) {
+ var resultInfo = "";
+ if (itemTypeList.length == 0) {
+ itemTypeList = getDirectoryInfo("item_type")
+ }
+ if (itemTypeList.length > 0) {
+ for (let item of itemTypeList) {
+ if (item.value == value) {
+ resultInfo = item
+ break;
+ }
+ }
+ }
+ return resultInfo
+}
+
+
+
+
//获取物品状态
export function getItemStateInfo(value) {
var resultInfo = "";
diff --git a/common/record.js b/common/record.js
index db2b1110..ae3d69eb 100644
--- a/common/record.js
+++ b/common/record.js
@@ -58,6 +58,8 @@ export function getBusinessType(typeCode, callback) {
businessType: '',
fromlocationTypeList: '',
tolocationTypeList: '',
+ itemCodeTypeList:"",
+ useOnTheWay:"FALSE",
fromInventoryStatuses: '',
toInventoryStatuses: '',
message: ''
@@ -67,8 +69,10 @@ export function getBusinessType(typeCode, callback) {
result.businessType = res.data.list[0];
result.fromlocationTypeList = getDirectoryItemArray(res.data.list[0].outLocationTypes)
result.tolocationTypeList = getDirectoryItemArray(res.data.list[0].inLocationTypes)
+ result.itemCodeTypeList = getDirectoryItemArray(res.data.list[0].itemTypes)
result.fromInventoryStatuses = res.data.list[0].outInventoryStatuses;
result.toInventoryStatuses = res.data.list[0].inInventoryStatuses;
+ result.useOnTheWay =res.data.list[0].useOnTheWay
callback(result)
} else {
result.success = false;
diff --git a/mycomponents/item/itemQty.vue b/mycomponents/item/itemQty.vue
index 4a6904fa..ed980091 100644
--- a/mycomponents/item/itemQty.vue
+++ b/mycomponents/item/itemQty.vue
@@ -6,7 +6,7 @@
-
+
@@ -45,7 +45,7 @@
type: Number,
default: 0
},
- showItemQty: {
+ isShowBalanceQty: {
type: Boolean,
default: true
},
diff --git a/mycomponents/popup/selectList.vue b/mycomponents/popup/selectList.vue
index 26176bef..a7e95530 100644
--- a/mycomponents/popup/selectList.vue
+++ b/mycomponents/popup/selectList.vue
@@ -1,28 +1,31 @@
-
-
+
+
选择物料
-
-
- 物料: {{item.itemCode}}
+
+
+
+ ({{index+1}}) 物料: {{item.itemCode}}
+
+
-
-
-
-
- 当前页:{{ pageCurrent }},数据总量:{{ total }}条,每页数据:{{ pageSize }}
+
+
+
+ 当前页:{{ pageCurrent }},数据总量:{{ total }}条,每页数据:{{ pageSize }}
+
+
+
+
+
+
-
-
-
-
-
@@ -31,7 +34,6 @@
diff --git a/mycomponents/scan/winScanPackAndLocation.vue b/mycomponents/scan/winScanPackAndLocation.vue
index e9a31989..a9f4baeb 100644
--- a/mycomponents/scan/winScanPackAndLocation.vue
+++ b/mycomponents/scan/winScanPackAndLocation.vue
@@ -28,7 +28,7 @@
+ @confirm="" style='height: 30rpx;border:1px solid #fff ;'>
@@ -121,7 +121,8 @@
businessType: {},
inventoryStatus: [],
managementPrecision: '',
- fromInventoryStatuses: ""
+ fromInventoryStatuses: "",
+ isCheck:false
}
},
created() {
@@ -167,20 +168,30 @@
this.$emit("close", '');
},
- scanLocation() {
+
+ scanLocation(scanResult) {
+ var isCheck = false;
if (this.fromLocationCode == '') {
- this.showMessage('来源库位不能为空', callback => {
+ this.showErrorMessage('来源库位不能为空', callback => {
this.locationGetFocus();
})
return;
}
+
+ if(this.fromLocationList.length>0){
+ if(!this.isInLocationList(this.fromLocationCode)){
+ this.showErrorMessage("扫描库位【"+this.fromLocationCode+'】不在任务来源库位中', callback => {
+ this.locationGetFocus();
+ })
+ return;
+ }
+ }
uni.showLoading({
title: '扫描中...',
mask: true
});
getBasicLocationByCode(this.fromLocationCode).then(res => {
- uni.hideLoading();
if (res.data.total > 0) {
let result = res.data.list[0];
var type = result.type;
@@ -188,8 +199,10 @@
if (available == "TRUE") {
if (checkDirectoryItemExist(this.fromLocationTypeArray, type)) {
this.location = result;
- this.packGetFocus();
+ // this.packGetFocus();
+ this.checkPackage(scanResult);
} else {
+ uni.hideLoading();
var hint = getListLocationTypeDesc(this.fromLocationTypeArray);
this.showErrorMessage("库位[" + this.fromLocationCode + "]是" +
getLocationTypeName(type) + ",
需要的库位类型是[" + hint + "]", callback => {
@@ -197,11 +210,13 @@
})
}
} else {
+ uni.hideLoading();
this.showErrorMessage("扫描库位[" + this.fromLocationCode + "]不可用", res => {
this.locationGetFocus();
})
}
} else {
+ uni.hideLoading();
this.showErrorMessage('未查询到库位[' + this.fromLocationCode + ']', res => {
this.locationGetFocus();
})
@@ -214,36 +229,45 @@
})
},
- getScanResult(result) {
- console.log("扫描", result)
- if (this.fromLocationCode == '' || this.fromLocationCode == null) {
- this.showMessage('请先扫描来源库位', callback => {
- this.locationGetFocus();
- })
- return;
- } else {
- if (result.label != null) {
- this.scanResult = result;
- // uni.showLoading({
- // title: '查询中...',
- // mask: true
- // })
- getBalanceByManagementPrecision(result.label, this.fromLocationCode, this.fromInventoryStatuses,
- res => {
- if (res.success) {
- this.managementPrecision = res.managementPrecision
- this.afterQueryBalance(res.data.list);
- } else {
- this.showErrorMessage(res.message, res => {
- this.packGetFocus();
- })
- }
- // uni.hideLoading();
- });
- }
+ getScanResult(result) {
+ // console.log("扫描", result)
+ // if (this.fromLocationCode == '' || this.fromLocationCode == null) {
+ // this.showMessage('请先扫描来源库位', callback => {
+ // this.locationGetFocus();
+ // })
+ // return;
+ // } else
+ this.scanLocation(result);
+ // debugger
+ // if(this.isCheck){
+ // this.checkPackage(result);
+ // }
+ },
+
+ checkPackage(result){
+ if (result.label != null) {
+ this.scanResult = result;
+ // uni.showLoading({
+ // title: '查询中...',
+ // mask: true
+ // })
+ getBalanceByManagementPrecision(result.label, this.fromLocationCode, this.fromInventoryStatuses,
+ res => {
+ uni.hideLoading();
+ if (res.success) {
+ this.managementPrecision = res.managementPrecision
+ this.afterQueryBalance(res.data.list);
+ } else {
+ this.showErrorMessage(res.message, res => {
+ this.packGetFocus();
+ })
+ }
+ // uni.hideLoading();
+ });
}
},
+
afterQueryBalance(datas) {
if (this.allowNullBalance) {
this.allowNoneBalance(datas);
@@ -400,6 +424,20 @@
change(e) {
this.show = e.show
},
+ isInLocationList(location) {
+
+ var item = this.fromLocationList.find(res => res == location)
+
+ if (item = undefined) {
+ return false
+ }
+ return true
+ },
+ addLocationCode(code) {
+ if (!this.isInLocationList(code)) {
+ this.fromLocationList.push(code)
+ }
+ }
}
}
diff --git a/mycomponents/scan/winScanPackAndPosition.vue b/mycomponents/scan/winScanPackAndPosition.vue
index a33bc574..dfe09e37 100644
--- a/mycomponents/scan/winScanPackAndPosition.vue
+++ b/mycomponents/scan/winScanPackAndPosition.vue
@@ -112,7 +112,7 @@
},
initData(){
- this.positionInfo= "请选择位置";
+ this.positionInfo = "请选择位置";
this.positionList = [];
this.productionLineCode = '';
this.rawLocationCode = "";
diff --git a/mycomponents/workStation/workStation.vue b/mycomponents/workStation/workStation.vue
index 9c99f96a..da284da9 100644
--- a/mycomponents/workStation/workStation.vue
+++ b/mycomponents/workStation/workStation.vue
@@ -2,6 +2,11 @@
+
+
-
-
+
+
+
+