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