Commit 934f8307 by 胡悦

Merge branch 'V4.56.0' of http://192.168.3.233:8090/glsx/gl_tape into V4.56.0

2 parents 30a838ca b04f3bc0
...@@ -188,6 +188,14 @@ module.exports = { ...@@ -188,6 +188,14 @@ module.exports = {
...data ...data
}) })
}, },
/**战败商品列表- upradeFlag(N为基础,Y为升级) */
getOrderBaseGoodsList(data) {
return http.post({
method: 'dj.api.smartcarlife.orderUpgradeGoods.listByMerchantId',
projectName: 'boutique',
...data
})
},
/** 选择支付方式下单 */ /** 选择支付方式下单 */
createWithPay(data) { createWithPay(data) {
console.log(data) console.log(data)
......
...@@ -5,11 +5,7 @@ ...@@ -5,11 +5,7 @@
<template v-for="(item, idx) in items"> <template v-for="(item, idx) in items">
<view v-if="!item.hidden"> <view v-if="!item.hidden">
<view class="cell-row" :key="idx"> <view class="cell-row" :key="idx">
<view class="cell" @click="onCellClick(item)" :class="[ <view class="cell" @click="onCellClick(item)" :class="[item.noBorder ? '' : 'border', item.onlyLabel ? 'small-height' : '', item.class]">
item.noBorder ? '' : 'border',
item.onlyLabel ? 'small-height' : '',
item.class
]">
<view :class="['cell-label', { 'only-label': item.onlyLabel }]"> <view :class="['cell-label', { 'only-label': item.onlyLabel }]">
<view v-if="item.labellIcon" :class="['sprite-icon', `icon-${item.labellIcon}`]"></view> <view v-if="item.labellIcon" :class="['sprite-icon', `icon-${item.labellIcon}`]"></view>
{{ item.label }} {{ item.label }}
...@@ -32,7 +28,8 @@ ...@@ -32,7 +28,8 @@
<view class="value"> <view class="value">
<template v-if="!item.addHtml && formData[item.value] && formData[item.value]"> <template v-if="!item.addHtml && formData[item.value] && formData[item.value]">
<template v-if="item.showText && userInfo && userInfo[item.showText]"> <template v-if="item.showText && userInfo && userInfo[item.showText]">
{{ userInfo[item.showText] }}<text>|</text> {{ userInfo[item.showText] }}
<text>|</text>
</template> </template>
{{ formData[item.value] }} {{ formData[item.value] }}
</template> </template>
...@@ -45,19 +42,15 @@ ...@@ -45,19 +42,15 @@
<!-- 单选框 --> <!-- 单选框 -->
<template v-else-if="item.type === 'radio'"> <template v-else-if="item.type === 'radio'">
<radio-group class="radio-group value" @change="onRadioChange($event, item)"> <radio-group class="radio-group value" @change="onRadioChange($event, item)">
<label class="uni-list-cell uni-list-cell-pd" v-for="radio in item.radioList" <label class="uni-list-cell uni-list-cell-pd" v-for="radio in item.radioList" :key="radio.value + item.value">
:key="radio.value + item.value"> <radio style="transform: scale(0.7)" :value="radio.value" :disabled="item.disabled || radio.disabled" :checked="radio.value == item.current" />
<radio style="transform:scale(0.7)" :value="radio.value" :disabled="item.disabled || radio.disabled"
:checked="radio.value == item.current" />
<view class="radio-name">{{ radio.name }}</view> <view class="radio-name">{{ radio.name }}</view>
</label> </label>
</radio-group> </radio-group>
</template> </template>
<!-- 多行文本 --> <!-- 多行文本 -->
<template v-else-if="item.type === 'textarea'"> <template v-else-if="item.type === 'textarea'">
<textarea class="textarea" v-model="formData[item.value]" :placeholder="item.placeholder || '请输入'" <textarea class="textarea" v-model="formData[item.value]" :placeholder="item.placeholder || '请输入'" placeholder-class="textarea-placeholder" confirm-type="done" auto-height :maxlength="item.maxlength"></textarea>
placeholder-class="textarea-placeholder" confirm-type="done" auto-height
:maxlength="item.maxlength"></textarea>
</template> </template>
</view> </view>
</view> </view>
...@@ -72,7 +65,7 @@ ...@@ -72,7 +65,7 @@
<script> <script>
export default { export default {
name: "GlCell", name: 'GlCell',
props: { props: {
/** /**
* noBorder:默认false:有下边框,true:无下边框 * noBorder:默认false:有下边框,true:无下边框
...@@ -106,11 +99,11 @@ export default { ...@@ -106,11 +99,11 @@ export default {
methods: { methods: {
onCellClick(item) { onCellClick(item) {
if (item.type === 'select') { if (item.type === 'select') {
this.$emit('handleCell', item); this.$emit('handleCell', item)
} }
}, },
onRadioChange(e, item) { onRadioChange(e, item) {
this.$emit('radioChange', e, item); this.$emit('radioChange', e, item)
}, },
onValueClick(item) { onValueClick(item) {
this.$emit('handleValue', item) this.$emit('handleValue', item)
...@@ -119,7 +112,7 @@ export default { ...@@ -119,7 +112,7 @@ export default {
this.$emit('inputBlur', e, item) this.$emit('inputBlur', e, item)
} }
} }
}; }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
...@@ -168,7 +161,7 @@ export default { ...@@ -168,7 +161,7 @@ export default {
.required { .required {
display: inline-block; display: inline-block;
margin-left: toRpx(8); margin-left: toRpx(8);
color: #F24724; color: #f24724;
} }
&.only-label { &.only-label {
...@@ -248,8 +241,6 @@ export default { ...@@ -248,8 +241,6 @@ export default {
display: inline-block; display: inline-block;
} }
.textarea { .textarea {
width: 100%; width: 100%;
border-radius: toRpx(16); border-radius: toRpx(16);
......
<template> <template>
<view :class="['goods-list',{'is-defeat-order':isDefeatOrder}]"> <view :class="['goods-list', { 'is-defeat-order': isDefeatOrder }]">
<template v-if="params.loadComplete"> <template v-if="params.loadComplete">
<template v-if="listData.length"> <template v-if="listData.length">
<template v-for="(i, index) in listData"> <template v-for="(i, index) in listData">
<template v-if="isDefeatOrder"> <template v-if="isDefeatOrder">
<view <view class="item-box" :key="index">
class="item-box" <view class="goods-title flex">{{ i.goodsTypeName }}|建议价</view>
:key="index"
>
<view class="goods-title flex">{{i.goodsTypeName}}|建议价</view>
<view class="defeat-goods-list"> <view class="defeat-goods-list">
<template v-for="(item,ind) in i.upgradeGoodsList"> <template v-for="(item, ind) in i.upgradeGoodsList">
<view <view :class="['item flex', { active: checkActive(item) }]" :key="`${index}_${ind}`" @click="choose(item)">
:class="['item flex',{active:checkActive(item)}]"
:key="`${index}_${ind}`"
@click="choose(item)"
>
<view class="sprite-icon icon-tag-checked"></view> <view class="sprite-icon icon-tag-checked"></view>
<text class="goods-name text-hide"> <text class="goods-name text-hide">
{{replaceItemText(item, 'upgradeGoodsAlias') ||replaceItemText(item,'upgradeGoodsName') || replaceItemText(item.goodsInfo, 'goodsName')}} {{ replaceItemText(item, 'upgradeGoodsAlias') || replaceItemText(item, 'upgradeGoodsName') || replaceItemText(item.goodsInfo, 'goodsName') }}
</text> </text>
<template v-if="item.merchantGoodsPosition && (item.goodsInfo.goodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)"> <template v-if="item.merchantGoodsPosition && (item.goodsInfo.goodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)">
<text>「{{ item.positionStr}}」</text> <text>「{{ item.positionStr }}」</text>
</template> </template>
<template v-if="!item.merchantGoodsPosition && (item.goodsInfo.goodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)"> <template v-if="!item.merchantGoodsPosition && (item.goodsInfo.goodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)">
<view class="no-postion">无部位</view> <view class="no-postion">无部位</view>
</template> </template>
<text class="price">¥{{item.upgradePrice}}</text> <text class="price">¥{{ item.upgradePrice }}</text>
</view> </view>
</template> </template>
</view> </view>
</view> </view>
</template> </template>
<template v-else> <template v-else>
<view <view :key="index" @click="choose(i)" :class="['item flex', { active: checkActive(i) }]">
:key="index"
@click="choose(i)"
:class="['item flex',{active: checkActive(i)}]"
>
<view class="sprite-icon icon-tag-checked"></view> <view class="sprite-icon icon-tag-checked"></view>
<text class="goods-name text-hide"> <text class="goods-name text-hide">
{{replaceItemText(i.goods,'goodsAlias') ||replaceItemText(i.goods,'upgradeGoodsName') || replaceItemText(i.goodsInfo,'goodsName')}} {{ replaceItemText(i.goods, 'goodsAlias') || replaceItemText(i.goods, 'upgradeGoodsName') || replaceItemText(i.goodsInfo, 'goodsName') }}
</text> </text>
<template v-if="i.goods.merchantGoodsPosition && (i.goods.goodsInfo.goodsType == 1 || i.goods.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)"> <template v-if="i.goods.merchantGoodsPosition && (i.goods.goodsInfo.goodsType == 1 || i.goods.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)">
<text>「{{ i.goods.positionStr}}」</text> <text>「{{ i.goods.positionStr }}」</text>
</template> </template>
<text class="price">¥{{i.goods.price}}</text> <template v-if="!i.goods.merchantGoodsPosition && (i.goods.goodsInfo.goodsType == 1 || i.goods.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)">
<text class="no-postion">无部位</text>
</template>
<text class="price">¥{{ i.goods.price }}</text>
</view> </view>
</template> </template>
</template> </template>
...@@ -54,7 +46,7 @@ ...@@ -54,7 +46,7 @@
</view> </view>
</template> </template>
<script type='text/ecmascript-6'> <script type="text/ecmascript-6">
import popupmixin from './popupmixin' import popupmixin from './popupmixin'
export default { export default {
mixins: [popupmixin], mixins: [popupmixin],
...@@ -172,6 +164,7 @@ export default { ...@@ -172,6 +164,7 @@ export default {
this.list = arr this.list = arr
}, },
choose (i) { choose (i) {
let { currentIds, isDefeatOrder } = this, let { currentIds, isDefeatOrder } = this,
id = '' id = ''
if (isDefeatOrder) id = i.id if (isDefeatOrder) id = i.id
...@@ -204,7 +197,7 @@ export default { ...@@ -204,7 +197,7 @@ export default {
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang="scss">
.goods-list { .goods-list {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
...@@ -221,6 +214,11 @@ export default { ...@@ -221,6 +214,11 @@ export default {
font-size: 32rpx; font-size: 32rpx;
box-sizing: border-box; box-sizing: border-box;
padding: 0 32rpx; padding: 0 32rpx;
.no-postion {
color: #f24724;
margin-left: 10rpx;
font-size: 22rpx;
}
.sprite-icon { .sprite-icon {
display: none; display: none;
position: absolute; position: absolute;
...@@ -296,4 +294,4 @@ export default { ...@@ -296,4 +294,4 @@ export default {
} }
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
...@@ -217,7 +217,6 @@ export default { ...@@ -217,7 +217,6 @@ export default {
} }
if (chooseContent) { if (chooseContent) {
if (Array.isArray(chooseContent) && !chooseContent.length && componentObject[popupType].nullTips) throw componentObject[popupType].nullTips if (Array.isArray(chooseContent) && !chooseContent.length && componentObject[popupType].nullTips) throw componentObject[popupType].nullTips
console.log(chooseContent)
this.$emit('onConfirm', { this.$emit('onConfirm', {
chooseContent, chooseContent,
popupType popupType
......
...@@ -5,24 +5,24 @@ ...@@ -5,24 +5,24 @@
<view class="header"> <view class="header">
<view class="header-left"> <view class="header-left">
<view class="sprite-icon icon-blue-delete" @click="deleteGoods(index)"></view> <view class="sprite-icon icon-blue-delete" @click="deleteGoods(index)"></view>
<view class="name">{{item.packageGoods.packageAlias||item.packageGoods.packageName}}</view> <view class="name">{{ item.packageGoods.packageAlias || item.packageGoods.packageName }}</view>
<view class="control"> <view class="control">
<view class="minus" @click="decreaseNumber(item)">-</view> <view class="minus" @click="decreaseNumber(item)">-</view>
<input class="uni-input control-input" type="number" maxlength="3" v-model="item.packageGoods.number" @blur="validateNumber($event, item)" /> <input class="uni-input control-input" type="number" maxlength="3" v-model="item.packageGoods.number" @blur="validateNumber($event, item)" />
<view class="add" @click="increaseNumber(item)">+</view> <view class="add" @click="increaseNumber(item)">+</view>
</view> </view>
</view> </view>
<view class="price">¥{{changeTotal(item)}}</view> <view class="price">¥{{ changeTotal(item) }}</view>
</view> </view>
<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">
<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">
<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" placeholder="请输入价格" placeholder-style="font-size: 14px" v-model="goods.sellPrice" @blur="validatePrice($event, goods, ind, index)" />
</view> </view>
</view> </view>
</view> </view>
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
</view> </view>
</template> </template>
<script> <script>
export default { export default {
name: 'Package', name: 'Package',
props: { props: {
...@@ -43,7 +42,7 @@ export default { ...@@ -43,7 +42,7 @@ export default {
positionTypeList: { positionTypeList: {
type: Array, type: Array,
default: [] default: []
}, }
}, },
created() { created() {
// 初始化商品数量 // 初始化商品数量
...@@ -57,7 +56,7 @@ export default { ...@@ -57,7 +56,7 @@ export default {
updated() { updated() {
// 当组件数据更新时也检查number属性 // 当组件数据更新时也检查number属性
this.initProductNumbers() this.initProductNumbers()
console.log(this.list, 'Package-list') console.log(this.list, 'Package-list2')
}, },
methods: { methods: {
// 初始化商品数量方法 // 初始化商品数量方法
...@@ -70,7 +69,7 @@ export default { ...@@ -70,7 +69,7 @@ export default {
// 存储旧值 // 存储旧值
item.packageGoods.goodsList.forEach(goods => { item.packageGoods.goodsList.forEach(goods => {
if (!goods.price) { if (!goods.price) {
goods.oldPrice = goods.sellPrice goods.oldPrice = goods.sellPrice
} }
}) })
}) })
...@@ -121,7 +120,6 @@ export default { ...@@ -121,7 +120,6 @@ export default {
}, },
validatePrice(event, goods, ind, index) { validatePrice(event, goods, ind, index) {
let value = event.detail.value let value = event.detail.value
console.log('value', value)
// 如果为空则设置为0 // 如果为空则设置为0
if (!value || value.trim() === '') { if (!value || value.trim() === '') {
value = '0' value = '0'
...@@ -270,7 +268,7 @@ export default { ...@@ -270,7 +268,7 @@ export default {
align-items: center; align-items: center;
border-bottom: toRpx(1.6) solid #dce1e6; border-bottom: toRpx(1.6) solid #dce1e6;
padding: toRpx(24); padding: toRpx(24);
&-left { &-left {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -308,5 +306,4 @@ export default { ...@@ -308,5 +306,4 @@ export default {
} }
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
...@@ -4,18 +4,16 @@ ...@@ -4,18 +4,16 @@
<view class="shop-item" v-for="(item, index) in list" :key="item.goods.goodsId"> <view class="shop-item" v-for="(item, index) in list" :key="item.goods.goodsId">
<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.goods.goodsAlias || item.goods.upgradeGoodsName || <view class="shop-name">商品名称:{{ item.goods.goodsAlias || item.goods.upgradeGoodsName || item.goods.goodsInfo.goodsName }}</view>
item.goods.goodsInfo.goodsName }}</view>
<!-- <view class="alias">商品别名:{{ item.goods.goodsAlias }}</view> --> <!-- <view class="alias">商品别名:{{ item.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">
<view class="front-gear-label" <view class="front-gear-label" 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)"> {{ formatPosition(item.goods.merchantGoodsPosition || item.goods.upgradeGoodsPosition, positionTypeList) }}
{{ formatPosition((item.goods.merchantGoodsPosition || item.goods.upgradeGoodsPosition), </view>
positionTypeList)}}</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="item.goods.sellPrice" @blur="validatePrice($event, item, index)" /> <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)" />
</view> </view>
</view> </view>
<view class="control"> <view class="control">
...@@ -45,6 +43,10 @@ export default { ...@@ -45,6 +43,10 @@ export default {
baseConfigData: { baseConfigData: {
type: Object, type: Object,
default: {} default: {}
},
isDisabled: {
type: Boolean,
default: false
} }
}, },
created() { created() {
...@@ -72,13 +74,13 @@ export default { ...@@ -72,13 +74,13 @@ export default {
}, },
circulation(data, str) { circulation(data, str) {
let arr = str.split('.'), let arr = str.split('.'),
result; result
if (arr.length) { if (arr.length) {
result = arr.reduce((pre, key) => { result = arr.reduce((pre, key) => {
return pre[key] return pre[key]
}, data) }, data)
} }
return result; return result
}, },
// 格式化位置信息 // 格式化位置信息
formatPosition(item, positionTypeList) { formatPosition(item, positionTypeList) {
...@@ -88,7 +90,6 @@ export default { ...@@ -88,7 +90,6 @@ export default {
// 验证价格输入 // 验证价格输入
validatePrice(event, item, index) { validatePrice(event, item, index) {
let value = event.detail.value let value = event.detail.value
console.log('value', value)
// 如果为空则设置为0 // 如果为空则设置为0
if (!value || value.trim() === '') { if (!value || value.trim() === '') {
value = '0' value = '0'
...@@ -280,4 +281,4 @@ export default { ...@@ -280,4 +281,4 @@ export default {
} }
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!