Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ad2b8ca0
authored
Aug 28, 2025
by
cen
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 战败回显
1 parent
5693c008
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
53 additions
and
70 deletions
api/module/boutique.js
components/Form/GlCell.vue
components/OrderPopup/components/GoodsList.vue
pages/boutique/tool/components/CreateOrder.vue
pages/boutique/tool/components/DefeatOrder.vue
pages/boutique/tool/components/Package.vue
pages/boutique/tool/components/Product.vue
api/module/boutique.js
View file @
ad2b8ca
...
...
@@ -188,6 +188,14 @@ module.exports = {
...
data
})
},
/**战败商品列表- upradeFlag(N为基础,Y为升级) */
getOrderBaseGoodsList
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.orderUpgradeGoods.listByMerchantId'
,
projectName
:
'boutique'
,
...
data
})
},
/** 选择支付方式下单 */
createWithPay
(
data
)
{
console
.
log
(
data
)
...
...
components/Form/GlCell.vue
View file @
ad2b8ca
...
...
@@ -5,11 +5,7 @@
<template
v-for=
"(item, idx) in items"
>
<view
v-if=
"!item.hidden"
>
<view
class=
"cell-row"
:key=
"idx"
>
<view
class=
"cell"
@
click=
"onCellClick(item)"
:class=
"[
item.noBorder ? '' : 'border',
item.onlyLabel ? 'small-height' : '',
item.class
]"
>
<view
class=
"cell"
@
click=
"onCellClick(item)"
:class=
"[item.noBorder ? '' : 'border', item.onlyLabel ? 'small-height' : '', item.class]"
>
<view
:class=
"['cell-label',
{ 'only-label': item.onlyLabel }]">
<view
v-if=
"item.labellIcon"
:class=
"['sprite-icon', `icon-$
{item.labellIcon}`]">
</view>
{{
item
.
label
}}
...
...
@@ -19,12 +15,8 @@
<!-- 输入框 -->
<template
v-if=
"item.type === 'input'"
>
<view
class=
"input-box"
>
<input
class=
"input-value"
v-model=
"formData[item.value]"
:type=
"item.inputType || 'text'"
@
blur=
"handleBlur($event, item)"
:placeholder=
"item.placeholder || '请输入'"
:maxlength=
"item.inputType === 'number' ? false : (item.maxlength || -1)"
@
input=
"item.inputType === 'number' && item.maxlength ? (formData[item.value] = String($event.target.value).slice(0, item.maxlength)) : null"
/>
<view
v-if=
"item.valueIcon"
:class=
"['sprite-icon', `icon-$
{item.valueIcon}`]"
@click="onValueClick(item)">
</view>
<input
class=
"input-value"
v-model=
"formData[item.value]"
:type=
"item.inputType || 'text'"
@
blur=
"handleBlur($event, item)"
:placeholder=
"item.placeholder || '请输入'"
:maxlength=
"item.inputType === 'number' ? false : item.maxlength || -1"
@
input=
"item.inputType === 'number' && item.maxlength ? (formData[item.value] = String($event.target.value).slice(0, item.maxlength)) : null"
/>
<view
v-if=
"item.valueIcon"
:class=
"['sprite-icon', `icon-$
{item.valueIcon}`]" @click="onValueClick(item)">
</view>
</view>
</
template
>
<!-- 下拉选择 -->
...
...
@@ -32,7 +24,8 @@
<view
class=
"value"
>
<template
v-if=
"!item.addHtml && formData[item.value] && formData[item.value]"
>
<template
v-if=
"item.showText && userInfo && userInfo[item.showText]"
>
{{
userInfo
[
item
.
showText
]
}}
<text>
|
</text>
{{
userInfo
[
item
.
showText
]
}}
<text>
|
</text>
</
template
>
{{ formData[item.value] }}
</template>
...
...
@@ -45,19 +38,15 @@
<!-- 单选框 -->
<
template
v-else-if=
"item.type === 'radio'"
>
<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"
:key=
"radio.value + item.value"
>
<radio
style=
"transform:scale(0.7)"
:value=
"radio.value"
:disabled=
"item.disabled || radio.disabled"
:checked=
"radio.value == item.current"
/>
<label
class=
"uni-list-cell uni-list-cell-pd"
v-for=
"radio in item.radioList"
:key=
"radio.value + item.value"
>
<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>
</label>
</radio-group>
</
template
>
<!-- 多行文本 -->
<
template
v-else-if=
"item.type === 'textarea'"
>
<textarea
class=
"textarea"
v-model=
"formData[item.value]"
:placeholder=
"item.placeholder || '请输入'"
placeholder-class=
"textarea-placeholder"
confirm-type=
"done"
auto-height
:maxlength=
"item.maxlength"
></textarea>
<textarea
class=
"textarea"
v-model=
"formData[item.value]"
:placeholder=
"item.placeholder || '请输入'"
placeholder-class=
"textarea-placeholder"
confirm-type=
"done"
auto-height
:maxlength=
"item.maxlength"
></textarea>
</
template
>
</view>
</view>
...
...
@@ -72,7 +61,7 @@
<
script
>
export
default
{
name
:
"GlCell"
,
name
:
'GlCell'
,
props
:
{
/**
* noBorder:默认false:有下边框,true:无下边框
...
...
@@ -106,11 +95,11 @@ export default {
methods
:
{
onCellClick
(
item
)
{
if
(
item
.
type
===
'select'
)
{
this
.
$emit
(
'handleCell'
,
item
)
;
this
.
$emit
(
'handleCell'
,
item
)
}
},
onRadioChange
(
e
,
item
)
{
this
.
$emit
(
'radioChange'
,
e
,
item
)
;
this
.
$emit
(
'radioChange'
,
e
,
item
)
},
onValueClick
(
item
)
{
this
.
$emit
(
'handleValue'
,
item
)
...
...
@@ -119,7 +108,7 @@ export default {
this
.
$emit
(
'inputBlur'
,
e
,
item
)
}
}
}
;
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
@@ -168,7 +157,7 @@ export default {
.required
{
display
:
inline-block
;
margin-left
:
toRpx
(
8
);
color
:
#
F
24724
;
color
:
#
f
24724
;
}
&
.only-label
{
...
...
@@ -248,8 +237,6 @@ export default {
display
:
inline-block
;
}
.textarea
{
width
:
100%
;
border-radius
:
toRpx
(
16
);
...
...
components/OrderPopup/components/GoodsList.vue
View file @
ad2b8ca
<
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=
"listData.length"
>
<template
v-for=
"(i, index) in listData"
>
<template
v-if=
"isDefeatOrder"
>
<view
class=
"item-box"
:key=
"index"
>
<view
class=
"goods-title flex"
>
{{
i
.
goodsTypeName
}}
|建议价
</view>
<view
class=
"item-box"
:key=
"index"
>
<view
class=
"goods-title flex"
>
{{
i
.
goodsTypeName
}}
|建议价
</view>
<view
class=
"defeat-goods-list"
>
<template
v-for=
"(item,ind) in i.upgradeGoodsList"
>
<view
:class=
"['item flex',
{active:checkActive(item)}]"
:key="`${index}_${ind}`"
@click="choose(item)"
>
<template
v-for=
"(item, ind) in i.upgradeGoodsList"
>
<view
:class=
"['item flex',
{ active: checkActive(item) }]" :key="`${index}_${ind}`" @click="choose(item)">
<view
class=
"sprite-icon icon-tag-checked"
></view>
<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>
<template
v-if=
"item.merchantGoodsPosition && (item.goodsInfo.goodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)"
>
<text>
「
{{
item
.
positionStr
}}
」
</text>
<text>
「
{{
item
.
positionStr
}}
」
</text>
</
template
>
<
template
v-if=
"!item.merchantGoodsPosition && (item.goodsInfo.goodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)"
>
<view
class=
"no-postion"
>
无部位
</view>
</
template
>
<text
class=
"price"
>
¥{{
item.upgradePrice
}}
</text>
<text
class=
"price"
>
¥{{
item.upgradePrice
}}
</text>
</view>
</template>
</view>
</view>
</template>
<
template
v-else
>
<view
:key=
"index"
@
click=
"choose(i)"
:class=
"['item flex',
{active: checkActive(i)}]"
>
<view
:key=
"index"
@
click=
"choose(i)"
:class=
"['item flex',
{ active: checkActive(i) }]">
<view
class=
"sprite-icon icon-tag-checked"
></view>
<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>
<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
>
<text
class=
"price"
>
¥{{
i.goods.price
}}
</text>
<text
class=
"price"
>
¥{{
i.goods.price
}}
</text>
</view>
</template>
</template>
...
...
@@ -54,7 +43,7 @@
</view>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
"text/ecmascript-6"
>
import
popupmixin
from
'./popupmixin'
export
default
{
mixins
:
[
popupmixin
],
...
...
@@ -158,6 +147,7 @@ export default {
this
.
list
=
arr
},
choose
(
i
)
{
let
{
currentIds
,
isDefeatOrder
}
=
this
,
id
=
''
if
(
isDefeatOrder
)
id
=
i
.
id
...
...
@@ -190,7 +180,7 @@ export default {
}
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
"scss"
>
.goods-list
{
display
:
grid
;
grid-template-columns
:
repeat
(
2
,
1
fr
);
...
...
pages/boutique/tool/components/CreateOrder.vue
View file @
ad2b8ca
This diff is collapsed.
Click to expand it.
pages/boutique/tool/components/DefeatOrder.vue
View file @
ad2b8ca
This diff is collapsed.
Click to expand it.
pages/boutique/tool/components/Package.vue
View file @
ad2b8ca
...
...
@@ -5,17 +5,17 @@
<view
class=
"header"
>
<view
class=
"header-left"
>
<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=
"minus"
@
click=
"decreaseNumber(item)"
>
-
</view>
<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>
</view>
<view
class=
"price"
>
¥
{{
changeTotal
(
item
)
}}
</view>
<view
class=
"price"
>
¥
{{
changeTotal
(
item
)
}}
</view>
</view>
<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=
"front-gear-box"
>
<view
class=
"front-gear-input-box"
>
...
...
@@ -32,7 +32,6 @@
</view>
</
template
>
<
script
>
export
default
{
name
:
'Package'
,
props
:
{
...
...
@@ -43,7 +42,7 @@ export default {
positionTypeList
:
{
type
:
Array
,
default
:
[]
}
,
}
},
created
()
{
// 初始化商品数量
...
...
@@ -57,7 +56,7 @@ export default {
updated
()
{
// 当组件数据更新时也检查number属性
this
.
initProductNumbers
()
console
.
log
(
this
.
list
,
'Package-list'
)
console
.
log
(
this
.
list
,
'Package-list
2
'
)
},
methods
:
{
// 初始化商品数量方法
...
...
@@ -121,7 +120,6 @@ export default {
},
validatePrice
(
event
,
goods
,
ind
,
index
)
{
let
value
=
event
.
detail
.
value
console
.
log
(
'value'
,
value
)
// 如果为空则设置为0
if
(
!
value
||
value
.
trim
()
===
''
)
{
value
=
'0'
...
...
@@ -307,5 +305,4 @@ export default {
}
}
}
</
style
>
pages/boutique/tool/components/Product.vue
View file @
ad2b8ca
<
template
>
<view>
<view
class=
"shop-list"
>
<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
|| item.goods.id
"
>
<view
class=
"sprite-icon icon-blue-delete"
@
click=
"deleteGoods(index)"
></view>
<view
class=
"right"
>
<view
class=
"shop-name"
>
商品名称:
{{
item
.
goods
.
goodsAlias
||
item
.
goods
.
upgradeGoodsName
||
item
.
goods
.
goodsInfo
.
goodsName
}}
</view>
<view
class=
"shop-name"
>
商品名称:
{{
item
.
goods
.
goodsAlias
||
item
.
goods
.
upgradeGoodsName
||
item
.
goods
.
goodsInfo
.
goodsName
}}
</view>
<!--
<view
class=
"alias"
>
商品别名:
{{
item
.
goods
.
goodsAlias
}}
</view>
-->
<view
class=
"front-gear-box"
>
<view
class=
"front-gear-input-box"
>
<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)"
>
{{
formatPosition
((
item
.
goods
.
merchantGoodsPosition
||
item
.
goods
.
upgradeGoodsPosition
),
positionTypeList
)
}}
</view>
<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)"
>
{{
formatPosition
(
item
.
goods
.
merchantGoodsPosition
||
item
.
goods
.
upgradeGoodsPosition
,
positionTypeList
)
}}
</view>
<view
class=
"front-gear-input"
>
<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
class=
"control"
>
...
...
@@ -45,6 +43,10 @@ export default {
baseConfigData
:
{
type
:
Object
,
default
:
{}
},
isDisabled
:
{
type
:
Boolean
,
default
:
false
}
},
created
()
{
...
...
@@ -72,13 +74,13 @@ export default {
},
circulation
(
data
,
str
)
{
let
arr
=
str
.
split
(
'.'
),
result
;
result
if
(
arr
.
length
)
{
result
=
arr
.
reduce
((
pre
,
key
)
=>
{
return
pre
[
key
]
},
data
)
}
return
result
;
return
result
},
// 格式化位置信息
formatPosition
(
item
,
positionTypeList
)
{
...
...
@@ -88,7 +90,6 @@ export default {
// 验证价格输入
validatePrice
(
event
,
item
,
index
)
{
let
value
=
event
.
detail
.
value
console
.
log
(
'value'
,
value
)
// 如果为空则设置为0
if
(
!
value
||
value
.
trim
()
===
''
)
{
value
=
'0'
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment