Bläddra i källkod

扫码退款功能

shish 2 månader sedan
förälder
incheckning
97073aebfa

+ 6 - 2
ghsApp/src/admin/order/scanPay.vue

@@ -9,7 +9,8 @@
 				<view class="allot-item" v-for="(item, index) in list.data" :key="index" @click="gotoDetails(item)" >
 					<view class="info">
 						<view class="info-name">单号:{{ item.orderSn }}</view>
-						<view class="info-name">价格:¥{{ item.actPrice?parseFloat(item.actPrice):0 }}</view>
+						<view class="info-name" v-if="Number(item.tkPrice)>0">已退:¥{{ item.tkPrice?parseFloat(item.tkPrice):0 }}</view>
+					<view class="info-name">价格:¥{{ item.actPrice?parseFloat(item.actPrice):0 }}</view>
             			<view class="info-name">时间:{{ item.addTime.substr(5,11) }}</view>
 					</view>
 					<view class="primary" >
@@ -93,7 +94,10 @@ export default {
 			}
 		},
 		addEvent(){},
-		gotoDetails(item){}
+		gotoDetails(item){
+			if (this.$util.isEmpty(item) || !item.id) return;
+			this.$util.pageTo({ url: '/admin/order/scanPayDetail', query: { id: item.id } });
+		}
 	}
 };
 </script>

+ 156 - 0
ghsApp/src/admin/order/scanPayDetail.vue

@@ -0,0 +1,156 @@
+<template>
+<view class="app-content scan-pay-detail">
+	<view class="card" v-if="!$util.isEmpty(info)">
+		<view class="row"><text class="label">单号</text><text class="val">{{ info.orderSn }}</text></view>
+		<view class="row"><text class="label">金额</text><text class="val price">¥{{ parseFloat(info.actPrice || 0) }}</text></view>
+		<view class="row" v-if="Number(info.tkPrice) > 0"><text class="label">已退</text><text class="val warn">¥{{ parseFloat(info.tkPrice) }}</text></view>
+		<view class="row"><text class="label">可退</text><text class="val">¥{{ parseFloat(canRefundPrice) }}</text></view>
+		<view class="row"><text class="label">客户</text><text class="val">{{ info.customName || '-' }}</text></view>
+		<view class="row"><text class="label">支付方式</text><text class="val">{{ payWayName }}</text></view>
+		<view class="row"><text class="label">时间</text><text class="val">{{ info.payTime || info.addTime || '-' }}</text></view>
+		<view class="row"><text class="label">状态</text><text class="val">{{ statusText }}</text></view>
+		<view class="tip online-tip" v-if="canOnlineRefund">此单线上付款,退款后钱会原路自动退回给客户</view>
+	</view>
+
+	<view class="section-title">退款记录</view>
+	<block v-if="!$util.isEmpty(refundList)">
+		<view class="refund-item" v-for="(item, index) in refundList" :key="index">
+			<view class="refund-row">时间:{{ item.addTime ? item.addTime.substr(5, 11) : '' }}</view>
+			<view class="refund-row">单号:{{ item.orderSn }}</view>
+			<view class="refund-row">操作:{{ item.shopAdminName || '-' }}</view>
+			<view class="refund-row" v-if="item.remark">备注:{{ item.remark }}</view>
+			<view class="refund-price">¥{{ parseFloat(item.refundPrice) }}</view>
+		</view>
+	</block>
+	<block v-else>
+		<AppWrapperEmpty title="暂无退款记录" :is-empty="true" />
+	</block>
+
+	<view class="footer" v-if="showRefundBtn">
+		<button class="admin-button-com bule middle" @click="goRefund">发起退款</button>
+	</view>
+</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import { getScanPayDetail } from "@/api/order";
+export default {
+	name: "scanPayDetail",
+	components: { AppWrapperEmpty },
+	data() {
+		return {
+			id: 0,
+			info: {},
+			refundList: [],
+			canRefundPrice: 0,
+			payWayName: ''
+		};
+	},
+	computed: {
+		statusText() {
+			const s = this.info.status;
+			if (s == 1) return '待付款';
+			if (s == 2) return '已付款';
+			return '已取消';
+		},
+		canOnlineRefund() {
+			const pw = Number(this.info.payWay);
+			return pw === 0 || pw === 1;
+		},
+		showRefundBtn() {
+			return this.info.status == 2 && Number(this.canRefundPrice) > 0;
+		}
+	},
+	onLoad(option) {
+		this.id = option.id || 0;
+	},
+	onShow() {
+		this.loadDetail();
+	},
+	methods: {
+		loadDetail() {
+			if (!this.id) return;
+			getScanPayDetail({ id: this.id }).then(res => {
+				if (res.code != 1 || this.$util.isEmpty(res.data)) return;
+				const data = res.data;
+				this.info = data.info || {};
+				this.refundList = data.refundList || [];
+				this.canRefundPrice = data.canRefundPrice || 0;
+				this.payWayName = data.payWayName || '';
+			});
+		},
+		goRefund() {
+			this.$util.pageTo({ url: '/admin/order/scanPayRefund', query: { id: this.id } });
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.scan-pay-detail {
+	padding-bottom: 120upx;
+	background: #f9fbfc;
+	min-height: 100%;
+}
+.card {
+	margin: 20upx;
+	padding: 30upx;
+	background: #fff;
+	border-radius: 12upx;
+}
+.row {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	padding: 16upx 0;
+	font-size: 28upx;
+	.label { color: #666; }
+	.val { color: #333; }
+	.price { color: #3385ff; font-weight: 600; }
+	.warn { color: #ff6b00; }
+}
+.tip {
+	margin-top: 20upx;
+	padding: 16upx;
+	font-size: 24upx;
+	border-radius: 8upx;
+}
+.online-tip {
+	background: #fff7e6;
+	color: #ad760d;
+}
+.section-title {
+	margin: 30upx 20upx 10upx;
+	font-size: 30upx;
+	font-weight: 600;
+	color: #333;
+}
+.refund-item {
+	position: relative;
+	margin: 0 20upx 16upx;
+	padding: 24upx 30upx;
+	background: #fff;
+	border-radius: 12upx;
+}
+.refund-row {
+	font-size: 26upx;
+	color: #666;
+	line-height: 1.8;
+}
+.refund-price {
+	position: absolute;
+	right: 30upx;
+	top: 24upx;
+	font-size: 32upx;
+	color: #3385ff;
+	font-weight: 600;
+}
+.footer {
+	position: fixed;
+	left: 0;
+	right: 0;
+	bottom: 0;
+	padding: 20upx 30upx 40upx;
+	background: #fff;
+	box-shadow: 0 -2upx 10upx rgba(0,0,0,0.05);
+}
+</style>

+ 158 - 0
ghsApp/src/admin/order/scanPayRefund.vue

@@ -0,0 +1,158 @@
+<template>
+<view class="app-content scan-pay-refund">
+	<view class="card">
+		<view class="row"><text class="label">订单金额</text><text class="val">¥{{ parseFloat(info.actPrice || 0) }}</text></view>
+		<view class="row"><text class="label">已退金额</text><text class="val">¥{{ parseFloat(info.tkPrice || 0) }}</text></view>
+		<view class="row"><text class="label">可退金额</text><text class="val price">¥{{ parseFloat(canRefundPrice) }}</text></view>
+		<text class="tip online-tip" v-if="canOnlineRefund">此单线上付款,提交后钱会原路自动退回给客户</text>
+	</view>
+
+	<view class="card">
+		<view class="form-label">退款金额</view>
+		<view class="input-wrap">
+			<input class="input" type="digit" v-model="refundMoney" placeholder="请输入退款金额" />
+			<text class="unit">元</text>
+		</view>
+		<view class="form-label">备注</view>
+		<textarea class="textarea" v-model="remark" placeholder="选填" maxlength="200" />
+	</view>
+
+	<view class="footer">
+		<button class="admin-button-com bule middle" @click="confirmRefund">确认退款</button>
+	</view>
+</view>
+</template>
+<script>
+import { getScanPayDetail, scanPayRefund } from "@/api/order";
+export default {
+	name: "scanPayRefund",
+	data() {
+		return {
+			id: 0,
+			info: {},
+			canRefundPrice: 0,
+			refundMoney: '',
+			remark: ''
+		};
+	},
+	computed: {
+		canOnlineRefund() {
+			const pw = Number(this.info.payWay);
+			return pw === 0 || pw === 1;
+		}
+	},
+	onLoad(option) {
+		this.id = option.id || 0;
+		this.loadDetail();
+	},
+	methods: {
+		loadDetail() {
+			if (!this.id) return;
+			getScanPayDetail({ id: this.id }).then(res => {
+				if (res.code != 1 || this.$util.isEmpty(res.data)) return;
+				const data = res.data;
+				this.info = data.info || {};
+				this.canRefundPrice = data.canRefundPrice || 0;
+				this.refundMoney = String(this.canRefundPrice > 0 ? this.canRefundPrice : '');
+			});
+		},
+		confirmRefund() {
+			const price = Number(this.refundMoney);
+			if (!price || price <= 0) {
+				return this.$msg('请填写退款金额');
+			}
+			if (price > Number(this.canRefundPrice)) {
+				return this.$msg('退款金额超过可退金额');
+			}
+			let title = '确认退款 ¥' + price + ' ?';
+			if (this.canOnlineRefund) {
+				title = '提交后钱会原路退回给客户,确认退款 ¥' + price + ' ?';
+			}
+			uni.showModal({
+				title: '确认退款',
+				content: title,
+				success: (res) => {
+					if (res.confirm) this.submitRefund(price);
+				}
+			});
+		},
+		submitRefund(price) {
+			scanPayRefund({ id: this.id, price, remark: this.remark }).then(res => {
+				if (res.code == 1) {
+					this.$msg('退款成功');
+					setTimeout(() => {
+						this.$util.pageTo({ url: '/admin/order/scanPayDetail', query: { id: this.id }, type: 2 });
+					}, 500);
+				}
+			});
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.scan-pay-refund {
+	padding-bottom: 120upx;
+	background: #f9fbfc;
+	min-height: 100%;
+}
+.card {
+	margin: 20upx;
+	padding: 30upx;
+	background: #fff;
+	border-radius: 12upx;
+}
+.row {
+	display: flex;
+	justify-content: space-between;
+	padding: 16upx 0;
+	font-size: 28upx;
+	.label { color: #666; }
+	.val { color: #333; }
+	.price { color: #3385ff; font-weight: 600; }
+}
+.tip {
+	display: block;
+	margin-top: 16upx;
+	padding: 16upx;
+	font-size: 24upx;
+	border-radius: 8upx;
+}
+.online-tip {
+	background: #fff7e6;
+	color: #ad760d;
+}
+.form-label {
+	margin-top: 10upx;
+	font-size: 28upx;
+	color: #333;
+}
+.input-wrap {
+	display: flex;
+	align-items: center;
+	margin-top: 16upx;
+	padding: 0 20upx;
+	height: 80upx;
+	background: #f5f7fa;
+	border-radius: 8upx;
+}
+.input { flex: 1; font-size: 32upx; }
+.unit { color: #999; font-size: 28upx; }
+.textarea {
+	width: 100%;
+	margin-top: 16upx;
+	padding: 20upx;
+	min-height: 160upx;
+	background: #f5f7fa;
+	border-radius: 8upx;
+	font-size: 28upx;
+	box-sizing: border-box;
+}
+.footer {
+	position: fixed;
+	left: 0;
+	right: 0;
+	bottom: 0;
+	padding: 20upx 30upx 40upx;
+	background: #fff;
+}
+</style>

+ 4 - 0
ghsApp/src/api/order/index.js

@@ -279,6 +279,10 @@ export const scanPayCheck = data => https.get("/order/scan-pay-check", data);
 
 export const getScanPayList = data => https.get("/scan-pay/list", data);
 
+export const getScanPayDetail = data => https.get("/scan-pay/detail", data);
+
+export const scanPayRefund = data => https.post("/scan-pay/refund", data);
+
 export const modifyAddress = data => {
 	return https.post('/order/modify-address', data)
 }

+ 3 - 1
ghsApp/src/pages.json

@@ -508,7 +508,9 @@
 				{"path": "productOrder","style": {"navigationBarTitleText": "下单记录"}},
 				{"path": "customOrder","style": {"navigationBarTitleText": "下单记录"}},
 				{"path": "mergeOrder","style": {"navigationBarTitleText": "订单列表"}},
-				{"path": "scanPay","style": {"navigationBarTitleText": "收款码流水"}},
+							{"path": "scanPay","style": {"navigationBarTitleText": "收款码流水"}},
+			{"path": "scanPayDetail","style": {"navigationBarTitleText": "收款详情"}},
+			{"path": "scanPayRefund","style": {"navigationBarTitleText": "退款"}},
 				{"path": "bookSet","style": {"navigationBarTitleText": "预订开关"}},
 				{"path": "statBook","style": {"navigationBarTitleText": "预订汇总","enablePullDownRefresh": true}},
 				{"path": "statKhBook","style": {"navigationBarTitleText": "详情"}},

+ 6 - 2
hdApp/src/admin/order/scanPay.vue

@@ -9,7 +9,8 @@
 				<view class="allot-item" v-for="(item, index) in list.data" :key="index" @click="gotoDetails(item)" >
 					<view class="info">
 						<view class="info-name">单号:{{ item.orderSn }}</view>
-						<view class="info-name">价格:¥{{ item.actPrice?parseFloat(item.actPrice):0 }}</view>
+						<view class="info-name" v-if="Number(item.tkPrice)>0">已退:¥{{ item.tkPrice?parseFloat(item.tkPrice):0 }}</view>
+					<view class="info-name">价格:¥{{ item.actPrice?parseFloat(item.actPrice):0 }}</view>
             			<view class="info-name">时间:{{ item.addTime.substr(5,11) }}</view>
 					</view>
 					<view class="primary" >
@@ -93,7 +94,10 @@ export default {
 			}
 		},
 		addEvent(){},
-		gotoDetails(item){}
+		gotoDetails(item){
+			if (this.$util.isEmpty(item) || !item.id) return;
+			this.$util.pageTo({ url: '/admin/order/scanPayDetail', query: { id: item.id } });
+		}
 	}
 };
 </script>

+ 156 - 0
hdApp/src/admin/order/scanPayDetail.vue

@@ -0,0 +1,156 @@
+<template>
+<view class="app-content scan-pay-detail">
+	<view class="card" v-if="!$util.isEmpty(info)">
+		<view class="row"><text class="label">单号</text><text class="val">{{ info.orderSn }}</text></view>
+		<view class="row"><text class="label">金额</text><text class="val price">¥{{ parseFloat(info.actPrice || 0) }}</text></view>
+		<view class="row" v-if="Number(info.tkPrice) > 0"><text class="label">已退</text><text class="val warn">¥{{ parseFloat(info.tkPrice) }}</text></view>
+		<view class="row"><text class="label">可退</text><text class="val">¥{{ parseFloat(canRefundPrice) }}</text></view>
+		<view class="row"><text class="label">客户</text><text class="val">{{ info.customName || '-' }}</text></view>
+		<view class="row"><text class="label">支付方式</text><text class="val">{{ payWayName }}</text></view>
+		<view class="row"><text class="label">时间</text><text class="val">{{ info.payTime || info.addTime || '-' }}</text></view>
+		<view class="row"><text class="label">状态</text><text class="val">{{ statusText }}</text></view>
+		<view class="tip online-tip" v-if="canOnlineRefund">此单线上付款,退款后钱会原路自动退回给客户</view>
+	</view>
+
+	<view class="section-title">退款记录</view>
+	<block v-if="!$util.isEmpty(refundList)">
+		<view class="refund-item" v-for="(item, index) in refundList" :key="index">
+			<view class="refund-row">时间:{{ item.addTime ? item.addTime.substr(5, 11) : '' }}</view>
+			<view class="refund-row">单号:{{ item.orderSn }}</view>
+			<view class="refund-row">操作:{{ item.shopAdminName || '-' }}</view>
+			<view class="refund-row" v-if="item.remark">备注:{{ item.remark }}</view>
+			<view class="refund-price">¥{{ parseFloat(item.refundPrice) }}</view>
+		</view>
+	</block>
+	<block v-else>
+		<AppWrapperEmpty title="暂无退款记录" :is-empty="true" />
+	</block>
+
+	<view class="footer" v-if="showRefundBtn">
+		<button class="admin-button-com bule middle" @click="goRefund">发起退款</button>
+	</view>
+</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import { getScanPayDetail } from "@/api/order";
+export default {
+	name: "scanPayDetail",
+	components: { AppWrapperEmpty },
+	data() {
+		return {
+			id: 0,
+			info: {},
+			refundList: [],
+			canRefundPrice: 0,
+			payWayName: ''
+		};
+	},
+	computed: {
+		statusText() {
+			const s = this.info.status;
+			if (s == 1) return '待付款';
+			if (s == 2) return '已付款';
+			return '已取消';
+		},
+		canOnlineRefund() {
+			const pw = Number(this.info.payWay);
+			return pw === 0 || pw === 1;
+		},
+		showRefundBtn() {
+			return this.info.status == 2 && Number(this.canRefundPrice) > 0;
+		}
+	},
+	onLoad(option) {
+		this.id = option.id || 0;
+	},
+	onShow() {
+		this.loadDetail();
+	},
+	methods: {
+		loadDetail() {
+			if (!this.id) return;
+			getScanPayDetail({ id: this.id }).then(res => {
+				if (res.code != 1 || this.$util.isEmpty(res.data)) return;
+				const data = res.data;
+				this.info = data.info || {};
+				this.refundList = data.refundList || [];
+				this.canRefundPrice = data.canRefundPrice || 0;
+				this.payWayName = data.payWayName || '';
+			});
+		},
+		goRefund() {
+			this.$util.pageTo({ url: '/admin/order/scanPayRefund', query: { id: this.id } });
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.scan-pay-detail {
+	padding-bottom: 120upx;
+	background: #f9fbfc;
+	min-height: 100%;
+}
+.card {
+	margin: 20upx;
+	padding: 30upx;
+	background: #fff;
+	border-radius: 12upx;
+}
+.row {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	padding: 16upx 0;
+	font-size: 28upx;
+	.label { color: #666; }
+	.val { color: #333; }
+	.price { color: #3385ff; font-weight: 600; }
+	.warn { color: #ff6b00; }
+}
+.tip {
+	margin-top: 20upx;
+	padding: 16upx;
+	font-size: 24upx;
+	border-radius: 8upx;
+}
+.online-tip {
+	background: #fff7e6;
+	color: #ad760d;
+}
+.section-title {
+	margin: 30upx 20upx 10upx;
+	font-size: 30upx;
+	font-weight: 600;
+	color: #333;
+}
+.refund-item {
+	position: relative;
+	margin: 0 20upx 16upx;
+	padding: 24upx 30upx;
+	background: #fff;
+	border-radius: 12upx;
+}
+.refund-row {
+	font-size: 26upx;
+	color: #666;
+	line-height: 1.8;
+}
+.refund-price {
+	position: absolute;
+	right: 30upx;
+	top: 24upx;
+	font-size: 32upx;
+	color: #3385ff;
+	font-weight: 600;
+}
+.footer {
+	position: fixed;
+	left: 0;
+	right: 0;
+	bottom: 0;
+	padding: 20upx 30upx 40upx;
+	background: #fff;
+	box-shadow: 0 -2upx 10upx rgba(0,0,0,0.05);
+}
+</style>

+ 158 - 0
hdApp/src/admin/order/scanPayRefund.vue

@@ -0,0 +1,158 @@
+<template>
+<view class="app-content scan-pay-refund">
+	<view class="card">
+		<view class="row"><text class="label">订单金额</text><text class="val">¥{{ parseFloat(info.actPrice || 0) }}</text></view>
+		<view class="row"><text class="label">已退金额</text><text class="val">¥{{ parseFloat(info.tkPrice || 0) }}</text></view>
+		<view class="row"><text class="label">可退金额</text><text class="val price">¥{{ parseFloat(canRefundPrice) }}</text></view>
+		<text class="tip online-tip" v-if="canOnlineRefund">此单线上付款,提交后钱会原路自动退回给客户</text>
+	</view>
+
+	<view class="card">
+		<view class="form-label">退款金额</view>
+		<view class="input-wrap">
+			<input class="input" type="digit" v-model="refundMoney" placeholder="请输入退款金额" />
+			<text class="unit">元</text>
+		</view>
+		<view class="form-label">备注</view>
+		<textarea class="textarea" v-model="remark" placeholder="选填" maxlength="200" />
+	</view>
+
+	<view class="footer">
+		<button class="admin-button-com bule middle" @click="confirmRefund">确认退款</button>
+	</view>
+</view>
+</template>
+<script>
+import { getScanPayDetail, scanPayRefund } from "@/api/order";
+export default {
+	name: "scanPayRefund",
+	data() {
+		return {
+			id: 0,
+			info: {},
+			canRefundPrice: 0,
+			refundMoney: '',
+			remark: ''
+		};
+	},
+	computed: {
+		canOnlineRefund() {
+			const pw = Number(this.info.payWay);
+			return pw === 0 || pw === 1;
+		}
+	},
+	onLoad(option) {
+		this.id = option.id || 0;
+		this.loadDetail();
+	},
+	methods: {
+		loadDetail() {
+			if (!this.id) return;
+			getScanPayDetail({ id: this.id }).then(res => {
+				if (res.code != 1 || this.$util.isEmpty(res.data)) return;
+				const data = res.data;
+				this.info = data.info || {};
+				this.canRefundPrice = data.canRefundPrice || 0;
+				this.refundMoney = String(this.canRefundPrice > 0 ? this.canRefundPrice : '');
+			});
+		},
+		confirmRefund() {
+			const price = Number(this.refundMoney);
+			if (!price || price <= 0) {
+				return this.$msg('请填写退款金额');
+			}
+			if (price > Number(this.canRefundPrice)) {
+				return this.$msg('退款金额超过可退金额');
+			}
+			let title = '确认退款 ¥' + price + ' ?';
+			if (this.canOnlineRefund) {
+				title = '提交后钱会原路退回给客户,确认退款 ¥' + price + ' ?';
+			}
+			uni.showModal({
+				title: '确认退款',
+				content: title,
+				success: (res) => {
+					if (res.confirm) this.submitRefund(price);
+				}
+			});
+		},
+		submitRefund(price) {
+			scanPayRefund({ id: this.id, price, remark: this.remark }).then(res => {
+				if (res.code == 1) {
+					this.$msg('退款成功');
+					setTimeout(() => {
+						this.$util.pageTo({ url: '/admin/order/scanPayDetail', query: { id: this.id }, type: 2 });
+					}, 500);
+				}
+			});
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.scan-pay-refund {
+	padding-bottom: 120upx;
+	background: #f9fbfc;
+	min-height: 100%;
+}
+.card {
+	margin: 20upx;
+	padding: 30upx;
+	background: #fff;
+	border-radius: 12upx;
+}
+.row {
+	display: flex;
+	justify-content: space-between;
+	padding: 16upx 0;
+	font-size: 28upx;
+	.label { color: #666; }
+	.val { color: #333; }
+	.price { color: #3385ff; font-weight: 600; }
+}
+.tip {
+	display: block;
+	margin-top: 16upx;
+	padding: 16upx;
+	font-size: 24upx;
+	border-radius: 8upx;
+}
+.online-tip {
+	background: #fff7e6;
+	color: #ad760d;
+}
+.form-label {
+	margin-top: 10upx;
+	font-size: 28upx;
+	color: #333;
+}
+.input-wrap {
+	display: flex;
+	align-items: center;
+	margin-top: 16upx;
+	padding: 0 20upx;
+	height: 80upx;
+	background: #f5f7fa;
+	border-radius: 8upx;
+}
+.input { flex: 1; font-size: 32upx; }
+.unit { color: #999; font-size: 28upx; }
+.textarea {
+	width: 100%;
+	margin-top: 16upx;
+	padding: 20upx;
+	min-height: 160upx;
+	background: #f5f7fa;
+	border-radius: 8upx;
+	font-size: 28upx;
+	box-sizing: border-box;
+}
+.footer {
+	position: fixed;
+	left: 0;
+	right: 0;
+	bottom: 0;
+	padding: 20upx 30upx 40upx;
+	background: #fff;
+}
+</style>

+ 5 - 1
hdApp/src/api/order/index.js

@@ -211,4 +211,8 @@ export const selfSend = data => https.get("/order/self-send", data);
 
 export const reachOrder = data => https.get("/order/reach", data);
 
-export const getScanPayList = data => https.get("/scan-pay/list", data);
+export const getScanPayList = data => https.get("/scan-pay/list", data);
+
+export const getScanPayDetail = data => https.get("/scan-pay/detail", data);
+
+export const scanPayRefund = data => https.post("/scan-pay/refund", data);

+ 3 - 1
hdApp/src/pages.json

@@ -439,7 +439,9 @@
 				{ "path": "modify", "style": { "navigationBarTitleText": "修改" } },
 				{ "path": "clearRemind","style": {"navigationBarTitleText": "如何查看还有多少待结订单"}},
 				{ "path": "itemOrder","style": {"navigationBarTitleText": "订单列表"}},
-				{ "path": "scanPay","style": {"navigationBarTitleText": "收款码流水"}}
+				{ "path": "scanPay", "style": { "navigationBarTitleText": "收款码流水" } },
+			{ "path": "scanPayDetail", "style": { "navigationBarTitleText": "收款详情" } },
+			{ "path": "scanPayRefund", "style": { "navigationBarTitleText": "退款" } }
 			]
 		},
 		{