zhang_li
3 months ago
8 changed files with 191 additions and 147 deletions
@ -1,92 +1,91 @@ |
|||
<template> |
|||
<view> |
|||
<status v-show="isShowStatus" :status='dataContent.inventoryStatus'></status> |
|||
<view class="u-flex u-row center"> |
|||
<view class="u-flex u-row "> |
|||
<view v-if="Number(handleQty)!=0"> |
|||
<view v-if="isShowRecommendQty" style='font-weight:bold'> |
|||
<view v-if="Number(recommendQty)>Number(handleQty)" class="text_greater"> |
|||
{{Number(handleQty)}} |
|||
</view> |
|||
<view v-else-if="Number(recommendQty)<Number(handleQty)" class="text_less"> |
|||
{{Number(handleQty)}} |
|||
</view> |
|||
<view v-else-if="Number(recommendQty) ==Number(handleQty)" class="text_equal"> |
|||
{{Number(handleQty)}} |
|||
</view> |
|||
</view> |
|||
<view v-else> |
|||
<view class="text_balance"> |
|||
{{Number(handleQty)}} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="center" v-if="isShowRecommendQty"> |
|||
<view v-if="Number(handleQty)!=0" class="std_split">/</view> |
|||
<view class="text_recommend "> |
|||
{{Number(recommendQty)}} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<uom :uom="dataContent.uom"> |
|||
</uom> |
|||
</view> |
|||
<view> |
|||
<pack-unit v-show="isShowPackUnit" :dataContent="dataContent"></pack-unit> |
|||
</view> |
|||
</view> |
|||
<view> |
|||
<status v-show="isShowStatus" :status="dataContent.inventoryStatus"></status> |
|||
<view class="u-flex u-row center"> |
|||
<view class="u-flex u-row"> |
|||
<view v-if="Number(handleQty) != 0"> |
|||
<view v-if="isShowRecommendQty" style="font-weight: bold"> |
|||
<view v-if="Number(recommendQty) > Number(handleQty)" class="text_greater"> |
|||
{{ Number(handleQty) }} |
|||
</view> |
|||
<view v-else-if="Number(recommendQty) < Number(handleQty)" class="text_less"> |
|||
{{ Number(handleQty) }} |
|||
</view> |
|||
<view v-else-if="Number(recommendQty) == Number(handleQty)" class="text_equal"> |
|||
{{ Number(handleQty) }} |
|||
</view> |
|||
</view> |
|||
<view v-else> |
|||
<view class="text_balance"> |
|||
{{ Number(handleQty) }} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="center" v-if="isShowRecommendQty"> |
|||
<view v-if="Number(handleQty) != 0" class="std_split">/</view> |
|||
<view class="text_recommend"> |
|||
{{ Number(recommendQty) }} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<!-- <uom :uom="dataContent.uom"> |
|||
</uom> --> |
|||
<uom v-show="Number(handleQty) != 0 || (isShowRecommendQty && Number(recommendQty) > 0)" :uom="dataContent.uom"> </uom> |
|||
</view> |
|||
<view> |
|||
<pack-unit v-show="isShowPackUnit" :dataContent="dataContent"></pack-unit> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import { |
|||
watch |
|||
} from 'vue' |
|||
// import packQty from '@/mycomponents/qty/packQty.vue' |
|||
import packUnit from '@/mycomponents/qty/packUnit.vue' |
|||
import uom from '@/mycomponents/qty/uom.vue' |
|||
import status from '@/mycomponents/status/status.vue' |
|||
const props = defineProps({ |
|||
type: { |
|||
type: String, |
|||
default: 'default' //recommend:推荐 compare:对比 |
|||
}, |
|||
import { watch } from 'vue' |
|||
// import packQty from '@/mycomponents/qty/packQty.vue' |
|||
import packUnit from '@/mycomponents/qty/packUnit.vue' |
|||
import uom from '@/mycomponents/qty/uom.vue' |
|||
import status from '@/mycomponents/status/status.vue' |
|||
|
|||
dataContent: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
recommendQty: { |
|||
type: Number, |
|||
default: 0 |
|||
}, |
|||
const props = defineProps({ |
|||
type: { |
|||
type: String, |
|||
default: 'default' // recommend:推荐 compare:对比 |
|||
}, |
|||
|
|||
handleQty: { |
|||
type: Number, |
|||
default: 0 |
|||
}, |
|||
dataContent: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
recommendQty: { |
|||
type: Number, |
|||
default: 0 |
|||
}, |
|||
|
|||
isShowStatus: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowPackUnit: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowRecommendQty: { |
|||
type: Boolean, |
|||
default: true |
|||
} |
|||
}) |
|||
watch( |
|||
() => props.handleQty, |
|||
(val : boolean) => {}, |
|||
{ |
|||
immediate: true, |
|||
deep: true |
|||
} |
|||
) |
|||
handleQty: { |
|||
type: Number, |
|||
default: 0 |
|||
}, |
|||
|
|||
isShowStatus: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowPackUnit: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowRecommendQty: { |
|||
type: Boolean, |
|||
default: true |
|||
} |
|||
}) |
|||
watch( |
|||
() => props.handleQty, |
|||
(val: boolean) => {}, |
|||
{ |
|||
immediate: true, |
|||
deep: true |
|||
} |
|||
) |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
</style> |
|||
<style lang="scss"></style> |
|||
|
Loading…
Reference in new issue