diff --git a/common/directory.js b/common/directory.js index 4ad973c2..0ae9dfd8 100644 --- a/common/directory.js +++ b/common/directory.js @@ -15,6 +15,7 @@ let inspectFailedReasonList = []; let nextActionList = []; let inspectTypeList = []; let sampleMethodList = []; +let transferModeList = []; // 获取业务类型字典项 @@ -46,7 +47,8 @@ export function clearCacheData() { inspectFailedReasonList = []; nextActionList = []; inspectTypeList = []; - sampleMethodList =[] + sampleMethodList =[]; + transferModeList = []; } //获取字典信息 @@ -185,6 +187,17 @@ export function getLocationTypeName(value) { return location == '' ? value : location.label; } + +//获取库位类型名称 +export function getLocationTypeNameList(lst) { + let desc = ''; + lst.forEach(res => { + desc += getLocationTypeInfo(res).label + "," + }) + desc = desc.slice(0, -1); + return desc; +} + //获取计量单位 export function getUnitInfo(value) { var resultInfo = ""; @@ -282,7 +295,7 @@ export function getInventoryStatusName(value) { } } -//获取状态描述 +//获取状态描述 list export function getInventoryStatusDesc(lst) { let desc = ''; lst.forEach(res => { @@ -404,5 +417,25 @@ export function getSampleMethod(value) { return resultInfo } +//获取运输方式 +export function getTransferModeName(value) { + var resultInfo = ""; + if (transferModeList.length == 0) { + transferModeList = getDirectoryInfo("transfer_mode") + } + if (transferModeList.length > 0) { + for (let item of transferModeList) { + if (item.value == value) { + resultInfo = item.label + break; + } + } + } + return resultInfo +} + + + + diff --git a/mycomponents/common/comListItem.vue b/mycomponents/common/comListItem.vue index 4af08b7a..ec9b85b1 100644 --- a/mycomponents/common/comListItem.vue +++ b/mycomponents/common/comListItem.vue @@ -6,7 +6,15 @@ {{item.content}} {{formatDate(item.content)}} {{boolean(item.content)}} - + {{getTransferModeName(item.content)}} + {{getLocationTypeNameList(getDirectoryItemArray(item.content))}} + {{getUnitInfo(item.content)}} + {{getInspectType(item.content)}} + {{getSampleMethod(item.content)}} + {{getRequestStateInfo(item.content)}} + {{getInventoryStatusName(item.content)}} + {{getLocationTypeName(item.content)}} + @@ -17,6 +25,19 @@ import { dateFormat } from '@/common/basic.js'; + + import { + getTransferModeName, + getLocationTypeNameList, + getDirectoryItemArray, + getUnitInfo, + getInspectType, + getSampleMethod, + getRequestStateInfo, + getInventoryStatusName, + getLocationTypeName + + } from '@/common/directory.js'; export default { components: {}, data() { @@ -50,6 +71,33 @@ }, formatDate(val) { return dateFormat(val) + }, + getTransferModeName(value){ + return getTransferModeName(value) + }, + getLocationTypeNameList(value){ + return getLocationTypeNameList(value) + }, + getDirectoryItemArray(value){ + return getDirectoryItemArray(value) + }, + getUnitInfo(value){ + return getUnitInfo(value).label + }, + getInspectType(value){ + return getInspectType(value) + }, + getSampleMethod(value){ + return getSampleMethod(value) + }, + getRequestStateInfo(value){ + return getRequestStateInfo(value).label + }, + getInventoryStatusName(value){ + return getInventoryStatusName(value) + }, + getLocationTypeName(value){ + return getLocationTypeName(value) } } } diff --git a/mycomponents/detail/comDetailCard.vue b/mycomponents/detail/comDetailCard.vue index 258e90c0..f3c72706 100644 --- a/mycomponents/detail/comDetailCard.vue +++ b/mycomponents/detail/comDetailCard.vue @@ -1,6 +1,6 @@