niexiting
9 months ago
24 changed files with 179 additions and 82 deletions
@ -0,0 +1,47 @@ |
|||
<template> |
|||
<view class="std_pack" v-if="dataContent.packQty!=undefined"> |
|||
<text> |
|||
{{Number(dataContent.packQty)}}{{getUomInfo(dataContent.uom)}}/{{getPackUnitName(dataContent.packUnit)}} |
|||
</text> |
|||
</view> |
|||
</template> |
|||
<script> |
|||
import { |
|||
getUomInfo, |
|||
getPackUnitName |
|||
} from '@/common/directory.js'; |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
|
|||
}; |
|||
}, |
|||
// 此处定义传入的数据 |
|||
props: { |
|||
dataContent: { |
|||
packQty: 1000, |
|||
uom: "EA", |
|||
}, |
|||
}, |
|||
methods: { |
|||
getUomInfo(uom) { |
|||
let item = getUomInfo(uom); |
|||
if (item == '') { |
|||
return uom; |
|||
} else { |
|||
return item.label |
|||
} |
|||
}, |
|||
|
|||
getPackUnitName(packUnit) { |
|||
let unit = getPackUnitName(packUnit); |
|||
return unit; |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
|
|||
<style> |
|||
</style> |
Loading…
Reference in new issue