Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-pay
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 77011b71
authored
Dec 13, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
带货
1 parent
d1819c2a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
114 additions
and
81 deletions
src/views/productGroup/editProduct.vue
src/views/productStore/editProductDh.vue
src/views/productGroup/editProduct.vue
View file @
77011b7
...
@@ -138,75 +138,77 @@
...
@@ -138,75 +138,77 @@
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
<table
class=
"table-spesc"
style=
"max-height: 400px; overflow: scroll;"
>
<div
style=
"max-height: 400px; overflow: scroll;"
>
<tbody>
<table
class=
"table-spesc"
>
<tr
<tbody>
style=
"border-bottom: 1px solid rgb(235, 235, 235); height: 54px; line-height: 54px;"
<tr
v-for=
"(subItem, subIndex) in nameToValSpecsList"
style=
"border-bottom: 1px solid rgb(235, 235, 235); height: 54px; line-height: 54px;"
:key=
"subIndex"
v-for=
"(subItem, subIndex) in nameToValSpecsList"
>
:key=
"subIndex"
<td
>
:style=
"{ width: specsWidth }"
<td
v-for=
"(n, idx) in subItem.specsValueList"
:style=
"{ width: specsWidth }"
:key=
"idx"
v-for=
"(n, idx) in subItem.specsValueList"
:title=
"n"
:key=
"idx"
>
{{ n }}
</td>
:title=
"n"
<td
:style=
"{ width: specsWidth }"
>
>
{{ n }}
</td>
<div
v-if=
"routeInfo.groupOrStore == 1"
>
<td
:style=
"{ width: specsWidth }"
>
<div
v-if=
"routeInfo.groupOrStore == 1"
>
<el-input
:disabled=
"isDisabled"
:class=
"{ 'border-red': (!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice) && submitted }"
placeholder=
"零售价"
v-model=
"subItem.retailPrice"
@
input
.
native=
"e => handleRetailPriceInput(e, subIndex)"
@
blur=
"handleRetailPriceBlur"
>
<el-popover
v-show=
"(!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice) && submitted"
slot=
"suffix"
placement=
"top"
title
width=
"90"
trigger=
"hover"
:content=
"!(subItem.retailPrice + '') ? '零售价是必填项' : '零售价要大于供货价'"
>
<i
class=
"el-icon-warning color-red"
slot=
"reference"
></i>
</el-popover>
</el-input>
</div>
<el-input
<el-input
:disabled=
"isDisabled"
:disabled=
"isDisabled"
:class=
"{ 'border-red': (!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice) && submitted }"
v-else
placeholder=
"零售价"
placeholder=
"零售价"
v-model=
"subItem.retailPrice"
v-model=
"subItem.retailPrice"
@
input
.
native=
"e => handleRetailPriceInput(e, subIndex)"
@
input
.
native=
"e => handleRetailPriceInput(e, subIndex)"
@
blur=
"handleRetailPriceBlur"
@
blur=
"handleRetailPriceBlur"
></el-input>
</td>
<td
:style=
"{ width: specsWidth }"
>
<el-input
:disabled=
"isDisabled"
placeholder=
"库存"
v-model=
"subItem.stock"
:class=
"{ 'border-red': !(subItem.stock + '') && submitted }"
@
input
.
native=
"e => handleStockInput(e, subIndex)"
>
>
<el-popover
<el-popover
v-show=
"
(!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice
) && submitted"
v-show=
"
!(subItem.stock + ''
) && submitted"
slot=
"suffix"
slot=
"suffix"
placement=
"top"
placement=
"top"
title
title
width=
"90"
width=
"90"
trigger=
"hover"
trigger=
"hover"
:content=
"!(subItem.retailPrice + '') ? '零售价是必填项' : '零售价要大于供货价'
"
content=
"库存是必填项
"
>
>
<i
class=
"el-icon-warning color-red"
slot=
"reference"
></i>
<i
class=
"el-icon-warning color-red"
slot=
"reference"
></i>
</el-popover>
</el-popover>
</el-input>
</el-input>
</div>
</td>
<el-input
</tr>
:disabled=
"isDisabled"
</tbody>
v-else
</table>
placeholder=
"零售价"
</div>
v-model=
"subItem.retailPrice"
@
input
.
native=
"e => handleRetailPriceInput(e, subIndex)"
@
blur=
"handleRetailPriceBlur"
></el-input>
</td>
<td
:style=
"{ width: specsWidth }"
>
<el-input
:disabled=
"isDisabled"
placeholder=
"库存"
v-model=
"subItem.stock"
:class=
"{ 'border-red': !(subItem.stock + '') && submitted }"
@
input
.
native=
"e => handleStockInput(e, subIndex)"
>
<el-popover
v-show=
"!(subItem.stock + '') && submitted"
slot=
"suffix"
placement=
"top"
title
width=
"90"
trigger=
"hover"
content=
"库存是必填项"
>
<i
class=
"el-icon-warning color-red"
slot=
"reference"
></i>
</el-popover>
</el-input>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<
template
slot=
"retailPrice"
>
<
template
slot=
"retailPrice"
>
...
...
src/views/productStore/editProductDh.vue
View file @
77011b7
<!-- 商品编辑 - 带货 -->
<!-- 商品编辑 - 带货 -->
<
template
>
<
template
>
<div
class=
"edit-product-dh marketing p-t-20"
>
<div
class=
"edit-product-dh marketing p-t-20
edit-box
"
>
<div
class=
"container edit-container"
>
<div
class=
"container edit-container"
>
<p
class=
"edit-title"
>
{{
title
}}
</p>
<p
class=
"edit-title"
>
{{
title
}}
</p>
<div
class=
"flex"
style=
"margin-top: 20px;"
>
<div
class=
"flex"
style=
"margin-top: 20px;"
>
<div
style=
"width: 440px; text-align: center;
"
>
<div
class=
"main-img-box
"
>
<img
class=
"main-img"
:src=
"mainImgUrl"
/>
<
!--
<
img
class=
"main-img"
:src=
"mainImgUrl"
/>
<div>
<div>
<div
class=
"flex"
>
<div
class=
"flex"
>
<p
class=
"arrow left-arrow"
@
click=
"handleMoveImg('left')"
></p>
<p
class=
"arrow left-arrow"
@
click=
"handleMoveImg('left')"
></p>
...
@@ -16,7 +16,18 @@
...
@@ -16,7 +16,18 @@
</div>
</div>
<p
class=
"arrow right-arrow"
@
click=
"handleMoveImg('right')"
></p>
<p
class=
"arrow right-arrow"
@
click=
"handleMoveImg('right')"
></p>
</div>
</div>
</div>
</div>
-->
<!--
<img
v-if=
"!wechatImgList.length"
class=
"inner-img"
src=
"@/assets/product-default.png"
/>
-->
<el-carousel
height=
"420px"
>
<el-carousel-item
v-for=
"item in editForm.goodsDetailImageList"
:key=
"item"
>
<video
v-if=
"item.resType == 3"
class=
"inner-img"
:src=
"item.content"
></video>
<img
class=
"inner-img"
:src=
"item.content"
/>
</el-carousel-item>
</el-carousel>
</div>
</div>
<div
style=
"width: calc(100% - 440px);"
>
<div
style=
"width: calc(100% - 440px);"
>
<p
class=
"pro-name txt-ellipsis"
>
{{
editForm
.
goodsName
}}
</p>
<p
class=
"pro-name txt-ellipsis"
>
{{
editForm
.
goodsName
}}
</p>
...
@@ -25,38 +36,44 @@
...
@@ -25,38 +36,44 @@
</div>
</div>
<div
v-if=
"specificationDetailList.length"
class=
"flex"
style=
"margin-top: 20px;"
id=
"specificationDetailList"
>
<div
v-if=
"specificationDetailList.length"
class=
"flex"
style=
"margin-top: 20px;"
id=
"specificationDetailList"
>
<span
class=
"spesc-label"
:style=
"
{ width: labelWidth }">规格明细:
</span>
<span
class=
"spesc-label"
:style=
"
{ width: labelWidth }">规格明细:
</span>
<div
style=
"width: calc(100% - 100px);"
>
<div
style=
"width: calc(100% - 100px);
padding-right: 20px;
"
>
<table
class=
"table-spesc"
>
<table
class=
"table-spesc"
>
<tbody>
<tbody>
<tr>
<tr
style=
"background: #F4F6FC; box-shadow: 0px 1px 5px 0px rgba(38, 38, 38, 0.1);"
>
<td
:style=
"
{ width: specsWidth }" v-for="(subItem, subIndex) in specificationDetailList" :key="subIndex">
{{
subItem
.
specificationName
}}
</td>
<td
:style=
"
{ width: specsWidth, padding: '17px 0' }" v-for="(subItem, subIndex) in specificationDetailList" :key="subIndex">
{{
subItem
.
specificationName
}}
</td>
<td
:style=
"
{ width: specsWidth }">零售价(元)
</td>
<td
:style=
"
{ width: specsWidth, padding: '17px 0' }">零售价(元)
</td>
<td
:style=
"
{ width: specsWidth }">供货价
</td>
<td
:style=
"
{ width: specsWidth, padding: '17px 0' }">供货价
</td>
<td
:style=
"
{ width: specsWidth }">利润
</td>
<td
:style=
"
{ width: specsWidth, padding: '17px 0' }">利润
</td>
<td
:style=
"
{ width: specsWidth }">库存
</td>
<td
:style=
"
{ width: specsWidth, padding: '17px 0' }">库存
</td>
</tr>
</tbody>
</table>
<table
class=
"table-spesc"
style=
"max-height: 400px;"
>
<tbody>
<tr
style=
"border-bottom: 1px solid rgb(235, 235, 235);"
v-for=
"(item, index) in nameToValSpecsList"
:key=
"index"
>
<td
:style=
"
{ width: specsWidth }" v-for="(n, idx) in item.specsValueList" :key="idx">
{{
n
}}
</td>
<td
:style=
"
{ width: specsWidth }">
<el-input
:disabled=
"isDisabled"
:class=
"
{ 'border-red': (!(item.retailPrice + '') || +item.supplyPrice > +item.retailPrice)
&&
submitted }" placeholder="零售价" v-model="item.retailPrice" @input.native="e => handleInput(e, index)">
<el-popover
v-show=
"(!(item.retailPrice + '') || +item.supplyPrice > +item.retailPrice) && submitted"
slot=
"suffix"
placement=
"top"
title=
""
width=
"90"
trigger=
"hover"
:content=
"!(item.retailPrice + '') ? '零售价是必填项' : '零售价要大于供货价'"
>
<i
class=
"el-icon-warning color-red"
slot=
"reference"
></i>
</el-popover>
</el-input>
</td>
<td
:style=
"
{ width: specsWidth }">
{{
item
.
supplyPrice
}}
元
</td>
<td
:style=
"
{ width: specsWidth }">
{{
(
item
.
retailPrice
-
item
.
supplyPrice
).
toFixed
(
2
)
}}
元
</td>
<td
:style=
"
{ width: specsWidth }">
{{
item
.
stock
}}
件
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
<div
style=
"max-height: 400px; overflow: scroll;"
>
<table
class=
"table-spesc"
>
<tbody>
<tr
style=
"border-bottom: 1px solid rgb(235, 235, 235); height: 54px; line-height: 54px;"
v-for=
"(item, index) in nameToValSpecsList"
:key=
"index"
>
<td
:style=
"
{ width: specsWidth }" v-for="(n, idx) in item.specsValueList" :key="idx">
{{
n
}}
</td>
<td
:style=
"
{ width: specsWidth }">
<el-input
:disabled=
"isDisabled"
:class=
"
{ 'border-red': (!(item.retailPrice + '') || +item.supplyPrice > +item.retailPrice)
&&
submitted }" placeholder="零售价" v-model="item.retailPrice" @input.native="e => handleInput(e, index)">
<el-popover
v-show=
"(!(item.retailPrice + '') || +item.supplyPrice > +item.retailPrice) && submitted"
slot=
"suffix"
placement=
"top"
title=
""
width=
"90"
trigger=
"hover"
:content=
"!(item.retailPrice + '') ? '零售价是必填项' : '零售价要大于供货价'"
>
<i
class=
"el-icon-warning color-red"
slot=
"reference"
></i>
</el-popover>
</el-input>
</td>
<td
:style=
"
{ width: specsWidth }">
{{
item
.
supplyPrice
}}
元
</td>
<td
:style=
"
{ width: specsWidth }">
{{
(
item
.
retailPrice
-
item
.
supplyPrice
).
toFixed
(
2
)
}}
元
</td>
<td
:style=
"
{ width: specsWidth }">
{{
item
.
stock
}}
件
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<glsx-combi-form
v-if=
"!specificationDetailList.length"
class=
"edit-form-container"
ref=
"editFormRef"
labelWidth=
"140px"
defaultWidth=
"320px"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
></glsx-combi-form>
<glsx-combi-form
v-if=
"!specificationDetailList.length"
class=
"edit-form-container"
ref=
"editFormRef"
labelWidth=
"140px"
defaultWidth=
"320px"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
></glsx-combi-form>
<div
style=
"width: 375px; margin: 0 0 10px 40px;"
v-for=
"(item, index) in editForm.goodsDescList"
:key=
"index"
>
<div
v-show=
"item.resType == 2"
>
{{
item
.
content
}}
</div>
<img
style=
"width: 375px; width: 375px;"
v-show=
"item.resType == 1"
:src=
"item.content"
/>
</div>
</div>
</div>
<div
class=
"footer"
:style=
"
{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<div
class=
"footer"
:style=
"
{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button
type=
"primary"
@
click=
"handleConfirm"
>
确定
</el-button>
<el-button
type=
"primary"
@
click=
"handleConfirm"
>
确定
</el-button>
...
@@ -155,6 +172,7 @@ export default {
...
@@ -155,6 +172,7 @@ export default {
methods
:
{
methods
:
{
getInfo
()
{
getInfo
()
{
this
.
$apis
.
proManage
.
getProInfoApi
({
id
:
this
.
routeInfo
.
id
}).
then
(
res
=>
{
this
.
$apis
.
proManage
.
getProInfoApi
({
id
:
this
.
routeInfo
.
id
}).
then
(
res
=>
{
console
.
log
(
res
)
this
.
editForm
=
{
this
.
editForm
=
{
...
res
,
...
res
,
retailPrice
:
''
,
retailPrice
:
''
,
...
@@ -369,9 +387,21 @@ export default {
...
@@ -369,9 +387,21 @@ export default {
vertical-align
:
top
;
vertical-align
:
top
;
}
}
.edit-product-dh
.main-img
{
/*
.edit-product-dh .main-img {
width: 375px;
width: 375px;
height: 375px;
height: 375px;
} */
.edit-product-dh
.inner-img
{
width
:
420px
;
height
:
420px
;
}
.edit-product-dh
.main-img-box
{
width
:
440px
;
/* height: 440px; */
text-align
:
center
;
padding
:
0
20px
;
}
}
/* .edit-product-dh .flex {
/* .edit-product-dh .flex {
...
@@ -424,6 +454,7 @@ export default {
...
@@ -424,6 +454,7 @@ export default {
.edit-product-dh
.supply-price
{
.edit-product-dh
.supply-price
{
font-size
:
26px
;
font-size
:
26px
;
color
:
#FF6D00
;
color
:
#FF6D00
;
margin-top
:
10px
;
}
}
.edit-product-dh
.border-red
{
.edit-product-dh
.border-red
{
...
...
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