Commit a38ab5d0 authored by youjie's avatar youjie

no message

parent 5169b7fa
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
</view> </view>
</view> </view>
</view> </view>
<scroll-view scroll-y class="sku-box"> <scroll-view scroll-y class="sku-box"
:style="{'max-height':x.isdateformat==1?'400px':'300px'}">
<view class="sku-item" v-for="(x, i) in g.attr_groups" :key="i" v-if="x.isdateformat==0"> <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 class="sku-title">{{ x.attr_group_name }} </view>
<view> <view>
...@@ -47,7 +48,10 @@ ...@@ -47,7 +48,10 @@
<!--x.isdateformat=1 改成日历模式 --> <!--x.isdateformat=1 改成日历模式 -->
<view class="sku-title">{{ x.attr_group_name }} </view> <view class="sku-title">{{ x.attr_group_name }} </view>
<view> <view>
<calendar @finish="chosenDateResult" :immediately="true" :priceList="x.attr_list"></calendar> <calendar @finish="chosenDateResult"
:defaultDate="x.attr_list[0].attr_name"
:immediately="true"
:priceList="x.attr_list"></calendar>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
...@@ -123,7 +127,6 @@ ...@@ -123,7 +127,6 @@
data() { data() {
return { return {
currentPrice: {},
goodimage: '', goodimage: '',
goodprice: '', goodprice: '',
goodamount: '', goodamount: '',
...@@ -247,13 +250,14 @@ ...@@ -247,13 +250,14 @@
}, },
methods: { methods: {
chosenDateResult(result) { chosenDateResult(result) {
// console.log(result, '----result') console.log(result,'---')
// return for(let index=0;index<this.g.attr_groups.length;index++){
// let price for(let j=0;j<this.g.attr_groups[index].attr_list.length;j++){
// this.g.attr_groups.forEach(x => { if(this.g.attr_groups[index].attr_list[j].attr_name==result.start){
// price = x.attr_list[result.priceObj] this.clickSkuItemHandler(j,index)
// }) }
// this.currentPrice = price; }
}
}, },
getfu() { getfu() {
let fucolor = this.colorRgb(this.fu); let fucolor = this.colorRgb(this.fu);
...@@ -619,7 +623,6 @@ ...@@ -619,7 +623,6 @@
.goodsku .sku-box { .goodsku .sku-box {
padding: 0; padding: 0;
/* max-height: 300px; */ /* max-height: 300px; */
max-height: 400px;
overflow: hidden; overflow: hidden;
overflow-y: auto; overflow-y: auto;
display: block; display: block;
......
...@@ -12,16 +12,11 @@ ...@@ -12,16 +12,11 @@
:style="{'color':active==item.Id?mainColor:''}" :style="{'color':active==item.Id?mainColor:''}"
@click="changeHandler(item.Id)"> @click="changeHandler(item.Id)">
<view>{{item.Name}}</view> <view>{{item.Name}}</view>
<text class="fontw100" :style="{'color':mainColor}">¥1521 <text class="fontw100" :style="{'color':mainColor}">¥{{item.minprices}}
<text></text> <text></text>
</text> </text>
<view class="tabsLine" :style="{'background':active==item.Id?mainColor:''}"></view> <view class="tabsLine" :style="{'background':active==item.Id?mainColor:''}"></view>
</view> </view>
<!-- <u-tabs :is-scroll="true" name="Name" :list="d"
:active-color="mainColor"
:current="active" @change="changeHandler"
:type-style="2" :show-bar="true"
:bold="false" height="50" duration="0"></u-tabs> -->
</view> </view>
<view class="week"> <view class="week">
<view></view> <view></view>
...@@ -92,6 +87,7 @@ ...@@ -92,6 +87,7 @@
backgroundColor: backgroundColor:
line == end[0] && index == end[1] ? '#111' : '', line == end[0] && index == end[1] ? '#111' : '',
color: line == end[0] && index == end[1] ? '#FFFFFF' : '', color: line == end[0] && index == end[1] ? '#FFFFFF' : '',
background: line == start[0] && index == start[1]?mainColor:''
}" }"
> >
<view style="padding-top: 2px; padding-bottom: 2px">{{ <view style="padding-top: 2px; padding-bottom: 2px">{{
...@@ -102,6 +98,7 @@ ...@@ -102,6 +98,7 @@
<view <view
style="font-size: 12px; padding-bottom: 3px" style="font-size: 12px; padding-bottom: 3px"
v-if="priceStauts.length > 0" v-if="priceStauts.length > 0"
> >
<view v-if="priceStauts[line][index] > 0" <view v-if="priceStauts[line][index] > 0"
>{{ priceStauts[line][index] }}</view >{{ priceStauts[line][index] }}</view
...@@ -223,17 +220,36 @@ export default { ...@@ -223,17 +220,36 @@ export default {
this.priceStauts = this.initPrice(); this.priceStauts = this.initPrice();
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
let ThisYearMonth = ''
for(let i=0;i<4;i++){ for(let i=0;i<4;i++){
let Month = Dates.getMonth()+(i+1)
let Year = Dates.getFullYear() let Year = Dates.getFullYear()
let Month = Dates.getMonth()+(i+1)
if(ThisYearMonth&&ThisYearMonth==12){
Year = Dates.getFullYear()+1
}
if(Month==12) ThisYearMonth = Month
let obj = { let obj = {
Id: i, Id: i,
Year, Year,
Month, Month,
Name: Month+'月' Name: Month+'月',
prices:[],
minprices: 0,
} }
this.d.push(obj) this.d.push(obj)
} }
for(let i = 0;i<this.priceList.length;i++){
let datas = this.priceList[i].attr_name.split('-')
for(let j = 0;j<this.d.length;j++){
let m = this.d[j].Month>9?this.d[j].Month:'0'+this.d[j].Month
if(datas[1]==m){
this.d[j].prices.push(this.priceList[i].newPrice)
}
}
}
this.d.forEach(x=>{
x.minprices = Math.min.apply(null,x.prices)
})
this.activeMonth = this.d[0] this.activeMonth = this.d[0]
// #ifdef MP-ALIPAY // #ifdef MP-ALIPAY
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
...@@ -296,13 +312,13 @@ export default { ...@@ -296,13 +312,13 @@ export default {
changeHandler(i) { changeHandler(i) {
console.log(i) console.log(i)
this.active = i; this.active = i;
this.$emit('getMonth')
this.activeMonth = this.d.find(x=>{ this.activeMonth = this.d.find(x=>{
return x.Id == i return x.Id == i
}) })
console.log(this.activeMonth,'----',this.d)
}, },
initPrice() { initPrice() {
console.log(this.priceList,'==-----priceList')
//年份 //年份
var year = new Date().getFullYear(); var year = new Date().getFullYear();
let data = []; let data = [];
...@@ -314,16 +330,16 @@ export default { ...@@ -314,16 +330,16 @@ export default {
for (var j = 0; j < new Date(year, month + 1, 0).getDate(); j++) { for (var j = 0; j < new Date(year, month + 1, 0).getDate(); j++) {
let isexsit = false; let isexsit = false;
this.priceList.forEach((x) => { this.priceList.forEach((x) => {
let m = month + 1 > 9 ? month + 1 : "0" + (month + 1); let m = month + 1 > 9 ? month + 1 : "0" + (month + 1);
let d = j + 1 > 9 ? j + 1 : "0" + (j + 1); let d = j + 1 > 9 ? j + 1 : "0" + (j + 1);
if (x.attr_name == `${year}-${m}-${d}`) { if (x.attr_name == `${year}-${m}-${d}`) {
isexsit = true; isexsit = true;
days.push(12) if (x.newStock > 0) {
// if (x.remainNum > 0) { days.push(x.newPrice);
// days.push(x.Price); } else {
// } else { days.push(-1);
// days.push(-1); }
// }
} }
}); });
if (!isexsit) { if (!isexsit) {
...@@ -438,7 +454,7 @@ export default { ...@@ -438,7 +454,7 @@ export default {
this.start = [line, index]; this.start = [line, index];
} }
if (this.immediately) { if (this.priceStauts[line][index]&&this.immediately) {
this.submit(); this.submit();
} }
}, },
...@@ -483,8 +499,7 @@ export default { ...@@ -483,8 +499,7 @@ export default {
}, },
//确定入住离店事件提交 //确定入住离店事件提交
submit() { submit() {
console.log(this.date,'--------start') let m = this.activeMonth.Month>9?this.activeMonth.Month:'0'+this.activeMonth.Month;//this.date[0].month>9?this.date[0].month:'0'+this.date[0].month;
let m = this.activeMonth.Month;
let d = this.isFestival(this.start[0], this.start[1], true); let d = this.isFestival(this.start[0], this.start[1], true);
d = d > 9 ? d : "0" + d; d = d > 9 ? d : "0" + d;
var obj = { var obj = {
...@@ -562,7 +577,7 @@ export default { ...@@ -562,7 +577,7 @@ export default {
/* 入住离开时间的color */ /* 入住离开时间的color */
.bg-orange { .bg-orange {
background: #111111 !important; /* background: #111111 !important; */
border-radius: 6px !important; border-radius: 6px !important;
} }
......
...@@ -503,7 +503,7 @@ ...@@ -503,7 +503,7 @@
secondary: "", secondary: "",
detailContent: "", detailContent: "",
recommend: [], recommend: [],
showSku: true, showSku: false,
ot: 0, ot: 0,
currentSku: {}, currentSku: {},
isExsitGoods: true, isExsitGoods: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment