Browse Source

充值结账

shish 2 năm trước cách đây
mục cha
commit
40e7f30330

+ 1 - 0
ghsApp/src/admin/item/list2.vue

@@ -73,6 +73,7 @@
 			</div>
 		</template>
 		</modal-module>
+
 		<uni-popup ref="globalClassImgRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
 			<view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
 				<view v-for="(item, index) in globalClassData" :key="index" @tap.stop="globalChangeClass(index,item)" style="margin-bottom:20upx;margin-left:3upx;">

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

@@ -1,5 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+export const rechargeClear = data => {
+	return https.get('/custom/recharge-clear', data)
+}
+
 export const modifySeatSnFn = data => {
 	return https.get('/custom/modify-seat-sn', data)
 }

+ 55 - 15
ghsApp/src/pagesClient/member/detail.vue

@@ -140,15 +140,27 @@
     
 
 		<modal-module :show="changeShow" @click="confirmChange" :maskClosable="true" title="修改名称" padding="30rpx 30rpx" >
-		<template v-slot:content>
-			<div class="app-modal-input-wrap">
-			<div class="inp-list-line">
-				<div class="line-input">
-				<input type="text" style="width:61%;text-align:center;" :focus="changeFocus" v-model="customName" class="inp-input" />
-				</div>
-			</div>
-			</div>
-		</template>
+      <template v-slot:content>
+        <div class="app-modal-input-wrap">
+        <div class="inp-list-line">
+          <div class="line-input">
+          <input type="text" style="width:61%;text-align:center;" :focus="changeFocus" v-model="customName" class="inp-input" />
+          </div>
+        </div>
+        </div>
+      </template>
+		</modal-module>
+
+		<modal-module :show="czShow" @click="confirmRecharge" :maskClosable="true" title="充值结账" padding="30rpx 30rpx" >
+      <template v-slot:content>
+        <div class="app-modal-input-wrap">
+        <div class="inp-list-line">
+          <div class="line-input">
+          <input type="digit" style="width:61%;text-align:center;" :focus="czFocus" v-model="rechargeMoney" class="inp-input" />
+          </div>
+        </div>
+        </div>
+      </template>
 		</modal-module>
 
   </view>
@@ -159,7 +171,7 @@ import { share } from "@/mixins";
 import ModalModule from "@/components/plugin/modal"
 import { getUserDet,debt} from "@/api/member";
 import { changeShowStock,changeWlName,changeLevel,createSeatSnFn,modifySeatSnFn } from "@/api/custom"
-import { updateDebtLimit,updateCustomBlack,changeDiscount,changeName} from "@/api/custom";
+import { updateDebtLimit,updateCustomBlack,changeDiscount,changeName,rechargeClear} from "@/api/custom";
 export default {
   name: "detail",
   components: {
@@ -191,16 +203,21 @@ export default {
         },
         {
           name: "添加员工",
-          img: `${this.$constant.imgUrl}/retail/member/tab-icon-1.png`,
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-4.png`,
           funtion: () => {
             this.addStaff()
           }
         },
         {
-          name: "发红包",
-          img: `${this.$constant.imgUrl}/retail/member/tab-icon-2.png`,
+          name: "充值结账",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-1.png`,
           funtion: () => {
-            this.$msg("开发中");
+            this.czShow = true
+            setTimeout(x => {
+              this.$nextTick(() => {
+                this.czFocus = true
+              })
+            }, 200)
           }
         },
         {
@@ -214,7 +231,10 @@ export default {
       customName:'',
       changeShow:false,
       changeFocus:false,
-      wlList: []
+      wlList: [],
+      czFocus:false,
+      czShow:false,
+      rechargeMoney:''
     };
   },
   computed: {},
@@ -311,6 +331,26 @@ export default {
         }
       })
     },
+    confirmRecharge(val){
+			let that=this;
+			if (val.index == 0) {
+				that.czShow = false
+				that.czFocus = false
+				return
+			}
+      if(Number(this.rechargeMoney)<0){
+        this.$msg('充值金额需要大于0')
+        return false
+      }
+      rechargeClear({amount:this.rechargeMoney}).then(res=>{
+        if(res.code == 1){
+          that.czShow = false
+				  that.czFocus = false
+          that.rechargeMoney = ''
+          that.$msg(res.msg)
+        }
+      })
+    },
     createOrder(){
       this.$util.pageTo({url: '/admin/billing/index',type:2,query: {customId: this.userInfo.id,customName:this.userInfo.name}})
     },