diff --git a/pages/home/employee/index.js b/pages/home/employee/index.js index 867a994..88a038f 100644 --- a/pages/home/employee/index.js +++ b/pages/home/employee/index.js @@ -21,21 +21,18 @@ Page({ */ onLoad: function (options) { this.setData({ height: app.globalData.fragmentHeight }) - // wx.showLoading({ title: '加载中', mask: true }) - // this.fetchMemberList() + wx.showLoading({ title: '加载中', mask: true }) + this.fetchMemberList() }, fetchMemberList: function(){ - getCheckList({enterpriseId: app.accountInfo.enterpriseId}).then(result => { - //成功回调 + getCheckList({enterpriseId: app.userInfo.enterpriseId}).then(result => { this.setData({ checkList: result.data, loading: false}) }).catch(err => { - //异常回调 wx.hideLoading() util.showToast(err) }) this.data.eemidList = [] - getEmployeList({enterpriseId: app.accountInfo.enterpriseId, isPassFromBackstage: 1}).then(result => { - //成功回调 + getEmployeList({enterpriseId: app.userInfo.enterpriseId, isPassFromBackstage: 1}).then(result => { for (let index = 0; index < result.data.length; index++) { const element = result.data[index] if(element.position == 'ADMINISTRATOR'){ @@ -45,7 +42,6 @@ Page({ this.setData({ memberList: result.data, loading: false }) wx.hideLoading() }).catch(err => { - //异常回调 wx.hideLoading() util.showToast(err) }) @@ -84,11 +80,9 @@ Page({ } } adminEmploye({ids: this.data.eemidList }).then(result => { - //成功回调 this.setData({ ['memberList[' + index + '].position'] : item.position == 'ADMINISTRATOR' ? 'ORDINARY' : 'ADMINISTRATOR'}) wx.hideLoading() }).catch(err => { - //异常回调 wx.hideLoading() util.showToast(err) }) @@ -96,10 +90,8 @@ Page({ deleteItem: function(index, item){ wx.showLoading({ title: '加载中', mask: true }) deleteEmploye({idList: [item.id] }).then(result => { - //成功回调 this.fetchMemberList() }).catch(err => { - //异常回调 wx.hideLoading() util.showToast(err) }) diff --git a/pages/login/index.js b/pages/login/index.js index 54f85db..c0ec86b 100644 --- a/pages/login/index.js +++ b/pages/login/index.js @@ -23,8 +23,8 @@ Page({ loging: false, regist: false, metaData: null, - code: null, - // code: '?mark=cloudprint&QrCodeRecordId=552615937199706112' + // code: null, + code: '?mark=cloudprint&QrCodeRecordId=554273274725535744' }, /************************************** 初始化登录流程 ********************************************/ onLoad: function (options) { diff --git a/pages/process/index/index.wxml b/pages/process/index/index.wxml index 6995305..f84a99a 100644 --- a/pages/process/index/index.wxml +++ b/pages/process/index/index.wxml @@ -7,7 +7,7 @@ - {{userInfo.factoryName}} + {{userInfo.enterpriseName}} diff --git a/pages/process/index/index.wxss b/pages/process/index/index.wxss index 1bb28ac..0e998ca 100644 --- a/pages/process/index/index.wxss +++ b/pages/process/index/index.wxss @@ -1,4 +1,12 @@ /* pages/index/index.wxss */ .menu:active { opacity: .5 +} + +.name{ + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; + color:white; + margin-left:32rpx; } \ No newline at end of file diff --git a/pages/process/order-info/index.wxml b/pages/process/order-info/index.wxml index 49c0d9d..ce01e36 100644 --- a/pages/process/order-info/index.wxml +++ b/pages/process/order-info/index.wxml @@ -35,7 +35,7 @@ 废纸品类 - {{form.productCategoryName}} + {{form.productName}} diff --git a/pages/process/order-list/index.js b/pages/process/order-list/index.js index 3395ee8..b3dd18b 100644 --- a/pages/process/order-list/index.js +++ b/pages/process/order-list/index.js @@ -19,7 +19,8 @@ Page({ pageNum: 1, pageSize: 10 }, - title: '全部' + title: '全部', + lastTime: null }, // * 生命周期函数--监听页面加载 onLoad: function (options) { @@ -53,6 +54,7 @@ Page({ loading: true, finished: false }) + this.data.lastTime = null this.fetchOrderList() }, //1:待定价,2:待过皮重,3:待过磅审核,4:待付款,5:已完成 @@ -68,6 +70,25 @@ Page({ getFactoryOrderList(this.data.form).then(result => { if (result.data && result.data.records.length) { var respList = result.data.records + // 对返回的消息列表进行处理,将同一天的消息显示在一起 + for (let i = 0; i < respList.length; i++) { + if (util.isEmpty(this.data.lastTime)) { + this.data.lastTime = respList[i].createTime + if (this.data.lastTime.length > 10) { + this.data.lastTime = this.data.lastTime.substring(0, 10) + } + respList[i].tipsTime = this.data.lastTime + } else { + var itemTime = respList[i].createTime + if (itemTime.length > 10) { + itemTime = itemTime.substring(0, 10) + } + if (this.data.lastTime !== itemTime) { + respList[i].tipsTime = itemTime + } + this.data.lastTime = itemTime + } + } let nowList = `orderList[${this.data.orderList.length}]` var num = this.data.form.pageNum var finished = ((num - 1) * this.data.form.pageSize + respList.length) >= result.data.total diff --git a/pages/process/order-list/index.wxml b/pages/process/order-list/index.wxml index 251747b..818942c 100644 --- a/pages/process/order-list/index.wxml +++ b/pages/process/order-list/index.wxml @@ -11,35 +11,38 @@ {{loading? '正在加载' : '暂无数据'}} - - - - - - - - 客户名称:{{item.factoryCustomerName}} - ({{item.factoryCustomerMobile}}) - - 毛重:{{item.totalWeight}}KG - - - 取消 - 定价 - - - 审核 - - - 待付款 - - - 已完成 + + + + {{item.tipsTime}} + + + + + 客户名称:{{item.factoryCustomerName}} + ({{item.factoryCustomerMobile}}) + 毛重:{{item.totalWeight}}KG + + + 取消 + 定价 - + + 审核 + + + 待付款 + + + 已完成 + + - + diff --git a/pages/process/order-list/index.wxss b/pages/process/order-list/index.wxss index 649b69a..bc19567 100644 --- a/pages/process/order-list/index.wxss +++ b/pages/process/order-list/index.wxss @@ -1 +1,7 @@ -/* pages/process/order-list/index.wxss */ \ No newline at end of file +/* pages/process/order-list/index.wxss */ +.item-content{ + padding: 20rpx 32rpx 20rpx 0rpx; + border-bottom:1rpx solid #f3f3f3; + margin-left:32rpx; + align-items: flex-start; +} \ No newline at end of file