shish před 1 rokem
rodič
revize
92ab2ad8d0

+ 13 - 1
ghsApp/src/admin/clear/customInfo.vue

@@ -133,6 +133,7 @@
 			<!-- #ifdef APP-PLUS -->
 			<!-- #ifdef APP-PLUS -->
 			<button class="admin-button-com blue" style="color:white;" v-if="detailInfo.status == 1" @click="inviteClear()">邀客户结账</button>
 			<button class="admin-button-com blue" style="color:white;" v-if="detailInfo.status == 1" @click="inviteClear()">邀客户结账</button>
 			<!-- #endif -->
 			<!-- #endif -->
+			<button class="admin-button-com blue" style="color:white;" v-if="detailInfo.status == 3" @click="backMoney(detailInfo)">一键退款</button>
 		</view>
 		</view>
 
 
 		<uni-popup ref="clearConfirmRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
 		<uni-popup ref="clearConfirmRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
@@ -149,7 +150,7 @@
 	</view>
 	</view>
 </template>
 </template>
 <script>
 <script>
-import { getCustomDetail,cancel,confirmClear } from "@/api/clear/index";
+import { getCustomDetail,cancel,confirmClear,refundMoney } from "@/api/clear/index";
 import productMins from "@/mixins/product";
 import productMins from "@/mixins/product";
 import TuiListCell from "@/components/plugin/list-cell";
 import TuiListCell from "@/components/plugin/list-cell";
 import { IMGHOST } from '@/config'
 import { IMGHOST } from '@/config'
@@ -218,6 +219,17 @@ export default {
 				}
 				}
 			})
 			})
 		},
 		},
+		backMoney(info){
+			refundMoney({id:info.id}).then(res=>{
+				if(res.code == 1){
+					if(res.data.status == 1){
+						this.$msg('退款成功')
+					}else{
+						this.$msg(res.msg)
+					}
+				}
+			})
+		},
 		cancelFn(info){
 		cancelFn(info){
 			let that = this
 			let that = this
 			that.$util.confirmModal({content:'确认取消?'},() => {
 			that.$util.confirmModal({content:'确认取消?'},() => {

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

@@ -1,5 +1,9 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 import https from "@/plugins/luch-request_0.0.7/request";
 
 
+export const refundMoney = data => {
+	return https.get("/clear/refund-money", data);
+};
+
 export const getUnClear = data => {
 export const getUnClear = data => {
 	return https.get("/clear/get-un-clear", data);
 	return https.get("/clear/get-un-clear", data);
 };
 };