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
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
76 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 = {
...
@@ -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
)
...
...
components/Form/GlCell.vue
View file @
ad2b8ca
...
@@ -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
}}
...
@@ -19,12 +15,8 @@
...
@@ -19,12 +15,8 @@
<!-- 输入框 -->
<!-- 输入框 -->
<template
v-if=
"item.type === 'input'"
>
<template
v-if=
"item.type === 'input'"
>
<view
class=
"input-box"
>
<view
class=
"input-box"
>
<input
class=
"input-value"
v-model=
"formData[item.value]"
:type=
"item.inputType || 'text'"
<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"
/>
@
blur=
"handleBlur($event, item)"
:placeholder=
"item.placeholder || '请输入'"
<view
v-if=
"item.valueIcon"
:class=
"['sprite-icon', `icon-$
{item.valueIcon}`]" @click="onValueClick(item)">
</view>
: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>
</view>
</
template
>
</
template
>
<!-- 下拉选择 -->
<!-- 下拉选择 -->
...
@@ -32,7 +24,8 @@
...
@@ -32,7 +24,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 +38,15 @@
...
@@ -45,19 +38,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 +61,7 @@
...
@@ -72,7 +61,7 @@
<
script
>
<
script
>
export
default
{
export
default
{
name
:
"GlCell"
,
name
:
'GlCell'
,
props
:
{
props
:
{
/**
/**
* noBorder:默认false:有下边框,true:无下边框
* noBorder:默认false:有下边框,true:无下边框
...
@@ -106,11 +95,11 @@ export default {
...
@@ -106,11 +95,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 +108,7 @@ export default {
...
@@ -119,7 +108,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 +157,7 @@ export default {
...
@@ -168,7 +157,7 @@ export default {
.required
{
.required
{
display
:
inline-block
;
display
:
inline-block
;
margin-left
:
toRpx
(
8
);
margin-left
:
toRpx
(
8
);
color
:
#
F
24724
;
color
:
#
f
24724
;
}
}
&
.only-label
{
&
.only-label
{
...
@@ -248,8 +237,6 @@ export default {
...
@@ -248,8 +237,6 @@ export default {
display
:
inline-block
;
display
:
inline-block
;
}
}
.textarea
{
.textarea
{
width
:
100%
;
width
:
100%
;
border-radius
:
toRpx
(
16
);
border-radius
:
toRpx
(
16
);
...
...
components/OrderPopup/components/GoodsList.vue
View file @
ad2b8ca
<
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>
<text
class=
"price"
>
¥{{
i.goods.price
}}
</text>
</view>
</view>
</template>
</template>
</template>
</template>
...
@@ -54,7 +43,7 @@
...
@@ -54,7 +43,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
],
...
@@ -158,6 +147,7 @@ export default {
...
@@ -158,6 +147,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
...
@@ -190,7 +180,7 @@ export default {
...
@@ -190,7 +180,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
,
1
fr
);
grid-template-columns
:
repeat
(
2
,
1
fr
);
...
@@ -282,4 +272,4 @@ export default {
...
@@ -282,4 +272,4 @@ export default {
}
}
}
}
}
}
</
style
>
\ No newline at end of file
\ No newline at end of file
</
style
>
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,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-list
2
'
)
},
},
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'
...
@@ -269,7 +267,7 @@ export default {
...
@@ -269,7 +267,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
;
...
@@ -307,5 +305,4 @@ export default {
...
@@ -307,5 +305,4 @@ export default {
}
}
}
}
}
}
</
style
>
\ No newline at end of file
\ No newline at end of file
</
style
>
pages/boutique/tool/components/Product.vue
View file @
ad2b8ca
<
template
>
<
template
>
<view>
<view>
<view
class=
"shop-list"
>
<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=
"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
>
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