zhengjinyi 2 days ago
parent
commit
912f2ed400
8 changed files with 2739 additions and 2739 deletions
  1. 339 339
      common/config/caimeiApi.js
  2. 104 104
      filters/filters.js
  3. 300 300
      pages/login/login-account.vue
  4. 296 296
      pages/login/login-share.vue
  5. 1258 1258
      pages/relation/ordinary/index.vue
  6. 2 2
      services/config.env.js
  7. 324 324
      services/order.service.js
  8. 116 116
      store/index.js

+ 339 - 339
common/config/caimeiApi.js

@@ -1,339 +1,339 @@
-/**
- * @Time 2019-12-12
- * @Author Zhengjingyi
- * @Action 全局公共方法
- */
-// import requestUrl from './config.js'
-const Tool = {
-    /**
-	 * @封装公共get数据请求方法无加载动画
-	 * @方法参数:请求地址,请求后台需要的参数字段,回调函数
-	 * @自定义请求头信息
-	 */
-    get:function(url,data,callback){
-		 uni.request({
-            url: requestUrl + url,
-            data:data,
-            header: {
-                'Accept': 'application/json',
-                'Content-Type': 'application/x-www-form-urlencoded', 
-                'X-Token': uni.getStorageSync('token') ? uni.getStorageSync('token') : 'token',
-                'cookie': uni.getStorageSync('sessionid')
-            },
-            method: 'GET',
-            success: (response) => {
-                if(response.statusCode !== 200){
-                    uni.showToast({icon: 'none',title:'服务器连接错误',duration: 2000})
-                    callback(response.statusCode)
-                }else{
-                    callback(response.data)
-                }
-            },
-            fail: (error) => {
-                if (error) {
-                    uni.showToast({icon: 'none',title: '网络错误,请稍后重试',duration: 2000})
-                }
-            }
-		 })
-    },
-    /**
-	 * @封装公共get数据请求方法有加载动画
-	 * @方法参数:请求地址,请求后台需要的参数字段,回调函数
-	 * @自定义请求头信息
-	 */
-    lodingGet:function(url,data,callback){
-		 uni.showLoading({mask: true,title:'加载中~',})
-		 uni.request({
-            url: requestUrl + url,
-            data:data,
-            header: {
-                'Accept': 'application/json',
-                'Content-Type': 'application/x-www-form-urlencoded', 
-                'X-Token': uni.getStorageSync('token') ? uni.getStorageSync('token') : 'token',
-                'cookie': uni.getStorageSync('sessionid')
-            },
-            method: 'GET',
-            success: (response) => {
-                if(response.statusCode !== 200){
-                    uni.showToast({icon: 'none',title: '服务器连接错误',duration: 2000})
-                    callback(response.statusCode)
-                }else{
-                    callback(response.data)
-                }
-            },
-            fail: (error) => {
-                if (error) {
-                    uni.showToast({icon: 'none',title: '网络错误,请稍后重试',duration: 2000})
-                }
-            },
-            complete: () => {
-                setTimeout(function () {
-                    uni.hideLoading()
-                }, 250)
-            }
-		 })
-    },
-    /**
-	 * @封装公共post数据请求方法
-	 * @方法参数:请求地址,请求后台需要的参数字段,回调函数
-	 */
-    post:function(url,data,loadingStatus,callback){
-        if(loadingStatus){uni.showLoading({mask: true,title:'加载中~'})}
-        uni.request({
-            url: requestUrl+url,
-            data:data,
-            header: {
-                'Accept': 'application/json',
-                'Content-Type': 'application/x-www-form-urlencoded',
-                'X-Token': uni.getStorageSync('token') ? uni.getStorageSync('token') : 'token',
-                'cookie': uni.getStorageSync('sessionid')
-            },
-            method: 'POST',
-            success: (response) => {
-                if(loadingStatus){uni.hideLoading()}
-                const result = response.data
-                callback(result)
-            },
-            fail: (error) => {
-                uni.hideLoading()
-                if (error) {
-                    uni.showToast({icon: 'none',title: '网络错误,请稍后重试',duration: 2000})
-                }
-            }
-        })
-    },
-    getComStorage:function(key){// 获取本地Storage
-        return new Promise(function(resolve,reject) {
-            uni.getStorage({
-                key: key,
-                success: function (res){
-                    resolve(res.data)
-                }
-            })
-        })
-    },
-    setStorage:function(key,data){// 存储本地Storage
-        return new Promise(function(resolve,reject) {
-            uni.setStorage({
-                key: key,
-                data:data,
-                success: function (res){
-                }
-            })
-        })
-    },
-    getStorage:function(){// 获取本地userInfo
-        return new Promise(function(resolve,reject) {
-            uni.getStorage({
-                key: 'userInfo',
-                success: function (res){
-                    resolve(res.data)
-                },
-                fail: function(res){
-                    reject(false)
-                }
-            })
-        })
-    },
-    getStorageAddressKey:function(){// 获取本地地址信息
-        return new Promise(function(resolve,reject) {
-            uni.getStorage({
-                key: 'address_key',
-                success: function (res){
-                    resolve(res.data)
-                }
-            })
-        })
-    },
-    loginStatus:function(){
-        // 获取用户是否登陆 1:已登陆,否则未登陆
-        return new Promise(function(resolve,reject) {
-            uni.getStorage({
-                key: 'userInfo',
-                success: function (res){
-                    if(res.data.code == '1'){
-                        resolve(true)
-                    } else {
-                        resolve(false)
-                    }
-                }
-            })
-        })
-    },
-    navigateLinkJump:function(){// 统一处理根据用户类型跳转
-        const UserInfo = uni.getStorageSync('userInfo')
-        let Jump_URL = ''	
-        let UserTypeObj = {
-            1: '/pages/collection/list',
-            2: '/pages/collection/list',
-            3: '/pages/collection/sms',
-            4: '/pages/collection/sms',
-        }
-        if(UserInfo){
-            /**
-			 * 用户类型(userType) 1协销人员,2客服,3财务,4超级管理员
-			 * 1. 协销人员跳转到收款列表页面
-			 * 2. 客服跳转到收款列表页面
-			 * 3. 财务人员跳转到款项识别页面
-			 * 4. 超级管理员跳转到款项识别页面
-			 * */
-            Object.keys(UserTypeObj).forEach(function(key) {
-			    if (key == UserInfo.userType) {
-			        Jump_URL = UserTypeObj[key]
-			    }
-            })
-        }else{
-            Jump_URL = '/pages/login/login-account'
-        }
-        Tool.redirectTo(Jump_URL)
-    },
-    navigateBack:function(page){
-        uni.navigateBack({
-		    delta: page
-        })
-    },
-    navigateTo:function(url){
-        //路由跳转:页面之间路由跳转
-        uni.navigateTo({
-            url:url
-        })
-    },
-    redirectTo:function(url){
-        //路由跳转:关闭当前页跳转到新页面	
-        uni.redirectTo({
-            url:url
-        })
-    },
-    switchTabTo:function(url){
-        //路由跳转:底部 tab页
-        uni.switchTab({
-            url:url
-        })
-    },
-    isNumber:function(value){
-        //验证是否为数字
-	    var patrn = /^(-)?\d+(\.\d+)?$/
-	    if (patrn.exec(value) == null || value == '') {
-	         return false
-	    } else {
-	         return true  
-        }	 
-    },
-    getWindowHeight:function(){
-        // 获取窗口高度
-        const {windowHeight, pixelRatio} = wx.getSystemInfoSync()
-        return windowHeight
-    },
-    adaptRichTextImg:function(res){
-        /**
-		 *@富文本实现图片自适应
-		 *@style再添加自适应样式
-		 */ 
-        const html = res.replace(/<img[^>]*>/gi,function(match,capture){			
-            let match1 = match.replace(/<img*/gi, '<img style="width:100% !important;height:auto !important;float:left !important;"'),
-                results = match1.replace(/style=/gi, 'style="width:100%;height:auto;float:left;"')
-            return results
-        })
-        return html	
-    },
-    FormatMoney:function(num){
-        // 金额千分位
-        return num.toString().replace(/\d+/, function (n) { // 先提取整数部分
-            return n.replace(/(\d)(?=(\d{3})+$)/g, function ($1) { // 对整数部分添加分隔符
-                return $1 + ','
-            })
-        })
-    },
-    formatDate:function(){
-        //获取当前时间
-        let date = new Date()
-        let y = date.getFullYear()
-        let MM = date.getMonth() + 1
-        MM = MM < 10 ? ('0' + MM) : MM
-        let d = date.getDate()
-        d = d < 10 ? ('0' + d) : d
-        let h = date.getHours()
-        h = h < 10 ? ('0' + h) : h
-        let m = date.getMinutes()
-        m = m < 10 ? ('0' + m) : m
-        let s = date.getSeconds()
-        s = s < 10 ? ('0' + s) : s
-	    return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s
-    },
-    regexSets:function() {
-        let sets = {
-            'companyName': /^[\u4e00-\u9fa5\(\)()\s\da-zA-Z&]{2,50}$/gi,
-            'phoneAndTelephone': /^([1]\d{10}|([\((]?0[0-9]{2,3}[)\)]?[-]?)?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?)$/,
-            'bankNum': /^([1-9]{1})(\d{18})$/,
-            'invalidChar': /^[\s\u4e00-\u9fa5a-z0-9_-]{0,}$/
-        }
-        return sets
-    },
-    timestampToTime:function(timestamp) {
-        // 时间戳转日期
-	   let date = new Date(timestamp * 1000)//时间戳为10位需*1000,时间戳为13位的话不需乘1000
-	   let Y = date.getFullYear() + '-'
-	   let M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-'
-	   let D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate()) + ' '
-	   let h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours()) + ':'
-	   let m = (date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes()) + ':'
-	   let s = (date.getSeconds() < 10 ? '0'+date.getSeconds() : date.getSeconds())
-	   return `${Y}${M}${D}${h}${m}${s}`
-    },
-    getNowFormatDate:function () {
-	    var date = new Date()
-	    var seperator1 = '-'
-	    var year = date.getFullYear()
-	    var month = date.getMonth() + 1
-	    var strDate = date.getDate()
-	    var bours =date.getHours()
-	    var min = date.getMinutes()
-	    var s = date.getSeconds()
-	    if (month >= 1 && month <= 9) {
-	        month = '0' + month
-	    }
-	    if (strDate >= 0 && strDate <= 9) {
-	        strDate = '0' + strDate
-	    }
-	    if (bours >= 0 && bours <= 9) {
-	        bours = '0' + bours
-	    }
-	    if (min >= 0 && min <= 9) {
-	        min = '0' + min
-	    }
-	    if (s >= 0 && s <= 9) {
-	        s = '0' + s
-	    }
-		
-	    var currentdate = year + seperator1 + month + seperator1 + strDate +' ' + bours+ ':'+ min+ ':'+ s
-	    return currentdate
-    }
-}
-
-/**
- *@导出
- */ 
-module.exports = {
-    get: Tool.get,
-    post: Tool.post,
-    lodingGet: Tool.lodingGet,
-    isNumber: Tool.isNumber,
-    FormatMoney: Tool.FormatMoney,
-    navigateTo: Tool.navigateTo,
-    redirectTo: Tool.redirectTo,
-    switchTabTo: Tool.switchTabTo,
-    navigateBack: Tool.navigateBack,
-    formatDate: Tool.formatDate,
-    loginStatus: Tool.loginStatus,
-    setStorage: Tool.setStorage,
-    getStorage: Tool.getStorage,
-    getComStorage: Tool.getComStorage,
-    navToListPage: Tool.navToListPage,
-    getWindowHeight: Tool.getWindowHeight,
-    adaptRichTextImg: Tool.adaptRichTextImg,
-    getStorageAddressKey: Tool.getStorageAddressKey,
-    regexSets: Tool.regexSets,
-    timestampToTime: Tool.timestampToTime,
-    getNowFormatDate : Tool.getNowFormatDate ,
-    navigateLinkJump: Tool.navigateLinkJump
-}
+/**
+ * @Time 2019-12-12
+ * @Author Zhengjingyi
+ * @Action 全局公共方法
+ */
+// import requestUrl from './config.js'
+const Tool = {
+    /**
+	 * @封装公共get数据请求方法无加载动画
+	 * @方法参数:请求地址,请求后台需要的参数字段,回调函数
+	 * @自定义请求头信息
+	 */
+    get:function(url,data,callback){
+		 uni.request({
+            url: requestUrl + url,
+            data:data,
+            header: {
+                'Accept': 'application/json',
+                'Content-Type': 'application/x-www-form-urlencoded', 
+                'X-Token': uni.getStorageSync('token') ? uni.getStorageSync('token') : 'token',
+                'cookie': uni.getStorageSync('sessionid')
+            },
+            method: 'GET',
+            success: (response) => {
+                if(response.statusCode !== 200){
+                    uni.showToast({icon: 'none',title:'服务器连接错误',duration: 2000})
+                    callback(response.statusCode)
+                }else{
+                    callback(response.data)
+                }
+            },
+            fail: (error) => {
+                if (error) {
+                    uni.showToast({icon: 'none',title: '网络错误,请稍后重试',duration: 2000})
+                }
+            }
+		 })
+    },
+    /**
+	 * @封装公共get数据请求方法有加载动画
+	 * @方法参数:请求地址,请求后台需要的参数字段,回调函数
+	 * @自定义请求头信息
+	 */
+    lodingGet:function(url,data,callback){
+		 uni.showLoading({mask: true,title:'加载中~',})
+		 uni.request({
+            url: requestUrl + url,
+            data:data,
+            header: {
+                'Accept': 'application/json',
+                'Content-Type': 'application/x-www-form-urlencoded', 
+                'X-Token': uni.getStorageSync('token') ? uni.getStorageSync('token') : 'token',
+                'cookie': uni.getStorageSync('sessionid')
+            },
+            method: 'GET',
+            success: (response) => {
+                if(response.statusCode !== 200){
+                    uni.showToast({icon: 'none',title: '服务器连接错误',duration: 2000})
+                    callback(response.statusCode)
+                }else{
+                    callback(response.data)
+                }
+            },
+            fail: (error) => {
+                if (error) {
+                    uni.showToast({icon: 'none',title: '网络错误,请稍后重试',duration: 2000})
+                }
+            },
+            complete: () => {
+                setTimeout(function () {
+                    uni.hideLoading()
+                }, 250)
+            }
+		 })
+    },
+    /**
+	 * @封装公共post数据请求方法
+	 * @方法参数:请求地址,请求后台需要的参数字段,回调函数
+	 */
+    post:function(url,data,loadingStatus,callback){
+        if(loadingStatus){uni.showLoading({mask: true,title:'加载中~'})}
+        uni.request({
+            url: requestUrl+url,
+            data:data,
+            header: {
+                'Accept': 'application/json',
+                'Content-Type': 'application/x-www-form-urlencoded',
+                'X-Token': uni.getStorageSync('token') ? uni.getStorageSync('token') : 'token',
+                'cookie': uni.getStorageSync('sessionid')
+            },
+            method: 'POST',
+            success: (response) => {
+                if(loadingStatus){uni.hideLoading()}
+                const result = response.data
+                callback(result)
+            },
+            fail: (error) => {
+                uni.hideLoading()
+                if (error) {
+                    uni.showToast({icon: 'none',title: '网络错误,请稍后重试',duration: 2000})
+                }
+            }
+        })
+    },
+    getComStorage:function(key){// 获取本地Storage
+        return new Promise(function(resolve,reject) {
+            uni.getStorage({
+                key: key,
+                success: function (res){
+                    resolve(res.data)
+                }
+            })
+        })
+    },
+    setStorage:function(key,data){// 存储本地Storage
+        return new Promise(function(resolve,reject) {
+            uni.setStorage({
+                key: key,
+                data:data,
+                success: function (res){
+                }
+            })
+        })
+    },
+    getStorage:function(){// 获取本地userInfo
+        return new Promise(function(resolve,reject) {
+            uni.getStorage({
+                key: 'userInfo',
+                success: function (res){
+                    resolve(res.data)
+                },
+                fail: function(res){
+                    reject(false)
+                }
+            })
+        })
+    },
+    getStorageAddressKey:function(){// 获取本地地址信息
+        return new Promise(function(resolve,reject) {
+            uni.getStorage({
+                key: 'address_key',
+                success: function (res){
+                    resolve(res.data)
+                }
+            })
+        })
+    },
+    loginStatus:function(){
+        // 获取用户是否登陆 1:已登陆,否则未登陆
+        return new Promise(function(resolve,reject) {
+            uni.getStorage({
+                key: 'userInfo',
+                success: function (res){
+                    if(res.data.code == '1'){
+                        resolve(true)
+                    } else {
+                        resolve(false)
+                    }
+                }
+            })
+        })
+    },
+    navigateLinkJump:function(){// 统一处理根据用户类型跳转
+        const UserInfo = uni.getStorageSync('userInfo')
+        let Jump_URL = ''	
+        let UserTypeObj = {
+            1: '/pages/collection/list',
+            2: '/pages/collection/list',
+            3: '/pages/collection/sms',
+            4: '/pages/collection/sms',
+        }
+        if(UserInfo){
+            /**
+			 * 用户类型(userType) 1服务商人员,2客服,3财务,4超级管理员
+			 * 1. 服务商人员跳转到收款列表页面
+			 * 2. 客服跳转到收款列表页面
+			 * 3. 财务人员跳转到款项识别页面
+			 * 4. 超级管理员跳转到款项识别页面
+			 * */
+            Object.keys(UserTypeObj).forEach(function(key) {
+			    if (key == UserInfo.userType) {
+			        Jump_URL = UserTypeObj[key]
+			    }
+            })
+        }else{
+            Jump_URL = '/pages/login/login-account'
+        }
+        Tool.redirectTo(Jump_URL)
+    },
+    navigateBack:function(page){
+        uni.navigateBack({
+		    delta: page
+        })
+    },
+    navigateTo:function(url){
+        //路由跳转:页面之间路由跳转
+        uni.navigateTo({
+            url:url
+        })
+    },
+    redirectTo:function(url){
+        //路由跳转:关闭当前页跳转到新页面	
+        uni.redirectTo({
+            url:url
+        })
+    },
+    switchTabTo:function(url){
+        //路由跳转:底部 tab页
+        uni.switchTab({
+            url:url
+        })
+    },
+    isNumber:function(value){
+        //验证是否为数字
+	    var patrn = /^(-)?\d+(\.\d+)?$/
+	    if (patrn.exec(value) == null || value == '') {
+	         return false
+	    } else {
+	         return true  
+        }	 
+    },
+    getWindowHeight:function(){
+        // 获取窗口高度
+        const {windowHeight, pixelRatio} = wx.getSystemInfoSync()
+        return windowHeight
+    },
+    adaptRichTextImg:function(res){
+        /**
+		 *@富文本实现图片自适应
+		 *@style再添加自适应样式
+		 */ 
+        const html = res.replace(/<img[^>]*>/gi,function(match,capture){			
+            let match1 = match.replace(/<img*/gi, '<img style="width:100% !important;height:auto !important;float:left !important;"'),
+                results = match1.replace(/style=/gi, 'style="width:100%;height:auto;float:left;"')
+            return results
+        })
+        return html	
+    },
+    FormatMoney:function(num){
+        // 金额千分位
+        return num.toString().replace(/\d+/, function (n) { // 先提取整数部分
+            return n.replace(/(\d)(?=(\d{3})+$)/g, function ($1) { // 对整数部分添加分隔符
+                return $1 + ','
+            })
+        })
+    },
+    formatDate:function(){
+        //获取当前时间
+        let date = new Date()
+        let y = date.getFullYear()
+        let MM = date.getMonth() + 1
+        MM = MM < 10 ? ('0' + MM) : MM
+        let d = date.getDate()
+        d = d < 10 ? ('0' + d) : d
+        let h = date.getHours()
+        h = h < 10 ? ('0' + h) : h
+        let m = date.getMinutes()
+        m = m < 10 ? ('0' + m) : m
+        let s = date.getSeconds()
+        s = s < 10 ? ('0' + s) : s
+	    return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s
+    },
+    regexSets:function() {
+        let sets = {
+            'companyName': /^[\u4e00-\u9fa5\(\)()\s\da-zA-Z&]{2,50}$/gi,
+            'phoneAndTelephone': /^([1]\d{10}|([\((]?0[0-9]{2,3}[)\)]?[-]?)?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?)$/,
+            'bankNum': /^([1-9]{1})(\d{18})$/,
+            'invalidChar': /^[\s\u4e00-\u9fa5a-z0-9_-]{0,}$/
+        }
+        return sets
+    },
+    timestampToTime:function(timestamp) {
+        // 时间戳转日期
+	   let date = new Date(timestamp * 1000)//时间戳为10位需*1000,时间戳为13位的话不需乘1000
+	   let Y = date.getFullYear() + '-'
+	   let M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-'
+	   let D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate()) + ' '
+	   let h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours()) + ':'
+	   let m = (date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes()) + ':'
+	   let s = (date.getSeconds() < 10 ? '0'+date.getSeconds() : date.getSeconds())
+	   return `${Y}${M}${D}${h}${m}${s}`
+    },
+    getNowFormatDate:function () {
+	    var date = new Date()
+	    var seperator1 = '-'
+	    var year = date.getFullYear()
+	    var month = date.getMonth() + 1
+	    var strDate = date.getDate()
+	    var bours =date.getHours()
+	    var min = date.getMinutes()
+	    var s = date.getSeconds()
+	    if (month >= 1 && month <= 9) {
+	        month = '0' + month
+	    }
+	    if (strDate >= 0 && strDate <= 9) {
+	        strDate = '0' + strDate
+	    }
+	    if (bours >= 0 && bours <= 9) {
+	        bours = '0' + bours
+	    }
+	    if (min >= 0 && min <= 9) {
+	        min = '0' + min
+	    }
+	    if (s >= 0 && s <= 9) {
+	        s = '0' + s
+	    }
+		
+	    var currentdate = year + seperator1 + month + seperator1 + strDate +' ' + bours+ ':'+ min+ ':'+ s
+	    return currentdate
+    }
+}
+
+/**
+ *@导出
+ */ 
+module.exports = {
+    get: Tool.get,
+    post: Tool.post,
+    lodingGet: Tool.lodingGet,
+    isNumber: Tool.isNumber,
+    FormatMoney: Tool.FormatMoney,
+    navigateTo: Tool.navigateTo,
+    redirectTo: Tool.redirectTo,
+    switchTabTo: Tool.switchTabTo,
+    navigateBack: Tool.navigateBack,
+    formatDate: Tool.formatDate,
+    loginStatus: Tool.loginStatus,
+    setStorage: Tool.setStorage,
+    getStorage: Tool.getStorage,
+    getComStorage: Tool.getComStorage,
+    navToListPage: Tool.navToListPage,
+    getWindowHeight: Tool.getWindowHeight,
+    adaptRichTextImg: Tool.adaptRichTextImg,
+    getStorageAddressKey: Tool.getStorageAddressKey,
+    regexSets: Tool.regexSets,
+    timestampToTime: Tool.timestampToTime,
+    getNowFormatDate : Tool.getNowFormatDate ,
+    navigateLinkJump: Tool.navigateLinkJump
+}

+ 104 - 104
filters/filters.js

@@ -1,105 +1,105 @@
-export function NumFormat(value) {
-    //处理金额
-    if (value) {
-        return Number(value).toFixed(2)
-    } else {
-        return '0.00'
-    }
-}
-/**
- *款项类型
- *1.订单款 2.非订单款 3.返佣款 4.订单款或者非订单款(因财务阶段无法区分订单非订单
- *5.供应商退款 6.平台服务费 7.平台服务费欠款
- */
-export function formatReceiptType(value) {
-    const map = {
-        1: '订单',
-        2: '非订单',
-        3: '返佣',
-        4: '订单款或者非订单款',
-        5: '供应商退款',
-        10: '平台服务费',
-        11: '平台服务费欠款'
-		
-    }
-    return map[value]
-}
-/**
- *收款状态
- *1.待确认、2.已确认(待审核)、3.审核通过、4.审核未通过、5.收款撤销【线上支付成功为审核通过】
- */
-export function formatStateType(value) {
-    const map = {
-        1: '待确认',
-        2: '已确认(待审核)',
-        3: '审核通过',
-        4: '审核未通过',
-        5: '收款撤销'
-    }
-    return map[value]
-}
-/**
- *非订单类别
- *1.上架费、2.订单返佣、3.认证通会员、4.认证通企划、5.其他
- */
-export function formatNewReceiptType(value) {
-    const map = {
-	    1: '上架费',
-	    2: '服务返佣',
-	    3: '认证通会员',
-	    4: '认证通企划',
-	    5: '其他',
-    }
-    if (value) {
-        return map[value]
-    }else{
-        return ''
-    }
-}
-
-/**
- *订单来源
- *0.协销订单、1.自主订单、2.客服订单
- */
-export function formatOrderType(value) {
-    const map = {
-        0: '协销订单',
-        1: '自主订单',
-        2: '客服订单',
-    }
-    return map[value]
-}
-/**
- *订单状态
- */
-export function stateExpFormat(value) {
-    const map = {
-        0: '待确认',
-        2: '交易完成',
-        4: '已关闭',
-        5: '交易全退',
-        6: '交易全退',
-        11: '待收款待发货',
-        12: '待收款部分发货',
-        13: '待收款已发货',
-        21: '部分收款待发货',
-        22: '部分收款部分发货',
-        23: '部分收款已发货',
-        31: '已收款待发货',
-        32: '已收款部分发货',
-        33: '已收款已发货'
-    }
-    return map[value]
-}
-/**
- *组织名称
- *0.采美、3.维沙、4.丽格
- */
-export function organizeName(value) {
-    const map = {
-        0: '采美',
-        3: '维沙',
-        4: '丽格',
-    }
-    return map[value]
+export function NumFormat(value) {
+    //处理金额
+    if (value) {
+        return Number(value).toFixed(2)
+    } else {
+        return '0.00'
+    }
+}
+/**
+ *款项类型
+ *1.订单款 2.非订单款 3.返佣款 4.订单款或者非订单款(因财务阶段无法区分订单非订单
+ *5.供应商退款 6.平台服务费 7.平台服务费欠款
+ */
+export function formatReceiptType(value) {
+    const map = {
+        1: '订单',
+        2: '非订单',
+        3: '返佣',
+        4: '订单款或者非订单款',
+        5: '供应商退款',
+        10: '平台服务费',
+        11: '平台服务费欠款'
+		
+    }
+    return map[value]
+}
+/**
+ *收款状态
+ *1.待确认、2.已确认(待审核)、3.审核通过、4.审核未通过、5.收款撤销【线上支付成功为审核通过】
+ */
+export function formatStateType(value) {
+    const map = {
+        1: '待确认',
+        2: '已确认(待审核)',
+        3: '审核通过',
+        4: '审核未通过',
+        5: '收款撤销'
+    }
+    return map[value]
+}
+/**
+ *非订单类别
+ *1.上架费、2.订单返佣、3.认证通会员、4.认证通企划、5.其他
+ */
+export function formatNewReceiptType(value) {
+    const map = {
+	    1: '上架费',
+	    2: '服务返佣',
+	    3: '认证通会员',
+	    4: '认证通企划',
+	    5: '其他',
+    }
+    if (value) {
+        return map[value]
+    }else{
+        return ''
+    }
+}
+
+/**
+ *订单来源
+ *0.服务商订单、1.自主订单、2.客服订单
+ */
+export function formatOrderType(value) {
+    const map = {
+        0: '服务商订单',
+        1: '自主订单',
+        2: '客服订单',
+    }
+    return map[value]
+}
+/**
+ *订单状态
+ */
+export function stateExpFormat(value) {
+    const map = {
+        0: '待确认',
+        2: '交易完成',
+        4: '已关闭',
+        5: '交易全退',
+        6: '交易全退',
+        11: '待收款待发货',
+        12: '待收款部分发货',
+        13: '待收款已发货',
+        21: '部分收款待发货',
+        22: '部分收款部分发货',
+        23: '部分收款已发货',
+        31: '已收款待发货',
+        32: '已收款部分发货',
+        33: '已收款已发货'
+    }
+    return map[value]
+}
+/**
+ *组织名称
+ *0.采美、3.维沙、4.丽格
+ */
+export function organizeName(value) {
+    const map = {
+        0: '采美',
+        3: '维沙',
+        4: '丽格',
+    }
+    return map[value]
 }

+ 300 - 300
pages/login/login-account.vue

@@ -1,300 +1,300 @@
-<template>
-	<view class="container" :style="{paddingTop:CustomBar+'px'}">
-		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="7"></tui-skeleton>
-		<template v-else>
-			<view class="tui-page-title">登录</view>
-			<view class="tui-form">
-				<view class="tui-view-input">
-					<tui-list-cell :hover="false" :lineLeft="false" backgroundColor="transparent">
-						<view class="tui-cell-input">
-							<tui-icon name="mobile" color="#6d7a87" :size="20"></tui-icon>
-							<input
-								:adjust-position="false"
-								v-model="param.mobile"
-								placeholder="请输入账号/手机号"
-								placeholder-class="tui-phcolor"
-								type="number"
-								maxlength="11"
-							/>
-							<view class="" v-show="param.mobile" @click.stop="clearInput(1)">
-								<tui-icon name="close-fill" :size="16" color="#bfbfbf" ></tui-icon>
-							</view>
-						</view>
-					</tui-list-cell>
-					<tui-list-cell :hover="false" :lineLeft="false" backgroundColor="transparent">
-						<view class="tui-cell-input">
-							<tui-icon name="pwd" color="#6d7a87" :size="20"></tui-icon>
-							<input
-								v-if="!isShowEye"
-								:adjust-position="false"
-								v-model="param.password"
-								placeholder="请输入密码"
-								placeholder-class="tui-phcolor"
-								type="text"
-								maxlength="36"
-							/>
-							<input
-								v-if="isShowEye"
-								:adjust-position="false"
-								v-model="param.password"
-								placeholder="请输入密码"
-								placeholder-class="tui-phcolor"
-								type="password"
-								maxlength="36"
-							/>
-							<view class="" v-show="param.password" style="margin: 0 20rpx 0 0;" @click.stop="changInputType">
-								<tui-icon :name="isShowEye ? 'unseen' : 'eye'" :size="22" color="#bfbfbf"></tui-icon>
-							</view>
-							<view class="" v-show="param.password" @click.stop="clearInput(2)">
-								<tui-icon name="close-fill" :size="16" color="#bfbfbf" ></tui-icon>
-							</view>
-						</view>
-					</tui-list-cell>
-				</view>
-				<view class="tui-btn-box">
-					<tui-button type="primary" :disabledGray="true" :disabled="disabled" :shadow="true" shape="circle" @click="hanldeClick">登录</tui-button>
-				</view>
-			</view>
-		</template>
-	</view>
-</template>
-
-<script>
-import { mapMutations } from 'vuex'
-import authorize from '@/common/config/authorize.js' 
-export default {
-	computed: {
-		disabled: function() {
-			let bool = true
-			if (this.param.mobile && this.param.password) {
-				bool = false
-			}
-			return bool
-		}
-	},
-	data() {
-		return {
-			CustomBar:this.CustomBar,// 顶部导航栏高度
-			param:{
-				code:null,
-				encryptedData:null,
-				iv:null ,
-				mobile: '',
-				password: '', 
-			},
-			popupShow: false,
-			passwordType:'password',
-			skeletonShow:true,
-			isShowEye:true
-		} 
-	},
-	onLoad(options) {
-		
-	},
-	methods: {
-		...mapMutations(['login', 'logout']),
-		async getWxAuthorize(){// 初始化授权登录
-			try{
-				const wXCode = await authorize.getCode('weixin')
-				const wEchat = await authorize.getUserInfo('weixin')
-				const param = { code: wXCode,encryptedData: wEchat.encryptedData,iv: wEchat.iv}
-				const res = await this.UserService.UserLoginAuthApplets(param)
-				const data = res.data
-				this.login(data)
-				this.$store.commit('updateStatus',data)
-				setTimeout(()=>{
-					this.navigateLink(data.userType)
-				},500)
-			}catch(error){
-				this.logout()
-				this.skeletonShow = false
-				this.$store.commit('updateStatus',error.data)
-			}
-		},
-		async UserLoginReceiptPassword(){// 账号密码登录
-			const WxCode = await authorize.getCode('weixin')
-			const Wx = await authorize.getUserInfo('weixin')
-			this.param.code = WxCode
-			this.param.iv = Wx.iv
-			this.param.encryptedData = Wx.encryptedData
-			this.UserService.UserLoginReceiptPassword(this.param).then(response =>{
-				this.login(response.data)
-				this.$store.commit('updateStatus',response.data)
-				this.navigateLink(response.data.userType)
-			}).catch(err =>{
-				this.$util.msg(err.msg,2000)
-			})
-		},
-		hanldeClick(){//点击登录
-			this.UserLoginReceiptPassword()
-		},
-		navigateLink(userType){// 根据用户权限跳转对应页面
-			/**
-			 * 用户类型 1协销人员,2客服,3财务,4超级管理员
-			 * 1. 协销人员跳转到收款列表页面
-			 * 2. 客服跳转到收款列表页面
-			 * 3. 财务人员跳转到款项识别页面
-			 * 4. 超级管理员跳转到款项识别页面
-			 * */
-			 switch(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
-					
-			 }
-		},
-		changInputType(){// 控制显示密码
-			this.isShowEye = !this.isShowEye
-		},
-		clearInput(type) {// 清除输入框信息
-			if (type == 1) {
-				this.param.mobile = ''
-			} else {
-				this.param.password = ''
-			}
-		}
-	},
-	onShow() {
-		this.getWxAuthorize()
-	}
-}
-</script>
-
-<style lang="scss">
-.container {
-	.tui-status-bar {
-		width: 100%;
-		height: var(--status-bar-height);
-	}
-
-	.tui-header {
-		width: 100%;
-		padding: 40rpx;
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		box-sizing: border-box;
-	}
-
-	.tui-page-title {
-		width: 100%;
-		font-size: 48rpx;
-		font-weight: bold;
-		color: $uni-text-color;
-		line-height: 42rpx;
-		padding: 40rpx;
-		box-sizing: border-box;
-	}
-
-	.tui-form {
-		padding-top: 50rpx;
-
-		.tui-view-input {
-			width: 100%;
-			box-sizing: border-box;
-			padding: 0 40rpx;
-
-			.tui-cell-input {
-				width: 100%;
-				display: flex;
-				align-items: center;
-				padding-top: 48rpx;
-				padding-bottom: $uni-spacing-col-base;
-
-				input {
-					flex: 1;
-					padding-left: $uni-spacing-row-base;
-				}
-
-				.tui-icon-close {
-					margin-left: auto;
-				}
-			}
-		}
-
-		.tui-cell-text {
-			width: 100%;
-			padding: $uni-spacing-col-lg $uni-spacing-row-lg;
-			box-sizing: border-box;
-			font-size: $uni-font-size-sm;
-			color: $uni-text-color-grey;
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-
-			.tui-color-primary {
-				color: $uni-color-primary;
-			}
-		}
-
-		.tui-btn-box {
-			width: 100%;
-			padding: 0 $uni-spacing-row-lg;
-			box-sizing: border-box;
-			margin-top: 80rpx;
-		}
-	}
-
-	.tui-login-way {
-		width: 100%;
-		font-size: 26rpx;
-		color: $uni-color-primary;
-		display: flex;
-		justify-content: center;
-		position: fixed;
-		left: 0;
-		bottom: 80rpx;
-
-		view {
-			padding: 12rpx 0;
-		}
-	}
-
-	.tui-auth-login {
-		width: 100%;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		padding-bottom: 80rpx;
-		padding-top: 20rpx;
-
-		.tui-icon-platform {
-			width: 90rpx;
-			height: 90rpx;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			position: relative;
-			margin-left: 40rpx;
-
-			&::after {
-				content: '';
-				position: absolute;
-				width: 200%;
-				height: 200%;
-				transform-origin: 0 0;
-				transform: scale(0.5, 0.5) translateZ(0);
-				box-sizing: border-box;
-				left: 0;
-				top: 0;
-				border-radius: 180rpx;
-				border: 1rpx solid $uni-text-color-placeholder;
-			}
-		}
-
-		.tui-login-logo {
-			width: 60rpx;
-			height: 60rpx;
-		}
-	}
-}
-</style>
+<template>
+	<view class="container" :style="{paddingTop:CustomBar+'px'}">
+		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="7"></tui-skeleton>
+		<template v-else>
+			<view class="tui-page-title">登录</view>
+			<view class="tui-form">
+				<view class="tui-view-input">
+					<tui-list-cell :hover="false" :lineLeft="false" backgroundColor="transparent">
+						<view class="tui-cell-input">
+							<tui-icon name="mobile" color="#6d7a87" :size="20"></tui-icon>
+							<input
+								:adjust-position="false"
+								v-model="param.mobile"
+								placeholder="请输入账号/手机号"
+								placeholder-class="tui-phcolor"
+								type="number"
+								maxlength="11"
+							/>
+							<view class="" v-show="param.mobile" @click.stop="clearInput(1)">
+								<tui-icon name="close-fill" :size="16" color="#bfbfbf" ></tui-icon>
+							</view>
+						</view>
+					</tui-list-cell>
+					<tui-list-cell :hover="false" :lineLeft="false" backgroundColor="transparent">
+						<view class="tui-cell-input">
+							<tui-icon name="pwd" color="#6d7a87" :size="20"></tui-icon>
+							<input
+								v-if="!isShowEye"
+								:adjust-position="false"
+								v-model="param.password"
+								placeholder="请输入密码"
+								placeholder-class="tui-phcolor"
+								type="text"
+								maxlength="36"
+							/>
+							<input
+								v-if="isShowEye"
+								:adjust-position="false"
+								v-model="param.password"
+								placeholder="请输入密码"
+								placeholder-class="tui-phcolor"
+								type="password"
+								maxlength="36"
+							/>
+							<view class="" v-show="param.password" style="margin: 0 20rpx 0 0;" @click.stop="changInputType">
+								<tui-icon :name="isShowEye ? 'unseen' : 'eye'" :size="22" color="#bfbfbf"></tui-icon>
+							</view>
+							<view class="" v-show="param.password" @click.stop="clearInput(2)">
+								<tui-icon name="close-fill" :size="16" color="#bfbfbf" ></tui-icon>
+							</view>
+						</view>
+					</tui-list-cell>
+				</view>
+				<view class="tui-btn-box">
+					<tui-button type="primary" :disabledGray="true" :disabled="disabled" :shadow="true" shape="circle" @click="hanldeClick">登录</tui-button>
+				</view>
+			</view>
+		</template>
+	</view>
+</template>
+
+<script>
+import { mapMutations } from 'vuex'
+import authorize from '@/common/config/authorize.js' 
+export default {
+	computed: {
+		disabled: function() {
+			let bool = true
+			if (this.param.mobile && this.param.password) {
+				bool = false
+			}
+			return bool
+		}
+	},
+	data() {
+		return {
+			CustomBar:this.CustomBar,// 顶部导航栏高度
+			param:{
+				code:null,
+				encryptedData:null,
+				iv:null ,
+				mobile: '',
+				password: '', 
+			},
+			popupShow: false,
+			passwordType:'password',
+			skeletonShow:true,
+			isShowEye:true
+		} 
+	},
+	onLoad(options) {
+		
+	},
+	methods: {
+		...mapMutations(['login', 'logout']),
+		async getWxAuthorize(){// 初始化授权登录
+			try{
+				const wXCode = await authorize.getCode('weixin')
+				const wEchat = await authorize.getUserInfo('weixin')
+				const param = { code: wXCode,encryptedData: wEchat.encryptedData,iv: wEchat.iv}
+				const res = await this.UserService.UserLoginAuthApplets(param)
+				const data = res.data
+				this.login(data)
+				this.$store.commit('updateStatus',data)
+				setTimeout(()=>{
+					this.navigateLink(data.userType)
+				},500)
+			}catch(error){
+				this.logout()
+				this.skeletonShow = false
+				this.$store.commit('updateStatus',error.data)
+			}
+		},
+		async UserLoginReceiptPassword(){// 账号密码登录
+			const WxCode = await authorize.getCode('weixin')
+			const Wx = await authorize.getUserInfo('weixin')
+			this.param.code = WxCode
+			this.param.iv = Wx.iv
+			this.param.encryptedData = Wx.encryptedData
+			this.UserService.UserLoginReceiptPassword(this.param).then(response =>{
+				this.login(response.data)
+				this.$store.commit('updateStatus',response.data)
+				this.navigateLink(response.data.userType)
+			}).catch(err =>{
+				this.$util.msg(err.msg,2000)
+			})
+		},
+		hanldeClick(){//点击登录
+			this.UserLoginReceiptPassword()
+		},
+		navigateLink(userType){// 根据用户权限跳转对应页面
+			/**
+			 * 用户类型 1服务商人员,2客服,3财务,4超级管理员
+			 * 1. 服务商人员跳转到收款列表页面
+			 * 2. 客服跳转到收款列表页面
+			 * 3. 财务人员跳转到款项识别页面
+			 * 4. 超级管理员跳转到款项识别页面
+			 * */
+			 switch(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
+					
+			 }
+		},
+		changInputType(){// 控制显示密码
+			this.isShowEye = !this.isShowEye
+		},
+		clearInput(type) {// 清除输入框信息
+			if (type == 1) {
+				this.param.mobile = ''
+			} else {
+				this.param.password = ''
+			}
+		}
+	},
+	onShow() {
+		this.getWxAuthorize()
+	}
+}
+</script>
+
+<style lang="scss">
+.container {
+	.tui-status-bar {
+		width: 100%;
+		height: var(--status-bar-height);
+	}
+
+	.tui-header {
+		width: 100%;
+		padding: 40rpx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		box-sizing: border-box;
+	}
+
+	.tui-page-title {
+		width: 100%;
+		font-size: 48rpx;
+		font-weight: bold;
+		color: $uni-text-color;
+		line-height: 42rpx;
+		padding: 40rpx;
+		box-sizing: border-box;
+	}
+
+	.tui-form {
+		padding-top: 50rpx;
+
+		.tui-view-input {
+			width: 100%;
+			box-sizing: border-box;
+			padding: 0 40rpx;
+
+			.tui-cell-input {
+				width: 100%;
+				display: flex;
+				align-items: center;
+				padding-top: 48rpx;
+				padding-bottom: $uni-spacing-col-base;
+
+				input {
+					flex: 1;
+					padding-left: $uni-spacing-row-base;
+				}
+
+				.tui-icon-close {
+					margin-left: auto;
+				}
+			}
+		}
+
+		.tui-cell-text {
+			width: 100%;
+			padding: $uni-spacing-col-lg $uni-spacing-row-lg;
+			box-sizing: border-box;
+			font-size: $uni-font-size-sm;
+			color: $uni-text-color-grey;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+
+			.tui-color-primary {
+				color: $uni-color-primary;
+			}
+		}
+
+		.tui-btn-box {
+			width: 100%;
+			padding: 0 $uni-spacing-row-lg;
+			box-sizing: border-box;
+			margin-top: 80rpx;
+		}
+	}
+
+	.tui-login-way {
+		width: 100%;
+		font-size: 26rpx;
+		color: $uni-color-primary;
+		display: flex;
+		justify-content: center;
+		position: fixed;
+		left: 0;
+		bottom: 80rpx;
+
+		view {
+			padding: 12rpx 0;
+		}
+	}
+
+	.tui-auth-login {
+		width: 100%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		padding-bottom: 80rpx;
+		padding-top: 20rpx;
+
+		.tui-icon-platform {
+			width: 90rpx;
+			height: 90rpx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			position: relative;
+			margin-left: 40rpx;
+
+			&::after {
+				content: '';
+				position: absolute;
+				width: 200%;
+				height: 200%;
+				transform-origin: 0 0;
+				transform: scale(0.5, 0.5) translateZ(0);
+				box-sizing: border-box;
+				left: 0;
+				top: 0;
+				border-radius: 180rpx;
+				border: 1rpx solid $uni-text-color-placeholder;
+			}
+		}
+
+		.tui-login-logo {
+			width: 60rpx;
+			height: 60rpx;
+		}
+	}
+}
+</style>

+ 296 - 296
pages/login/login-share.vue

@@ -1,27 +1,27 @@
-<template>
-	<view class="container">
-		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="7"></tui-skeleton>
-		<template v-else>
-			<view
-				class="tui-header-box first"
-				:style="{ height: isCmcustomClass == 'fiexd' ? CustomBar + 6 + 'px' : CustomBar + 6 + 'px' }"
-				:class="isCmcustomClass"
-			>
-				<view class="header-top" :style="{ paddingTop: top + 'px', lineHeight: CustomBar + 20 + 'px' }"></view>
-				<view class="header-sit">
-					<text v-if="isNoAuthority"
-						  class="iconfont icon-shouye1" 
-						  :style="{ top: CustomBar/2 + 'px',left:'24rpx'}"
-						  @click.stop="this.$api.navigateLinkJump()"
-						  >
-					</text>
-					<text class="header-sit-text"></text>
-				</view>
-			</view>
-			<view class="share-empty">
-				<view class="icon"><image :src="StaticUrl + '/image/icon-noaccess@2x.png'" mode="widthFix"></image></view>
-				<view class="text">暂无权限查看</view>
-			</view>
+<template>
+	<view class="container">
+		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="7"></tui-skeleton>
+		<template v-else>
+			<view
+				class="tui-header-box first"
+				:style="{ height: isCmcustomClass == 'fiexd' ? CustomBar + 6 + 'px' : CustomBar + 6 + 'px' }"
+				:class="isCmcustomClass"
+			>
+				<view class="header-top" :style="{ paddingTop: top + 'px', lineHeight: CustomBar + 20 + 'px' }"></view>
+				<view class="header-sit">
+					<text v-if="isNoAuthority"
+						  class="iconfont icon-shouye1" 
+						  :style="{ top: CustomBar/2 + 'px',left:'24rpx'}"
+						  @click.stop="this.$api.navigateLinkJump()"
+						  >
+					</text>
+					<text class="header-sit-text"></text>
+				</view>
+			</view>
+			<view class="share-empty">
+				<view class="icon"><image :src="StaticUrl + '/image/icon-noaccess@2x.png'" mode="widthFix"></image></view>
+				<view class="text">暂无权限查看</view>
+			</view>
 		</template>
         <!-- 弹窗 -->
         <tui-modal
@@ -34,32 +34,32 @@
         	:size="32"
         	shape="circle"
         	:maskClosable="false"
-        />
-	</view>
-</template>
-
-<script>
-import { mapMutations } from 'vuex'
-import authorize from '@/common/config/authorize.js' 
-export default {
-	computed: {
-		
-	},
-	data() {
-		return {
-			StaticUrl: this.$Static,
-			CustomBar:this.CustomBar,// 顶部导航栏高度
-			isIphoneX: this.$store.state.isIphoneX,
-			CustomBar: this.CustomBar, // 顶部导航栏高度
-			height: 64, //header高度
-			top: 0, //标题图标距离顶部距离
-			scrollH: 0, //滚动总高度
-			opcity: 1,
-			isCmcustomClass: 'left',
-			isNoAuthority:false,
+        />
+	</view>
+</template>
+
+<script>
+import { mapMutations } from 'vuex'
+import authorize from '@/common/config/authorize.js' 
+export default {
+	computed: {
+		
+	},
+	data() {
+		return {
+			StaticUrl: this.$Static,
+			CustomBar:this.CustomBar,// 顶部导航栏高度
+			isIphoneX: this.$store.state.isIphoneX,
+			CustomBar: this.CustomBar, // 顶部导航栏高度
+			height: 64, //header高度
+			top: 0, //标题图标距离顶部距离
+			scrollH: 0, //滚动总高度
+			opcity: 1,
+			isCmcustomClass: 'left',
+			isNoAuthority:false,
 			skeletonShow:true,
-            userType:'',
-			receiptId:0,
+            userType:'',
+			receiptId:0,
 			receiptType:1,// 收款款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
             contentModalText: '', //操作文字提示语句
             modal: false,
@@ -71,90 +71,90 @@ export default {
             		},
             		plain: false
             	}
-            ],
-		} 
-	},
-	onLoad(option) {
+            ],
+		} 
+	},
+	onLoad(option) {
 		this.receiptId = option.id
-        console.log('分享收款ID====>',option.id)
-		let obj = {}
-		// #ifdef MP-WEIXIN
-		obj = wx.getMenuButtonBoundingClientRect()
-		// #endif
-		// #ifdef MP-BAIDU
-		obj = swan.getMenuButtonBoundingClientRect()
-		// #endif
-		// #ifdef MP-ALIPAY
-		my.hideAddToDesktopMenu()
-		// #endif
-		uni.getSystemInfo({
-			success: res => {
-				this.width = obj.left || res.windowWidth
-				this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
-				this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
-				this.scrollH = res.windowWidth * 0.6
-			}
-		})
-	},
-	methods: {
-		...mapMutations(['login', 'logout']),
-		async getWxAuthorize(){// 初始化授权登录
-			const WxCode = await authorize.getCode('weixin')
-			const Wx = await authorize.getUserInfo('weixin')
-			this.UserService.UserLoginAuthApplets({ 
-				code:WxCode,
-				encryptedData:Wx.encryptedData,
-				iv:Wx.iv ,
-			})
-			.then(response =>{
+        console.log('分享收款ID====>',option.id)
+		let obj = {}
+		// #ifdef MP-WEIXIN
+		obj = wx.getMenuButtonBoundingClientRect()
+		// #endif
+		// #ifdef MP-BAIDU
+		obj = swan.getMenuButtonBoundingClientRect()
+		// #endif
+		// #ifdef MP-ALIPAY
+		my.hideAddToDesktopMenu()
+		// #endif
+		uni.getSystemInfo({
+			success: res => {
+				this.width = obj.left || res.windowWidth
+				this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
+				this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
+				this.scrollH = res.windowWidth * 0.6
+			}
+		})
+	},
+	methods: {
+		...mapMutations(['login', 'logout']),
+		async getWxAuthorize(){// 初始化授权登录
+			const WxCode = await authorize.getCode('weixin')
+			const Wx = await authorize.getUserInfo('weixin')
+			this.UserService.UserLoginAuthApplets({ 
+				code:WxCode,
+				encryptedData:Wx.encryptedData,
+				iv:Wx.iv ,
+			})
+			.then(response =>{
 				let data  = response.data
-                this.userType = data.userType
-				this.login(response.data)
-				this.$store.commit('updateStatus',response.data)
-				setTimeout(()=>{
-					this.getOrderReceiptDetailType(this.receiptId)
-				},1000)
-			}).catch(error =>{
-				this.logout()
-				this.skeletonShow = false
-				this.isNoAuthority = true
-				this.$store.commit('updateStatus',error.data)
-			})
-		},
-		getOrderReceiptDetailType(id) {
-			// 无权限查询收款详情,防止收款账号被更改
-			this.OrderService.orderReceiptDetailType({ id: id })
-				.then(response => {
-					/**
-					 * 用户类型(userType) 1协销人员,2客服,3财务,4超级管理员
-					 * 1. 协销人员跳转到收款列表页面
-					 * 2. 客服跳转到收款列表页面
-					 * 3. 财务人员跳转到款项识别页面
-					 * 4. 超级管理员跳转到款项识别页面
-					 * */
-					 // switch(data.userType){
-					 // 	 case 1:// 协销
-					 // 		this.navigateLinkJump(receipt)
-					 // 		break
-					 // 	 case 2:// 客服
-					 // 		this.navigateLinkJump(receipt)
-					 // 		break
-					 // 	 case 3:// 财务
-					 // 		this.navigateLinkJump(receipt)
-					 // 		break
-					 // 	 case 4:// 超级管理员
-					 // 		this.navigateLinkJump(receipt)
-					 // 		break
-					 // }
-					const receipt = response.data
-					this.checkedReceiptAdministration(receipt)
-
-				})
-				.catch(err => {
-					console.log('分享查询收款详情异常====>',err)
-				})
-		},
-		checkedReceiptAdministration(receipt){
+                this.userType = data.userType
+				this.login(response.data)
+				this.$store.commit('updateStatus',response.data)
+				setTimeout(()=>{
+					this.getOrderReceiptDetailType(this.receiptId)
+				},1000)
+			}).catch(error =>{
+				this.logout()
+				this.skeletonShow = false
+				this.isNoAuthority = true
+				this.$store.commit('updateStatus',error.data)
+			})
+		},
+		getOrderReceiptDetailType(id) {
+			// 无权限查询收款详情,防止收款账号被更改
+			this.OrderService.orderReceiptDetailType({ id: id })
+				.then(response => {
+					/**
+					 * 用户类型(userType) 1服务商人员,2客服,3财务,4超级管理员
+					 * 1. 服务商人员跳转到收款列表页面
+					 * 2. 客服跳转到收款列表页面
+					 * 3. 财务人员跳转到款项识别页面
+					 * 4. 超级管理员跳转到款项识别页面
+					 * */
+					 // switch(data.userType){
+					 // 	 case 1:// 服务商
+					 // 		this.navigateLinkJump(receipt)
+					 // 		break
+					 // 	 case 2:// 客服
+					 // 		this.navigateLinkJump(receipt)
+					 // 		break
+					 // 	 case 3:// 财务
+					 // 		this.navigateLinkJump(receipt)
+					 // 		break
+					 // 	 case 4:// 超级管理员
+					 // 		this.navigateLinkJump(receipt)
+					 // 		break
+					 // }
+					const receipt = response.data
+					this.checkedReceiptAdministration(receipt)
+
+				})
+				.catch(err => {
+					console.log('分享查询收款详情异常====>',err)
+				})
+		},
+		checkedReceiptAdministration(receipt){
 			// 根据收款账号调用不同收款详情查看权限
             if(receipt.receiptType){
                 if(receipt.receiptType == 1 || receipt.receiptType == 2 || receipt.receiptType == 4){// 订单非订单
@@ -167,7 +167,7 @@ export default {
             }else{
                 this.modal = true
                 this.contentModalText ='该款项已作废,请重新收款!'
-            }
+            }
 		},
         handleClick(){// 作废款项弹窗跳转
             this.modal = false
@@ -175,8 +175,8 @@ export default {
         },
         navigateLink(){// 根据用户权限跳转对应页面
         	/**
-        	 * 用户类型 1协销人员,2客服,3财务,4超级管理员
-        	 * 1. 协销人员跳转到收款列表页面
+        	 * 用户类型 1服务商人员,2客服,3财务,4超级管理员
+        	 * 1. 服务商人员跳转到收款列表页面
         	 * 2. 客服跳转到收款列表页面
         	 * 3. 财务人员跳转到款项识别页面
         	 * 4. 超级管理员跳转到款项识别页面
@@ -195,165 +195,165 @@ export default {
         			this.$api.navigateTo('/pages/collection/sms')
         			break
         	 }
-        },
-		getOrderReceiptDetail(receipt) {// 
-			// 订单&&非订单收款详情
-			this.OrderService.orderReceiptDetail({ id: receipt.id })
-				.then(response => {
-					this.navigateLinkJump(receipt)
-				})
-				.catch(err => {
-					setTimeout(()=>{
-						this.isNoAuthority = true
-						this.skeletonShow = false
-					},500)
-				})
-		},
-		getOrderReceiptRebateDetail(receipt) {
-			// 返佣收款详情
-			this.OrderService.orderReceiptRebateDetails({ id: receipt.id })
-				.then(response => {
-					this.navigateLinkJump(receipt)
-				})
-				.catch(err => {
-					setTimeout(()=>{
-						this.isNoAuthority = true
-						this.skeletonShow = false
-					},500)
-				})
-		},
-		getOrderReceiptRefundDetail(receipt) {
-			// 供应商退款收款详情
-			this.OrderService.orderReceiptRefundDetail({ id: receipt.id })
-				.then(response => {
-					this.navigateLinkJump(receipt)
-				})
-				.catch(err => {
-					setTimeout(()=>{
-						this.isNoAuthority = true
-						this.skeletonShow = false
-					},500)
-				})
-		},
-		navigateLinkJump(receipt){
-			// 收款详情查询跳转URL 收款款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
-			switch(receipt.receiptType){
-				case 1:// 1:订单 1待确认、2已确认(待审核)、3审核通过、4审核未通过、5收款撤销【线上支付成功为审核通过】
-					if(receipt.receiptStatus == 1 || receipt.receiptStatus == 4 || receipt.receiptStatus == 5){// 订单待确认
-						console.log('订单待确认')
-						this.$api.navigateTo(`/pages/relation/ordinary/index?type=share&id=${receipt.id}`)
-					}else if(receipt.receiptStatus == 2){// 待审核
-						console.log('待审核')
-						this.$api.navigateTo(`/pages/relation/ordinary/examine-detail?type=share&id=${receipt.id}`)
-					}else if(receipt.receiptStatus == 3){// 审核通过
-						console.log('审核通过')
-						this.$api.navigateTo(`/pages/relation/ordinary/detail?type=share&id=${receipt.id}`)
-					}
-					break
-				case 2:// 2:非订单 
-					this.$api.navigateTo(`/pages/relation/nonorder/detail?type=share&id=${receipt.id}`)
-					break
-				case 3:// 3:返佣 
-					if(receipt.receiptStatus == 1 || receipt.receiptStatus == 4 || receipt.receiptStatus == 5){// 返佣待确认
-						this.$api.navigateTo(`/pages/relation/return/index?type=share&id=${receipt.id}`)
-					}else if(receipt.receiptStatus == 2){
-						this.$api.navigateTo(`/pages/relation/return/detail?type=share&id=${receipt.id}`)
-					}
-					break
-				case 5:// 4:供应商退款
-					if(receipt.receiptStatus == 1 || receipt.receiptStatus == 4 || receipt.receiptStatus == 5){// 返佣待确认
-						this.$api.navigateTo(`/pages/relation/refund/index?type=share&id=${receipt.id}`)
-					}else if(receipt.receiptStatus == 2){
-						this.$api.navigateTo(`/pages/relation/refund/detail?type=share&id=${receipt.id}`)
-					}
-					break
-			}
-		}
-	},
-	onShow() {
-		this.getWxAuthorize()
-	}
-}
-</script>
-
-<style lang="scss">
-.container {
-	width: 100%;
-	height:100%;
-	background: #FFFFFF;
-	display: flex;
-	align-items: center;
-	justify-content:center;
-	.share-empty{
-		width: 260rpx;
-		height: 412rpx;
-		.icon{
-			width: 150rpx;
-			height: 150rpx;
-			margin: 0 auto;
-			image{
-				width: 100%;
-				height: 100%;
-				display: block;
-			}
-		}
-		.text{
-			font-size: $font-size-28;
-			line-height: 60rpx;
-			color: rgba(70,136,250,0.7);
-			text-align: center;
-		}
-	}
-}
-.tui-header-box {
-	width: 100%;
-	background: #ffffff;
-	z-index: 999;
-	position: fixed;
-	top: 0;
-	left: 0;
-	background-size: cover;
-	background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
-
-	&.fiexd {
-	}
-
-	&.first {
-	}
-}
-.header-top {
-	width: 100%;
-	font-size: 16px;
-	font-weight: 500;
-	height: 32px;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	position: relative;
-	padding: 0 40rpx;
-}
-
-.header-sit {
-	width: 100%;
-	box-sizing: border-box;
-	height: 80rpx;
-	line-height: 80rpx;
-	box-sizing: border-box;
-	color: #ffffff;
-	.header-sit-text {
-		text-align: left;
-		font-size: $font-size-40;
-		font-weight: 600;
-		font-family: '正楷';
-	}
-	.icon-shouye1{
-		display: block;
-		width: 80rpx;
-		height: 80rpx;
-		float: left;
-		text-align: center;
-		line-height: 80rpx;
-		font-size: 48rpx;
-	}
-}
-</style>
+        },
+		getOrderReceiptDetail(receipt) {// 
+			// 订单&&非订单收款详情
+			this.OrderService.orderReceiptDetail({ id: receipt.id })
+				.then(response => {
+					this.navigateLinkJump(receipt)
+				})
+				.catch(err => {
+					setTimeout(()=>{
+						this.isNoAuthority = true
+						this.skeletonShow = false
+					},500)
+				})
+		},
+		getOrderReceiptRebateDetail(receipt) {
+			// 返佣收款详情
+			this.OrderService.orderReceiptRebateDetails({ id: receipt.id })
+				.then(response => {
+					this.navigateLinkJump(receipt)
+				})
+				.catch(err => {
+					setTimeout(()=>{
+						this.isNoAuthority = true
+						this.skeletonShow = false
+					},500)
+				})
+		},
+		getOrderReceiptRefundDetail(receipt) {
+			// 供应商退款收款详情
+			this.OrderService.orderReceiptRefundDetail({ id: receipt.id })
+				.then(response => {
+					this.navigateLinkJump(receipt)
+				})
+				.catch(err => {
+					setTimeout(()=>{
+						this.isNoAuthority = true
+						this.skeletonShow = false
+					},500)
+				})
+		},
+		navigateLinkJump(receipt){
+			// 收款详情查询跳转URL 收款款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
+			switch(receipt.receiptType){
+				case 1:// 1:订单 1待确认、2已确认(待审核)、3审核通过、4审核未通过、5收款撤销【线上支付成功为审核通过】
+					if(receipt.receiptStatus == 1 || receipt.receiptStatus == 4 || receipt.receiptStatus == 5){// 订单待确认
+						console.log('订单待确认')
+						this.$api.navigateTo(`/pages/relation/ordinary/index?type=share&id=${receipt.id}`)
+					}else if(receipt.receiptStatus == 2){// 待审核
+						console.log('待审核')
+						this.$api.navigateTo(`/pages/relation/ordinary/examine-detail?type=share&id=${receipt.id}`)
+					}else if(receipt.receiptStatus == 3){// 审核通过
+						console.log('审核通过')
+						this.$api.navigateTo(`/pages/relation/ordinary/detail?type=share&id=${receipt.id}`)
+					}
+					break
+				case 2:// 2:非订单 
+					this.$api.navigateTo(`/pages/relation/nonorder/detail?type=share&id=${receipt.id}`)
+					break
+				case 3:// 3:返佣 
+					if(receipt.receiptStatus == 1 || receipt.receiptStatus == 4 || receipt.receiptStatus == 5){// 返佣待确认
+						this.$api.navigateTo(`/pages/relation/return/index?type=share&id=${receipt.id}`)
+					}else if(receipt.receiptStatus == 2){
+						this.$api.navigateTo(`/pages/relation/return/detail?type=share&id=${receipt.id}`)
+					}
+					break
+				case 5:// 4:供应商退款
+					if(receipt.receiptStatus == 1 || receipt.receiptStatus == 4 || receipt.receiptStatus == 5){// 返佣待确认
+						this.$api.navigateTo(`/pages/relation/refund/index?type=share&id=${receipt.id}`)
+					}else if(receipt.receiptStatus == 2){
+						this.$api.navigateTo(`/pages/relation/refund/detail?type=share&id=${receipt.id}`)
+					}
+					break
+			}
+		}
+	},
+	onShow() {
+		this.getWxAuthorize()
+	}
+}
+</script>
+
+<style lang="scss">
+.container {
+	width: 100%;
+	height:100%;
+	background: #FFFFFF;
+	display: flex;
+	align-items: center;
+	justify-content:center;
+	.share-empty{
+		width: 260rpx;
+		height: 412rpx;
+		.icon{
+			width: 150rpx;
+			height: 150rpx;
+			margin: 0 auto;
+			image{
+				width: 100%;
+				height: 100%;
+				display: block;
+			}
+		}
+		.text{
+			font-size: $font-size-28;
+			line-height: 60rpx;
+			color: rgba(70,136,250,0.7);
+			text-align: center;
+		}
+	}
+}
+.tui-header-box {
+	width: 100%;
+	background: #ffffff;
+	z-index: 999;
+	position: fixed;
+	top: 0;
+	left: 0;
+	background-size: cover;
+	background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
+
+	&.fiexd {
+	}
+
+	&.first {
+	}
+}
+.header-top {
+	width: 100%;
+	font-size: 16px;
+	font-weight: 500;
+	height: 32px;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	position: relative;
+	padding: 0 40rpx;
+}
+
+.header-sit {
+	width: 100%;
+	box-sizing: border-box;
+	height: 80rpx;
+	line-height: 80rpx;
+	box-sizing: border-box;
+	color: #ffffff;
+	.header-sit-text {
+		text-align: left;
+		font-size: $font-size-40;
+		font-weight: 600;
+		font-family: '正楷';
+	}
+	.icon-shouye1{
+		display: block;
+		width: 80rpx;
+		height: 80rpx;
+		float: left;
+		text-align: center;
+		line-height: 80rpx;
+		font-size: 48rpx;
+	}
+}
+</style>

+ 1258 - 1258
pages/relation/ordinary/index.vue

@@ -1,1258 +1,1258 @@
-<template>
-	<view class="container mine clearfix">
-		<view
-			class="tui-header-box first"
-			:style="{ height: isCmcustomClass == 'fiexd' ? CustomBar + 6 + 'px' : CustomBar + 6 + 'px' }"
-			:class="isCmcustomClass"
-		>
-			<view class="header-top" :style="{ paddingTop: top + 'px', lineHeight: CustomBar + 20 + 'px' }"></view>
-			<view class="header-sit">
-				<text
-					class="iconfont icon-shouye1"
-					v-if="isShareType"
-					@click.stop="this.$api.navigateLinkJump()"
-				></text>
-				<text class="iconfont icon-fanhui" v-else @click.stop="this.$api.navigateBack(1)"></text>
-				<text class="header-sit-text">关联订单</text>
-			</view>
-		</view>
-		<tui-skeleton
-			v-if="skeletonShow"
-			backgroundColor="#fafafa"
-			borderRadius="10rpx"
-			:isLoading="true"
-			:loadingType="7"
-		/>
-		<view class="container-content" v-else>
-			<view class="tui-header-tabs day clearfix" :style="{ top: CustomBar + 6 + 'px' }">
-				<view v-if="!isShowHeader">
-					<view class="tui-header-top">
-						<view class="title"> 收款信息 </view>
-						<view class="tui-header-button">
-							<view
-								class="button btn-error"
-								@click.stop="showReceiptModel"
-								v-if="receiptInfo.shopOrderList.length > 0"
-							>
-								查看关联信息
-							</view>
-							<!-- <view class="button btn-confirm" @click="toNoSms('/pages/collection/list')">
-								<text class="iconfont icon-wodedingdan"></text>收款列表
-							</view> -->
-						</view>
-					</view>
-					<view class="tui-header-item">
-						<view class="list-title-t">
-							<view class="list-title-tip">
-								<text class="badges">{{ receiptInfo.receiptType | formatReceiptType }}款</text>
-							</view>
-							<view class="list-title-num" :style="{ color: formatColor(receiptInfo.receiptStatus) }">{{
-								receiptInfo.receiptStatus | formatStateType
-							}}</view>
-						</view>
-						<view class="list-title-b">
-							<view class="list-title-b-item ">
-								收款金额:<text class="text">¥{{ receiptInfo.receiptAmount | NumFormat }} </text>
-							</view>
-							<view class="list-title-b-item ">
-								收款账号:<text class="text">{{ receiptInfo.payTypeText }}</text>
-							</view>
-						</view>
-						<view class="list-title-b">
-							收款时间:<text class="text">{{ receiptInfo.receiptDate }}</text>
-						</view>
-						<view class="list-title-b">收款短信:</view>
-						<view class="list-title-b sms">
-							<text class="text">{{ receiptInfo.smsContent ? receiptInfo.smsContent : '无' }}</text>
-						</view>
-						<view class="list-icon" v-if="receiptInfo.tipMsg">
-							<image
-								class="list-icon-image"
-								src="https://static.caimei365.com/app/crm/image/icon-noconfirm@2x.png"
-								mode=""
-								v-if="receiptInfo.receiptStatus == 1"
-							></image>
-							<image
-								class="list-icon-image"
-								src="https://static.caimei365.com/app/crm/image/icon-noaudit@2x.png"
-								mode=""
-								v-if="receiptInfo.receiptStatus == 2"
-							></image>
-						</view>
-					</view>
-				</view>
-				<view class="tui-header-tabmain">
-					<input
-						v-if="currents == 3"
-						class="input"
-						type="text"
-						v-model="refundListQuery.keyword"
-						confirm-type="search"
-						@confirm="subMitSearch(2)"
-						placeholder="搜索关键词(供应商名称)"
-					/>
-					<input
-						v-else
-						class="input"
-						type="text"
-						v-model="listQuery.keyword"
-						confirm-type="search"
-						@confirm="subMitSearch(1)"
-						placeholder="搜索关键词(客户名称/订单ID)"
-					/>
-					<text class="iconfont icon-sousuo"></text>
-				</view>
-				<view class="tui-header-tabmain">
-					<view
-						class="main-item one"
-						v-for="(item, index) in listTabs"
-						:key="index"
-						:class="{ active: currents == index }"
-						@click="tabClick(1, index)"
-					>
-						<view class="text">{{ item.name }}</view>
-					</view>
-				</view>
-				<view class="tui-header-tabmain day">
-					<view
-						class="main-item tab"
-						v-for="(item, index) in listReturnType"
-						:key="index"
-						:class="{ tabActive: tabCurrents == index }"
-						@click="tabClick(2, index)"
-					>
-						<view class="text">{{ item.name }}</view>
-					</view>
-				</view>
-			</view>
-			<view
-				class="user-section"
-				:style="{
-					top: isIphoneX ? CustomBar + 330 + 'px' : CustomBar + 315 + 'px',
-					left: 0 + 'px',
-					paddingBottom: isIphoneX ? '178rpx' : '144rpx'
-				}"
-			>
-				<view class="header-content">
-					<view :class="{ 'tui-order-list': scrollTop >= 0 }" class="clearfix">
-						<!-- 空白页 -->
-						<empty v-if="isEmpty" :typeIndex="currents" :navbarHeight="navbarHeight"></empty>
-						<!-- 列表 -->
-						<view v-else class="tui-order-content">
-							<view class="tui-order-item" v-for="(order, orderIndex) in shopOrderList" :key="orderIndex">
-								<template v-if="currents != 3">
-									<receipt-details :orderInfo="order" />
-									<view
-										class="list-checked"
-										@click="checkedOrder(order)"
-										v-if="order.surplusAmount > 0"
-									>
-										<text
-											class="iconfont"
-											:class="order.isChecked ? 'icon-yixuanze' : 'icon-weixuanze'"
-										></text>
-									</view>
-									<view class="list-detail" @click="orderDetail(order.shopOrderId)">
-										<text class="iconfont icon-xiayibu"></text>
-									</view>
-								</template>
-								<template v-if="currents == 3">
-									<receipt-refund :orderInfo="order" />
-									<view class="list-checked" @click="checkedRefundOrder(order, orderIndex)">
-										<text
-											class="iconfont"
-											:class="order.isChecked ? 'icon-yixuanze' : 'icon-weixuanze'"
-										></text>
-									</view>
-									<view class="list-detail" @click="orderDetail(order.shopOrderId)">
-										<text class="iconfont icon-xiayibu"></text>
-									</view>
-								</template>
-							</view>
-							<!--加载loadding-->
-							<tui-loadmore :visible="loadding" :index="3" type="black" />
-							<tui-nomore :visible="!pullUpOn" bgcolor="#F7F7F7" :text="nomoreText" />
-							<!--加载loadding-->
-						</view>
-					</view>
-				</view>
-			</view>
-			<view class="distinguish-button" :style="{ paddingBottom: isIphoneX ? '68rpx' : '24rpx' }">
-				<view class="button" @click="confirmDistinguishRefund" v-if="currents == 3">确认关联退款子订单</view>
-				<view class="button" @click="confirmDistinguish" v-else>确认</view>
-			</view>
-		</view>
-		<!-- 弹窗 -->
-		<tui-modal
-			:show="modal"
-			@click="handleClick"
-			@cancel="hideMobel(0)"
-			:content="contentModalText"
-			color="#333"
-			:size="32"
-			shape="circle"
-			:maskClosable="false"
-		/>
-		<!-- 关联提示弹窗 -->
-		<receipt-modal
-			v-if="modal1"
-			:show="modal1"
-			:amount="receiptInfo.receiptAmount"
-			:totalOrder="totalOrder"
-			:modelTpye="modelTpye"
-			@cancel="hideMobel(1)"
-			@click="handleClick1"
-		/>
-		<!-- 关联信息 -->
-		<receipt-orderDetails v-if="modal2" :receipt="receiptInfo" @cancel="hideMobel(2)" />
-		<!-- 供应商退款子订单关联弹窗 -->
-		<tui-modal :show="modal3" :padding="'40rpx 30rpx'" @cancel="hideMobel(3)" :custom="true" fadeIn>
-			<view class="tui-modal-custom">
-				<view class="tui-prompt-text"> {{ contentModalText }} </view>
-				<view class="tui-prompt-flex"> <view class="btn btn-confirm" @click="hideMobel(3)">知道了</view> </view>
-			</view>
-		</tui-modal>
-	</view>
-</template>
-<script>
-import receiptModal from '@/components/cm-module/receipt/receipt-modal'
-import receiptDetails from '@/components/cm-module/receipt/receipt-details'
-import receiptRefund from '@/components/cm-module/receipt/receipt-refund'
-import receiptOrderDetails from '@/components/cm-module/receipt/receipt-orderDetails'
-import empty from '@/components/empty'
-import { listOrderTabs, listOrderStateTabs } from '@/utils/config.tabs.js'
-
-import { mapState, mapMutations } from 'vuex'
-const defaultListQuery = {
-	id: 0, //收款Id
-	keyword: '', // 搜索关键词(客户名称/订单号)
-	orderReceiptStatus: '1,2', //订单收款状态:1待收款(协销待确认款项的订单),2部分收款(已确认款项的订单),3已收款(已确认款项的订单)
-	organizeId: 0, // 商品订单 0 定金订单 0 小程序订单 3 退款子订单 4
-	pageNum: 1, // 页码
-	pageSize: 10, // 条数
-	type: 0 // 0商品订单(默认),1订金订单
-}
-const defaultRefundListQuery = {
-	id: 0, //收款Id
-	confirmedType: 0, // 0待确认,2已确认
-	keyword: '', //供应商名称
-	pageNum: 1, // 页码
-	pageSize: 10 // 条数
-}
-export default {
-	components: {
-		empty,
-		receiptModal,
-		receiptDetails,
-		receiptRefund,
-		receiptOrderDetails
-	},
-	data() {
-		return {
-			CustomBar: this.CustomBar, // 顶部导航栏高度
-			isIphoneX: this.$store.state.isIphoneX,
-			receiptInfo: {},
-			listTabs: listOrderTabs,
-			listReturnType: listOrderStateTabs,
-			listQuery: Object.assign({}, defaultListQuery),
-			refundListQuery: Object.assign({}, defaultRefundListQuery),
-			currents: 0,
-			tabCurrents: 0,
-			shopOrderList: [],
-			scrollTop: 0,
-			isEmpty: false,
-			loadding: false,
-			pullUpOn: true,
-			hasNextPage: false,
-			pullFlag: true,
-			navbarHeight: '',
-			nomoreText: '上拉显示更多',
-			contentModalText: '', //操作文字提示语句
-			modal: false,
-			modal1: false,
-			modal2: false,
-			modal3: false,
-			hanldOrder: '', //储存监听订单信息
-			OperationType: '', //操作类型
-			isCmcustomClass: 'left',
-			isShowHeader: false,
-			height: 64, //header高度
-			top: 0, //标题图标距离顶部距离
-			scrollH: 0, //滚动总高度
-			opcity: 1,
-			checkedOrderList: [],
-			checkedIds: [],
-			checkedRefundIndex: '',
-			confirmParams: {
-				confirmType: 4,
-				id: 0,
-				orderIds: ''
-			},
-			confirmRefundParams: {
-				shopOrderId: 0,
-				id: 0
-			},
-			skeletonShow: true,
-			modelTpye: 1, // 收款弹窗类型
-			totalOrder: {
-				orderNums: 1,
-				payTotalFee: 0, // 订单金额
-				balancePayFee: 0, // 余额抵扣
-				payableAmount: 0, // 应收金额
-				paidAmount: 0, //  已收金额
-				surplusAmount: 0 // 剩余应收
-			}, // 统计都选相同的订单数据
-			isShareType: false
-		}
-	},
-	onLoad(option) {
-		let obj = {}
-		uni.getSystemInfo({
-			success: res => {
-				this.width = obj.left || res.windowWidth
-				this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
-				this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
-				this.scrollH = res.windowWidth * 0.6
-			}
-		})
-		if (option.type == 'share') {
-			this.isShareType = true
-		}
-		this.listQuery.id = this.confirmParams.id = this.confirmRefundParams.id = option.id
-		this.getOrderReceiptDetail(this.listQuery.id)
-	},
-	computed: {
-		...mapState(['hasLogin'])
-	},
-	methods: {
-		getOrderReceiptDetail(id) {
-			// 收款详情
-			this.OrderService.orderReceiptDetail({ id: id })
-				.then(response => {
-					this.receiptInfo = response.data
-					this.getOrderReceiptOrders()
-				})
-				.catch(err => {
-					this.$api.navigateTo('/pages/login/login-error')
-				})
-		},
-		getOrderReceiptOrders() {
-			// 收款详情-订单列表
-			this.initListQuery()
-			this.OrderService.orderReceiptOrders(this.listQuery)
-				.then(response => {
-					let data = response.data
-					this.hasNextPage = response.data.hasNextPage
-					if (data.list && data.list.length > 0) {
-						this.isEmpty = false
-						this.shopOrderList = data.list.map((el, index) => {
-							el.isChecked = false
-							return el
-						})
-						this.pullFlag = false
-						setTimeout(() => {
-							this.pullFlag = true
-						}, 500)
-						if (this.hasNextPage) {
-							this.pullUpOn = false
-							this.nomoreText = '上拉显示更多'
-						} else {
-							if (this.shopOrderList.length < 3) {
-								this.pullUpOn = true
-								this.loadding = false
-							} else {
-								this.pullUpOn = false
-								this.loadding = false
-								this.nomoreText = '已至底部'
-							}
-						}
-					} else {
-						this.isEmpty = true
-					}
-					this.skeletonShow = false
-				})
-				.catch(err => {
-					this.$util.msg(err.msg, 2000)
-				})
-		},
-		orderReceiptRefundOrders() {
-			// 收款详情-退款子订单列表
-			this.OrderService.orderReceiptRefundOrders(this.refundListQuery)
-				.then(response => {
-					let data = response.data
-					this.hasNextPage = response.data.hasNextPage
-					if (data.list && data.list.length > 0) {
-						this.isEmpty = false
-						this.shopOrderList = data.list.map((el, index) => {
-							el.isChecked = false
-							return el
-						})
-						this.pullFlag = false
-						setTimeout(() => {
-							this.pullFlag = true
-						}, 500)
-						if (this.hasNextPage) {
-							this.pullUpOn = false
-							this.nomoreText = '上拉显示更多'
-						} else {
-							if (this.shopOrderList.length < 3) {
-								this.pullUpOn = true
-							} else {
-								this.pullUpOn = false
-								this.loadding = false
-								this.nomoreText = '已至底部'
-							}
-						}
-					} else {
-						this.isEmpty = true
-					}
-				})
-				.catch(err => {
-					this.$util.msg(err.msg, 2000)
-				})
-		},
-		orderReceiptRefundOrdersBottom() {
-			this.refundListQuery.pageNum += 1
-			this.OrderService.orderReceiptRefundOrders(this.refundListQuery)
-				.then(response => {
-					let data = response.data
-					if (data.list && data.list.length > 0) {
-						this.hasNextPage = data.hasNextPage
-						let list = data.list.map((el, index) => {
-							el.isChecked = false
-							return el
-						})
-						this.shopOrderList = this.shopOrderList.concat(list)
-						this.pullFlag = false // 防上拉暴滑
-						setTimeout(() => {
-							this.pullFlag = true
-						}, 500)
-						if (this.hasNextPage) {
-							this.pullUpOn = false
-							this.nomoreText = '上拉显示更多'
-						} else {
-							this.pullUpOn = false
-							this.loadding = false
-							this.nomoreText = '已至底部'
-						}
-					}
-				})
-				.catch(err => {
-					this.$util.msg(err.msg, 2000)
-				})
-		},
-		orderReceiptOrdersBottom() {
-			this.listQuery.pageNum += 1
-			this.OrderService.orderReceiptOrders(this.listQuery)
-				.then(response => {
-					let data = response.data
-					if (data.list && data.list.length > 0) {
-						this.hasNextPage = data.hasNextPage
-						let list = data.list.map((el, index) => {
-							el.isChecked = false
-							return el
-						})
-						this.shopOrderList = this.shopOrderList.concat(list)
-						this.pullFlag = false // 防上拉暴滑
-						setTimeout(() => {
-							this.pullFlag = true
-						}, 500)
-						if (this.hasNextPage) {
-							this.pullUpOn = false
-							this.nomoreText = '上拉显示更多'
-						} else {
-							this.pullUpOn = false
-							this.loadding = false
-							this.nomoreText = '已至底部'
-						}
-					}
-				})
-				.catch(err => {
-					this.$util.msg(err.msg, 2000)
-				})
-		},
-		subMitSearch(type) {
-			// 确认搜索
-			switch (type) {
-				case 1: // 订单
-					this.getOrderReceiptOrders()
-					break
-				case 2: // 订单
-					this.refundListQuery.pageNum = 1
-					this.orderReceiptRefundOrders()
-					break
-			}
-		},
-		getOnReachBottomData() {
-			//上拉加载
-			if (this.currents == 3) {
-				this.orderReceiptRefundOrdersBottom()
-			} else {
-				this.orderReceiptOrdersBottom()
-			}
-		},
-		orderDetail(shopOrderId) {
-			//订单详情跳转
-			this.$api.navigateTo(`/pages/relation/order/detail?shopOrderId=${shopOrderId}`)
-		},
-		handleClick(e) {
-			//用户操作订单
-			let index = e.index
-			if (index == 1) {
-			}
-			this.modal = false
-		},
-		confirmDistinguish() {
-			// 点击确认
-			const list = []
-			this.checkedOrderList.forEach(el => {
-				if (list.indexOf(el.userId) == -1) {
-					list.push(el.userId)
-				}
-			})
-			if (this.checkedOrderList.length == 0) {
-				this.$util.msg('请选择订单!', 2000)
-				return
-			}
-			// if (this.currents === 1) {
-			// 	// 订金订单每次只能关联一个订单
-			// 	if (this.checkedOrderList.length > 1) {
-			// 		this.$util.msg('订金订单每次只能关联一个订单!', 2000)
-			// 		return
-			// 	}
-			// }
-			if (list.length > 1) {
-				this.$util.msg('请选择相同机构的订单!', 2000)
-				return
-			}
-			let totalAmount = 0 //订单金额
-			let accountAmount = 0 //余额抵扣
-			let realPay = 0 //应收金额
-			let receiptAmount = 0 //已收金额
-			let surplusAmount = 0 //剩余应收
-			console.log('1111111',this.checkedOrderList)
-			this.checkedOrderList.forEach(el => {
-				totalAmount += el.totalAmount
-				accountAmount += el.accountAmount
-				realPay += el.realPay
-				receiptAmount += el.receiptAmount
-				surplusAmount += el.surplusAmount
-				this.checkedIds.push(el.shopOrderId)
-			})
-			console.log('checkedIds',this.checkedIds)
-			// 赋值
-			this.totalOrder.totalAmount = Number(totalAmount.toFixed(2))
-			this.totalOrder.surplusAmount = Number(surplusAmount.toFixed(2))
-			this.totalOrder.accountAmount = Number(accountAmount.toFixed(2))
-			this.totalOrder.realPay = Number(realPay.toFixed(2))
-			this.totalOrder.receiptAmount = Number(receiptAmount.toFixed(2))
-			this.totalOrder.orderNums = this.checkedOrderList.length
-			// if (this.currents === 1) {
-			// 	// 收款金额必须等于订金订单金额才能关联
-			// 	if (this.receiptInfo.receiptAmount != this.totalOrder.payTotalFee) {
-			// 		this.$util.msg('收款金额必须等于订金订单金额才能关联!', 2000)
-			// 		return
-			// 	}
-			// }
-			console.log('totalOrder', this.totalOrder)
-			//处理收款状态的几种类型
-			if (
-				this.receiptInfo.receiptAmount == this.totalOrder.surplusAmount ||
-				this.totalOrder.surplusAmount - this.receiptInfo.receiptAmount >= 10
-			) {
-				//收款金额等于订单应收金额 或者是 订单应收总金额减去收款金额大于等于10
-				this.modelTpye = 1
-				console.log(
-					'收款金额等于订单剩余应收金额 或者是 收款金额减去订单剩余应收金额大于等于10',
-					this.modelTpye
-				)
-			} else if (this.receiptInfo.receiptAmount > this.totalOrder.surplusAmount) {
-				//收款金额大于订单神域应收金额(可退款到余额)
-				this.modelTpye = 2
-				console.log('收款金额大于订单应收金额(可退款到余额)', this.modelTpye)
-			} else if (this.totalOrder.surplusAmount - this.receiptInfo.receiptAmount <= 10) {
-				//订单剩余应收总金额减去收款金额小于等于10元时,才能抹平确认
-				this.modelTpye = 3
-				console.log('订单剩余应收总金额减去收款金额小于等于10元时,才能抹平确认)', this.modelTpye)
-			}
-			this.modal1 = true
-		},
-		confirmDistinguishRefund() {
-			//确认关联供应商退款子订单
-			if (this.confirmRefundParams.shopOrderId == 0) {
-				this.$util.msg('请选择订单!', 2000)
-				return
-			}
-			this.orderReceiptConfirmRefund(this.confirmRefundParams)
-		},
-		handleClick1(data) {
-			switch (data) {
-				case 1: // 小额抹平确认
-					this.confirmParams.confirmType = data
-					this.confirmParams.orderIds = this.checkedIds.join(',')
-					this.orderReceiptConfirm()
-					this.modal1 = false
-					break
-				case 3: // 大额退款余额
-					this.confirmParams.confirmType = data
-					this.confirmParams.orderIds = this.checkedIds.join(',')
-					this.orderReceiptConfirm()
-					this.modal1 = false
-					break
-				case 4: // 确认关联
-					this.confirmParams.confirmType = data
-					this.confirmParams.orderIds = this.checkedIds.join(',')
-					this.orderReceiptConfirm()
-					this.modal1 = false
-					break
-			}
-		},
-		orderReceiptConfirmRefund(params) {
-			//确认关联退款子订单
-			this.OrderService.orderReceiptConfirmRefund(params)
-				.then(response => {
-					this.$util.msg('关联成功~', 2000, true, 'success')
-					setTimeout(() => {
-						this.$api.redirectTo(`/pages/relation/refund/detail?id=${this.confirmRefundParams.id}`)
-					}, 2000)
-				})
-				.catch(err => {
-					this.modal3 = true
-					this.contentModalText = err.msg
-				})
-		},
-		orderReceiptConfirm() {
-			//确认关联订单或抹平或退款余额
-			this.OrderService.orderReceiptConfirm(this.confirmParams)
-				.then(response => {
-					this.$api.redirectTo(`/pages/relation/ordinary/examine-detail?id=${this.confirmParams.id}`)
-				})
-				.catch(err => {
-					this.$util.msg(err.msg, 2000)
-				})
-		},
-		checkedOrder(order) {
-			// 勾选关联订单
-			order.isChecked = !order.isChecked
-			if (order.isChecked) {
-				if(!this.contains(this.checkedOrderList,order.shopOrderId)){
-					this.checkedOrderList.push(order)
-				}
-			} else {
-				this.checkedOrderList.splice(this.checkedOrderList.indexOf(order), 1)
-			}
-		},
-		contains(arr, val) {// 校验
-			return arr.some(item => item.shopOrderId === val)
-		},
-		checkedRefundOrder(order, index) {
-			// 勾选退款子订单
-			this.checkedOrderList = []
-			this.checkedRefundIndex = index
-			this.shopOrderList.forEach((el, index) => {
-				if (this.checkedRefundIndex == index) {
-					el.isChecked = true
-					this.confirmRefundParams.shopOrderId = el.shopOrderId
-				} else {
-					el.isChecked = false
-				}
-			})
-		},
-		hideMobel(type) {
-			switch (type) {
-				case 0:
-					this.modal = false
-					break
-				case 1:
-					this.modal1 = false
-					break
-				case 2:
-					this.modal2 = false
-					break
-				case 3:
-					this.modal3 = false
-					break
-			}
-		},
-		formatColor(state) {
-			//设置邀请码状态亚瑟
-			let stateColor = '',
-				stateColorObject = {
-					1: '#ff7900',
-					2: '#4cd964',
-					3: '#19be6b',
-					4: '#ed3f14',
-					5: '#F74D54'
-				}
-			Object.keys(stateColorObject).forEach(function(key) {
-				if (key == state) {
-					stateColor = stateColorObject[key]
-				}
-			})
-			return stateColor
-		},
-		tabClick(type, index) {
-			this.pullUpOn = true //切换时隐藏
-			this.loadding = false //切换时隐藏
-			switch (type) {
-				case 1: // 切换订单类型
-					this.currents = index
-					this.tabCurrents = 0
-					this.listQuery.orderReceiptStatus = '1,2'
-					switch (this.currents) {
-						case 0: // 商品订单
-							this.listQuery.type = 0
-							this.listQuery.organizeId = 0
-							this.getOrderReceiptOrders()
-							break
-						// case 1: // 定金订单
-						// 	this.listQuery.type = 1
-						// 	this.listQuery.organizeId = 0
-						// 	this.getOrderReceiptOrders()
-						// 	break
-						case 1: // 集团
-							this.listQuery.type = 0
-							this.listQuery.organizeId = 3
-							this.getOrderReceiptOrders()
-							break
-						// case 2: // 供应商退款 (暂时停用,后续可视情况废除)
-						// 	this.listQuery.type = 0
-						// 	this.refundListQuery.pageNum = 1
-						// 	this.orderReceiptRefundOrders()
-						// 	break
-					}
-					break
-				case 2: // 切换收款状态
-					this.tabCurrents = index
-					if (this.currents == 3) {
-						if (this.tabCurrents == 0) {
-							this.refundListQuery.confirmedType = 0
-						} else {
-							this.refundListQuery.confirmedType = 2
-						}
-						this.refundListQuery.pageNum = 1
-						this.orderReceiptRefundOrders()
-					} else {
-						if (this.tabCurrents == 0) {
-							this.listQuery.orderReceiptStatus = '1,2'
-						} else {
-							this.listQuery.orderReceiptStatus = '3'
-						}
-						this.getOrderReceiptOrders()
-					}
-			}
-		},
-		toNoSms(url) {
-			this.$api.navigateTo(url)
-		},
-		showReceiptModel() {
-			//
-			this.modal2 = true
-		},
-		initListQuery() {
-			// 初始化
-			this.loadding = true
-			this.pullUpOn = true
-			this.shopOrderList = []
-			this.checkedOrderList = []
-			this.listQuery.pageNum = 1
-		},
-		formatReceiptType(value) {
-			//订单状态文字和颜色
-			var HtmlStateText = '',
-				stateTextObject = {
-					1: '订单款',
-					2: '非订单款',
-					3: '返佣款',
-					4: '订单款或者非订单款',
-					5: '供应商退款'
-				}
-			Object.keys(stateTextObject).forEach(function(key) {
-				if (key == value) {
-					HtmlStateText = stateTextObject[key]
-				}
-			})
-			return HtmlStateText
-		}
-	},
-	onPageScroll(e) {
-		//实时获取到滚动的值
-		if (e.scrollTop > 30) {
-			this.isCmcustomClass = 'fiexd'
-		} else {
-			this.isCmcustomClass = 'left'
-		}
-		if (e.scrollTop > 180) {
-			this.isShowHeader = true
-		} else {
-			this.isShowHeader = false
-		}
-	},
-	onReachBottom() {
-		if (this.hasNextPage) {
-			this.loadding = true
-			this.pullUpOn = true
-			this.getOnReachBottomData()
-		}
-	},
-	onPullDownRefresh() {
-		setTimeout(() => {
-			this.getOrderReceiptOrders()
-			uni.stopPullDownRefresh()
-		}, 200)
-	},
-	onShareAppMessage(res) {
-		//分享购买优惠券
-		const receipt = this.receiptInfo
-		const receiptTypeText = this.formatReceiptType(receipt.receiptType)
-		if (res.from === 'button') {
-			// console.log('来自页面内转发按钮')
-		}
-		return {
-			title: `¥${receipt.receiptAmount.toFixed(2)} | ${receipt.receiptDate}  |  ${
-				receipt.receiptStatusText
-			}(${receiptTypeText})`,
-			path: `/pages/login/login-share?id=${receipt.id}`,
-			imageUrl: 'https://static.caimei365.com/app/crm/image/icon-share@2x.jpg'
-		}
-	},
-	onShow() {}
-}
-</script>
-
-<style lang="scss">
-@import '@/uni.scss';
-
-page {
-	background: #f7f7f7;
-}
-
-.tui-header-box {
-	width: 100%;
-	background: #ffffff;
-	z-index: 999;
-	position: fixed;
-	top: 0;
-	left: 0;
-	background-size: cover;
-	background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
-
-	&.fiexd {
-	}
-
-	&.first {
-	}
-}
-.header-top {
-	width: 100%;
-	font-size: 16px;
-	font-weight: 500;
-	height: 32px;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	position: relative;
-	padding: 0 40rpx;
-}
-
-.header-sit {
-	width: 100%;
-	box-sizing: border-box;
-	height: 80rpx;
-	line-height: 80rpx;
-	box-sizing: border-box;
-	color: #ffffff;
-	.header-sit-text {
-		text-align: left;
-		font-size: $font-size-40;
-		font-weight: 600;
-		font-family: '正楷';
-	}
-	.iconfont {
-		display: block;
-		width: 80rpx;
-		height: 80rpx;
-		float: left;
-		text-align: center;
-		line-height: 80rpx;
-		font-size: 42rpx;
-	}
-}
-
-.tui-header-tabs {
-	width: 100%;
-	height: auto;
-	margin-bottom: 40rpx;
-	padding: 20rpx 24rpx;
-	background: #ffffff;
-	box-sizing: border-box;
-	position: fixed;
-	z-index: 999;
-	box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
-	.tui-header-top {
-		width: 100%;
-		height: 66rpx;
-		box-sizing: border-box;
-		float: left;
-		.title {
-			float: left;
-			line-height: 66rpx;
-			color: #333333;
-			text-align: left;
-			font-size: $font-size-30;
-			font-weight: 600;
-		}
-		.tui-header-button {
-			float: right;
-			box-sizing: border-box;
-			height: 100%;
-			line-height: 66rpx;
-			.button {
-				float: left;
-				box-sizing: border-box;
-				padding: 0 24rpx;
-				height: 100%;
-				line-height: 66rpx;
-				border-radius: 35rpx;
-				text-align: center;
-				color: #ffffff;
-				margin-left: 10rpx;
-				&.btn-confirm {
-					background: $color-system;
-				}
-				&.btn-error {
-					background: #fdf6ec;
-					color: #e6a23c;
-					font-size: $font-size-24;
-				}
-			}
-		}
-	}
-	.tui-header-item {
-		width: 100%;
-		height: auto;
-		margin-top: 10rpx;
-		position: relative;
-		float: left;
-		.list-title-t {
-			width: 100%;
-			height: 50rpx;
-			float: left;
-			font-size: $font-size-28;
-			padding-bottom: 10rpx;
-			margin-bottom: 10rpx;
-			.list-title-num {
-				float: left;
-				text-align: left;
-				color: #999999;
-				margin-left: 30rpx;
-				line-height: 40rpx;
-				font-size: $font-size-24;
-			}
-			.list-title-tip {
-				float: left;
-
-				.badges {
-					display: block;
-					float: left;
-					padding: 0 15rpx;
-					height: 36rpx;
-					line-height: 36rpx;
-					border-radius: 18rpx;
-					background: #ecf5ff;
-					font-size: $font-size-22;
-					text-align: center;
-					color: #409eff;
-				}
-			}
-		}
-
-		.list-title-b {
-			width: 100%;
-			height: 40rpx;
-			float: left;
-			font-size: $font-size-24;
-			line-height: 40rpx;
-			color: #666666;
-			text-align: left;
-			.text {
-				color: #999999;
-			}
-			.list-title-b-item {
-				width: 50%;
-				height: 100%;
-				float: left;
-			}
-			&.sms {
-				height: 100rpx;
-				padding: 10rpx;
-				border-radius: 4rpx;
-				.text {
-					height: 100%;
-					text-overflow: ellipsis;
-					overflow: hidden;
-					display: -webkit-box;
-					-webkit-line-clamp: 2;
-					line-clamp: 2;
-					-webkit-box-orient: vertical;
-				}
-			}
-		}
-		.list-icon {
-			width: 120rpx;
-			height: 120rpx;
-			border-radius: 10rpx;
-			position: absolute;
-			right: 0;
-			top: 0;
-			color: #dd524d;
-			z-index: 99;
-			.list-icon-image {
-				width: 120rpx;
-				height: 120rpx;
-				display: block;
-			}
-		}
-	}
-	.tui-header-tabmain {
-		width: 100%;
-		height: 70rpx;
-		float: left;
-		position: relative;
-		&.day {
-			height: 70rpx;
-			box-sizing: border-box;
-			padding: 20rpx 0;
-			border-top: 1px solid #efefef;
-		}
-		.main-item {
-			float: left;
-			text-align: left;
-			color: #ffffff;
-			box-sizing: border-box;
-			&.one {
-				width: 25%;
-				.text {
-					width: 100%;
-					height: 70rpx;
-					line-height: 70rpx;
-					display: block;
-					float: left;
-					font-size: $font-size-28;
-					color: #666666;
-					text-align: left;
-					font-weight: 600;
-					font-family: '正楷';
-				}
-			}
-
-			&.tab {
-				width: 140rpx;
-				border-radius: 30rpx;
-				background: #f7f7f7;
-				margin-right: 15rpx;
-				padding: 0 20rpx;
-				.text {
-					width: 100%;
-					height: 50rpx;
-					line-height: 50rpx;
-					display: block;
-					float: left;
-					font-size: $font-size-24;
-					color: #666666;
-					text-align: center;
-				}
-			}
-
-			&.active {
-				.text {
-					color: $btn-confirm;
-					font-size: $font-size-28;
-					position: relative;
-					&::before {
-						content: '';
-						width: 60rpx;
-						height: 4rpx;
-						background: $btn-confirm;
-						position: absolute;
-						left: 50%;
-						bottom: 0;
-						margin-left: -60rpx;
-					}
-				}
-			}
-
-			&.tabActive {
-				background: $btn-confirm;
-				.text {
-					color: #ffffff;
-				}
-			}
-		}
-		.input {
-			width: 100%;
-			height: 70rpx;
-			box-sizing: border-box;
-			padding: 0 20rpx;
-			padding-left: 70rpx;
-			background: #f7f7f7;
-			border-radius: 35rpx;
-			font-size: $font-size-26;
-		}
-		.icon-sousuo {
-			width: 80rpx;
-			height: 70rpx;
-			display: block;
-			line-height: 70rpx;
-			text-align: center;
-			color: #999999;
-			font-size: $font-size-38;
-			position: absolute;
-			left: 0;
-			top: 0;
-		}
-	}
-	.button-content {
-		width: 100%;
-		height: auto;
-		float: left;
-		position: relative;
-		.btn {
-			height: 64rpx;
-			padding: 0 20rpx;
-			margin: 10rpx 0 0 0;
-			line-height: 64rpx;
-			font-size: $font-size-26;
-			text-align: center;
-			border-radius: 6rpx;
-			float: right;
-		}
-		.btn-confirm {
-			background-color: #ff5000;
-			color: #ffffff;
-		}
-	}
-}
-
-.distinguish-button {
-	width: 100%;
-	position: fixed;
-	bottom: 0;
-	left: 0;
-	background-color: #ffffff;
-	padding: 0 50rpx;
-	padding-top: 20rpx;
-	z-index: 1000;
-	.button {
-		width: 100%;
-		height: 80rpx;
-		background: $btn-confirm;
-		border-radius: 40rpx;
-		text-align: center;
-		color: #ffffff;
-		line-height: 80rpx;
-		font-size: $font-size-28;
-		box-shadow: 0 10rpx 14rpx 0 rgba(86, 119, 252, 0.2);
-	}
-}
-
-.user-section {
-	position: absolute;
-	width: 100%;
-}
-
-.header-content {
-	width: 100%;
-	height: auto;
-	position: relative;
-	background-color: #f7f7f7;
-	.tui-header-btm {
-		width: 100%;
-		padding: 0 30rpx;
-		box-sizing: border-box;
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		color: #fff;
-	}
-}
-.tui-order-list {
-	margin-top: 24rpx;
-	width: 100%;
-	position: relative;
-	box-sizing: border-box;
-	padding: 0 20rpx;
-}
-
-.tui-order-content {
-	width: 100%;
-	height: auto;
-}
-
-.tui-order-item {
-	display: flex;
-	flex-direction: column;
-	width: 100%;
-	padding: 20rpx 20rpx;
-	background: #fff;
-	margin-bottom: 24rpx;
-	border-radius: 8rpx;
-	position: relative;
-	.list-checked {
-		width: 80rpx;
-		height: 80rpx;
-		line-height: 80rpx;
-		text-align: center;
-		position: absolute;
-		right: 0;
-		top: 0;
-		.iconfont {
-			font-size: 38rpx;
-			color: $color-system;
-		}
-	}
-	.list-detail {
-		width: 70rpx;
-		height: 80rpx;
-		line-height: 80rpx;
-		text-align: center;
-		position: absolute;
-		right: 0;
-		bottom: 0;
-		.iconfont {
-			font-size: $font-size-32;
-			color: #999999;
-		}
-	}
-}
-.tui-prompt-flex {
-	width: 100%;
-	height: 70rpx;
-	display: flex;
-	margin-top: 20rpx;
-	.btn {
-		flex: 1;
-		line-height: 70rpx;
-		font-size: $font-size-26;
-		text-align: center;
-		color: #ffffff;
-		border-radius: 33rpx;
-		margin: 0 24rpx;
-		&.btn-cancel {
-			background: #f7f7f7;
-			color: #999999;
-		}
-		&.btn-confirm {
-			background: $color-system;
-		}
-	}
-}
-.tui-prompt-text {
-	line-height: 44rpx;
-	font-size: $font-size-26;
-	color: #333333;
-	.text {
-		color: $color-system;
-	}
-}
-</style>
+<template>
+	<view class="container mine clearfix">
+		<view
+			class="tui-header-box first"
+			:style="{ height: isCmcustomClass == 'fiexd' ? CustomBar + 6 + 'px' : CustomBar + 6 + 'px' }"
+			:class="isCmcustomClass"
+		>
+			<view class="header-top" :style="{ paddingTop: top + 'px', lineHeight: CustomBar + 20 + 'px' }"></view>
+			<view class="header-sit">
+				<text
+					class="iconfont icon-shouye1"
+					v-if="isShareType"
+					@click.stop="this.$api.navigateLinkJump()"
+				></text>
+				<text class="iconfont icon-fanhui" v-else @click.stop="this.$api.navigateBack(1)"></text>
+				<text class="header-sit-text">关联订单</text>
+			</view>
+		</view>
+		<tui-skeleton
+			v-if="skeletonShow"
+			backgroundColor="#fafafa"
+			borderRadius="10rpx"
+			:isLoading="true"
+			:loadingType="7"
+		/>
+		<view class="container-content" v-else>
+			<view class="tui-header-tabs day clearfix" :style="{ top: CustomBar + 6 + 'px' }">
+				<view v-if="!isShowHeader">
+					<view class="tui-header-top">
+						<view class="title"> 收款信息 </view>
+						<view class="tui-header-button">
+							<view
+								class="button btn-error"
+								@click.stop="showReceiptModel"
+								v-if="receiptInfo.shopOrderList.length > 0"
+							>
+								查看关联信息
+							</view>
+							<!-- <view class="button btn-confirm" @click="toNoSms('/pages/collection/list')">
+								<text class="iconfont icon-wodedingdan"></text>收款列表
+							</view> -->
+						</view>
+					</view>
+					<view class="tui-header-item">
+						<view class="list-title-t">
+							<view class="list-title-tip">
+								<text class="badges">{{ receiptInfo.receiptType | formatReceiptType }}款</text>
+							</view>
+							<view class="list-title-num" :style="{ color: formatColor(receiptInfo.receiptStatus) }">{{
+								receiptInfo.receiptStatus | formatStateType
+							}}</view>
+						</view>
+						<view class="list-title-b">
+							<view class="list-title-b-item ">
+								收款金额:<text class="text">¥{{ receiptInfo.receiptAmount | NumFormat }} </text>
+							</view>
+							<view class="list-title-b-item ">
+								收款账号:<text class="text">{{ receiptInfo.payTypeText }}</text>
+							</view>
+						</view>
+						<view class="list-title-b">
+							收款时间:<text class="text">{{ receiptInfo.receiptDate }}</text>
+						</view>
+						<view class="list-title-b">收款短信:</view>
+						<view class="list-title-b sms">
+							<text class="text">{{ receiptInfo.smsContent ? receiptInfo.smsContent : '无' }}</text>
+						</view>
+						<view class="list-icon" v-if="receiptInfo.tipMsg">
+							<image
+								class="list-icon-image"
+								src="https://static.caimei365.com/app/crm/image/icon-noconfirm@2x.png"
+								mode=""
+								v-if="receiptInfo.receiptStatus == 1"
+							></image>
+							<image
+								class="list-icon-image"
+								src="https://static.caimei365.com/app/crm/image/icon-noaudit@2x.png"
+								mode=""
+								v-if="receiptInfo.receiptStatus == 2"
+							></image>
+						</view>
+					</view>
+				</view>
+				<view class="tui-header-tabmain">
+					<input
+						v-if="currents == 3"
+						class="input"
+						type="text"
+						v-model="refundListQuery.keyword"
+						confirm-type="search"
+						@confirm="subMitSearch(2)"
+						placeholder="搜索关键词(供应商名称)"
+					/>
+					<input
+						v-else
+						class="input"
+						type="text"
+						v-model="listQuery.keyword"
+						confirm-type="search"
+						@confirm="subMitSearch(1)"
+						placeholder="搜索关键词(客户名称/订单ID)"
+					/>
+					<text class="iconfont icon-sousuo"></text>
+				</view>
+				<view class="tui-header-tabmain">
+					<view
+						class="main-item one"
+						v-for="(item, index) in listTabs"
+						:key="index"
+						:class="{ active: currents == index }"
+						@click="tabClick(1, index)"
+					>
+						<view class="text">{{ item.name }}</view>
+					</view>
+				</view>
+				<view class="tui-header-tabmain day">
+					<view
+						class="main-item tab"
+						v-for="(item, index) in listReturnType"
+						:key="index"
+						:class="{ tabActive: tabCurrents == index }"
+						@click="tabClick(2, index)"
+					>
+						<view class="text">{{ item.name }}</view>
+					</view>
+				</view>
+			</view>
+			<view
+				class="user-section"
+				:style="{
+					top: isIphoneX ? CustomBar + 330 + 'px' : CustomBar + 315 + 'px',
+					left: 0 + 'px',
+					paddingBottom: isIphoneX ? '178rpx' : '144rpx'
+				}"
+			>
+				<view class="header-content">
+					<view :class="{ 'tui-order-list': scrollTop >= 0 }" class="clearfix">
+						<!-- 空白页 -->
+						<empty v-if="isEmpty" :typeIndex="currents" :navbarHeight="navbarHeight"></empty>
+						<!-- 列表 -->
+						<view v-else class="tui-order-content">
+							<view class="tui-order-item" v-for="(order, orderIndex) in shopOrderList" :key="orderIndex">
+								<template v-if="currents != 3">
+									<receipt-details :orderInfo="order" />
+									<view
+										class="list-checked"
+										@click="checkedOrder(order)"
+										v-if="order.surplusAmount > 0"
+									>
+										<text
+											class="iconfont"
+											:class="order.isChecked ? 'icon-yixuanze' : 'icon-weixuanze'"
+										></text>
+									</view>
+									<view class="list-detail" @click="orderDetail(order.shopOrderId)">
+										<text class="iconfont icon-xiayibu"></text>
+									</view>
+								</template>
+								<template v-if="currents == 3">
+									<receipt-refund :orderInfo="order" />
+									<view class="list-checked" @click="checkedRefundOrder(order, orderIndex)">
+										<text
+											class="iconfont"
+											:class="order.isChecked ? 'icon-yixuanze' : 'icon-weixuanze'"
+										></text>
+									</view>
+									<view class="list-detail" @click="orderDetail(order.shopOrderId)">
+										<text class="iconfont icon-xiayibu"></text>
+									</view>
+								</template>
+							</view>
+							<!--加载loadding-->
+							<tui-loadmore :visible="loadding" :index="3" type="black" />
+							<tui-nomore :visible="!pullUpOn" bgcolor="#F7F7F7" :text="nomoreText" />
+							<!--加载loadding-->
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="distinguish-button" :style="{ paddingBottom: isIphoneX ? '68rpx' : '24rpx' }">
+				<view class="button" @click="confirmDistinguishRefund" v-if="currents == 3">确认关联退款子订单</view>
+				<view class="button" @click="confirmDistinguish" v-else>确认</view>
+			</view>
+		</view>
+		<!-- 弹窗 -->
+		<tui-modal
+			:show="modal"
+			@click="handleClick"
+			@cancel="hideMobel(0)"
+			:content="contentModalText"
+			color="#333"
+			:size="32"
+			shape="circle"
+			:maskClosable="false"
+		/>
+		<!-- 关联提示弹窗 -->
+		<receipt-modal
+			v-if="modal1"
+			:show="modal1"
+			:amount="receiptInfo.receiptAmount"
+			:totalOrder="totalOrder"
+			:modelTpye="modelTpye"
+			@cancel="hideMobel(1)"
+			@click="handleClick1"
+		/>
+		<!-- 关联信息 -->
+		<receipt-orderDetails v-if="modal2" :receipt="receiptInfo" @cancel="hideMobel(2)" />
+		<!-- 供应商退款子订单关联弹窗 -->
+		<tui-modal :show="modal3" :padding="'40rpx 30rpx'" @cancel="hideMobel(3)" :custom="true" fadeIn>
+			<view class="tui-modal-custom">
+				<view class="tui-prompt-text"> {{ contentModalText }} </view>
+				<view class="tui-prompt-flex"> <view class="btn btn-confirm" @click="hideMobel(3)">知道了</view> </view>
+			</view>
+		</tui-modal>
+	</view>
+</template>
+<script>
+import receiptModal from '@/components/cm-module/receipt/receipt-modal'
+import receiptDetails from '@/components/cm-module/receipt/receipt-details'
+import receiptRefund from '@/components/cm-module/receipt/receipt-refund'
+import receiptOrderDetails from '@/components/cm-module/receipt/receipt-orderDetails'
+import empty from '@/components/empty'
+import { listOrderTabs, listOrderStateTabs } from '@/utils/config.tabs.js'
+
+import { mapState, mapMutations } from 'vuex'
+const defaultListQuery = {
+	id: 0, //收款Id
+	keyword: '', // 搜索关键词(客户名称/订单号)
+	orderReceiptStatus: '1,2', //订单收款状态:1待收款(服务商待确认款项的订单),2部分收款(已确认款项的订单),3已收款(已确认款项的订单)
+	organizeId: 0, // 商品订单 0 定金订单 0 小程序订单 3 退款子订单 4
+	pageNum: 1, // 页码
+	pageSize: 10, // 条数
+	type: 0 // 0商品订单(默认),1订金订单
+}
+const defaultRefundListQuery = {
+	id: 0, //收款Id
+	confirmedType: 0, // 0待确认,2已确认
+	keyword: '', //供应商名称
+	pageNum: 1, // 页码
+	pageSize: 10 // 条数
+}
+export default {
+	components: {
+		empty,
+		receiptModal,
+		receiptDetails,
+		receiptRefund,
+		receiptOrderDetails
+	},
+	data() {
+		return {
+			CustomBar: this.CustomBar, // 顶部导航栏高度
+			isIphoneX: this.$store.state.isIphoneX,
+			receiptInfo: {},
+			listTabs: listOrderTabs,
+			listReturnType: listOrderStateTabs,
+			listQuery: Object.assign({}, defaultListQuery),
+			refundListQuery: Object.assign({}, defaultRefundListQuery),
+			currents: 0,
+			tabCurrents: 0,
+			shopOrderList: [],
+			scrollTop: 0,
+			isEmpty: false,
+			loadding: false,
+			pullUpOn: true,
+			hasNextPage: false,
+			pullFlag: true,
+			navbarHeight: '',
+			nomoreText: '上拉显示更多',
+			contentModalText: '', //操作文字提示语句
+			modal: false,
+			modal1: false,
+			modal2: false,
+			modal3: false,
+			hanldOrder: '', //储存监听订单信息
+			OperationType: '', //操作类型
+			isCmcustomClass: 'left',
+			isShowHeader: false,
+			height: 64, //header高度
+			top: 0, //标题图标距离顶部距离
+			scrollH: 0, //滚动总高度
+			opcity: 1,
+			checkedOrderList: [],
+			checkedIds: [],
+			checkedRefundIndex: '',
+			confirmParams: {
+				confirmType: 4,
+				id: 0,
+				orderIds: ''
+			},
+			confirmRefundParams: {
+				shopOrderId: 0,
+				id: 0
+			},
+			skeletonShow: true,
+			modelTpye: 1, // 收款弹窗类型
+			totalOrder: {
+				orderNums: 1,
+				payTotalFee: 0, // 订单金额
+				balancePayFee: 0, // 余额抵扣
+				payableAmount: 0, // 应收金额
+				paidAmount: 0, //  已收金额
+				surplusAmount: 0 // 剩余应收
+			}, // 统计都选相同的订单数据
+			isShareType: false
+		}
+	},
+	onLoad(option) {
+		let obj = {}
+		uni.getSystemInfo({
+			success: res => {
+				this.width = obj.left || res.windowWidth
+				this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
+				this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
+				this.scrollH = res.windowWidth * 0.6
+			}
+		})
+		if (option.type == 'share') {
+			this.isShareType = true
+		}
+		this.listQuery.id = this.confirmParams.id = this.confirmRefundParams.id = option.id
+		this.getOrderReceiptDetail(this.listQuery.id)
+	},
+	computed: {
+		...mapState(['hasLogin'])
+	},
+	methods: {
+		getOrderReceiptDetail(id) {
+			// 收款详情
+			this.OrderService.orderReceiptDetail({ id: id })
+				.then(response => {
+					this.receiptInfo = response.data
+					this.getOrderReceiptOrders()
+				})
+				.catch(err => {
+					this.$api.navigateTo('/pages/login/login-error')
+				})
+		},
+		getOrderReceiptOrders() {
+			// 收款详情-订单列表
+			this.initListQuery()
+			this.OrderService.orderReceiptOrders(this.listQuery)
+				.then(response => {
+					let data = response.data
+					this.hasNextPage = response.data.hasNextPage
+					if (data.list && data.list.length > 0) {
+						this.isEmpty = false
+						this.shopOrderList = data.list.map((el, index) => {
+							el.isChecked = false
+							return el
+						})
+						this.pullFlag = false
+						setTimeout(() => {
+							this.pullFlag = true
+						}, 500)
+						if (this.hasNextPage) {
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						} else {
+							if (this.shopOrderList.length < 3) {
+								this.pullUpOn = true
+								this.loadding = false
+							} else {
+								this.pullUpOn = false
+								this.loadding = false
+								this.nomoreText = '已至底部'
+							}
+						}
+					} else {
+						this.isEmpty = true
+					}
+					this.skeletonShow = false
+				})
+				.catch(err => {
+					this.$util.msg(err.msg, 2000)
+				})
+		},
+		orderReceiptRefundOrders() {
+			// 收款详情-退款子订单列表
+			this.OrderService.orderReceiptRefundOrders(this.refundListQuery)
+				.then(response => {
+					let data = response.data
+					this.hasNextPage = response.data.hasNextPage
+					if (data.list && data.list.length > 0) {
+						this.isEmpty = false
+						this.shopOrderList = data.list.map((el, index) => {
+							el.isChecked = false
+							return el
+						})
+						this.pullFlag = false
+						setTimeout(() => {
+							this.pullFlag = true
+						}, 500)
+						if (this.hasNextPage) {
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						} else {
+							if (this.shopOrderList.length < 3) {
+								this.pullUpOn = true
+							} else {
+								this.pullUpOn = false
+								this.loadding = false
+								this.nomoreText = '已至底部'
+							}
+						}
+					} else {
+						this.isEmpty = true
+					}
+				})
+				.catch(err => {
+					this.$util.msg(err.msg, 2000)
+				})
+		},
+		orderReceiptRefundOrdersBottom() {
+			this.refundListQuery.pageNum += 1
+			this.OrderService.orderReceiptRefundOrders(this.refundListQuery)
+				.then(response => {
+					let data = response.data
+					if (data.list && data.list.length > 0) {
+						this.hasNextPage = data.hasNextPage
+						let list = data.list.map((el, index) => {
+							el.isChecked = false
+							return el
+						})
+						this.shopOrderList = this.shopOrderList.concat(list)
+						this.pullFlag = false // 防上拉暴滑
+						setTimeout(() => {
+							this.pullFlag = true
+						}, 500)
+						if (this.hasNextPage) {
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						} else {
+							this.pullUpOn = false
+							this.loadding = false
+							this.nomoreText = '已至底部'
+						}
+					}
+				})
+				.catch(err => {
+					this.$util.msg(err.msg, 2000)
+				})
+		},
+		orderReceiptOrdersBottom() {
+			this.listQuery.pageNum += 1
+			this.OrderService.orderReceiptOrders(this.listQuery)
+				.then(response => {
+					let data = response.data
+					if (data.list && data.list.length > 0) {
+						this.hasNextPage = data.hasNextPage
+						let list = data.list.map((el, index) => {
+							el.isChecked = false
+							return el
+						})
+						this.shopOrderList = this.shopOrderList.concat(list)
+						this.pullFlag = false // 防上拉暴滑
+						setTimeout(() => {
+							this.pullFlag = true
+						}, 500)
+						if (this.hasNextPage) {
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						} else {
+							this.pullUpOn = false
+							this.loadding = false
+							this.nomoreText = '已至底部'
+						}
+					}
+				})
+				.catch(err => {
+					this.$util.msg(err.msg, 2000)
+				})
+		},
+		subMitSearch(type) {
+			// 确认搜索
+			switch (type) {
+				case 1: // 订单
+					this.getOrderReceiptOrders()
+					break
+				case 2: // 订单
+					this.refundListQuery.pageNum = 1
+					this.orderReceiptRefundOrders()
+					break
+			}
+		},
+		getOnReachBottomData() {
+			//上拉加载
+			if (this.currents == 3) {
+				this.orderReceiptRefundOrdersBottom()
+			} else {
+				this.orderReceiptOrdersBottom()
+			}
+		},
+		orderDetail(shopOrderId) {
+			//订单详情跳转
+			this.$api.navigateTo(`/pages/relation/order/detail?shopOrderId=${shopOrderId}`)
+		},
+		handleClick(e) {
+			//用户操作订单
+			let index = e.index
+			if (index == 1) {
+			}
+			this.modal = false
+		},
+		confirmDistinguish() {
+			// 点击确认
+			const list = []
+			this.checkedOrderList.forEach(el => {
+				if (list.indexOf(el.userId) == -1) {
+					list.push(el.userId)
+				}
+			})
+			if (this.checkedOrderList.length == 0) {
+				this.$util.msg('请选择订单!', 2000)
+				return
+			}
+			// if (this.currents === 1) {
+			// 	// 订金订单每次只能关联一个订单
+			// 	if (this.checkedOrderList.length > 1) {
+			// 		this.$util.msg('订金订单每次只能关联一个订单!', 2000)
+			// 		return
+			// 	}
+			// }
+			if (list.length > 1) {
+				this.$util.msg('请选择相同机构的订单!', 2000)
+				return
+			}
+			let totalAmount = 0 //订单金额
+			let accountAmount = 0 //余额抵扣
+			let realPay = 0 //应收金额
+			let receiptAmount = 0 //已收金额
+			let surplusAmount = 0 //剩余应收
+			console.log('1111111',this.checkedOrderList)
+			this.checkedOrderList.forEach(el => {
+				totalAmount += el.totalAmount
+				accountAmount += el.accountAmount
+				realPay += el.realPay
+				receiptAmount += el.receiptAmount
+				surplusAmount += el.surplusAmount
+				this.checkedIds.push(el.shopOrderId)
+			})
+			console.log('checkedIds',this.checkedIds)
+			// 赋值
+			this.totalOrder.totalAmount = Number(totalAmount.toFixed(2))
+			this.totalOrder.surplusAmount = Number(surplusAmount.toFixed(2))
+			this.totalOrder.accountAmount = Number(accountAmount.toFixed(2))
+			this.totalOrder.realPay = Number(realPay.toFixed(2))
+			this.totalOrder.receiptAmount = Number(receiptAmount.toFixed(2))
+			this.totalOrder.orderNums = this.checkedOrderList.length
+			// if (this.currents === 1) {
+			// 	// 收款金额必须等于订金订单金额才能关联
+			// 	if (this.receiptInfo.receiptAmount != this.totalOrder.payTotalFee) {
+			// 		this.$util.msg('收款金额必须等于订金订单金额才能关联!', 2000)
+			// 		return
+			// 	}
+			// }
+			console.log('totalOrder', this.totalOrder)
+			//处理收款状态的几种类型
+			if (
+				this.receiptInfo.receiptAmount == this.totalOrder.surplusAmount ||
+				this.totalOrder.surplusAmount - this.receiptInfo.receiptAmount >= 10
+			) {
+				//收款金额等于订单应收金额 或者是 订单应收总金额减去收款金额大于等于10
+				this.modelTpye = 1
+				console.log(
+					'收款金额等于订单剩余应收金额 或者是 收款金额减去订单剩余应收金额大于等于10',
+					this.modelTpye
+				)
+			} else if (this.receiptInfo.receiptAmount > this.totalOrder.surplusAmount) {
+				//收款金额大于订单神域应收金额(可退款到余额)
+				this.modelTpye = 2
+				console.log('收款金额大于订单应收金额(可退款到余额)', this.modelTpye)
+			} else if (this.totalOrder.surplusAmount - this.receiptInfo.receiptAmount <= 10) {
+				//订单剩余应收总金额减去收款金额小于等于10元时,才能抹平确认
+				this.modelTpye = 3
+				console.log('订单剩余应收总金额减去收款金额小于等于10元时,才能抹平确认)', this.modelTpye)
+			}
+			this.modal1 = true
+		},
+		confirmDistinguishRefund() {
+			//确认关联供应商退款子订单
+			if (this.confirmRefundParams.shopOrderId == 0) {
+				this.$util.msg('请选择订单!', 2000)
+				return
+			}
+			this.orderReceiptConfirmRefund(this.confirmRefundParams)
+		},
+		handleClick1(data) {
+			switch (data) {
+				case 1: // 小额抹平确认
+					this.confirmParams.confirmType = data
+					this.confirmParams.orderIds = this.checkedIds.join(',')
+					this.orderReceiptConfirm()
+					this.modal1 = false
+					break
+				case 3: // 大额退款余额
+					this.confirmParams.confirmType = data
+					this.confirmParams.orderIds = this.checkedIds.join(',')
+					this.orderReceiptConfirm()
+					this.modal1 = false
+					break
+				case 4: // 确认关联
+					this.confirmParams.confirmType = data
+					this.confirmParams.orderIds = this.checkedIds.join(',')
+					this.orderReceiptConfirm()
+					this.modal1 = false
+					break
+			}
+		},
+		orderReceiptConfirmRefund(params) {
+			//确认关联退款子订单
+			this.OrderService.orderReceiptConfirmRefund(params)
+				.then(response => {
+					this.$util.msg('关联成功~', 2000, true, 'success')
+					setTimeout(() => {
+						this.$api.redirectTo(`/pages/relation/refund/detail?id=${this.confirmRefundParams.id}`)
+					}, 2000)
+				})
+				.catch(err => {
+					this.modal3 = true
+					this.contentModalText = err.msg
+				})
+		},
+		orderReceiptConfirm() {
+			//确认关联订单或抹平或退款余额
+			this.OrderService.orderReceiptConfirm(this.confirmParams)
+				.then(response => {
+					this.$api.redirectTo(`/pages/relation/ordinary/examine-detail?id=${this.confirmParams.id}`)
+				})
+				.catch(err => {
+					this.$util.msg(err.msg, 2000)
+				})
+		},
+		checkedOrder(order) {
+			// 勾选关联订单
+			order.isChecked = !order.isChecked
+			if (order.isChecked) {
+				if(!this.contains(this.checkedOrderList,order.shopOrderId)){
+					this.checkedOrderList.push(order)
+				}
+			} else {
+				this.checkedOrderList.splice(this.checkedOrderList.indexOf(order), 1)
+			}
+		},
+		contains(arr, val) {// 校验
+			return arr.some(item => item.shopOrderId === val)
+		},
+		checkedRefundOrder(order, index) {
+			// 勾选退款子订单
+			this.checkedOrderList = []
+			this.checkedRefundIndex = index
+			this.shopOrderList.forEach((el, index) => {
+				if (this.checkedRefundIndex == index) {
+					el.isChecked = true
+					this.confirmRefundParams.shopOrderId = el.shopOrderId
+				} else {
+					el.isChecked = false
+				}
+			})
+		},
+		hideMobel(type) {
+			switch (type) {
+				case 0:
+					this.modal = false
+					break
+				case 1:
+					this.modal1 = false
+					break
+				case 2:
+					this.modal2 = false
+					break
+				case 3:
+					this.modal3 = false
+					break
+			}
+		},
+		formatColor(state) {
+			//设置邀请码状态亚瑟
+			let stateColor = '',
+				stateColorObject = {
+					1: '#ff7900',
+					2: '#4cd964',
+					3: '#19be6b',
+					4: '#ed3f14',
+					5: '#F74D54'
+				}
+			Object.keys(stateColorObject).forEach(function(key) {
+				if (key == state) {
+					stateColor = stateColorObject[key]
+				}
+			})
+			return stateColor
+		},
+		tabClick(type, index) {
+			this.pullUpOn = true //切换时隐藏
+			this.loadding = false //切换时隐藏
+			switch (type) {
+				case 1: // 切换订单类型
+					this.currents = index
+					this.tabCurrents = 0
+					this.listQuery.orderReceiptStatus = '1,2'
+					switch (this.currents) {
+						case 0: // 商品订单
+							this.listQuery.type = 0
+							this.listQuery.organizeId = 0
+							this.getOrderReceiptOrders()
+							break
+						// case 1: // 定金订单
+						// 	this.listQuery.type = 1
+						// 	this.listQuery.organizeId = 0
+						// 	this.getOrderReceiptOrders()
+						// 	break
+						case 1: // 集团
+							this.listQuery.type = 0
+							this.listQuery.organizeId = 3
+							this.getOrderReceiptOrders()
+							break
+						// case 2: // 供应商退款 (暂时停用,后续可视情况废除)
+						// 	this.listQuery.type = 0
+						// 	this.refundListQuery.pageNum = 1
+						// 	this.orderReceiptRefundOrders()
+						// 	break
+					}
+					break
+				case 2: // 切换收款状态
+					this.tabCurrents = index
+					if (this.currents == 3) {
+						if (this.tabCurrents == 0) {
+							this.refundListQuery.confirmedType = 0
+						} else {
+							this.refundListQuery.confirmedType = 2
+						}
+						this.refundListQuery.pageNum = 1
+						this.orderReceiptRefundOrders()
+					} else {
+						if (this.tabCurrents == 0) {
+							this.listQuery.orderReceiptStatus = '1,2'
+						} else {
+							this.listQuery.orderReceiptStatus = '3'
+						}
+						this.getOrderReceiptOrders()
+					}
+			}
+		},
+		toNoSms(url) {
+			this.$api.navigateTo(url)
+		},
+		showReceiptModel() {
+			//
+			this.modal2 = true
+		},
+		initListQuery() {
+			// 初始化
+			this.loadding = true
+			this.pullUpOn = true
+			this.shopOrderList = []
+			this.checkedOrderList = []
+			this.listQuery.pageNum = 1
+		},
+		formatReceiptType(value) {
+			//订单状态文字和颜色
+			var HtmlStateText = '',
+				stateTextObject = {
+					1: '订单款',
+					2: '非订单款',
+					3: '返佣款',
+					4: '订单款或者非订单款',
+					5: '供应商退款'
+				}
+			Object.keys(stateTextObject).forEach(function(key) {
+				if (key == value) {
+					HtmlStateText = stateTextObject[key]
+				}
+			})
+			return HtmlStateText
+		}
+	},
+	onPageScroll(e) {
+		//实时获取到滚动的值
+		if (e.scrollTop > 30) {
+			this.isCmcustomClass = 'fiexd'
+		} else {
+			this.isCmcustomClass = 'left'
+		}
+		if (e.scrollTop > 180) {
+			this.isShowHeader = true
+		} else {
+			this.isShowHeader = false
+		}
+	},
+	onReachBottom() {
+		if (this.hasNextPage) {
+			this.loadding = true
+			this.pullUpOn = true
+			this.getOnReachBottomData()
+		}
+	},
+	onPullDownRefresh() {
+		setTimeout(() => {
+			this.getOrderReceiptOrders()
+			uni.stopPullDownRefresh()
+		}, 200)
+	},
+	onShareAppMessage(res) {
+		//分享购买优惠券
+		const receipt = this.receiptInfo
+		const receiptTypeText = this.formatReceiptType(receipt.receiptType)
+		if (res.from === 'button') {
+			// console.log('来自页面内转发按钮')
+		}
+		return {
+			title: `¥${receipt.receiptAmount.toFixed(2)} | ${receipt.receiptDate}  |  ${
+				receipt.receiptStatusText
+			}(${receiptTypeText})`,
+			path: `/pages/login/login-share?id=${receipt.id}`,
+			imageUrl: 'https://static.caimei365.com/app/crm/image/icon-share@2x.jpg'
+		}
+	},
+	onShow() {}
+}
+</script>
+
+<style lang="scss">
+@import '@/uni.scss';
+
+page {
+	background: #f7f7f7;
+}
+
+.tui-header-box {
+	width: 100%;
+	background: #ffffff;
+	z-index: 999;
+	position: fixed;
+	top: 0;
+	left: 0;
+	background-size: cover;
+	background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
+
+	&.fiexd {
+	}
+
+	&.first {
+	}
+}
+.header-top {
+	width: 100%;
+	font-size: 16px;
+	font-weight: 500;
+	height: 32px;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	position: relative;
+	padding: 0 40rpx;
+}
+
+.header-sit {
+	width: 100%;
+	box-sizing: border-box;
+	height: 80rpx;
+	line-height: 80rpx;
+	box-sizing: border-box;
+	color: #ffffff;
+	.header-sit-text {
+		text-align: left;
+		font-size: $font-size-40;
+		font-weight: 600;
+		font-family: '正楷';
+	}
+	.iconfont {
+		display: block;
+		width: 80rpx;
+		height: 80rpx;
+		float: left;
+		text-align: center;
+		line-height: 80rpx;
+		font-size: 42rpx;
+	}
+}
+
+.tui-header-tabs {
+	width: 100%;
+	height: auto;
+	margin-bottom: 40rpx;
+	padding: 20rpx 24rpx;
+	background: #ffffff;
+	box-sizing: border-box;
+	position: fixed;
+	z-index: 999;
+	box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
+	.tui-header-top {
+		width: 100%;
+		height: 66rpx;
+		box-sizing: border-box;
+		float: left;
+		.title {
+			float: left;
+			line-height: 66rpx;
+			color: #333333;
+			text-align: left;
+			font-size: $font-size-30;
+			font-weight: 600;
+		}
+		.tui-header-button {
+			float: right;
+			box-sizing: border-box;
+			height: 100%;
+			line-height: 66rpx;
+			.button {
+				float: left;
+				box-sizing: border-box;
+				padding: 0 24rpx;
+				height: 100%;
+				line-height: 66rpx;
+				border-radius: 35rpx;
+				text-align: center;
+				color: #ffffff;
+				margin-left: 10rpx;
+				&.btn-confirm {
+					background: $color-system;
+				}
+				&.btn-error {
+					background: #fdf6ec;
+					color: #e6a23c;
+					font-size: $font-size-24;
+				}
+			}
+		}
+	}
+	.tui-header-item {
+		width: 100%;
+		height: auto;
+		margin-top: 10rpx;
+		position: relative;
+		float: left;
+		.list-title-t {
+			width: 100%;
+			height: 50rpx;
+			float: left;
+			font-size: $font-size-28;
+			padding-bottom: 10rpx;
+			margin-bottom: 10rpx;
+			.list-title-num {
+				float: left;
+				text-align: left;
+				color: #999999;
+				margin-left: 30rpx;
+				line-height: 40rpx;
+				font-size: $font-size-24;
+			}
+			.list-title-tip {
+				float: left;
+
+				.badges {
+					display: block;
+					float: left;
+					padding: 0 15rpx;
+					height: 36rpx;
+					line-height: 36rpx;
+					border-radius: 18rpx;
+					background: #ecf5ff;
+					font-size: $font-size-22;
+					text-align: center;
+					color: #409eff;
+				}
+			}
+		}
+
+		.list-title-b {
+			width: 100%;
+			height: 40rpx;
+			float: left;
+			font-size: $font-size-24;
+			line-height: 40rpx;
+			color: #666666;
+			text-align: left;
+			.text {
+				color: #999999;
+			}
+			.list-title-b-item {
+				width: 50%;
+				height: 100%;
+				float: left;
+			}
+			&.sms {
+				height: 100rpx;
+				padding: 10rpx;
+				border-radius: 4rpx;
+				.text {
+					height: 100%;
+					text-overflow: ellipsis;
+					overflow: hidden;
+					display: -webkit-box;
+					-webkit-line-clamp: 2;
+					line-clamp: 2;
+					-webkit-box-orient: vertical;
+				}
+			}
+		}
+		.list-icon {
+			width: 120rpx;
+			height: 120rpx;
+			border-radius: 10rpx;
+			position: absolute;
+			right: 0;
+			top: 0;
+			color: #dd524d;
+			z-index: 99;
+			.list-icon-image {
+				width: 120rpx;
+				height: 120rpx;
+				display: block;
+			}
+		}
+	}
+	.tui-header-tabmain {
+		width: 100%;
+		height: 70rpx;
+		float: left;
+		position: relative;
+		&.day {
+			height: 70rpx;
+			box-sizing: border-box;
+			padding: 20rpx 0;
+			border-top: 1px solid #efefef;
+		}
+		.main-item {
+			float: left;
+			text-align: left;
+			color: #ffffff;
+			box-sizing: border-box;
+			&.one {
+				width: 25%;
+				.text {
+					width: 100%;
+					height: 70rpx;
+					line-height: 70rpx;
+					display: block;
+					float: left;
+					font-size: $font-size-28;
+					color: #666666;
+					text-align: left;
+					font-weight: 600;
+					font-family: '正楷';
+				}
+			}
+
+			&.tab {
+				width: 140rpx;
+				border-radius: 30rpx;
+				background: #f7f7f7;
+				margin-right: 15rpx;
+				padding: 0 20rpx;
+				.text {
+					width: 100%;
+					height: 50rpx;
+					line-height: 50rpx;
+					display: block;
+					float: left;
+					font-size: $font-size-24;
+					color: #666666;
+					text-align: center;
+				}
+			}
+
+			&.active {
+				.text {
+					color: $btn-confirm;
+					font-size: $font-size-28;
+					position: relative;
+					&::before {
+						content: '';
+						width: 60rpx;
+						height: 4rpx;
+						background: $btn-confirm;
+						position: absolute;
+						left: 50%;
+						bottom: 0;
+						margin-left: -60rpx;
+					}
+				}
+			}
+
+			&.tabActive {
+				background: $btn-confirm;
+				.text {
+					color: #ffffff;
+				}
+			}
+		}
+		.input {
+			width: 100%;
+			height: 70rpx;
+			box-sizing: border-box;
+			padding: 0 20rpx;
+			padding-left: 70rpx;
+			background: #f7f7f7;
+			border-radius: 35rpx;
+			font-size: $font-size-26;
+		}
+		.icon-sousuo {
+			width: 80rpx;
+			height: 70rpx;
+			display: block;
+			line-height: 70rpx;
+			text-align: center;
+			color: #999999;
+			font-size: $font-size-38;
+			position: absolute;
+			left: 0;
+			top: 0;
+		}
+	}
+	.button-content {
+		width: 100%;
+		height: auto;
+		float: left;
+		position: relative;
+		.btn {
+			height: 64rpx;
+			padding: 0 20rpx;
+			margin: 10rpx 0 0 0;
+			line-height: 64rpx;
+			font-size: $font-size-26;
+			text-align: center;
+			border-radius: 6rpx;
+			float: right;
+		}
+		.btn-confirm {
+			background-color: #ff5000;
+			color: #ffffff;
+		}
+	}
+}
+
+.distinguish-button {
+	width: 100%;
+	position: fixed;
+	bottom: 0;
+	left: 0;
+	background-color: #ffffff;
+	padding: 0 50rpx;
+	padding-top: 20rpx;
+	z-index: 1000;
+	.button {
+		width: 100%;
+		height: 80rpx;
+		background: $btn-confirm;
+		border-radius: 40rpx;
+		text-align: center;
+		color: #ffffff;
+		line-height: 80rpx;
+		font-size: $font-size-28;
+		box-shadow: 0 10rpx 14rpx 0 rgba(86, 119, 252, 0.2);
+	}
+}
+
+.user-section {
+	position: absolute;
+	width: 100%;
+}
+
+.header-content {
+	width: 100%;
+	height: auto;
+	position: relative;
+	background-color: #f7f7f7;
+	.tui-header-btm {
+		width: 100%;
+		padding: 0 30rpx;
+		box-sizing: border-box;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		color: #fff;
+	}
+}
+.tui-order-list {
+	margin-top: 24rpx;
+	width: 100%;
+	position: relative;
+	box-sizing: border-box;
+	padding: 0 20rpx;
+}
+
+.tui-order-content {
+	width: 100%;
+	height: auto;
+}
+
+.tui-order-item {
+	display: flex;
+	flex-direction: column;
+	width: 100%;
+	padding: 20rpx 20rpx;
+	background: #fff;
+	margin-bottom: 24rpx;
+	border-radius: 8rpx;
+	position: relative;
+	.list-checked {
+		width: 80rpx;
+		height: 80rpx;
+		line-height: 80rpx;
+		text-align: center;
+		position: absolute;
+		right: 0;
+		top: 0;
+		.iconfont {
+			font-size: 38rpx;
+			color: $color-system;
+		}
+	}
+	.list-detail {
+		width: 70rpx;
+		height: 80rpx;
+		line-height: 80rpx;
+		text-align: center;
+		position: absolute;
+		right: 0;
+		bottom: 0;
+		.iconfont {
+			font-size: $font-size-32;
+			color: #999999;
+		}
+	}
+}
+.tui-prompt-flex {
+	width: 100%;
+	height: 70rpx;
+	display: flex;
+	margin-top: 20rpx;
+	.btn {
+		flex: 1;
+		line-height: 70rpx;
+		font-size: $font-size-26;
+		text-align: center;
+		color: #ffffff;
+		border-radius: 33rpx;
+		margin: 0 24rpx;
+		&.btn-cancel {
+			background: #f7f7f7;
+			color: #999999;
+		}
+		&.btn-confirm {
+			background: $color-system;
+		}
+	}
+}
+.tui-prompt-text {
+	line-height: 44rpx;
+	font-size: $font-size-26;
+	color: #333333;
+	.text {
+		color: $color-system;
+	}
+}
+</style>

+ 2 - 2
services/config.env.js

@@ -4,8 +4,8 @@ if(process.env.NODE_ENV === 'development'){
     // URL_CONFIG = 'http://192.168.2.67:18014'	 //智捷联调地址
     // URL_CONFIG = 'http://192.168.2.68:18014'	 //涛涛联调地址
     // URL_CONFIG = 'http://192.168.2.75:18014'	 //超超联调地址
-    URL_CONFIG = 'https://core-b.caimei365.com'
-    // URL_CONFIG = 'https://core.caimei365.com'
+    // URL_CONFIG = 'https://core-b.caimei365.com'
+    URL_CONFIG = 'https://core.caimei365.com'
 }else{
     // 生产环境
     // URL_CONFIG = 'https://core-b.caimei365.com'

+ 324 - 324
services/order.service.js

@@ -1,324 +1,324 @@
-/**
- * 这是与购物有关的业务逻辑的服务
- */
-export default class OrderService {
-    constructor(AjaxService) {
-        Object.assign(this, { AjaxService })
-        this.name = 'OrderService'
-    }
-    /**
-	 *识别收款短信
-	 * @param smsContent 短信内容
-	 * @param openid 微信openid
-    /**/
-    orderReceiptReadSms (data = {}) {
-        return this.AjaxService.post({ 
-            url:'/order/receipt/read/sms', 
-            data, 
-            isLoading: true ,
-            loadText: '识别中...'
-              
-        })
-    }
-    /**
-	 *获取收款账号
-	/**/
-    orderReceiptType (data = {}) {
-        return this.AjaxService.get({ 
-            url:'/order/receipt/type', 
-            data, 
-            isLoading: false ,
-        })
-    }
-    /**
-	 *获取收款详情的款项类型
-	/**/
-    orderReceiptDetailType (data = {}) {
-        return this.AjaxService.get({ 
-            url:'/order/receipt/detail/type', 
-            data, 
-            isLoading: false ,
-        })
-    }
-    /**
-	 *保存收款
-	 * @param smsContent 短信内容
-	 * @param payType 付款类型
-	 * @param receiptType 收款账号
-	 * @param receiptAmount 收款金额
-	 * @param handlingFee 手续费
-	 * @param receiptDate 收款时间
-	/**/
-    orderReceiptSave(data = {}) {
-        return this.AjaxService.post({ 
-            url:'/order/receipt/save', 
-            data, 
-            isLoading: true ,
-            loadText: '保存中...' 
-        })
-    }
-    /**
-	 *获取收款列表
-	 * @param startDate 筛选开始时间
-	 * @param endDate 筛选结束时间
-	 * @param pageNum 页码
-	 * @param pageSize 条数
-	 * @param receiptStatus 收款状态:0全部 1待确认、2已确认(待审核)、3审核通过、4审核未通过、5收款撤销【线上支付成功为审核通过】
-	 * @param receiptType 款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
-	 * @param smsContent 收款短信
-	/**/
-    orderReceiptList(data = {}) {
-        return this.AjaxService.get({ 
-            url:'/order/receipt/list', 
-            data, 
-            isLoading: false ,
-        })
-    }
-    /**
-	 *获取供应商退款收款详情
-	 * @param id 款项Id
-	/**/
-    orderReceiptRefundDetail(data = {}) {
-        return this.AjaxService.get({ 
-            url:'/order/receipt/refund', 
-            data, 
-            isLoading: false ,
-        })
-    }
-    /**
-	 *返佣收款详情
-	 * @param Id 款项Id
-	/**/
-    orderReceiptRebateDetails(data = {}) {
-	    return this.AjaxService.get({ 
-	        url:'/order/receipt/rebate', 
-	        data, 
-	        isLoading: false ,
-	    })
-    }
-    /**
-	 *获取收款详情
-	 * @param id 款项Id
-	/**/
-    orderReceiptDetail(data = {}) {
-        return this.AjaxService.get({ 
-            url:'/order/receipt/detail', 
-            data, 
-            isLoading: false ,
-        })
-    }
-    /**
-	 *获取收款详情分享
-	 * @param id 款项Id
-	/**/
-    orderReceiptShareDetail(data = {}) {
-        return this.AjaxService.get({ 
-            url:'/order/receipt/detail/share', 
-            data, 
-            isLoading: false ,
-        })
-    }
-    /**
-	 *操作收款信息(作废,设为返佣-普通-供应商退款-非订单款)
-	 * @param id 款项Id
-	 * @param openid 微信openid
-	/**/
-    orderReceiptOperate(data = {}) {
-        return this.AjaxService.post({ 
-            url:'/order/receipt/operate', 
-            data, 
-            isLoading: true ,
-            loadText: '请稍候...' 
-        })
-    }
-    /**
-	 *收款详情-订单列表
-	 * @param id 收款Id
-	 * @param keyword 搜索关键词(客户名称/订单号)
-	 * @param orderReceiptStatus 订单收款状态:1待收款(协销待确认款项的订单),2部分收款(已确认款项的订单),3已收款(已确认款项的订单)
-	 * @param organizeId 组织ID
-	 * @param pageNum 页码
-	 * @param pageSize 条数
-	 * @param type 0商品订单(默认),1订金订单
-	/**/
-    orderReceiptOrders(data = {}) {
-        return this.AjaxService.get({ 
-            url:'/order/receipt/detail/orders', 
-            data, 
-            isLoading: false
-        })
-    }
-    /**
-	 *收款详情-供应商退款-子订单列表
-	 * @param id 收款Id
-	 * @param confirmedType 0待确认,2已确认
-	 * @param shopName 供应商名称
-	 * @param pageNum 页码
-	 * @param pageSize 条数
-	/**/
-    orderReceiptRefundOrders(data = {}) {
-        return this.AjaxService.get({ 
-            url:'/order/receipt/refund/orders', 
-            data, 
-            isLoading: false
-        })
-    }
-    /**
-	 *关联普通款
-	 * @param id 收款Id
-	 * @param confirmType 确认订单类型:1小额抹平确认,2大额抹平确认,3大额退款余额,4确认关联
-	 * @param orderIds 订单Id
-	/**/
-    orderReceiptConfirm(data = {}) {
-        return this.AjaxService.post({ 
-            url:'/order/receipt/confirm', 
-            data, 
-            isLoading: true ,
-            loadText: '处理中...' 
-        })
-    }
-    /**
-	 *审核普通款项
-	 * @param id 收款Id
-	 * @param receiptStatus 收款状态:1待确认、2已确认(待审核)、3审核通过、4审核未通过、5收款撤销【线上支付成功为审核通过】
-	 * @param reviewReason 不通过说明
-	/**/
-    orderReceiptAudit(data = {}) {
-        return this.AjaxService.post({ 
-            url:'/order/receipt/audit', 
-            data, 
-            isLoading: true ,
-            loadText: '处理中...' 
-        })
-    }
-    /**
-	 *收款订单详情
-	 * @param orderId 订单Id
-	/**/
-    orderReceiptOrdersInfo(data = {}) {
-        return this.AjaxService.get({ 
-            url:'/order/receipt/detail/orders/info', 
-            data, 
-            isLoading: true 
-        })
-    }
-    /**
-	 *返佣关联子订单列表
-	 * @param id 收款Id
-	 * @param confirmedType 0待确认,2已确认子订单
-	 * @param keyword 搜索关键词(供应商名称/订单号)
-	 * @param pageNum 页码
-	 * @param pageSize 条数
-	/**/
-    orderReceiptRebateOrders(data = {}) {
-        return this.AjaxService.get({ 
-            url:'/order/receipt/rebate/orders', 
-            data, 
-            isLoading: false ,
-        })
-    }
-    /**
-	 *返佣关联
-	 * @param shopOrderId 子订单Id
-	/**/
-    orderReceiptConfirmRebate(data = {}) {
-	    return this.AjaxService.post({ 
-	        url:'/order/receipt/confirm/rebate', 
-	        data, 
-	        isLoading: true ,
-	        loadText: '处理中...' 
-	    })
-    }
-    /**
-	 *口头返佣关联
-	 * @param shopOrderId 子订单Id
-	 * @param verbalAmount 口头返佣佣金
-	 * @param rebateRemarks 备注
-	/**/
-    orderReceiptConfirmRebateVerbal(data = {}) {
-        return this.AjaxService.post({ 
-            url:'/order/receipt/confirm/rebate/verbal', 
-            data, 
-            isLoading: true ,
-            loadText: '处理中...' 
-        })
-    }
-    /**
-	 *平台服务费关联
-	 * @param Id 收款Id
-	 * @param shopOrderId 子订单Id
-	/**/
-    orderReceiptConfirmPlatform(data = {}) {
-	    return this.AjaxService.post({ 
-	        url:'/order/receipt/confirm/platform', 
-	        data, 
-	        isLoading: true ,
-	        loadText: '处理中...' 
-	    })
-    }
-    /**
-	 *平台服务费欠款关联
-	 * @param shopOrderId 子订单Id
-	 * @param verbalAmount 子订单平台服务费
-	/**/
-    orderReceiptConfirmBill(data = {}) {
-	    return this.AjaxService.post({ 
-	        url:'/order/receipt/confirm/bill', 
-	        data, 
-	        isLoading: true ,
-	        loadText: '处理中...' 
-	    })
-    }
-    /**
-	 *平台服务费关联子订单列表
-	 * @param id 收款Id
-	 * @param keyword 搜索关键词(供应商名称/订单号)
-	 * @param pageNum 页码
-	 * @param pageSize 条数
-	/**/
-    orderReceiptPlatformOrders(data = {}) {
-	    return this.AjaxService.get({ 
-	        url:'/order/receipt/platform/orders', 
-	        data, 
-	        isLoading: false ,
-	    })
-    }
-	
-    /**
-	 *关联供应商退款
-	 * @param Id 收款Id
-	 * @param shopOrderId 子订单Id
-	/**/
-    orderReceiptConfirmRefund(data = {}) {
-	    return this.AjaxService.post({ 
-	        url:'/order/receipt/confirm/refund', 
-	        data, 
-	        isLoading: true ,
-	        loadText: '处理中...' 
-	    })
-    }
-    /**
-	 *非订单关联查询供应商
-	 * @param keyWord 关键词
-	 * @param newReceiptType 查询供应商的类别 1上架费供应商  3认证通会员供应商  4认证通企划供应商
-	/**/
-    orderNoReceiptShopList(data = {}) {
-	    return this.AjaxService.get({ 
-	        url:'/order/receipt/shop', 
-	        data, 
-	        isLoading: true ,
-	    })
-    }
-    /**
-	 *非订单款关联订单列表
-	 * @param keyWord 关键词
-	/**/
-    orderNoReceiptShoporderList(data = {}) {
-	    return this.AjaxService.get({ 
-	        url:'/order/receipt/shoporder', 
-	        data, 
-	        isLoading: false ,
-	    })
-    }
-	
-}
+/**
+ * 这是与购物有关的业务逻辑的服务
+ */
+export default class OrderService {
+    constructor(AjaxService) {
+        Object.assign(this, { AjaxService })
+        this.name = 'OrderService'
+    }
+    /**
+	 *识别收款短信
+	 * @param smsContent 短信内容
+	 * @param openid 微信openid
+    /**/
+    orderReceiptReadSms (data = {}) {
+        return this.AjaxService.post({ 
+            url:'/order/receipt/read/sms', 
+            data, 
+            isLoading: true ,
+            loadText: '识别中...'
+              
+        })
+    }
+    /**
+	 *获取收款账号
+	/**/
+    orderReceiptType (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/receipt/type', 
+            data, 
+            isLoading: false ,
+        })
+    }
+    /**
+	 *获取收款详情的款项类型
+	/**/
+    orderReceiptDetailType (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/receipt/detail/type', 
+            data, 
+            isLoading: false ,
+        })
+    }
+    /**
+	 *保存收款
+	 * @param smsContent 短信内容
+	 * @param payType 付款类型
+	 * @param receiptType 收款账号
+	 * @param receiptAmount 收款金额
+	 * @param handlingFee 手续费
+	 * @param receiptDate 收款时间
+	/**/
+    orderReceiptSave(data = {}) {
+        return this.AjaxService.post({ 
+            url:'/order/receipt/save', 
+            data, 
+            isLoading: true ,
+            loadText: '保存中...' 
+        })
+    }
+    /**
+	 *获取收款列表
+	 * @param startDate 筛选开始时间
+	 * @param endDate 筛选结束时间
+	 * @param pageNum 页码
+	 * @param pageSize 条数
+	 * @param receiptStatus 收款状态:0全部 1待确认、2已确认(待审核)、3审核通过、4审核未通过、5收款撤销【线上支付成功为审核通过】
+	 * @param receiptType 款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
+	 * @param smsContent 收款短信
+	/**/
+    orderReceiptList(data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/receipt/list', 
+            data, 
+            isLoading: false ,
+        })
+    }
+    /**
+	 *获取供应商退款收款详情
+	 * @param id 款项Id
+	/**/
+    orderReceiptRefundDetail(data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/receipt/refund', 
+            data, 
+            isLoading: false ,
+        })
+    }
+    /**
+	 *返佣收款详情
+	 * @param Id 款项Id
+	/**/
+    orderReceiptRebateDetails(data = {}) {
+	    return this.AjaxService.get({ 
+	        url:'/order/receipt/rebate', 
+	        data, 
+	        isLoading: false ,
+	    })
+    }
+    /**
+	 *获取收款详情
+	 * @param id 款项Id
+	/**/
+    orderReceiptDetail(data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/receipt/detail', 
+            data, 
+            isLoading: false ,
+        })
+    }
+    /**
+	 *获取收款详情分享
+	 * @param id 款项Id
+	/**/
+    orderReceiptShareDetail(data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/receipt/detail/share', 
+            data, 
+            isLoading: false ,
+        })
+    }
+    /**
+	 *操作收款信息(作废,设为返佣-普通-供应商退款-非订单款)
+	 * @param id 款项Id
+	 * @param openid 微信openid
+	/**/
+    orderReceiptOperate(data = {}) {
+        return this.AjaxService.post({ 
+            url:'/order/receipt/operate', 
+            data, 
+            isLoading: true ,
+            loadText: '请稍候...' 
+        })
+    }
+    /**
+	 *收款详情-订单列表
+	 * @param id 收款Id
+	 * @param keyword 搜索关键词(客户名称/订单号)
+	 * @param orderReceiptStatus 订单收款状态:1待收款(服务商待确认款项的订单),2部分收款(已确认款项的订单),3已收款(已确认款项的订单)
+	 * @param organizeId 组织ID
+	 * @param pageNum 页码
+	 * @param pageSize 条数
+	 * @param type 0商品订单(默认),1订金订单
+	/**/
+    orderReceiptOrders(data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/receipt/detail/orders', 
+            data, 
+            isLoading: false
+        })
+    }
+    /**
+	 *收款详情-供应商退款-子订单列表
+	 * @param id 收款Id
+	 * @param confirmedType 0待确认,2已确认
+	 * @param shopName 供应商名称
+	 * @param pageNum 页码
+	 * @param pageSize 条数
+	/**/
+    orderReceiptRefundOrders(data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/receipt/refund/orders', 
+            data, 
+            isLoading: false
+        })
+    }
+    /**
+	 *关联普通款
+	 * @param id 收款Id
+	 * @param confirmType 确认订单类型:1小额抹平确认,2大额抹平确认,3大额退款余额,4确认关联
+	 * @param orderIds 订单Id
+	/**/
+    orderReceiptConfirm(data = {}) {
+        return this.AjaxService.post({ 
+            url:'/order/receipt/confirm', 
+            data, 
+            isLoading: true ,
+            loadText: '处理中...' 
+        })
+    }
+    /**
+	 *审核普通款项
+	 * @param id 收款Id
+	 * @param receiptStatus 收款状态:1待确认、2已确认(待审核)、3审核通过、4审核未通过、5收款撤销【线上支付成功为审核通过】
+	 * @param reviewReason 不通过说明
+	/**/
+    orderReceiptAudit(data = {}) {
+        return this.AjaxService.post({ 
+            url:'/order/receipt/audit', 
+            data, 
+            isLoading: true ,
+            loadText: '处理中...' 
+        })
+    }
+    /**
+	 *收款订单详情
+	 * @param orderId 订单Id
+	/**/
+    orderReceiptOrdersInfo(data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/receipt/detail/orders/info', 
+            data, 
+            isLoading: true 
+        })
+    }
+    /**
+	 *返佣关联子订单列表
+	 * @param id 收款Id
+	 * @param confirmedType 0待确认,2已确认子订单
+	 * @param keyword 搜索关键词(供应商名称/订单号)
+	 * @param pageNum 页码
+	 * @param pageSize 条数
+	/**/
+    orderReceiptRebateOrders(data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/receipt/rebate/orders', 
+            data, 
+            isLoading: false ,
+        })
+    }
+    /**
+	 *返佣关联
+	 * @param shopOrderId 子订单Id
+	/**/
+    orderReceiptConfirmRebate(data = {}) {
+	    return this.AjaxService.post({ 
+	        url:'/order/receipt/confirm/rebate', 
+	        data, 
+	        isLoading: true ,
+	        loadText: '处理中...' 
+	    })
+    }
+    /**
+	 *口头返佣关联
+	 * @param shopOrderId 子订单Id
+	 * @param verbalAmount 口头返佣佣金
+	 * @param rebateRemarks 备注
+	/**/
+    orderReceiptConfirmRebateVerbal(data = {}) {
+        return this.AjaxService.post({ 
+            url:'/order/receipt/confirm/rebate/verbal', 
+            data, 
+            isLoading: true ,
+            loadText: '处理中...' 
+        })
+    }
+    /**
+	 *平台服务费关联
+	 * @param Id 收款Id
+	 * @param shopOrderId 子订单Id
+	/**/
+    orderReceiptConfirmPlatform(data = {}) {
+	    return this.AjaxService.post({ 
+	        url:'/order/receipt/confirm/platform', 
+	        data, 
+	        isLoading: true ,
+	        loadText: '处理中...' 
+	    })
+    }
+    /**
+	 *平台服务费欠款关联
+	 * @param shopOrderId 子订单Id
+	 * @param verbalAmount 子订单平台服务费
+	/**/
+    orderReceiptConfirmBill(data = {}) {
+	    return this.AjaxService.post({ 
+	        url:'/order/receipt/confirm/bill', 
+	        data, 
+	        isLoading: true ,
+	        loadText: '处理中...' 
+	    })
+    }
+    /**
+	 *平台服务费关联子订单列表
+	 * @param id 收款Id
+	 * @param keyword 搜索关键词(供应商名称/订单号)
+	 * @param pageNum 页码
+	 * @param pageSize 条数
+	/**/
+    orderReceiptPlatformOrders(data = {}) {
+	    return this.AjaxService.get({ 
+	        url:'/order/receipt/platform/orders', 
+	        data, 
+	        isLoading: false ,
+	    })
+    }
+	
+    /**
+	 *关联供应商退款
+	 * @param Id 收款Id
+	 * @param shopOrderId 子订单Id
+	/**/
+    orderReceiptConfirmRefund(data = {}) {
+	    return this.AjaxService.post({ 
+	        url:'/order/receipt/confirm/refund', 
+	        data, 
+	        isLoading: true ,
+	        loadText: '处理中...' 
+	    })
+    }
+    /**
+	 *非订单关联查询供应商
+	 * @param keyWord 关键词
+	 * @param newReceiptType 查询供应商的类别 1上架费供应商  3认证通会员供应商  4认证通企划供应商
+	/**/
+    orderNoReceiptShopList(data = {}) {
+	    return this.AjaxService.get({ 
+	        url:'/order/receipt/shop', 
+	        data, 
+	        isLoading: true ,
+	    })
+    }
+    /**
+	 *非订单款关联订单列表
+	 * @param keyWord 关键词
+	/**/
+    orderNoReceiptShoporderList(data = {}) {
+	    return this.AjaxService.get({ 
+	        url:'/order/receipt/shoporder', 
+	        data, 
+	        isLoading: false ,
+	    })
+    }
+	
+}

+ 116 - 116
store/index.js

@@ -1,117 +1,117 @@
-import Vue from 'vue'
-import Vuex from 'vuex'
-import api from '../common/config/caimeiApi.js'
-import authorize from '../common/config/authorize.js'
-import {
-    defaultAllTabs,
-    defaultServiceTabs,
-    defaultReturnTabs,
-    defaultListTabsArr
-} from '../utils/config.tabs.js'
-
-Vue.use(Vuex)
-const handlebVisible = function(arr, val) {
-    return arr.some(item => item === val)
-}
-const store = new Vuex.Store({
-    state: {
-        isWxAuthorize: false,
-        hasLogin: false,
-        userInfo: {},
-        USER_TYPE: 4,
-        isIphoneX: false,
-        handleListTabs: [],
-        handlebBtnVisible: false, // 收款列表操作按钮显示控制
-        returnBtnVisible: false, // 收款列表口头返佣按钮显示控制
-        serviceBtnVisible: false, // 收款列表平台服务费按钮显示控制
-        examineBtnVisible: false, // 审核详情审核操作按钮显示控制
-    },
-    mutations: {
-        login(state, provider) {
-            //用户身份 1协销人员,2客服,3财务,4超级管理员
-            /**
-			 * @用户权限:permissions
-			 * @1录入收款,2收款列表操作,3关联订单款,4关联返佣款,5口头返佣,6关联供应商退款,7审核订单款
-			 * @8收款详情分享,9非订单款查看(全部),10订单款查看(全部),11返佣款查看(全部),12供应商退款查看(全部)
-			 * @13订单款查看(协销自己机构),14返佣款查看(协销自己机构),15供应商退款查看(协销自己机构) 
-			 * @20平台服务费
-			 **/
-            state.hasLogin = true
-            state.userInfo = provider
-            state.USER_TYPE = provider.userType
-            if (handlebVisible(provider.permissions, 4)) { // 控制口头返佣按钮显示
-                state.returnBtnVisible = true
-            }
-            if (handlebVisible(provider.permissions, 20)) { // 控制平台服务费按钮显示
-                state.serviceBtnVisible = true
-            }
-            if (handlebVisible(provider.permissions, 7)) { // 控制审核按钮显示
-                state.examineBtnVisible = true
-            }
-            if (handlebVisible(provider.permissions, 2)) { // 控制操作按钮显示
-                state.handlebBtnVisible = true
-            }
-            if (provider.tabMenus) {
-                const tabMenus = []
-                const tabMap = {
-				    1:'订单',
-				    2:'非订单',
-				    // 3:'返佣',
-				    5:'供应商退款',
-				    10:'平台服务费'
-                } 
-                provider.tabMenus.forEach(type => {
-                    if (type != 3) {
-                        tabMenus.push({name: tabMap[type], type: type }) 
-                    }
-                })
-                state.handleListTabs = tabMenus
-                console.log('handleListTabs', state.handleListTabs)
-            }
-            uni.setStorage({ //缓存用户登陆状态
-                key: 'userInfo',
-                data: provider
-            })
-        },
-        logout(state) {
-            state.hasLogin = false
-            state.userInfo = {}
-            uni.removeStorage({
-                key: 'userInfo'
-            })
-            uni.removeStorage({
-                key: 'token'
-            })
-        },
-        updateStatus(state, provider) {
-            let TIME = api.formatDate()
-            console.log(`${TIME}`, provider)
-            state.userInfo = provider
-            state.openid = provider.openid
-            uni.setStorage({ //缓存用户openid
-                key: 'openid',
-                data: provider.openid
-            })
-            uni.setStorage({ //缓存用户登陆状态
-                key: 'userInfo',
-                data: provider
-            })
-        },
-        setChangeVar(state, variable) {
-            state.isIphoneX = variable
-        },
-        setIsIphone(state, variable) { // 记录设备信息是否为IphoneX
-            state.isIphone = variable
-        }
-    },
-    actions: {
-        setVariableFun: function(context, vData) {
-            context.commit('setChangeVar', vData)
-        },
-        setIsIphoneFun: function(context, vData) {
-            context.commit('setIsIphone', vData)
-        },
-    }
-})
-
+import Vue from 'vue'
+import Vuex from 'vuex'
+import api from '../common/config/caimeiApi.js'
+import authorize from '../common/config/authorize.js'
+import {
+    defaultAllTabs,
+    defaultServiceTabs,
+    defaultReturnTabs,
+    defaultListTabsArr
+} from '../utils/config.tabs.js'
+
+Vue.use(Vuex)
+const handlebVisible = function(arr, val) {
+    return arr.some(item => item === val)
+}
+const store = new Vuex.Store({
+    state: {
+        isWxAuthorize: false,
+        hasLogin: false,
+        userInfo: {},
+        USER_TYPE: 4,
+        isIphoneX: false,
+        handleListTabs: [],
+        handlebBtnVisible: false, // 收款列表操作按钮显示控制
+        returnBtnVisible: false, // 收款列表口头返佣按钮显示控制
+        serviceBtnVisible: false, // 收款列表平台服务费按钮显示控制
+        examineBtnVisible: false, // 审核详情审核操作按钮显示控制
+    },
+    mutations: {
+        login(state, provider) {
+            //用户身份 1服务商人员,2客服,3财务,4超级管理员
+            /**
+			 * @用户权限:permissions
+			 * @1录入收款,2收款列表操作,3关联订单款,4关联返佣款,5口头返佣,6关联供应商退款,7审核订单款
+			 * @8收款详情分享,9非订单款查看(全部),10订单款查看(全部),11返佣款查看(全部),12供应商退款查看(全部)
+			 * @13订单款查看(服务商自己机构),14返佣款查看(服务商自己机构),15供应商退款查看(服务商自己机构) 
+			 * @20平台服务费
+			 **/
+            state.hasLogin = true
+            state.userInfo = provider
+            state.USER_TYPE = provider.userType
+            if (handlebVisible(provider.permissions, 4)) { // 控制口头返佣按钮显示
+                state.returnBtnVisible = true
+            }
+            if (handlebVisible(provider.permissions, 20)) { // 控制平台服务费按钮显示
+                state.serviceBtnVisible = true
+            }
+            if (handlebVisible(provider.permissions, 7)) { // 控制审核按钮显示
+                state.examineBtnVisible = true
+            }
+            if (handlebVisible(provider.permissions, 2)) { // 控制操作按钮显示
+                state.handlebBtnVisible = true
+            }
+            if (provider.tabMenus) {
+                const tabMenus = []
+                const tabMap = {
+				    1:'订单',
+				    2:'非订单',
+				    // 3:'返佣',
+				    5:'供应商退款',
+				    10:'平台服务费'
+                } 
+                provider.tabMenus.forEach(type => {
+                    if (type != 3) {
+                        tabMenus.push({name: tabMap[type], type: type }) 
+                    }
+                })
+                state.handleListTabs = tabMenus
+                console.log('handleListTabs', state.handleListTabs)
+            }
+            uni.setStorage({ //缓存用户登陆状态
+                key: 'userInfo',
+                data: provider
+            })
+        },
+        logout(state) {
+            state.hasLogin = false
+            state.userInfo = {}
+            uni.removeStorage({
+                key: 'userInfo'
+            })
+            uni.removeStorage({
+                key: 'token'
+            })
+        },
+        updateStatus(state, provider) {
+            let TIME = api.formatDate()
+            console.log(`${TIME}`, provider)
+            state.userInfo = provider
+            state.openid = provider.openid
+            uni.setStorage({ //缓存用户openid
+                key: 'openid',
+                data: provider.openid
+            })
+            uni.setStorage({ //缓存用户登陆状态
+                key: 'userInfo',
+                data: provider
+            })
+        },
+        setChangeVar(state, variable) {
+            state.isIphoneX = variable
+        },
+        setIsIphone(state, variable) { // 记录设备信息是否为IphoneX
+            state.isIphone = variable
+        }
+    },
+    actions: {
+        setVariableFun: function(context, vData) {
+            context.commit('setChangeVar', vData)
+        },
+        setIsIphoneFun: function(context, vData) {
+            context.commit('setIsIphone', vData)
+        },
+    }
+})
+
 export default store