diff --git a/colorui/main.wxss b/colorui/main.wxss index 97a8a9c..d744e71 100644 --- a/colorui/main.wxss +++ b/colorui/main.wxss @@ -88,7 +88,7 @@ view, scroll-view, swiper, button, input, textarea, label, navigator, image { } .bg-blue{ - background: linear-gradient(127deg, rgba(0,122,255,0.67) 0%, rgba(13,100,227,0.95) 100%); + background: linear-gradient(127deg, rgba(0,122,255) 0%, rgba(13,100,227) 100%); } /* ================== 边框 diff --git a/components/sidebar-item/index.wxss b/components/sidebar-item/index.wxss index 308dc9c..f9f6996 100644 --- a/components/sidebar-item/index.wxss +++ b/components/sidebar-item/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-sidebar-item{display:block;box-sizing:border-box;overflow:hidden;word-wrap:break-word;border-left:3px solid transparent;-webkit-user-select:none;user-select:none;padding:20px 12px 20px 8px;padding:var(--sidebar-padding,20px 12px 20px 8px);font-size:14px;font-size:var(--sidebar-font-size,14px);line-height:20px;line-height:var(--sidebar-line-height,20px);color:#323233;color:var(--sidebar-text-color,#323233);background-color:#f7f8fa;background-color:var(--sidebar-background-color,#f7f8fa)}.van-sidebar-item__text{position:relative;display:inline-block}.van-sidebar-item--hover:not(.van-sidebar-item--disabled){background-color:#f2f3f5;background-color:var(--sidebar-active-color,#f2f3f5)}.van-sidebar-item:after{border-bottom-width:1px}.van-sidebar-item--selected{color:#323233;color:var(--sidebar-selected-text-color,#323233);font-weight:500;font-weight:var(--sidebar-selected-font-weight,500);border-color:#ee0a24;border-color:var(--sidebar-selected-border-color,#ee0a24)}.van-sidebar-item--selected:after{border-right-width:1px}.van-sidebar-item--selected,.van-sidebar-item--selected.van-sidebar-item--hover{background-color:#fff;background-color:var(--sidebar-selected-background-color,#fff)}.van-sidebar-item--disabled{color:#c8c9cc;color:var(--sidebar-disabled-text-color,#c8c9cc)} \ No newline at end of file +@import '../common/index.wxss';.van-sidebar-item{display:block;box-sizing:border-box;overflow:hidden;word-wrap:break-word;border-left:3px solid transparent;-webkit-user-select:none;user-select:none;padding:20px 12px 20px 8px;padding:var(--sidebar-padding,20px 12px 20px 8px);font-size:14px;font-size:var(--sidebar-font-size,14px);line-height:20px;line-height:var(--sidebar-line-height,20px);color:#323233;color:var(--sidebar-text-color,#323233);background-color:#f7f8fa;background-color:var(--sidebar-background-color,#f7f8fa)}.van-sidebar-item__text{position:relative;display:inline-block}.van-sidebar-item--hover:not(.van-sidebar-item--disabled){background-color:#f2f3f5;background-color:var(--sidebar-active-color,#f2f3f5)}.van-sidebar-item:after{border-bottom-width:1px}.van-sidebar-item--selected{color:#323233;color:var(--sidebar-selected-text-color,#323233);font-weight:500;font-weight:var(--sidebar-selected-font-weight,500);border-color:#008AFF;border-color:var(--sidebar-selected-border-color,#008AFF)}.van-sidebar-item--selected:after{border-right-width:1px}.van-sidebar-item--selected,.van-sidebar-item--selected.van-sidebar-item--hover{background-color:#fff;background-color:var(--sidebar-selected-background-color,#fff)}.van-sidebar-item--disabled{color:#c8c9cc;color:var(--sidebar-disabled-text-color,#c8c9cc)} \ No newline at end of file diff --git a/components/tree-select/index.js b/components/tree-select/index.js index 8dc4ed8..75c01e9 100644 --- a/components/tree-select/index.js +++ b/components/tree-select/index.js @@ -27,6 +27,10 @@ VantComponent({ type: Number, value: Infinity, }, + flex: { + type: Number, + value: 1, + }, selectedIcon: { type: String, value: 'success', diff --git a/components/tree-select/index.wxml b/components/tree-select/index.wxml index c2a75ba..2bfba3f 100644 --- a/components/tree-select/index.wxml +++ b/components/tree-select/index.wxml @@ -2,7 +2,7 @@ - + {{ item.text }} - diff --git a/components/tree-select/index.wxss b/components/tree-select/index.wxss index 3f7cca6..5ccd629 100644 --- a/components/tree-select/index.wxss +++ b/components/tree-select/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-tree-select{position:relative;display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none;font-size:14px;font-size:var(--tree-select-font-size,14px)}.van-tree-select__nav{-webkit-flex:1;flex:1;background-color:#f7f8fa;background-color:var(--tree-select-nav-background-color,#f7f8fa);--sidebar-padding:12px 8px 12px 12px}.van-tree-select__nav__inner{width:100%!important;height:100%}.van-tree-select__content{-webkit-flex:2;flex:2;background-color:#fff;background-color:var(--tree-select-content-background-color,#fff)}.van-tree-select__item{position:relative;font-weight:700;padding:0 32px 0 16px;padding:0 32px 0 var(--padding-md,16px);line-height:44px;line-height:var(--tree-select-item-height,44px)}.van-tree-select__item--active{color:#ee0a24;color:var(--tree-select-item-active-color,#ee0a24)}.van-tree-select__item--disabled{color:#c8c9cc;color:var(--tree-select-item-disabled-color,#c8c9cc)}.van-tree-select__selected{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:16px;right:var(--padding-md,16px)} \ No newline at end of file +@import '../common/index.wxss';.van-tree-select{position:relative;display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none;font-size:14px;font-size:var(--tree-select-font-size,14px)}.van-tree-select__nav{-webkit-flex:1.5;flex:1.5;background-color:#f7f8fa;background-color:var(--tree-select-nav-background-color,#f7f8fa);--sidebar-padding:12px 8px 12px 12px}.van-tree-select__nav__inner{width:100%!important;height:100%}.van-tree-select__content{-webkit-flex:2;flex:2;background-color:#fff;background-color:var(--tree-select-content-background-color,#fff)}.van-tree-select__item{position:relative;font-weight:700;padding:0 32px 0 16px;padding:0 32px 0 var(--padding-md,16px);line-height:44px;line-height:var(--tree-select-item-height,44px)}.van-tree-select__item--active{color:#008AFF;color:var(--tree-select-item-active-color,#008AFF)}.van-tree-select__item--disabled{color:#c8c9cc;color:var(--tree-select-item-disabled-color,#c8c9cc)}.van-tree-select__selected{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:16px;right:var(--padding-md,16px)} \ No newline at end of file diff --git a/pages/agent/index/index.js b/pages/agent/index/index.js index f034730..c4a3506 100644 --- a/pages/agent/index/index.js +++ b/pages/agent/index/index.js @@ -1,6 +1,5 @@ // pages/index/index.js import { getBalanceInfo } from "../../../api/payment" -import util from '../../../utils/util' const math = require('../../../utils/math') const event = require('../../../utils/event') const app = getApp() @@ -36,18 +35,28 @@ Component({ if(!this.data.firstShow) { this.setData({userInfo: app.userInfo, height: app.globalData.safeFragmentHeight - 100 }) } - getBalanceInfo().then(result => { - if(result.data){ - result.data.accountMoney = math.minus(result.data.accountMoney, result.data.frozenMoney) - this.setData({ banlanceInfo: result.data }) - } - }).catch(err => { }) + this.fetchStatisticsInfo() this.data.firstShow = true }, onEvent: function (message) { if (message.what == 888) { } }, + fetchStatisticsInfo: function(loading){ + getBalanceInfo().then(result => { + if(result.data){ + result.data.accountMoney = math.minus(result.data.accountMoney, result.data.frozenMoney) + this.setData({ banlanceInfo: result.data }) + } + if(loading){ + wx.hideLoading() + } + }).catch(err => { + if(loading){ + wx.hideLoading() + } + }) + }, agentList: function (e) { if(e.currentTarget.dataset.status){ wx.navigateTo({ url: `/pages/agent/order-list/index?status=${e.currentTarget.dataset.status}` }) @@ -57,6 +66,6 @@ Component({ }, settlementInfo: function(){ wx.navigateTo({ url: `/pages/settlement/index/index` }) - }, + } } }) \ No newline at end of file diff --git a/pages/agent/index/index.wxml b/pages/agent/index/index.wxml index d20ede8..7cdf673 100644 --- a/pages/agent/index/index.wxml +++ b/pages/agent/index/index.wxml @@ -1,8 +1,8 @@ - + diff --git a/pages/home/index/index.wxml b/pages/home/index/index.wxml index 2c92b57..3314291 100644 --- a/pages/home/index/index.wxml +++ b/pages/home/index/index.wxml @@ -3,7 +3,7 @@ 我的 --> - + @@ -73,62 +73,4 @@ - - - \ No newline at end of file diff --git a/pages/index/config.js b/pages/index/config.js new file mode 100644 index 0000000..dd66300 --- /dev/null +++ b/pages/index/config.js @@ -0,0 +1,68 @@ +export default { + pro1Name: '巫医和尚唐有限公司', + pro1: [ + { + text: '济州岛打包站', + id: 11, + }, + { + text: '福州道打包站', + id: 12, + }, + { + text: '钟落潭打包站', + id: 13, + disabled: true, + }, + { + text: '义乌', + id: 14, + },{ + text: '杭州', + id: 1, + }, + { + text: '温州', + id: 2, + }, + { + text: '宁波', + id: 3, + disabled: true, + }, + { + text: '义乌', + id: 4, + }, + ], + pro2Name: '江苏', + pro2: [ + { + text: '南京', + id: 5, + }, + { + text: '无锡', + id: 6, + }, + { + text: '徐州', + id: 7, + }, + { + text: '苏州', + id: 8, + }, + ], + pro3Name: '福建', + pro3: [ + { + text: '泉州', + id: 9, + }, + { + text: '厦门', + id: 10, + }, + ], +}; diff --git a/pages/index/index.js b/pages/index/index.js index 4cc7924..a678c14 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -1,8 +1,26 @@ // pages/administ/index.js import Scene from './scene' import { getMessageList } from "../../api/saas" +import { headerFactoryId } from "../../api/user" const event = require('../../utils/event') const app = getApp() +import config from './config'; + +const items = [ + { + text: config.pro1Name, + children: config.pro1, + }, + { + text: config.pro2Name, + children: config.pro2, + }, + { + text: config.pro3Name, + disabled: true, + children: config.pro3, + }, +]; Scene({ /** @@ -11,6 +29,7 @@ Scene({ data: { safeBottom: app.globalData.safeBottom, fragment: app.globalData.safeFragmentHeight, + userInfo: null, tabList: [ { index: 0, value: 'process', badge: 0, name: '采购', blue: '/assets/tabbar/process-blue.png', gray: '/assets/tabbar/process-gray.png' }, { index: 1, value: 'storage', badge: 0, name: '库存', blue: '/assets/tabbar/storage-blue.png', gray: '/assets/tabbar/storage-gray.png' }, @@ -19,7 +38,23 @@ Scene({ ], tabIndex: 0, zIndex: 9, - setInter: null + setInter: null, + factoryId: '12313K78978KK', + factoryName: '', + factoryList: [ + {id: '12313000KK12K', name: '济州岛打包站'}, + {id: '12313K78978KK', name: '福州道打包站'}, + {id: '1231345500KKK', name: '钟落潭打包站'}, + {id: '12345678978KK', name: '鹤山常服打包站'}, + {id: '123sdfsdf00KKK', name: '合剂打包站'}, + {id: '1231332K78978K', name: '永宁街打包站'}, + {id: '123242K78978KK', name: '河西路打包站'}, + {id: '12313378978KK5', name: '成林道打包站'} + ], + items, + mainActiveIndex: 0, + activeId: 0, + visible: false }, /************************************** 初始化流程 ********************************************/ onLoad: function (options) { @@ -29,8 +64,14 @@ Scene({ // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 updateManager.applyUpdate() }) + this.setData({ + userInfo: app.userInfo, + factoryName: app.userInfo.factoryName, + customBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 60), + fragment: (app.globalData.safeFragmentHeight + app.globalData.statusBarHeight), + safeBottom: app.globalData.safeBottom + }) event.on('EventMessage', this, this.onEvent) - this.setData({fragment: (app.globalData.safeFragmentHeight + app.globalData.statusBarHeight), safeBottom: app.globalData.safeBottom }) this.data.setInter = setInterval(this.fetchMessage, 10000) }, /************************************** 生命周期函数--监听页面初次渲染完成 ********************************************/ @@ -61,12 +102,39 @@ Scene({ nowPage.onNotice(result.data.records[0]) } } - }).catch(err => { }) }, + /************************************** changeFactory ********************************************/ onPopupChange: function({detail}){ this.setData({zIndex: detail}) }, + showFactoryList: function(){ + this.setData({ visible: !this.data.visible }) + if (this.data.tabIndex == 0) { + var pageView = this.selectComponent('#' + this.data.tabList[this.data.tabIndex].value) + pageView.onClose() + } + }, + changeFactory: function(e){ + var item = this.data.factoryList[e.currentTarget.dataset.index] + wx.showLoading({ title: '正在切换', mask: true }) + headerFactoryId(item.id) + var pageView = this.selectComponent('#' + this.data.tabList[this.data.tabIndex].value) + if (pageView && this.data.tabIndex != 3) { + pageView.fetchStatisticsInfo(true) + } + event.emit('EventMessage', { what: 999, desc: 'changeFactory' }) + this.setData({ visible: false, factoryId: item.id, factoryName: item.name }) + }, + onHide: function(){ + this.setData({ visible: false }) + }, + onClickNav({ detail }) { + this.setData({ mainActiveIndex: detail.index || 0 }); + }, + onClickItem({ detail }) { + this.setData({ activeId: detail.id }); + }, onUnload: function(){ event.remove('EventMessage', this) if(this.data.setInter) { diff --git a/pages/index/index.json b/pages/index/index.json index 8354b64..c202f81 100644 --- a/pages/index/index.json +++ b/pages/index/index.json @@ -8,6 +8,9 @@ "agent": "/pages/agent/index/index", "home": "/pages/home/index/index", "van-dialog": "/components/dialog/index", + "van-popup": "/components/popup/index", + "van-cell": "/components/cell/index", + "van-tree-select": "/components/tree-select/index", "notification": "/pages/message/notification/index" } } \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml index c023fda..383ee8d 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -1,28 +1,48 @@ + + + {{ userInfo ? (factoryName || '未注册工厂') : ''}} + + + + - - + + - + - - + + - - + + - - - + + + {{item.name}} + + + + + + + - \ No newline at end of file + \ No newline at end of file diff --git a/pages/process/index/index.js b/pages/process/index/index.js index 8e0fa2a..9c500a2 100644 --- a/pages/process/index/index.js +++ b/pages/process/index/index.js @@ -1,7 +1,6 @@ // pages/index/index.js import Dialog from '../../../components/dialog/dialog' import { getStatisticsInfo } from "../../../api/saas" -import { headerFactoryId } from "../../../api/user" import util from '../../../utils/util' const event = require('../../../utils/event') const app = getApp() @@ -15,7 +14,6 @@ Component({ data: { userInfo: null, height: app.globalData.safeFragmentHeight, - customBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 60), tabList: [ { status: 1, badge: '', name: '定价', icon: '/assets/image/icon_pricing.png' }, { status: 2, badge: '', name: '过磅审核', icon: '/assets/image/icon_checking.png' }, @@ -42,18 +40,6 @@ Component({ }, vdate: [], vdateString: '', - factoryId: '12313K78978KK', - factoryList: [ - {id: '12313000KK12K', name: '济州岛打包站'}, - {id: '12313K78978KK', name: '福州道打包站'}, - {id: '1231345500KKK', name: '钟落潭打包站'}, - {id: '12345678978KK', name: '鹤山常服打包站'}, - {id: '123sdfsdf00KKK', name: '合剂打包站'}, - {id: '1231332K78978K', name: '永宁街打包站'}, - {id: '123242K78978KK', name: '河西路打包站'}, - {id: '12313378978KK5', name: '成林道打包站'} - ], - visible: false, actions: [ { id: 1, name: '厂内收货' }, { id: 2, name: '厂外收货' }, @@ -88,11 +74,10 @@ Component({ this.data.form.startTime = util.formatDate(today, 'Y-M-D') + ' 00:00:00' this.data.form.endTime = util.formatDate(max, 'Y-M-D') + ' 00:00:00' var height = app.globalData.safeFragmentHeight - 100 - var customBar = app.globalData.CustomBar || (app.globalData.isIos ? 64 : 60) if(app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0){ - this.setData({userInfo: app.userInfo, height, minDate, maxDate, vdate, vdateString, customBar}) + this.setData({userInfo: app.userInfo, height, minDate, maxDate, vdate, vdateString}) } else { - this.setData({userInfo: app.userInfo, height, minDate, maxDate, vdate, vdateString, customBar }) + this.setData({userInfo: app.userInfo, height, minDate, maxDate, vdate, vdateString }) } wx.hideLoading() } @@ -132,7 +117,6 @@ Component({ }, fetchStatisticsInfo: function(loading){ getStatisticsInfo(this.data.form).then(result => { - if(Number(result.data.priceOrderNum) > 0){ this.data.tabList[0].badge = Number(result.data.priceOrderNum) } else { @@ -191,7 +175,7 @@ Component({ this.triggerEvent("zIndex", -1) }, onClose: function() { - this.setData({ show: false }) + this.setData({ show: false, sheet: false }) this.trigEvent(9) }, onSelect: function({detail}) { @@ -207,23 +191,6 @@ Component({ toAuths: function(){ wx.navigateTo({ url: '/pages/htmls/auths/index' }) }, - showFactoryList: function(){ - this.setData({ visible: true }) - this.triggerEvent("zIndex", -1) - }, - onHide: function(){ - this.setData({ visible: false }) - this.trigEvent(9) - }, - changeFactory: function(e){ - var item = this.data.factoryList[e.currentTarget.dataset.index] - wx.showLoading({ title: '正在切换', mask: true }) - headerFactoryId(item.id) - event.emit('EventMessage', { what: 999, desc: 'changeFactory' }) - this.setData({ visible: false, factoryId: item.id }) - this.trigEvent(9) - this.fetchStatisticsInfo(true) - }, trigEvent: function(zIndex){ setTimeout(() => { this.triggerEvent('zIndex', zIndex) @@ -233,10 +200,6 @@ Component({ this.setData({ sheet: true }) this.triggerEvent("zIndex", -1) }, - onCancel: function(){ - this.setData({ sheet: false }) - this.trigEvent(9) - }, onAction: function({detail}){ this.setData({ sheetStr: detail.name }) this.data.form.type = detail.id diff --git a/pages/process/index/index.json b/pages/process/index/index.json index 1b7c2bb..56190af 100644 --- a/pages/process/index/index.json +++ b/pages/process/index/index.json @@ -5,7 +5,6 @@ "van-grid": "/components/grid/index", "van-grid-item": "/components/grid-item/index", "van-cell": "/components/cell/index", - "van-cell-group": "/components/cell-group/index", "van-icon": "/components/icon/index", "van-popup": "/components/popup/index", "van-action-sheet": "/components/action-sheet/index", diff --git a/pages/process/index/index.wxml b/pages/process/index/index.wxml index ebd0c55..a1f7e37 100644 --- a/pages/process/index/index.wxml +++ b/pages/process/index/index.wxml @@ -1,8 +1,5 @@ - - {{ userInfo ? (userInfo.factoryName || '未注册工厂') : ''}} - @@ -113,16 +110,5 @@ - - - - - - - {{item.name}} - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/pages/process/index/index.wxss b/pages/process/index/index.wxss index 3256bde..8e9c81f 100644 --- a/pages/process/index/index.wxss +++ b/pages/process/index/index.wxss @@ -1,16 +1 @@ -/* pages/index/index.wxss */ -.menu:active { - opacity: .5 -} - -.name{ - overflow: hidden; - text-overflow:ellipsis; - white-space: nowrap; - color:white; - margin-left:32rpx; -} - -.fcell{ - height: 96rpx; -} \ No newline at end of file +/* pages/index/index.wxss */ \ No newline at end of file diff --git a/pages/storage/index/index.js b/pages/storage/index/index.js index 5f91740..eca52f7 100644 --- a/pages/storage/index/index.js +++ b/pages/storage/index/index.js @@ -1,7 +1,5 @@ // pages/index/index.js -import Dialog from '../../../components/dialog/dialog' import { getStatisticsInfo } from "../../../api/saas" -import { headerFactoryId } from "../../../api/user" import util from '../../../utils/util' const event = require('../../../utils/event') const app = getApp() @@ -15,28 +13,19 @@ Component({ data: { userInfo: app.userInfo, height: app.globalData.safeFragmentHeight, - customBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 60), tabList2: [ { status: 1, badge: '', name: '磅单信息', icon: '/assets/image/icon_pound.png' }, { status: 2, badge: '', name: '出货审核', icon: '/assets/image/icon_outcheck.png' }, { status: 3, badge: '', name: '待收款', icon: '/assets/image/icon_payback.png' }, { status: 4, badge: '', name: '已完成', icon: '/assets/image/icon_complete.png' } ], + form: { + startTime: '', + endTime: '', + }, show: false, vdate: [], - vdateString: '', - factoryId: '12313K78978KK', - factoryList: [ - {id: '12313000KK12K', name: '济州岛打包站'}, - {id: '12313K78978KK', name: '福州道打包站'}, - {id: '1231345500KKK', name: '钟落潭打包站'}, - {id: '12345678978KK', name: '鹤山常服打包站'}, - {id: '123sdfsdf00KKK', name: '合剂打包站'}, - {id: '1231332K78978K', name: '永宁街打包站'}, - {id: '123242K78978KK', name: '河西路打包站'}, - {id: '12313378978KK5', name: '成林道打包站'} - ], - visible: false + vdateString: '' }, lifetimes: { attached: function () { @@ -61,7 +50,6 @@ Component({ var vdate = [today.getTime(), maxDate] var vdateString = util.formatDate(new Date(), 'Y-M-D') + '至' + util.formatDate(max, 'Y-M-D') var height = app.globalData.safeFragmentHeight - 100 - var customBar = app.globalData.CustomBar || (app.globalData.isIos ? 64 : 60) if(app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0){ var tabList2 = [ { status: 1, badge: '', name: '磅单信息', icon: '/assets/image/icon_pound.png' }, @@ -69,14 +57,14 @@ Component({ { status: 3, badge: '', name: '待收款', icon: '/assets/image/icon_payback.png' }, { status: 4, badge: '', name: '已完成', icon: '/assets/image/icon_complete.png' } ] - this.setData({userInfo: app.userInfo, height, minDate, maxDate, vdate, vdateString, tabList2, customBar}) + this.setData({userInfo: app.userInfo, height, minDate, maxDate, vdate, vdateString, tabList2}) } else { var tabList2 = [ { status: 1, badge: '', name: '磅单信息', icon: '/assets/image/icon_pound.png' }, { status: 3, badge: '', name: '待收款', icon: '/assets/image/icon_payback.png' }, { status: 4, badge: '', name: '已完成', icon: '/assets/image/icon_complete.png' } ] - this.setData({userInfo: app.userInfo, height, minDate, maxDate, vdate, vdateString, tabList2, customBar }) + this.setData({userInfo: app.userInfo, height, minDate, maxDate, vdate, vdateString, tabList2 }) } } this.fetchStatisticsInfo(this.data.vdate) @@ -99,9 +87,8 @@ Component({ wx.navigateTo({ url: '/pages/storage/order-list/index' }) } }, - fetchStatisticsInfo: function(vdate, loading){ - var param = {startTime: util.formatTime(new Date(vdate[0]), 'Y-M-D'), endTime: util.formatTime(new Date(vdate[1]), 'Y-M-D')} - getStatisticsInfo(param).then(result => { + fetchStatisticsInfo: function(loading){ + getStatisticsInfo(this.data.form).then(result => { if(Number(result.data.weightNoteNum) > 0){ this.data.tabList2[0].badge = Number(result.data.weightNoteNum) } else { @@ -152,23 +139,6 @@ Component({ toAuths: function(){ wx.navigateTo({ url: '/pages/htmls/auths/index' }) }, - showFactoryList: function(){ - this.setData({ visible: true }) - this.triggerEvent("zIndex", -1) - }, - onHide: function(){ - this.setData({ visible: false }) - this.trigEvent(9) - }, - changeFactory: function(e){ - var item = this.data.factoryList[e.currentTarget.dataset.index] - wx.showLoading({ title: '正在切换', mask: true }) - headerFactoryId(item.id) - event.emit('EventMessage', { what: 999, desc: 'changeFactory' }) - this.setData({ visible: false, factoryId: item.id }) - this.trigEvent(9) - this.fetchStatisticsInfo(this.data.vdate, true) - }, trigEvent: function(zIndex){ setTimeout(() => { this.triggerEvent('zIndex', zIndex) diff --git a/pages/storage/index/index.wxml b/pages/storage/index/index.wxml index 4f98be2..b2fb75e 100644 --- a/pages/storage/index/index.wxml +++ b/pages/storage/index/index.wxml @@ -1,9 +1,5 @@ - - {{ userInfo ? (userInfo.factoryName || '未注册工厂') : ''}} - - @@ -25,15 +21,4 @@ - - - - - - - {{item.name}} - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/pages/storage/index/index.wxss b/pages/storage/index/index.wxss index 3256bde..8e9c81f 100644 --- a/pages/storage/index/index.wxss +++ b/pages/storage/index/index.wxss @@ -1,16 +1 @@ -/* pages/index/index.wxss */ -.menu:active { - opacity: .5 -} - -.name{ - overflow: hidden; - text-overflow:ellipsis; - white-space: nowrap; - color:white; - margin-left:32rpx; -} - -.fcell{ - height: 96rpx; -} \ No newline at end of file +/* pages/index/index.wxss */ \ No newline at end of file diff --git a/project.config.json b/project.config.json index ebedd43..73f08ed 100644 --- a/project.config.json +++ b/project.config.json @@ -30,7 +30,6 @@ "outputPath": "" }, "enableEngineNative": false, - "bundle": false, "useIsolateContext": true, "useCompilerModule": true, "userConfirmedUseCompilerModuleSwitch": false,