From a482f0431ca91ca62ca80b07f4f10e5a84a1ea08 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Mon, 1 Feb 2021 16:36:20 +0800 Subject: [PATCH] no message --- api/user.js | 13 +++++++++++-- pages/login/index.js | 6 +++--- pages/process/order-info/index.js | 10 +++++----- pages/process/order-info/index.wxml | 10 +++++----- pages/process/order-list/index.js | 2 +- pages/process/order-price/index.js | 16 +++++++++++++--- pages/process/order-price/index.wxml | 4 ++-- 7 files changed, 40 insertions(+), 21 deletions(-) diff --git a/api/user.js b/api/user.js index 53cd4b1..55d9801 100644 --- a/api/user.js +++ b/api/user.js @@ -21,7 +21,11 @@ const updateUserInfo = (params) => mPost('/uec/user/update/user-info', params, c const generateCode = (params) => mPost('/uec/generate/qrcode', params, config) const verifyCode = (code, params) => mGet(`/uec/verify/qrcode${code}`, params, config) const applyEmplyee = (params) => mPost(`/uec/apply/to/be/emplyee/of/enterprise-department`, params, config) - +const getCheckList = (params) => mGet(`/uec/get/auditing-joining-enterprise-application-list`, params, config) +const getEmployeList = (params) => mGet(`/uec/get/passed-employees`, params, config) +const auditEmploye = (params) => mPost(`/uec/audit/employee-joining-application`, params, config) +const deleteEmploye = (params) => mPost(`/uec/remove/employees`, params, config) +const adminEmploye = (params) => mPost(`/uec/grant/admin-role/to/employees`, params, config) // **************************************************************************************************************************************** // /authorize/by-wechat-applet小程序登录 function loginWechat(form) { @@ -189,5 +193,10 @@ export { modifyMobile, verifyCode, generateCode, - applyEmplyee + applyEmplyee, + getCheckList, + getEmployeList, + auditEmploye, + deleteEmploye, + adminEmploye } \ No newline at end of file diff --git a/pages/login/index.js b/pages/login/index.js index 7b92932..54f85db 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=552615937199706112' }, /************************************** 初始化登录流程 ********************************************/ onLoad: function (options) { @@ -97,7 +97,7 @@ Page({ app.userInfo = result.data app.globalData.token = authorization wx.hideLoading() - if(app.userInfo.factoryId){ + if(app.userInfo.enterpriseId){ storage.put('Authorization', app.globalData.token) this.setData({ loging: false}) if(this.data.metaData && app.userInfo.factoryId != this.data.metaData.factoryId){ diff --git a/pages/process/order-info/index.js b/pages/process/order-info/index.js index 5eb4556..ee20625 100644 --- a/pages/process/order-info/index.js +++ b/pages/process/order-info/index.js @@ -23,7 +23,6 @@ Page({ wx.showLoading({ title: '正在获取', mask: true }) getFactoryOrderInfo(options.id).then(result => { wx.hideLoading() - result.data.amount = math.times(math.minus(result.data.netWeight, result.data.deductWeight), result.data.settleUnitPrice) if(result.data.status == 4){ this.data.title = '待付款' } else if(result.data.status == 5){ @@ -34,6 +33,7 @@ Page({ wx.hideLoading() this.setData({ safeBottom: app.globalData.safeBottom }) util.showToast(err) + console.log(err) }) } }, @@ -83,12 +83,12 @@ Page({ viewImage: function (e) { var imgList = [] if(e.currentTarget.dataset.type == 0){ - for (let index = 0; index < this.data.form.preWeighingPicture.length; index++) { - imgList.push(this.data.this.data.form.preWeighingPicture[index].url) + for (let index = 0; index < this.data.form.totalWeighingPicture.length; index++) { + imgList.push(this.data.form.totalWeighingPicture[index].url) } } else { - for (let index = 0; index < this.data.form.aftWeighingPicture.length; index++) { - imgList.push(this.data.this.data.form.aftWeighingPicture[index].url) + for (let index = 0; index < this.data.form.emptyWeighingPicture.length; index++) { + imgList.push(this.data.form.emptyWeighingPicture[index].url) } } wx.previewImage({ urls: imgList, current: e.currentTarget.dataset.url }) diff --git a/pages/process/order-info/index.wxml b/pages/process/order-info/index.wxml index b4177fe..e128b2c 100644 --- a/pages/process/order-info/index.wxml +++ b/pages/process/order-info/index.wxml @@ -68,8 +68,8 @@ 过毛重照片 - + @@ -81,8 +81,8 @@ 过皮重照片 - + @@ -101,7 +101,7 @@ 金额(元) - {{form.amount}} + {{form.settlePrice || ''}} diff --git a/pages/process/order-list/index.js b/pages/process/order-list/index.js index b282a61..3395ee8 100644 --- a/pages/process/order-list/index.js +++ b/pages/process/order-list/index.js @@ -112,7 +112,7 @@ Page({ }, lookItem: function (e) { var item = this.data.orderList[e.currentTarget.dataset.page][e.currentTarget.dataset.index] - if(item.status == 3 || item.status == 4 || item.status == 5){ + if(item.status == 2 || item.status == 3 || item.status == 4 || item.status == 5){ wx.navigateTo({ url: '/pages/process/order-info/index?id=' + item.id }) } }, diff --git a/pages/process/order-price/index.js b/pages/process/order-price/index.js index a8626f8..a8df06c 100644 --- a/pages/process/order-price/index.js +++ b/pages/process/order-price/index.js @@ -107,7 +107,17 @@ Page({ return } wx.showLoading({ title: '处理中', mask: true }) - pricingOrder(this.data.form).then(result => { + var data = {id: this.data.form.id} + if(Number(this.data.form.deductWeight) > 0){ + data.deductWeight = Number(this.data.form.deductWeight) + } else if(Number(this.data.form.deductPercent) > 0){ + data.deductPercent = Number(this.data.form.deductPercent) + } + data.plateNumber = this.data.form.plateNumber + data.productId = this.data.form.productId + data.unitPrice = Number(this.data.form.unitPrice) + data.isWithoutTare = Number(this.data.form.isWithoutTare) + pricingOrder(data).then(result => { wx.hideLoading() util.showBackToast('定价成功') event.emit('OrderMessage', { what: 12, desc: 'pricingOrder' }) @@ -118,8 +128,8 @@ Page({ }, viewImage: function (e) { var imgList = [] - for (let index = 0; index < this.data.form.preWeighingPicture.length; index++) { - imgList.push(this.data.this.data.form.preWeighingPicture[index].url) + for (let index = 0; index < this.data.form.totalWeighingPicture.length; index++) { + imgList.push(this.data.form.totalWeighingPicture[index].url) } wx.previewImage({ urls: imgList, current: e.currentTarget.dataset.url }) } diff --git a/pages/process/order-price/index.wxml b/pages/process/order-price/index.wxml index a363ac1..619baa3 100644 --- a/pages/process/order-price/index.wxml +++ b/pages/process/order-price/index.wxml @@ -76,8 +76,8 @@ 过毛重照片 - +