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
885ee5e6
Commit
885ee5e6
authored
Aug 10, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
8c5bf8d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
176 additions
and
124 deletions
+176
-124
HotelWorkList.vue
src/components/Hotel/HotelWorkList.vue
+30
-124
commonHotelWork.vue
src/components/commonPage/commonHotelWork.vue
+146
-0
No files found.
src/components/Hotel/HotelWorkList.vue
View file @
885ee5e6
...
...
@@ -35,86 +35,34 @@
<div
style=
"background-color:#000!important;width:50px;height:100%;margin:0,padding:0;color:#FFFFFF"
>
无库存
</div>
</
template
>
<
template
v-else
>
<
template
v-else
style=
"display:none;"
>
<template
v-if=
"scope.row.DayList[index].HotelJourneyOrderList&&scope.row.DayList[index].HotelJourneyOrderList.length>0"
>
<template
v-for=
"childItem in scope.row.DayList[index].HotelJourneyOrderList"
>
<div
style=
"white-space:nowrap;color:red;"
:title=
"childItem.TCID+'【未操作】'"
v-if=
"childItem.DMCState==0"
>
{{
childItem
.
BookGroup
}}
</div>
<div
style=
"white-space:nowrap;color:green;"
:title=
"childItem.TCID+'【OK】'"
v-if=
"childItem.DMCState==1"
>
{{
childItem
.
BookGroup
}}
</div>
<div
style=
"white-space:nowrap;color:#3333CC;"
:title=
"childItem.TCID+'【暂定】'"
v-if=
"childItem.DMCState==2"
>
{{
childItem
.
BookGroup
}}
</div>
<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>
<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)"
>
{{
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>
<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)"
>
{{
childItem
.
BookGroup
}}
</div>
</el-popover>
</
template
>
</template>
<
template
v-else
>
<el-popover
width=
"650"
trigger=
"click"
popper-class=
"Bus_HotelPop"
>
<table
v-loading=
"changeLoading"
>
<tr>
<th
width=
"60"
>
选择
</th>
<th
width=
"140"
>
团号
</th>
<th
width=
"120"
>
酒店
</th>
<th
width=
"120"
>
更换酒店
</th>
<th
width=
"100"
>
OP状态
</th>
<th
width=
"100"
>
地接状态
</th>
</tr>
<tr
v-for=
"(hItem,hIndex) in ChangeHotelList"
>
<td>
<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:left;"
>
{{
hItem
.
OldHotelName
}}
</td>
<td
style=
"text-align:left;"
>
{{
hItem
.
NewHotelName
}}
</td>
<td>
<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>
<
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"
>
<input
type=
"button"
class=
"normalBtn"
value=
"保存"
@
click=
"SaveHotelOrder(scope.row.Hotel)"
/>
</td>
</tr>
</tfoot>
</table>
<el-popover
width=
"760"
trigger=
"click"
popper-class=
"Bus_HotelPop"
>
<commonHotelWork
:ref=
"'commonHotelWork_'+scope.$index+'_'+index+'_no'"
:TCID=
"0"
:HotelId=
"scope.row.Hotel"
:DateStr=
"item.DateAllStr"
>
</commonHotelWork>
<div
slot=
"reference"
class=
"w80"
style=
"cursor:pointer;text-decoration:underline;"
@
click=
"
GetChangeList(item.DateAllStr
)"
>
设置酒店
</div>
@
click=
"
ClickChild(item.DateAllStr,scope.$index,index,'no'
)"
>
设置酒店
</div>
</el-popover>
</
template
>
</template>
...
...
@@ -129,6 +77,7 @@
</div>
</template>
<
script
>
import
commonHotelWork
from
"../commonPage/commonHotelWork.vue"
;
export
default
{
data
()
{
return
{
...
...
@@ -145,9 +94,14 @@
ChangeHotelList
:
[],
//获取可变更的酒店列表
};
},
components
:
{
commonHotelWork
},
methods
:
{
ChangeStatus
(
item
)
{
item
.
IsChecked
=
!
item
.
IsChecked
;
//调用子组件方法
ClickChild
(
DateAllStr
,
rootIndex
,
index
,
childIndex
)
{
let
str
=
`commonHotelWork_
${
rootIndex
}
_
${
index
}
_
${
childIndex
}
`
;
this
.
$refs
[
str
][
0
].
GetChangeHotelList
();
},
GotoHotel
(
HotelId
)
{
this
.
$router
.
push
({
...
...
@@ -178,54 +132,6 @@
err
=>
{}
);
},
//获取可以改变的酒店列表
GetChangeList
(
useTime
)
{
this
.
changeLoading
=
true
;
this
.
ChangeHotelList
=
[];
this
.
apipost
(
"journeyorder_post_GetCanChangeHotelListService"
,
{
UseTime
:
useTime
},
res
=>
{
this
.
changeLoading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
ChangeHotelList
=
res
.
data
.
data
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
},
//保存酒店订单
SaveHotelOrder
(
HotelID
)
{
var
that
=
this
;
this
.
Confirm
(
"是否要替换选中的酒店?"
,
function
()
{
var
newList
=
[];
if
(
that
.
ChangeHotelList
&&
that
.
ChangeHotelList
.
length
>
0
)
{
that
.
ChangeHotelList
.
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
.
getList
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
}
else
{
that
.
Info
(
"请选择团期!"
);
}
});
}
},
mounted
()
{
this
.
msg
.
YearMonthStr
=
new
Date
().
Format
(
"yyyy-MM"
);
...
...
src/components/commonPage/commonHotelWork.vue
0 → 100644
View file @
885ee5e6
<
template
>
<div
class=
"commonPriceHotelInfo"
>
<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()"
/>
</td>
</tr>
</tfoot>
</table>
</div>
</template>
<
script
>
export
default
{
props
:
[
"TCID"
,
"HotelId"
,
"DateStr"
],
data
()
{
return
{
changeLoading
:
false
,
MyDataList
:
[],
};
},
methods
:
{
ChangeStatus
(
item
)
{
item
.
IsChecked
=
!
item
.
IsChecked
;
},
//获取可以改变的酒店列表
GetChangeHotelList
()
{
this
.
changeLoading
=
true
;
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
)
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
},
//保存酒店订单
SaveHotelOrder
()
{
var
that
=
this
;
this
.
Confirm
(
"是否要替换选中的酒店?"
,
function
()
{
var
newList
=
[];
if
(
that
.
ChangeHotelList
&&
that
.
ChangeHotelList
.
length
>
0
)
{
that
.
ChangeHotelList
.
forEach
(
item
=>
{
if
(
item
.
IsChecked
)
{
var
Nitem
=
JSON
.
parse
(
JSON
.
stringify
(
item
));
Nitem
.
NewHotelID
=
this
.
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
(
"请选择团期!"
);
}
});
}
},
mounted
()
{
//this.GetChangeHotelList();
},
created
(){
}
};
</
script
>
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