diff --git a/common/basic.js b/common/basic.js index b7467356..83be91dc 100644 --- a/common/basic.js +++ b/common/basic.js @@ -1001,10 +1001,11 @@ export function deepCopyData(target) { if (!(target !== null && (typeof target === 'object' || typeof target === 'function'))) { return target; } + let cloneTarget = Array.isArray(target) ? [] : {}; // 克隆对象和数组 for (const key in target) { - cloneTarget[key] = this.deepCopyData(target[key]); + cloneTarget[key] = deepCopyData(target[key]); } return cloneTarget; diff --git a/common/directory.js b/common/directory.js index 8d76a32b..844cf38a 100644 --- a/common/directory.js +++ b/common/directory.js @@ -1,7 +1,5 @@ - - let jobStatusList = []; -let itemStatusList =[]; +let itemStatusList = []; let locationTypeList = []; let uomList = []; let inventoryStatusList = []; @@ -13,7 +11,8 @@ let unplannedIssueReasonList = []; let unplannedIissueReason = []; let scrapReasonList = []; let inspectFailedReasonList = []; -let nextActionList = []; +let inspectResultList = []; +let nextActionList = []; let inspectTypeList = []; let sampleMethodList = []; let transferModeList = []; @@ -21,6 +20,8 @@ let countStageList = []; + + // 获取业务类型字典项 export function getBusinessTypeDesc(type) { if (type == "SupplierDeliver") { @@ -36,29 +37,30 @@ export function getBusinessTypeDesc(type) { //获取字典信息 export function clearCacheData() { - jobStatusList = []; - itemStatusList =[]; - locationTypeList = []; - uomList = []; - inventoryStatusList = []; - containerTypeList = []; - packUnitList = []; - requestStatusList = []; - unplannedReceiptReasonList = []; - unplannedIssueReasonList=[]; - unplannedIissueReason = []; - scrapReasonList = []; - inspectFailedReasonList = []; - nextActionList = []; - inspectTypeList = []; - sampleMethodList =[]; - transferModeList = []; - countStageList =[]; + jobStatusList = []; + itemStatusList = []; + locationTypeList = []; + uomList = []; + inventoryStatusList = []; + containerTypeList = []; + packUnitList = []; + requestStatusList = []; + unplannedReceiptReasonList = []; + unplannedIssueReasonList = []; + unplannedIissueReason = []; + scrapReasonList = []; + inspectFailedReasonList = []; + inspectResultList = []; + nextActionList = []; + inspectTypeList = []; + sampleMethodList = []; + transferModeList = []; + countStageList = []; } //获取字典信息 export function getDirectoryInfo(type) { - + var result = []; var list = uni.getStorageSync("dictionary") if (list != undefined && list.length > 0) { @@ -375,6 +377,20 @@ export function getInspectFailedReasonList(value) { return inspectFailedReasonList } +//获取检验结果 +export function getInspectResultList(value) { + if (inspectResultList.length == 0) { + inspectResultList = getDirectoryInfo("inspect_result") + } + inspectResultList.forEach(res => { + res.text = res.label; + res.value = res.value + }) + return inspectResultList +} + + + //获取下一步动作 export function getNextActionList(value) { if (nextActionList.length == 0) { @@ -455,12 +471,3 @@ export function getCountStageName(value) { } return resultInfo } - - - - - - - - - diff --git a/pages/index/index.vue b/pages/index/index.vue index a64e154e..d0c06704 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -319,7 +319,7 @@ "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", - "count_stage" + "count_stage","inspect_result" ] } getDictionaryItem(params).then(res => { diff --git a/pages/inspect/coms/inspectEdit.vue b/pages/inspect/coms/inspectEdit.vue index 4cefd83e..378fb009 100644 --- a/pages/inspect/coms/inspectEdit.vue +++ b/pages/inspect/coms/inspectEdit.vue @@ -39,13 +39,13 @@ - - + + 检验结果 - - + + + @@ -64,7 +64,13 @@