Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
marketing-web
marketing
Commits
35fd4573
Commit
35fd4573
authored
May 21, 2019
by
chenxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修改bug:卡券适用商品需要置空;复制卡券,微盟适用商品无法修改参数和参数值
parent
8bfe3123
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
20 deletions
+75
-20
index.html
dist/index.html
+2
-2
main.98d3b3cee676531dcd9e.js
dist/static/js/main.98d3b3cee676531dcd9e.js
+0
-0
form.js
src/views/card/form.js
+52
-0
form.vue
src/views/card/form.vue
+21
-18
No files found.
dist/index.html
View file @
35fd4573
<!DOCTYPE html>
<html><head><meta
charset=
utf-8
><meta
name=
viewport
content=
"width=device-width,initial-scale=1"
><link
rel=
"shortcut icon"
href=
./static/img/favicon.ico
><title>
GIC后台
</title><link
rel=
stylesheet
type=
text/css
href=
static/css/iconfont.css
><link
rel=
stylesheet
type=
text/css
href=
static/css/common.css
><link
href=
/marketing/static/css/main.713444cdaef9806a882f97b885f25ac1.css
rel=
stylesheet
></head><body><div
id=
app
></div><script
src=
//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js
></script><script
src=
//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js
></script><script
src=
//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js
></script><script
src=
//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/header.2.0.20.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/card.2.0.02.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/store.2.0.01.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/member-group.2.0.01.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/store-card.2.0.02.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/people.2.0.15.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/input.2.0.00.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js
></script><script
type=
text/javascript
src=
/marketing/static/js/manifest.0a85049e489e85ac5f0a.js
></script><script
type=
text/javascript
src=
/marketing/static/js/vendor.a8993e30b96d0f8d08ca.js
></script><script
type=
text/javascript
src=
/marketing/static/js/main.178556604cdf68fdeb87.js
></script></body></html>
\ No newline at end of file
<!DOCTYPE html>
<html><head><meta
charset=
utf-8
><meta
name=
viewport
content=
"width=device-width,initial-scale=1"
><link
rel=
"shortcut icon"
href=
./static/img/favicon.ico
><title>
GIC后台
</title><link
rel=
stylesheet
type=
text/css
href=
static/css/iconfont.css
><link
rel=
stylesheet
type=
text/css
href=
static/css/common.css
><link
href=
/marketing/static/css/main.713444cdaef9806a882f97b885f25ac1.css
rel=
stylesheet
></head><body><div
id=
app
></div><script
src=
//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js
></script><script
src=
//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js
></script><script
src=
//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js
></script><script
src=
//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/header.2.0.20.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/card.2.0.02.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/store.2.0.01.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/member-group.2.0.01.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/store-card.2.0.02.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/people.2.0.15.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/input.2.0.00.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js
></script><script
type=
text/javascript
src=
/marketing/static/js/manifest.0a85049e489e85ac5f0a.js
></script><script
type=
text/javascript
src=
/marketing/static/js/vendor.a8993e30b96d0f8d08ca.js
></script><script
type=
text/javascript
src=
/marketing/static/js/main.98d3b3cee676531dcd9e.js
></script></body></html>
\ No newline at end of file
dist/static/js/main.
178556604cdf68fdeb87
.js
→
dist/static/js/main.
98d3b3cee676531dcd9e
.js
View file @
35fd4573
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/views/card/form.js
View file @
35fd4573
...
...
@@ -96,6 +96,7 @@ export default {
discountAmountCheck
:
true
,
// ----微盟适用商品----
f1
:
[],
// 一层的list
wmloading
:
false
,
goodsList
:
[
{
v1
:
''
,
// id
...
...
@@ -182,6 +183,7 @@ export default {
this
.
$nextTick
(
_
=>
{
this
.
$refs
.
storeCard
.
initLeftList
();
});
this
.
goodsList
=
[{
v1
:
''
,
f2
:
[],
v2
:
''
,
f3
:
[],
v3
:
[],
list
:
[]
}];
// 新增情况下,如果配置了线下门店,默认选中线下门店
if
(
this
.
isAdd
&&
this
.
cardApplyChannelOptions
.
some
(
v
=>
v
.
value
===
'offlineStore'
))
{
this
.
form
.
cardApplyChannel
=
[
'offlineStore'
];
...
...
@@ -671,17 +673,61 @@ export default {
},
// 增加一行
addLine
()
{
if
(
this
.
wmloading
)
{
return
;
}
this
.
goodsList
.
push
({
v1
:
''
,
f2
:
[],
v2
:
''
,
f3
:
[],
v3
:
[],
list
:
[]
});
},
// 删除一行
delLine
(
idx
)
{
if
(
this
.
wmloading
)
{
return
;
}
this
.
goodsList
.
splice
(
idx
,
1
);
if
(
this
.
goodsList
.
length
===
0
)
{
this
.
goodsList
.
push
({
v1
:
''
,
f2
:
[],
v2
:
''
,
f3
:
[],
v3
:
[],
list
:
[]
});
}
},
// 获取isCopy状态下的一行数据
async
getLine
(
idx
)
{
if
(
this
.
wmloading
)
{
return
;
}
// 锁定不允许增加删除行影响index
this
.
wmloading
=
true
;
// 获取第二层数据
const
res_f2
=
await
getPropertyList
({
requestProject
:
this
.
requestProject
,
categoryId
:
this
.
goodsList
[
idx
].
v1
});
this
.
goodsList
[
idx
].
f2
=
res_f2
.
result
.
map
(
v
=>
{
return
{
title
:
v
.
propertyName
,
id
:
v
.
propertyId
,
outPropertyId
:
v
.
outPropertyId
};
});
// 获取第三层数据
const
res_f3
=
await
getPropertyValueList
({
requestProject
:
this
.
requestProject
,
propertyId
:
this
.
goodsList
[
idx
].
v2
});
this
.
goodsList
[
idx
].
f3
=
res_f3
.
result
.
map
(
v
=>
{
return
{
title
:
v
.
valueName
,
id
:
v
.
valueId
,
outValueId
:
v
.
outValueId
};
});
// 去除isCopy,loading
this
.
wmloading
=
false
;
this
.
goodsList
[
idx
].
isCopy
=
undefined
;
},
// 第一层改变 获取第二层数据
handleF1Change
(
v
,
idx
)
{
if
(
this
.
wmloading
)
{
return
;
}
// 把isCopy属性去除
if
(
this
.
isCopy
&&
this
.
goodsList
[
idx
].
isCopy
)
{
this
.
goodsList
[
idx
].
isCopy
=
undefined
;
...
...
@@ -711,6 +757,9 @@ export default {
},
// 第二层改变 获取第三层数据
handleF2Change
(
v
,
idx
)
{
if
(
this
.
wmloading
)
{
return
;
}
this
.
goodsList
[
idx
].
v3
=
[];
this
.
goodsList
[
idx
].
f3
=
[];
this
.
goodsList
[
idx
].
v3name
=
[];
...
...
@@ -734,6 +783,9 @@ export default {
},
// 校验&&组合数据
handleCombine
()
{
if
(
this
.
wmloading
)
{
return
;
}
return
new
Promise
((
resolve
,
reject
)
=>
{
let
arr_f2
=
[];
console
.
log
(
this
.
goodsList
);
...
...
src/views/card/form.vue
View file @
35fd4573
...
...
@@ -52,24 +52,27 @@
<div
class=
"mb10"
v-show=
"form.cardType !== 2"
><span
class=
"inline-block w110 text-right"
>
适用商品
</span>
<dm-input
@
focus=
"goods.flag = true"
v-model=
"goods.ok"
:disabled=
"isEdit || isInfo"
class=
"w300"
placeholder=
"限制18个汉字内"
:maxlength=
"18"
></dm-input></div>
<div
v-show=
"form.cardType !== 2"
class=
"mb10"
><span
class=
"inline-block w110 text-right"
>
不适用商品
</span>
<dm-input
@
focus=
"goods.flag = true"
v-model=
"goods.no"
:disabled=
"isEdit || isInfo"
class=
"w300"
placeholder=
"限制18个汉字内"
:maxlength=
"18"
></dm-input></div>
<!-- 微盟适用商品 -->
<div
v-if=
"(form.cardType === 0 || form.cardType === 1) && form.cardApplyChannel.indexOf('WMmicroMall') !== -1"
>
<div
v-for=
"(list, idx) in goodsList"
:key=
"idx"
class=
"mb10"
id=
"wnsysp"
>
<span
class=
"inline-block w110 text-right"
>
微盟适用商品
<span
v-show=
"goodsList.length !== 1"
>
{{
idx
+
1
}}
</span>
</span>
<el-select
:disabled=
"isEdit"
class=
"w250"
v-model=
"list.v1"
filterable
placeholder=
" 选择商品类目"
clearable
:loading=
"loading"
@
change=
"handleF1Change($event, idx)"
>
<el-option
v-for=
"item in f1"
:key=
"item.id"
:label=
"item.title"
:value=
"item.id"
></el-option>
</el-select>
<el-select
v-show=
"list.f2.length > 0"
:disabled=
"isEdit || list.isCopy"
class=
"w250"
v-model=
"list.v2"
filterable
remote
reserve-keyword
placeholder=
"选择商品参数"
clearable
:loading=
"loading"
@
change=
"handleF2Change($event, idx)"
>
<el-option
v-for=
"item in list.f2"
:key=
"item.id"
:label=
"item.title"
:value=
"item.id"
></el-option>
</el-select>
<el-select
v-if=
"list.f3.length > 0"
:disabled=
"isEdit || list.isCopy"
class=
"w250"
v-model=
"list.v3"
multiple
filterable
remote
reserve-keyword
placeholder=
"选择商品参数值"
clearable
:loading=
"loading"
>
<el-option
v-for=
"item in list.f3"
:key=
"item.id"
:label=
"item.title"
:value=
"item.id"
></el-option>
</el-select>
<div
v-if=
"isAdd || isCopy"
class=
"inline-block"
>
<el-button
v-show=
"idx === goodsList.length - 1 && goodsList.length
<
10
"
type=
"primary"
icon=
"el-icon-plus"
circle
@
click=
"addLine"
></el-button>
<el-button
icon=
"el-icon-delete"
circle
@
click=
"delLine(idx)"
></el-button>
<div
v-loading=
"wmloading"
element-loading-spinner=
"el-icon-loading"
element-loading-background=
"rgba(255, 255, 255, 0)"
>
<div
v-if=
"(form.cardType === 0 || form.cardType === 1) && form.cardApplyChannel.indexOf('WMmicroMall') !== -1"
>
<div
v-for=
"(list, idx) in goodsList"
:key=
"idx"
class=
"mb10"
id=
"wnsysp"
>
<span
class=
"inline-block w110 text-right"
>
微盟适用商品
<span
v-show=
"goodsList.length !== 1"
>
{{
idx
+
1
}}
</span>
</span>
<el-select
:disabled=
"isEdit"
class=
"w200"
v-model=
"list.v1"
filterable
placeholder=
" 选择商品类目"
clearable
:loading=
"loading"
@
change=
"handleF1Change($event, idx)"
>
<el-option
v-for=
"item in f1"
:key=
"item.id"
:label=
"item.title"
:value=
"item.id"
></el-option>
</el-select>
<el-select
v-show=
"list.f2.length > 0"
:disabled=
"isEdit || list.isCopy"
class=
"w200"
v-model=
"list.v2"
filterable
remote
reserve-keyword
placeholder=
"选择商品参数"
clearable
:loading=
"loading"
@
change=
"handleF2Change($event, idx)"
>
<el-option
v-for=
"item in list.f2"
:key=
"item.id"
:label=
"item.title"
:value=
"item.id"
></el-option>
</el-select>
<el-select
v-if=
"list.f3.length > 0"
:disabled=
"isEdit || list.isCopy"
class=
"w250"
v-model=
"list.v3"
multiple
filterable
remote
reserve-keyword
placeholder=
"选择商品参数值"
clearable
:loading=
"loading"
>
<el-option
v-for=
"item in list.f3"
:key=
"item.id"
:label=
"item.title"
:value=
"item.id"
></el-option>
</el-select>
<div
v-if=
"isAdd || isCopy"
class=
"inline-block"
>
<el-button
v-if=
"list.isCopy"
type=
"warning"
icon=
"el-icon-edit"
circle
@
click=
"getLine(idx)"
></el-button>
<el-button
v-show=
"idx === goodsList.length - 1 && goodsList.length
<
10
"
type=
"primary"
icon=
"el-icon-plus"
circle
@
click=
"addLine"
></el-button>
<el-button
icon=
"el-icon-delete"
circle
@
click=
"delLine(idx)"
></el-button>
</div>
</div>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment