Ver Fonte

收款工具

zhengjinyi há 3 anos atrás
pai
commit
78b80a9400

+ 0 - 2
App.vue

@@ -75,11 +75,9 @@
 				.then(response =>{
 					this.$store.commit('updateStatus',response.data)
 					this.login(response.data)
-					uni.setStorageSync('openid',response.data.openid)
 				})
 				.catch(error =>{
 					this.logout(error.data)
-					uni.setStorageSync('openid',error.data.openid)
 					this.$store.commit('updateStatus',error.data)
 					if(!this.hasLogin){
 						if(uni.getStorageSync('isActivitySwitch')){

+ 26 - 18
components/cm-module/orderDetails/list-button.vue

@@ -22,7 +22,7 @@
 export default {
 	name: 'button',
 	props: {
-		status: {
+		status: {//收款款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
 			type: Number
 		},
 		dataInfo: {
@@ -31,16 +31,17 @@ export default {
 	},
 	data() {
 		return {
-			payment:{},
+			receipt:{},
 			btnState: this.initStatus(),
-			mapStateArr: [{ label: 'isConfirm', val: [0], status: true }],
+			mapStateArr: [{ label: 'isConfirm', val: [1], status: true }],
 			souStateArr:[
 				{ 
 					type:1,
 					action:[
 						{ text: '作废',handleId:0},
-						{ text: '设为返佣款',handleId:2},
-						{ text: '设为供应商退款',handleId:3},
+						{ text: '设为非订单款',handleId:2},
+						{ text: '设为返佣款',handleId:3},
+						{ text: '设为供应商退款',handleId:4},
 					],
 				},
 				{ 
@@ -48,8 +49,8 @@ export default {
 					action:[
 						{ text: '作废',handleId:0},
 						{ text: '设为普通款',handleId:1},
-						{ text: '设为返佣款',handleId:2},
-						{ text: '设为供应商退款',handleId:3}
+						{ text: '设为返佣款',handleId:3},
+						{ text: '设为供应商退款',handleId:4}
 					],
 				},
 				{ 
@@ -57,15 +58,15 @@ export default {
 					action:[
 						{ text: '作废',handleId:0},
 						{ text: '设为普通款',handleId:1},
-						{ text: '设为供应商退款',handleId:3}
+						{ text: '设为供应商退款',handleId:4}
 					],
 				},
 				{ 
-					type:4,
+					type:5,
 					action:[
 						{ text: '作废',handleId:0},
 						{ text: '设为普通款',handleId:1},
-						{ text: '设为返佣款',handleId:2}
+						{ text: '设为返佣款',handleId:3}
 					],
 				},
 			],
@@ -79,7 +80,8 @@ export default {
 		}
 	},
 	created() {
-		this.initData(this.status,this.dataInfo)
+		this.initData(this.status)
+		this.initActionSheet(this.dataInfo)
 	},
 	computed: {},
 	watch: {
@@ -88,6 +90,12 @@ export default {
 				this.initData(val)
 			},
 			deep: true //对象内部的属性监听,也叫深度监听
+		},
+		dataInfo:{
+			handler: function(val) {
+				this.initActionSheet(val)
+			},
+			deep: true //对象内部的属性监听,也叫深度监听
 		}
 	},
 	methods: {
@@ -101,7 +109,7 @@ export default {
 			 * @(21,31)只显示分享
 			 * @(13,33)显示[确认收货]和[查看物流]
 			 */
-			this.payment = dataVal
+			this.receipt = dataVal
 			this.btnState = this.initStatus()
 			this.mapStateArr.forEach(el => {
 				el.val.forEach(value => {
@@ -110,11 +118,11 @@ export default {
 					}
 				})
 			})
-			this.initActionSheet(this.payment.sourceType)
 		},
 		initActionSheet(dataVal){
+			this.receipt = dataVal
 			this.souStateArr.forEach(el => {
-				if (dataVal === el.type) {
+				if (dataVal.receiptType === el.type) {
 					this.itemList = el.action
 				}
 			})
@@ -127,17 +135,17 @@ export default {
 		},
 		handleClickItem(data){
 			const handleAction = this.handleArrayReturn(data.index)
-			const payment ={
+			const receipt ={
 				handleAction:handleAction,
-				payment: this.payment
+				receipt: this.receipt
 			}
-			this.$emit('buttonConfirm',payment)
+			this.$emit('buttonConfirm',receipt)
 			this.showActionSheet = false
 		},
 		handleArrayReturn(data){// 处理操作后结果
 			let handleValue = {}
 			this.souStateArr.forEach(el => {
-				if(this.payment.sourceType === el.type){
+				if(this.receipt.receiptType === el.type){
 					el.action.forEach((value,index) => {
 						if (data === index) {
 							handleValue = value

+ 5 - 2
components/empty.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="empty-content">
+	<view class="empty-content" :style="{backgroundColor:backgroundColor}">
 		<image class="empty-content-image" :src="StaticUrl + '/icon/icon-remarks-empty@2x.png'" mode="aspectFit"></image>
 		<text class="error-text">{{EmptyText}}</text>
 	</view>
@@ -8,6 +8,10 @@
 <script>
 	export default {
 		props: {
+			backgroundColor:{
+				type: String,
+				default: '#F7F7F7'
+			},
 			src: {
 				type: String,
 				default: 'empty'
@@ -55,7 +59,6 @@
 		justify-content: center;
 		flex-direction: column;
 		margin: auto;
-		background: $bg-color;
 		height: 700rpx;
 		z-index: 999;
 		&-image {

+ 7 - 0
pages.json

@@ -7,6 +7,13 @@
 				"navigationStyle":"custom"
 			}
 		},
+		{
+			"path": "pages/login/login-share",
+			"style": {
+				"navigationBarTitleText": "",
+				"navigationStyle":"custom"
+			}
+		},
 		{
 			"path": "pages/collection/sms",
 			"style": {

+ 22 - 26
pages/collection/detail.vue

@@ -1,6 +1,5 @@
 <template>
 	<view class="container mine clearfix">
-		<!-- <cu-custom :navbar-data='nvabarData'  @navigateBack="hanldNavigateBack"></cu-custom> -->
 		<view class="tui-header-box first"
 			:style="{ height: isCmcustomClass == 'fiexd' ? CustomBar + 10 + 'px' : CustomBar + 30 + 'px' }"
 			:class="isCmcustomClass">
@@ -13,43 +12,40 @@
 		<view class="tui-header-box"
 			:style="{ height: CustomBar + 30 + 'px', backgroundImage: 'url(https://static.caimei365.com/app/crm/image/statistic_bg1.png)' }">
 		</view>
-		<view class="distinguish-section" :style="{ top: CustomBar + 'px', left: 0 + 'px' }">
+		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="7"></tui-skeleton>
+		<view class="distinguish-section" v-else :style="{ top: CustomBar + 'px', left: 0 + 'px' }">
 			<view class="distinguish-section-conten">
 				<view class="section-rows">
 					<view class="rows-label">收款金额:</view>
 					<view class="rows-mains">
-						<text>¥1000.00</text>
+						<text>¥{{ receipt.receiptAmount | NumFormat }}</text>
 					</view>
 				</view>
 				<view class="section-rows">
 					<view class="rows-label">收款类型:</view>
 					<view class="rows-mains">
-						<text>中信银行0897</text>
+						<text>{{ receipt.payTypeText }}</text>
 					</view>
 				</view>
 				<view class="section-rows">
 					<view class="rows-label">收款时间:</view>
 					<view class="rows-mains">
-						<text>2021-05-29 14:42:00</text>
+						<text>{{ receipt.receiptDate }}</text>
 					</view>
 				</view>
 				<view class="section-rows">
 					<view class="rows-label">手续费:</view>
 					<view class="rows-mains">
-						<text>¥1000.00</text>
+						<text>¥{{ receipt.handlingFee ? (receipt.handlingFee | NumFormat) : '0.00' }}</text>
 					</view>
 				</view>
 				<view class="section-title">收款短信</view>
 				<view class="section-textarea msg">
-					<view class="textarea">【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币9901.00元,当前余额***元。</view>
-				</view>
-				<view class="section-title">收款备注</view>
-				<view class="section-textarea">
-					<view class="textarea">请输入收款备注请输入收款备注请输入收款备注请输入收款备注请输入收款备注请输入收款备注请输入收款备注请输入收款备注请输入收款备注</view>
+					<view class="textarea">{{ receipt.smsContent ? receipt.smsContent : '无' }}</view>
 				</view>
 			</view>
 			<view class="distinguish-button">
-				<button class="button" open-type="share" :data-payment="payment">分享</button>
+				<button class="button" open-type="share" :data-receipt="receipt">分享</button>
 			</view> 
 		</view>
 	</view>
@@ -64,7 +60,7 @@
 	export default {
 		data() {
 			return {
-				payment:{},
+				receipt:{},
 				payDetailsId:0,
 				nvabarData: {
 					//顶部自定义导航
@@ -93,12 +89,16 @@
 				],
 				isCmcustomClass: 'left',
 				CustomBar: this.CustomBar, // 顶部导航栏高度
+				skeletonShow:true,
 				height: 64, //header高度
 				top: 0, //标题图标距离顶部距离
 				scrollH: 0, //滚动总高度
 				opcity: 1,
 			}
 		},
+		computed: {
+			...mapState(['hasLogin'])
+		},
 		onLoad(option) {
 			let obj = {}
 			// #ifdef MP-WEIXIN
@@ -127,15 +127,13 @@
 				return Number(text).toFixed(2)
 			}
 		},
-		computed: {
-			...mapState(['hasLogin', 'openid'])
-		},
 		methods: {
 			getOrderReceiptDetail(id){
 				// 收款详情
-				this.OrderService.orderReceiptDetail({ id : id , openid :'oL3JP4-dOMlrax1aRMC-SDSlUdNE' })
+				this.OrderService.orderReceiptDetail({ id : id})
 					.then(response => {
-						console.log('response',response)
+						this.receipt = response.data
+						this.skeletonShow = false
 					})
 					.catch(err => {
 						this.$util.msg(err.msg, 2000)
@@ -157,22 +155,20 @@
 			}, 200)
 		},
 		onShareAppMessage(res) {
-			//分享购买优惠券
-			const payment = res.target.dataset.payment
-			console.log('payment', payment)
+			//分享收款详情
+			const receipt = res.target.dataset.receipt
+			console.log('receipt', receipt)
 			if (res.from === 'button') {
 				// console.log('来自页面内转发按钮')
 				return {
-					title: `【待确认】收款金额${payment.receiptAmount.toFixed(2)}元,收款时间:${payment.receiptDate}`,
-					path: `pages/seller/cart/coupon-share?payment=${payment.id}`,
+					title: `【待确认】收款金额${receipt.receiptAmount.toFixed(2)}元,收款时间:${receipt.receiptDate}`,
+					path: `/pages/login/login-share?id=${receipt.id}&receiptType=${receipt.receiptType}`,
 					imageUrl: 'https://static.caimei365.com/app/img/icon/icon-shareCoupon@2x.png'
 				}
 			}
 		},
 		onShow() {
-			if (this.hasLogin) {
-				this.GetDataInfo()
-			}
+			
 		}
 	}
 </script>

Diff do ficheiro suprimidas por serem muito extensas
+ 253 - 456
pages/collection/list.vue


+ 4 - 9
pages/collection/sms.vue

@@ -176,8 +176,6 @@
 	</view>
 </template>
 <script>
-import statistic_bg2 from '@/static/temp/statistic_bg2.png'
-import statistic_bg1 from '@/static/temp/statistic_bg1.png'
 import wxLogin from '@/services/wxLogin.js'
 import { mapState, mapMutations } from 'vuex'
 const defaultParams = {
@@ -206,8 +204,6 @@ export default {
 			receiptType: 1, //收款方式 1 短信收款 2 无短信收款
 			infoData: {},
 			isCmcustomClass: 'left',
-			statistic_bg: statistic_bg2,
-			statistic_bg1: statistic_bg1,
 			CustomBar: this.CustomBar, // 顶部导航栏高度
 			height: 64, //header高度
 			top: 0, //标题图标距离顶部距离
@@ -243,10 +239,9 @@ export default {
 			banksTypeText: '', // 款项类型显示文案
 			params: {
 				smsContent:
-					'【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。', // 收款短信
+					'【中信银行】您尾号0897的中信卡于02月22日14:42,二代支付存入人民币10000.00元,当前余额为人民币100000.67元。', // 收款短信
 				payType: null, //付款类型
 				receiptType: 1, // 收款款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
-				openid: null, // 微信openid
 				receiptAmount: '', //收款金额
 				handlingFee: '', //手续费
 				receiptDate: null // 收款时间
@@ -287,7 +282,7 @@ export default {
 		}
 	},
 	computed: {
-		...mapState(['openid']),
+		...mapState(['hasLogin']),
 		disabled: function() {
 			let bool = true
 			if (this.receiptType == 1) {
@@ -332,10 +327,10 @@ export default {
 		},
 		orderReceiptReadSms() {
 			// 识别收款短信
-			this.params.openid = this.openid
-			this.OrderService.orderReceiptReadSms(this.params)
+			this.OrderService.orderReceiptReadSms({smsContent:this.params.smsContent,openid:this.openid})
 				.then(response => {
 					const data = response.data
+					this.params.openid = this.openid
 					this.params.payType = data.payType
 					this.params.receiptAmount = data.receiptAmount
 					this.params.receiptDate = data.receiptDate

+ 0 - 2
pages/login/login-account.vue

@@ -105,7 +105,6 @@ export default {
 				let data  = response.data
 				this.login(response.data)
 				this.$store.commit('updateStatus',response.data)
-				uni.setStorageSync('openid',response.data.openid)
 				setTimeout(()=>{
 					this.navigateLink(response.data.userType)
 				},500)
@@ -124,7 +123,6 @@ export default {
 			this.UserService.UserLoginReceiptPassword(this.param).then(response =>{
 				this.login(response.data)
 				this.$store.commit('updateStatus',response.data)
-				uni.setStorageSync('openid',response.data.openid)
 				this.navigateLink(response.data.userType)
 			}).catch(err =>{
 				this.$util.msg(err.msg,2000)

+ 143 - 0
pages/login/login-share.vue

@@ -0,0 +1,143 @@
+<template>
+	<view class="container">
+		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="7"></tui-skeleton>
+		<template v-else>
+			<view class="share-empty">
+				<view class="icon"><image :src="imagePath" mode="widthFix"></image></view>
+				<view class="text">暂无权限查看</view>
+			</view>
+		</template>
+	</view>
+</template>
+
+<script>
+import { mapMutations } from 'vuex'
+import authorize from '@/common/config/authorize.js' 
+export default {
+	computed: {
+		
+	},
+	data() {
+		return {
+			CustomBar:this.CustomBar,// 顶部导航栏高度
+			imagePath:'https://static.caimei365.com/app/img/icon/icon-noremb.png',
+			skeletonShow:true,
+			receiptId:0,
+			receiptType:1// 收款款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
+		} 
+	},
+	onLoad(options) {
+		this.receiptId = option.id
+		this.receiptType = option.receiptType
+	},
+	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.login(response.data)
+				this.$store.commit('updateStatus',response.data)
+				setTimeout(()=>{
+					this.navigateLink(response.data)
+				},500)
+			}).catch(error =>{
+				this.logout()
+				this.skeletonShow = false
+				this.$store.commit('updateStatus',error.data)
+			})
+		},
+		navigateLink(data){// 根据用户权限跳转对应页面
+			/**
+			 * 用户类型(userType) 1协销人员,2客服,3财务,4超级管理员
+			 * 1. 协销人员跳转到收款列表页面
+			 * 2. 客服跳转到收款列表页面
+			 * 3. 财务人员跳转到款项识别页面
+			 * 4. 超级管理员跳转到款项识别页面
+			 * */
+			 switch(data.userType){
+				 case 1:// 协销
+					this.receiptTypeJump()
+					break
+				 case 2:// 客服
+					this.receiptTypeJump()
+					break
+				 case 3:// 财务
+					this.receiptTypeJump()
+					break
+				 case 4:// 超级管理员
+					this.receiptTypeJump()
+					break
+			 }
+		},
+		receiptTypeJump(){//跳转URL 收款款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
+			switch(this.receiptType){
+				case 1:// 订单款
+					this.$api.navigateTo(`/pages/relation/ordinary/index?id=${this.receiptId}`)
+					break
+				case 2:// 非订单款
+					this.$api.navigateTo(`/pages/relation/nonorder/detail?id=${this.receiptId}`)
+					break
+				case 3:// 返佣款
+					this.$api.navigateTo(`/pages/relation/return/index?id=${this.receiptId}`)
+					break
+				case 4:// 订单款或者非订单款
+					this.$api.navigateTo(`/pages/relation/ordinary/index?id=${this.receiptId}`)
+					break
+				case 5:// 供应商退款管理权限
+					this.$api.navigateTo(`/pages/relation/refund/index?id=${this.receiptId}`)
+					break
+			}
+		},
+		permissionNav(data){
+			/**
+			 * 用户权限(permission) 1录入收款权限,2收款确认权限,3收款审核权限 4返佣管理权限 5供应商退款管理权限
+			 * 1. 
+			 * 2. 
+			 * 3. 
+			 * 4.
+			 * 5.
+			 * */
+		}
+	},
+	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: 260rpx;
+			height: 260rpx;
+			image{
+				width: 100%;
+				height: 100%;
+				display: block;
+			}
+		}
+		.text{
+			font-size: $font-size-28;
+			line-height: 60rpx;
+			color: $color-system;
+			text-align: center;
+		}
+	}
+}
+</style>

+ 180 - 389
pages/relation/ordinary/index.vue

@@ -16,45 +16,56 @@
 				<view class="tui-header-top">
 					<view class="title"> 收款信息 </view>
 					<view class="tui-header-button">
-						<view class="button btn-confirm" @click.stop="btnConfirm"> 设为非订单款项 </view>
+						<!-- <view class="button btn-confirm" @click.stop="btnConfirm"> 设为非订单款项 </view> -->
 					</view>
 				</view>
 				<view class="tui-header-item">
 					<view class="list-title-t">
 						<view class="list-title-tip">
-							<text class="badges">{{ paymentInfo.sourceType | formatSourceType }}</text>
+							<text class="badges">{{ receiptInfo.receiptType | formatSourceType }}</text>
 						</view>
-						<view class="list-title-num" :style="{ color: formatColor(paymentInfo.confirmType) }">{{
-							paymentInfo.confirmType | formatStateType
+						<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">¥{{ paymentInfo.receiptAmount | NumFormat }} </text>
+						<view class="list-title-b-item ">
+							收款金额:<text class="text">¥{{ receiptInfo.receiptAmount | NumFormat }} </text>
 						</view>
-						<view class="list-title-b-item "> 
-							收款类型:<text class="text">{{ paymentInfo.payType }}</text>
+						<view class="list-title-b-item ">
+							收款类型:<text class="text">{{ receiptInfo.payTypeText }}</text>
 						</view>
 					</view>
 					<view class="list-title-b">
-						收款时间:<text class="text">{{ paymentInfo.receiptDate }}</text>
+						收款时间:<text class="text">{{ receiptInfo.receiptDate }}</text>
 					</view>
-					<template v-if="paymentInfo.smsContent">
+					<template v-if="receiptInfo.smsContent">
 						<view class="list-title-b">收款短信:</view>
 						<view class="list-title-b sms">
-							<text class="text">{{ paymentInfo.smsContent }}</text>
+							<text class="text">{{ receiptInfo.smsContent }}</text>
 						</view>
 					</template>
-					<view class="list-icon">无人确认</view>
+					<view class="list-icon" v-if="receiptInfo.tipMsg">{{ receiptInfo.tipMsg }}</view>
 				</view>
 			</view>
 			<view class="tui-header-tabmain">
 				<input
+					v-if="currents == 3"
 					class="input"
 					type="text"
+					v-model="listQuery.keyword"
 					confirm-type="search"
 					@confirm="subMitSearch()"
-					placeholder="请输入供应商名称"
+					placeholder="搜索关键词(供应商名称)"
+				/>
+				<input
+					v-else
+					class="input"
+					type="text"
+					v-model="listQuery.keyword"
+					confirm-type="search"
+					@confirm="subMitSearch()"
+					placeholder="搜索关键词(客户名称/订单号)"
 				/>
 				<text class="iconfont icon-sousuo"></text>
 			</view>
@@ -95,63 +106,72 @@
 					<empty v-if="isEmpty" :typeIndex="currents" :navbarHeight="navbarHeight"></empty>
 					<!-- 列表 -->
 					<view v-else class="tui-order-content">
-						<view
-							class="tui-order-item"
-							v-for="(payment, payIndex) in payList"
-							:key="payIndex"
-							@click.stop="orderDetail(payment.id)"
-						>
-							<view class="list-title">
+						<view class="tui-order-item" v-for="(order, payIndex) in payList" :key="payIndex">
+							<view class="list-title" @click.stop="orderDetail(order.id)">
 								<view class="list-title-t">
 									<view class="list-title-tip">
-										<text class="badges">{{ payment.orderType | formatOrderType }}</text>
+										<text class="badges">{{ order.orderType | formatOrderType }}</text>
 									</view>
-									<view class="list-title-num">{{ payment.confirmType | StateExpFormat }}</view>
+									<view class="list-title-num">{{ order.confirmType | StateExpFormat }}</view>
 								</view>
 								<view class="list-title-b">
-									客户名称:<text class="text">{{ payment.userName }}</text>
+									客户名称:<text class="text">{{ order.userName }}</text>
 								</view>
 								<view class="list-title-b">
-									订单编号:<text class="text">{{ payment.number }} ( {{ payment.id }} )</text>
+									订单编号:<text class="text">{{ order.orderNo }} ( {{ order.orderId }} )</text>
 								</view>
 								<view class="list-title-b">
-									下单日期:<text class="text">{{ payment.receiptDate }}</text>
+									下单日期:<text class="text">{{ order.orderTime }}</text>
 								</view>
 								<view class="list-title-b">
 									<view class="list-title-b-item ">
-										订单金额:<text class="text">¥{{ payment.receiptAmount | NumFormat }}</text>
+										订单金额:<text class="text">¥{{ order.payTotalFee | NumFormat }}</text>
 									</view>
 									<view class="list-title-b-item ">
-										余额抵扣:<text class="text">¥{{ payment.receiptAmount | NumFormat }}</text>
+										余额抵扣:<text class="text">¥{{ order.balancePayFee | NumFormat }}</text>
 									</view>
 								</view>
 								<view class="list-title-b">
-									经理折扣:<text class="text">¥{{ payment.receiptAmount }}</text>
+									经理折扣:
+									<text class="text" v-if="order.discountFee - order.returnedPurchaseFee > 0">
+										¥{{ order.discountFee - order.returnedPurchaseFee }}
+										<text>
+											(原¥{{ order.discountFee }} 折扣取消¥{{
+												order.discountFee - order.returnedPurchaseFee > 0
+													? order.returnedPurchaseFee
+													: order.discountFee
+											}})
+										</text>
+									</text>
+									<text v-else>¥0.00(原¥0.00折扣取消¥0.00)</text>
+								</view>
+								<view class="list-title-b">
+									退货退款: <text class="text">¥{{ order.receiptAmount }}</text>
 								</view>
 								<view class="list-title-b">
 									<view class="list-title-b-item ">
-										应收金额:<text class="text">¥{{ payment.receiptAmount | NumFormat }}</text>
+										应收金额:<text class="text">¥{{ order.payableAmount | NumFormat }}</text>
 									</view>
 									<view class="list-title-b-item ">
-										已收金额:<text class="text">¥{{ payment.receiptAmount | NumFormat }}</text>
+										已收金额:<text class="text">¥{{ order.paidAmount | NumFormat }}</text>
 									</view>
 								</view>
 								<view class="list-title-b">
 									<view class="list-title-b-item ">
-										剩余应收:<text class="text">¥{{ payment.receiptAmount | NumFormat }}</text>
+										剩余应收:<text class="text">¥{{ order.surplusAmount | NumFormat }}</text>
 									</view>
 									<view class="list-title-b-item ">
-										待审金额:<text class="text">¥{{ payment.receiptAmount | NumFormat }}</text>
+										待审金额:<text class="text">¥{{ order.receiptAmount | NumFormat }}</text>
 									</view>
 								</view>
 							</view>
-							<view class="list-checked" @click="checkedOrder(payment)">
+							<view class="list-checked" @click="checkedOrder(order)">
 								<text
 									class="iconfont"
-									:class="payment.isChecked ? 'icon-yixuanze' : 'icon-weixuanze'"
+									:class="order.isChecked ? 'icon-yixuanze' : 'icon-weixuanze'"
 								></text>
 							</view>
-							<view class="list-detail" @click="handelDetail(payment)">
+							<view class="list-detail" @click="orderDetail(order.id)">
 								<text class="iconfont icon-xiayibu"></text>
 							</view>
 						</view>
@@ -166,49 +186,6 @@
 		<view class="distinguish-button" :style="{ paddingBottom: isIphoneX ? '68rpx' : '24rpx' }">
 			<view class="button" @click="confirmDistinguish">确认</view>
 		</view>
-		<!--右抽屉-->
-		<tui-drawer mode="right" :visible="rightDrawer" @close="closeDrawer">
-			<view class="d-container clearfix" :style="{ paddingTop: CustomBar + 10 + 'px' }">
-				<view class="drawer-main">
-					<view class="drawer-main-name">日期</view>
-					<view class="drawer-main-time">
-						<view class="drawer-main-time-input">
-							<picker
-								mode="date"
-								:value="date"
-								:start="startDate"
-								:end="endDate"
-								@change="bindStartDateChange"
-							>
-								<text class="input-text">{{ queryData.startAddTime }}</text>
-							</picker>
-							<text class="iconfont icon-riqi"></text>
-						</view>
-						<view class="line">-</view>
-						<view class="drawer-main-time-input">
-							<picker
-								mode="date"
-								:value="date"
-								:start="startDate"
-								:end="endDate"
-								@change="bindEndDateChange"
-							>
-								<text class="input-text">{{ queryData.endAddTime }}</text>
-							</picker>
-							<text class="iconfont icon-riqi"></text>
-						</view>
-					</view>
-					<view class="drawer-main-name">收款短信(全匹配)</view>
-					<view class="drawer-main-textarea">
-						<textarea class="textarea" placeholder="请输入收款备注..." v-model="params.remarks" />
-					</view>
-				</view>
-				<view class="drawer-input btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
-					<view class="drawer-btn clear" @click="closeDrawer">取消</view>
-					<view class="drawer-btn comfrim" @click="handSearchConfirm">确定</view>
-				</view>
-			</view>
-		</tui-drawer>
 		<!-- 弹窗 -->
 		<tui-modal
 			:show="modal"
@@ -229,40 +206,23 @@ import empty from '@/components/empty'
 import wxLogin from '@/services/wxLogin.js'
 import { mapState, mapMutations } from 'vuex'
 const defaultListQuery = {
-	pageNum: 1, //页数
-	pageSize: 10, //条数
-	orderNum: '',
-	phone: '',
-	date: '', //订单提交时间
-	classification: '', //订单分类
-	merchantId: 0,
-	source: '' //订单来源
+	id: 0, //收款Id
+	keyword: '', // 搜索关键词(客户名称/订单号)
+	orderReceiptStatus: '1', //订单收款状态:1待收款(协销待确认款项的订单),2部分收款(已确认款项的订单),3已收款(已确认款项的订单)
+	organizeId: 0, // 组织ID
+	pageNum: 1, // 页码
+	pageSize: 10, // 条数
+	type: 0 // 0商品订单(默认),1订金订单
 }
 export default {
 	components: {
 		empty
 	},
 	data() {
-		const currentDate = this.getDate({
-			format: true
-		})
 		return {
 			CustomBar: this.CustomBar, // 顶部导航栏高度
 			isIphoneX: this.$store.state.isIphoneX,
-			paymentInfo: {
-				id: 6090,
-				receiptAmount: 5000, //收款金额
-				associateAmount: 5000, //关联金额
-				payType: '广发银行-0115', //收款类型
-				receiptDate: '2022-02-15 10:58:25', // 收款时间
-				reviewDate: '2022-02-15 10:58:25', // 审核时间
-				smsContent:
-					'【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。',
-				confirmType: 0,
-				userName: '采美网络信息有限公司',
-				sourceType: 1,
-				state: 1
-			},
+			receiptInfo: {},
 			listTabs: [
 				{
 					name: '商品订单',
@@ -291,206 +251,30 @@ export default {
 					type: 3
 				}
 			],
-			queryData: {
-				startAddTime: '',
-				endAddTime: ''
-			},
-			date: currentDate,
-			listCount: {
-				toBeClosed: 0,
-				toBeDelivered: 0,
-				toBePaid: 0,
-				toBeReceived: 0,
-				toBeSuccess: 0
-			},
+			listQuery: Object.assign({}, defaultListQuery),
 			currents: 0,
 			tabCurrents: 0,
-			userID: 0,
-			openId: '',
-			listQuery: Object.assign({}, defaultListQuery),
-			payList: [
-				{
-					id: 6090,
-					number: 'W164488903271223',
-					receiptAmount: 5000, //收款金额
-					associateAmount: 5000, //关联金额
-					orderType: 1, //收款类型
-					receiptDate: '2022-02-15 10:58:25', // 收款时间
-					reviewDate: '2022-02-15 10:58:25', // 审核时间
-					smsContent:
-						'【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。',
-					confirmType: 11,
-					userName: '采美网络信息有限公司',
-					sourceType: 1,
-					state: 1,
-					isChecked: false
-				},
-				{
-					id: 6090,
-					number: 'W164488903271223',
-					receiptAmount: 5000, //收款金额
-					associateAmount: 5000, //关联金额
-					orderType: 1, //收款类型
-					receiptDate: '2022-02-15 10:58:25', // 收款时间
-					reviewDate: '2022-02-15 10:58:25', // 审核时间
-					smsContent:
-						'【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。',
-					confirmType: 11,
-					userName: '采美网络信息有限公司',
-					sourceType: 2,
-					state: 1,
-					isChecked: false
-				},
-				{
-					id: 6092,
-					number: 'W164488903271223',
-					receiptAmount: 5000, //收款金额
-					associateAmount: 5000, //关联金额
-					orderType: 2, //收款类型
-					receiptDate: '2022-02-15 10:58:25', // 收款时间
-					reviewDate: '2022-02-15 10:58:25', // 审核时间
-					smsContent:
-						'【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。',
-					confirmType: 11,
-					userName: '采美网络信息有限公司',
-					sourceType: 3,
-					state: 2,
-					isChecked: false
-				},
-				{
-					id: 6092,
-					number: 'W164488903271223',
-					receiptAmount: 5000, //收款金额
-					associateAmount: 5000, //关联金额
-					orderType: 2, //收款类型
-					receiptDate: '2022-02-15 10:58:25', // 收款时间
-					reviewDate: '2022-02-15 10:58:25', // 审核时间
-					smsContent:
-						'【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。',
-					confirmType: 11,
-					userName: '采美网络信息有限公司',
-					sourceType: 3,
-					state: 2,
-					isChecked: false
-				},
-				{
-					id: 6092,
-					number: 'W164488903271223',
-					receiptAmount: 5000, //收款金额
-					associateAmount: 5000, //关联金额
-					orderType: 2, //收款类型
-					receiptDate: '2022-02-15 10:58:25', // 收款时间
-					reviewDate: '2022-02-15 10:58:25', // 审核时间
-					smsContent:
-						'【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。',
-					confirmType: 11,
-					userName: '采美网络信息有限公司',
-					sourceType: 3,
-					state: 2,
-					isChecked: false
-				},
-				{
-					id: 6092,
-					number: 'W164488903271223',
-					receiptAmount: 5000, //收款金额
-					associateAmount: 5000, //关联金额
-					orderType: 2, //收款类型
-					receiptDate: '2022-02-15 10:58:25', // 收款时间
-					reviewDate: '2022-02-15 10:58:25', // 审核时间
-					smsContent:
-						'【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。',
-					confirmType: 11,
-					userName: '采美网络信息有限公司',
-					sourceType: 3,
-					state: 2,
-					isChecked: false
-				},
-				{
-					id: 6092,
-					number: 'W164488903271223',
-					receiptAmount: 5000, //收款金额
-					associateAmount: 5000, //关联金额
-					orderType: 2, //收款类型
-					receiptDate: '2022-02-15 10:58:25', // 收款时间
-					reviewDate: '2022-02-15 10:58:25', // 审核时间
-					smsContent:
-						'【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。',
-					confirmType: 11,
-					userName: '采美网络信息有限公司',
-					sourceType: 3,
-					state: 2,
-					isChecked: false
-				},
-				{
-					id: 6092,
-					number: 'W164488903271223',
-					receiptAmount: 5000, //收款金额
-					associateAmount: 5000, //关联金额
-					orderType: 2, //收款类型
-					receiptDate: '2022-02-15 10:58:25', // 收款时间
-					reviewDate: '2022-02-15 10:58:25', // 审核时间
-					smsContent:
-						'【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。',
-					confirmType: 11,
-					userName: '采美网络信息有限公司',
-					sourceType: 3,
-					state: 2,
-					isChecked: false
-				},
-				{
-					id: 6092,
-					number: 'W164488903271223',
-					receiptAmount: 5000, //收款金额
-					associateAmount: 5000, //关联金额
-					orderType: 3, //收款类型
-					receiptDate: '2022-02-15 10:58:25', // 收款时间
-					reviewDate: '2022-02-15 10:58:25', // 审核时间
-					smsContent:
-						'【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。',
-					confirmType: 11,
-					userName: '采美网络信息有限公司',
-					sourceType: 4,
-					state: 2,
-					isChecked: false
-				}
-			],
-			btnoRderID: 0, //点击按钮传入的的订单ID
+			payList: [],
 			scrollTop: 0,
-			deteleType: '',
-			skeletonShow: true,
 			isEmpty: false,
-			isDelete: false,
-			isModalLayer: false,
 			loadding: false,
 			pullUpOn: true,
-			total: 0,
+			hasNextPage: false,
 			pullFlag: true,
 			navbarHeight: '',
 			nomoreText: '上拉显示更多',
 			contentModalText: '', //操作文字提示语句
 			modal: false,
-			rightDrawer: false,
 			hanldOrder: '', //储存监听订单信息
 			OperationType: '', //操作类型
 			isCmcustomClass: 'left',
-			isShowHeader:false,
+			isShowHeader: false,
 			height: 64, //header高度
 			top: 0, //标题图标距离顶部距离
 			scrollH: 0, //滚动总高度
 			opcity: 1
 		}
 	},
-	onLoad() {
-		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
-			}
-		})
-	},
 	filters: {
 		StateExpFormat(state) {
 			//订单状态文字和颜色
@@ -521,6 +305,7 @@ export default {
 			return HtmlStateText
 		},
 		formatSourceType(value) {
+			// 款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
 			switch (value) {
 				case 1:
 					return '订单'
@@ -532,24 +317,31 @@ export default {
 					return '返佣'
 					break
 				case 4:
+					return '订单款或者非订单款'
+					break
+				case 5:
 					return '供应商退款'
 					break
 			}
 		},
 		formatStateType(value) {
+			// 收款状态: 1待确认、2已确认(待审核)、3审核通过、4审核未通过、5收款撤销【线上支付成功为审核通过】
 			switch (value) {
-				case 0:
-					return '待确认'
-					break
 				case 1:
-					return '确认'
+					return '待确认'
 					break
 				case 2:
-					return '待审核'
+					return '已确认'
 					break
 				case 3:
 					return '审核通过'
 					break
+				case 4:
+					return '审核未通过'
+					break
+				case 5:
+					return '收款撤销'
+					break
 			}
 		},
 		formatOrderType(value) {
@@ -557,117 +349,119 @@ export default {
 				case 1:
 					return '自主订单'
 					break
-				case 2:
+				case 0:
 					return '协销订单'
 					break
-				case 3:
+				case 2:
 					return '客服订单'
 					break
 			}
 		},
-		NumFormat: function(text) {
+		NumFormat(value) {
 			//处理金额
-			return Number(text).toFixed(2)
+			if (value) {
+				Number(value).toFixed(2)
+			} else {
+				return '0.00'
+			}
 		}
 	},
+	onLoad(option) {
+		console.log('option', 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
+			}
+		})
+		this.listQuery.id = option.id
+		this.getOrderReceiptDetail(this.listQuery.id)
+	},
 	computed: {
-		...mapState(['hasLogin', 'userInfo']),
-		startDate() {
-			return this.getDate('start')
-		},
-		endDate() {
-			return this.getDate('end')
-		}
+		...mapState(['hasLogin'])
 	},
 	methods: {
-		getDate(type) {
-			const date = new Date()
-			let year = date.getFullYear()
-			let month = date.getMonth() + 1
-			let day = date.getDate()
-			if (type === 'start') {
-				year = year - 1
-			} else if (type === 'end') {
-				year = year + 1
-			}
-			month = month > 9 ? month : '0' + month
-			day = day > 9 ? day : '0' + day
-			return `${year}-${month}-${day}`
-		},
-		bindStartDateChange(event) {
-			//开始时间
-			console.log('开始时间==>', event.detail.value)
-			this.queryData.startAddTime = event.detail.value
-		},
-		bindEndDateChange(event) {
-			//结束时间
-			console.log('结束时间==>', event.detail.value)
-			this.queryData.endAddTime = event.detail.value
+		getOrderReceiptDetail(id) {
+			// 收款详情
+			this.OrderService.orderReceiptDetail({ id: id })
+				.then(response => {
+					this.receiptInfo = response.data
+					this.getOrderReceiptOrders()
+				})
+				.catch(err => {
+					this.$util.msg(err.msg, 2000)
+				})
 		},
-		getOrderDatainit(index) {
-			this.listQuery.pageNum = 1
-			this.OrderService.OrderList(
-				Object.assign(
-					{
-						status: index
-					},
-					this.listQuery
-				)
-			)
+		getOrderReceiptOrders() {
+			// 收款详情-订单列表
+			this.OrderService.orderReceiptOrders(this.listQuery)
 				.then(response => {
-					let resData = response.data.list
-					this.total = response.data.total
-					if (resData && resData.length > 0) {
+					let data = response.data
+					if (data.list && data.list.length > 0) {
 						this.isEmpty = false
-						this.orderData = [...resData]
-						this.hanldOrderList(this.orderData)
-						if (this.total > this.orderData.length) {
+						this.hasNextPage = response.data.hasNextPage
+						this.payList = 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.orderData.length < 5) {
+							if (this.payList.length < 3) {
 								this.pullUpOn = true
 							} else {
 								this.pullUpOn = false
+								this.loadding = false
 								this.nomoreText = '已至底部'
 							}
 						}
 					} else {
 						this.isEmpty = true
 					}
+					this.skeletonShow = false
 				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
+				.catch(err => {
+					this.$util.msg(err.msg, 2000)
 				})
 		},
-		getOnReachBottomData(index) {
+		getOnReachBottomData() {
 			//上拉加载
 			this.listQuery.pageNum += 1
-			this.OrderService.OrderList(
-				Object.assign(
-					{
-						status: index
-					},
-					this.listQuery
-				)
-			).then(response => {
-				let resData = response.data.list
-				this.total = response.data.total
-				this.orderData = this.orderData.concat(resData)
-				this.hanldOrderList(this.orderData)
-				this.pullFlag = false // 防上拉暴滑
-				setTimeout(() => {
-					this.pullFlag = true
-				}, 500)
-				if (this.total > this.orderData.length) {
-					this.pullUpOn = false
-					this.nomoreText = '上拉显示更多'
-				} else {
-					this.loadding = false
-					this.pullUpOn = false
-					this.nomoreText = '已至底部'
-				}
-			})
+			this.OrderService.orderReceiptOrders(this.listQuery)
+				.then(response => {
+					let data = response.data
+					if (data.list && data.list.length > 0) {
+						this.hasNextPage = data.hasNextPage
+						this.payList = this.payList.concat(data.list)
+						this.payList = this.payList.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 {
+							this.pullUpOn = false
+							this.loadding = false
+							this.nomoreText = '已至底部'
+						}
+					}
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
 		},
 		change(e) {
 			//切换tab传递当前tab[index]执行初始化方法
@@ -700,7 +494,6 @@ export default {
 		},
 		orderDetail(id) {
 			//订单详情跳转
-			this.isModalLayer = true
 			this.$api.navigateTo(`/pages/relation/order/detail?orderId=${id}`)
 		},
 		handButtonConfirm(data) {
@@ -732,7 +525,6 @@ export default {
 					this.$api.navigateTo('/pages/user/order/order-refund')
 					break
 				case 'query':
-					this.isModalLayer = true
 					this.$api.navigateTo('/pages/user/order/order-logistics?orderID=' + data.orderId)
 					break
 				case 'confirm':
@@ -777,9 +569,9 @@ export default {
 			}
 			this.modal = false
 		},
-		checkedOrder(payment) {
+		checkedOrder(order) {
 			// 勾选关联订单
-			payment.isChecked = !payment.isChecked
+			order.isChecked = !order.isChecked
 		},
 		hideMobel() {
 			this.modal = false
@@ -828,10 +620,11 @@ export default {
 			//设置邀请码状态亚瑟
 			let stateColor = '',
 				stateColorObject = {
-					0: '#f0ad4e',
-					1: '#4cd964',
-					2: '#dd524d',
-					3: '#007aff'
+					1: '#f0ad4e',
+					2: '#4cd964',
+					3: '#dd524d',
+					4: '#007aff',
+					5: '#EEC1AB'
 				}
 			Object.keys(stateColorObject).forEach(function(key) {
 				if (key == state) {
@@ -891,31 +684,29 @@ export default {
 		}
 	},
 	onReachBottom() {
-		if (this.total > this.orderData.length) {
+		if (this.hasNextPage) {
 			this.loadding = true
 			this.pullUpOn = true
-			this.getOnReachBottomData(this.currents)
+			this.getOnReachBottomData()
 		}
 	},
 	onPullDownRefresh() {
 		setTimeout(() => {
 			this.listQuery.pageNum = 1
-			this.currents = 0
-			// this.getOrderDatainit(this.currents)
+			this.getOrderReceiptOrders()
 			uni.stopPullDownRefresh()
 		}, 200)
 	},
 	onShareAppMessage(res) {
 		//分享购买优惠券
-		const payment = res.target.dataset.payment
-		console.log('payment', payment)
+		console.log('receiptInfo', receiptInfo)
 		if (res.from === 'button') {
 			// console.log('来自页面内转发按钮')
-			return {
-				title: `【待确认】收款金额${payment.receiptAmount.toFixed(2)}元,收款时间:${payment.receiptDate}`,
-				path: `pages/seller/cart/coupon-share?payment=${payment.id}`,
-				imageUrl: 'https://static.caimei365.com/app/img/icon/icon-shareCoupon@2x.png'
-			}
+		}
+		return {
+			title: `【待确认】收款金额${receiptInfo.receiptAmount.toFixed(2)}元,收款时间:${receiptInfo.receiptDate}`,
+			path: `pages/seller/cart/coupon-share?payment=${receiptInfo.id}`,
+			imageUrl: 'https://static.caimei365.com/app/img/icon/icon-shareCoupon@2x.png'
 		}
 	},
 	onShow() {
@@ -1081,7 +872,7 @@ page {
 			line-height: 40rpx;
 			color: #666666;
 			text-align: left;
-			.text{
+			.text {
 				color: #999999;
 			}
 			.list-title-b-item {
@@ -1105,7 +896,7 @@ page {
 			line-height: 60rpx;
 			position: absolute;
 			right: 90rpx;
-			top: 40rpx;
+			top: -40rpx;
 			color: #dd524d;
 			z-index: 99;
 			transform: rotate(45deg);
@@ -1402,7 +1193,7 @@ page {
 		line-height: 40rpx;
 		color: #666666;
 		text-align: left;
-		.text{
+		.text {
 			color: #999999;
 		}
 		.list-title-b-item {

+ 2 - 4
services/ajax.service.js

@@ -12,12 +12,10 @@ class AjaxService {
         return url.indexOf('://') > -1 ? url : url
     }
     getHeaders({ header = {} }) {
-        const REV_TOKEN_ENV = uni.getStorageSync('token') ? uni.getStorageSync('token') : 'X-token'
-        const REV_COOKIE_ENV = uni.getStorageSync('sessionid') ? uni.getStorageSync('sessionid') : 'sessionid'
+        const REV_OPENID_ENV = uni.getStorageSync('openid') ? uni.getStorageSync('openid') : 'x-openid'
         header['Accept'] = 'application/json'
         header['Content-Type'] = 'application/x-www-form-urlencoded'
-        header['X-Token'] = REV_TOKEN_ENV
-        header['cookie'] = REV_COOKIE_ENV
+        header['x-openid'] = REV_OPENID_ENV
         return header
     }
     request(options = {}) {

+ 72 - 4
services/order.service.js

@@ -6,7 +6,11 @@ export default class OrderService {
         Object.assign(this, { AjaxService })
         this.name = 'OrderService'
     }
-    /* 识别收款短信 */
+    /**
+	 *识别收款短信
+	 * @param smsContent 短信内容
+	 * @param openid 微信openid
+    /**/
     orderReceiptReadSms (data = {}) {
         return this.AjaxService.post({ 
             url:'/order/receipt/read/sms', 
@@ -16,7 +20,9 @@ export default class OrderService {
               
         })
     }
-    /* 获取收款类型 */
+    /**
+	 *获取收款类型
+	/**/
     orderReceiptType (data = {}) {
         return this.AjaxService.get({ 
             url:'/order/receipt/type', 
@@ -25,7 +31,16 @@ export default class OrderService {
               
         })
     }
-    /* 获取收款类型 */
+    /**
+	 *保存收款
+	 * @param smsContent 短信内容
+	 * @param openid 微信openid
+	 * @param payType 付款类型
+	 * @param receiptType 收款类型
+	 * @param receiptAmount 收款金额
+	 * @param handlingFee 手续费
+	 * @param receiptDate 收款时间
+	/**/
     orderReceiptSave(data = {}) {
         return this.AjaxService.post({ 
             url:'/order/receipt/save', 
@@ -34,7 +49,29 @@ export default class OrderService {
             loadText: '保存中...' 
         })
     }
-    /* 获取收款详情 */
+    /**
+	 *获取收款列表
+	 * @param startDate 筛选开始时间
+	 * @param endDate 筛选结束时间
+	 * @param openid 微信openid
+	 * @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
+	 * @param openid 微信openid
+	/**/
     orderReceiptDetail(data = {}) {
         return this.AjaxService.get({ 
             url:'/order/receipt/detail', 
@@ -42,4 +79,35 @@ export default class OrderService {
             isLoading: true ,
         })
     }
+    /**
+	 *操作收款信息(作废,设为返佣-普通-供应商退款-非订单款)
+	 * @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: true ,
+            loadText: '请稍候...' 
+        })
+    }
 }

+ 0 - 1
store/index.js

@@ -9,7 +9,6 @@ const store = new Vuex.Store({
         isWxAuthorize: false,
         hasLogin: false,
         userInfo: {},
-        openid: 0,
         wechatUserInfo: {},
         isIphoneX: false,
         isActivity: false,

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff