Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_electricity
Project
Project
Details
Activity
Releases
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
zhengke
jz_electricity
Commits
7704eb25
Commit
7704eb25
authored
May 24, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
d1d32b00
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
151 additions
and
4 deletions
+151
-4
choiceDmc.vue
src/components/common/choiceDmc.vue
+138
-0
goods.vue
src/components/sallCenter/plugin/goods.vue
+13
-4
No files found.
src/components/common/choiceDmc.vue
0 → 100644
View file @
7704eb25
<
template
>
<div>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"酒店"
name=
"first"
>
酒店
</el-tab-pane>
<el-tab-pane
label=
"餐食"
name=
"second"
>
餐食
</el-tab-pane>
<el-tab-pane
label=
"门票"
name=
"third"
>
门票
</el-tab-pane>
</el-tabs>
<template>
</
template
>
<el-input
size=
"mini"
v-model=
"msg.Name"
placeholder=
"根据名称搜索"
:clearable=
"true"
@
clear=
"msg.pageIndex=1,getList()"
@
keyup
.
enter
.
native=
"msg.pageIndex=1,getList()"
>
<el-button
slot=
"append"
@
click=
"msg.pageIndex=1,getList()"
>
搜索
</el-button>
</el-input>
<el-table
ref=
"multipleTable"
:data=
"dataList"
tooltip-effect=
"dark"
height=
"450"
style=
"width: 100%"
@
selection-change=
"handleSelectionChange"
>
<
template
v-if=
"isSingle"
>
<el-table-column
width=
"50px"
label=
""
>
<template
slot-scope=
"scope"
>
<el-radio
v-model=
"scope.row.IsChecked"
@
change
.
native=
"getTemplateRow(scope.$index,scope.row)"
>
</el-radio>
</
template
>
</el-table-column>
</template>
<
template
v-else
>
<el-table-column
type=
"selection"
width=
"50px"
>
</el-table-column>
</
template
>
<el-table-column
label=
"ID"
width=
"80px"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
HotelId
}}
</
template
>
</el-table-column>
<!-- <el-table-column prop="CategoryList" label="分类" width="150px">
<template slot-scope="scope">
<div v-for="(subItem,SubIndex) in scope.row.CategoryList" :key="SubIndex">
{{subItem.CategoryName}}
</div>
</template>
</el-table-column> -->
<el-table-column
prop=
"HotelName"
label=
"名称"
>
<
template
slot-scope=
"scope"
>
<div
flex=
"cross:center dir:left"
>
<img
style=
"width:50px;height:50px;margin-right:10px;"
:src=
"scope.row.CoverImg"
/>
<div>
{{
scope
.
row
.
HotelName
}}
</div>
</div>
</
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"text-align:center"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
layout=
"prev, pager, next"
:total=
"total"
>
</el-pagination>
</div>
</template>
<
script
>
export
default
{
props
:
[
'ckGoods'
,
"isSingle"
,
"IsGetSpec"
],
data
()
{
return
{
dataList
:
[],
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
Name
:
''
,
GoodsStatus
:
1
,
//上架中
IsGetSpec
:
0
},
activeName
:
"first"
,
total
:
0
,
selectRow
:
[],
};
},
created
()
{
if
(
this
.
IsGetSpec
)
{
this
.
msg
.
IsGetSpec
=
this
.
IsGetSpec
;
}
},
methods
:
{
handleClick
()
{
},
//获取所有菜单
getList
()
{
this
.
apipost
(
"/api/Hotel/GetHotelPage"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
total
=
res
.
data
.
data
.
count
;
var
tempArray
=
res
.
data
.
data
.
pageData
;
if
(
tempArray
&&
tempArray
.
length
>
0
)
{
tempArray
.
forEach
(
item
=>
{
item
.
IsChecked
=
false
;
});
}
this
.
dataList
=
JSON
.
parse
(
JSON
.
stringify
(
tempArray
));
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
handleSelectionChange
(
val
)
{
this
.
selectRow
=
JSON
.
parse
(
JSON
.
stringify
(
val
));
},
getTemplateRow
(
index
,
row
)
{
this
.
selectRow
=
[];
if
(
this
.
dataList
&&
this
.
dataList
.
length
>
0
)
{
this
.
dataList
.
forEach
(
item
=>
{
if
(
item
.
Id
!=
row
.
Id
)
{
item
.
IsChecked
=
false
;
}
})
}
this
.
selectRow
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
row
)));
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
//父组件调用方法
getChoicedGoods
()
{
return
this
.
selectRow
;
},
//清空多选方法
toggleSelection
(
rows
)
{
if
(
rows
)
{
rows
.
forEach
(
row
=>
{
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
);
});
}
else
{
this
.
$refs
.
multipleTable
.
clearSelection
();
}
},
},
mounted
()
{
this
.
getList
();
}
};
</
script
>
src/components/sallCenter/plugin/goods.vue
View file @
7704eb25
...
...
@@ -598,15 +598,22 @@
<el-button
size=
"small"
type=
"danger"
@
click=
"getChoiceFenlei()"
>
确 定
</el-button>
</span>
</el-dialog>
<!-- 选择商品 -->
<el-dialog
title=
"选择商品"
:visible
.
sync=
"isShowGoods"
custom-class=
"goodsDialog"
>
<!-- 选择商品
:visible.sync="isShowGoods"
-->
<el-dialog
title=
"选择商品"
custom-class=
"goodsDialog"
>
<choiceGood
ref=
"choiceGood"
></choiceGood>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"isShowGoods=false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"danger"
@
click=
"getGoodsChoice()"
>
确 定
</el-button>
</span>
</el-dialog>
<!-- 选择地接资源 -->
<el-dialog
title=
"选择地接资源"
:visible
.
sync=
"isShowGoods"
custom-class=
"goodsDialog"
>
<choiceDmc
ref=
"choiceDmc"
></choiceDmc>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"isShowGoods=false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"danger"
@
click=
"getGoodsChoice()"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
...
...
@@ -614,6 +621,7 @@
import
ChooseImg
from
"@/components/global/ChooseImg.vue"
;
import
ChooseFenlei
from
"../../common/choiceFenlei.vue"
;
import
choiceGood
from
"../../common/choiceGood.vue"
;
import
choiceDmc
from
"../../common/choiceDmc.vue"
;
export
default
{
props
:
[
"goodData"
,
"index"
,
"dataLeng"
],
...
...
@@ -621,7 +629,8 @@
draggable
,
ChooseImg
,
ChooseFenlei
,
choiceGood
choiceGood
,
choiceDmc
},
data
()
{
return
{
...
...
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