Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
6d92ac8c
Commit
6d92ac8c
authored
Aug 10, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
edca8e54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
215 additions
and
26 deletions
+215
-26
HotelWorkList.vue
src/components/Hotel/HotelWorkList.vue
+207
-18
commonHotelWork.vue
src/components/commonPage/commonHotelWork.vue
+8
-8
No files found.
src/components/Hotel/HotelWorkList.vue
View file @
6d92ac8c
...
...
@@ -35,34 +35,168 @@
<div
style=
"background-color:#000!important;width:50px;height:100%;margin:0,padding:0;color:#FFFFFF"
>
无库存
</div>
</
template
>
<
template
v-else
>
<
template
v-else
>
<template
v-if=
"scope.row.DayList[index].HotelJourneyOrderList&&scope.row.DayList[index].HotelJourneyOrderList.length>0"
>
<template
v-for=
"(childItem,childIndex) in scope.row.DayList[index].HotelJourneyOrderList"
>
<template
v-for=
"(childItem,childIndex) in scope.row.DayList[index].HotelJourneyOrderList"
>
<el-popover
width=
"760"
trigger=
"click"
popper-class=
"Bus_HotelPop"
>
<!--
<commonHotelWork
:ref=
"'commonHotelWork_'+scope.$index+'_'+index+'_'+childIndex+''"
:TCID=
"childItem.TCID"
:HotelId=
"scope.row.Hotel"
:DateStr=
"item.DateAllStr"
>
</commonHotelWork
style="display:none;"
>
-->
<table
v-loading=
"changeLoading"
>
<tr>
<th
width=
"60"
style=
"text-align:center;"
>
选择
</th>
<th
width=
"145"
style=
"text-align:center;"
>
团号
</th>
<th
width=
"140"
style=
"text-align:center;"
>
地接团号
</th>
<th
width=
"120"
style=
"text-align:center;"
>
酒店
</th>
<th
width=
"120"
style=
"text-align:center;"
>
更换酒店
</th>
<th
width=
"100"
style=
"text-align:center;"
>
OP状态
</th>
<th
width=
"100"
style=
"text-align:center;"
>
地接状态
</th>
</tr>
<tr
v-for=
"(hItem,hIndex) in MyDataList"
>
<td
style=
"text-align:center;"
>
<el-checkbox
:checked=
"hItem.IsChecked"
@
change=
"ChangeStatus(hItem)"
></el-checkbox>
</td>
<td
style=
"text-align:center;"
>
{{
hItem
.
TCNUM
}}
<br
/>
(
{{
hItem
.
TCID
}}
)
</td>
<td
style=
"text-align:center;"
>
{{
hItem
.
DMCNum
}}
</td>
<td
style=
"text-align:left;"
>
{{
hItem
.
OldHotelName
}}
</td>
<td
style=
"text-align:left;"
>
{{
hItem
.
NewHotelName
}}
</td>
<td
style=
"text-align:center;"
>
<template
v-if=
"hItem.OPState==1"
>
<a
style=
"color:green"
>
OP-指定
</a>
</
template
>
<
template
v-else-if=
"hItem.OPState==2"
>
<a
style=
"color:red"
>
OP-暂定
</a>
</
template
>
</td>
<td
style=
"text-align:center;"
>
<
template
v-if=
"hItem.DMCState==1"
>
<a
style=
"color:green"
>
地接-OK
</a>
</
template
>
<
template
v-else-if=
"hItem.DMCState==2"
>
<a
style=
"color:red"
>
地接-暂定
</a>
</
template
>
<
template
v-else-if=
"hItem.DMCState==0"
>
<a
style=
"color:red"
>
地接-未操作
</a>
</
template
>
</td>
</tr>
<tfoot>
<tr>
<td
colspan=
"6"
style=
"text-align:center;"
>
<input
type=
"button"
class=
"normalBtn"
value=
"保存"
@
click=
"SaveHotelOrder(scope.row.Hotel)"
/>
</td>
</tr>
</tfoot>
</table>
<div
:title=
"childItem.TCID+'【未操作】'"
v-if=
"childItem.DMCState==0"
slot=
"reference"
class=
"w80"
style=
"white-space:nowrap;color:red;cursor:pointer;text-decoration:underline;"
@
click=
"
ClickChild(item.DateAllStr,scope.$index,index,childIndex
)"
>
@
click=
"
GetChangeHotelList(item.DateAllStr,childItem.TCID
)"
>
{{childItem.BookGroup}}
</div>
<div
:title=
"childItem.TCID+'【OK】'"
v-if=
"childItem.DMCState==1"
slot=
"reference"
class=
"w80"
style=
"white-space:nowrap;color:green;cursor:pointer;text-decoration:underline;"
@
click=
"
ClickChild(item.DateAllStr,scope.$index,index,childIndex
)"
>
{{
childItem
.
BookGroup
}}
</div>
@
click=
"
GetChangeHotelList(item.DateAllStr,childItem.TCID
)"
>
{{childItem.BookGroup}}
</div>
<div
:title=
"childItem.TCID+'【暂定】'"
v-if=
"childItem.DMCState==2"
slot=
"reference"
class=
"w80"
style=
"white-space:nowrap;color:#3333CC;;cursor:pointer;text-decoration:underline;"
@
click=
"
ClickChild(item.DateAllStr,scope.$index,index,childIndex
)"
>
@
click=
"
GetChangeHotelList(item.DateAllStr,childItem.TCID
)"
>
{{childItem.BookGroup}}
</div>
</el-popover>
</template>
</template>
<
template
v-else
>
<el-popover
width=
"760"
trigger=
"click"
popper-class=
"Bus_HotelPop"
style=
"display:none;"
>
<commonHotelWork
:ref=
"'commonHotelWork_'+scope.$index+'_'+index+'_no'"
:TCID=
"0"
:HotelId=
"scope.row.Hotel"
:DateStr=
"item.DateAllStr"
>
</commonHotelWork>
<el-popover
width=
"760"
trigger=
"click"
popper-class=
"Bus_HotelPop"
>
<table
v-loading=
"changeLoading"
>
<tr>
<th
width=
"60"
style=
"text-align:center;"
>
选择
</th>
<th
width=
"145"
style=
"text-align:center;"
>
团号
</th>
<th
width=
"140"
style=
"text-align:center;"
>
地接团号
</th>
<th
width=
"120"
style=
"text-align:center;"
>
酒店
</th>
<th
width=
"120"
style=
"text-align:center;"
>
更换酒店
</th>
<th
width=
"100"
style=
"text-align:center;"
>
OP状态
</th>
<th
width=
"100"
style=
"text-align:center;"
>
地接状态
</th>
</tr>
<tr
v-for=
"(hItem,hIndex) in MyDataList"
>
<td
style=
"text-align:center;"
>
<el-checkbox
:checked=
"hItem.IsChecked"
@
change=
"ChangeStatus(hItem)"
></el-checkbox>
</td>
<td
style=
"text-align:center;"
>
{{
hItem
.
TCNUM
}}
<br
/>
(
{{
hItem
.
TCID
}}
)
</td>
<td
style=
"text-align:center;"
>
{{
hItem
.
DMCNum
}}
</td>
<td
style=
"text-align:left;"
>
{{
hItem
.
OldHotelName
}}
</td>
<td
style=
"text-align:left;"
>
{{
hItem
.
NewHotelName
}}
</td>
<td
style=
"text-align:center;"
>
<template
v-if=
"hItem.OPState==1"
>
<a
style=
"color:green"
>
OP-指定
</a>
</
template
>
<
template
v-else-if=
"hItem.OPState==2"
>
<a
style=
"color:red"
>
OP-暂定
</a>
</
template
>
</td>
<td
style=
"text-align:center;"
>
<
template
v-if=
"hItem.DMCState==1"
>
<a
style=
"color:green"
>
地接-OK
</a>
</
template
>
<
template
v-else-if=
"hItem.DMCState==2"
>
<a
style=
"color:red"
>
地接-暂定
</a>
</
template
>
<
template
v-else-if=
"hItem.DMCState==0"
>
<a
style=
"color:red"
>
地接-未操作
</a>
</
template
>
</td>
</tr>
<tfoot>
<tr>
<td
colspan=
"6"
style=
"text-align:center;"
>
<input
type=
"button"
class=
"normalBtn"
value=
"保存"
@
click=
"SaveHotelOrder(scope.row.Hotel)"
/>
</td>
</tr>
</tfoot>
</table>
<div
slot=
"reference"
class=
"w80"
style=
"cursor:pointer;text-decoration:underline;"
@
click=
"ClickChild(item.DateAllStr,scope.$index,index,'no')"
>
设置酒店
</div>
@
click=
"GetChangeHotelList(item.DateAllStr,0)"
>
设置酒店
</div>
</el-popover>
</template>
</template>
...
...
@@ -91,18 +225,13 @@
loading
:
false
,
isShow
:
false
,
changeLoading
:
false
,
//改变酒店loading
ChangeHotel
List
:
[],
//获取可变更的酒店列表
MyData
List
:
[],
//获取可变更的酒店列表
};
},
components
:
{
commonHotelWork
},
methods
:
{
//调用子组件方法
ClickChild
(
DateAllStr
,
rootIndex
,
index
,
childIndex
)
{
let
str
=
`commonHotelWork_
${
rootIndex
}
_
${
index
}
_
${
childIndex
}
`
;
this
.
$refs
[
str
][
0
].
GetChangeHotelList
();
},
GotoHotel
(
HotelId
)
{
this
.
$router
.
push
({
path
:
"HotelManagement"
,
...
...
@@ -113,8 +242,68 @@
}
});
},
ChangeStatus
(
item
)
{
item
.
IsChecked
=
!
item
.
IsChecked
;
},
//获取可以改变的酒店列表
GetChangeHotelList
(
DateStr
,
TCID
)
{
this
.
changeLoading
=
true
;
this
.
MyDataList
=
[];
var
that
=
this
;
this
.
apipost
(
"journeyorder_post_GetCanChangeHotelListService"
,
{
UseTime
:
DateStr
},
res
=>
{
that
.
changeLoading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
var
nArray
=
res
.
data
.
data
;
nArray
.
forEach
(
item
=>
{
if
(
item
.
TCID
==
TCID
)
{
item
.
IsChecked
=
true
;
}
});
that
.
MyDataList
=
nArray
;
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
},
//保存酒店订单
SaveHotelOrder
(
HotelId
)
{
var
that
=
this
;
this
.
Confirm
(
"是否要替换选中的酒店?"
,
function
()
{
var
newList
=
[];
if
(
that
.
MyDataList
&&
that
.
MyDataList
.
length
>
0
)
{
that
.
MyDataList
.
forEach
(
item
=>
{
if
(
item
.
IsChecked
)
{
var
Nitem
=
JSON
.
parse
(
JSON
.
stringify
(
item
));
Nitem
.
NewHotelID
=
HotelId
;
newList
.
push
(
Nitem
);
}
});
}
if
(
newList
&&
newList
.
length
>
0
)
{
that
.
apipost
(
"journeyorder_post_SaveWorkHotelOrderService"
,
newList
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getList
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
}
else
{
that
.
Info
(
"请选择团期!"
);
}
});
},
getList
()
{
this
.
loading
=
true
;
this
.
isShow
=
false
;
this
.
dataList
=
[];
if
(
this
.
msg
.
YearMonthStr
==
""
)
{
this
.
msg
.
YearMonthStr
=
new
Date
().
Format
(
"yyyy-MM"
);
...
...
src/components/commonPage/commonHotelWork.vue
View file @
6d92ac8c
...
...
@@ -72,7 +72,7 @@
</template>
<
script
>
export
default
{
props
:
[
"TCID"
,
"HotelId"
,
"DateStr"
],
props
:
[
"TCID"
,
"HotelId"
,
"DateStr"
],
data
()
{
return
{
changeLoading
:
false
,
...
...
@@ -86,16 +86,16 @@
//获取可以改变的酒店列表
GetChangeHotelList
()
{
this
.
changeLoading
=
true
;
this
.
MyDataList
=
[];
var
that
=
this
;
this
.
MyDataList
=
[];
var
that
=
this
;
this
.
apipost
(
"journeyorder_post_GetCanChangeHotelListService"
,
{
UseTime
:
this
.
DateStr
},
res
=>
{
that
.
changeLoading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
MyDataList
=
res
.
data
.
data
;
console
.
log
(
"that.MyDataList"
,
that
.
MyDataList
)
that
.
MyDataList
=
res
.
data
.
data
;
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
...
...
@@ -136,10 +136,10 @@
}
},
mounted
()
{
//this.GetChangeHotelList();
},
created
(){
created
()
{
}
};
...
...
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