diff --git a/pages/authorityApproval/components/baseDetail.vue b/pages/authorityApproval/components/baseDetail.vue index e95e4e9..f81acfe 100644 --- a/pages/authorityApproval/components/baseDetail.vue +++ b/pages/authorityApproval/components/baseDetail.vue @@ -1,7 +1,7 @@ @@ -53,7 +53,7 @@ props: ['baseData'], data (){ return { - + } }, } @@ -75,5 +75,5 @@ min-height: 50rpx; line-height: 2; } - - \ No newline at end of file + + diff --git a/pages/authorityApproval/components/cancelView.vue b/pages/authorityApproval/components/cancelView.vue index bce8e9c..15efef6 100644 --- a/pages/authorityApproval/components/cancelView.vue +++ b/pages/authorityApproval/components/cancelView.vue @@ -44,7 +44,7 @@ {{effectiveDetail.SERVERPART_NAME}} - 结账人员:{{effectiveDetail.WORKER_NAME}} + 结账人员:{{effectiveDetail.WORKER_NAME?effectiveDetail.WORKER_NAME:''}}
{{effectiveDetail.ENDACCOUNT_DATE}}
@@ -98,12 +98,12 @@
误差率: - {{calcWuchalv}}% + {{calcWuchalv}}%
-
实收金额: - {{effectiveDetail.CASHPAY}}元 + {{effectiveDetail.CASHPAY?effectiveDetail.CASHPAY:''}}元
@@ -123,6 +123,7 @@ placeholder-style="color:#969EA4;line-height:2;padding-top:10rpx;" auto-height @blur="changeReason" + @change="changeReason" auto-focus > @@ -204,9 +205,11 @@ export default { } } else { - - return (Math.abs(_data.DIFFERENT_PRICE) / _data.CASH * 100).toFixed(2); - + if ( Math.abs(_data.DIFFERENT_PRICE) && _data.CASH){ + return (Math.abs(_data.DIFFERENT_PRICE) / _data.CASH * 100).toFixed(2); + }else{ + return '' + } } } }, @@ -217,7 +220,7 @@ export default { selectShopids:[], approvalReason: '', isloading:false, - stateEmun: {2000:"办理中",3000:"未通过",9000:"已通过"}, + stateEmun: {2000:"办理中",3000:"已否决",9000:"已通过"}, businessStatus : { 3000: '关闭' , 2000: '暂停' @@ -247,6 +250,7 @@ export default { this.effectiveDetail[s] = value }, changeReason(event){ + console.log('event',event) this.approvalReason = event.detail.value }, hidePopup(){ @@ -292,83 +296,90 @@ export default { let _this = this if(_this.isloading) return - uni.showLoading({ - title:'正在提交' - }) - _this.isloading = true - let flag = false - if (this.data.PERMISSIONAPPLY_STATE===2000){ - flag = true - } - let useData = Store.state.userData - let detail = _this.data - const date = new Date() - let y = date.getFullYear() - let m = date.getMonth() + 1 - let d = date.getDate() - if (m<10){ - m='0'+m - } - if (d<10){ - d = '0'+d - } - let H = date.getHours() - H<10?`0${H}`:H - let M = date.getMinutes() - M<10?`0${M}`:M - let S = date.getSeconds() - S<10?`0${S}`:S - console.log('detail',detail) - console.log('_this.effectiveDetail',_this.effectiveDetail) - const req ={ - PermissionApplyModel:{ - PERMISSIONAPPLY_TYPE: 9000, - USER_MOBILEPHONE: detail.USER_MOBILEPHONE, - PERMISSIONAPPLY_DATE: detail.PERMISSIONAPPLY_DATE, - PERMISSIONAPPLY_REASON: detail.PERMISSIONAPPLY_REASON, - SERVERPART_ID: detail.SERVERPART_ID, - SERVERPART_NAME: detail.SERVERPART_NAME, - APPLYSHOP_NAME:_this.effectiveDetail.ENDACCOUNT_ID, - STAFF_ID: detail.STAFF_ID, - STAFF_NAME: detail.STAFF_NAME, - OPERATE_DATE: detail.OPERATE_DATE, - APPOVED_ID: useData.UserId, - APPOVED_NAME: useData.UserName, - APPOVED_INFO: this.approvalReason, - PERMISSIONAPPLY_ID: detail.PERMISSIONAPPLY_ID, - APPOVED_DATE: `${y}-${m}-${d} ${H}:${M}:${S}`, - PERMISSIONAPPLY_STATE: 9000, - } - } - console.log('req',req) - this.$request.$webPost('EShangApiMain/Verification/CancelEndaccount',req).then(res=>{ - console.log('res',res) - uni.hideLoading() - _this.isloading=false - if (res.Result_Code===100){ - if (flag){ - _this.isState2010 = true - } + + uni.showModal({ + title: '同意作废申请?', + success: function (res) { + if (res.confirm) { + uni.showLoading({ + title:'正在提交' + }) + _this.isloading = true + let flag = false + if (_this.data.PERMISSIONAPPLY_STATE===2000){ + flag = true } - if(res.Result_Code!==100) { + let useData = Store.state.userData + let detail = _this.data + const date = new Date() + let y = date.getFullYear() + let m = date.getMonth() + 1 + let d = date.getDate() + if (m<10){ + m='0'+m + } + if (d<10){ + d = '0'+d + } + let H = date.getHours() + H<10?`0${H}`:H + let M = date.getMinutes() + M<10?`0${M}`:M + let S = date.getSeconds() + S<10?`0${S}`:S + console.log('detail',detail) + console.log('_this.effectiveDetail',_this.effectiveDetail) + const req ={ + PermissionApplyModel:{ + PERMISSIONAPPLY_TYPE: 9000, + USER_MOBILEPHONE: detail.USER_MOBILEPHONE, + PERMISSIONAPPLY_DATE: detail.PERMISSIONAPPLY_DATE, + PERMISSIONAPPLY_REASON: detail.PERMISSIONAPPLY_REASON, + SERVERPART_ID: detail.SERVERPART_ID, + SERVERPART_NAME: detail.SERVERPART_NAME, + APPLYSHOP_NAME:_this.effectiveDetail.ENDACCOUNT_ID, + STAFF_ID: detail.STAFF_ID, + STAFF_NAME: detail.STAFF_NAME, + OPERATE_DATE: detail.OPERATE_DATE, + APPOVED_ID: useData.UserId, + APPOVED_NAME: useData.UserName, + APPOVED_INFO: _this.approvalReason, + PERMISSIONAPPLY_ID: detail.PERMISSIONAPPLY_ID, + APPOVED_DATE: `${y}-${m}-${d} ${H}:${M}:${S}`, + PERMISSIONAPPLY_STATE: 9000, + } + } + console.log('req',req) + _this.$request.$webPost('EShangApiMain/Verification/CancelEndaccount',req).then(res=>{ + console.log('res',res) + uni.hideLoading() + _this.isloading=false + if (res.Result_Code===100){ + if (flag){ + _this.isState2010 = true + } + } + if(res.Result_Code!==100) { uni.showModal({ - title: '温馨提示', - content: res.Result_Desc + title: '温馨提示', + content: res.Result_Desc }) return - } - uni.showModal({ + } + uni.showModal({ title: '温馨提示', content: res.Result_Desc, showCancel:false, success: function (res) { - if (res.confirm) { - _this.$util.toNextRoute('reLaunch', "/pages/authorityApproval/index") - } + if (res.confirm) { + _this.$util.toNextRoute('reLaunch', "/pages/authorityApproval/index") + } } + }) }) - }) - + } + } + }); // const permissionApplyModel = { // ...this.data, @@ -418,43 +429,53 @@ export default { return } if(_this.isloading) return - uni.showLoading({ - title:'正在提交' - }) - _this.isloading=true - const permissionApplyModel = { - ...this.data, - APPOVED_NAME:this.user.Membership_Name, - APPOVED_INFO: this.approvalReason, - APPOVED_ID: this.user.UserId, - PERMISSIONAPPLY_STATE: 3000, - APPOVED_DATE: new Date() - } - this.$request.$webPost('/EShangApiMain/BusinessProcess/RejectPermissionApply',{ - PermissionApplyModel: permissionApplyModel - }).then(res=>{ - uni.hideLoading() - _this.isloading=false - if(res.Result_Code!==100) { + let detail = _this.data + uni.showModal({ + title: '否决作废申请?', + success: function (res) { + if (res.confirm) { + uni.showLoading({ + title:'正在提交' + }) + _this.isloading=true + const permissionApplyModel = { + ...this.data, + APPOVED_NAME:_this.user.Membership_Name, + APPOVED_INFO: _this.approvalReason, + APPOVED_ID: _this.user.UserId, + PERMISSIONAPPLY_STATE: 3000, + PERMISSIONAPPLY_ID: detail.PERMISSIONAPPLY_ID, + APPOVED_DATE: new Date() + } + _this.$request.$webPost('/EShangApiMain/BusinessProcess/RejectPermissionApply',{ + PermissionApplyModel: permissionApplyModel + }).then(res=>{ + uni.hideLoading() + _this.isloading=false + if(res.Result_Code!==100) { uni.showModal({ - title: '温馨提示', - content: res.Result_Desc + title: '温馨提示', + content: res.Result_Desc }) return - } - uni.showModal({ + } + uni.showModal({ title: '温馨提示', content: res.Result_Desc, showCancel:false, success: function (res) { - if (res.confirm) { - // _this.$emit('refresh') - _this.$util.toNextRoute('reLaunch', "/pages/authorityApproval/index") - } + if (res.confirm) { + // _this.$emit('refresh') + _this.$util.toNextRoute('reLaunch', "/pages/authorityApproval/index") + } } - }) + }) + + }) + } + } + }); - }) }, handleCancel(){ diff --git a/util/api.js b/util/api.js index 60b5963..33439c7 100644 --- a/util/api.js +++ b/util/api.js @@ -33,8 +33,7 @@ export default { data.WeChat_MiniProToken = Store.state.userData.WeChat_MiniProToken || '' data.WeChatAppId = 'wxa99ef047735c031e' - data.memberShipId = !data.memberShipId ? (Store.state.userData.Membership_Id || '') : - data.memberShipId // ||'3255' 1170386 1125717 // + data.memberShipId = !data.memberShipId ? (Store.state.userData.Membership_Id || '') :data.memberShipId // ||'3255' 1170386 1125717 // // ModuleGuid:"60ee4604-0830-4056-931d-d1f7e111810c,1d46081b-6ff8-44d5-9205-31c72bdb4328", let str = '' if (Store.state.userData.AuthorityInfo['1d46081b-6ff8-44d5-9205-31c72bdb4328']===1){ @@ -77,18 +76,25 @@ export default { } } } + if (method == 'POST' && !isWebApi) { requstOptions.header = { 'content-type': 'application/x-www-form-urlencoded;charset=utf-8', 'ServerpartCodes':Store.state.userData.UserCityAuthority, 'ProvinceCode': Store.state.userData.ProvinceCode, - 'ModuleGuid':ModuleGuid + 'ModuleGuid':ModuleGuid, + 'WeChat_AppId' : 'wxa99ef047735c031e', + 'memberShipId' : !data.memberShipId ? (Store.state.userData.Membership_Id || '') :data.memberShipId, + 'SourcePlatform': 'minProgram' } }else{ requstOptions.header = { 'ServerpartCodes':Store.state.userData.UserCityAuthority, 'ProvinceCode': Store.state.userData.ProvinceCode, - 'ModuleGuid':ModuleGuid + 'ModuleGuid':ModuleGuid, + 'WeChat_AppId' : 'wxa99ef047735c031e', + 'memberShipId' : !data.memberShipId ? (Store.state.userData.Membership_Id || '') :data.memberShipId, + 'SourcePlatform': 'minProgram' } } requstOptions.success = (res) => {