Browse Source

upload

dev_czc
HolyKnightIX 2 years ago
parent
commit
4aa6273da0
1 changed files with 30 additions and 22 deletions
  1. +30
    -22
      pages/main/main.js

+ 30
- 22
pages/main/main.js View File

@@ -53,7 +53,7 @@ function setOption(chart, xdata, ydata) {
}, },
axisLabel: { axisLabel: {
rotate: 40, rotate: 40,
formatter: function(a, b) {
formatter: function (a, b) {
return a return a
} }
}, },
@@ -232,7 +232,7 @@ function getTabletListVerify() {
}; };
Page({ Page({
data: { data: {
token:'',
token: '',
currentIndex: 0, currentIndex: 0,
userInfo: {}, userInfo: {},
recordMoney: 0, recordMoney: 0,
@@ -287,10 +287,15 @@ Page({
// icon: 'iconfont icon-wuliu', // icon: 'iconfont icon-wuliu',
// id: 8 // id: 8
// } // }
{
text: '预约服务',
icon: 'iconfont icon-lingquanzhongxin',
id: 9
},

], ],
amountMoney: '', amountMoney: '',
djZmoney:'',
djZmoney: '',
writeOffMoney: '', writeOffMoney: '',
getFullYear: new Date().getFullYear(), getFullYear: new Date().getFullYear(),
getMonth: new Date().getMonth() + 1, getMonth: new Date().getMonth() + 1,
@@ -307,9 +312,9 @@ Page({
ecScatter: { ecScatter: {
lazyLoad: true lazyLoad: true
}, },
djArr:[],
djMoney:[],
count:''
djArr: [],
djMoney: [],
count: ''
}, },
//获取商户信息 //获取商户信息
getUserInfo() { getUserInfo() {
@@ -355,7 +360,7 @@ Page({
}) })
}) })
}, },
onPullDownRefresh: function() {
onPullDownRefresh: function () {
let that = this; let that = this;
// that.getUnverifiedAmountOnDate() // that.getUnverifiedAmountOnDate()
// that.getVerifiedAmountOnDate(); // that.getVerifiedAmountOnDate();
@@ -386,7 +391,7 @@ Page({
this.getUserInfo().then(res => { this.getUserInfo().then(res => {
this.setData({ this.setData({
userInfo: res, userInfo: res,
userInfoLoadIf:true
userInfoLoadIf: true
}) })
app.globalData.merchant = res; app.globalData.merchant = res;
tt.setNavigationBarTitle({ tt.setNavigationBarTitle({
@@ -398,7 +403,7 @@ Page({
/** /**
* gotolook * gotolook
*/ */
gotobill: function(e) {
gotobill: function (e) {
console.log(e) console.log(e)
let owe = e.currentTarget.dataset.data.owe; let owe = e.currentTarget.dataset.data.owe;
let status = e.currentTarget.dataset.data.status; let status = e.currentTarget.dataset.data.status;
@@ -505,14 +510,18 @@ Page({
tt.navigateTo({ tt.navigateTo({
url: '/pages/marktingsettlement/marktingsettlement', url: '/pages/marktingsettlement/marktingsettlement',
}) })
}else if(id==7){//用户发卷
} else if (id == 7) { //用户发卷
tt.navigateTo({ tt.navigateTo({
url: '/pages/sendDiscounts/sendDiscounts', url: '/pages/sendDiscounts/sendDiscounts',
}) })
} else if (id == 8) {//商品配送
} else if (id == 8) { //商品配送
tt.navigateTo({ tt.navigateTo({
url: '/pages/delivery/delivery', url: '/pages/delivery/delivery',
}) })
} else if (id == 9) { //服务预约
tt.navigateTo({
url: '/pages/marktingsettlement/marktingsettlement',
})
} }
}, },
toTran(e) { toTran(e) {
@@ -545,7 +554,7 @@ Page({
currentIndex: 0 currentIndex: 0
}) })
}, },
getpaybill: function() {
getpaybill: function () {
let that = this; let that = this;
that.getUserInfo().then(res => { that.getUserInfo().then(res => {
Http.postRequest(config.api.listBillOweAndWaitPay, app.globalData.token, '', { Http.postRequest(config.api.listBillOweAndWaitPay, app.globalData.token, '', {
@@ -565,22 +574,22 @@ Page({
}) })
that.setData({ that.setData({
billList: res.data, billList: res.data,
djArr : res.data.filter(item => item.status == 2),
djArr: res.data.filter(item => item.status == 2),
}) })
that.data.djMoney = that.data.djArr.map(item => parseInt(item.owe / 100)) that.data.djMoney = that.data.djArr.map(item => parseInt(item.owe / 100))
let money = 0 let money = 0
that.data.djMoney.filter(function (item, index) { that.data.djMoney.filter(function (item, index) {
money += item; money += item;
})
})
that.setData({ that.setData({
djZmoney: changeNum.changePeoNumber(money)
djZmoney: changeNum.changePeoNumber(money)
}) })
} }
}) })
}) })
}, },
getTabletListVerify: function() {
getTabletListVerify: function () {
let that = this; let that = this;
getTabletListVerify() getTabletListVerify()
.then(res => { .then(res => {
@@ -602,7 +611,7 @@ Page({
/** /**
* 交易 * 交易
*/ */
getTabletListOrder: function() {
getTabletListOrder: function () {
let that = this; let that = this;
getTabletListOrder() getTabletListOrder()
.then(res => { .then(res => {
@@ -684,7 +693,7 @@ Page({
url: `/pages/record/list/index`, url: `/pages/record/list/index`,
}) })
}, },
// checkuserstatus() { // checkuserstatus() {
// let _this = this; // let _this = this;
// HttpBasics.get({ // HttpBasics.get({
@@ -701,5 +710,4 @@ Page({
// }); // });
// }, // },


})

})

Loading…
Cancel
Save