忆雪 1 жил өмнө
parent
commit
aad2c9f7ba

+ 17 - 0
src/api/merchant/order.js

@@ -76,4 +76,21 @@ export function getNoticeApi(data) {
     },
   });
 }
+
+
+/**
+ * 商家预约列表
+ * @param {*} 
+ * @returns
+ */
+export function getMerchantListApi(data) {
+  return request({
+    url: "/maintain/reservation/getMerchantList",
+    method: 'get',
+	data,
+    headers: {
+      'Content-Type': 'application/x-www-form-urlencoded',
+    },
+  });
+}
 

+ 424 - 0
src/components/ren-calendar/ren-calendar.vue

@@ -0,0 +1,424 @@
+<template>
+    <view class="calendar-wrapper">
+        <view class="header" v-if="headerBar">
+            <view class="pre" @click="changeMonth('pre')">上个月</view>
+            <view>{{y+'年'+formatNum(m)+'月'}}</view>
+            <view class="next" @click="changeMonth('next')">下个月</view>
+        </view>
+        <view class="week">
+            <view class="week-day" v-for="(item, index) in weekDay" :key="index">{{ item }}</view>
+        </view>
+        <view :class="{ hide: !monthOpen }" class="content" :style="{ height: height }">
+            <view :style="{ top: positionTop + 'rpx' }" class="days">
+                <view class="item" v-for="(item, index) in dates" :key="index">
+                    <view
+                        class="day"
+                        @click="selectOne(item, $event)"
+                        :class="{
+                            choose: choose == `${item.year}-${item.month}-${item.date}`&&item.isCurM,
+                            nolm: !item.isCurM,
+                            today: isToday(item.year, item.month, item.date),
+                            isWorkDay: isWorkDay(item.year, item.month, item.date)
+                        }"
+                    >
+                        {{ Number(item.date) }}
+                    </view>
+                    <view class="markDay" v-if="isMarkDay(item.year, item.month, item.date)&&item.isCurM"></view>
+                    <!-- <view class="today-text" v-if="isToday(item.year, item.month, item.date)">今</view> -->
+                </view>
+            </view>
+        </view>
+        <image src="https://i.loli.net/2020/07/16/2MmZsucVTlRjSwK.png" mode="scaleToFill" v-if="collapsible" @click="toggle" class="weektoggle" :class="{ down: monthOpen }"></image>
+    </view>
+</template>
+
+<script>
+export default {
+    name: 'ren-calendar',
+    props: {
+        // 星期几为第一天(0为星期日)
+        weekstart: {
+            type: Number,
+            default: 0
+        },
+        // 标记的日期
+        markDays: {
+            type: Array,
+            default: ()=>{
+                return [];
+            }
+        },
+        //是否展示月份切换按钮
+        headerBar:{
+            type: Boolean,
+            default: true
+        },
+        // 是否展开
+        open: {
+            type: Boolean,
+            default: true
+        },
+        //是否可收缩
+        collapsible:{
+            type: Boolean,
+            default: true
+        },
+        //未来日期是否不可点击
+        disabledAfter: {
+            type: Boolean,
+            default: false
+        }
+    },
+    data() {
+        return {
+            weektext: ['日', '一', '二', '三', '四', '五', '六'],
+            y: new Date().getFullYear(), // 年
+            m: new Date().getMonth() + 1, // 月
+            dates: [], // 当前月的日期数据
+            positionTop: 0,
+            monthOpen: true,
+            choose: ''
+        };
+    },
+    created() {
+        this.dates = this.monthDay(this.y, this.m);
+        !this.open && this.toggle();
+    },
+    mounted() {
+        this.choose = this.getToday().date;
+    },
+    computed: {
+        // 顶部星期栏
+        weekDay() {
+            return this.weektext.slice(this.weekstart).concat(this.weektext.slice(0, this.weekstart));
+        },
+        height() {
+            return (this.dates.length / 7) * 80 + 'rpx';
+        }
+    },
+    methods: {
+        formatNum(num) {
+            let res = Number(num);
+            return res < 10 ? '0' + res : res;
+        },
+        getToday() {
+            let date = new Date();
+            let y = date.getFullYear();
+            let m = date.getMonth();
+            let d = date.getDate();
+            let week = new Date().getDay();
+            let weekText = ['日', '一', '二', '三', '四', '五', '六'];
+            let formatWeek = '星期' + weekText[week];
+            let today = {
+                date: y + '-' + this.formatNum(m + 1) + '-' + this.formatNum(d),
+                week: formatWeek
+            };
+            return today;
+        },
+        // 获取当前月份数据
+        monthDay(y, month) {
+            let dates = [];
+            let m = Number(month);
+            let firstDayOfMonth = new Date(y, m - 1, 1).getDay(); // 当月第一天星期几
+            let lastDateOfMonth = new Date(y, m, 0).getDate(); // 当月最后一天
+            let lastDayOfLastMonth = new Date(y, m - 2, 0).getDate(); // 上一月的最后一天
+            let weekstart = this.weekstart == 7 ? 0 : this.weekstart;
+            let startDay = (() => {
+                // 周初有几天是上个月的
+                if (firstDayOfMonth == weekstart) {
+                    return 0;
+                } else if (firstDayOfMonth > weekstart) {
+                    return firstDayOfMonth - weekstart;
+                } else {
+                    return 7 - weekstart + firstDayOfMonth;
+                }
+            })();
+            let endDay = 7 - ((startDay + lastDateOfMonth) % 7); // 结束还有几天是下个月的
+            for (let i = 1; i <= startDay; i++) {
+                dates.push({
+                    date: this.formatNum(lastDayOfLastMonth - startDay + i),
+                    day: weekstart + i - 1 || 7,
+                    month: m - 1 >= 0 ? this.formatNum(m - 1) : 12,
+                    year: m - 1 >= 0 ? y : y - 1
+                });
+            }
+            for (let j = 1; j <= lastDateOfMonth; j++) {
+                dates.push({
+                    date: this.formatNum(j),
+                    day: (j % 7) + firstDayOfMonth - 1 || 7,
+                    month: this.formatNum(m),
+                    year: y,
+                    isCurM: true //是否当前月份
+                });
+            }
+            for (let k = 1; k <= endDay; k++) {
+                dates.push({
+                    date: this.formatNum(k),
+                    day: (lastDateOfMonth + startDay + weekstart + k - 1) % 7 || 7,
+                    month: m + 1 <= 11 ? this.formatNum(m + 1) : 0,
+                    year: m + 1 <= 11 ? y : y + 1
+                });
+            }
+            // console.log(dates);
+            return dates;
+        },
+        isWorkDay(y, m, d) {
+            //是否工作日
+            let ymd = `${y}/${m}/${d}`;
+            let formatDY = new Date(ymd.replace(/-/g, '/'));
+            let week = formatDY.getDay();
+            if (week == 0 || week == 6) {
+                return false;
+            } else {
+                return true;
+            }
+        },
+        isFutureDay(y, m, d) {
+            //是否未来日期
+            let ymd = `${y}/${m}/${d}`;
+            let formatDY = new Date(ymd.replace(/-/g, '/'));
+            let showTime = formatDY.getTime();
+            let curTime = new Date().getTime();
+            if (showTime > curTime) {
+                return true;
+            } else {
+                return false;
+            }
+        },
+        // 标记日期
+        isMarkDay(y, m, d) {
+            let flag = false;
+            for (let i = 0; i < this.markDays.length; i++) {
+                let dy = `${y}-${m}-${d}`;
+                if (this.markDays[i] == dy) {
+                    flag = true;
+                    break;
+                }
+            }
+            return flag;
+        },
+        isToday(y, m, d) {
+            let checkD = y + '-' + m + '-' + d;
+            let today = this.getToday().date;
+            if (checkD == today) {
+                return true;
+            } else {
+                return false;
+            }
+        },
+        // 展开收起
+        toggle() {
+            this.monthOpen = !this.monthOpen;
+            if (this.monthOpen) {
+                this.positionTop = 0;
+            } else {
+                let index = -1;
+                this.dates.forEach((i, x) => {
+                    this.isToday(i.year, i.month, i.date) && (index = x);
+                });
+                this.positionTop = -((Math.ceil((index + 1) / 7) || 1) - 1) * 80;
+            }
+        },
+        // 点击回调
+        selectOne(i, event) {
+            let date = `${i.year}-${i.month}-${i.date}`;
+            let selectD = new Date(date).getTime();
+            let curTime = new Date().getTime();
+            let week = new Date(date).getDay();
+            let weekText = ['日', '一', '二', '三', '四', '五', '六'];
+            let formatWeek = '星期' + weekText[week];
+            let response = {
+                date: date,
+                week: formatWeek
+            };
+            if (!i.isCurM) {
+                // console.log('不在当前月范围内');
+                return false;
+            }
+            if (selectD > curTime) {
+                if (this.disabledAfter) {
+                    console.log('未来日期不可选');
+                    return false;
+                } else {
+                    this.choose = date;
+                    this.$emit('onDayClick', response);
+                }
+            } else {
+                this.choose = date;
+                this.$emit('onDayClick', response);
+            }
+            console.log(response);
+        },
+        //改变年月
+        changYearMonth(y, m) {
+            this.dates = this.monthDay(y, m);
+            this.y = y;
+            this.m = m;
+        },
+        changeMonth(type){
+            if(type=='pre'){
+               if (this.m + 1 == 2) {
+                   this.m = 12;
+                   this.y = this.y - 1;
+               } else {
+                   this.m = this.m - 1;
+               } 
+            }else{
+                if (this.m + 1 == 13) {
+                    this.m = 1;
+                    this.y = this.y + 1;
+                } else {
+                    this.m = this.m + 1;
+                }
+            }
+            this.dates = this.monthDay(this.y, this.m);
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+.calendar-wrapper {
+    color: #bbb7b7;
+    font-size: 28rpx;
+    text-align: center;
+    background-color: #fff;
+    padding-bottom: 10rpx;
+    
+    .header{
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        height: 88rpx;
+        color: #42464A;
+        font-size: 32rpx;
+        font-weight: bold;
+        border-bottom: 2rpx solid #f2f2f2;
+        .pre,.next{
+              color: #4d7df9;
+              font-size: 28rpx;
+              font-weight: normal;
+              padding: 8rpx 15rpx;
+              border-radius: 10rpx;
+              border: 2rpx solid #dcdfe6;
+        }
+        .pre{
+            margin-right: 30rpx;
+        }
+        .next{
+            margin-left: 30rpx;
+        }
+    }
+
+    .week {
+        display: flex;
+        align-items: center;
+        height: 80rpx;
+        line-height: 80rpx;
+        border-bottom: 1rpx solid rgba(255, 255, 255, 0.2);
+
+        view {
+            flex: 1;
+        }
+    }
+
+    .content {
+        position: relative;
+        overflow: hidden;
+        transition: height 0.4s ease;
+
+        .days {
+            transition: top 0.3s;
+            display: flex;
+            align-items: center;
+            flex-wrap: wrap;
+            position: relative;
+
+            .item {
+                position: relative;
+                display: block;
+                height: 80rpx;
+                line-height: 80rpx;
+                width: calc(100% / 7);
+
+                .day {
+                    font-style: normal;
+                    display: inline-block;
+                    vertical-align: middle;
+                    width: 60rpx;
+                    height: 60rpx;
+                    line-height: 60rpx;
+                    overflow: hidden;
+                    border-radius: 60rpx;
+
+                    &.choose {
+                        background-color: #4d7df9;
+                        color: #fff;
+                    }
+
+                    &.nolm {
+                        color: #fff;
+                        opacity: 0.3;
+                    }
+                }
+                .isWorkDay {
+                    color: #42464a;
+                }
+
+                .notSigned {
+                    font-style: normal;
+                    width: 8rpx;
+                    height: 8rpx;
+                    background: #fa7268;
+                    border-radius: 10rpx;
+                    position: absolute;
+                    left: 50%;
+                    bottom: 0;
+                    pointer-events: none;
+                }
+                .today {
+                    color: #fff;
+                    background-color: #a8c0ff;
+                }
+                .workDay {
+                    font-style: normal;
+                    width: 8rpx;
+                    height: 8rpx;
+                    background: #4d7df9;
+                    border-radius: 10rpx;
+                    position: absolute;
+                    left: 50%;
+                    bottom: 0;
+                    pointer-events: none;
+                }
+                .markDay{
+                    font-style: normal;
+                    width: 8rpx;
+                    height: 8rpx;
+                    background: #fc7a64;
+                    border-radius: 10rpx;
+                    position: absolute;
+                    left: 50%;
+                    bottom: 0;
+                    pointer-events: none;
+                }
+            }
+        }
+    }
+
+    .hide {
+        height: 80rpx !important;
+    }
+
+    .weektoggle {
+        width: 85rpx;
+        height: 32rpx;
+        position: relative;
+        bottom: -42rpx;
+        &.down {
+            transform: rotate(180deg);
+            bottom: 0;
+        }
+    }
+}
+</style>

+ 288 - 0
src/pageMerchant/components/orderList.vue

@@ -0,0 +1,288 @@
+<template>
+	<view class="container">
+		<!-- 订单 -->
+		<view class="order">
+			<view class="order-box">
+				<view class="order-item" v-for="(item, index) of list" :key="index">
+					<view class="item-allnumb-box">
+						<view class="allnumb-left"> 
+							<image class="img" src="@/static/QR57a.jpg"  style="width: 50rpx; height: 50rpx"   />
+							<span>用户名</span>
+						</view>
+					 <view class="allnumb-right" :style="{color: getStatusColor(item.status)}">
+					    {{ getStatusText(item.status) }}
+					  </view>
+					</view>
+
+					<u-line margin="20rpx 0"></u-line>
+
+					<view class="item-center" :key="idx" v-for="(itm, idx) of item.goodsInfo">
+						<view class="center-left">
+							<image :src="itm.goodsPic" class="img"></image>
+						</view>
+						<view class="center-right">
+							<view class="r-l">
+								<view class="right-name"> {{ itm.goodsName }} </view>
+								<view class="right-descript"> 测试商品描述111 </view>
+								<view class="l-box">
+									<view class="right-price"> ¥{{ itm.goodsPrice }} </view>
+									<view class="right-numb"> ×{{ itm.goodsQuantity }} </view>
+								</view>
+							</view>
+						</view>
+					</view>
+
+					<view class="item-allnumb-box">
+						<view class="allnumb-left"></view>
+						<view class="allnumb-right">
+							<span class="r-text">实付款</span>¥{{ item.payAmount }}
+						</view>
+					</view>
+					
+					<u-line margin="20rpx 0" dashed="true"></u-line>
+
+					<view class="item-top">
+						<view class="top-left gray-color">订单编号 : {{ item.orderSn }}</view>
+						<view class="top-right">{{ type_name }}</view>
+					</view>
+					<view class="item-top">
+						<view class="top-left gray-color">下单时间 : {{ formatTime1( item.createTime) }}</view>
+						<view class="top-right"></view>
+					</view>
+					<view class="item-top">
+						 <view v-if="item.status == 2" class="top-left gray-color">核销时间: {{ formatTime1(item.createTime) }}</view>
+						    <view v-if="item.status == 3" class="top-left gray-color">退款时间: {{ formatTime1(item.createTime) }}</view>
+						    <view v-if="item.status == 4" class="top-left gray-color">过期时间: {{ formatTime1(item.createTime) }}</view>
+						<!--    <view v-else class="top-left gray-color"></view>
+						    <view class="top-right"></view> -->
+					</view>
+
+					
+				</view>
+			</view>
+			<view  style="margin-top: 40rpx" v-if="list.length === 0" >
+				<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" />
+			</view>
+			
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		userOrdersApi,
+		getUserOrderList,
+		cancelOrder
+	} from '@/api/client/order';
+	export default {
+		props: {
+		  typeStyle: {
+		    type: Number,
+		    default: 0,
+		  },
+		  list: {
+		    type: Array,
+		    default: [],
+		  },
+		},
+		data() {
+			return {
+				
+			};
+		},
+		mounted() {
+		
+		},
+		onShow() {
+			
+		},
+		computed: {
+			
+		},
+		methods: {
+			getStatusColor(status) {
+			      switch (status) {
+			        case 1:
+			          return 'blue';
+			        case 2:
+			          return 'red';
+			        case 3:
+			          return 'orange';
+			        case 4:
+			          return 'green';
+			        default:
+			          return 'black';
+			      }
+			    },
+			    getStatusText(status) {
+			      switch (status) {
+			        case 1:
+			          return '待核销';
+			        case 2:
+			          return '已核销';
+			        case 3:
+			          return '已退款';
+			        case 4:
+			          return '已过期';
+			        default:
+			          return '';
+			      }
+			    },
+			// 跳转到订单详情
+			handlerSkipDetail(e) {
+				uni.navigateTo({
+					url: `/PageMine/orderModules/orderDetail?orderList=${JSON.stringify(e)}`,
+				});
+			},
+			formatTime1(timestamp) {
+			  const date = new Date(timestamp * 1000); // 转换为毫秒
+			  const year = date.getFullYear();
+			  const month = ('0' + (date.getMonth() + 1)).slice(-2);
+			  const day = ('0' + date.getDate()).slice(-2);
+			  const hour = ('0' + date.getHours()).slice(-2);
+			  const minute = ('0' + date.getMinutes()).slice(-2);
+			  const second = ('0' + date.getSeconds()).slice(-2);
+			  
+			  return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
+			}
+		},
+	};
+</script>
+
+<style lang="scss" scoped>
+	.order {
+		margin-top: 10px;
+		padding: 10rpx 20rpx 20rpx;
+		box-sizing: border-box;
+
+		.order-box {
+			.order-item {
+				margin-bottom: 20rpx;
+				background-color: #fff;
+				border-radius: 20rpx;
+				padding: 20rpx;
+				box-shadow: 0 8rpx 15rpx 0 rgba(0, 0, 0, 0.08);
+
+				.item-top {
+					display: flex;
+					justify-content: space-between;
+					margin-bottom: 10rpx;
+				}
+
+				.item-center {
+					display: flex;
+					align-items: center;
+					margin-bottom: 10rpx;
+
+					.center-left {
+						height: 160rpx;
+
+						.img {
+							width: 160rpx;
+							height: 160rpx;
+						}
+					}
+
+					.center-right {
+						width: 100%;
+						height: 160rpx;
+						display: flex;
+						justify-content: space-between;
+						margin-left: 20rpx;
+
+						.r-l {
+							display: flex;
+							flex-direction: column;
+							justify-content: space-around;
+
+							.right-name {
+								color: #4d5671;
+								font-size: 32rpx;
+								font-weight: bold;
+							}
+
+							.right-descript {
+								font-size: 28rpx;
+								color: #858797;
+							}
+
+							.l-box {
+								display: flex;
+								font-size: 24rpx;
+								align-items: center;
+								font-style: italic;
+
+								.right-price {
+									margin-right: 20rpx;
+									font-weight: bold;
+									font-size: 28rpx;
+									color: #f57f32;
+								}
+
+								.right-numb {
+									font-size: 24rpx;
+									color: #858797;
+								}
+							}
+						}
+
+						.r-r {
+							.r-item {
+								align-items: center;
+							}
+						}
+					}
+				}
+
+				.item-allnumb-box {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					font-weight: bold;
+
+					.allnumb-left {
+						display:flex;
+						justify-content:start;
+						 align-items: center;
+						font-size: 32rpx;
+						.img{
+							display:block;
+						}
+					}
+
+					.allnumb-right {
+						font-size: 26rpx;
+						color: #f57f32;
+
+						.r-text {
+							color: #000;
+						}
+					}
+				}
+			}
+		}
+	}
+
+	.item-bottom {
+		width: 100%;
+		margin-top: 20rpx;
+
+		.btn {
+			height: 70rpx;
+			background-color: rgba(248, 213, 53, 0.8);
+			color: #4e5059;
+			font-size: 28rpx;
+			text-align: center;
+			line-height: 70rpx;
+			border-radius: 20rpx;
+		}
+	}
+
+	.gray-color {
+		color: #858797;
+	}
+
+	::deep .u-tabs__wrapper__nav__item__text {
+		font-size: 30px;
+	}
+</style>

+ 319 - 92
src/pageMerchant/storeModule/appointList.vue

@@ -1,93 +1,320 @@
-<template>
-  <view class="appointList">
-    <view v-for="item in appointList" :key="item.id" class="appoint">
-      <view class="fl-flex fl-justify-between">
-        <view>
-          {{ item.mobile }}
-          <text class="f-s-22" style="color: #999999"> (预留手机) </text>
-        </view>
-        <u-icon name="phone" color="#2979ff" size="24" @click="handlerMakePhone(item.mobile)" />
-      </view>
-      <view class="line"></view>
-      <view class="fl-flex fl-align-center">
-        <image
-          :src="item.simpleMerchantVO.logo"
-          mode="scaleToFill"
-          style="width: 200rpx; height: 200rpx"
-          v-if="item.simpleMerchantVO.logo"
-        />
-        <image
-          src="/static/QR57a.jpg"
-          v-else
-          mode="scaleToFill"
-          style="width: 200rpx; height: 200rpx"
-        />
-
-        <view class="u-p-l-10">
-          <view class="f-s-32" style="font-weight: bold">服务名称服务</view>
-          <view style="margin: 10rpx 0">{{ $u.timeFormat(item.appointTime) || '--' }}</view>
-          <view>{{ item.simpleMerchantVO.address || '--' }}</view>
-        </view>
-      </view>
-    </view>
-  </view>
-</template>
-
-<script>
-import { getAppointListApi } from '@/api/merchant/order';
-export default {
-  data() {
-    return {
-      params: {
-        offset: 1,
-        size: 10,
-      },
-      appointList: [],
-      list: {},
-    };
-  },
-  created() {
-    let { merchant } = this.$store.state.data.merchantInfo;
-    this.list = merchant;
-  },
-  mounted() {
-    this.getAppointList();
-  },
-
-  methods: {
-    async getAppointList() {
-      let result = Object.assign({}, { ...this.params }, { merchantId: this.list.id });
-      let res = await getAppointListApi({ ...result });
-
-      if (res.code === 'OK') {
-        this.appointList = res.data;
-      }
-    },
-
-    handlerMakePhone() {
-      uni.makePhoneCall({
-        phoneNumber: '114', //仅为示例
-      });
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.appointList {
-  .appoint {
-    margin: 0 20rpx;
-    padding: 20rpx;
-    background-color: #fff;
-    margin-bottom: 20rpx;
-    border-radius: 20rpx;
-
-    .line {
-      height: 2rpx;
-      width: 100%;
-      background-color: #eee;
-      margin: 5rpx 0;
-    }
-  }
-}
+<template>
+	<view class="appointList">
+		<!-- <view v-for="item in appointList" :key="item.id" class="appoint">
+      <view class="fl-flex fl-justify-between">
+        <view>
+          {{ item.mobile }}
+          <text class="f-s-22" style="color: #999999"> (预留手机) </text>
+        </view>
+        <u-icon name="phone" color="#2979ff" size="24" @click="handlerMakePhone(item.mobile)" />
+      </view>
+      <view class="line"></view>
+      <view class="fl-flex fl-align-center">
+        <image
+          :src="item.simpleMerchantVO.logo"
+          mode="scaleToFill"
+          style="width: 200rpx; height: 200rpx"
+          v-if="item.simpleMerchantVO.logo"
+        />
+        <image
+          src="/static/QR57a.jpg"
+          v-else
+          mode="scaleToFill"
+          style="width: 200rpx; height: 200rpx"
+        />
+
+        <view class="u-p-l-10">
+          <view class="f-s-32" style="font-weight: bold">服务名称服务</view>
+          <view style="margin: 10rpx 0">{{ $u.timeFormat(item.appointTime) || '--' }}</view>
+          <view>{{ item.simpleMerchantVO.address || '--' }}</view>
+        </view>
+      </view>
+    </view> -->
+
+		<view class="content">
+			<ren-calendar ref='ren' :markDays='markDays' :headerBar='true' :open="false" @onDayClick='onDayClick'></ren-calendar>
+		</view>
+		
+		<!-- 订单 -->
+		<view class="order">
+			<view class="order-box">
+				<view class="order-item" v-for="(item, index) of appointList" :key="index">
+					
+					<view class="item-allnumb-box">
+						<view class="allnumb-left"> 
+							<image class="img" src="@/static/QR57a.jpg"  style="width: 50rpx; height: 50rpx"   />
+							<span>用户名</span>
+						</view>
+					 <view class="allnumb-right" :style="{color: getStatusColor(item.status)}">
+					    {{ getStatusText(item.status) }}
+					  </view>
+					</view>
+		
+					<u-line margin="20rpx 0"></u-line>
+		
+					<view class="item-center" :key="idx" v-for="(itm, idx) of item.goodsInfo">
+						<view class="center-left">
+							<image :src="itm.goodsPic" class="img"></image>
+						</view>
+						<view class="center-right">
+							<view class="r-l">
+								<view class="right-name"> {{ itm.goodsName }} </view>
+								<view class="right-descript"> 测试商品描述111 </view>
+								<view class="l-box">
+									<view class="right-price"> ¥{{ itm.goodsPrice }} </view>
+									<view class="right-numb"> ×{{ itm.goodsQuantity }} </view>
+								</view>
+							</view>
+						</view>
+					</view>
+		
+					<view class="item-allnumb-box">
+						<view class="allnumb-left"></view>
+						<view class="allnumb-right">
+							<span class="r-text">实付款</span>¥{{ item.payAmount }}
+						</view>
+					</view>
+					
+					<u-line margin="20rpx 0" dashed="true"></u-line>
+		
+					<view class="item-top">
+						<view class="top-left gray-color">订单编号 : {{ item.orderSn }}</view>
+						<view class="top-right">{{ type_name }}</view>
+					</view>
+					<view class="item-top">
+						<view class="top-left gray-color">下单时间 : {{ formatTime1( item.createTime) }}</view>
+						<view class="top-right"></view>
+					</view>
+					<view class="item-top">
+						 <view  class="top-left gray-color">预约时间: {{ formatTime1(item.createTime) }}</view>
+						   
+					</view>
+				</view>
+			</view>
+			<view  style="margin-top: 40rpx" v-if="appointList.length === 0" >
+				<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" />
+			</view>
+			
+		</view>
+
+	</view>
+</template>
+
+<script>
+	import {
+		// getAppointListApi,
+		getMerchantListApi
+	} from '@/api/merchant/order';
+	export default {
+		data() {
+			return {
+				// params: {
+				// 	offset: 1,
+				// 	size: 10,
+				// },
+				appointList: [],
+				list: {},
+				curDate: '',
+				markDays: [],
+				params: {
+					pageNum: 1,
+					pageSize: 10,
+				},
+			};
+		},
+		created() {
+			let {
+				merchant
+			} = this.$store.state.data.merchantInfo;
+			this.list = merchant;
+			let today = this.$refs.ren.getToday().date;
+			this.curDate = today;
+			this.markDays.push(today);
+			console.log(this.curDate)
+		},
+		mounted() {
+			this.getMerchantList();
+		},
+		onReady() {
+			 
+		},
+		methods: {
+			onDayClick(data) {
+				console.log(data.date)
+				this.curDate = data.date;
+			},
+			async getMerchantList() {
+				let result = Object.assign({}, {paging: `${this.params.pageNum},${this.params.pageSize}`}, {
+					merchantId: this.list.id,
+					status: 'PENDING',
+					date: this.curDate
+				});
+				let res = await getMerchantListApi({
+					...result
+				});
+				console.log(res, "sdaasdsas")
+			},
+			getStatusColor(status) {
+			      switch (status) {
+			        case 1:
+			          return 'blue';
+			        case 2:
+			          return 'red';
+			        case 3:
+			          return 'orange';
+			        default:
+			          return 'black';
+			      }
+			    },
+			    getStatusText(status) {
+			      switch (status) {
+			        case 1:
+			          return '待处理';
+			        case 2:
+			          return '已取消';
+			        case 3:
+			          return '已完成';
+			        default:
+			          return '';
+			      }
+			    },
+				formatTime1(timestamp) {
+				  const date = new Date(timestamp * 1000); // 转换为毫秒
+				  const year = date.getFullYear();
+				  const month = ('0' + (date.getMonth() + 1)).slice(-2);
+				  const day = ('0' + date.getDate()).slice(-2);
+				  const hour = ('0' + date.getHours()).slice(-2);
+				  const minute = ('0' + date.getMinutes()).slice(-2);
+				  const second = ('0' + date.getSeconds()).slice(-2);
+				  
+				  return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
+				}
+			
+			
+			// async getAppointList() {
+			//   let result = Object.assign({}, { ...this.params }, { merchantId: this.list.id });
+			//   let res = await getAppointListApi({ ...result });
+
+			//   if (res.code === 'OK') {
+			//     this.appointList = res.data;
+			//   }
+			// },
+		},
+	};
+</script>
+
+<style lang="scss" scoped>
+	.order {
+		margin-top: 10px;
+		padding: 10rpx 20rpx 20rpx;
+		box-sizing: border-box;
+	
+		.order-box {
+			.order-item {
+				margin-bottom: 20rpx;
+				background-color: #fff;
+				border-radius: 20rpx;
+				padding: 20rpx;
+				box-shadow: 0 8rpx 15rpx 0 rgba(0, 0, 0, 0.08);
+	
+				.item-top {
+					display: flex;
+					justify-content: space-between;
+					margin-bottom: 10rpx;
+				}
+	
+				.item-center {
+					display: flex;
+					align-items: center;
+					margin-bottom: 10rpx;
+	
+					.center-left {
+						height: 160rpx;
+	
+						.img {
+							width: 160rpx;
+							height: 160rpx;
+						}
+					}
+	
+					.center-right {
+						width: 100%;
+						height: 160rpx;
+						display: flex;
+						justify-content: space-between;
+						margin-left: 20rpx;
+	
+						.r-l {
+							display: flex;
+							flex-direction: column;
+							justify-content: space-around;
+	
+							.right-name {
+								color: #4d5671;
+								font-size: 32rpx;
+								font-weight: bold;
+							}
+	
+							.right-descript {
+								font-size: 28rpx;
+								color: #858797;
+							}
+	
+							.l-box {
+								display: flex;
+								font-size: 24rpx;
+								align-items: center;
+								font-style: italic;
+	
+								.right-price {
+									margin-right: 20rpx;
+									font-weight: bold;
+									font-size: 28rpx;
+									color: #f57f32;
+								}
+	
+								.right-numb {
+									font-size: 24rpx;
+									color: #858797;
+								}
+							}
+						}
+	
+						.r-r {
+							.r-item {
+								align-items: center;
+							}
+						}
+					}
+				}
+	
+				.item-allnumb-box {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					font-weight: bold;
+	
+					.allnumb-left {
+						display:flex;
+						justify-content:start;
+						 align-items: center;
+						font-size: 32rpx;
+						.img{
+							display:block;
+						}
+					}
+	
+					.allnumb-right {
+						font-size: 26rpx;
+						color: #f57f32;
+	
+						.r-text {
+							color: #000;
+						}
+					}
+				}
+			}
+		}
+	}
+	
 </style>

+ 4 - 4
src/pageMerchant/storeModule/commodityWriteOff.vue

@@ -1,18 +1,18 @@
 <template>
-	<view>
+	<view style="background-color: white;">
 		<view class="img">
-			<image slot="icon" src="@/static/tools.jpg" style="width: 400rpx; height: 400rpx" />
+			<image slot="icon" src="@/static/order/扫一扫核销@2x.png" style="width: 400rpx; height: 400rpx" />
 		</view>
 		<view class="but">
 			<button @click='scanCode()'>扫一扫核销</button>
 		</view>
 		<view class="bot">
 			<view class="tab" @click="toUrl()">
-				<image src="../../static/icon/QR57a.jpg" style="width: 150rpx; height: 150rpx"></image>
+				<image src="@/static/order/查询核销@2x.png" style="width: 150rpx; height: 150rpx"></image>
 				<view>查询核销</view>
 			</view>
 			<view class="tab" @click="verificationList()">
-				<image src="../../static/icon/QR57a.jpg" style="width: 150rpx; height: 150rpx"></image>
+				<image src="@/static/order/核销记录@2x.png" style="width: 150rpx; height: 150rpx"></image>
 				<view>核销记录</view>
 			</view>
 		</view>

+ 3 - 3
src/pageMerchant/storeModule/components/queryWriteOff.vue

@@ -1,7 +1,7 @@
 <template>
-	<view>
+	<view style="background-color: white;">
 		<view class="img">
-			<image slot="icon" src="@/static/tools.jpg" style="width: 200rpx; height: 200rpx" />
+			<image slot="icon" src="@/static/order/搜索@2x.png" style="width: 250rpx; height: 200rpx" />
 		</view>
 		<view class="queryWriteOff">
 			<input type="text" :value="vakue" placeholder="请输入订单号查询" />
@@ -46,7 +46,7 @@
 
 <style lang="scss" scoped>
 	.img {
-		margin-top: 100rpx;
+		padding-top: 100rpx;
 
 		image {
 			display: block;

+ 4 - 3
src/pageMerchant/storeModule/shopManage.vue

@@ -214,14 +214,14 @@
 
         getCategories(this.merchantId).then(res => {
           if (res.code == 'OK') {
-            console.log(res);
+            console.log(res,"这是res");
             getGoodsList({
               merchantId: this.merchantId,
               size: 100,
               goodsName: this.search,
               status: this.delete_type ? 'OFFLINE' : 'ONLINE'
             }).then(result => {
-
+				console.log(result,"这是result")
               if (result.code == 'OK' && result.data && res.data) {
                 res.data.forEach(obj => {
                   result.data.forEach(item => {
@@ -230,7 +230,8 @@
                     }
 
                   })
-                })
+                })
+				console.log(res.data,"这是res.data")
                 this.tabbar = res.data
 
                 if (this.delete_type) {

+ 2 - 2
src/pageMerchant/tabbar/mine.vue

@@ -18,12 +18,12 @@
 						<view v-if=" merchantInfo.mobileNumber" class="text">
 							+86 {{ merchantInfo.mobileNumber }}
 						</view>
-						<view v-else class="text">
+						<!-- <view v-else class="text">
 							<text style="color: #f6bf3f"> 您当前还未认证,</text>
 							<text @click="$Router.push('/pageMerchant/mineModule/certification/index')">
 								去认证>
 							</text>
-						</view>
+						</view> -->
 					</view>
 				</view>
 				<view class="status" :style="{ 'background-color': getStatusColor(state) }" @click="show = true">

+ 135 - 96
src/pageMerchant/tabbar/order.vue

@@ -1,96 +1,135 @@
-<template>
-  <view>
-    <view class="order">
-      <view style="background-color: #fff; padding: 15rpx">
-        <u-tabs :list="list1" lineWidth="30" lineColor="$uni-bg-color-primary" :activeStyle="{
-            color: '#000',
-            fontWeight: 'bold',
-            fontSize: '32rpx',
-            transform: 'scale(1.05)',
-            marginBottom: '15rpx',
-          }" :inactiveStyle="{
-            color: '#333',
-            fontSize: '30rpx',
-            transform: 'scale(1)',
-            marginBottom: '15rpx',
-          }" itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;" @click="handlerChangeItem"></u-tabs>
-      </view>
-
-      <orderItem :list="orderList" :typeStyle.sync="typeStyle"></orderItem>
-    </view>
-    <tabbar currentTab="merchantOrder" />
-  </view>
-</template>
-
-<script>
-  import orderItem from './orderItem.vue';
-  import {
-    getOrderListApi
-  } from '@/api/merchant/order';
-  export default {
-    components: {
-      orderItem
-    },
-    data() {
-      return {
-        list1: [{
-            id: '0',
-            name: '全部'
-          },
-          {
-            id: '1',
-            name: '待核销'
-          },
-          {
-            id: '2',
-            name: '已核销'
-          },
-          {
-            id: '3',
-            name: '退款'
-          },
-        ],
-        orderList: [],
-        params: {
-          pageNum: 1,
-          pageSize: 10,
-        },
-        typeStyle: 0,
-        status: '0',
-      };
-    },
-
-    methods: {
-      // 点击切换顶部导航栏
-      handlerChangeItem(item) {
-        this.typeStyle = item.index;
-        this.getOrderList(item.id);
-      },
-
-      async getOrderList(status) {
-        let result = Object.assign({}, {
-          paging: `${this.params.pageNum},${this.params.pageSize}`,
-          status: status || 0,
-        }, );
-        let res = await getOrderListApi({
-          ...result
-        });
-        if (res.code === 'OK') {
-          this.orderList = res.data.records;
-        }
-      },
-    },
-
-    created() {
-      this.getOrderList();
-    },
-  };
-</script>
-
-<style lang="scss" scoped>
-  .order {
-    min-height: calc(100vh - 80rpx);
-    background-color: $uni-bg-color-page;
-    padding-top: 80rpx;
-  }
-</style>
+<template>
+	<view>
+		<view class="order" style="position: relative;">
+			<view style="background-color: #fff; padding-top: 160rpx;position: fixed; top: 0; left: 0; right: 0; z-index: 999;">
+				<u-tabs :list="list" lineWidth="30" lineColor="$uni-bg-color-primary" :activeStyle="{
+            color: '#000',
+            fontWeight: 'bold',
+            fontSize: '32rpx',
+            transform: 'scale(1.05)',
+            marginBottom: '15rpx',
+          }" :inactiveStyle="{
+            color: '#333',
+            fontSize: '30rpx',
+            transform: 'scale(1)',
+            marginBottom: '15rpx',
+          }" itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;" @click="handlerChangeItem"  ></u-tabs>
+			</view>
+			
+			
+			<!-- <orderItem :list="orderList" :typeStyle.sync="typeStyle" v-if="status == 5"></orderItem> -->
+			
+			<orderList :list="orderList" :typeStyle.sync="typeStyle" ></orderList>
+
+		</view>
+		<tabbar currentTab="merchantOrder" />
+	</view>
+</template>
+
+<script>
+	// import orderItem from './orderItem.vue';
+	import orderList from '../components/orderList.vue'
+	import {
+		getOrderListApi,
+		getAppointListApi
+	} from '@/api/merchant/order';
+	export default {
+		components: {
+			// orderItem,
+			orderList
+		},
+		data() {
+			return {
+				list: [{
+						id: '0',
+						name: '全部'
+					},
+					{
+						id: '1',
+						name: '待核销'
+					},
+					{
+						id: '2',
+						name: '已核销'
+					},
+					{
+						id: '3',
+						name: '已退款'
+					},
+					{
+						id: '4',
+						name: '已过期'
+					},
+					// {
+					// 	id: '5',
+					// 	name: '预约列表'
+					// },
+				],
+				orderList: [],
+				params: {
+					pageNum: 1,
+					pageSize: 10,
+				},
+				typeStyle: 0,
+				status: '0',
+			};
+		},
+
+		methods: {
+			// 点击切换顶部导航栏
+			handlerChangeItem(item) {
+				this.typeStyle = item.index;
+				this.status = item.id
+				this.params = {
+					pageNum: 1,
+					pageSize: 10,
+				}
+				this.getOrderList(item.id);
+				// if(item.id == 5){
+				// 	this.getListMerchantReservations()
+				// }else{
+					
+				// this.getOrderList(item.id);
+				// }
+			},
+
+			async getOrderList(status) {
+				let result = Object.assign({}, {
+					paging: `${this.params.pageNum},${this.params.pageSize}`,
+					status: status || 0,
+				}, );
+				let res = await getOrderListApi({
+					...result
+				});
+				if (res.code === 'OK') {
+					this.orderList = res.data.records;
+				}
+			},
+			// async getListMerchantReservations(){
+			// 	let result = Object.assign({}, {
+			// 		offset: this.params.pageNum ,
+			// 		size:this.params.pageSize,
+			// 		merchantId:this.$store.state.data.merchantInfo.merchant.id,
+			// 	}, );
+			// 	let res = await getAppointListApi({
+			// 		...result
+			// 	});
+			// 	if (res.code === 'OK') {
+			// 		this.orderList = res.data;
+			// 	}
+			// }
+		},
+
+		created() {
+			this.getOrderList();
+		},
+	};
+</script>
+
+<style lang="scss" scoped>
+	.order {
+		min-height: calc(100vh - 160rpx);
+		background-color: $uni-bg-color-page;
+		padding-top: 240rpx;
+	}
+</style>

+ 6 - 1
src/pageMerchant/tabbar/orderItem.vue

@@ -57,7 +57,12 @@
           <view class="r-btn" v-if="typeStyle == 1" @click="handlerCloseOrder"> 关闭交易 </view>
         </view>
       </view>
-    </view>
+    </view>
+	<!-- list为空时 -->
+	<view  style="margin-top: 40rpx" v-if="list.length === 0" >
+		<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" />
+	</view>
+	
   </view>
 </template>
 

BIN
src/static/order/扫一扫核销@2x.png


BIN
src/static/order/搜索@2x.png


BIN
src/static/order/查询核销@2x.png


BIN
src/static/order/核销记录@2x.png


+ 4 - 0
src/uni_modules/tmt-calendar/changelog.md

@@ -0,0 +1,4 @@
+## 1.0.1(2022-04-26)
+修复日期少一天的bug
+## 1.0.0(2022-04-07)
+日历组件

+ 417 - 0
src/uni_modules/tmt-calendar/components/tmt-calendar/tmt-calendar.vue

@@ -0,0 +1,417 @@
+<template>
+	<view class="container" :style="{background}">
+		<view class="tmt-header">
+			<view class="select-wrap" :style="{color:actionColor}">
+				<view class="p20" @click="changMonth(-1)">
+					<view class="arrow-left" :style="[{'border-left-color':actionColor},{'border-bottom-color':actionColor}]"></view>
+				</view>
+				<view class="time">
+					{{ `${currentYearMonth.year}年${currentYearMonth.month>=10?currentYearMonth.month:'0'+currentYearMonth.month}月` }}
+				</view>
+				<view class="p20" @click="changMonth(1)">
+					<view class="arrow-right" :style="[{'border-left-color':actionColor},{'border-right-color':actionColor}]"></view>
+				</view>
+			</view>
+			<view class="back" :style="[{color:backColor},{background:backBg}]" @click="init(true)">
+				返回本月
+			</view>
+		</view>
+		<view class="tmt-content">
+			<view class="tmt-week-wrap">
+				<view class="cell week-item" :style="{color:weekColor}" v-for="(item,index) in week" :key="index">{{ item.label }}</view>
+			</view>
+			<view class="tmt-day-wrap" :style="[{height:unfold ?contentHeight:'88rpx'},{color:dayColor}]">
+				<view class="cell" v-for="index of blankDay"></view>
+				<view class="cell" v-for="(item,index) in daysArr" @click="changeDay(item)">
+					<view
+						class="dayText"
+                        :style="(current.year==item.year && current.month==item.month && current.day==item.day)?'background:'+selectBg:''"
+                        >
+						{{ item.today?'今':item.day }}
+                        <view class="point" :style="{background:pointColor}" v-if="item.point"></view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view v-if="showBtn" class="tmt-footer" @click="unfold =!unfold ">
+			<view :class="['arrow-down',{on:unfold }]" :style="[{'border-left-color':unfoldBtnColor},{'border-bottom-color':unfoldBtnColor}]"></view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "calendar",
+		data() {
+			return {
+				unfold: true,
+				week: [{
+						label: '一',
+						value: 1
+					},
+					{
+						label: '二',
+						value: 2
+					},
+					{
+						label: '三',
+						value: 3
+					},
+					{
+						label: '四',
+						value: 4
+					},
+					{
+						label: '五',
+						value: 5
+					},
+					{
+						label: '六',
+						value: 6
+					},
+					{
+						label: '日',
+						value: 7
+					},
+				],
+				blankDay: 0, //空白天数
+				today: {}, //当天
+				current: {}, //当前的年月
+				daysArr: [],
+				list: [], //需要下标的日期
+				currentYearMonth: {}, //当前年月
+			};
+		},
+		computed: {
+			contentHeight() {
+				let height = Math.ceil((this.blankDay + this.daysArr.length) / 7) * 88
+				return height + 'rpx'
+			}
+		},
+		props: {
+			pointList: {
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			defaultDate: {
+				type: String,
+				default () {
+					return ''
+				}
+			},
+			showBtn: {
+				type: Boolean,
+				default () {
+					return true
+				}
+			},
+			show: {
+				type: Boolean,
+				default () {
+					return true
+				}
+			},
+			background: {
+				type: String,
+				default () {
+					return 'linear-gradient(45deg, #5A24A6 0%, #7E3CB5 100%)'
+				}
+			},
+			weekColor: {
+				type: String,
+				default () {
+					return '#fff'
+				}
+			},
+			dayColor: {
+				type: String,
+				default () {
+					return '#fff'
+				}
+			},
+            selectBg:{
+				type: String,
+				default () {
+					return 'linear-gradient(180deg, #FF855E 0%, #ED6337 100%)'
+				}
+            },
+            pointColor:{
+				type: String,
+				default () {
+					return '#fff'
+				}
+            },
+            backColor:{
+				type: String,
+				default () {
+					return '#fff'
+				}
+            },
+            backBg:{
+				type: String,
+				default () {
+					return 'rgba(255, 255, 255, 0.19)'
+				}
+            },
+            actionColor:{
+				type: String,
+				default () {
+					return '#fff'
+				}
+            },
+            unfoldBtnColor:{
+				type: String,
+				default () {
+					return '#fff'
+				}
+            }
+		},
+		created() {
+			this.unfold = this.show
+			this.list = this.pointList
+			this.fomatePointTime()
+			this.init(this.defaultDate == '')
+		},
+		methods: {
+			changMonth(num) {
+				const {
+					year,
+					month
+				} = this.getMonthYear(num)
+				this.makeCalendar(year, month)
+			},
+			// 获取前几个月,未来几个月的年份和月份
+			getMonthYear(num) {
+				let month = this.currentYearMonth.month
+				let year = this.currentYearMonth.year
+				let year2 = year
+				let month2 = month + num
+				if (month + num <= 0) {
+					// 之前年份
+					year2 = year - 1 - parseInt(Math.abs(month2) / 12)
+					month2 = 12 - (Math.abs(month2) % 12)
+				} else if ((month2 / 12) > 1) {
+					// 之后年份
+					year2 = year + (month2 % 12 == 0 ? 0 : parseInt(month2 / 12))
+					month2 = parseInt(month2 % 12) == 0 ? 12 : parseInt(month2 % 12)
+				}
+				return {
+					year: year2,
+					month: month2
+				}
+			},
+			changeDay(item) {
+				this.current = item
+				let {year,month,day} = item
+				this.$emit('changeDate',{year,month,day})
+			},
+			// 获取某年某月的天数
+			getDays(year, month) {
+				let now = new Date(year, month, 0)
+				return now.getDate()
+			},
+			//获取某一天为星期几
+			getWeekByDay(time) {
+				let day = new Date(Date.parse(time.replace(/-/g, '/'))); //将日期值格式化
+				return day.getDay() == 0 ? 7 : day.getDay();
+			},
+			init(nowTime) {
+				let setTime = nowTime ? new Date() : new Date(this.defaultDate)
+				let year = setTime.getFullYear()
+				let month = setTime.getMonth() + 1
+				let day = setTime.getDate()
+				if(!(this.defaultDate!='' && nowTime) ){
+					this.current = {
+						year,
+						month,
+						day,
+					}
+				}
+				this.today = {
+					year: new Date().getFullYear(),
+					month: new Date().getMonth() + 1,
+					day: new Date().getDate()
+				}
+				this.makeCalendar(year, month)
+			},
+			fomatePointTime() {
+				let pointList = this.list
+				pointList = pointList.map(item => {
+					item = item.replace(/-/g, '/') //期值格式化
+					let timeArr = item.split('/')
+					let timeStr = ''
+					timeArr.map(time => {
+						time = parseInt(time)
+						timeStr += time
+						return time
+					})
+					return timeStr
+				})
+				this.list = pointList
+			},
+			makeCalendar(year, month) {
+				let today = this.today
+				let days = this.getDays(year, month) //当月天数
+                console.log(days)
+				let firstDayWeek = this.getWeekByDay(`${year}-${month}-1`) //获取每个月第一天的星期
+				let weekIndex = this.week.findIndex(item => {
+					return item.value == firstDayWeek
+				})
+				let daysArr = []
+				for (let i = 1; i <= days; i++) {
+					let point = this.list.findIndex(item => {
+						return item == String(year) + String(month) + String(i)
+					}) != -1
+					daysArr.push({
+						year,
+						month,
+						day: i,
+						point,
+						today: year == today.year && month == today.month && i == today.day
+					})
+				}
+				this.currentYearMonth = {
+					year,
+					month
+				}
+				this.daysArr = daysArr
+				this.blankDay = weekIndex == -1 ? 0 : weekIndex
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.p20 {
+		padding: 20upx;
+	}
+
+	.container {
+		padding: 0 20upx;
+	}
+
+	.tmt-header {
+		display: flex;
+		justify-content: space-between;
+		padding: 20upx 0;
+
+		.select-wrap {
+			display: flex;
+			align-items: center;
+
+			.arrow-left {
+				width: 18upx;
+				height: 18upx;
+				transform: rotate(45deg);
+                border-left-width: 1upx;
+                border-bottom-width: 1upx;
+                border-left-style: solid;
+                border-bottom-style: solid;
+			}
+
+			.time {
+				font-size: 36upx;
+				margin: 0 20upx;
+			}
+
+			.arrow-right {
+				width: 18upx;
+				height: 18upx;
+				transform: rotate(45deg);
+                border-top-width: 1upx;
+                border-right-width: 1upx;
+                border-top-style: solid;
+                border-right-style: solid;
+			}
+		}
+
+		.back {
+			padding: 0 20upx;
+			font-size: 24upx;
+			height: 52upx;
+			color: #fff;
+			line-height: 52upx;
+			background: rgba(255, 255, 255, .19);
+			text-align: center;
+			border-radius: 30upx;
+		}
+	}
+
+	.cell {
+		width: 14.28%;
+		height: 88upx;
+		text-align: center;
+		line-height: 88upx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		position: relative;
+
+		.point {
+			width: 6upx;
+			height: 6upx;
+			position: absolute;
+			bottom: 3upx;
+			border-radius: 50%;
+			left: 50%;
+			transform: translateX(-50%);
+		}
+
+		.dayText {
+			width: 56upx;
+			height: 56upx;
+			text-align: center;
+			line-height: 56upx;
+			border-radius: 50%;
+
+			&.on {
+				background: linear-gradient(180deg, #FF855E 0%, #ED6337 100%);
+			}
+		}
+
+	}
+
+	.tmt-content {
+		padding-bottom: 20upx;
+
+		.tmt-week-wrap {
+			display: flex;
+
+			.week-item {
+				font-size: 36upx;
+			}
+		}
+
+		.tmt-day-wrap {
+			display: flex;
+			flex-wrap: wrap;
+			transition: height .3s;
+			overflow: hidden;
+		}
+	}
+
+	.tmt-footer {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		height: 80upx;
+		margin-top: -36upx;
+
+		.arrow-down {
+			width: 18upx;
+			height: 18upx;
+			transform: rotate(-45deg);
+                border-left-width: 1upx;
+                border-bottom-width: 1upx;
+                border-left-style: solid;
+                border-bottom-style: solid;
+			transition: all .3s;
+
+			&.on {
+				transform: rotate(135deg);
+			}
+		}
+	}
+</style>

+ 80 - 0
src/uni_modules/tmt-calendar/package.json

@@ -0,0 +1,80 @@
+{
+  "id": "tmt-calendar",
+  "displayName": "tmt-calendar",
+  "version": "1.0.1",
+  "description": "tmt-calendar",
+  "keywords": [
+    "tmt-calendar"
+],
+  "repository": "",
+  "engines": {
+    "HBuilderX": "^3.1.0"
+  },
+  "dcloudext": {
+    "category": [
+        "前端组件",
+        "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "插件不采集任何数据",
+      "permissions": "无"
+    },
+    "npmurl": ""
+  },
+  "uni_modules": {
+    "dependencies": [],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "Vue": {
+          "vue2": "y",
+          "vue3": "u"
+        },
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "u",
+          "Edge": "u",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+          "QQ": "y"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        }
+      }
+    }
+  }
+}

+ 26 - 0
src/uni_modules/tmt-calendar/readme.md

@@ -0,0 +1,26 @@
+# 如何使用
+```html
+<template>
+	<tmt-calendar defaultDate="2021-11-03"  :point-list="['2022-03-20','2022-04-01','2022-04-02','2022-04-05']" :show="true" @changeDate="changeDate"></tmt-calendar>
+</template>
+```
+# 参数说明
+参数	|说明|	类型	|可选值|	默认值
+-------- | -----| -----| -----| -----
+pointList| 日期数组,控制日期底下的点 | Array|-|[]
+pointColor|点的颜色|String|-|#fff
+defaultDate| 默认选中的日期 | String |-|默认值为当天 (传YYYY-MM-DD 或者 YYYY/MM/DD格式日期)
+showBtn  | 是否显示 展开/折叠 按钮|Boolean|true / false|true
+show | 是否显示完整的日历|Boolean|true / false|true
+bckground| 日历背景颜色|String|-|linear-gradient(45deg, #5A24A6 0%, #7E3CB5 100%)
+weekColor| 星期的颜色|String|-|#fff
+dayColor|天数的颜色|String|-|#fff
+selectBg|选中的背景颜色|String|-|linear-gradient(180deg, #FF855E 0%, #ED6337 100%)
+backColor|返回按钮的字体颜色|String|-|#fff
+backBg|返回按钮的背景颜色|String|-|rgba(255, 255, 255, 0.19)
+actionColor|左上角操作区域的颜色|String|-|#fff
+unfoldBtnColor|底部 展开/折叠 按钮的颜色|String|-|#fff
+# 事件
+事件名成|说明|回调
+-------- | -----| -----|
+changeDate| 点击选择某一天时触发 | {year: 2022 , month: 4 , day: 7}