|
@@ -22,7 +22,19 @@
|
|
|
<view class="icon"><image :src="StaticUrl + '/image/icon-noaccess@2x.png'" mode="widthFix"></image></view>
|
|
|
<view class="text">暂无权限查看</view>
|
|
|
</view>
|
|
|
- </template>
|
|
|
+ </template>
|
|
|
+ <!-- 弹窗 -->
|
|
|
+ <tui-modal
|
|
|
+ :show="modal"
|
|
|
+ @click="handleClick"
|
|
|
+ @cancel="hideMobel"
|
|
|
+ :content="contentModalText"
|
|
|
+ :button="modalButton"
|
|
|
+ color="#333"
|
|
|
+ :size="32"
|
|
|
+ shape="circle"
|
|
|
+ :maskClosable="false"
|
|
|
+ />
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -45,13 +57,26 @@ export default {
|
|
|
opcity: 1,
|
|
|
isCmcustomClass: 'left',
|
|
|
isNoAuthority:false,
|
|
|
- skeletonShow:true,
|
|
|
+ skeletonShow:true,
|
|
|
+ userType:'',
|
|
|
receiptId:0,
|
|
|
- receiptType:1// 收款款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
|
|
|
+ receiptType:1,// 收款款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
|
|
|
+ contentModalText: '', //操作文字提示语句
|
|
|
+ modal: false,
|
|
|
+ modalButton: [
|
|
|
+ {
|
|
|
+ text: '知道了',
|
|
|
+ customStyle: {
|
|
|
+ color: '#fff',
|
|
|
+ },
|
|
|
+ plain: false
|
|
|
+ }
|
|
|
+ ],
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
- this.receiptId = option.id
|
|
|
+ this.receiptId = option.id
|
|
|
+ console.log('分享收款ID====>',option.id)
|
|
|
let obj = {}
|
|
|
// #ifdef MP-WEIXIN
|
|
|
obj = wx.getMenuButtonBoundingClientRect()
|
|
@@ -82,7 +107,8 @@ export default {
|
|
|
iv:Wx.iv ,
|
|
|
})
|
|
|
.then(response =>{
|
|
|
- let data = response.data
|
|
|
+ let data = response.data
|
|
|
+ this.userType = data.userType
|
|
|
this.login(response.data)
|
|
|
this.$store.commit('updateStatus',response.data)
|
|
|
setTimeout(()=>{
|
|
@@ -129,15 +155,47 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
checkedReceiptAdministration(receipt){
|
|
|
- // 根据收款账号调用不同收款详情查看权限
|
|
|
- if(receipt.receiptType == 1 || receipt.receiptType == 2 || receipt.receiptType == 4){// 订单 非订单
|
|
|
- this.getOrderReceiptDetail(receipt)
|
|
|
- }else if(receipt.receiptType == 3){
|
|
|
- this.getOrderReceiptRebateDetail(receipt)
|
|
|
- }else if(receipt.receiptType == 5){
|
|
|
- this.getOrderReceiptRefundDetail(receipt)
|
|
|
- }
|
|
|
- },
|
|
|
+ // 根据收款账号调用不同收款详情查看权限
|
|
|
+ if(receipt.receiptType){
|
|
|
+ if(receipt.receiptType == 1 || receipt.receiptType == 2 || receipt.receiptType == 4){// 订单非订单
|
|
|
+ this.getOrderReceiptDetail(receipt)
|
|
|
+ }else if(receipt.receiptType == 3){
|
|
|
+ this.getOrderReceiptRebateDetail(receipt)
|
|
|
+ }else if(receipt.receiptType == 5){
|
|
|
+ this.getOrderReceiptRefundDetail(receipt)
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.modal = true
|
|
|
+ this.contentModalText ='该款项已作废,请重新收款!'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleClick(){// 作废款项弹窗跳转
|
|
|
+ this.modal = false
|
|
|
+ this.navigateLink()
|
|
|
+ },
|
|
|
+ navigateLink(){// 根据用户权限跳转对应页面
|
|
|
+ /**
|
|
|
+ * 用户类型 1协销人员,2客服,3财务,4超级管理员
|
|
|
+ * 1. 协销人员跳转到收款列表页面
|
|
|
+ * 2. 客服跳转到收款列表页面
|
|
|
+ * 3. 财务人员跳转到款项识别页面
|
|
|
+ * 4. 超级管理员跳转到款项识别页面
|
|
|
+ * */
|
|
|
+ switch(this.userType){
|
|
|
+ case 1:
|
|
|
+ this.$api.navigateTo('/pages/collection/list')
|
|
|
+ break
|
|
|
+ case 2:
|
|
|
+ this.$api.navigateTo('/pages/collection/list')
|
|
|
+ break
|
|
|
+ case 3:
|
|
|
+ this.$api.navigateTo('/pages/collection/sms')
|
|
|
+ break
|
|
|
+ case 4:
|
|
|
+ this.$api.navigateTo('/pages/collection/sms')
|
|
|
+ break
|
|
|
+ }
|
|
|
+ },
|
|
|
getOrderReceiptDetail(receipt) {//
|
|
|
// 订单&&非订单收款详情
|
|
|
this.OrderService.orderReceiptDetail({ id: receipt.id })
|