Commit 24270ac6 by 岑成威

fix: 商品活动

1 parent ec7bfbee
...@@ -22,25 +22,25 @@ ...@@ -22,25 +22,25 @@
</view> </view>
</template> </template>
<template slot="frontGear"> <template slot="frontGear">
<Product v-if="orderObj.frontGear" @changeTotalPrice="changeTotalPrice" @min-price-warning="handleMinPriceWarning" :list="orderObj.frontGear" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product> <Product v-if="orderObj.frontGear" @changeTotalPrice="changeTotalPrice" :list="orderObj.frontGear" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product>
</template> </template>
<template slot="frontWindow"> <template slot="frontWindow">
<Product v-if="orderObj.frontWindow" @changeTotalPrice="changeTotalPrice" @min-price-warning="handleMinPriceWarning" :list="orderObj.frontWindow" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product> <Product v-if="orderObj.frontWindow" @changeTotalPrice="changeTotalPrice" :list="orderObj.frontWindow" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product>
</template> </template>
<template slot="rearWindow"> <template slot="rearWindow">
<Product v-if="orderObj.rearWindow" @changeTotalPrice="changeTotalPrice" @min-price-warning="handleMinPriceWarning" :list="orderObj.rearWindow" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product> <Product v-if="orderObj.rearWindow" @changeTotalPrice="changeTotalPrice" :list="orderObj.rearWindow" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product>
</template> </template>
<template slot="rearGear"> <template slot="rearGear">
<Product v-if="orderObj.rearGear" @changeTotalPrice="changeTotalPrice" @min-price-warning="handleMinPriceWarning" :list="orderObj.rearGear" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product> <Product v-if="orderObj.rearGear" @changeTotalPrice="changeTotalPrice" :list="orderObj.rearGear" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product>
</template> </template>
<template slot="sunRoof"> <template slot="sunRoof">
<Product v-if="orderObj.sunRoof" @changeTotalPrice="changeTotalPrice" @min-price-warning="handleMinPriceWarning" :list="orderObj.sunRoof" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product> <Product v-if="orderObj.sunRoof" @changeTotalPrice="changeTotalPrice" :list="orderObj.sunRoof" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product>
</template> </template>
<template slot="package"> <template slot="package">
<Package v-if="orderObj.package" @changeTotalPrice="changeTotalPrice" @min-price-warning="handleMinPriceWarning" :list="orderObj.package" :positionTypeList="positionTypeList" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Package> <Package v-if="orderObj.package" @changeTotalPrice="changeTotalPrice" :list="orderObj.package" :positionTypeList="positionTypeList" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Package>
</template> </template>
<template slot="skuGoods"> <template slot="skuGoods">
<SkuGoods v-if="orderObj.skuGoods" :list="orderObj.skuGoods" @changeTotalPrice="changeTotalPrice" @min-price-warning="handleMinPriceWarning" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></SkuGoods> <SkuGoods v-if="orderObj.skuGoods" :list="orderObj.skuGoods" @changeTotalPrice="changeTotalPrice" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></SkuGoods>
<view class="total" v-if="totalPrice > 0"> <view class="total" v-if="totalPrice > 0">
<view class="total-left">总价</view> <view class="total-left">总价</view>
<view class="total-right">¥{{ totalPrice }}</view> <view class="total-right">¥{{ totalPrice }}</view>
...@@ -56,40 +56,12 @@ ...@@ -56,40 +56,12 @@
</view> </view>
<!-- 弹窗 --> <!-- 弹窗 -->
<order-popup ref="orderPopup" :data="orderObj" :dataKey="valueKey" @onConfirm="onConfirm" :externalData="externalData" :popupType="popupType" :show-marketing-icon="true" :boutique-order-types-only="boutiqueOrderTypesOnly" /> <order-popup ref="orderPopup" :data="orderObj" :dataKey="valueKey" @onConfirm="onConfirm" :externalData="externalData" :popupType="popupType" :show-marketing-icon="true" :boutique-order-types-only="boutiqueOrderTypesOnly" />
<ErrorOrderPopup
:show.sync="showMinPriceApprovalPopup"
title=""
:width="848"
:topImage="require('@/assets/images/common/warning-notice.webp')"
:topImageWidth="848"
:topImageHeight="248"
style="overflow: hidden"
>
<view>
<view class="error-order-title">需总部运营审批</view>
<view class="error-order-content">当前商品单价低于商品最低价,请提交后经总部运营审批通过后方可下单,确认继续提交?</view>
<view class="error-order-price">当前单价:¥{{ minPriceApprovalPrice }}</view>
</view>
<template #footer>
<view class="flex justify-between error-order-footer">
<view class="footer-btn know flex-1" @click="showMinPriceApprovalPopup = false">我知道了</view>
</view>
</template>
</ErrorOrderPopup>
<MinPriceApprovalDrawer
ref="minPriceApprovalDrawer"
:list="minPriceApprovalList"
@submit="doSubmit"
/>
</view> </view>
</template> </template>
<script> <script>
import utils from '@/utils/utils' import utils from '@/utils/utils'
import OrderPopup from '@/components/OrderPopup/index.vue' import OrderPopup from '@/components/OrderPopup/index.vue'
import ErrorOrderPopup from '@/components/ErrorOrderPopup.vue'
import GlCell from '../../../../components/Form/GlCell.vue' import GlCell from '../../../../components/Form/GlCell.vue'
import Product from './Product.vue' import Product from './Product.vue'
import Package from './Package.vue' import Package from './Package.vue'
...@@ -97,20 +69,17 @@ import SkuGoods from './SkuGoods.vue' ...@@ -97,20 +69,17 @@ import SkuGoods from './SkuGoods.vue'
import { FORM_LIST, popupTypeEnum, payTypeList, titleList } from '../contant' import { FORM_LIST, popupTypeEnum, payTypeList, titleList } from '../contant'
import { interceptionMixin } from '@/mixin/index' import { interceptionMixin } from '@/mixin/index'
import { validateVin, formatVinInput } from '@/utils/vinVaildate' import { validateVin, formatVinInput } from '@/utils/vinVaildate'
import { collectBelowMinSellPriceItems } from '@/utils/minSellPrice'
import { getMarketingFlag, getActivityId, getSubmitMarketingFlag, getSubmitModifyFlag, getSubmitActivityId, snapshotOriginalPrice, snapshotOrderItemsOriginalPrice, snapshotActivityPriceFromCatalog } from '@/utils/marketingFlag' import { getMarketingFlag, getActivityId, getSubmitMarketingFlag, getSubmitModifyFlag, getSubmitActivityId, snapshotOriginalPrice, snapshotOrderItemsOriginalPrice, snapshotActivityPriceFromCatalog } from '@/utils/marketingFlag'
import { collectBelowMinSellPriceItems, shouldUseMinPriceApproval } from '@/utils/minSellPrice'
import MinPriceApprovalDrawer from './MinPriceApprovalDrawer.vue'
export default { export default {
name: 'CreateOrder', name: 'CreateOrder',
mixins: [interceptionMixin], mixins: [interceptionMixin],
components: { components: {
GlCell, GlCell,
OrderPopup, OrderPopup,
ErrorOrderPopup,
Product, Product,
Package, Package,
SkuGoods, SkuGoods
MinPriceApprovalDrawer
}, },
props: { props: {
transmissionOfData: { transmissionOfData: {
...@@ -226,9 +195,6 @@ export default { ...@@ -226,9 +195,6 @@ export default {
valueKey: '', valueKey: '',
totalPrice: 0, totalPrice: 0,
validateState: true, validateState: true,
showMinPriceApprovalPopup: false,
minPriceApprovalPrice: '0',
minPriceApprovalList: [],
// 产品槽位配置,用于循环渲染产品组件 // 产品槽位配置,用于循环渲染产品组件
productSlots: { productSlots: {
frontGear: true, frontGear: true,
...@@ -247,9 +213,6 @@ export default { ...@@ -247,9 +213,6 @@ export default {
boutiqueOrderTypesOnly() { boutiqueOrderTypesOnly() {
return this.orderCreateType === 'createWithPay' && !this.orderObj.id return this.orderCreateType === 'createWithPay' && !this.orderObj.id
}, },
useMinPriceApproval() {
return shouldUseMinPriceApproval(this.orderObj.orderTypeCode)
},
// 轻改场景 + 新建工单:隐藏场景名称表单项(仅展示层) // 轻改场景 + 新建工单:隐藏场景名称表单项(仅展示层)
hideSceneNameField() { hideSceneNameField() {
const { sceneType } = this.userInfo || {} const { sceneType } = this.userInfo || {}
...@@ -1027,13 +990,20 @@ export default { ...@@ -1027,13 +990,20 @@ export default {
return return
} }
const approvalList = this.useMinPriceApproval ? collectBelowMinSellPriceItems(this.orderObj) : []
if (approvalList.length > 0) {
this.minPriceApprovalList = approvalList // 低价提示
this.$refs.minPriceApprovalDrawer.open() const belowMinSellItems = collectBelowMinSellPriceItems(this.orderObj)
if (belowMinSellItems.length > 0) {
const names = belowMinSellItems.map(item => item.name).join('、')
uni.showModal({
title: '温馨提示',
content: `以下商品售价低于最低售价:${names},请修改后重新提交`,
showCancel: false,
confirmText: '知道了'
})
return return
} }
this.doSubmit() this.doSubmit()
}, },
async doSubmit() { async doSubmit() {
...@@ -1898,11 +1868,6 @@ export default { ...@@ -1898,11 +1868,6 @@ export default {
getCatalogActivityId({ merchantGoodsId, goodsId, packageGoods } = {}) { getCatalogActivityId({ merchantGoodsId, goodsId, packageGoods } = {}) {
return getActivityId(this.findCatalogGoodsMatch({ merchantGoodsId, goodsId, packageGoods })) return getActivityId(this.findCatalogGoodsMatch({ merchantGoodsId, goodsId, packageGoods }))
}, },
handleMinPriceWarning(price) {
if (!this.useMinPriceApproval) return
this.minPriceApprovalPrice = price
this.showMinPriceApprovalPopup = true
},
applyOrderEchoFromRest(orderData, { skipOrderId = false } = {}) { applyOrderEchoFromRest(orderData, { skipOrderId = false } = {}) {
const customer = orderData.customer || {} const customer = orderData.customer || {}
const customerCoupon = orderData.customerCoupon || {} const customerCoupon = orderData.customerCoupon || {}
...@@ -2158,52 +2123,6 @@ export default { ...@@ -2158,52 +2123,6 @@ export default {
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%); background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
} }
.error-order-title {
text-align: center;
color: #333333;
font-size: toRpx(40);
font-weight: 500;
}
.error-order-content {
width: 100%;
box-sizing: border-box;
text-align: center;
color: #666666;
font-size: toRpx(32);
font-weight: 400;
margin-top: toRpx(16);
line-height: 1.5;
white-space: normal;
word-break: break-word;
}
.error-order-price {
text-align: center;
color: #4673ff;
font-size: toRpx(32);
font-weight: 500;
margin-top: toRpx(24);
}
.error-order-footer {
margin-top: toRpx(64);
margin-bottom: toRpx(48);
width: 100%;
padding: 0 toRpx(32);
box-sizing: border-box;
.know {
height: toRpx(88);
border-radius: toRpx(64);
line-height: toRpx(88);
background: #f0f1f5;
color: #666666;
font-size: toRpx(32);
font-weight: 400;
text-align: center;
}
}
.customer-title { .customer-title {
.customer-file { .customer-file {
margin-left: toRpx(20); margin-left: toRpx(20);
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<!-- <view class="front-gear-label" v-if="goods.merchantGoodsPosition || goods.goodsInfo.goodsTypeName">{{goods.goodsInfo.goodsType===1?formatPosition(goods.merchantGoodsPosition, positionTypeList):goods.goodsInfo.goodsTypeName}}</view> --> <!-- <view class="front-gear-label" v-if="goods.merchantGoodsPosition || goods.goodsInfo.goodsTypeName">{{goods.goodsInfo.goodsType===1?formatPosition(goods.merchantGoodsPosition, positionTypeList):goods.goodsInfo.goodsTypeName}}</view> -->
<view class="front-gear-input"> <view class="front-gear-input">
<view class="unit">¥</view> <view class="unit">¥</view>
<input class="uni-input" type="digit" maxlength="9" placeholder="请输入价格" placeholder-style="font-size: 14px" v-model="goods.sellPrice" @blur="validatePrice($event, goods, ind, index)" /> <input class="uni-input" type="digit" maxlength="9" :disabled="isMarketingGoods(goods, item)" placeholder="请输入价格" placeholder-style="font-size: 14px" v-model="goods.sellPrice" @blur="validatePrice($event, goods, ind, index)" />
</view> </view>
</view> </view>
</view> </view>
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
<script> <script>
import utils from '@/utils/utils' import utils from '@/utils/utils'
import OrderStrategy from './OrderStrategy.vue' import OrderStrategy from './OrderStrategy.vue'
import { shouldShowMarketingIcon as checkMarketingIcon, snapshotOriginalPrice } from '@/utils/marketingFlag' import { shouldShowMarketingIcon as checkMarketingIcon, isMarketingGoods, snapshotOriginalPrice } from '@/utils/marketingFlag'
import { isBelowMinSellPrice, normalizeGoodsPrice, shouldUseMinPriceApproval, applyLegacyMinSellPriceClamp } from '@/utils/minSellPrice' import { normalizeGoodsPrice, applyLegacyMinSellPriceClamp } from '@/utils/minSellPrice'
export default { export default {
name: 'Package', name: 'Package',
...@@ -93,6 +93,7 @@ export default { ...@@ -93,6 +93,7 @@ export default {
} }
}, },
methods: { methods: {
isMarketingGoods,
// 验证价格输入(修改套餐内单个商品单价) // 验证价格输入(修改套餐内单个商品单价)
validatePrice(event, goods, goodsIndex, packageIndex) { validatePrice(event, goods, goodsIndex, packageIndex) {
let value = event.detail.value let value = event.detail.value
...@@ -196,14 +197,10 @@ export default { ...@@ -196,14 +197,10 @@ export default {
this.$emit('changeTotalPrice') this.$emit('changeTotalPrice')
}, },
validatePrice(event, goods, ind, index) { validatePrice(event, goods, ind, index) {
const packageItem = this.list[index]
if (isMarketingGoods(goods, packageItem)) return
let value = normalizeGoodsPrice(event.detail.value) let value = normalizeGoodsPrice(event.detail.value)
if (shouldUseMinPriceApproval(this.orderTypeCode)) { value = applyLegacyMinSellPriceClamp(goods, value)
if (isBelowMinSellPrice(goods, value)) {
this.$emit('min-price-warning', value)
}
} else {
value = applyLegacyMinSellPriceClamp(goods, value)
}
this.$set(this.list[index].packageGoods.goodsList[ind], 'sellPrice', value) this.$set(this.list[index].packageGoods.goodsList[ind], 'sellPrice', value)
// 价格变动时,清空该商品的折扣/买赠/抵扣配置,并按原价重算 finalPrice // 价格变动时,清空该商品的折扣/买赠/抵扣配置,并按原价重算 finalPrice
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</view> </view>
<view class="front-gear-input"> <view class="front-gear-input">
<view class="unit">¥</view> <view class="unit">¥</view>
<input class="uni-input" :disabled="isDisabled" type="digit" maxlength="9" placeholder="请输入价格" placeholder-style="font-size: 14px" v-model="item.goods.sellPrice" @blur="validatePrice($event, item, index)" /> <input class="uni-input" :disabled="isDisabled || isMarketingGoods(item.goods, item)" type="digit" maxlength="9" placeholder="请输入价格" placeholder-style="font-size: 14px" v-model="item.goods.sellPrice" @blur="validatePrice($event, item, index)" />
</view> </view>
</view> </view>
<view class="control"> <view class="control">
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
<script> <script>
import utils from '@/utils/utils' import utils from '@/utils/utils'
import OrderStrategy from './OrderStrategy.vue' import OrderStrategy from './OrderStrategy.vue'
import { shouldShowMarketingIcon as checkMarketingIcon, snapshotOriginalPrice } from '@/utils/marketingFlag' import { shouldShowMarketingIcon as checkMarketingIcon, isMarketingGoods, snapshotOriginalPrice } from '@/utils/marketingFlag'
import { isBelowMinSellPrice, normalizeGoodsPrice, shouldUseMinPriceApproval, applyLegacyMinSellPriceClamp } from '@/utils/minSellPrice' import { normalizeGoodsPrice, applyLegacyMinSellPriceClamp } from '@/utils/minSellPrice'
export default { export default {
name: 'Product', name: 'Product',
...@@ -96,6 +96,7 @@ export default { ...@@ -96,6 +96,7 @@ export default {
} }
}, },
methods: { methods: {
isMarketingGoods,
// 根据订单类型获取策略类型 // 根据订单类型获取策略类型
getStrategyType(item) { getStrategyType(item) {
const orderType = String(this.orderTypeCode || '') const orderType = String(this.orderTypeCode || '')
...@@ -269,14 +270,9 @@ export default { ...@@ -269,14 +270,9 @@ export default {
}, },
// 验证价格输入 // 验证价格输入
validatePrice(event, item, index) { validatePrice(event, item, index) {
if (isMarketingGoods(item.goods, item)) return
let value = normalizeGoodsPrice(event.detail.value) let value = normalizeGoodsPrice(event.detail.value)
if (shouldUseMinPriceApproval(this.orderTypeCode)) { value = applyLegacyMinSellPriceClamp(item.goods, value)
if (isBelowMinSellPrice(item.goods, value)) {
this.$emit('min-price-warning', value)
}
} else {
value = applyLegacyMinSellPriceClamp(item.goods, value)
}
this.$set(this.list[index].goods, 'sellPrice', value) this.$set(this.list[index].goods, 'sellPrice', value)
this.resetStrategyWhenPriceChange(this.list[index]) this.resetStrategyWhenPriceChange(this.list[index])
this.$forceUpdate() this.$forceUpdate()
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
<view class="front-gear-input"> <view class="front-gear-input">
<view class="unit">¥</view> <view class="unit">¥</view>
<template v-if="item.multipleSpecificationsGoods"> <template v-if="item.multipleSpecificationsGoods">
<input class="uni-input" type="digit" maxlength="9" :disabled="isDisabled" placeholder="请输入价格" placeholder-style="font-size: 14px" v-model="item.multipleSpecificationsGoods.goods.sellPrice" @blur="validatePrice($event, item, index)" /> <input class="uni-input" type="digit" maxlength="9" :disabled="isDisabled || isMarketingGoods(item.multipleSpecificationsGoods.goods, item)" placeholder="请输入价格" placeholder-style="font-size: 14px" v-model="item.multipleSpecificationsGoods.goods.sellPrice" @blur="validatePrice($event, item, index)" />
</template> </template>
<template v-else> <template v-else>
<input class="uni-input" type="digit" :disabled="isDisabled" maxlength="9" placeholder="请输入价格" placeholder-style="font-size: 14px" v-model="item.goods.sellPrice" @blur="validatePrice($event, item, index)" /> <input class="uni-input" type="digit" :disabled="isDisabled || isMarketingGoods(item.goods, item)" maxlength="9" placeholder="请输入价格" placeholder-style="font-size: 14px" v-model="item.goods.sellPrice" @blur="validatePrice($event, item, index)" />
</template> </template>
<!-- <input class="uni-input" type="digit" maxlength="9" placeholder="请输入价格" <!-- <input class="uni-input" type="digit" maxlength="9" placeholder="请输入价格"
placeholder-style="font-size: 14px" placeholder-style="font-size: 14px"
...@@ -65,8 +65,8 @@ ...@@ -65,8 +65,8 @@
<script> <script>
import utils from '@/utils/utils' import utils from '@/utils/utils'
import OrderStrategy from './OrderStrategy.vue' import OrderStrategy from './OrderStrategy.vue'
import { shouldShowMarketingIcon as checkMarketingIcon } from '@/utils/marketingFlag' import { shouldShowMarketingIcon as checkMarketingIcon, isMarketingGoods } from '@/utils/marketingFlag'
import { getSkuGoodsPriceTarget, isBelowMinSellPrice, normalizeGoodsPrice, shouldUseMinPriceApproval, applyLegacyMinSellPriceClamp } from '@/utils/minSellPrice' import { getSkuGoodsPriceTarget, normalizeGoodsPrice, applyLegacyMinSellPriceClamp } from '@/utils/minSellPrice'
export default { export default {
name: 'SkuGoods', name: 'SkuGoods',
...@@ -122,6 +122,7 @@ export default { ...@@ -122,6 +122,7 @@ export default {
} }
}, },
methods: { methods: {
isMarketingGoods,
// 初始化商品数量方法 // 初始化商品数量方法
initProductNumbers() { initProductNumbers() {
if (this.list && this.list.length > 0) { if (this.list && this.list.length > 0) {
...@@ -152,15 +153,10 @@ export default { ...@@ -152,15 +153,10 @@ export default {
}, },
// 验证价格输入 // 验证价格输入
validatePrice(event, item, index) { validatePrice(event, item, index) {
let value = normalizeGoodsPrice(event.detail.value)
const priceTarget = getSkuGoodsPriceTarget(item) const priceTarget = getSkuGoodsPriceTarget(item)
if (shouldUseMinPriceApproval(this.orderTypeCode)) { if (!priceTarget || isMarketingGoods(priceTarget, item)) return
if (isBelowMinSellPrice(priceTarget, value)) { let value = normalizeGoodsPrice(event.detail.value)
this.$emit('min-price-warning', value) value = applyLegacyMinSellPriceClamp(priceTarget, value)
}
} else if (priceTarget) {
value = applyLegacyMinSellPriceClamp(priceTarget, value)
}
if (item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods) { if (item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods) {
this.$set(this.list[index].multipleSpecificationsGoods.goods, 'sellPrice', value) this.$set(this.list[index].multipleSpecificationsGoods.goods, 'sellPrice', value)
} else if (item.goods) { } else if (item.goods) {
......
...@@ -20,6 +20,7 @@ export function getGoodsActivityPrice(goods, orderItem) { ...@@ -20,6 +20,7 @@ export function getGoodsActivityPrice(goods, orderItem) {
} }
function buildSingleApprovalItem(item, goods, number) { function buildSingleApprovalItem(item, goods, number) {
if (isMarketingGoods(goods, item)) return null
const sellPrice = normalizeGoodsPrice(goods.sellPrice) const sellPrice = normalizeGoodsPrice(goods.sellPrice)
if (!isBelowMinSellPrice(goods, sellPrice)) return null if (!isBelowMinSellPrice(goods, sellPrice)) return null
return { return {
...@@ -51,6 +52,7 @@ function getPackageDisplayTotal(item, orderTypeCode) { ...@@ -51,6 +52,7 @@ function getPackageDisplayTotal(item, orderTypeCode) {
function buildPackageApprovalItem(item, orderTypeCode) { function buildPackageApprovalItem(item, orderTypeCode) {
const children = (item.packageGoods.goodsList || []) const children = (item.packageGoods.goodsList || [])
.map(goods => { .map(goods => {
if (isMarketingGoods(goods, item)) return null
const sellPrice = normalizeGoodsPrice(goods.sellPrice) const sellPrice = normalizeGoodsPrice(goods.sellPrice)
if (!isBelowMinSellPrice(goods, sellPrice)) return null if (!isBelowMinSellPrice(goods, sellPrice)) return null
return { return {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!