Selaa lähdekoodia

日期和样式

shish 4 vuotta sitten
vanhempi
commit
e10b961a39

+ 2 - 4
ghsApp/src/admin/custom/selectCustom.vue

@@ -16,10 +16,8 @@
               </div>
               <div class="tui-msg-content">
                 <span>{{ item.visitTime.substr(5,11) }}</span>
-                <span style="margin-left:30upx;width:70upx;font-weight:500">
-                  <text v-if="item.level == 1" style="color:green;">{{ item.levelName }}</text>
-                  <text v-else-if="item.level == 0" style="color:#999;">{{ item.levelName }}</text>
-                  <text v-else style="color:red;">{{ item.levelName }}</text>
+                <span style="margin-left:30upx;width:60upx;font-weight:500">
+                  <text>{{ item.levelName }}</text>
                 </span>
                 <span v-if="item.debtAmount > 0" class="debt-amount">欠款<span class="amount_num">{{parseFloat(item.debtAmount)}}</span></span>
               </div>

+ 1 - 1
ghsApp/src/admin/home/me.vue

@@ -18,7 +18,7 @@
         <view class="me-shop_content content_box">
           <view class="me-shop_top">
             <view class="shop-top_left">
-              <app-avatar-module :src="shopInfo.shopImg" :width="100" />
+              <image :src="shopInfo.shopImg" style="width:110upx;border-radius:100upx;" mode="widthFix"></image>
               <view class="top-info_box">
                 <view>
                   {{ shopInfo.shopName }}

+ 14 - 12
ghsApp/src/admin/home/member.vue

@@ -11,7 +11,7 @@
      <div class="list-wrap">
     <block v-if="!$util.isEmpty(list.data)">
       <block v-for="(item, index) in list.data" :key="index">
-        <tui-list-cell :arrow="true" @click="pageTo({url: '/pagesClient/member/detail',query: {id: item.id,},})">
+        <tui-list-cell :arrow="true" @click="pageTo({url: '/pagesClient/member/detail',query: {id: item.id}})">
           <div class="tui-msg-box">
             <img :src="item.avatar" class="tui-msg-pic" mode="widthFix" />
             <div class="tui-msg-item">
@@ -20,14 +20,16 @@
               </div>
               <div class="tui-msg-content">
                 <span>{{ item.visitTime.substr(5,11) }}</span>
-                <span style="margin-left:50upx;width:70upx;color:red;font-weight:500">
-                  <text v-if="item.level == 1"></text>
-                  <text v-else-if="item.level == 0" style="color:#999;">{{ item.levelName }}</text>
-                  <text v-else>{{ item.levelName }}</text>
+                <span style="margin-left:50upx;width:60upx;font-weight:500">
+                  <text>{{ item.levelName }}</text>
+                </span>
+                <span v-if="tabIndex == 1" class="debt-amount">消费
+                  <span class="amount_num">{{parseFloat(item.buyAmount)}}</span>
                 </span>
-                <span v-if="tabIndex == 1" class="debt-amount">总消费:<span class="amount_num">{{item.buyAmount}}</span></span>
                 <span v-else>
-                  <span v-if="item.debtAmount > 0" class="debt-amount">欠款:<span class="amount_num">{{item.debtAmount}}</span></span>
+                  <span v-if="item.debtAmount>0" class="debt-amount">欠款
+                    <span @click.stop="pageTo({url:'/pagesArrears/details',query:{id:item.id}})" class="amount_num">{{parseFloat(item.debtAmount)}}</span>
+                  </span>
                 </span>
               </div>
             </div>
@@ -81,11 +83,11 @@ export default {
           value: 0
         },
         {
-          name: "排行",
+          name: "消费排行",
           value: 1
         },
         {
-          name: "欠款",
+          name: "欠款排行",
           value: 2
         },
       ]
@@ -293,9 +295,10 @@ export default {
     line-height: 1;
     color: #9397a4;
     .debt-amount{
-      margin-left:45upx;
+      margin-left:20upx;
       .amount_num{
         color:red;
+        margin-left:5upx;
       }
     }
   }
@@ -308,7 +311,6 @@ export default {
   margin-right: 24upx;
   text-align: right;
   display: flex;
-  // flex-direction: column;
   justify-content: space-between;
   align-items: center;
 }
@@ -322,4 +324,4 @@ export default {
   display: inline-block;
   font-size: 30upx;
 }
-</style>
+</style>

+ 4 - 0
ghsApp/src/api/gys/index.js

@@ -19,3 +19,7 @@ export const getOrderDebtListApi = id => {
 export const clearOrderApi = id => {
 	return https.post("/purchase-clear/create-order", id);
 };
+
+export const getDebtList = data => {
+	return https.get("/purchase/debt-list", data);
+};

+ 9 - 4
ghsApp/src/pagesArrears/details.vue

@@ -1,4 +1,5 @@
 <template>
+<view class="app-content">
 	<view class="order-page">
 		<view class="top-view">
 			<view class="top-row">
@@ -9,7 +10,7 @@
 				<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName='时间' />
 			</view>
 		</view>
-		<view scroll-y class="shop-list">
+		<view class="shop-list">
 			<block v-if="!$util.isEmpty(detailsList)">
 				<DetailsItem
 					v-for="(item, index) in detailsList"
@@ -59,6 +60,7 @@
 			</template>
 		</modal-module>
 	</view>
+</view>
 </template>
 <script>
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
@@ -137,7 +139,7 @@ export default {
 		},
 		isModelFun(){
 			if (this.$util.isEmpty(this.selectList)) {
-				this.$msg("请选择还款订单");
+				this.$msg("请选择订单");
 				return;
 			}
 			this.isModel = true;
@@ -246,6 +248,8 @@ export default {
 	overflow: scroll;
 	.top-view {
 		padding: 30upx;
+		position:fixed;
+		width:100%;
 		background-color: #fff;
 		.top-row {
 			display: flex;
@@ -282,6 +286,7 @@ export default {
 		}
 	}
 	.shop-list {
+		margin-top:98upx;
 		padding: 20upx 30upx;
 		flex: 1;
 		padding-bottom: 100upx;
@@ -309,12 +314,12 @@ export default {
 			.price {
 				margin: 0 3upx;
 				color: $redColor;
-				font-size: 32upx;
+				font-size: 30upx;
 			}
 			.unit {
 				margin: 0 3upx;
 				color: $redColor;
-				font-size: 25upx;
+				font-size: 30upx;
 			}
 		}
 		.btn-view {

+ 1 - 1
ghsApp/src/pagesArrears/detailsItem.vue

@@ -12,7 +12,7 @@
 				<view class="mark">{{ info.addTime.substr(0,16) }}</view>
 			</view>
 			<view class="item-row">
-				<view class="price">金额:{{ parseFloat(info.realPrice) }}</view>
+				<view class="price">¥{{ parseFloat(info.realPrice) }}</view>
 				<view class="price" style="font-weight:normal;color:#3385FF;font-size:33upx;" @click.stop="goToDetai(info)">查看明细</view>
 			</view>
 		</view>

+ 29 - 26
ghsApp/src/pagesGys/details.vue

@@ -4,12 +4,12 @@
 		<view class="top-view">
 			<view class="top-row">
 				<view class="info-item">
-					<text class="name">供应商:</text>
 					<image class="logo" :src="ghsInfo.avatar"/>
 					<text class="name">
 						{{ ghsInfo.name}}
 					</text>
 				</view>
+				<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName='时间' />
 			</view>
 		</view>
 		<view scroll-y class="shop-list">
@@ -23,22 +23,13 @@
 		<view class="bar-view">
 			<template>
 				<view class="info-view">
-          <view
-            class="details-select"
-            @click="allCheck"
-          >
-            <text
-              class="iconfont iconxuanzhong"
-              v-if="isAllCheck"
-            > </text>
-            <text
-              class="iconfont iconweixuanzhong"
-              v-else
-            > </text>
-          </view>
+					<view class="details-select" @click="allCheck" >
+						<button class="admin-button-com blue mini-btn" v-if="isAllCheck">全不选</button>
+						<button class="admin-button-com blue mini-btn" v-else>全选</button>
+					</view>
 					已选 <text class="price">{{ selectList.length }}</text> 笔,
 					<text class="unit">¥</text>
-					<text class="price">{{ selectTotalAmount }}</text>
+					<text class="price">{{ parseFloat(selectTotalAmount) }}</text>
 				</view>
 			</template>
 			<view class="btn-view">
@@ -64,11 +55,11 @@
 <script>
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import DetailsItem from "./detailsItem";
-import { getOrderDebtListApi,clearOrderApi } from "@/api/gys/index";
+import { getDebtList,clearOrderApi } from "@/api/gys/index";
 import ModalModule from "@/components/plugin/modal";
-
+import DateSelect from "@/components/module/dateSelect";
 export default {
-	components: { AppWrapperEmpty, DetailsItem, ModalModule},
+	components: { AppWrapperEmpty, DetailsItem, ModalModule, DateSelect},
 	data() {
 		return {
 			ghsInfo: "",
@@ -79,6 +70,9 @@ export default {
       		isAllCheck: false,
 			showClearModel:false,
 			modifyPrice:0,
+			searchTime:'',
+			startTime:'',
+			endTime:''
 		};
 	},
 	onPullDownRefresh() {
@@ -128,9 +122,17 @@ export default {
 		}
 	},
 	methods: {
+		selectDateFn(val){
+			this.searchTime = val.searchTime
+			this.startTime = val.startTime
+			this.endTime = val.endTime
+			this.initData().then(res => {
+				uni.stopPullDownRefresh()
+			})
+		},
 		clearSelectedOrder(){
 			if (this.$util.isEmpty(this.selectList)) {
-				this.$msg("请选择还款订单");
+				this.$msg("请选择订单");
 				return;
 			}
 			this.showClearModel = true;
@@ -138,9 +140,7 @@ export default {
 		async initData() {
 			try {
 				this.listLoading = true;
-				const {
-					data: { ghsInfo, num, totalAmount, list }
-				} = await getOrderDebtListApi(this.option.id);
+				const { data: { ghsInfo, num, totalAmount, list } } = await getDebtList({id:this.option.id,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime});
 				this.ghsInfo = ghsInfo;
 				this.totalAmount = totalAmount;
 				this.num = num;
@@ -225,6 +225,8 @@ export default {
 	background-color: #f9fbfc;
 	overflow: scroll;
 	.top-view {
+		position:fixed;
+		width:100%;
 		padding: 30upx;
 		background-color: #fff;
 		.top-row {
@@ -262,6 +264,7 @@ export default {
 		}
 	}
 	.shop-list {
+		margin-top:98upx;
 		padding: 20upx 30upx;
 		flex: 1;
 		padding-bottom: 100upx;
@@ -287,14 +290,14 @@ export default {
 				color: #dddddd;
 			}
 			.price {
-				margin: 0 5upx;
+				margin: 0 3upx;
 				color: $redColor;
-				font-size: 32upx;
+				font-size: 30upx;
 			}
 			.unit {
-				margin: 0 10upx;
+				margin: 0 3upx;
 				color: $redColor;
-				font-size: 16upx;
+				font-size: 30upx;
 			}
 		}
 		.btn-view {

+ 7 - 4
ghsApp/src/pagesGys/detailsItem.vue

@@ -6,14 +6,17 @@
 		</view>
 		<view class="details-main">
 			<view class="item-header">
-				<text class="name">采购单 | {{info.orderSn}} </text>
+				<text class="name">采购单 {{info.orderSn}} </text>
 			</view>
 			<view class="item-row">
-				<view class="mark">{{ info.addTime }}</view>
+				<view class="mark">{{ info.addTime.substr(0,16) }}</view>
+			</view>
+			<view v-if="!$util.isEmpty(info.remark)" class="item-row">
+				<view class="mark" style="color:red;font-weight:bold;">{{ info.remark }}</view>
 			</view>
 			<view class="item-row">
-				<view class="price">金额:{{ info.realPrice }}</view>
-				<view class="price" style="font-weight:normal;color:#3385FF;font-size:30upx;" @click.stop="goToDetai(info)">查看明细</view>
+				<view class="price">¥{{ parseFloat(info.realPrice) }}</view>
+				<view class="price" style="font-weight:normal;color:#3385FF;font-size:33upx;" @click.stop="goToDetai(info)">查看明细</view>
 			</view>
 		</view>
 	</view>

+ 4 - 11
ghsApp/src/pagesPurchase/supplier.vue

@@ -16,12 +16,8 @@
               <view class="accumulative"></view>
             </view>
             <view class="store_btn">
-              <view class="btn_entrance" @click.stop="gotoDetailsEvent(item)" >
-                欠款订单
-              </view>
-              <view class="btn_entrance" @click.stop="pageTo({ url: '/admin/clear/list',query: {ghsId: item.id}})">
-                结账记录
-              </view>
+              <view class="btn_entrance" @click.stop="pageTo({ url: '/admin/clear/list',query: {ghsId: item.id}})"> 结账记录 </view>
+              <view class="btn_entrance" @click.stop="gotoDetailsEvent(item)" > 欠款订单 </view>
               <view class="btn_entrance" @click.stop="pageTo({url:'/pagesPurchase/order',query:{ghsId:item.id}})">采购记录</view>
               <view class="cg-button">采购</view>
             </view>
@@ -43,10 +39,7 @@ import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import { getList } from "@/api/ghs";
 import AppSearchModule from "@/components/module/app-search";
 export default {
-  components: {
-    AppWrapperEmpty,
-    AppSearchModule
-  },
+  components: { AppWrapperEmpty, AppSearchModule },
   data () {
     return {
       list: {
@@ -198,7 +191,7 @@ export default {
         & > .btn_entrance {
           display: inline-block;
           font-size: 26upx;
-          color: #979494;
+          color: #666666;
           padding: 10upx 20upx;
           margin-left: 20upx;
           text-decoration:underline;

+ 200 - 0
hdApp/src/components/module/dateSelect.vue

@@ -0,0 +1,200 @@
+<template>
+    <view class="select-bg_bx">
+        <view v-if="isShowTit" @click="switchCut" :class="['select-title',dropdownShow?'select_corlor':'']">
+            <text>{{defaultDateName}}</text>
+            <text v-if="placeholder" style="color: #ccc;">{{placeholder}}</text>
+            <i v-if="isShowMore" class="iconfont iconsanjiao_xia"></i>
+        </view>
+        <view v-else @click="switchCut" :class="['select-title',dropdownShow?'select_corlor':'']">
+          <text v-if="placeholder" style="color: #ccc;">{{placeholder}}</text>
+        </view>
+        <view class="select-mark-view" v-show="dropdownShow" @click="switchCut"></view>
+        <view v-if="dropdownShow" :style="{top}" class="select-fixed_bx">
+            <slot>
+                <view class="select-item-box">
+                    <view class="title">时间</view>
+                    <view class="item-child_box">
+                        <button
+                            v-for="(item,index) in getDictionariesInfo.dateDefaultOption"
+                            :key="index"
+                            @click="changeDateOption(item)"
+                            :class="['admin-button-com','mini-btn',selectItemId === item.id?'blue':'default']">
+                            {{item.name}}
+                        </button>
+                    </view>
+                </view>
+                <view class="select-item-box">
+                    <view class="title">时间段</view>
+                    <view class="item-child_box" >
+                        <view class="admin-button-com mini-btn default custom" @click="showDatePicker(0)">{{startDate || '选择开始日期'}}</view>
+                        <view class="admin-button-com mini-btn default custom" @click="showDatePicker(1)">{{endDate || '选择结束日期'}}</view>
+                        <view class="admin-button-com mini-btn blue custom" @click="customDateConfirm()">确认</view>
+                    </view>
+                </view>
+            </slot>
+        </view>
+        <mx-date-picker :show="showPicker" format="yyyy-mm-dd" type="date" :value="defaultPickerDate" :show-tips="true" @confirm="confirmPicker" @cancel="cancelPicker" />
+    </view>
+</template>
+<script>
+import DropdownList from "@/components/plugin/dropdown-list";
+import MxDatePicker from '@/components/mx-datepicker/mx-datepicker.vue';
+import {mapGetters} from "vuex";
+export default {
+    name:'dateSelect',
+    components:{
+        DropdownList,MxDatePicker
+    },
+    props:{
+        top:{
+            type: String,
+            default: 'auto'
+        },
+        selectItemId:{
+            type:[String,Number],
+            default:''
+        },
+        isShowTit:{
+            type: Boolean,
+            default: true
+        },
+        isShowMore:{
+            type: Boolean,
+            default: true
+        },
+        placeholder: {
+            type: String,
+            default: ''
+        },
+        defaultShowName:{
+            type: String,
+            default: '今天'
+        }
+    },
+    data(){
+        return {
+            defaultPickerDate:'',
+            showPicker: false,
+            dropdownShow: false,
+            selectItem:'',
+            startDate:'',
+            endDate:'',
+            dateIndex:0,
+            defaultDateName:'今天'
+        }
+    },
+	watch:{
+		defaultShowName: {
+			handler(newVal) {
+                this.defaultDateName = newVal
+            },
+            immediate:true
+        }
+    },
+    computed:{
+        ...mapGetters(["getDictionariesInfo"])
+    },
+    mounted(){
+        let nowDate = new Date();
+		let currentDate = nowDate.Format("yyyy-MM-dd")
+        this.defaultPickerDate = currentDate
+    },
+    onLoad(){
+    },
+    methods:{
+        showDatePicker(index){//显示
+            this.showPicker = true;
+            this.dateIndex = index
+        },
+        confirmPicker(e) {//选择
+             if(this.dateIndex == 0){
+                this.startDate = e.value
+             }else{
+                this.endDate = e.value
+             }
+             this.showPicker = false;
+        },
+        customDateConfirm() {
+            if(this.$util.isEmpty(this.startDate)){
+                this.$msg('请选择开始日期')
+                return false
+            }
+            if(this.$util.isEmpty(this.endDate)){
+                this.$msg('请选择开始日期')
+                return false
+            }
+            this.dropdownShow = false
+            this.defaultDateName = '时间段'
+            this.$emit('selectDateFn',{searchTime:'custom',startTime:this.startDate,endTime:this.endDate})
+        },
+        cancelPicker(){
+            this.showPicker = false;
+        },
+        switchCut(){
+            this.dropdownShow = !this.dropdownShow
+        },
+        changeDateOption(val){
+            this.dropdownShow = false;
+            this.defaultDateName = val.name;
+            this.$emit('selectDateFn',{searchTime:val.value})
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+.select-bg_bx {
+    .select-title {
+        color: #666666;
+        font-size: 26upx;
+        & .iconsanjiao_xia {
+            margin-left: 10upx;
+        }
+        &.select_corlor {
+            color: #3385FF;
+            & .iconsanjiao_xia {
+                transform: rotate(180deg);
+            }
+        }
+    }
+    .select-mark-view {
+        height: 100vh;
+        height: 100%;
+        position: fixed;
+        width: 100%;
+        background-color: rgba(0, 0, 0, 0.5);
+        left: 0;
+        top: 0upx;
+        z-index: 20;
+    }
+    & .select-fixed_bx {
+        position: fixed;
+        width: 100%;
+        background-color: #FFFFFF;
+        left: 0;
+        z-index: 29;
+        padding:120upx 30upx 40upx;
+        border-radius: 0upx 0upx 20upx 20upx;
+        transition: all 0.5s ease-in-out;
+        & .select-item-box {
+            & .title {
+                font-size: 24upx;
+                color: #333333;
+                font-weight: 600;
+                text-align: left;
+            }
+            & .item-child_box {
+                padding: 20upx 0 0;
+                align-items: center;
+                & .admin-button-com {
+                    margin-bottom: 20upx;
+                    padding: 18upx 50upx;
+                    margin-right: 20upx;
+                    &.custom {
+                        width: 100%;
+                    }
+                }
+            }
+        }
+    }
+}
+</style>

+ 819 - 0
hdApp/src/components/mx-datepicker/mx-datepicker.vue

@@ -0,0 +1,819 @@
+<template>
+	<view v-if="isShow" class="picker">
+		<!-- 日期选择器 -->
+		<view v-if="type!='time'" class="picker-modal">
+			<view class="picker-modal-header">
+				<view class="picker-icon picker-icon-zuozuo" :hover-stay-time="100" hover-class="picker-icon-active" @click="onSetYear('-1')"></view>
+				<view class="picker-icon picker-icon-zuo" :hover-stay-time="100" hover-class="picker-icon-active" @click="onSetMonth('-1')"></view>
+				<text class="picker-modal-header-title">{{title}}</text>
+				<view class="picker-icon picker-icon-you" :hover-stay-time="100" hover-class="picker-icon-active" @click="onSetMonth('+1')"></view>
+				<view class="picker-icon picker-icon-youyou" :hover-stay-time="100" hover-class="picker-icon-active" @click="onSetYear('+1')"></view>
+			</view>
+			<swiper class="picker-modal-body" :circular="true" :duration="200" :skip-hidden-item-layout="true" :current="calendarIndex" @change="onSwiperChange">
+				<swiper-item class="picker-calendar" v-for="(calendar,calendarIndex2) in calendars" :key="calendarIndex2">
+					<view class="picker-calendar-view" v-for="(week,index) in weeks" :key="index - 7">
+						<view class="picker-calendar-view-item">{{week}}</view>
+					</view>
+					<view class="picker-calendar-view" v-for="(date,dateIndex) in calendar" :key="dateIndex" @click="onSelectDate(date)">
+						<!-- 背景样式 -->
+						<view v-show="date.bgStyle.type" :class="'picker-calendar-view-'+date.bgStyle.type" :style="{background: date.bgStyle.background}"></view>
+						<!-- 正常和选中样式 -->
+						<view class="picker-calendar-view-item" :style="{opacity: date.statusStyle.opacity, color: date.statusStyle.color, background: date.statusStyle.background}">
+							<text>{{date.title}}</text>
+						</view>
+						<!-- 小圆点样式 -->
+						<view class="picker-calendar-view-dot" :style="{opacity: date.dotStyle.opacity, background: date.dotStyle.background}"></view>
+						<!-- 信息样式 -->
+						<view v-show="date.tips" class="picker-calendar-view-tips">{{date.tips}}</view>
+					</view>
+				</swiper-item>
+			</swiper>
+			<view class="picker-modal-footer">
+				<view class="picker-modal-footer-info">
+					<block v-if="isMultiSelect">
+						<view class="picker-display">
+							<text>{{beginText}}日期</text>
+							<text class="picker-display-text">{{BeginTitle}}</text>
+							<view v-if="isContainTime" class="picker-display-link" :hover-stay-time="100" hover-class="picker-display-link-active"
+							 :style="{color}" @click="onShowTimePicker('begin')">{{BeginTimeTitle}}</view>
+						</view>
+						<view class="picker-display">
+							<text>{{endText}}日期</text>
+							<text class="picker-display-text">{{EndTitle}}</text>
+							<view v-if="isContainTime" class="picker-display-link" :hover-stay-time="100" hover-class="picker-display-link-active"
+							 :style="{color}" @click="onShowTimePicker('end')">{{EndTimeTitle}}</view>
+						</view>
+					</block>
+					<block v-else>
+						<view class="picker-display">
+							<text>当前选择</text>
+							<text class="picker-display-text">{{BeginTitle}}</text>
+							<view v-if="isContainTime" class="picker-display-link" :hover-stay-time="100" hover-class="picker-display-link-active"
+							 :style="{color}" @click="onShowTimePicker('begin')">{{BeginTimeTitle}}</view>
+						</view>
+					</block>
+				</view>
+				<view class="picker-modal-footer-btn">
+					<view class="picker-btn" :hover-stay-time="100" hover-class="picker-btn-active" @click="onCancel">取消</view>
+					<view class="picker-btn" :style="{color}" :hover-stay-time="100" hover-class="picker-btn-active" @click="onConfirm">确定</view>
+				</view>
+			</view>
+		</view>
+		<!-- 时间选择器 -->
+		<view v-if="showTimePicker" class="picker">
+			<view class="picker-modal picker-time">
+				<view class="picker-modal-header">
+					<text class="picker-modal-header-title">选择日期</text>
+				</view>
+				<picker-view class="picker-modal-time" indicator-class="picker-modal-time-item" :value="timeValue" @change="onTimeChange">
+					<picker-view-column>
+						<view v-for="(v,i) in 24" :key="i">{{i<10?'0'+i:i}}时</view>
+					</picker-view-column>
+					<picker-view-column>
+						<view v-for="(v,i) in 60" :key="i">{{i<10?'0'+i:i}}分</view>
+					</picker-view-column>
+					<picker-view-column v-if="showSeconds">
+						<view v-for="(v,i) in 60" :key="i">{{i<10?'0'+i:i}}秒</view>
+					</picker-view-column>
+				</picker-view>
+				<view class="picker-modal-footer">
+					<view class="picker-modal-footer-info">
+						<view class="picker-display">
+							<text>当前选择</text>
+							<text class="picker-display-text">{{PickerTimeTitle}}</text>
+						</view>
+					</view>
+					<view class="picker-modal-footer-btn">
+						<view class="picker-btn" :hover-stay-time="100" hover-class="picker-btn-active" @click="onCancelTime">取消</view>
+						<view class="picker-btn" :style="{color}" :hover-stay-time="100" hover-class="picker-btn-active" @click="onConfirmTime">确定</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	/**
+	 * 工具函数库
+	 */
+	const DateTools = {
+		/**
+		 * 获取公历节日
+		 * @param date Date对象
+		 */
+		getHoliday(date) {
+			let holidays = {
+				'0101': '元旦',
+				'0214': '情人',
+				'0308': '妇女',
+				'0312': '植树',
+				'0401': '愚人',
+				'0501': '劳动',
+				'0504': '青年',
+				'0601': '儿童',
+				'0701': '建党',
+				'0801': '建军',
+				'0903': '抗日',
+				'0910': '教师',
+				'1001': '国庆',
+				'1031': '万圣',
+				'1224': '平安',
+				'1225': '圣诞'
+			};
+			let value = this.format(date, 'mmdd');
+			if (holidays[value]) return holidays[value];
+			return false;
+		},
+		/**
+		 * 解析标准日期格式
+		 * @param s 日期字符串
+		 * @return 返回Date对象
+		 */
+		parse: s => new Date(s.replace(/(年|月|-)/g, '/').replace(/(日)/g, '')),
+		/**
+		 * 比较日期是否为同一天
+		 * @param a Date对象
+		 * @param b Date对象
+		 * @return Boolean
+		 */
+		isSameDay: (a, b) => a.getMonth() == b.getMonth() && a.getFullYear() == b.getFullYear() && a.getDate() == b.getDate(),
+		/**
+		 * 格式化Date对象
+		 * @param d 日期对象
+		 * @param f 格式字符串
+		 * @return 返回格式化后的字符串
+		 */
+		format(d, f) {
+			var o = {
+				"m+": d.getMonth() + 1,
+				"d+": d.getDate(),
+				"h+": d.getHours(),
+				"i+": d.getMinutes(),
+				"s+": d.getSeconds(),
+				"q+": Math.floor((d.getMonth() + 3) / 3),
+			};
+			if (/(y+)/.test(f))
+				f = f.replace(RegExp.$1, (d.getFullYear() + "").substr(4 - RegExp.$1.length));
+			for (var k in o)
+				if (new RegExp("(" + k + ")").test(f))
+					f = f.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
+			return f;
+		},
+		/**
+		 * 用于format格式化后的反解析
+		 * @param s 日期字符串
+		 * @param f 格式字符串
+		 * @return 返回Date对象
+		 */
+		inverse(s, f) {
+			var o = {
+				"y": '',
+				"m": '',
+				"d": '',
+				"h": '',
+				"i": '',
+				"s": '',
+			};
+			let d = new Date();
+			if (s.length != f.length) return d;
+			for (let i in f)
+				if (o[f[i]] != undefined) o[f[i]] += s[i];
+			if (o.y) d.setFullYear(o.y.length < 4 ? (d.getFullYear() + '').substr(0, 4 - o.y.length) + o.y : o.y);
+			o.m && d.setMonth(o.m - 1, 1);
+			o.d && d.setDate(o.d - 0);
+			o.h && d.setHours(o.h - 0);
+			o.i && d.setMinutes(o.i - 0);
+			o.s && d.setSeconds(o.s - 0);
+			return d;
+		},
+		/**
+		 * 获取日历数组(42天)
+		 * @param date 日期对象或日期字符串
+		 * @param proc 处理日历(和forEach类似),传递一个数组中的item
+		 * @return Array
+		 */
+		getCalendar(date, proc) {
+			let it = new Date(date),
+				calendars = [];
+			it.setDate(1);
+			it.setDate(it.getDate() - ((it.getDay() == 0 ? 7 : it.getDay()) - 1)); //偏移量
+			for (let i = 0; i < 42; i++) {
+				let tmp = {
+					dateObj: new Date(it),
+					title: it.getDate(),
+					isOtherMonth: it.getMonth() < date.getMonth() || it.getMonth() > date.getMonth()
+				};
+				calendars.push(Object.assign(tmp, proc ? proc(tmp) : {}));
+				it.setDate(it.getDate() + 1);
+			}
+			return calendars;
+		},
+		/**
+		 * 获取日期到指定的月份1号(不改变原来的date对象)
+		 * @param d Date对象
+		 * @param v 指定的月份
+		 * @return Date对象
+		 */
+		getDateToMonth(d, v) {
+			let n = new Date(d);
+			n.setMonth(v, 1);
+			return n;
+		},
+		/**
+		 * 把时间数组转为时间字符串
+		 * @param t Array[时,分,秒]
+		 * @param showSecinds 是否显示秒
+		 * @return 字符串 时:分[:秒]
+		 */
+		formatTimeArray(t, s) {
+			let r = [...t];
+			if (!s) r.length = 2;
+			r.forEach((v, k) => r[k] = ('0' + v).slice(-2));
+			return r.join(':');
+		}
+	};
+
+	export default {
+		props: {
+			//颜色
+			color: {
+				type: String,
+				default: '#409eff'
+			},
+			//是否显示秒 针对type为datetime或time时生效
+			showSeconds: {
+				type: Boolean,
+				default: false
+			},
+			//初始的值
+			value: [String, Array],
+			//类型date time datetime range rangetime
+			type: {
+				type: String,
+				default: 'range'
+			},
+			//是否显示
+			show: {
+				type: Boolean,
+				default: false
+			},
+			//初始格式
+			format: {
+				type: String,
+				default: ''
+			},
+			//显示公历节日
+			showHoliday: {
+				type: Boolean,
+				default: true
+			},
+			//显示提示
+			showTips: {
+				type: Boolean,
+				default: false
+			},
+			//开始文案 针对type为范围选择时生效
+			beginText: {
+				type: String,
+				default: '开始'
+			},
+			//结束文案 针对type为范围选择时生效
+			endText: {
+				type: String,
+				default: '结束'
+			}
+		},
+		data() {
+			return {
+				isShow: false, //是否显示
+				isMultiSelect: false, //是否为多选
+				isContainTime: false, //是否包含时间
+				date: {}, //当前日期对象
+				weeks: ["一", "二", "三", "四", "五", "六", "日"],
+				title: '初始化', //标题
+				calendars: [[],[],[]], //日历数组
+				calendarIndex: 1, //当前日历索引
+				checkeds: [], //选中的日期对象集合
+				showTimePicker: false, //是否显示时间选择器
+				timeValue: [0, 0, 0], //时间选择器的值
+				timeType: 'begin', //当前时间选择的类型
+				beginTime: [0, 0, 0], //当前所选的开始时间值
+				endTime: [0, 0, 0], //当前所选的结束时间值
+			};
+		},
+		methods: {
+			//设置值
+			setValue(value) {
+				this.date = new Date();
+				this.checkeds = [];
+				this.isMultiSelect = this.type.indexOf('range') >= 0;
+				this.isContainTime = this.type.indexOf('time') >= 0;
+				//将字符串解析为Date对象
+				let parseDateStr = (str) => (this.format ? DateTools.inverse(str, this.format) : DateTools.parse(str));
+				if (value) {
+					if (this.isMultiSelect) {
+						Array.isArray(value) && value.forEach((dateStr, index) => {
+							let date = parseDateStr(dateStr);
+							let time = [date.getHours(), date.getMinutes(), date.getSeconds()];
+							if (index == 0) this.beginTime = time;
+							else this.endTime = time;
+							this.checkeds.push(date);
+						});
+					} else {
+						if (this.type == 'time') {
+							let date = parseDateStr('2019/1/1 ' + value);
+							this.beginTime = [date.getHours(), date.getMinutes(), date.getSeconds()];
+							this.onShowTimePicker('begin');
+						} else {
+							this.checkeds.push(parseDateStr(value));
+							if (this.isContainTime) this.beginTime = [
+								this.checkeds[0].getHours(),
+								this.checkeds[0].getMinutes(),
+								this.checkeds[0].getSeconds()
+							];
+						}
+					}
+					if (this.checkeds.length) this.date = new Date(this.checkeds[0]);
+				} else {
+					if (this.isContainTime) {
+						this.beginTime = [this.date.getHours(), this.date.getMinutes(), this.date.getSeconds()];
+						if (this.isMultiSelect) this.endTime = [...this.beginTime];
+					}
+					this.checkeds.push(new Date(this.date));
+				}
+				if (this.type != 'time') this.refreshCalendars(true);
+				else this.onShowTimePicker('begin');
+			},
+			//改变年份
+			onSetYear(value) {
+				this.date.setFullYear(this.date.getFullYear() + parseInt(value));
+				this.refreshCalendars(true);
+			},
+			//改变月份
+			onSetMonth(value) {
+				this.date.setMonth(this.date.getMonth() + parseInt(value));
+				this.refreshCalendars(true);
+			},
+			//时间选择变更
+			onTimeChange(e) {
+				this.timeValue = e.detail.value;
+			},
+			//设置时间选择器的显示状态
+			onShowTimePicker(type) {
+				this.showTimePicker = true;
+				this.timeType = type;
+				this.timeValue = type == 'begin' ? [...this.beginTime] : [...this.endTime];
+			},
+			//处理日历
+			procCalendar(item) {
+				//定义初始样式
+				item.statusStyle = {
+					opacity: 1,
+					color: item.isOtherMonth ? '#ddd' : '#000',
+					background: 'transparent'
+				};
+				item.bgStyle = {
+					type: '',
+					background: 'transparent'
+				};
+				item.dotStyle = {
+					opacity: 1,
+					background: 'transparent'
+				};
+				item.tips = "";
+				//标记今天的日期
+				if (DateTools.isSameDay(new Date(), item.dateObj)) {
+					item.statusStyle.color = this.color;
+					if (item.isOtherMonth) item.statusStyle.opacity = 0.3;
+				}
+				//标记选中项
+				this.checkeds.forEach(date => {
+					if (DateTools.isSameDay(date, item.dateObj)) {
+						item.statusStyle.background = this.color;
+						item.statusStyle.color = '#fff';
+						item.statusStyle.opacity = 1;
+						if (this.isMultiSelect && this.showTips) item.tips = this.beginText;
+					}
+				});
+				//节假日或今日的日期标点
+				if (item.statusStyle.background != this.color) {
+					let holiday = this.showHoliday ? DateTools.getHoliday(item.dateObj) : false;
+					if (holiday || DateTools.isSameDay(new Date(), item.dateObj)) {
+						item.title = holiday || item.title;
+						item.dotStyle.background = this.color;
+						if (item.isOtherMonth) item.dotStyle.opacity = 0.2;
+					}
+				} else {
+					item.title = item.dateObj.getDate();
+				}
+				//有两个日期
+				if (this.checkeds.length == 2) {
+					if (DateTools.isSameDay(this.checkeds[0], item.dateObj)) { //开始日期
+						item.bgStyle.type = 'bgbegin';
+					}
+					if (DateTools.isSameDay(this.checkeds[1], item.dateObj)) { //结束日期
+						if (this.isMultiSelect && this.showTips) item.tips = item.bgStyle.type ? this.beginText + ' / ' + this.endText : this.endText;
+						if (!item.bgStyle.type) { //开始日期不等于结束日期
+							item.bgStyle.type = 'bgend';
+						} else {
+							item.bgStyle.type = '';
+						}
+					}
+					if (!item.bgStyle.type && (+item.dateObj > +this.checkeds[0] && +item.dateObj < +this.checkeds[1])) { //中间的日期
+						item.bgStyle.type = 'bg';
+						item.statusStyle.color = this.color;
+					}
+					if (item.bgStyle.type) {
+						item.bgStyle.background = this.color;
+						item.dotStyle.opacity = 1;
+						item.statusStyle.opacity = 1;
+					}
+				}
+			},
+			//刷新日历
+			refreshCalendars(refresh = false) {
+				let date = new Date(this.date);
+				let before = DateTools.getDateToMonth(date, date.getMonth() - 1);
+				let after = DateTools.getDateToMonth(date, date.getMonth() + 1);
+				if (this.calendarIndex == 0) {
+					if(refresh) this.calendars.splice(0, 1, DateTools.getCalendar(date, this.procCalendar));
+					this.calendars.splice(1, 1, DateTools.getCalendar(after, this.procCalendar));
+					this.calendars.splice(2, 1, DateTools.getCalendar(before, this.procCalendar));
+				} else if (this.calendarIndex == 1) {
+					this.calendars.splice(0, 1, DateTools.getCalendar(before, this.procCalendar));
+					if(refresh) this.calendars.splice(1, 1, DateTools.getCalendar(date, this.procCalendar));
+					this.calendars.splice(2, 1, DateTools.getCalendar(after, this.procCalendar));
+				} else if (this.calendarIndex == 2) {
+					this.calendars.splice(0, 1, DateTools.getCalendar(after, this.procCalendar));
+					this.calendars.splice(1, 1, DateTools.getCalendar(before, this.procCalendar));
+					if(refresh) this.calendars.splice(2, 1, DateTools.getCalendar(date, this.procCalendar));
+				}
+				this.title = DateTools.format(this.date, 'yyyy年mm月');
+			},
+			//滑块切换
+			onSwiperChange(e) {
+				this.calendarIndex = e.detail.current;
+				let calendar = this.calendars[this.calendarIndex];
+				this.date = new Date(calendar[22].dateObj); //取中间一天,保证是当前的月份
+				this.refreshCalendars();
+			},
+			//选中日期
+			onSelectDate(date) {
+				if (~this.type.indexOf('range') && this.checkeds.length == 2) this.checkeds = [];
+				else if (!(~this.type.indexOf('range')) && this.checkeds.length) this.checkeds = [];
+				this.checkeds.push(new Date(date.dateObj));
+				this.checkeds.sort((a, b) => a - b); //从小到大排序
+				this.calendars.forEach(calendar => {
+					calendar.forEach(this.procCalendar); //重新处理
+				});
+			},
+			//时间选择取消
+			onCancelTime() {
+				this.showTimePicker = false;
+				this.type == 'time' && this.onCancel();
+			},
+			//时间选择确定
+			onConfirmTime() {
+				if (this.timeType == 'begin') this.beginTime = this.timeValue;
+				else this.endTime = this.timeValue;
+				this.showTimePicker = false;
+				this.type == 'time' && this.onConfirm();
+			},
+			//取消
+			onCancel() {
+				this.$emit('cancel', false);
+			},
+			//确定
+			onConfirm() {
+				let result = {
+					value: null,
+					date: null
+				};
+				//定义默认格式
+				let defaultFormat = {
+					'date': 'yyyy/mm/dd',
+					'time': 'hh:ii' + (this.showSeconds ? ':ss' : ''),
+					'datetime': ''
+				};
+				defaultFormat['datetime'] = defaultFormat.date + ' ' + defaultFormat.time;
+				let fillTime = (date, timeArr) => {
+					date.setHours(timeArr[0], timeArr[1]);
+					if (this.showSeconds) date.setSeconds(timeArr[2]);
+				};
+				if (this.type == 'time') {
+					let date = new Date();
+					fillTime(date, this.beginTime);
+					result.value = DateTools.format(date, this.format ? this.format : defaultFormat.time);
+					result.date = date;
+				} else {
+					if (this.isMultiSelect) {
+						let values = [],
+							dates = [];
+						if (this.checkeds.length < 2) return uni.showToast({
+							icon: 'none',
+							title: '请选择两个日期'
+						});
+						this.checkeds.forEach((date, index) => {
+							let newDate = new Date(date);
+							if (this.isContainTime) {
+								let time = [this.beginTime, this.endTime];
+								fillTime(newDate, time[index]);
+							}
+							values.push(DateTools.format(newDate, this.format ? this.format : defaultFormat[this.isContainTime ?
+								'datetime' : 'date']));
+							dates.push(newDate);
+						});
+						result.value = values;
+						result.date = dates;
+					} else {
+						let newDate = new Date(this.checkeds[0]);
+						if (this.isContainTime) {
+							newDate.setHours(this.beginTime[0], this.beginTime[1]);
+							if (this.showSeconds) newDate.setSeconds(this.beginTime[2]);
+						}
+						result.value = DateTools.format(newDate, this.format ? this.format : defaultFormat[this.isContainTime ?
+							'datetime' : 'date']);
+						result.date = newDate;
+					}
+				}
+				this.$emit('confirm', result);
+			}
+		},
+		computed: {
+			BeginTitle() {
+				let value = '未选择';
+				if (this.checkeds.length) value = DateTools.format(this.checkeds[0], 'yy/mm/dd');
+				return value;
+			},
+			EndTitle() {
+				let value = '未选择';
+				if (this.checkeds.length == 2) value = DateTools.format(this.checkeds[1], 'yy/mm/dd');
+				return value;
+			},
+			PickerTimeTitle() {
+				return DateTools.formatTimeArray(this.timeValue, this.showSeconds);
+			},
+			BeginTimeTitle() {
+				return this.BeginTitle != '未选择' ? DateTools.formatTimeArray(this.beginTime, this.showSeconds) : '';
+			},
+			EndTimeTitle() {
+				return this.EndTitle != '未选择' ? DateTools.formatTimeArray(this.endTime, this.showSeconds) : '';
+			}
+		},
+		watch: {
+			show(newValue, oldValue) {
+				newValue && this.setValue(this.value);
+				this.isShow = newValue;
+			},
+			value(newValue, oldValue) {
+				setTimeout(()=>{
+					this.setValue(newValue);
+				}, 0);
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	$z-index: 100;
+	$cell-spacing: 20upx;
+	$calendar-size: 630upx;
+	$calendar-item-size: 90upx;
+
+	.picker {
+		position: fixed;
+		z-index: $z-index;
+		background: rgba(255, 255, 255, 0);
+		left: 0;
+		top: 0;
+		width: 100%;
+		height: 100%;
+		font-size: 28upx;
+
+		&-btn {
+			padding: $cell-spacing*0.5 $cell-spacing;
+			border-radius: 12upx;
+			color: #666;
+
+			&-active {
+				background: rgba(0, 0, 0, .1);
+			}
+		}
+
+		&-display {
+			color: #666;
+
+			&-text {
+				color: #000;
+				margin: 0 $cell-spacing*0.5;
+			}
+
+			&-link {
+				display: inline-block;
+
+				&-active {
+					background: rgba(0, 0, 0, .1);
+				}
+			}
+		}
+
+		&-time {
+			width: $calendar-size - 80upx !important;
+			left: ((750upx - $calendar-size) / 2 + 40upx) !important;
+		}
+
+		&-modal {
+			background: #fff;
+			position: absolute;
+			top: 50%;
+			left: (750upx - $calendar-size) / 2;
+			width: $calendar-size;
+			transform: translateY(-50%);
+			box-shadow: 0 0 20upx 0 rgba(0, 0, 0, 0.1);
+			border-radius: 12upx;
+
+			&-header {
+				text-align: center;
+				line-height: 80upx;
+				font-size: 32upx;
+
+				&-title {
+					display: inline-block;
+					width: 40%;
+				}
+
+				.picker-icon {
+					display: inline-block;
+					line-height: 50upx;
+					width: 50upx;
+					height: 50upx;
+					border-radius: 50upx;
+					text-align: center;
+					margin: 10upx;
+					background: #fff;
+					font-size: 36upx;
+
+					&-active {
+						background: rgba(0, 0, 0, .1);
+					}
+				}
+			}
+
+			&-body {
+				width: $calendar-size !important;
+				height: $calendar-size !important;
+				position: relative;
+			}
+
+			&-time {
+				width: 100%;
+				height: 180upx;
+				text-align: center;
+				line-height: 60upx;
+			}
+
+			&-footer {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				padding: $cell-spacing;
+
+				&-info {
+					flex-grow: 1;
+				}
+
+				&-btn {
+					flex-shrink: 0;
+					display: flex;
+				}
+			}
+		}
+
+		&-calendar {
+			position: absolute;
+			left: 0;
+			top: 0;
+			width: 100%;
+			height: 100%;
+			display: flex;
+			align-items: center;
+			flex-wrap: wrap;
+
+			&-view {
+				position: relative;
+				width: $calendar-item-size;
+				height: $calendar-item-size;
+				text-align: center;
+
+				&-bgbegin,
+				&-bg,
+				&-bgend,
+				&-item,
+				&-dot,
+				&-tips {
+					position: absolute;
+					transition: .2s;
+				}
+
+				&-bgbegin,
+				&-bg,
+				&-bgend {
+					opacity: .15;
+					height: 80%;
+				}
+
+				&-bg {
+					left: 0;
+					top: 10%;
+					width: 100%;
+				}
+
+				&-bgbegin {
+					border-radius: $calendar-item-size 0 0 $calendar-item-size;
+					top: 10%;
+					left: 10%;
+					width: 90%;
+				}
+
+				&-bgend {
+					border-radius: 0 $calendar-item-size $calendar-item-size 0;
+					top: 10%;
+					left: 0%;
+					width: 90%;
+				}
+
+				&-item {
+					left: 5%;
+					top: 5%;
+					width: 90%;
+					height: 90%;
+					border-radius: $calendar-item-size;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+				}
+
+				&-dot {
+					right: 10%;
+					top: 10%;
+					width: 12upx;
+					height: 12upx;
+					border-radius: 12upx;
+				}
+
+				&-tips {
+					bottom: 100%;
+					left: 50%;
+					transform: translateX(-50%);
+					background: #4E4B46;
+					color: #fff;
+					border-radius: 12upx;
+					padding: 10upx 20upx;
+					font-size: 24upx;
+					width: max-content;
+					margin-bottom: 5upx;
+					pointer-events: none;
+
+					&:after {
+						content: "";
+						position: absolute;
+						top: 100%;
+						left: 50%;
+						transform: translateX(-50%);
+						width: 0;
+						height: 0;
+						border-style: solid;
+						border-width: 5upx 5upx 0 5upx;
+						border-color: #4E4B46 transparent transparent transparent;
+					}
+				}
+			}
+		}
+	}
+
+	@font-face {
+		font-family: "mxdatepickericon";
+		src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAMYAAsAAAAACBgAAALMAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDIgqDRIJiATYCJAMUCwwABCAFhG0HSRvfBsg+QCa3noNAyAQ9w6GDvbwpNp2vloCyn8bD/x+y+/5qDhtj+T4eRVEcbsCoKMFASzCgLdDkmqYDwgxkWQ6YH5L/YnppOlLEjlnter43YRjU7M6vJ3iGADVAgJn5kqjv/wEii23T86UsAQT+04fV+o97VTMx4PPZt4DlorLXwIQiGMA5uhaVrBWqGHfQXcTEiE+PE+g2SUlxWlLVBHwUYFMgrgwSB3wstTKSGzqF1nOyiGeeOtNjV4An/vvxR58PSc3AzrMViyDvPo/7dVEUzn5GROfIWAcU4rLXfMFdhte56y4We9gGNEVIezkBOOaQXUrbTf/hJVkhGpDdCw7dSOEzByMEn3kIic98hMxnAfeFPKWCbjRcA148/HxhCEkaA94eGWFaGolsblpaWz8/Po2WVuNHh1fmBpZHIpqal9fOjizhTteY+RZ9rv02I/pq0W6QVH3pSncBz3m55r9ZIPycHfmenvxe4uyutIgfT5u4bgkDusl9gcF0rnfnz+b2NpSaQWBFeu8GIL1xQj5AH/6FAsEr/50F28e/gA9ny6KjLrxIp0TE+UucmQOl5AFNLXkzZufWamWHYEI39PEP2If97CMdm51N6DSmIekwAVmneXTBr0PVYx+aTgfQbU3p+R4jKHdRurBq0oEw6AKSfm+QDbpGF/w3VOP+oBnMHbqdx409FjP4RRHHkAj5IWgQiBUjHfMTuQ1Icpg5avI4sQVRu8EHdWptM1aKrIjuscfeL+kZwxBTYoElztOQ2UygjRIjEphaZsyWodHgvm9SC8QC/JygEA6DiCDeEMhAQFhhOpvxa/18A0TiYMahIy0L2hYIZWeYH9JR085Al4qts1re5St2/SR6DINBGEVYQCWOETHDMAHZ+pcZIQJGTV4RtMmg8UbhuWL1+VLLA2RFHYC71kiRo0SNpjwQh8pj2EFU3oTNmS1WqgIA') format('woff2');
+	}
+
+	.picker-icon {
+		font-family: "mxdatepickericon" !important;
+	}
+
+	.picker-icon-you:before {
+		content: "\e63e";
+	}
+
+	.picker-icon-zuo:before {
+		content: "\e640";
+	}
+
+	.picker-icon-zuozuo:before {
+		content: "\e641";
+	}
+
+	.picker-icon-youyou:before {
+		content: "\e642";
+	}
+</style>

+ 3 - 3
hdApp/src/pagesPurchase/components/gatheringList.vue

@@ -9,11 +9,11 @@
         <text class="name">采购单 {{info.orderSn}} </text>
       </view>
       <view class="item-row">
-        <view class="mark">{{ info.addTime }}</view>
+        <view class="mark">{{ info.addTime.substr(0,16) }}</view>
       </view>
       <view class="item-row">
-        <view class="price">金额:{{ info.realPrice }}</view>
-        <view class="price" style="font-weight:normal;color:#3385FF;font-size:30rpx;" @click.stop="goToDetai(info)">查看明细</view>
+        <view class="price">¥{{ parseFloat(info.realPrice) }}</view>
+        <view class="price" style="font-weight:normal;color:#3385FF;font-size:32upx;" @click.stop="goToDetai(info)">查看明细</view>
       </view>
     </view>
   </view>

+ 40 - 59
hdApp/src/pagesPurchase/gathering.vue

@@ -1,12 +1,13 @@
 <template>
+<view class="app-content">
   <view class="order-page">
     <view class="top-view">
       <view class="top-row">
         <view class="info-item">
-          <text class="name">供应商:</text>
           <image class="logo" :src="customInfo.avatar" />
           <text class="name">{{ customInfo.name}}</text>
         </view>
+        <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName='时间' />
       </view>
     </view>
     <view scroll-y class="shop-list">
@@ -21,50 +22,35 @@
         ></gatheringList>
       </block>
       <block v-else>
-        <AppWrapperEmpty
-          title="暂无数据"
-          :is-empty="$util.isEmpty(detailsList)"
-        />
+        <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(detailsList)" />
       </block>
     </view>
     <view class="bar-view">
       <template>
         <view class="info-view">
-          <view
-            class="details-select"
-            @click="allCheck"
-          >
-            <text
-              class="iconfont iconxuanzhong"
-              v-if="isAllCheck"
-            > </text>
-            <text
-              class="iconfont iconweixuanzhong"
-              v-else
-            > </text>
+          <view class="details-select" @click="checkAllFn" >
+						<button class="admin-button-com blue mini-btn" v-if="isAllCheck">全不选</button>
+						<button class="admin-button-com blue mini-btn" v-else>全选</button>
           </view>
           已选 <text class="price">{{ selectList.length }}</text> 笔,
           <text class="unit">¥</text>
-          <text class="price">{{ selectTotalAmount }}</text>
+          <text class="price">{{ parseFloat(selectTotalAmount) }}</text>
         </view>
       </template>
-      <view
-        class="btn-view"
-      >
-        <button
-          :class="['admin-button-com', 'blue', 'global']"
-          @click="batchConfirm"
-        >确认</button>
+      <view class="btn-view" >
+        <button :class="['admin-button-com', 'blue', 'global']" @click="batchConfirm" >确认</button>
       </view>
     </view>
   </view>
+</view>
 </template>
 <script>
 import gatheringList from './components/gatheringList'
 import { purchaseDebtList, ghsDetail, purchaseClearCreateOrder } from "@/api/purchase/index";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import DateSelect from "@/components/module/dateSelect";
 export default {
-  components: { gatheringList, AppWrapperEmpty },
+  components: { gatheringList, AppWrapperEmpty,DateSelect },
   data () {
     return {
       checkShow: true,
@@ -73,6 +59,9 @@ export default {
       customInfo: {},
       totalAmount: "",
       isAllCheck: false,
+			searchTime:'',
+			startTime:'',
+			endTime:''
     }
   },
   onPullDownRefresh() {
@@ -93,7 +82,6 @@ export default {
           }
         }
       }
-      console.log(list)
       return list;
     },
     selectTotalAmount () {
@@ -107,16 +95,6 @@ export default {
       }
       return amount.toFixed(2);
     },
-    // allTotalAmount () {
-    //   let amount = 0;
-    //   if (this.detailsList) {
-    //     for (const item of this.detailsList) {
-    //       amount = amount + Number(item.realPrice);
-    //     }
-    //   }
-    //   return amount;
-    // },
-
   },
   watch: {
     selectList () {
@@ -128,8 +106,15 @@ export default {
     }
   },
   methods: {
-    // 全选
-    allCheck () {
+		selectDateFn(val){
+			this.searchTime = val.searchTime
+			this.startTime = val.startTime
+			this.endTime = val.endTime
+			this.initData().then(res => {
+				uni.stopPullDownRefresh()
+			})
+		},
+    checkAllFn () {
       this.isAllCheck = !this.isAllCheck
       if (this.isAllCheck) {
         this.detailsList.map(ele => {
@@ -145,31 +130,28 @@ export default {
       this.initData()
       this.getClient()
     },
-    // 初始化页面数据
     initData () {
-      return purchaseDebtList({id:this.option.id}).then(res => {
-        console.log(res)
+      return purchaseDebtList({id:this.option.id,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime}).then(res => {
         this.detailsList = res.data.list.map(ele => {
           return {
             ...ele,
             checked: false
           };
         });
-      }).catch(err => { console.log(err) })
+      }).catch(err => { 
+
+      })
     },
     getClient() {
       return ghsDetail({id:this.option.id}).then(res => {
-        console.log('res', res)
         this.customInfo = res.data
-      }).catch(err => {console.log('err', err)})
+      }).catch(err => {})
     },
-    // 单选
     checkItemEvent (item) {
       let count = 1
       for (let index = 0; index < this.detailsList.length; index++) {
         const element = this.detailsList[index].id;
         if (element == item.id) {
-          //id相等选中
           this.$set(this.detailsList, index, {
             ...this.detailsList[index],
             checked: !this.detailsList[index].checked
@@ -178,27 +160,24 @@ export default {
         }
       }
     },
-    // 批量收款
+    //批量收款
     batchConfirm () {
       let arr = []
       if (this.selectList.length > 0) {
-
         this.selectList.forEach(item => {
           arr.push(item.id)
         })
         purchaseClearCreateOrder({ purchaseIds:arr.join(','),ghsId:this.option.id }).then(res => {
-          console.log('res ===>', res)
           if(res.code == 1) {
             this.pageTo({
               url: '/pagesPurchase/gatherPay?orderSn=' + res.data.orderSn + '&actPrice=' + res.data.actPrice+'&remainSecond='+res.data.remainSecond,
               type: 2
             })
           }
-        }).catch(err => {console.log('err===>', err)})
-
+        }).catch(err => {
+        })
       }
     },
-    // 返回上一页
     back () {
       uni.navigateBack({})
     }
@@ -213,6 +192,8 @@ export default {
   background-color: #f9fbfc;
   .top-view {
     padding: 30upx;
+		position:fixed;
+		width:100%;
     background-color: #fff;
     .top-row {
       display: flex;
@@ -249,6 +230,7 @@ export default {
     }
   }
   .shop-list {
+		margin-top:98upx;
     padding: 20upx 0;
     flex: 1;
     padding-bottom: 100upx;
@@ -274,14 +256,14 @@ export default {
         color: #dddddd;
       }
       .price {
-        margin: 0 5upx;
+        margin: 0 3upx;
         color: $redColor;
-        font-size: 32upx;
+        font-size: 30upx;
       }
       .unit {
-        margin: 0 10upx;
+        margin: 0 3upx;
         color: $redColor;
-        font-size: 16upx;
+        font-size: 30upx;
       }
     }
     .btn-view {
@@ -293,7 +275,6 @@ export default {
         margin: 0 10upx;
         width: 200upx;
         height: 70upx;
-        // line-height: 70upx;
         font-size: 32upx;
       }
       .cancel {
@@ -317,4 +298,4 @@ export default {
     color: $mainColor !important;
   }
 }
-</style>
+</style>

+ 3 - 47
hdApp/src/pagesPurchase/order.vue

@@ -29,17 +29,13 @@
         </block>
       </block>
     </view>
-    
-    <view class="app-footer open_btn">
+
+    <!-- <view class="app-footer open_btn">
       <view @click="bcGhs()" class="admin-button-com middle blue">更多供应商</view>
-      <!--
-      <view @click="inviteGhs" class="admin-button-com middle blue">邀请供应商得300元</view>
-      -->
-		</view>
+		</view> -->
 
   </view>
 </template>
-
 <script>
 import OrderItem from "./orderItem";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
@@ -52,20 +48,6 @@ export default {
   },
   data () {
     return {
-      tabs: [
-        {
-          name: "供应商",
-          key: "",
-        },
-        {
-          name: "采购记录",
-          key: "1",
-        },
-        {
-          name: "111",
-          key: "1",
-        },
-      ],
       list: {
         data: []
       },
@@ -129,32 +111,6 @@ export default {
 
 <style lang="scss" scoped>
 .order-page {
-  .tabs {
-    height: 80upx;
-    line-height: 80upx;
-    & > view {
-      width: 50%;
-      text-align: center;
-      font-size: 28upx;
-      color: #666;
-      display: inline-block;
-    }
-    & > .active {
-      position: relative;
-      color: #3385ff;
-      font-weight: 700;
-    }
-    & > .active::after {
-      content: "";
-      position: absolute;
-      bottom: 0;
-      left: 50%;
-      transform: translateX(-50%);
-      width: 70upx;
-      height: 6upx;
-      background: #3385ff;
-    }
-  }
   .order_list {
     height: 100%;
     background: #f0f2f6;