Commit 3e6b71e4 by 张立顺

功能开发

1 parent 7f91ff47
// components/navigationBar/navigationBar.js // components/navigationBar/navigationBar.js
import util from '../../utils/util' import util from '../../utils/util'
Component({ Component({
options:{ options: {
styleIsolation: 'shared' styleIsolation: 'shared'
}, },
/** /**
...@@ -10,7 +10,8 @@ Component({ ...@@ -10,7 +10,8 @@ Component({
properties: { properties: {
navStyle: String, navStyle: String,
showBack: Boolean, showBack: Boolean,
showMenu: Boolean showMenu: Boolean,
navStyle: String
}, },
/** /**
......
...@@ -291,6 +291,20 @@ ...@@ -291,6 +291,20 @@
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
},
{
"name": "1.1 首页",
"pathName": "tabIndex/pages/index/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "1.3支付",
"pathName": "packageCrowdFunding/pages/paidOrder/paidOrder",
"query": "",
"launchMode": "default",
"scene": null
} }
] ]
} }
......
...@@ -10,9 +10,9 @@ Page({ ...@@ -10,9 +10,9 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
flag: true,
...mixins.data, ...mixins.data,
navBarHeight: 0, navBarHeight: 0,
delayShow: false,
totalTableSum: [ totalTableSum: [
{ {
name: 'filmTimesTotalSum' name: 'filmTimesTotalSum'
...@@ -53,7 +53,9 @@ Page({ ...@@ -53,7 +53,9 @@ Page({
type: 2, type: 2,
typeText: '补录订单' typeText: '补录订单'
}, },
shopSideSelectPopup: false shopSideSelectPopup: false,
navStyle: 'background-color: rgba(0,0,0,0);',
flag: true
}, },
tipsEvent() { tipsEvent() {
this.setData({ this.setData({
...@@ -171,7 +173,19 @@ Page({ ...@@ -171,7 +173,19 @@ Page({
let { userInfo } = this.data let { userInfo } = this.data
// 判断是不是门店员工 // 判断是不是门店员工
if (userInfo.merchantType && !userInfo.isSuper && type == 2) { if (userInfo.merchantType && !userInfo.isSuper && type == 2) {
if ((item.type = 'scanCode')) {
wx.scanCode({
success(res) {
let { result } = res
console.log(result)
wx.$router.go('tabWorkOrder.createOrder', {
scene: result
})
}
})
} else {
wx.$router.go(item.url) wx.$router.go(item.url)
}
} else { } else {
// item.url != 'tabWorkOrder.createOrder' // item.url != 'tabWorkOrder.createOrder'
if (!['tabWorkOrder.createOrder', 'tabWorkOrder.createArchives'].includes(item.url)) { if (!['tabWorkOrder.createOrder', 'tabWorkOrder.createArchives'].includes(item.url)) {
...@@ -183,15 +197,31 @@ Page({ ...@@ -183,15 +197,31 @@ Page({
}, },
changeDate(e) { changeDate(e) {
// console.log(e) // console.log(e)
let today = new Date() let { name } = e.currentTarget.dataset
let startDate = today.format('yyyy-MM-dd') let data = new Date(),
let endDate = today.format('yyyy-MM-dd') value = name == 'today' ? 0 : 1,
startDate,
endDate
// 选择 今日
if (!value) {
startDate = data.format('yyyy-MM-dd')
endDate = data.format('yyyy-MM-dd')
} else {
// 选择 本月
const year = data.getFullYear()
const month = data.getMonth()
startDate = new Date(year, month, 1).format('yyyy-MM-dd')
endDate = new Date(year, month + 1, 0).format('yyyy-MM-dd')
// startDate = today.format('yyyy-MM-dd')
// endDate = today.format('yyyy-MM-dd')
}
let { tableBtn } = this.data let { tableBtn } = this.data
this.setData({ this.setData({
startDate, startDate,
endDate endDate
}) })
this.setTab(tableBtn, 0) this.setTab(tableBtn, value)
this.getMerchantCouponList() this.getMerchantCouponList()
}, },
rangeSelect(e) { rangeSelect(e) {
...@@ -212,6 +242,7 @@ Page({ ...@@ -212,6 +242,7 @@ Page({
this.getMerchantCouponList() this.getMerchantCouponList()
}, },
setTab(tableBtn, index) { setTab(tableBtn, index) {
console.log(index)
tableBtn.map(i => (i.active = false)) tableBtn.map(i => (i.active = false))
tableBtn[index].active = true tableBtn[index].active = true
this.setData({ this.setData({
...@@ -438,7 +469,12 @@ Page({ ...@@ -438,7 +469,12 @@ Page({
*/ */
onShow: function (options) { onShow: function (options) {
// console.log(options, 'options') // console.log(options, 'options')
console.log(app.globalData.isStaff,'app.globalData.isStaff'); console.log(app.globalData.isStaff, 'app.globalData.isStaff')
setTimeout(() => {
this.setData({
delayShow: true
})
}, 1000)
this.setData({ this.setData({
isStaff: app.globalData.isStaff isStaff: app.globalData.isStaff
}) })
......
/* tabIndex/pages/index/index.wxss */ /* tabIndex/pages/index/index.wxss */
page { page {
background-color: #f8f9f9; // background-color: #f8f9f9;
background-color: #fff
} }
page ::-webkit-scrollbar { page ::-webkit-scrollbar {
display: none; display: none;
} }
.bg {
width: 100%;
// height: 486rpx;
height: 350rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/output/bg.png') no-repeat;
background-size: 100% 264rpx;
background-color: #fff;
position: fixed;
left: 0;
top: 0;
// z-index: -1;
}
.layout { .layout {
box-sizing: border-box;
opacity: 0; opacity: 0;
// background-color: #fff;
position: relative;
// overflow: scroll;
// z-index: 2;
// display: flex;
// flex-direction: column;
// height: 100vh;
overflow: hidden;
padding-left: 20rpx;
padding-right: 20rpx;
// &::after {
// content: '';
// width: 100%;
// // height: 486rpx;
// height: 350rpx;
// background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/output/bg.png') no-repeat;
// background-size: 100% 264rpx;
// background-color: #fff;
// position: fixed;
// left: 0;
// top: 0;
// // z-index: -1;
// }
.main {
z-index: 2;
height: 100%;
overflow: scroll;
}
} }
.opacity { .opacity {
...@@ -42,27 +87,46 @@ page ::-webkit-scrollbar { ...@@ -42,27 +87,46 @@ page ::-webkit-scrollbar {
margin-bottom: 74rpx; margin-bottom: 74rpx;
} }
.conTitle {
font-weight: 600;
font-size: 28rpx;
color: #323436;
}
.menu { .menu {
width: 100%; width: 100%;
height: 218rpx;
background-image: linear-gradient(166deg, #65b8f8 0%, #3582ee 100%);
display: flex; display: flex;
align-items: center; flex-wrap: wrap;
/* display: grid; justify-content: space-between;
align-items: center; // height: 218rpx;
grid-template-columns: repeat(4, 1fr); */ // background-image: linear-gradient(166deg, #65b8f8 0%, #3582ee 100%);
// display: flex;
// align-items: center;
// /* display: grid;
// align-items: center;
// grid-template-columns: repeat(4, 1fr);
} }
.menu .item { // .menu .item {
flex: 1; // // flex: 1;
}
// }
.menu .item { .menu .item {
width: 124rpx;
height: 158rpx;
display: flex; display: flex;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
font-size: 28rpx; // font-size: 28rpx;
color: #ffffff; // color: #ffffff;
font-size: 24rpx;
color: #323436;
margin-right: 56rpx;
}
.menu .item:nth-child(4n) {
margin-right: 0rpx;
} }
.menu .item image { .menu .item image {
...@@ -154,9 +218,10 @@ page ::-webkit-scrollbar { ...@@ -154,9 +218,10 @@ page ::-webkit-scrollbar {
padding: 0 20rpx; padding: 0 20rpx;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
font-size: 32rpx; // font-size: 32rpx;
color: #333333; // color: #333333;
font-weight: 700; // font-weight: 700;
} }
.table-control-btn { .table-control-btn {
......
...@@ -7,9 +7,9 @@ export default { ...@@ -7,9 +7,9 @@ export default {
url: 'tabWorkOrder.createOrder' url: 'tabWorkOrder.createOrder'
}, },
{ {
name: '客户建档', name: '扫码下单',
// name: '战败下单', url: 'tabWorkOrder.createOrder',
url: 'tabWorkOrder.createArchives' type: 'scanCode'
}, },
{ {
name: '预约管理', name: '预约管理',
...@@ -18,6 +18,11 @@ export default { ...@@ -18,6 +18,11 @@ export default {
{ {
name: '经营数据', name: '经营数据',
url: 'tabOperating.index' url: 'tabOperating.index'
},
{
name: '客户建档',
// name: '战败下单',
url: 'tabWorkOrder.createArchives'
} }
], ],
totalList: [ totalList: [
...@@ -38,9 +43,16 @@ export default { ...@@ -38,9 +43,16 @@ export default {
tableBtn: [ tableBtn: [
{ {
text: '今日', text: '今日',
type: 'today',
active: true active: true
}, },
{ {
text: '本月',
type: 'month'
// active: true
},
{
text: '自定义', text: '自定义',
type: 'date' type: 'date'
} }
......
<view class='calender-picker' bindtap="showCalendar" data-type='show'> <view class='calender-picker' bindtap="showCalendar" data-type='show'>
<slot/> <slot />
</view> </view>
<!-- 弹框模式 --> <!-- 弹框模式 -->
<!-- 先取消 --> <!-- 先取消 -->
...@@ -17,30 +17,18 @@ ...@@ -17,30 +17,18 @@
<!-- </block> --> <!-- </block> -->
{{title||'日期选择'}} {{title||'日期选择'}}
<view class='calender-close' bindtap="showCalendar"> <view class='calender-close' bindtap="showCalendar">
<image src="/images/close.png" class='calender-close-image' /> <image src="./images/close.png" class='calender-close-image' />
</view> </view>
</view> </view>
<block wx:if='{{showSubTitle}}'> <block wx:if='{{showSubTitle}}'>
<!-- <block hidden="{{!dayType}}"> --> <!-- <block hidden="{{!dayType}}"> -->
<picker <picker class='calender-subtitle' bindchange="changeDate" bindcancel='showShortcutPicker' value="{{current}}" range="{{dateList}}" wx:if='{{shortcut&&dayType}}'>
class='calender-subtitle'
bindchange="changeDate"
bindcancel='showShortcutPicker'
value="{{current}}"
range="{{dateList}}"
wx:if='{{shortcut&&dayType}}'>
<view class='calender-subtitle-text' bindtap="showShortcutPicker"> <view class='calender-subtitle-text' bindtap="showShortcutPicker">
{{dateList[current]}} {{dateList[current]}}
<view class='arrow {{showShortcut}}' /> <view class='arrow {{showShortcut}}' />
</view> </view>
</picker> </picker>
<picker <picker class='calender-subtitle' value="{{yearCurrent}}" bindcancel='showShortcutPickerYear' range="{{monPickList}}" wx:elif='{{shortcut&&!dayType}}' bindchange="bindYearChange">
class='calender-subtitle'
value="{{yearCurrent}}"
bindcancel='showShortcutPickerYear'
range="{{monPickList}}"
wx:elif='{{shortcut&&!dayType}}'
bindchange="bindYearChange">
<view class='calender-subtitle-text' bindtap="showShortcutPickerYear`"> <view class='calender-subtitle-text' bindtap="showShortcutPickerYear`">
{{monPickList[yearCurrent]}} {{monPickList[yearCurrent]}}
<view class='arrow {{showShortcutYear}}' /> <view class='arrow {{showShortcutYear}}' />
...@@ -59,28 +47,13 @@ ...@@ -59,28 +47,13 @@
</view> </view>
<view class='calender-body' style="height:calc(100% - {{calenderBodyHeight}})"> <view class='calender-body' style="height:calc(100% - {{calenderBodyHeight}})">
<!-- 日期 --> <!-- 日期 -->
<swiper <swiper hidden="{{!dayType}}" class='calender-swiper' bindchange='dateChange' current='{{current}}' vertical='{{vertical}}'>
hidden="{{!dayType}}"
class='calender-swiper'
bindchange='dateChange'
current='{{current}}'
vertical='{{vertical}}'>
<block wx:for='{{monthList}}' wx:key='index'> <block wx:for='{{monthList}}' wx:key='index'>
<swiper-item> <swiper-item>
<view class='calender-mark box-center' wx:if="{{!hideMark}}">{{item.mark}}</view> <view class='calender-mark box-center' wx:if="{{!hideMark}}">{{item.mark}}</view>
<view class='calender-month'> <view class='calender-month'>
<block <block wx:for='{{item.data}}' wx:for-item='i' wx:for-index='ind' wx:key='ind'>
wx:for='{{item.data}}' <view class='calender-day {{ind == 0?i.week:""}} {{i.active?"active":""}} {{i.disable?"disable":""}}' style="background:{{i.active?calenderColor:''}};color:{{i.middle?calenderColor:''}}" bindtap="choose" data-index='{{index}}' data-ind='{{ind}}' data-data='{{i.data}}'>
wx:for-item='i'
wx:for-index='ind'
wx:key='ind'>
<view
class='calender-day {{ind == 0?i.week:""}} {{i.active?"active":""}} {{i.disable?"disable":""}}'
style="background:{{i.active?calenderColor:''}};color:{{i.middle?calenderColor:''}}"
bindtap="choose"
data-index='{{index}}'
data-ind='{{ind}}'
data-data='{{i.data}}'>
<view class='calender-middle' style="background:{{calenderColor}};" wx:if='{{i.middle}}' /> <view class='calender-middle' style="background:{{calenderColor}};" wx:if='{{i.middle}}' />
<view class='box-center text'> <view class='box-center text'>
{{i.day}} {{i.day}}
...@@ -97,30 +70,11 @@ ...@@ -97,30 +70,11 @@
</swiper> </swiper>
<!-- 月份 wx:if="{{!dayType}}" --> <!-- 月份 wx:if="{{!dayType}}" -->
<div class='calenderMonth'> <div class='calenderMonth'>
<swiper <swiper hidden="{{dayType}}" class='calender-year ' bindchange='dateChange' current='{{yearCurrent}}' vertical='{{vertical}}'>
hidden="{{dayType}}" <block wx:for="{{yearList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
class='calender-year '
bindchange='dateChange'
current='{{yearCurrent}}'
vertical='{{vertical}}'>
<block
wx:for="{{yearList}}"
wx:for-item="item"
wx:for-index="index"
wx:key="index">
<swiper-item class="calenderMonth"> <swiper-item class="calenderMonth">
<block <block wx:for="{{item}}" wx:for-item="monItem" wx:for-index="monIndex" wx:key="monIndex">
wx:for="{{item}}" <view bindtap="monChoose" data-type="month" data-index="{{monIndex}}" data-yearindex="{{index}}" data-data="{{monItem}}" class="monItem {{monItem.start?'active':''}} {{monItem.select?'select':''}} {{monItem.end?'end':''}} {{monItem.disable?'disable':''}}">
wx:for-item="monItem"
wx:for-index="monIndex"
wx:key="monIndex">
<view
bindtap="monChoose"
data-type="month"
data-index="{{monIndex}}"
data-yearindex="{{index}}"
data-data="{{monItem}}"
class="monItem {{monItem.start?'active':''}} {{monItem.select?'select':''}} {{monItem.end?'end':''}} {{monItem.disable?'disable':''}}">
<view>{{monItem.label}}</view> <view>{{monItem.label}}</view>
<view class="text" wx:if="{{monItem.start}}">开始</view> <view class="text" wx:if="{{monItem.start}}">开始</view>
<view class="text" wx:if="{{monItem.end}}">结束</view> <view class="text" wx:if="{{monItem.end}}">结束</view>
...@@ -139,4 +93,3 @@ ...@@ -139,4 +93,3 @@
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!