Commit 3e6b71e4 by 张立顺

功能开发

1 parent 7f91ff47
// components/navigationBar/navigationBar.js
import util from '../../utils/util'
Component({
options:{
options: {
styleIsolation: 'shared'
},
/**
......@@ -10,7 +10,8 @@ Component({
properties: {
navStyle: String,
showBack: Boolean,
showMenu: Boolean
showMenu: Boolean,
navStyle: String
},
/**
......
......@@ -291,6 +291,20 @@
"query": "",
"launchMode": "default",
"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({
* 页面的初始数据
*/
data: {
flag: true,
...mixins.data,
navBarHeight: 0,
delayShow: false,
totalTableSum: [
{
name: 'filmTimesTotalSum'
......@@ -53,7 +53,9 @@ Page({
type: 2,
typeText: '补录订单'
},
shopSideSelectPopup: false
shopSideSelectPopup: false,
navStyle: 'background-color: rgba(0,0,0,0);',
flag: true
},
tipsEvent() {
this.setData({
......@@ -171,7 +173,19 @@ Page({
let { userInfo } = this.data
// 判断是不是门店员工
if (userInfo.merchantType && !userInfo.isSuper && type == 2) {
wx.$router.go(item.url)
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)
}
} else {
// item.url != 'tabWorkOrder.createOrder'
if (!['tabWorkOrder.createOrder', 'tabWorkOrder.createArchives'].includes(item.url)) {
......@@ -183,15 +197,31 @@ Page({
},
changeDate(e) {
// console.log(e)
let today = new Date()
let startDate = today.format('yyyy-MM-dd')
let endDate = today.format('yyyy-MM-dd')
let { name } = e.currentTarget.dataset
let data = new Date(),
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
this.setData({
startDate,
endDate
})
this.setTab(tableBtn, 0)
this.setTab(tableBtn, value)
this.getMerchantCouponList()
},
rangeSelect(e) {
......@@ -212,6 +242,7 @@ Page({
this.getMerchantCouponList()
},
setTab(tableBtn, index) {
console.log(index)
tableBtn.map(i => (i.active = false))
tableBtn[index].active = true
this.setData({
......@@ -438,7 +469,12 @@ Page({
*/
onShow: function (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({
isStaff: app.globalData.isStaff
})
......
/* tabIndex/pages/index/index.wxss */
page {
background-color: #f8f9f9;
// background-color: #f8f9f9;
background-color: #fff
}
page ::-webkit-scrollbar {
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 {
box-sizing: border-box;
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 {
......@@ -42,27 +87,46 @@ page ::-webkit-scrollbar {
margin-bottom: 74rpx;
}
.conTitle {
font-weight: 600;
font-size: 28rpx;
color: #323436;
}
.menu {
width: 100%;
height: 218rpx;
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); */
flex-wrap: wrap;
justify-content: space-between;
// height: 218rpx;
// 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 {
flex: 1;
}
// .menu .item {
// // flex: 1;
// }
.menu .item {
width: 124rpx;
height: 158rpx;
display: flex;
align-items: center;
flex-direction: column;
font-size: 28rpx;
color: #ffffff;
// font-size: 28rpx;
// color: #ffffff;
font-size: 24rpx;
color: #323436;
margin-right: 56rpx;
}
.menu .item:nth-child(4n) {
margin-right: 0rpx;
}
.menu .item image {
......@@ -154,9 +218,10 @@ page ::-webkit-scrollbar {
padding: 0 20rpx;
align-items: center;
justify-content: space-between;
font-size: 32rpx;
color: #333333;
font-weight: 700;
// font-size: 32rpx;
// color: #333333;
// font-weight: 700;
}
.table-control-btn {
......
......@@ -7,9 +7,9 @@ export default {
url: 'tabWorkOrder.createOrder'
},
{
name: '客户建档',
// name: '战败下单',
url: 'tabWorkOrder.createArchives'
name: '扫码下单',
url: 'tabWorkOrder.createOrder',
type: 'scanCode'
},
{
name: '预约管理',
......@@ -18,6 +18,11 @@ export default {
{
name: '经营数据',
url: 'tabOperating.index'
},
{
name: '客户建档',
// name: '战败下单',
url: 'tabWorkOrder.createArchives'
}
],
totalList: [
......@@ -38,9 +43,16 @@ export default {
tableBtn: [
{
text: '今日',
type: 'today',
active: true
},
{
text: '本月',
type: 'month'
// active: true
},
{
text: '自定义',
type: 'date'
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!