diff --git a/app.js b/app.js index b262d8d..c19a5ae 100644 --- a/app.js +++ b/app.js @@ -1,6 +1,6 @@ //app.js App({ - evn: 2, // 0: 开发版本;1:测试版本;2:生产版本 + evn: 0, // 0: 开发版本;1:测试版本;2:生产版本 tmplIds: [''], version: 152, xAppId: '503258978847953926', diff --git a/components/cell/index.wxml b/components/cell/index.wxml index d4b0a32..ed9d091 100644 --- a/components/cell/index.wxml +++ b/components/cell/index.wxml @@ -1,7 +1,7 @@ diff --git a/components/pdf-image/index.js b/components/pdf-image/index.js deleted file mode 100644 index 4ffebba..0000000 --- a/components/pdf-image/index.js +++ /dev/null @@ -1,47 +0,0 @@ -const util = require('../../utils/util') //导入模块 - -Component({ - options: { - addGlobalClass: true, - multipleSlots: true - }, - properties: { - src: { - type: String, - value: '' - }, - width: { - type: Number, - value: 80 - }, - height: { - type: Number, - value: 80 - }, - imageList: { - type: Array, - value: [] - } - }, - observers: { - 'imageList': function () { - for (let index = 0; index < this.data.imageList.length; index++) { - if(!this.isPdfUrl(this.data.imageList[index])){ - this.setData({ src: this.data.imageList[index] }) - break - } - } - if(util.isEmpty(this.data.src)){ - this.setData({ src: this.data.imageList[0] }) - } - } - }, - methods: { - isPdfUrl: function (url) { - if (url && (url.indexOf('.pdf') >= 0 || url.indexOf('.PDF') >= 0)) { - return true - } - return false - } - } -}) \ No newline at end of file diff --git a/components/pdf-image/index.json b/components/pdf-image/index.json deleted file mode 100644 index bae998e..0000000 --- a/components/pdf-image/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "component": true, - "usingComponents": { - "van-image": "/components/image/index" - } -} \ No newline at end of file diff --git a/components/pdf-image/index.wxml b/components/pdf-image/index.wxml deleted file mode 100644 index 6cf75da..0000000 --- a/components/pdf-image/index.wxml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - function checkImage(url) { - if(typeof url === 'undefined' || url === '' || url === null){ - return true - } - if (url.indexOf('.png') >= 0 || url.indexOf('.PNG') >= 0) { - return true - } else if (url.indexOf('.jpg') >= 0 || url.indexOf('.JPG') >= 0) { - return true - } else if (url.indexOf('.jpeg') >= 0 || url.indexOf('.JPEG') >= 0) { - return true - } - return false - } - module.exports = checkImage - \ No newline at end of file diff --git a/components/pdf-image/index.wxss b/components/pdf-image/index.wxss deleted file mode 100644 index e69de29..0000000 diff --git a/components/tabs/index.wxss b/components/tabs/index.wxss index 41523be..574b7d7 100644 --- a/components/tabs/index.wxss +++ b/components/tabs/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-tabs{position:relative;-webkit-tap-highlight-color:transparent}.van-tabs__wrap{display:-webkit-flex;display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{-webkit-flex:0 0 22%;flex:0 0 22%}.van-tabs__scroll{background-color:#fff;background-color:var(--tabs-nav-background-color,#fff)}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{margin:0 16px;margin:0 var(--padding-md,16px)}.van-tabs__nav{position:relative;display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{box-sizing:border-box;height:30px;height:var(--tabs-card-height,30px);border:1px solid #ee0a24;border:var(--border-width-base,1px) solid var(--tabs-default-color,#ee0a24);border-radius:2px;border-radius:var(--border-radius-sm,2px)}.van-tabs__nav--card .van-tab{color:#ee0a24;color:var(--tabs-default-color,#ee0a24);line-height:28px;line-height:calc(var(--tabs-card-height, 30px) - 2*var(--border-width-base, 1px));border-right:1px solid #ee0a24;border-right:var(--border-width-base,1px) solid var(--tabs-default-color,#ee0a24)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{color:#fff;color:var(--white,#fff);background-color:#ee0a24;background-color:var(--tabs-default-color,#ee0a24)}.van-tabs__nav--card .van-tab--disabled{color:#c8c9cc;color:var(--tab-disabled-text-color,#c8c9cc)}.van-tabs__line{position:absolute;bottom:0;left:0;z-index:1;height:3px;height:var(--tabs-bottom-bar-height,3px);border-radius:3px;border-radius:var(--tabs-bottom-bar-height,3px);background-color:#ee0a24;background-color:var(--tabs-bottom-bar-color,#ee0a24)}.van-tabs__track{position:relative;width:100%;height:100%}.van-tabs__track--animated{display:-webkit-flex;display:flex;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-tabs__content{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:88rpx;height:var(--tabs-line-height,88rpx)}.van-tabs--card .van-tabs__wrap{height:30px;height:var(--tabs-card-height,30px)}.van-tab{position:relative;-webkit-flex:1;flex:1;box-sizing:border-box;min-width:0;padding:0 5px;text-align:center;cursor:pointer;color:#646566;color:var(--tab-text-color,#646566);font-size:14px;font-size:var(--tab-font-size,14px);line-height:88rpx;line-height:var(--tabs-line-height,88rpx)}.van-tab--active{font-weight:500;font-weight:var(--font-weight-bold,500);color:#323233;color:var(--tab-active-text-color,#323233)}.van-tab--disabled{color:#c8c9cc;color:var(--tab-disabled-text-color,#c8c9cc)}.van-tab--complete{-webkit-flex:1 0 auto!important;flex:1 0 auto!important}.van-tab__title__info{top:8px!important;right:10px;display:inline-block;-webkit-transform:translateX(0)!important;transform:translateX(0)!important} \ No newline at end of file +@import '../common/index.wxss';.van-tabs{position:relative;-webkit-tap-highlight-color:transparent}.van-tabs__wrap{display:-webkit-flex;display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{-webkit-flex:0 0 22%;flex:0 0 22%}.van-tabs__scroll{background-color:#fff;background-color:var(--tabs-nav-background-color,#fff)}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{margin:0 16px;margin:0 var(--padding-md,16px)}.van-tabs__nav{position:relative;display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{box-sizing:border-box;height:30px;height:var(--tabs-card-height,30px);border:1px solid #ee0a24;border:var(--border-width-base,1px) solid var(--tabs-default-color,#ee0a24);border-radius:2px;border-radius:var(--border-radius-sm,2px)}.van-tabs__nav--card .van-tab{color:#ee0a24;color:var(--tabs-default-color,#ee0a24);line-height:28px;line-height:calc(var(--tabs-card-height, 30px) - 2*var(--border-width-base, 1px));border-right:1px solid #ee0a24;border-right:var(--border-width-base,1px) solid var(--tabs-default-color,#ee0a24)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{color:#fff;color:var(--white,#fff);background-color:#ee0a24;background-color:var(--tabs-default-color,#ee0a24)}.van-tabs__nav--card .van-tab--disabled{color:#c8c9cc;color:var(--tab-disabled-text-color,#c8c9cc)}.van-tabs__line{position:absolute;bottom:0;left:0;z-index:1;height:3px;height:var(--tabs-bottom-bar-height,3px);border-radius:3px;border-radius:var(--tabs-bottom-bar-height,3px);background-color:#ee0a24;background-color:var(--tabs-bottom-bar-color,#ee0a24)}.van-tabs__track{position:relative;width:100%;height:100%}.van-tabs__track--animated{display:-webkit-flex;display:flex;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-tabs__content{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:90rpx;height:var(--tabs-line-height,90rpx)}.van-tabs--card .van-tabs__wrap{height:30px;height:var(--tabs-card-height,30px)}.van-tab{position:relative;-webkit-flex:1;flex:1;box-sizing:border-box;min-width:0;padding:0 5px;text-align:center;cursor:pointer;color:#646566;color:var(--tab-text-color,#646566);font-size:14px;font-size:var(--tab-font-size,14px);line-height:90rpx;line-height:var(--tabs-line-height,90rpx)}.van-tab--active{font-weight:500;font-weight:var(--font-weight-bold,500);color:#323233;color:var(--tab-active-text-color,#323233)}.van-tab--disabled{color:#c8c9cc;color:var(--tab-disabled-text-color,#c8c9cc)}.van-tab--complete{-webkit-flex:1 0 auto!important;flex:1 0 auto!important}.van-tab__title__info{top:8px!important;right:10px;display:inline-block;-webkit-transform:translateX(0)!important;transform:translateX(0)!important} \ No newline at end of file diff --git a/pages/client/order-list/index.wxml b/pages/client/order-list/index.wxml index e27550b..13060db 100644 --- a/pages/client/order-list/index.wxml +++ b/pages/client/order-list/index.wxml @@ -3,11 +3,9 @@ 订单列表 - - - - - + + + diff --git a/pages/home/customer-list/index.wxml b/pages/home/customer-list/index.wxml index da39edb..f243382 100644 --- a/pages/home/customer-list/index.wxml +++ b/pages/home/customer-list/index.wxml @@ -47,6 +47,7 @@ {{customerName}} 邀请注册纸通宝 + 请让客户使用微信进行扫码 \ No newline at end of file diff --git a/pages/home/employee/index.js b/pages/home/employee/index.js index d317a5a..805bbbe 100644 --- a/pages/home/employee/index.js +++ b/pages/home/employee/index.js @@ -52,20 +52,27 @@ Page({ }) }, lookItem: function(e){ - this.data.nowIndex = e.currentTarget.dataset.index - this.setData({ show: true }) - }, - showSheet: function(){ - this.setData({ show: true }) + this.data.nowIndex = e.currentTarget.dataset.index + var item = this.data.memberList[this.data.nowIndex] + if(item.position == 'ADMINISTRATOR'){ + this.setData({ actions: [ { id: 1, name: '删除该员工' } ], show: true }) + } else [ + this.setData({ actions: [ { id: 2, name: '设为管理员' }, { id: 1, name: '删除该员工' } ], show: true }) + ] }, onClose() { this.setData({ show: false }) + this.data.nowIndex = -1 }, onSelect({detail}) { if(detail.id === 1){ - var item = this.data.memberList[this.data.nowIndex] + var item = this.data.memberList[this.data.nowIndex] this.deleteItem(this.data.nowIndex, item) this.data.nowIndex = -1 + } else if(detail.id === 2){ + var item = this.data.memberList[this.data.nowIndex] + this.setAdmin(this.data.nowIndex, item) + this.data.nowIndex = -1 } }, setAdmin: function(index, item){ @@ -94,7 +101,7 @@ Page({ }, deleteItem: function(index, item){ wx.showLoading({ title: '加载中', mask: true }) - deleteEmploye({idList: [item.id] }).then(result => { + deleteEmploye({idList: [item.enterpriseMemberId] }).then(result => { this.fetchMemberList() }).catch(err => { wx.hideLoading() diff --git a/pages/home/index/index.wxml b/pages/home/index/index.wxml index 782449f..ff95d86 100644 --- a/pages/home/index/index.wxml +++ b/pages/home/index/index.wxml @@ -5,29 +5,27 @@ - - - - - - - - + + + + + + {{userName || ''}} + ({{userInfo.position != 'ORDINARY' ? '管理员' : '员工'}}) {{userInfo.isAuth == 1 ? '已认证' : '未实名认证'}} 去认证 - + {{userInfo.mobile || ''}} - - + @@ -51,13 +49,13 @@ - + 员工管理 - + 客户管理 @@ -72,13 +70,13 @@ - + 修改密码 - + 退出当前账号 diff --git a/pages/process/order-list/index.wxml b/pages/process/order-list/index.wxml index 9a5b0c4..1a4e6eb 100644 --- a/pages/process/order-list/index.wxml +++ b/pages/process/order-list/index.wxml @@ -3,11 +3,9 @@ {{title}} - - - - - + + +