Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
03f9b307
提交
03f9b307
authored
12月 22, 2020
作者:
潘鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
attributes
上级
321ae59a
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
116 行增加
和
40 行删除
+116
-40
attributes.html
...rm-admin/src/main/webapp/WEB-INF/page/sys/attributes.html
+2
-2
tbcfstationitem.html
...min/src/main/webapp/WEB-INF/page/sys/tbcfstationitem.html
+12
-12
attributes.js
platform-admin/src/main/webapp/js/sys/attributes.js
+10
-2
tbcfstationitem.js
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
+92
-24
没有找到文件。
platform-admin/src/main/webapp/WEB-INF/page/sys/attributes.html
浏览文件 @
03f9b307
...
...
@@ -75,8 +75,8 @@
<div
class=
"activityEdit"
>
<ul>
<li
v-for=
"(item,index) in attrDesc"
:key=
"index"
>
描述(英文)
<i-input
v-model=
"item.
C
"
style=
"width: 77px"
></i-input>
(中文)
<i-input
v-model=
"item.
E
"
style=
"width: 77px"
></i-input>
描述(英文)
<i-input
v-model=
"item.
E
"
style=
"width: 77px"
></i-input>
(中文)
<i-input
v-model=
"item.
C
"
style=
"width: 77px"
></i-input>
<!-- <i-input v-model="item" style="width: 77px"></i-input>-->
<span
@
click=
"delCondition(item)"
>
删除
</span>
</li>
...
...
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfstationitem.html
浏览文件 @
03f9b307
...
...
@@ -638,10 +638,10 @@
<i-input
v-model=
"tbCfStationItem.itemCode"
placeholder=
"商品编号"
/>
</Form-item>
<Form-item
label=
"商品名称"
prop=
"itemName"
style=
"width: 800px"
>
<i-input
v-model=
"tbCfStationItem.itemName"
placeholder=
"商品名字"
/>
<i-input
v-model=
"tbCfStationItem.itemName"
placeholder=
"商品名字"
@
on-change=
"verifyInput(1)"
/>
</Form-item>
<Form-item
label=
"商品标题"
prop=
"itemBrief"
style=
"width: 800px"
>
<i-input
v-model=
"tbCfStationItem.itemBrief"
placeholder=
"商品标题"
/>
<i-input
v-model=
"tbCfStationItem.itemBrief"
placeholder=
"商品标题"
@
on-change=
"verifyInput(2)"
/>
</Form-item>
<!-- <Form-item label="商品链接" prop="itemUrl">
<i-input v-model="tbCfStationItem.itemUrl" placeholder="商品链接"/>
...
...
@@ -1029,27 +1029,27 @@
<!-- <i-button style="margin-left:10px;" type="primary" @click='save'>保存</i-button>-->
</section>
</Card>
<Card
class=
"container"
style=
"margin-top:20px;width: 1
000
px"
>
<Card
class=
"container"
style=
"margin-top:20px;width: 1
535
px"
>
<section
class=
"form-wrapper"
>
<h4>
商品参数
</h4>
<transition-group
tag=
"ul"
name=
"slide"
>
<li
class=
"prev-li"
v-for=
"(item,index) in paramster
"
:key=
"index"
style=
"margin-bottom: 0;width: 415
px;float: left"
>
<li
class=
"prev-li"
v-for=
"(item,index) in paramster
s"
:key=
"index"
style=
"margin-top:40px;width: 700
px;float: left"
>
<div>
<!-- <i-input v-model="item.paramName" size="small" type="text" placeholder="参数名称"/>-->
<span
:style=
"`width:100px;line-height: 40px;text-align: center;height: 40px;`"
>
{{item.
param
Name}}
</span>
<span
:style=
"`width:100px;line-height: 40px;text-align: center;height: 40px;`"
>
{{item.
attr
Name}}
</span>
</div>
<!-- <div>--
>
<div
>
<!-- <i-input v-model="item.paramValue" size="small" type="text" placeholder="参数值"/>-->
<el-select
v-model=
"
value1"
multiple
placeholder=
"参数值"
:style=
"`width: 3
00px;`"
>
<el-select
v-model=
"
item.value"
multiple
filterable
placeholder=
"参数值"
:style=
"`width: 5
00px;`"
>
<el-option
v-for=
"
item in
options"
:key=
"
item.value
"
:label=
"
item.lab
el"
:value=
"
item.value
"
v-for=
"
el in item.
options"
:key=
"
el
"
:label=
"el"
:value=
"
el
"
>
</el-option>
</el-select>
<!-- </div>--
>
</div
>
<!-- <i-button class="prev-del paramster-del" type="warning" @click="delParamster(index)">删除-->
<!-- </i-button>-->
</li>
...
...
platform-admin/src/main/webapp/js/sys/attributes.js
浏览文件 @
03f9b307
...
...
@@ -139,9 +139,14 @@ let vm = new Vue({
let
arr
=
vm
.
attributes
.
attrDesc
.
split
(
","
)
vm
.
attrDesc
=
[]
arr
.
forEach
(
item
=>
{
console
.
log
(
item
.
indexOf
(
"("
))
let
obj
=
{}
obj
.
C
=
item
.
split
(
"("
)[
0
]
obj
.
E
=
item
.
split
(
"("
)[
1
].
split
(
")"
)[
0
]
if
(
item
.
indexOf
(
"("
)
!=-
1
){
obj
.
E
=
item
.
split
(
"("
)[
0
]
obj
.
C
=
item
.
split
(
"("
)[
1
].
split
(
")"
)[
0
]
}
else
{
obj
.
E
=
item
}
vm
.
attrDesc
.
push
(
obj
)
})
console
.
log
(
vm
.
attrDesc
)
...
...
@@ -152,6 +157,9 @@ let vm = new Vue({
if
(
item
.
E
&&
item
.
C
){
let
str
=
`
${
item
.
E
}
(
${
item
.
C
}
)`
arr
.
push
(
str
)
}
else
if
(
item
.
E
&&!
item
.
C
){
let
str
=
`
${
item
.
E
}
`
arr
.
push
(
str
)
}
})
// console.log(arr.join())
...
...
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
浏览文件 @
03f9b307
...
...
@@ -143,23 +143,24 @@ let vm = new Vue({
handleProductAttr_Batch
:
[],
//商品参数
options
:
[{
value
:
'选项1'
,
label
:
'黄金糕'
},
{
value
:
'选项2'
,
label
:
'双皮奶'
},
{
value
:
'选项3'
,
label
:
'蚵仔煎'
},
{
value
:
'选项4'
,
label
:
'龙须面'
},
{
value
:
'选项5'
,
label
:
'北京烤鸭'
}],
value1
:
[],
// options: [{
// value: '选项1',
// label: '黄金糕'
// }, {
// value: '选项2',
// label: '双皮奶'
// }, {
// value: '选项3',
// label: '蚵仔煎'
// }, {
// value: '选项4',
// label: '龙须面'
// }, {
// value: '选项5',
// label: '北京烤鸭'
// }],
// value1: [],
paramsters
:[]
},
methods
:
{
delSku
(
id
,
i
)
{
...
...
@@ -572,6 +573,7 @@ let vm = new Vue({
this
.
disabledChangeAttribute
=
false
;
// vm.tbCfStationItem.itemImg = "";
UE
.
getEditor
(
'itemDesc'
).
setContent
(
""
);
vm
.
getAttrName
();
},
update
:
function
(
event
)
{
window
.
sessionStorage
.
getItem
(
'_copy_product_info'
)
?
this
.
show_paste_btn
=
true
:
void
(
0
);
...
...
@@ -613,7 +615,19 @@ let vm = new Vue({
paramArr
.
push
(
item
)
})
vm
.
tbCfStationItem
.
paramster
=
this
.
paramster
;
// vm.tbCfStationItem.paramster = this.paramster;
// console.log(this.paramster)
// console.log(this.paramsters)
let
parArr
=
[]
this
.
paramsters
.
forEach
(
item
=>
{
if
(
item
.
value
.
length
!=
0
){
let
obj
=
{}
obj
.
paramName
=
item
.
attrName
obj
.
paramValue
=
item
.
value
.
join
();
parArr
.
push
(
obj
)
}
})
vm
.
tbCfStationItem
.
paramster
=
parArr
let
label
=
null
;
vm
.
tbCfStationItem
.
itemLabel
=
this
.
isSelectedArr
.
map
(
item
=>
item
.
id
).
join
(
','
);
vm
.
tbCfStationItem
.
prevItem
=
resArr
...
...
@@ -629,7 +643,10 @@ let vm = new Vue({
vm
.
tbCfStationItem
.
itemDesc
=
encodeURI
(
UE
.
getEditor
(
'itemDesc'
).
getContent
());
// 富文本取值
vm
.
tbCfStationItem
.
itemDesc
=
vm
.
tbCfStationItem
.
itemDesc
.
replace
(
/ /g
,
" "
);
vm
.
tbCfStationItem
.
skuImgs
=
vm
.
AttributeImgArr
.
map
(
item
=>
item
.
img_path
).
join
(
';'
);
vm
.
tbCfStationItem
.
itemName
=
vm
.
tbCfStationItem
.
itemName
.
trim
();
vm
.
tbCfStationItem
.
itemBrief
=
vm
.
tbCfStationItem
.
itemBrief
.
trim
();
let
url
=
vm
.
tbCfStationItem
.
itemId
==
null
?
"../tbcfstationitem/save"
:
"../tbcfstationitem/update"
;
console
.
log
(
vm
.
tbCfStationItem
,
_this
.
putaway
,
vm
.
prevItem
,
itemDesc
)
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfStationItem
),
...
...
@@ -795,7 +812,21 @@ let vm = new Vue({
}
});
console
.
log
(
"进入页面"
)
$
.
get
(
'../attributes/queryAttrInfo?itemId='
+
itemId
,
res
=>
{
console
.
log
(
JSON
.
parse
(
res
).
list
)
JSON
.
parse
(
res
).
list
.
forEach
(
item
=>
{
console
.
log
(
typeof
itemCobe
)
vm
.
paramsters
.
forEach
(
_item
=>
{
// console.log(item)
// console.log(_item)
if
(
item
.
paramName
==
_item
.
attrName
){
let
itemCobe
=
item
.
paramValue
_item
.
value
=
itemCobe
.
split
(
","
)
}
})
})
})
},
importExcel
:
function
()
{
this
.
modal
=
''
...
...
@@ -1216,7 +1247,44 @@ let vm = new Vue({
//商品参数
getAttrName
(){
$
.
get
(
'../attributes/queryAttrNames'
,
res
=>
{
let
Attr
=
JSON
.
parse
(
res
).
list
Attr
.
forEach
(
item
=>
{
$
.
get
(
'../attributes/queryAttrDescs?id='
+
item
.
id
,
_res
=>
{
item
.
options
=
JSON
.
parse
(
_res
).
list
item
.
value
=
[]
console
.
log
(
item
)
})
})
vm
.
paramsters
=
Attr
console
.
log
(
Attr
)
})
},
//限制输入
verifyInput
(
e
){
document
.
onkeyup
=
function
(){
// 合并两个空格为一个空格
String
.
prototype
.
ResetBlank
=
function
(){
let
regEx
=
/
\s{2,}
/g
;
return
this
.
replace
(
regEx
,
''
);
};
String
.
prototype
.
ResetBlank2
=
function
(){
let
regEx
=
/
[^\w
_
\s]
/g
;
return
this
.
replace
(
regEx
,
''
);
};
// var str = e;//获取文本框的值
// [^\w_]
if
(
e
==
1
){
vm
.
tbCfStationItem
.
itemName
=
vm
.
tbCfStationItem
.
itemName
.
ResetBlank
().
ResetBlank2
()
//trim()去除首尾空格
}
else
{
vm
.
tbCfStationItem
.
itemBrief
=
vm
.
tbCfStationItem
.
itemBrief
.
ResetBlank
().
ResetBlank2
()
}
//重置文本框
// tbCfStationItem.itemName = str.ResetBlank().trim()//trim()去除首尾空格
}
}
},
created
()
{
this
.
getTagsData
();
...
...
@@ -1229,14 +1297,14 @@ let vm = new Vue({
$
.
get
(
'../tbcfgoodstype/queryAll'
,
res
=>
{
this
.
Goodstype
=
res
.
list
;
})
$
.
get
(
'../tbcfexpresstemplate/queryAll'
,
res
=>
{
console
.
log
(
'国家'
,
JSON
.
parse
(
res
))
$
.
get
(
'../tbcfexpresstemplate/queryAll'
,
res
=>
{
//
console.log('国家', JSON.parse(res))
vm
.
templateList
=
JSON
.
parse
(
res
).
list
;
})
$
.
get
(
'../tbcfstationitem/queryCreator'
,
res
=>
{
$
.
get
(
'../tbcfstationitem/queryCreator'
,
res
=>
{
let
parse
=
JSON
.
parse
(
res
);
this
.
creatorList
=
parse
.
list
;
console
.
log
(
'用户'
,
this
.
creatorList
)
//
console.log('用户', this.creatorList)
})
//获取默认规格
$
.
get
(
'../tbcategorytemplate/queryAll'
,
res
=>
{
...
...
@@ -1246,7 +1314,7 @@ let vm = new Vue({
this
.
serverSkuAttr
.
push
(
item
.
categoryDesc
)
})
})
this
.
getAttrName
();
},
mounted
()
{
this
.
$nextTick
(()
=>
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论