Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 d5635299
authored
Apr 18, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
带货管理详情-冗余代码
1 parent
bfc75763
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
266 deletions
src/views/productStore/editProductDh.vue
src/views/takeGood/takeGoodDetail.vue
src/views/productStore/editProductDh.vue
View file @
d563529
...
...
@@ -9,23 +9,6 @@
<p
class=
"edit-title"
>
{{
title
}}
</p>
<div
class=
"flex"
style=
"margin-top: 20px;"
>
<div
class=
"main-img-box"
>
<!--
<img
class=
"main-img"
:src=
"mainImgUrl"
/>
<div>
<div
class=
"flex"
>
<p
class=
"arrow left-arrow"
@
click=
"handleMoveImg('left')"
></p>
<div
class=
"small-block"
>
<div
class=
"flex small-box"
>
<img
class=
"small-img"
v-for=
"(item, index) in editForm.goodsDetailImageList"
:key=
"index"
:src=
"item.content"
@
click=
"handleChangeImg(index)"
/>
</div>
</div>
<p
class=
"arrow right-arrow"
@
click=
"handleMoveImg('right')"
></p>
</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>
...
...
@@ -295,23 +278,6 @@ export default {
handleChangeImg
(
idx
)
{
this
.
mainImgUrl
=
this
.
editForm
.
goodsDetailImageList
[
idx
].
content
},
// 移动图片
// handleMoveImg(dirction) {
// var el = document.getElementsByClassName('small-box')[0]
// if (dirction == 'left') {
// if (this.curMoveNum == 0) {
// return true
// }
// this.curMoveNum = this.curMoveNum - 1
// el.style.left = '-' + this.curMoveNum * 90 + 'px'
// } else {
// if (this.curMoveNum == this.moveNum) {
// return true
// }
// this.curMoveNum = this.curMoveNum + 1
// el.style.left = '-' + this.curMoveNum * 90 + 'px'
// }
// },
handleInput
(
e
,
idx
)
{
var
newValue
=
e
.
target
.
value
if
(
!
this
.
reg
.
priceReg
.
test
(
newValue
))
{
...
...
@@ -420,20 +386,11 @@ export default {
position
:
relative
;
}
/* .control {
width: calc(100% - 480px);
} */
.edit-product-dh
.view
img
{
width
:
100%
;
vertical-align
:
top
;
}
/* .edit-product-dh .main-img {
width: 375px;
height: 375px;
} */
.edit-product-dh
.inner-img
{
width
:
420px
;
height
:
420px
;
...
...
@@ -445,47 +402,6 @@ export default {
padding
:
0
20px
;
}
/* .edit-product-dh .flex {
display: flex;
} */
/* .edit-product-dh .arrow {
width: 0;
height: 0;
border-width: 20px;
border-style: solid;
margin-top: 20px;
cursor: pointer;
}
.edit-product-dh .left-arrow {
border-color: transparent #999999 transparent transparent;
}
.edit-product-dh .right-arrow {
border-color: transparent transparent transparent #999999;
} */
/* .edit-product-dh .small-block {
position: relative;
overflow: hidden;
width: 344px;
height: 80px;
margin: 0 10px;
} */
/* .edit-product-dh .small-box {
position: absolute;
left: 0;
} */
/* .edit-product-dh .small-img {
width: 80px;
height: 80px;
margin-right: 8px;
cursor: pointer;
} */
.edit-product-dh
.pro-name
{
width
:
100%
;
font-size
:
16px
;
...
...
src/views/takeGood/takeGoodDetail.vue
View file @
d563529
...
...
@@ -6,18 +6,6 @@
<p
class=
"edit-title"
>
{{
title
}}
</p>
<div
class=
"flex"
style=
"margin-top: 20px;"
>
<div
style=
"width: 440px; text-align: center;"
>
<!--
<img
class=
"main-img"
:src=
"mainImgUrl"
/>
<div>
<div
class=
"flex"
>
<p
class=
"arrow left-arrow"
@
click=
"handleMoveImg('left')"
></p>
<div
class=
"small-block"
>
<div
class=
"flex small-box"
>
<img
class=
"small-img"
v-for=
"(item, index) in editForm.goodsDetailImageList"
:key=
"index"
:src=
"item.content"
@
click=
"handleChangeImg(index)"
/>
</div>
</div>
<p
class=
"arrow right-arrow"
@
click=
"handleMoveImg('right')"
></p>
</div>
</div>
-->
<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>
...
...
@@ -52,15 +40,7 @@
<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>
...
...
@@ -85,11 +65,6 @@ export default {
return
{
size
:
'small'
,
title
:
'查看商品'
,
// titleObj: {
// 1: '创建商品',
// 2: '编辑商品',
// 3: '查看商品'
// },
footerLeft
:
'0'
,
footerWidth
:
'0'
,
editChildRef
:
'editChildRef'
,
...
...
@@ -114,25 +89,7 @@ export default {
editForm
:
{
retailPrice
:
''
},
editRule
:
{
// retailPrice: [
// { required: true, message: '请输入零售价', trigger: 'change' },
// {
// validator: (rule, value, callback) => {
// return +this.editForm.supplyPrice > +value ? callback(new Error('零售价不能小于供货价')) : callback()
// },
// trigger: 'change'
// }
// ]
},
editFormData
:
[
// {
// label: '零售价',
// name: 'retailPrice',
// width: '280px',
// type: 'input',
// isDisabled: false
// },
{
label
:
'供货价'
,
name
:
'supplyPrice'
,
...
...
@@ -153,7 +110,6 @@ export default {
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
this
.
routeInfo
=
this
.
$route
.
query
// this.title = this.titleObj[this.routeInfo.addOrEdit]
this
.
isDisabled
=
true
this
.
editFormData
[
0
].
isDisabled
=
true
this
.
getInfo
()
...
...
@@ -257,94 +213,6 @@ export default {
handleChangeImg
(
idx
)
{
this
.
mainImgUrl
=
this
.
editForm
.
goodsDetailImageList
[
idx
].
content
},
// 移动图片
// handleMoveImg(dirction) {
// var el = document.getElementsByClassName('small-box')[0]
// if (dirction == 'left') {
// if (this.curMoveNum == 0) {
// return true
// }
// this.curMoveNum = this.curMoveNum - 1
// el.style.left = '-' + this.curMoveNum * 90 + 'px'
// } else {
// if (this.curMoveNum == this.moveNum) {
// return true
// }
// this.curMoveNum = this.curMoveNum + 1
// el.style.left = '-' + this.curMoveNum * 90 + 'px'
// }
// },
// handleInput(e, idx) {
// var newValue = e.target.value
// if (!this.reg.priceReg.test(newValue)) {
// newValue = ''
// }
// var oldValue = newValue
// if (e.key != 'Backspace' && newValue.length > 1) {
// oldValue = newValue.slice(0, newValue.length - 1)
// }
// this.nameToValSpecsList[idx].retailPrice = limitPrice(newValue, oldValue, 5, 2)
// },
// 跳转
// whereToGo(id) {
// document.getElementById(id).scrollIntoView()
// },
// checkSpeceData() {
// var flag = true
// for (var i = 0; i < this.nameToValSpecsList.length; i++) {
// var item = this.nameToValSpecsList[i]
// if (!item.retailPrice) {
// this.whereToGo('specificationDetailList')
// return false
// }
// if (+item.retailPrice < +item.supplyPrice) {
// this.whereToGo('specificationDetailList')
// return false
// }
// }
// return flag
// },
// handleConfirm() {
// this.submitted = true
// var flag = false
// var params = {}
// if (this.nameToValSpecsList.length) {
// if (!this.checkSpeceData()) {
// return
// }
// params.specificationDetailList = []
// this.nameToValSpecsList.forEach((item, index) => {
// params.specificationDetailList.push({
// specificationData: item.specificationData,
// specificationKey: item.specificationKey,
// retailPrice: (item.retailPrice * 100).toFixed(0)
// })
// })
// } else {
// this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
// if (!valid) {
// flag = true
// } else {
// params = {
// retailPrice: (this.editForm.retailPrice * 100).toFixed(0)
// }
// }
// })
// }
// if (flag) {
// return true
// }
// params.id = this.routeInfo.id
// this.$apis.proManage.updateTakeProApi(params).then(res => {
// this.$message({
// message: res.code == '0' ? '操作成功' : '操作失败',
// type: res.code == '0' ? 'success' : 'error'
// })
// if (res.code == '0') {
// this.handleCancel()
// }
// })
// },
handleCancel
()
{
this
.
$router
.
push
({
path
:
'/takeGood/index'
...
...
@@ -367,61 +235,11 @@ export default {
position
:
relative
;
}
/* .control {
width: calc(100% - 480px);
} */
.view
img
{
width
:
100%
;
vertical-align
:
top
;
}
/* .edit-product-dh .main-img {
width: 375px;
height: 375px;
} */
/* .edit-product-dh .flex {
display: flex;
} */
/* .edit-product-dh .arrow {
width: 0;
height: 0;
border-width: 20px;
border-style: solid;
margin-top: 20px;
cursor: pointer;
}
.edit-product-dh .left-arrow {
border-color: transparent #999999 transparent transparent;
}
.edit-product-dh .right-arrow {
border-color: transparent transparent transparent #999999;
} */
/* .edit-product-dh .small-block {
position: relative;
overflow: hidden;
width: 344px;
height: 80px;
margin: 0 10px;
}
.edit-product-dh .small-box {
position: absolute;
left: 0;
} */
/* .edit-product-dh .small-img {
width: 80px;
height: 80px;
margin-right: 8px;
cursor: pointer;
} */
.edit-product-dh
.pro-name
{
width
:
100%
;
font-size
:
16px
;
...
...
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