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..c2bc0e36 100644
--- a/common/record.js
+++ b/common/record.js
@@ -67,6 +67,7 @@ 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;
callback(result)
diff --git a/mycomponents/scan/winComScan.vue b/mycomponents/scan/winComScan.vue
index aa4121a0..ccbcb74a 100644
--- a/mycomponents/scan/winComScan.vue
+++ b/mycomponents/scan/winComScan.vue
@@ -141,13 +141,19 @@
// })
let that = this;
let index = that.scanMsg.indexOf('\n');
- if (index > 0) {
+ if (index >= 0) {
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50';
setTimeout(() => {
that.losefocus();
let content = uni.$u.trim(that.scanMsg)
if (content == "") {
that.getfocus();
+ this.$refs.comMessage.showErrorMessage("扫描内容为空,请重新扫描", res => {
+ if (res) {
+ that.scanMsg=""
+ that.getfocus();
+ }
+ })
return;
}
diff --git a/mycomponents/scan/winScanItem.vue b/mycomponents/scan/winScanItem.vue
index 65917059..28bec4ba 100644
--- a/mycomponents/scan/winScanItem.vue
+++ b/mycomponents/scan/winScanItem.vue
@@ -13,29 +13,42 @@
-
+
-
+
diff --git a/pages/index/index.vue b/pages/index/index.vue
index b61426e0..7c9a604b 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -317,7 +317,7 @@
},
getDictory() {
var params = {
- types: ["job_status", "location_type", "item_status", "uom",
+ types: ["job_status", "location_type", "item_status","item_type","uom",
"inventory_status", "container_type", "pack_unit", "unplanned_receipt_reason",
"unplanned_issue_reason", "scrap_reason", "inspect_failed_reason",
"request_status", "inspect_type", "next_action", "sample_method", "transfer_mode",
diff --git a/pages/issue/coms/comIssueRequestPopup.vue b/pages/issue/coms/comIssueRequestPopup.vue
index aad3c3c4..f457fce7 100644
--- a/pages/issue/coms/comIssueRequestPopup.vue
+++ b/pages/issue/coms/comIssueRequestPopup.vue
@@ -62,7 +62,7 @@
-
+
@@ -97,7 +97,6 @@
},
data() {
return {
- // itemCode: 'CE115F11161AG',
workshopCode: "", //车间
workShopName: "",
productionLineCode: "", //生产线
@@ -112,7 +111,6 @@
itemCodeFocus: false,
requestInfo: null,
itemCodeList: [],
- isCheckItemCode: false,
counQty: undefined,
editPosition: true,
numberFocus: false,
@@ -131,6 +129,10 @@
type: String,
default: '需求信息'
},
+ itemCodeTypeList: {
+ type: Array,
+ default: []
+ },
},
methods: {
checkNum(e) {
@@ -162,7 +164,6 @@
this.isModifiedPosition = false
} else {
this.itemCode = "";
- this.isCheckItemCode = false;
this.show = false
this.uom = ""
this.qty = 0;
@@ -177,7 +178,6 @@
initData(){
this.positionList = [];
this.itemCode = "请扫描物料信息";
- this.isCheckItemCode = false;
this.rawLocationCode =""
this.positionInfo ="请选择位置"
this.workshopCode= "" //车间
@@ -211,10 +211,6 @@
itemCodeLoseFocus() {
this.itemCodeFocus = false;
},
- selectedItem(item) {
- this.itemCode = item.itemCode;
- this.checkItemCode();
- },
confirm() {
if (this.positionInfo == "请选择位置" ) {
@@ -222,7 +218,7 @@
return
}
- if (this.itemCode == "" || !this.isCheckItemCode) {
+ if (this.itemCode == "请扫描物料信息") {
this.showErrorMessage("请输入物料", "itemCode")
return
}
@@ -243,28 +239,6 @@
this.callback('add');
},
- checkItemCode(itemCode) {
- //校验物料
- getBasicItemByCode(itemCode).then(res => {
- uni.hideLoading();
- this.$refs.scanPopup.closeScanPopup();
- if (res.data != null && res.data.list.length > 0) {
- this.itemCode = res.data.list[0].code;
- this.itemName = res.data.list[0].name
- this.isCheckItemCode = true;
- this.numberFocus = true
- this.uom = res.data.list[0].uom
- } else {
- this.showErrorMessage('未查找到物料【' + itemCode + '】', "itemCode");
- }
-
- }).catch(error => {
- uni.hideLoading();
- this.showErrorMessage(error, "itemCode");
- })
- },
-
-
callback(action) {
let item = {
positionInfo: this.positionInfo,
@@ -295,8 +269,7 @@
}
})
if (type == "itemCode") {
- this.itemCode = ""
- this.isCheckItemCode = false;
+ this.itemCode = "请扫描物料信息"
}
})
},
@@ -343,13 +316,12 @@
},
getItemScanResult(code, scanResult) {
- if (code == "") {
- this.showErrorMessage('物料号不能为空')
- return;
- }
- this.itemCode = "";
- this.checkItemCode(code)
+ this.itemCode = code;
+ this.itemName = scanResult.name
+ this.uom =scanResult.uom
this.stdPackInfo = scanResult.package;
+ this.numberFocus = true
+
}
}
}
diff --git a/pages/issue/record/issueRecord.vue b/pages/issue/record/issueRecord.vue
index 970c6b9c..8ebadbfe 100644
--- a/pages/issue/record/issueRecord.vue
+++ b/pages/issue/record/issueRecord.vue
@@ -39,7 +39,7 @@
-
+
@@ -113,7 +113,8 @@
toInventoryStatuses: "",
requestList: [],
dataContent: {},
- managementList: []
+ managementList: [],
+ itemCodeTypeList: []
}
},
mounted() {
@@ -129,7 +130,7 @@
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
- this.fromlocationTypeList = res.fromlocationTypeList;
+ this.itemCodeTypeList = res.itemCodeTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.fromInventoryStatuses = res.fromInventoryStatuses
this.toInventoryStatuses = res.toInventoryStatuses