Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
3bba680a
提交
3bba680a
authored
7月 30, 2021
作者:
huaxinzhu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
商品模块,bug修复02
上级
99c7beac
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
992 行增加
和
934 行删除
+992
-934
goodsaftersale.vue
src/views/system/goods/add/components/goodsaftersale.vue
+5
-1
goodsimg.vue
src/views/system/goods/add/components/goodsimg.vue
+6
-2
goodsinfomation.vue
src/views/system/goods/add/components/goodsinfomation.vue
+7
-28
goodsparameter.vue
src/views/system/goods/add/components/goodsparameter.vue
+10
-3
goodsspecifications.vue
...views/system/goods/add/components/goodsspecifications.vue
+7
-7
index.vue
src/views/system/goods/add/index.vue
+52
-43
goodsdetail.vue
src/views/system/goodsimport/components/goodsdetail.vue
+893
-844
goodsgement.vue
src/views/system/goodsimport/goodsgement.vue
+12
-6
没有找到文件。
src/views/system/goods/add/components/goodsaftersale.vue
浏览文件 @
3bba680a
...
...
@@ -80,12 +80,16 @@
mounted
()
{
this
.
getFreightData
();
//debugger
console
.
log
(
'售后数据:'
,
this
.
goodsaftersale
);
//
console.log('售后数据:',this.goodsaftersale);
if
(
this
.
goodsaftersale
&&
this
.
goodsaftersale
.
stags
.
length
>
0
)
{
this
.
goodsAfterSaleForm
=
this
.
goodsaftersale
;
}
},
methods
:
{
/** 售后服务数据 初始化 */
initInfo
()
{
this
.
$refs
.
goodsAfterSaleForm
.
resetFields
();
},
// 运费模板
getFreightData
()
{
// let query = { page: 1, limit: 50 };
...
...
src/views/system/goods/add/components/goodsimg.vue
浏览文件 @
3bba680a
...
...
@@ -77,11 +77,15 @@
components
:
{},
mounted
()
{
this
.
goodsDeForm
=
this
.
imgdata
;
console
.
log
(
"详情:"
,
this
.
imgdata
);
//console.log("详情:",this.imgdata);
},
watch
:
{},
methods
:
{
/** 初始化 商品详情 */
initInfo
()
{
this
.
goodsDeForm
.
description
=
''
;
this
.
goodsDetailsImgFileList
=
[];
},
// 通过原生 input上传 图片
fileChange
()
{
const
list
=
this
.
$refs
.
file
.
files
;
...
...
src/views/system/goods/add/components/goodsinfomation.vue
浏览文件 @
3bba680a
...
...
@@ -207,34 +207,8 @@
}
// return end
},
components
:
{},
watch
:
{
// 'goodsImgFileList': {
// handler(val, oldVal) {
// if(val.length > 0) {
// this.goodsInfoForm.imgs = '';
// let imgArr = [];
// val.forEach(item => {
// imgArr.push(item.url);
// })
// this.goodsInfoForm.imgs = imgArr.toString();
// }else if(val.length === 0){
// this.goodsInfoForm.imgs = '';
// }
// //console.log(123,this.goodsInfoForm.imgs);
// },
// deep: true
// }
// serviceagsTags: {
// handler(val, oldVal) {
// this.$set(this.goodsInfoForm, 'serviceagsTags', val)
// },
// deep: true
// },
},
created
()
{
},
watch
:
{},
created
()
{},
mounted
()
{
//debugger
//深拷贝一份最开始的数据,为初始化准备
...
...
@@ -259,6 +233,11 @@
this
.
getBrands
();
},
methods
:
{
// 数据初始化
initInfo
()
{
this
.
$refs
.
goodsInfoForm
.
resetFields
();
this
.
goodsImgFileList
=
[];
},
// 获取 省
getArea
()
{
let
limboNode
=
{
...
...
src/views/system/goods/add/components/goodsparameter.vue
浏览文件 @
3bba680a
...
...
@@ -213,7 +213,7 @@ export default {
},
watch
:{
'parameterdata'
:
function
(
val
)
{
//
debugger
debugger
this
.
orgGoodsPam
=
val
;
//console.log("监听",this.orgGoodsPam);
},
...
...
@@ -222,14 +222,21 @@ export default {
//this.orgGoodsPam = this.parameterdata;
},
mounted
()
{
//
console.log("加载后,",this.parameterdata);
console
.
log
(
"加载后,"
,
this
.
parameterdata
);
if
(
this
.
parameterdata
.
pamTableList
&&
this
.
parameterdata
.
pamTableList
.
length
>
0
)
{
this
.
orgGoodsPam
=
this
.
parameterdata
;
}
else
{
if
(
this
.
parameterdata
.
singleSpecTable
.
length
===
1
)
{
this
.
singleSpecTable
=
this
.
parameterdata
.
singleSpecTable
}
}
},
methods
:
{
/** 初始化 商品售价 数据 */
initInfo
()
{
this
.
orgGoodsPam
=
{};
//this.singleSpecTable =
},
// 查看各类价格说明
viewPriceExp
()
{
this
.
isViewPriceExp
=
true
;
...
...
src/views/system/goods/add/components/goodsspecifications.vue
浏览文件 @
3bba680a
...
...
@@ -127,14 +127,14 @@ export default {
this
.
$forceUpdate
()
}
},
watch
:{
// "speData.specsGroup": {
// handle: function(val) {
// console.log(22222,val);
// }
// }
},
watch
:{},
methods
:
{
/** 初始化 商品规格数据 */
initInfo
()
{
this
.
$set
(
this
.
specsGroup
.
spec_value
,
this
.
specsGroup
.
spec_value
.
length
,
this
.
speParamName
);
this
.
speData
=
[];
this
.
$set
(
this
.
speData
,
this
.
speData
.
length
,
this
.
specsGroup
);
},
/** 添加规格*/
addSpe
()
{
let
specsGroup
=
{
...
...
src/views/system/goods/add/index.vue
浏览文件 @
3bba680a
...
...
@@ -45,7 +45,7 @@
<GoodsParameter
ref=
"goodsparameter"
:parameterdata=
"parameterdata"
/>
</div>
</div>
<!-- 商品详情 -->
<div
class=
"floor-item"
>
<div
class=
"floor-item-box"
>
<p
class=
"card-header-title floor-item-box-title"
><span
class=
"blue-block-goods blue-block-goods-title"
></span>
商品详情
</p>
...
...
@@ -201,7 +201,6 @@
this
.
parameterdata
.
pamTableList
=
[];
this
.
parameterdata
.
pamDataList
=
[];
res
.
data
.
specs_group
.
forEach
((
item
)
=>
{
//
item
.
js_price
=
item
.
js_price
/
100
;
item
.
sl_price
=
item
.
js_price
/
100
;
item
.
price
=
item
.
price
/
100
;
...
...
@@ -212,7 +211,6 @@
prePriceArr
.
push
(
item
);
this
.
parameterdata
.
pamTableList
.
push
(
prePriceArr
);
this
.
parameterdata
.
pamDataList
.
push
(
item
.
spec_values
);
})
this
.
parameterdata
.
pamNameList
=
res
.
data
.
specs
;
}
else
{
...
...
@@ -237,9 +235,6 @@
// 商品详情
this
.
imgdata
.
description
=
res
.
data
.
description
;
//this.goodsinfodata = res.data;
//this.imgdata = res.data.description;
//this.goodsaftersale = res.data;
// 售后服务
this
.
goodsaftersale
.
freight_id
=
res
.
data
.
freight_id
;
...
...
@@ -261,9 +256,7 @@
}
else
{
this
.
goodsaftersale
.
stags
=
[];
}
}
});
}
},
...
...
@@ -335,10 +328,6 @@
}
if
(
level
===
1
)
{
//result = res.data
// res.data.forEach((item,index)=> {
// result = (item.id === limboNode.id) ? item.children : [];
// });
for
(
let
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
if
(
limboNode
.
id
===
res
.
data
[
i
].
id
)
{
result
=
res
.
data
[
i
].
children
;
...
...
@@ -355,7 +344,6 @@
}
if
(
level
===
2
)
{
for
(
let
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
if
(
res
.
data
[
i
].
children
.
length
>
0
)
{
for
(
let
j
=
0
;
j
<
res
.
data
[
i
].
children
.
length
;
j
++
)
{
...
...
@@ -374,7 +362,6 @@
})
}
// result = []
resolve
(
result
)
this
.
loading
=
false
;
});
...
...
@@ -389,17 +376,10 @@
// console.log(232,this.goodsinfodata.categoryStr,this.goodsinfodata.categoryList);
},
// 保存/提交
save
()
{
// let spxxDataId = this.$refs.goodsInfo.goodsInfoForm.goods_id;
//
// if(!spxxDataId) {
//
// }
debugger
// 此处变量 有顺序 校验时,电梯至某处
// 商品信息 是否填写完整
let
isGoodsInfoMsg
=
this
.
$refs
[
'goodsInfo'
].
validateGoodsInfoForm
();
...
...
@@ -410,7 +390,6 @@
let
spsjData1
=
this
.
$refs
.
goodsparameter
.
singleSpecTable
;
let
spsjData2
=
this
.
$refs
.
goodsparameter
.
orgGoodsPam
;
//debugger
// 如果有,则说明有规格组合数据
if
(
spsjData2
.
pamTableList
&&
spsjData2
.
pamTableList
.
length
>
0
)
{
for
(
let
i
=
0
;
i
<
spsjData2
.
pamTableList
.
length
;
i
++
)
{
...
...
@@ -428,7 +407,6 @@
}
isGoodsPrice
=
true
;
}
// ---------------
}
if
(
!
isGoodsPrice
)
{
...
...
@@ -458,9 +436,6 @@
// 售后服务 是否填写完整
let
isGoodsAfterSaleMsg
=
this
.
$refs
[
'goodsaftersale'
].
validateGoodsAfterSaleForm
();
// 商品售价,由商品规格决定,
// 如果 没有填写商品规格,那么商品售价应该获取
if
(
!
isGoodsInfoMsg
)
{
this
.
$message
({
type
:
'error'
,
message
:
'商品信息未填写完整'
});
this
.
setFloorNavMountClick
(
0
);
...
...
@@ -491,10 +466,9 @@
// 商品规格
let
spggData
=
this
.
$refs
.
goodsspecifications
.
speData
;
// this.goodsAllData.specs = spggData;
// 商品售价,上面已经获取,
let
spsjData
=
{};
// specs_group
let
spsjData
=
{};
if
(
spsjData2
.
pamTableList
&&
spsjData2
.
pamTableList
.
length
>
0
)
{
this
.
goodsAllData
[
'specs_group'
]
=
[];
this
.
goodsAllData
[
'specs'
]
=
spggData
;
...
...
@@ -511,37 +485,72 @@
// 售后服务 数据
let
ssffData
=
this
.
$refs
.
goodsaftersale
.
goodsAfterSaleForm
;
console
.
log
(
"商品信息:"
,
spxxData
);
console
.
log
(
"商品规格:"
,
spggData
);
console
.
log
(
"商品售价:"
,
spsjData
);
console
.
log
(
"商品详情:"
,
spxqData
);
console
.
log
(
"商品售后:"
,
ssffData
);
Object
.
assign
(
this
.
goodsAllData
,
spxxData
,
spsjData
,
spxqData
,
ssffData
);
// spxxData.categoryList = []
// 经营类目,服务标签,需要单独处理数据格式
this
.
goodsAllData
.
category_id
=
spxxData
.
categoryList
.
slice
(
-
1
)[
0
]
?
spxxData
.
categoryList
.
slice
(
-
1
)[
0
]
:
''
;
if
(
this
.
goodsAllData
.
stags
)
{
this
.
goodsAllData
.
stags
=
this
.
goodsAllData
.
stags
.
toString
();
}
console
.
log
(
'最终数据:'
,
this
.
goodsAllData
);
// let msg = res.data.Apply.content;
// this.$router.push({
// name: 'reviewFail',
// params: { msg: msg }
// });
if
(
this
.
goodsAllData
.
goods_id
)
{
// if(this.$route.params.msg) {
// this.msg = this.$route.params.msg;
// }
// freight
let
routerParam
=
{
fuck
:
"hxz"
};
// 商品id 不为 0 是修改
if
(
this
.
goodsAllData
.
goods_id
)
{
updateGoodsNew
(
this
.
goodsAllData
).
then
(
res
=>
{
console
.
log
(
"修改结果:"
,
res
);
if
(
res
.
code
===
1
)
{
this
.
$message
({
type
:
'success'
,
message
:
'编辑成功'
});
this
.
initAllGoodsInfo
();
this
.
$emit
(
"closeEditDialog"
);
}
if
(
res
.
code
===
0
)
{
let
msg
=
res
.
message
?
res
.
message
:
'编辑失败'
this
.
$message
({
type
:
'error'
,
message
:
msg
});
}
});
}
else
{
// 商品id 为 0 是新增
addGoods
(
this
.
goodsAllData
).
then
(
res
=>
{
console
.
log
(
"返回结果"
,
res
);
if
(
res
.
code
===
1
)
{
this
.
$message
({
type
:
'success'
,
message
:
'新增成功'
});
this
.
initAllGoodsInfo
();
//this.$router.push({ name: 'system/goodsimport/goodsgement',params: routerParam }); //management
//this.$router.push({ path: '/system/goodsimport/management' });
this
.
$router
.
push
({
path
:
'/system/goods/management'
});
}
if
(
res
.
code
===
0
)
{
let
msg
=
res
.
message
?
res
.
message
:
'新增失败'
this
.
$message
({
type
:
'error'
,
message
:
msg
});
}
});
}
},
/*-----------------------*/
// 初始化 商品所有数据
initAllGoodsInfo
()
{
// 初始化 商品信息 数据
this
.
$refs
.
goodsInfo
.
initInfo
();
// 初始化 商品规格 数据
this
.
$refs
.
goodsspecifications
.
initInfo
();
// 初始化 商品售价 数据
this
.
$refs
.
goodsparameter
.
initInfo
();
// 初始化 商品详情 数据
this
.
$refs
.
goodsdetailsimg
.
initInfo
();
// 初始化 商品售后 数据
this
.
$refs
.
goodsaftersale
.
initInfo
();
},
/* 添加商品详细 */
/* 设置楼层导航事件驱动方法* @params Number index 楼层下标 */
...
...
src/views/system/goodsimport/components/goodsdetail.vue
浏览文件 @
3bba680a
<
template
>
<div
id=
"box"
class=
"box"
style=
"height: 100%; overflow-y: scroll; "
>
<el-breadcrumb
style=
'margin-left:50px; font-size:16px;font-weight:900;'
>
<el-breadcrumb-item
>
{{
goodsinfor
.
category_first_name
}}
</el-breadcrumb-item>
<el-breadcrumb-item
v-if=
'goodsinfor.category_second_name'
>
{{
goodsinfor
.
category_second_name
}}
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
goodsinfor
.
category_first_name
}}
</el-breadcrumb-item>
<el-breadcrumb-item
v-if=
'goodsinfor.category_second_name'
>
{{
goodsinfor
.
category_second_name
}}
</el-breadcrumb-item>
<el-breadcrumb-item
v-if=
'goodsinfor.category_three_name'
>
{{
goodsinfor
.
category_three_name
}}
</el-breadcrumb-item>
</el-breadcrumb>
<div
style=
"width: 1220px;margin-right: auto;margin-left: auto;"
>
<div
class=
"shoop_details"
>
<!-- 放大镜 -->
<div
class=
"shoop_details_Magnifying"
style=
"width: 420px"
>
<Magnifying
:imageurl=
"picture"
:imguser=
"'i'"
/>
<Magnifying
:imageurl=
"picture"
:imguser=
"'i'"
/>
<div
class=
"details_Magnifying_content"
>
<div
class=
"details_Magnifying_icon"
>
<i
class=
"el-icon-arrow-left Magnifying_icon"
/>
<i
class=
"el-icon-arrow-left Magnifying_icon"
/>
</div>
<swiper
ref=
"mySwiper"
:options=
"swiperOptions"
>
...
...
@@ -38,7 +39,7 @@
</swiper>
<div
class=
"details_Magnifying_icon2"
>
<i
class=
"el-icon-arrow-right Magnifying_icon"
/>
<i
class=
"el-icon-arrow-right Magnifying_icon"
/>
</div>
</div>
...
...
@@ -60,12 +61,12 @@
<div
class=
"shoop_brand"
>
<div
class=
"shoop_brand_tutorial"
>
{{
goodsinfor
.
goods_name
}}
</div>
<div
class=
"shoop_brand_tutorial"
>
{{
goodsinfor
.
goods_name
}}
</div>
<!-- 价格start -->
<div
class=
"test"
>
<div
class=
"shoop_brand_price"
>
<div>
<span
class=
"shoop_brand_price_text"
>
商城价
</span>
<span
class=
"shoop_brand_price_text"
>
商城价
</span>
<span
style=
"font-size: 24px"
>
¥
</span>
<span
class=
"shoop_brand_price_money"
>
{{
goodsprice
/
100
}}
</span>
</div>
...
...
@@ -95,7 +96,7 @@
<span
class=
"cumulative_text blueColor"
>
9999+
</span>
<span
class=
"blueColor"
>
+
</span>
</div>
<div
style=
"flex: 25%"
/>
<div
style=
"flex: 25%"
/>
</div>
</div>
<!-- 价格end -->
...
...
@@ -149,8 +150,9 @@
<!-- 规格end -->
<el-row
class=
"shoop_number"
>
<el-col
:span=
'2'
style=
"text-align: right;"
>
数量:
</el-col>
<el-col
:span=
'22'
>
<el-input-number
size=
"mini"
v-model=
"good_numble"
@
change=
"goodsstock()"
:min=
"1"
:max=
"stock"
label=
"描述文字"
style=
"margin-left:12px;"
></el-input-number>
<el-col
:span=
'22'
>
<el-input-number
size=
"mini"
v-model=
"good_numble"
@
change=
"goodsstock()"
:min=
"1"
:max=
"stock"
label=
"描述文字"
style=
"margin-left:12px;"
></el-input-number>
</el-col>
</el-row>
<div>
...
...
@@ -171,7 +173,7 @@
<div
style=
"display: block"
>
<div
style=
"display: flex"
>
<div
class=
"shoop_text"
>
商品详情
</div>
<div
class=
"shoop_details_box"
/>
<div
class=
"shoop_details_box"
/>
</div>
<div
class=
"textFont shoop_goods"
>
<div
class=
"shoop_goods_number"
>
...
...
@@ -199,9 +201,10 @@
</
template
>
<
script
>
import
{
getgoodsdetail
}
from
'@/api/module/goodsgement'
import
Magnifying
from
'@/components/Magnifying'
export
default
{
import
{
getgoodsdetail
}
from
'@/api/module/goodsgement'
import
Magnifying
from
'@/components/Magnifying'
export
default
{
components
:
{
Magnifying
,
},
...
...
@@ -213,20 +216,20 @@ export default {
},
data
()
{
return
{
el_valuestatus
:
true
,
el_valuestatus
:
true
,
el_value
:
[],
//地址
props
:
{
checkStrictly
:
false
,
checkStrictly
:
false
,
expandTrigger
:
'click'
,
emitPath
:
true
,
lazy
:
true
,
lazyLoad
:
this
.
lazyLoad
,
lazyLoad
:
this
.
lazyLoad
,
value
:
"id"
,
label
:
"name"
,
leaf
:
"leaf"
},
aitivindex
:
0
,
spceindex
:
''
,
aitivindex
:
0
,
spceindex
:
''
,
showImage
:
false
,
productActive
:
false
,
default1
:
''
,
...
...
@@ -256,44 +259,44 @@ export default {
// 间距
spaceBetween
:
10
},
value1
:
5
,
old_goods_title
:
''
,
sourcename
:
''
,
freename
:
''
,
centext
:
'有货'
,
iss
:
0
,
arrs
:
[],
addresslable
:
''
,
propsaddress
:
{
value1
:
5
,
old_goods_title
:
''
,
sourcename
:
''
,
freename
:
''
,
centext
:
'有货'
,
iss
:
0
,
arrs
:
[],
addresslable
:
''
,
propsaddress
:
{
label
:
'name'
,
value
:
'id'
,
children
:
'children'
,
// checkStrictly:true
},
valueoptionaddress
:
[],
optionsChangedaddress
:
false
,
optionsdetiladdress
:
[],
skuids
:
''
,
jdactivity_price
:
0
,
jdstatus
:
1
,
jdstatusd
:
1
,
jdthird_id
:
''
,
tmthird_id
:
''
,
sourcecrous
:
'2'
,
source
:
2
,
shopcartlist
:
{},
optionlist
:
{},
arr
:
true
,
tip
:
true
,
arr2
:
true
,
cart_num
:
0
,
optionsmg
:
[],
hovers
:
false
,
hovers1
:
false
,
hovers2
:
false
,
hovers3
:
false
,
cart_num
:
'0'
,
user
:
'测试'
,
valueoptionaddress
:
[],
optionsChangedaddress
:
false
,
optionsdetiladdress
:
[],
skuids
:
''
,
jdactivity_price
:
0
,
jdstatus
:
1
,
jdstatusd
:
1
,
jdthird_id
:
''
,
tmthird_id
:
''
,
sourcecrous
:
'2'
,
source
:
2
,
shopcartlist
:
{},
optionlist
:
{},
arr
:
true
,
tip
:
true
,
arr2
:
true
,
cart_num
:
0
,
optionsmg
:
[],
hovers
:
false
,
hovers1
:
false
,
hovers2
:
false
,
hovers3
:
false
,
cart_num
:
'0'
,
user
:
'测试'
,
adsp
:
false
,
stock
:
1
,
good_numble
:
1
,
...
...
@@ -308,7 +311,7 @@ export default {
click_show
:
false
,
specstrue
:
false
,
specs
:
''
,
specsitem
:
{},
specsitem
:
{},
html
:
''
,
shopinfor
:
''
,
//店铺信息
goodsinforlist
:
''
,
//全部信息列表
...
...
@@ -364,7 +367,7 @@ export default {
},
methods
:
{
elvalueclick
()
{
elvalueclick
()
{
// this.goodsonly()
},
lazyLoad
(
node
,
resolve
)
{
...
...
@@ -391,7 +394,7 @@ export default {
item
.
value
=
item
.
id
;
item
.
label
=
item
.
name
item
.
leaf
=
level
item
.
children
=
[]
item
.
children
=
[]
})
}
if
(
level
===
1
)
{
...
...
@@ -406,7 +409,7 @@ export default {
resolve
(
result
)
})
},
sale_goods
(
infor
)
{
sale_goods
(
infor
)
{
return
infor
.
sale
// if(infor.source==2){
// var strung = infor.third_id.toString()
...
...
@@ -420,22 +423,22 @@ export default {
},
//是否有货
goodsonly
()
{
goodsonly
()
{
let
optionlist
=
JSON
.
parse
(
localStorage
.
getItem
(
'optionlist'
))
if
(
optionlist
)
{
}
else
{
if
(
optionlist
)
{
}
else
{
this
.
centext
=
'无货'
return
false
}
let
date
=
{
sku_id
:
optionlist
.
id
,
goods_id
:
Number
(
this
.
$route
.
query
.
id
),
address_id
:
this
.
el_value
[
1
]?
this
.
el_value
[
1
]:
72
sku_id
:
optionlist
.
id
,
goods_id
:
Number
(
this
.
$route
.
query
.
id
),
address_id
:
this
.
el_value
[
1
]
?
this
.
el_value
[
1
]
:
72
}
debugger
//
debugger
addressCheckAvailable
(
date
).
then
(
res
=>
{
if
(
res
.
code
==
1
)
{
addressCheckAvailable
(
date
).
then
(
res
=>
{
if
(
res
.
code
==
1
)
{
//console.log(data.data,'----')
// if(res.data.data===0){
this
.
centext
=
'有货'
...
...
@@ -443,50 +446,46 @@ export default {
// if(res.data.data === 1){
// that.centext = '无货'
// }
if
(
res
.
data
.
freight
!==
0
)
{
this
.
freename
=
'邮费'
+
res
.
data
.
freight
/
100
+
'元'
if
(
res
.
data
.
freight
!==
0
)
{
this
.
freename
=
'邮费'
+
res
.
data
.
freight
/
100
+
'元'
}
if
(
res
.
data
.
freight
===
0
)
{
if
(
res
.
data
.
freight
===
0
)
{
this
.
freename
=
'包邮'
}
}
else
{
}
else
{
this
.
centext
=
'无货'
}
})
},
titlename
(
oldgoodsid
)
{
titlename
(
oldgoodsid
)
{
let
date
=
{
goods_id
:
oldgoodsid
goods_id
:
oldgoodsid
}
chooseGoodsOldTitle
(
date
).
then
(
res
=>
{
if
(
res
.
code
==
1
)
{
chooseGoodsOldTitle
(
date
).
then
(
res
=>
{
if
(
res
.
code
==
1
)
{
this
.
old_goods_title
=
res
.
data
}
})
},
addcart_submits
(
e
)
{
//查看第三方详情
// debugger
if
(
this
.
goshopping
)
{
if
(
this
.
source
==
2
)
{
var
url
=
'https://item.jd.com/'
+
this
.
jdthird_id
+
'.html'
if
(
this
.
source
==
2
)
{
var
url
=
'https://item.jd.com/'
+
this
.
jdthird_id
+
'.html'
window
.
open
(
url
)
}
else
if
(
this
.
source
==
7
)
{
var
url
=
'https://detail.tmall.com/item.htm?id='
+
this
.
tmthird_id
}
else
if
(
this
.
source
==
7
)
{
var
url
=
'https://detail.tmall.com/item.htm?id='
+
this
.
tmthird_id
window
.
open
(
url
)
}
else
if
(
this
.
source
==
8
)
{
}
else
if
(
this
.
source
==
8
)
{
// var url='https://product.suning.com/0000000000/'+this.tmthird_id+'.html'
// window.open(url)
}
...
...
@@ -499,19 +498,19 @@ export default {
}
},
goodsstock
(){
goodsstock
()
{
// if (this.good_numble
<
this
.
stock
)
{
// this.good_numble = val
// }
},
allguige
(
id
)
{
if
(
id
)
{
allguige
(
id
)
{
if
(
id
)
{
let
date
=
{
old_goods_id
:
id
old_goods_id
:
id
}
getGoodsDesc
(
date
).
then
(
res
=>
{
if
(
res
.
code
==
1
)
{
getGoodsDesc
(
date
).
then
(
res
=>
{
if
(
res
.
code
==
1
)
{
this
.
goodsinfor
.
description
=
res
.
data
.
description
}
})
...
...
@@ -528,16 +527,14 @@ export default {
console
.
log
(
response
)
if
(
response
.
code
===
1
)
{
// this.detailData = res.data
debugger
//
debugger
this
.
goodsinfor
=
response
.
data
this
.
goodsprice
=
response
.
data
.
price
this
.
jdactivity_price
=
response
.
data
.
js_price
this
.
scprice
=
response
.
data
.
sc_price
this
.
stock
=
Number
(
response
.
data
.
stock
)
this
.
stock
=
Number
(
response
.
data
.
stock
)
this
.
lunimg
=
response
.
data
.
imgs
this
.
source
=
1
this
.
source
=
1
this
.
specs
=
response
.
data
.
specs
//规格
...
...
@@ -549,19 +546,19 @@ export default {
// // 判断是否有规格
if
(
response
.
data
.
specs
.
length
>
0
)
{
debugger
//
debugger
this
.
adsp
=
true
this
.
goshopping
=
true
this
.
specs_goods
=
{}
var
assasa
=
[]
response
.
data
.
specs
.
forEach
((
item
,
index
)
=>
{
response
.
data
.
specs
.
forEach
((
item
,
index
)
=>
{
assasa
.
push
(
item
.
spec_value
[
0
].
value
.
toString
())
this
.
specs_goods
[
item
.
id
]
=
item
.
spec_value
[
0
].
value
.
toString
()
item
.
spec_value
.
forEach
((
itemchild
,
index
)
=>
{
if
(
index
==
0
)
{
itemchild
[
'classstatus'
]
=
true
}
else
{
itemchild
[
'classstatus'
]
=
false
item
.
spec_value
.
forEach
((
itemchild
,
index
)
=>
{
if
(
index
==
0
)
{
itemchild
[
'classstatus'
]
=
true
}
else
{
itemchild
[
'classstatus'
]
=
false
}
})
...
...
@@ -585,14 +582,18 @@ export default {
}
)
},
sku_p
(
indexs
,
indexchild
,
skuid
,
id
)
{
// 组合规格,点击切换
sku_p
(
indexs
,
indexchild
,
skuid
,
id
)
{
//debugger
localStorage
.
removeItem
(
'optionlist'
)
this
.
specs
[
indexs
].
spec_value
.
forEach
((
item
,
index
)
=>
{
if
(
indexchild
==
index
)
{
this
.
$set
(
this
.
specs
[
indexs
].
spec_value
[
index
],
'classstatus'
,
true
)
}
else
{
this
.
$set
(
this
.
specs
[
indexs
].
spec_value
[
index
],
'classstatus'
,
false
)
this
.
specs
[
indexs
].
spec_value
.
forEach
((
item
,
index
)
=>
{
if
(
indexchild
==
index
)
{
this
.
$set
(
this
.
specs
[
indexs
].
spec_value
[
index
],
'classstatus'
,
true
)
}
else
{
this
.
$set
(
this
.
specs
[
indexs
].
spec_value
[
index
],
'classstatus'
,
false
)
}
// 切换时,将规格数量,初始化为 1
this
.
good_numble
=
1
this
.
$forceUpdate
()
})
...
...
@@ -604,8 +605,8 @@ export default {
let
specgoslenth
=
Object
.
keys
(
this
.
specs_goods
).
length
if
(
speclenth
==
specgoslenth
)
{
this
.
goshopping
=
true
var
assasa
=
[]
for
(
let
key
in
this
.
specs_goods
)
{
var
assasa
=
[]
for
(
let
key
in
this
.
specs_goods
)
{
console
.
log
(
key
+
'---'
+
this
.
specs_goods
[
key
])
assasa
.
push
(
this
.
specs_goods
[
key
].
toString
())
}
...
...
@@ -621,67 +622,66 @@ export default {
// console.log(JSON.stringify(localStorage).length)
this
.
loading
=
true
var
arrsow
=
[]
for
(
var
i
=
0
;
i
<
this
.
optionsmg
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
optionsmg
.
length
;
i
++
)
{
var
sa
=
this
.
optionsmg
[
i
].
spec_values
if
(
this
.
optionsmg
[
i
].
specs
)
{
if
(
this
.
optionsmg
[
i
].
specs
)
{
delete
this
.
optionsmg
[
i
].
specs
}
if
(
this
.
isContained
(
a
,
sa
))
{
debugger
if
(
this
.
isContained
(
a
,
sa
))
{
//
debugger
this
.
skupindex
=
i
this
.
optionsmg
[
i
][
'index'
]
=
i
this
.
optionsmg
[
i
][
'index'
]
=
i
arrsow
.
push
(
this
.
optionsmg
[
i
])
break
}
else
{
}
else
{
this
.
loadingbtn
=
false
}
}
console
.
log
(
arrsow
,
'jump'
)
if
(
arrsow
.
length
>
0
)
{
debugger
for
(
var
i
=
0
;
i
<
arrsow
.
length
;
i
++
)
{
console
.
log
(
arrsow
,
'jump'
)
if
(
arrsow
.
length
>
0
)
{
//
debugger
for
(
var
i
=
0
;
i
<
arrsow
.
length
;
i
++
)
{
this
.
goodsprice
=
this
.
optionsmg
[
arrsow
[
i
].
index
].
price
this
.
jdactivity_price
=
this
.
optionsmg
[
arrsow
[
i
].
index
].
js_price
this
.
scprice
=
this
.
optionsmg
[
arrsow
[
i
].
index
].
sc_price
this
.
stock
=
this
.
optionsmg
[
arrsow
[
i
].
index
].
stock
this
.
optionsmg
[
arrsow
[
i
].
index
][
'title'
]
=
this
.
goodsinfor
.
goods_name
this
.
optionsmg
[
arrsow
[
i
].
index
][
'img'
]
=
this
.
goodsinfor
.
cover
this
.
optionsmg
[
arrsow
[
i
].
index
][
'title'
]
=
this
.
goodsinfor
.
goods_name
this
.
optionsmg
[
arrsow
[
i
].
index
][
'img'
]
=
this
.
goodsinfor
.
cover
// this.optionsmg[i].specs = JSON.stringify(this.specsitem)
localStorage
.
removeItem
(
'optionlist'
)
// console.log(JSON.stringify(localStorage).length,'1')
// console.log(JSON.stringify(this.optionsmg[i]).length,'11')
debugger
localStorage
.
setItem
(
'optionlist'
,
JSON
.
stringify
(
this
.
optionsmg
[
arrsow
[
i
].
index
]))
//
debugger
localStorage
.
setItem
(
'optionlist'
,
JSON
.
stringify
(
this
.
optionsmg
[
arrsow
[
i
].
index
]))
// console.log(JSON.stringify(localStorage).length,'2')
this
.
optionsmg
[
arrsow
[
i
].
index
][
'good_numble'
]
=
this
.
good_numble
this
.
shopcartlist
=
this
.
optionsmg
[
arrsow
[
i
].
index
]
console
.
log
(
this
.
optionsmg
[
arrsow
[
i
].
index
])
this
.
jdthird_id
=
this
.
optionsmg
[
arrsow
[
i
].
index
].
third_id
this
.
skuids
=
this
.
optionsmg
[
arrsow
[
i
].
index
].
id
console
.
log
(
this
.
optionsmg
[
i
],
'最后'
)
console
.
log
(
this
.
optionsmg
[
i
],
'最后'
)
this
.
jdstatusd
=
1
// break
}
}
else
{
}
else
{
this
.
skuids
=
''
this
.
jdstatusd
=
18
}
var
that
=
this
setTimeout
(
function
()
{
setTimeout
(
function
()
{
that
.
loading
=
false
},
200
)
},
isContained
(
a1
,
a2
)
{
if
((
!
a1
&&
a2
)
||
(
a1
&&
!
a2
))
return
false
;
isContained
(
a1
,
a2
)
{
if
((
!
a1
&&
a2
)
||
(
a1
&&
!
a2
))
return
false
;
if
(
a1
.
length
!==
a2
.
length
)
return
false
;
a1
=
[].
concat
(
a1
);
a2
=
[].
concat
(
a2
);
...
...
@@ -700,335 +700,384 @@ export default {
//规格
}
}
}
</
script
>
<
style
scoped
>
/* // CSS样式为倒叙 */
.none
{
/* // CSS样式为倒叙 */
.none
{
display
:
none
;
}
.Magnifying_icon
{
}
.Magnifying_icon
{
color
:
#fff
;
line-height
:
65px
;
width
:
28px
;
text-align
:
center
;
}
.details_Magnifying_icon
{
}
.details_Magnifying_icon
{
height
:
65px
;
width
:
25px
;
background
:
rgba
(
127
,
127
,
127
,
0.9
);
background
:
rgba
(
127
,
127
,
127
,
0.9
);
position
:
absolute
;
opacity
:
0.3
;
top
:
10px
;
left
:
0
;
z-index
:
999
;
}
.details_Magnifying_icon
:hover
{
}
.details_Magnifying_icon
:hover
{
opacity
:
0.9
;
}
.details_Magnifying_icon2
{
}
.details_Magnifying_icon2
{
height
:
65px
;
width
:
25px
;
background
:
rgba
(
127
,
127
,
127
,
0.9
);
background
:
rgba
(
127
,
127
,
127
,
0.9
);
opacity
:
0.3
;
position
:
absolute
;
top
:
10px
;
right
:
0
;
z-index
:
999
;
}
.details_Magnifying_icon2
:hover
{
}
.details_Magnifying_icon2
:hover
{
opacity
:
0.9
;
}
.drawer_list_margin_have
{
}
.drawer_list_margin_have
{
padding-right
:
10px
;
}
.drawer_list_margin
{
}
.drawer_list_margin
{
padding-right
:
0
;
}
.details_Magnifying_img_active
{
}
.details_Magnifying_img_active
{
border
:
1px
solid
#e23f24
;
}
.details_Magnifying_img
:hover
{
}
.details_Magnifying_img
:hover
{
border
:
1px
solid
#e23f24
;
cursor
:
pointer
;
}
.details_Magnifying_img
{
}
.details_Magnifying_img
{
height
:
65px
;
width
:
100%
;
border
:
1px
solid
#fff
;
}
.details_Magnifying
{
}
.details_Magnifying
{
margin
:
10px
0px
;
width
:
100%
;
}
}
.details_Magnifying_content
{
.details_Magnifying_content
{
/* display: flex; */
position
:
relative
;
}
}
.scroll_text
{
.scroll_text
{
color
:
#fff
;
text-align
:
center
;
font-size
:
12px
;
}
.top
:hover
{
}
.top
:hover
{
background-color
:
#647dff
;
cursor
:
pointer
;
}
.top
{
}
.top
{
border-radius
:
4px
4px
;
background-color
:
#383838
;
width
:
40px
;
height
:
64px
;
text-align
:
center
;
}
}
.shoop_image
{
.shoop_image
{
width
:
100%
;
}
}
.shoop_goods_number
{
.shoop_goods_number
{
flex
:
33.33%
;
color
:
#666666
;
}
.shoop_goods
{
}
.shoop_goods
{
display
:
flex
;
padding
:
20px
20px
;
}
}
.shoop_text
{
.shoop_text
{
flex
:
10%
;
background-color
:
#e23f24
;
color
:
#fff
;
text-align
:
center
;
line-height
:
36px
;
}
.shoop_details_box
{
}
.shoop_details_box
{
height
:
36px
;
width
:
100%
;
border-bottom
:
solid
1px
#e23f24
;
/* background-color: #f2f2f2; */
}
}
.sku_text
{
.sku_text
{
text-align
:
center
;
flex
:
50%
;
font-size
:
14px
;
color
:
#666666
;
}
.shoop_sku_text
{
}
.shoop_sku_text
{
flex
:
35%
;
font-size
:
14px
;
color
:
#666666
;
border-right
:
1px
solid
#999
;
}
.shoop_sku
{
}
.shoop_sku
{
display
:
flex
;
position
:
relative
;
}
}
::v-deep
.el-input-number--medium
.el-input-number__increase
{
::v-deep
.el-input-number--medium
.el-input-number__increase
{
width
:
27px
;
height
:
26px
;
font-size
:
14px
;
}
::v-deep
.el-input-number--medium
{
}
::v-deep
.el-input-number--medium
{
width
:
120px
;
line-height
:
28px
;
overflow
:
hidden
;
}
::v-deep
.el-input-number--medium
.el-input-number__decrease
{
}
::v-deep
.el-input-number--medium
.el-input-number__decrease
{
width
:
27px
;
height
:
26px
;
font-size
:
14px
;
}
.shoop_number
{
}
.shoop_number
{
line-height
:
36px
;
margin-bottom
:
10px
;
}
}
::v-deep
.el-button
{
::v-deep
.el-button
{
/* //此处为el-input的样式修改 */
height
:
40px
!important
;
}
.shoop_button
{
}
.shoop_button
{
height
:
42px
;
font-size
:
16px
;
color
:
#ffffff
;
background
:
#e23f24
;
border-radius
:
4px
;
}
}
.specifications_icon
{
.specifications_icon
{
position
:
absolute
;
overflow
:
hidden
;
}
.specifications_icon_box
{
}
.specifications_icon_box
{
position
:
relative
;
margin-left
:
-16px
;
top
:
21px
;
left
:
-17px
;
}
.specifications_text
{
}
.specifications_text
{
line-height
:
36px
;
}
.test
{
background
:
url(../../../../assets/image/price.png)
no-repeat
;
}
.specifications_box_size
:hover
{
}
.test
{
background
:
url(../../../../assets/image/price.png)
no-repeat
;
}
.specifications_box_size
:hover
{
border
:
1px
solid
#e23f24
;
cursor
:
pointer
;
}
.specifications_box_size
{
}
.specifications_box_size
{
padding
:
5px
10px
;
display
:
inline-block
;
margin
:
0
12px
10px
;
border
:
1px
solid
#eeeeee
;
position
:
relative
;
}
.aactive
{
}
.aactive
{
border
:
1px
solid
#e23f24
;
}
.aactivs
{
}
.aactivs
{
border
:
1px
solid
#e23f24
;
}
.distributions_specifications_box
{
}
.distributions_specifications_box
{
/* // display: flex;/ */
margin
:
10px
0
;
/* // flex-wrap: wrap; */
/* // justify-content: space-between; */
}
.distributions_specifications
{
}
.distributions_specifications
{
margin
:
10px
0
;
}
}
.distributions_goods
{
.distributions_goods
{
/* // font-weight: 700; */
margin-right
:
16px
;
}
.distributions_have_goods
{
}
}
.distributions_delivery_box
{
.distributions_have_goods
{
}
}
.shoop_distributions_delivery
{
.distributions_delivery_box
{
}
.shoop_distributions_delivery
{
line-height
:
36px
;
}
.distributions_address
{
}
.distributions_address
{
/* // font-weight: 700; */
}
.shoop_distributions
{
}
.shoop_distributions
{
padding
:
10px
20px
;
}
}
.cumulative_text
{
.cumulative_text
{
margin-left
:
5px
;
}
.shoop_brand_evaluation_cumulative
{
}
.shoop_brand_evaluation_cumulative
{
flex
:
25%
;
font-size
:
14px
;
}
.evaluation_text
{
}
.evaluation_text
{
margin-left
:
5px
;
}
.evaluation_line
{
}
.evaluation_line
{
border-left
:
#dbdcdd
1px
solid
;
padding-left
:
20px
;
}
.shoop_brand_evaluation_text
{
}
.shoop_brand_evaluation_text
{
flex
:
25%
;
font-size
:
14px
;
}
.sell_text
{
}
.sell_text
{
font-size
:
14px
;
color
:
#e23f24
;
margin-left
:
5px
;
}
.shoop_brand_evaluation_sell
{
}
.shoop_brand_evaluation_sell
{
color
:
#333333
;
font-size
:
14px
;
flex
:
25%
;
}
.shoop_brand_evaluation
{
}
.shoop_brand_evaluation
{
display
:
flex
;
height
:
53px
;
padding
:
0
20px
;
line-height
:
53px
;
/* background-color: #f7f9fa; */
}
}
.shoop_brand_marketing_text
{
.shoop_brand_marketing_text
{
font-size
:
14px
;
}
.shoop_brand_price_marketing
{
}
.shoop_brand_price_marketing
{
font-size
:
14px
;
margin-right
:
10px
;
}
.shoop_brand_price_oldMoney
{
}
.shoop_brand_price_oldMoney
{
font-size
:
14px
;
text-decoration
:
line-through
;
margin-right
:
40px
;
}
.shoop_brand_price_money
{
}
.shoop_brand_price_money
{
font-weight
:
700
;
font-size
:
24px
;
margin-right
:
10px
;
}
.shoop_brand_price_text
{
}
.shoop_brand_price_text
{
font-size
:
14px
;
margin-right
:
25px
;
}
.shoop_brand_tutorial
{
}
.shoop_brand_tutorial
{
margin-bottom
:
20px
;
color
:
#333333
;
font-size
:
16px
;
font-weight
:
700
;
}
.test
{
}
}
.shoop_brand_price
{
.test
{
}
.shoop_brand_price
{
display
:
flex
;
height
:
54px
;
padding
:
0
20px
;
line-height
:
54px
;
color
:
#fff
;
}
.shoop_brand
{
}
.shoop_brand
{
margin
:
20px
20px
20px
0
;
width
:
100%
;
}
.shoop_details_Magnifying
{
}
.shoop_details_Magnifying
{
padding
:
20px
20px
;
flex
:
40%
;
}
.shoop_details
{
}
.shoop_details
{
display
:
flex
;
margin-top
:
10px
;
color
:
#666666
;
/* background-color: #fff; */
}
/
deep
/
.maxImgBox
{
width
:
455px
!important
;
height
:
455px
!important
;
}
/
deep
/
.el-input-group__append
{
}
/
deep
/
.maxImgBox
{
width
:
455px
!important
;
height
:
455px
!important
;
}
/
deep
/
.el-input-group__append
{
color
:
#fff
;
background-color
:
#647dff
;
border-color
:
#647dff
;
}
}
</
style
>
src/views/system/goodsimport/goodsgement.vue
浏览文件 @
3bba680a
...
...
@@ -217,11 +217,11 @@
/>
<!-- 商品编辑-->
<el-dialog
title=
"编辑商品"
:visible
.
sync=
"editisOpen"
v-if=
"editisOpen"
width=
"70%"
class=
"freightTemplate-add"
>
<editGood
:option=
"goodsid"
@
close
Indexbtn=
"closeDialog
"
></editGood>
<editGood
:option=
"goodsid"
@
close
EditDialog=
"closeEditGoods
"
></editGood>
</el-dialog>
<el-dialog
title=
"商品详情"
:visible
.
sync=
"isOpen"
center
v-if=
"isOpen"
width=
"70%"
class=
"freightTemplate-add"
:close-on-click-modal=
"false"
>
<goodDetail
:goods-id=
"goodDetails"
@
closeIndexbtn=
"closeDialog"
></goodDetail>
<goodDetail
:goods-id=
"goodDetails"
></goodDetail>
</el-dialog>
</el-card>
</div>
...
...
@@ -243,7 +243,7 @@
downsale_count
:
''
,
//仓库数量
onsale_count
:
''
,
//上架数量
del_count
:
''
,
//删除数量
radiomodel
:
'1'
,
radiomodel
:
1
,
formInline
:
{
page
:
1
,
limit
:
20
,
...
...
@@ -310,6 +310,8 @@
this
.
fullHeight
=
document
.
getElementsByClassName
(
'box-card'
)[
0
].
clientHeight
-
headerHeight
})
console
.
log
(
"come on"
);
},
watch
:
{
fullHeight
(
val
)
{
...
...
@@ -436,7 +438,7 @@
});
},
handleUpsale
(
row
,
status
,
isall
)
{
//上下架
debugger
//
debugger
let
good_id
,
is_onsale
,
title
,
message
if
(
isall
==
'one'
)
{
good_id
=
[
row
.
goods_id
]
...
...
@@ -516,8 +518,8 @@
}
this
.
getList
()
},
close
Dialog
(
val
)
{
this
.
isOpen
=
val
;
close
EditGoods
(
val
)
{
this
.
editisOpen
=
false
;
this
.
getList
();
},
//格式化状态
...
...
@@ -542,6 +544,7 @@
},
/** 查询freight列表 */
getList
()
{
//debugger
let
data
=
{
page
:
this
.
formInline
.
page
,
limit
:
this
.
formInline
.
limit
,
...
...
@@ -579,6 +582,9 @@
data
[
'price_min'
]
=
this
.
formInline
.
price_min
data
[
'price_max'
]
=
this
.
formInline
.
price_max
}
//console.log("查询list的参数:", data);
getlistGoods
(
data
).
then
(
res
=>
{
if
(
res
.
data
)
{
this
.
freightList
=
res
.
data
.
list
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论