Commit ab80a635 by cen

fix: 车型选择

1 parent c685fcb5
...@@ -134,7 +134,7 @@ export default { ...@@ -134,7 +134,7 @@ export default {
customerName: customer.customerName customerName: customer.customerName
} }
this.orderObj.carBrand = `${customer.carBrand}-${customer.carChildsBrandName}-${customer.carSeriesName}` this.orderObj.carBrand = customer.carBrandId ? `${customer.carBrand}-${customer.carChildsBrandName}-${customer.carSeriesName}` : ''
// 更新表单状态 // 更新表单状态
const updateFormCell = (formIndex, fieldName, value) => { const updateFormCell = (formIndex, fieldName, value) => {
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<Package v-if="orderObj.package" @changeTotalPrice="changeTotalPrice" :list="orderObj.package" :positionTypeList="positionTypeList"></Package> <Package v-if="orderObj.package" @changeTotalPrice="changeTotalPrice" :list="orderObj.package" :positionTypeList="positionTypeList"></Package>
</template> </template>
<template slot="skuGoods"> <template slot="skuGoods">
<SkuGoods v-if="orderObj.skuGoods" :list="orderObj.skuGoods" @changeTotalPrice="changeTotalPrice" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData"></SkuGoods> <SkuGoods v-if="orderObj.skuGoods" :list="orderObj.skuGoods" @changeTotalPrice="changeTotalPrice" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :isDisabled="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>
...@@ -122,7 +122,7 @@ export default { ...@@ -122,7 +122,7 @@ export default {
customerName: customer.customerName customerName: customer.customerName
} }
this.orderObj.carBrand = `${customer.carBrand}-${customer.carChildsBrandName}-${customer.carSeriesName}` this.orderObj.carBrand = customer.carBrandId ? `${customer.carBrand}-${customer.carChildsBrandName}-${customer.carSeriesName}` : ''
const weeks = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'] const weeks = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
this.$set(this.orderObj, 'todayShow', dayjs(this.orderObj.createDate).format('YYYY-MM-DD') + ' ' + weeks[dayjs(this.orderObj.createDate).day()]) this.$set(this.orderObj, 'todayShow', dayjs(this.orderObj.createDate).format('YYYY-MM-DD') + ' ' + weeks[dayjs(this.orderObj.createDate).day()])
......
...@@ -4,44 +4,30 @@ ...@@ -4,44 +4,30 @@
<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="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 ? <view class="shop-name">商品名称:{{ item.multipleSpecificationsGoods ? item.multipleSpecificationsGoods.baseGoodsName : item.goods.goodsAlias || item.goods.upgradeGoodsName || item.goods.goodsInfo.goodsName }}</view>
item.multipleSpecificationsGoods.baseGoodsName : item.goods.goodsAlias || item.goods.upgradeGoodsName || <view class="alias" v-if="item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods.goodsAlias">商品别名:{{ item.multipleSpecificationsGoods.goods.goodsAlias }}</view>
item.goods.goodsInfo.goodsName }}</view>
<view class="alias"
v-if="item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods.goodsAlias">商品别名:{{
item.multipleSpecificationsGoods.goods.goodsAlias }}</view>
<view class="front-gear-box"> <view class="front-gear-box">
<view class="front-gear-input-box"> <view class="front-gear-input-box">
<template <template v-if="item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods.specificationStr">
v-if="item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods.specificationStr">
<view class="front-gear-label"> <view class="front-gear-label">
{{item.multipleSpecificationsGoods.goods.specificationStr}} {{ item.multipleSpecificationsGoods.goods.specificationStr }}
</view> </view>
</template> </template>
<template v-if="item.goods"> <template v-if="item.goods">
<template <template v-if="(item.goods.merchantGoodsPosition || item.goods.upgradeGoodsPosition) && (item.goods.goodsInfo.goodsType == 1 || item.goods.upgradeGoodsType == 1 || item.goods.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.goods.upgradeGoodsType == baseConfigData.selfBuildFilmType)">
v-if="(item.goods.merchantGoodsPosition || item.goods.upgradeGoodsPosition) && (item.goods.goodsInfo.goodsType == 1 || item.goods.upgradeGoodsType == 1 || item.goods.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.goods.upgradeGoodsType == baseConfigData.selfBuildFilmType)">
<view class="front-gear-label"> <view class="front-gear-label">
{{ formatPosition((item.goods.merchantGoodsPosition || item.goods.upgradeGoodsPosition), {{ formatPosition(item.goods.merchantGoodsPosition || item.goods.upgradeGoodsPosition, positionTypeList) }}
positionTypeList)}}
</view> </view>
</template> </template>
<template <template v-if="(item.goods.goodsInfo.goodsType == 1 || item.goods.upgradeGoodsType == 1) && !item.goods.merchantGoodsPosition && !item.goods.upgradeGoodsPosition">无部位属性</template>
v-if="(item.goods.goodsInfo.goodsType == 1 || item.goods.upgradeGoodsType == 1) && !item.goods.merchantGoodsPosition && !item.goods.upgradeGoodsPosition">无部位属性</template>
</template> </template>
<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" placeholder="请输入价格" <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)" />
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" maxlength="9" placeholder="请输入价格" <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)" />
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"
...@@ -52,14 +38,10 @@ ...@@ -52,14 +38,10 @@
<view class="control"> <view class="control">
<view class="minus" @click="decreaseNumber(item)">-</view> <view class="minus" @click="decreaseNumber(item)">-</view>
<template v-if="item.multipleSpecificationsGoods"> <template v-if="item.multipleSpecificationsGoods">
<input class="uni-input control-input" type="number" maxlength="3" <input class="uni-input control-input" type="number" maxlength="3" v-model="item.multipleSpecificationsGoods.number" @blur="validateNumber($event, item)" />
v-model="item.multipleSpecificationsGoods.number"
@blur="validateNumber($event, item)" />
</template> </template>
<template v-else> <template v-else>
<input class="uni-input control-input" type="number" maxlength="3" <input class="uni-input control-input" type="number" maxlength="3" v-model="item.goods.number" @blur="validateNumber($event, item)" />
v-model="item.goods.number"
@blur="validateNumber($event, item)" />
</template> </template>
<!-- <input class="uni-input control-input" type="number" maxlength="3" <!-- <input class="uni-input control-input" type="number" maxlength="3"
:value="item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods ? item.multipleSpecificationsGoods.goods.number : item.goods.number" :value="item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods ? item.multipleSpecificationsGoods.goods.number : item.goods.number"
...@@ -88,6 +70,10 @@ export default { ...@@ -88,6 +70,10 @@ export default {
baseConfigData: { baseConfigData: {
type: Object, type: Object,
default: {} default: {}
},
isDisabled: {
type: Boolean,
default: false
} }
}, },
created() { created() {
...@@ -172,9 +158,7 @@ export default { ...@@ -172,9 +158,7 @@ export default {
} }
} else if (item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods) { } else if (item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods) {
// 多规格商品的最小价格检查 // 多规格商品的最小价格检查
if (item.multipleSpecificationsGoods.goods.validMinSellPrice === 'Y' && if (item.multipleSpecificationsGoods.goods.validMinSellPrice === 'Y' && item.multipleSpecificationsGoods.goods.minSellPrice && parseFloat(value) < parseFloat(item.multipleSpecificationsGoods.goods.minSellPrice)) {
item.multipleSpecificationsGoods.goods.minSellPrice &&
parseFloat(value) < parseFloat(item.multipleSpecificationsGoods.goods.minSellPrice)) {
console.log('最小值', item.multipleSpecificationsGoods.goods.minSellPrice) console.log('最小值', item.multipleSpecificationsGoods.goods.minSellPrice)
uni.showToast({ uni.showToast({
title: '单价不可低于商品最低价', title: '单价不可低于商品最低价',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!