Commit 61140f45 by cen

feat: 更新订单策略组件以支持新订单类型和价格计算

- 在 OrderPopup 中添加新的字段 `searchValue` 和 `noData`,以增强组件功能
- 修改 OrderStrategy 组件,支持折扣、买赠和组合付款策略的显示和计算
- 在 SkuGoods 组件中集成 OrderStrategy,确保价格计算逻辑与订单类型一致
- 更新样式以改善组件布局和用户体验
1 parent 0ed2a431
...@@ -386,7 +386,9 @@ const componentConfig = { ...@@ -386,7 +386,9 @@ const componentConfig = {
// 绑定 CreateOrder 中的字段名 // 绑定 CreateOrder 中的字段名
idKey: 'djOrderType', idKey: 'djOrderType',
cacheData: [], cacheData: [],
loadComplete: false loadComplete: false,
searchValue: '',
noData: false
} }
} }
export default { componentConfig } export default { componentConfig }
...@@ -347,7 +347,7 @@ export default { ...@@ -347,7 +347,7 @@ export default {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: toRpx(24) toRpx(24) 0 toRpx(24); padding: toRpx(24) toRpx(24) 0 toRpx(24);
border-top: toRpx(2) solid #ebedf0; border-top: toRpx(2) dashed #ebedf0;
box-sizing: border-box; box-sizing: border-box;
} }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<view class="goods-item" v-for="(goods, ind) in item.packageGoods.goodsList" :key="ind"> <view class="goods-item" v-for="(goods, ind) in item.packageGoods.goodsList" :key="ind">
<view class="goods-name">{{ goods.goodsAlias || goods.upgradeGoodsName }}</view> <view class="goods-name">{{ goods.goodsAlias || goods.upgradeGoodsName }}</view>
<!-- <view class="alias-name">商品别名:阿尔法 T5极狐非三电整车延保(新车2年6万公里)</view> --> <!-- <view class="alias-name">商品别名:阿尔法 T5极狐非三电整车延保(新车2年6万公里)</view> -->
<view class="front-gear-box"> <view class="front-gear-box pb-24">
<view class="front-gear-input-box"> <view class="front-gear-input-box">
<!-- <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">
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<view> <view>
<view class="shop-list"> <view class="shop-list">
<view class="shop-item" v-for="(item, index) in list" :key="index"> <view class="shop-item" v-for="(item, index) in list" :key="index">
<view class="flex flex-1 pb-24">
<view class="sprite-icon icon-blue-delete" @click="deleteGoods(index)"></view> <view class="sprite-icon icon-blue-delete" @click="deleteGoods(index)"></view>
<view class="right"> <view class="right">
<view class="shop-name">商品名称:{{ item.multipleSpecificationsGoods ? item.multipleSpecificationsGoods.baseGoodsName : item.goods.goodsAlias || item.goods.upgradeGoodsName || item.goods.goodsInfo.goodsName }}</view> <view class="shop-name">商品名称:{{ item.multipleSpecificationsGoods ? item.multipleSpecificationsGoods.baseGoodsName : item.goods.goodsAlias || item.goods.upgradeGoodsName || item.goods.goodsInfo.goodsName }}</view>
...@@ -49,12 +50,13 @@ ...@@ -49,12 +50,13 @@
<view class="add" @click="increaseNumber(item)">+</view> <view class="add" @click="increaseNumber(item)">+</view>
</view> </view>
</view> </view>
</view>
</view>
<!-- 折扣 / 买赠 / 组合付款策略组件 --> <!-- 折扣 / 买赠 / 组合付款策略组件 -->
<OrderStrategy v-if="getStrategyType(item)" :strategyType="getStrategyType(item)" :value="getStrategyConfig(item)" :basePrice="getBasePrice(item)" :displayPrice="getDisplayPrice(item)" @input="onStrategyConfigChange(item, $event)" @priceChange="onPriceChange(item, $event)" /> <OrderStrategy v-if="getStrategyType(item)" :strategyType="getStrategyType(item)" :value="getStrategyConfig(item)" :basePrice="getBasePrice(item)" :displayPrice="getDisplayPrice(item)" @input="onStrategyConfigChange(item, $event)" @priceChange="onPriceChange(item, $event)" />
</view> </view>
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
...@@ -458,8 +460,6 @@ export default { ...@@ -458,8 +460,6 @@ export default {
padding: toRpx(12) toRpx(32) toRpx(12) 0; padding: toRpx(12) toRpx(32) toRpx(12) 0;
.shop-item { .shop-item {
display: flex;
align-items: center;
background-color: #f5f7fa; background-color: #f5f7fa;
border-radius: toRpx(16); border-radius: toRpx(16);
margin-bottom: toRpx(16); margin-bottom: toRpx(16);
......
...@@ -135,6 +135,13 @@ const FORM_LIST = [ ...@@ -135,6 +135,13 @@ const FORM_LIST = [
], ],
[ [
{ {
label: '订单类型',
value: 'djOrderType',
type: 'select',
key: 'name',
required: true
},
{
label: '购买商品', label: '购买商品',
value: 'skuGoods', value: 'skuGoods',
type: 'select', type: 'select',
...@@ -395,6 +402,11 @@ const popupTypeEnum = { ...@@ -395,6 +402,11 @@ const popupTypeEnum = {
key: 'defeatEmployeeName', key: 'defeatEmployeeName',
targetIdKey: 'referrerId', targetIdKey: 'referrerId',
targetNameKey: 'referrer' targetNameKey: 'referrer'
},
28: {
// 订单类型弹窗(OrderTypePopup)
key: 'djOrderType',
list: ''
} }
} }
const titleList = [null, { addHtml: 'customer' }, { name: '车辆信息' }, { name: '增值车损险' }, { name: '其他信息' }] const titleList = [null, { addHtml: 'customer' }, { name: '车辆信息' }, { name: '增值车损险' }, { name: '其他信息' }]
...@@ -647,6 +659,11 @@ const EQUITY_POPUP_ENUM = { ...@@ -647,6 +659,11 @@ const EQUITY_POPUP_ENUM = {
}, },
25: { 25: {
key: 'carBrand' key: 'carBrand'
},
28: {
// 订单类型弹窗(OrderTypePopup)
key: 'djOrderType',
list: ''
} }
} }
...@@ -731,7 +748,7 @@ const EQUITY_FORM_RULE = { ...@@ -731,7 +748,7 @@ const EQUITY_FORM_RULE = {
{ required: true, message: '联系电话不能为空' }, { required: true, message: '联系电话不能为空' },
{ {
validator: (rule, value) => { validator: (rule, value) => {
const phoneRex = /^[1]([3-9])[0-9]{9}$/; const phoneRex = /^[1]([3-9])[0-9]{9}$/
return !phoneRex.test(value) ? { message: '请输入正确的手机号' } : null return !phoneRex.test(value) ? { message: '请输入正确的手机号' } : null
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!