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
09c0e5e5
Commit
09c0e5e5
authored
Nov 01, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
be2612ce
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
523 additions
and
483 deletions
+523
-483
ListCar.vue
src/components/Hotel/singleProduct/components/ListCar.vue
+523
-483
No files found.
src/components/Hotel/singleProduct/components/ListCar.vue
View file @
09c0e5e5
...
...
@@ -22,8 +22,8 @@
<div
class=
"list-content-box"
v-for=
"(y,i) in x.Hotels"
>
<div
class=
"list-operation"
>
<div>
<button
v-if=
"x.Date>=OptionalTime"
class=
"hollowFixedBtn"
type=
"primary"
@
click=
"setEditorHandler(y)"
>
<button
v-if=
"x.Date>=OptionalTime"
class=
"hollowFixedBtn"
type=
"primary"
@
click=
"setEditorHandler(y)"
>
<i
class=
"el-icon-edit"
></i>
</button>
<button
class=
"normalBtn"
type=
"primary"
@
click=
"removeHotelHandler(xi,i)"
>
...
...
@@ -65,10 +65,11 @@
</div>
</div>
</div>
<div
v-if=
"cars.length==0"
style=
"text-align: center;padding: 20px 0;"
>
{{
$t
(
'system.content_noData'
)
}}
</div>
<div
v-if=
"cars&&cars.length==0"
style=
"text-align: center;padding: 20px 0;"
>
{{
$t
(
'system.content_noData'
)
}}
</div>
</div>
<div
class=
"ListCar-bottom"
v-if=
"
cars.length>0"
>
<div
class=
"ListCar-bottom"
v-if=
"cars&&
cars.length>0"
>
<div
v-if=
"crmOrderObj"
style=
"margin-bottom: 10px;"
>
<span
style=
"color: red;"
>
{{
$t
(
'objFill.yinliuren'
)
}}
:
{{
crmOrderObj
.
LureEmpNmae
}}
</span>
<span
style=
"color: #2AAEF2;"
>
/
{{
$t
(
'objFill.keren'
)
}}
:
{{
crmOrderObj
.
CRMGuestName
}}
</span>
...
...
@@ -78,7 +79,8 @@
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('system.query_type')"
prop=
"OrderType"
>
<el-select
v-model=
"parameters.OrderType"
>
<el-option
v-for=
"item in cacheHotels"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
></el-option>
<el-option
v-for=
"item in cacheHotels"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
...
...
@@ -101,8 +103,8 @@
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('pub.pubRemark')"
prop=
""
>
<el-input
type=
"textarea"
:rows=
"1"
:placeholder=
"$t('rule.EnterMark')"
v-model=
"parameters.Remark"
>
</el-input>
<el-input
type=
"textarea"
:rows=
"1"
:placeholder=
"$t('rule.EnterMark')"
v-model=
"parameters.Remark"
>
</el-input>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -112,7 +114,8 @@
<span
class=
"coloref1416c fz12"
>
{{$t('objFill.dindianfukuan')}}:
</span>
<span
class=
"coloref1416c fbold"
>
<span
class=
"fz18"
>
{{parameters.Money}}
</span>
<span
class=
"fz13"
>
<!-- ¥ -->
{{cars[0].CurrencyName}}
</span>
<span
class=
"fz13"
>
<!-- ¥ -->
{{cars[0].CurrencyName}}
</span>
</span>
</div>
<div>
...
...
@@ -125,14 +128,10 @@
</div>
</div>
</div>
</template>
<
script
>
</template>
<
script
>
export
default
{
props
:
{
// crmOrderObj: {
// type: Object,
// require: false
// },
HotelRow
:
{
type
:
Object
,
require
:
false
...
...
@@ -144,8 +143,8 @@
},
data
()
{
return
{
crmOrderObj
:
null
,
OptionalTime
:
this
.
getBeforeDate
(
0
,
new
Date
().
Format
(
'yyyy-MM-dd'
)),
//可编辑时间
crmOrderObj
:
null
,
OptionalTime
:
this
.
getBeforeDate
(
0
,
new
Date
().
Format
(
'yyyy-MM-dd'
)),
//可编辑时间
cars
:
[],
HotelLength
:
0
,
addNum
:
1
,
...
...
@@ -166,11 +165,16 @@
currentS
:
0
,
RemainingInventory
:
0
,
loading
:
false
,
cacheHotels
:
[
{
Name
:
this
.
$t
(
'objFill.shanke'
),
ID
:
1
},
{
Name
:
this
.
$t
(
'active.cl_team'
),
ID
:
2
}
cacheHotels
:
[{
Name
:
this
.
$t
(
'objFill.shanke'
),
ID
:
1
},
{
Name
:
this
.
$t
(
'active.cl_team'
),
ID
:
2
}
],
rules
:
{
rules
:
{
OrderType
:
[{
required
:
true
,
message
:
this
.
$t
(
'system.ph_type'
),
...
...
@@ -181,8 +185,11 @@
message
:
this
.
$t
(
'objFill.qingshuruskxm'
),
trigger
:
'blur'
}],
ContactNumber
:
[
{
required
:
true
,
message
:
this
.
$t
(
'rule.EnterPnum'
),
trigger
:
"blur"
},
ContactNumber
:
[{
required
:
true
,
message
:
this
.
$t
(
'rule.EnterPnum'
),
trigger
:
"blur"
},
// {
// pattern: this.$commonUtils.Regex.el_ISphone,
// message: this.$t('rule.EnterRightNum')
...
...
@@ -197,21 +204,14 @@
};
},
watch
:
{
// crmOrderObj: {
// handler: function (val, oldVal) {
// this.crmOrderObj = val
// if(this.crmOrderObj){
// this.parameters.LureEmpId = val.LureEmpId//引流id
// this.parameters.CRMGuestId = val.CRMGuestId //客人ID
// }
// },
// deep: true,
// immediate: true
// },
cars
:
{
handler
:
function
(
val
,
oldVal
)
{
if
(
this
.
cars
&&
this
.
cars
.
length
>
0
)
{
this
.
HotelLength
=
this
.
cars
.
length
localStorage
.
setItem
(
"HotelLength"
,
this
.
HotelLength
)
}
else
{
this
.
HotelLength
=
0
;
}
localStorage
.
setItem
(
"HotelLength"
,
this
.
HotelLength
)
this
.
getMoney
()
},
deep
:
true
...
...
@@ -225,33 +225,33 @@
},
created
()
{
// crm自动登陆传过来的参数
if
(
this
.
$route
.
query
.
crmOrderObj
)
{
if
(
this
.
$route
.
query
.
crmOrderObj
)
{
let
crmOrderObj
=
JSON
.
parse
(
this
.
$route
.
query
.
crmOrderObj
)
this
.
crmOrderObj
=
crmOrderObj
this
.
parameters
.
LureEmpId
=
crmOrderObj
.
LureEmpId
//引流id
this
.
parameters
.
LureEmpId
=
crmOrderObj
.
LureEmpId
//引流id
this
.
parameters
.
CRMGuestId
=
crmOrderObj
.
CRMGuestId
//客人ID
}
this
.
cars
=
JSON
.
parse
(
localStorage
.
getItem
(
"cars"
))
this
.
HotelLength
=
localStorage
.
getItem
(
"HotelLength"
)
},
mounted
()
{
},
methods
:
{
// 关闭购物车
close
()
{
close
()
{
localStorage
.
removeItem
(
'editor'
)
this
.
$emit
(
'close'
)
},
// 合计
getMoney
()
{
this
.
parameters
.
Money
=
0
this
.
parameters
.
Money
=
0
;
if
(
this
.
cars
&&
this
.
cars
.
length
>
0
)
{
this
.
cars
.
forEach
((
item
)
=>
{
item
.
Hotels
.
forEach
((
t
)
=>
{
this
.
parameters
.
Money
+=
t
.
Money
})
})
}
},
// 确定下单
submit
()
{
...
...
@@ -263,13 +263,13 @@
}
});
},
setFormMsg
()
{
setFormMsg
()
{
let
temp
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
cars
))
if
(
this
.
loading
||
this
.
cars
.
length
==
0
)
return
if
(
this
.
loading
||
this
.
cars
.
length
==
0
)
return
this
.
loading
=
true
this
.
parameters
.
DetailList
=
[]
temp
.
forEach
((
x
)
=>
{
x
.
Hotels
.
forEach
((
y
)
=>
{
temp
.
forEach
((
x
)
=>
{
x
.
Hotels
.
forEach
((
y
)
=>
{
y
.
RoomList
=
JSON
.
parse
(
JSON
.
stringify
(
y
.
DetailList
))
delete
y
.
DetailList
this
.
parameters
.
DetailList
.
push
(
y
)
...
...
@@ -284,7 +284,7 @@
localStorage
.
removeItem
(
'cars'
)
localStorage
.
removeItem
(
'editor'
)
localStorage
.
removeItem
(
'HotelLength'
)
this
.
cars
=
[]
this
.
cars
=
[]
this
.
HotelLength
=
0
this
.
$emit
(
'success'
)
}
else
{
...
...
@@ -297,96 +297,113 @@
}
);
},
removeHotelHandler
(
x
,
y
)
{
removeHotelHandler
(
x
,
y
)
{
let
that
=
this
that
.
$confirm
(
this
.
$t
(
'objFill.shifouquedinsc'
),
this
.
$t
(
'tips.tips'
),
{
confirmButtonText
:
this
.
$t
(
'pub.sureBtn'
),
cancelButtonText
:
this
.
$t
(
'pub.cancelBtn'
),
type
:
'warning'
}).
then
(()
=>
{
if
(
this
.
cars
[
x
].
Hotels
.
length
==
1
){
this
.
cars
.
splice
(
x
,
1
)
}
else
{
this
.
cars
[
x
].
Hotels
.
splice
(
y
,
1
)
if
(
this
.
cars
[
x
].
Hotels
.
length
==
1
)
{
this
.
cars
.
splice
(
x
,
1
)
}
else
{
this
.
cars
[
x
].
Hotels
.
splice
(
y
,
1
)
}
if
(
this
.
cars
&&
this
.
cars
.
length
)
{
this
.
HotelLength
=
this
.
cars
.
length
;
}
this
.
HotelLength
=
this
.
cars
.
length
localStorage
.
removeItem
(
'cars'
)
localStorage
.
setItem
(
'cars'
,
JSON
.
stringify
(
this
.
cars
))
localStorage
.
setItem
(
'cars'
,
JSON
.
stringify
(
this
.
cars
))
localStorage
.
removeItem
(
'HotelLength'
)
localStorage
.
setItem
(
'HotelLength'
,
JSON
.
stringify
(
this
.
HotelLength
))
localStorage
.
setItem
(
'HotelLength'
,
JSON
.
stringify
(
this
.
HotelLength
))
}).
catch
(()
=>
{
});
},
// 编辑
setEditorHandler
(
x
)
{
localStorage
.
setItem
(
'editor'
,
JSON
.
stringify
(
x
))
this
.
$emit
(
'editor'
,
x
)
setEditorHandler
(
x
)
{
localStorage
.
setItem
(
'editor'
,
JSON
.
stringify
(
x
))
this
.
$emit
(
'editor'
,
x
)
}
}
};
</
script
>
</
script
>
<
style
scoped
>
.fz12
{
<
style
scoped
>
.fz12
{
font-size
:
12px
;
}
.fz13
{
.fz13
{
font-size
:
13px
;
}
.fz14
{
.fz14
{
font-size
:
14px
;
}
.fz15
{
.fz15
{
font-size
:
15px
;
}
.fz16
{
.fz16
{
font-size
:
16px
;
}
.fz18
{
.fz18
{
font-size
:
18px
;
}
.fbold
{
.fbold
{
font-weight
:
bold
;
}
.paddinglr15
{
.paddinglr15
{
padding
:
0
15px
;
}
.row-JCSB
{
.row-JCSB
{
display
:
flex
;
justify-content
:
space-between
;
}
.row-JCE
{
.row-JCE
{
display
:
flex
;
justify-content
:
end
;
}
.colorffffff
{
.colorffffff
{
color
:
#ffffff
;
}
.color009ef7
{
.color009ef7
{
color
:
#009ef7
;
}
.colore65100
{
.colore65100
{
color
:
#e65100
;
}
.coloref44336
{
.coloref44336
{
color
:
#f44336
;
}
.coloref1416c
{
.coloref1416c
{
color
:
#f1416c
;
}
.ListCar-form
{
.ListCar-form
{
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
background
:
rgba
(
23
,
23
,
23
,
.5
);
background
:
rgba
(
23
,
23
,
23
,
.5
);
z-index
:
3
;
}
.ListCar-form-box
{
.ListCar-form-box
{
position
:
fixed
;
top
:
0
;
right
:
0
;
...
...
@@ -395,112 +412,135 @@
background
:
#ffffff
;
z-index
:
100
;
}
.ListCar-box
{
.ListCar-box
{
width
:
100%
;
height
:
100%
;
position
:
relative
;
}
.ListCar-close
{
.ListCar-close
{
position
:
absolute
;
left
:
-47px
;
top
:
20%
;
line-height
:
26px
;
}
.ListCar-close
i
{
.ListCar-close
i
{
margin-left
:
3px
;
}
.normalBtn.ListCar-close
{
.normalBtn.ListCar-close
{
border-top-right-radius
:
0
;
border-bottom-right-radius
:
0
;
padding
:
0
8px
!important
;
}
.ListCar-box
{
.ListCar-box
{
padding
:
15px
0
;
}
.ListCar-header
{
.ListCar-header
{
border-bottom
:
-
;
}
.ListCar-header-right
{
.ListCar-header-right
{
border-radius
:
3px
;
padding
:
5px
8px
;
background
:
#fff3e0
;
}
.ListCar-content
{
.ListCar-content
{
padding
:
20px
15px
;
height
:
calc
(
100%
-
230px
);
overflow
:
auto
;
}
.ListCar-list
{
.ListCar-list
{
border-radius
:
3px
;
background
:
black
;
padding
:
0
10px
10px
10px
;
margin
:
0
0
10px
0
;
}
.list-time
{
.list-time
{
padding
:
10px
0
5px
0
;
}
.list-content-box
{
.list-content-box
{
background
:
#e1f5fe
;
position
:
relative
;
border-radius
:
3px
;
cursor
:
pointer
;
margin-bottom
:
5px
;
}
.list-content-box
:last-child
{
.list-content-box
:last-child
{
margin-bottom
:
0
;
}
.list-content
{
.list-content
{
padding
:
8px
10px
;
}
.list-content-title
{
.list-content-title
{
border-bottom
:
1px
dashed
#009ef7
;
padding
:
0
0
8px
0
;
}
.content-title
{
.content-title
{
width
:
300px
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.list-content-rooms
{
.list-content-rooms
{
border-bottom
:
1px
dashed
#009ef7
;
padding
:
6px
0
;
}
.list-content-rooms
>
div
{
.list-content-rooms
>
div
{
margin-bottom
:
5px
;
}
.list-content-rooms
>
div
:last-child
{
.list-content-rooms
>
div
:last-child
{
margin-bottom
:
0
;
}
.list-content-num
{
.list-content-num
{
padding
:
6px
0
0
0
;
}
.list-operation
{
.list-operation
{
position
:
absolute
;
top
:
0
;
left
:
0
;
bottom
:
0
;
right
:
0
;
background
:
rgba
(
23
,
23
,
23
,
.5
);
background
:
rgba
(
23
,
23
,
23
,
.5
);
border-radius
:
3px
;
display
:
none
;
z-index
:
1
;
}
.list-operation
div
{
.list-operation
div
{
height
:
100%
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.list-content-box
:hover
.list-operation
{
.list-content-box
:hover
.list-operation
{
display
:
block
;
}
.ListCar-bottom
{
.ListCar-bottom
{
padding
:
15px
15px
0
15px
;
}
.bottom-num
{
.bottom-num
{
align-items
:
center
;
}
</
style
>
</
style
>
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