Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
5dcbd32e
Commit
5dcbd32e
authored
Feb 05, 2024
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
3d4dc5e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
147 deletions
+6
-147
goodsku.vue
components/goods/goodsku.vue
+3
-14
index.vue
components/goods/sign/index.vue
+3
-133
No files found.
components/goods/goodsku.vue
View file @
5dcbd32e
...
...
@@ -17,6 +17,7 @@
</view>
</view>
<scroll-view
scroll-y
class=
"sku-box"
>
<!--
<view
class=
"sku-item"
v-for=
"(x, i) in g.attr_groups"
:key=
"i"
v-if=
"x.isdateformat==0"
>
<view
class=
"sku-title"
>
{{
x
.
attr_group_name
}}
</view>
<view>
...
...
@@ -29,24 +30,12 @@
<text
class=
"val"
>
{{
y
.
attr_name
}}
</text>
</view>
</view>
</view>
<view
class=
"sku-item"
v-for=
"(x, i) in g.attr_groups"
v-if=
"x.isdateformat==
1
"
>
</view>
-->
<view
class=
"sku-item"
v-for=
"(x, i) in g.attr_groups"
v-if=
"x.isdateformat==
0
"
>
<!--x.isdateformat=1 改成日历模式 -->
<view
class=
"sku-title"
>
{{
x
.
attr_group_name
}}
</view>
<view>
<!--
<view
class=
"sku-chi"
:style=
"
{
background: y.attr_id == x.checkId ? mc : '#eee',
color: y.attr_id == x.checkId ? '#FFF' : '#333'
}"
:class="{ disable: notStockGood.indexOf(y.attr_id) != -1 }"
v-for="(y, yi) in x.attr_list"
:key="yi" @click="clickSkuItemHandler(yi, i)">
<image
:src=
"y.pic_url"
class=
"img"
v-if=
"i == 0 && y.pic_url"
></image>
<text
class=
"val"
>
{{
y
.
attr_name
}}
</text>
</view>
-->
<calendar
@
finish=
"chosenDateResult"
:immediately=
"true"
:defaultDate=
"currentPrice.startDate"
:priceList=
"x.attr_list"
></calendar>
</view>
</view>
</scroll-view>
...
...
components/goods/sign/index.vue
View file @
5dcbd32e
...
...
@@ -318,10 +318,9 @@ export default {
let
d
=
j
+
1
>
9
?
j
+
1
:
"0"
+
(
j
+
1
);
if
(
x
.
attr_name
==
`
${
year
}
-
${
m
}
-
${
d
}
`
)
{
isexsit
=
true
;
//
days.push(12)
days
.
push
(
12
)
// if (x.remainNum > 0) {
// days.push(this.$utils.getretailer() ? x.b2BPrice : x.b2CPrice);
//days.push(x.b2CPrice);
// days.push(x.Price);
// } else {
// days.push(-1);
// }
...
...
@@ -442,121 +441,6 @@ export default {
if
(
this
.
immediately
)
{
this
.
submit
();
}
return
;
if
(
line
==
0
&&
index
+
1
<
this
.
nowDay
)
return
;
//如果有入住情况和价格则需要进行一些列的判断
if
(
this
.
priceStauts
.
length
>
0
)
{
if
(
(
this
.
start
.
length
==
0
&&
this
.
priceStauts
[
line
][
index
]
<
0
)
||
(
this
.
end
.
length
>
0
&&
this
.
priceStauts
[
line
][
index
]
<
0
)
)
{
return
uni
.
showToast
({
title
:
"该日期已被预订"
,
icon
:
"none"
,
});
}
if
(
(
this
.
start
.
length
>
0
&&
line
<
this
.
start
[
0
])
||
(
line
==
this
.
start
[
0
]
&&
this
.
start
[
1
]
>
index
)
)
{
if
(
this
.
priceStauts
[
line
][
index
]
<
0
)
return
uni
.
showToast
({
title
:
"该日期已被预订"
,
icon
:
"none"
,
});
this
.
start
=
[
line
,
index
];
this
.
end
=
[];
return
;
}
if
(
this
.
start
.
length
>
0
&&
this
.
end
.
length
==
0
)
{
if
(
this
.
start
[
0
]
-
line
==
0
)
{
for
(
var
j
=
this
.
start
[
1
];
j
<
index
;
j
++
)
{
if
(
this
.
priceStauts
[
line
][
j
]
<
0
)
return
uni
.
showToast
({
title
:
"很抱歉,所选时间没有报价"
,
icon
:
"none"
,
mask
:
true
,
});
}
}
else
{
//如果不在同一个月份有三种情况需要处理
for
(
var
i
=
this
.
start
[
0
];
i
<=
line
;
i
++
)
{
//开始日期到开始日期当月的最大日期是否包含无房情况
if
(
i
==
this
.
start
[
0
])
{
for
(
var
j
=
this
.
start
[
1
];
j
<
this
.
priceStauts
[
i
].
length
;
j
++
)
{
if
(
this
.
priceStauts
[
i
][
j
]
<
0
)
return
uni
.
showToast
({
title
:
"很抱歉,所选时间没有报价"
,
icon
:
"none"
,
mask
:
true
,
});
}
}
else
if
(
i
==
line
)
{
//结束日期到当月结束日期之前是否包含无房情况
for
(
var
j
=
0
;
j
<
index
;
j
++
)
{
if
(
this
.
priceStauts
[
i
][
j
]
<
0
)
return
uni
.
showToast
({
title
:
"很抱歉,所选时间没有报价"
,
icon
:
"none"
,
mask
:
true
,
});
}
}
else
{
//中间间隔的月份需要检查每一天是否包含无房情况
for
(
var
j
=
0
;
j
<
this
.
priceStauts
[
i
].
length
;
j
++
)
{
if
(
this
.
priceStauts
[
i
][
j
]
<
0
)
return
uni
.
showToast
({
title
:
"很抱歉,所选时间没有报价"
,
icon
:
"none"
,
mask
:
true
,
});
}
}
}
}
}
}
//如果没有入住时间
if
(
this
.
start
.
length
==
0
)
{
//填充入住时间
this
.
start
=
[
line
,
index
];
}
else
if
(
this
.
start
.
length
>
0
&&
this
.
start
[
0
]
==
line
&&
this
.
start
[
1
]
==
index
&&
this
.
end
.
length
==
0
)
{
return
;
}
else
{
//如果没有离开时间
if
(
this
.
end
.
length
==
0
)
{
//如果有价格和入住离开情况则需要进行判断所选的离店时间时候包含无房日期
if
(
line
<
this
.
start
[
0
]
||
(
line
==
this
.
start
[
0
]
&&
index
<
this
.
start
[
1
])
)
{
this
.
end
=
this
.
start
;
this
.
start
=
[
line
,
index
];
}
else
{
//如果离开时间比入住时间晚则填充
this
.
end
=
[
line
,
index
];
}
}
else
{
//如果有离开时间则清空离开时间重新填充入住时间
this
.
start
=
[
line
,
index
];
this
.
end
=
[];
}
}
},
//设置日历
setDate
()
{
...
...
@@ -599,31 +483,17 @@ export default {
},
//确定入住离店事件提交
submit
()
{
console
.
log
(
this
.
start
)
console
.
log
(
this
.
date
,
'--------start'
)
let
m
=
this
.
date
[
this
.
start
[
0
]].
month
;
m
=
m
>
9
?
m
:
"0"
+
m
;
let
m
=
this
.
activeMonth
.
Month
;
let
d
=
this
.
isFestival
(
this
.
start
[
0
],
this
.
start
[
1
],
true
);
d
=
d
>
9
?
d
:
"0"
+
d
;
var
obj
=
{
/* startYMD: this.date[this.start[0]].year + this.type + this.date[this.start[0]].month + this.type + this.isFestival(
this.start[0], this.start[1]),
startMD: this.date[this.start[0]].month + this.type + this.isFestival(this.start[0], this.start[1]),
startDay: this.startDay,
startWeek: this.startWeek,
endYMD: this.date[this.end[0]].year + this.type + this.date[this.end[0]].month + this.type + this.isFestival(this
.end[0], this.end[1]),
emdMD: this.date[this.end[0]].month + this.type + this.type + this.isFestival(this.end[0], this.end[1]),
endDay: this.endDay,
endWeek: this.endWeek,
day: this.day */
startWeek
:
this
.
startWeek
,
start
:
this
.
date
[
this
.
start
[
0
]].
year
+
this
.
type
+
m
+
this
.
type
+
d
,
startDay
:
m
+
"-"
+
d
,
};
let
tempPrice
=
{};
this
.
priceList
.
forEach
((
x
,
i
)
=>
{
console
.
log
(
x
.
startDate
,
obj
.
start
);
if
(
obj
.
start
==
x
.
startDate
)
{
obj
.
priceObj
=
i
;
}
...
...
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