shish 3 gadi atpakaļ
vecāks
revīzija
576168a2fb

+ 5 - 5
hdPad/src/api/main/index.js

@@ -1,9 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
-/** *
- * 商城分享(零售、供应商相同) b  wangning  2021-6-12
- */
-export const mainGetMallPoster = data => {
-	return https.get('/main/get-mall-poster', data)
+export const mainInfo = data => {
+	return https.get('/main/info', data)
 }
 
+export const mainGetMallPoster = data => {
+	return https.get('/main/get-mall-poster', data)
+}

+ 9 - 0
hdPad/src/api/shop-money/index.js

@@ -0,0 +1,9 @@
+import https from '@/plugins/luch-request_0.0.7/request'
+
+export const inMoney = data => {
+	return https.get('/shop-money/in', data)
+}
+
+export const outMoney = data => {
+	return https.get('/shop-money/out', data)
+}

+ 1 - 0
hdPad/src/pages.json

@@ -7,6 +7,7 @@
 		{"path": "pages/home/work","style": {"navigationBarTitleText": "门店单"}},
 		{"path": "pages/home/modify","style": {"navigationBarTitleText": "修改"}},
 		{"path": "pages/home/make","style": {"navigationBarTitleText": "制作"}},
+		{"path": "pages/home/xj","style": {"navigationBarTitleText": "现金"}},
 		{"path": "pages/home/selectCustom","style": {"navigationBarTitleText": "选客户"}},
 		{"path": "pages/home/selectMake","style": {"navigationBarTitleText": "选款"}},
 		{"path": "pages/home/blue","style": {"navigationBarTitleText": "连接标签机"}},

+ 2 - 1
hdPad/src/pages/home/components/nav.vue

@@ -33,7 +33,8 @@ export default {
         { name: "任务", page: "/pages/home/work",flag:'work' },
         { name: "拆散", page: "/pages/home/make",flag:'selItem' },
         { name: "美团", page: "/pages/home/mt",flag:'mt' },
-        { name: "散花", page: "/pages/home/sh",flag:'sh' }
+        { name: "散花", page: "/pages/home/sh",flag:'sh' },
+        { name: "现金", page: "/pages/home/xj",flag:'xh' }
       ],
       device:''
     };

+ 130 - 0
hdPad/src/pages/home/xj.vue

@@ -0,0 +1,130 @@
+<template>
+<view>
+    <view>
+        <view class="app-casher-area">
+            <view class="nav-left">
+                <casherNav navType="xh"></casherNav>
+            </view>
+            <view class="work-list">
+                <view class="cash">现金:¥{{xjInfo.money ? parseFloat(xjInfo.money) : 0}}</view>
+				<view class="draw">
+					<input v-model="drawCash" class="draw-input" type="digit" @focus="drawCash=''" placeholder="提取金额" /> 
+					<text @click="outAmount()" style="margin-left:30upx;">提取</text>
+				</view>
+				<view class="save">
+					<input v-model="saveCash" type="digit" class="save-input" @focus="drawCash=''" placeholder="存入金额" /> 
+					<text @click="inAmount()" style="margin-left:30upx;">存入</text>
+				</view>
+            </view>
+        </view>
+    </view>
+</view>
+</template>
+<script>
+import { mapGetters } from "vuex";
+import casherNav from './components/nav.vue'
+import { mainInfo } from "@/api/main"
+import { inMoney,outMoney } from "@/api/shop-money"
+export default {
+	name: "xj",
+	components: {casherNav},
+	mixins: [],
+	data() {
+		return {
+			currentJobType:'xj',
+			currentJobId:0,
+			xjInfo:{},
+			drawCash:'',
+			saveCash:''
+		}
+	},
+	computed: {
+		...mapGetters(["getLoginInfo"])
+	},
+	onLoad(){
+		this.getMainInfo()
+	},
+	methods: {
+		init(){
+
+		},
+		getMainInfo(){
+			let that = this
+			mainInfo().then(res=>{
+				if(res.code == 1){
+					that.xjInfo = res.data.info ? res.data.info : []
+				}
+			})
+		},
+		outAmount(){
+			let that=this;
+			if(that.$util.isEmpty(that.drawCash) || Number(that.drawCash)<=0){
+				that.$msg('请填写金额')
+				return false
+			}
+			that.$util.confirmModal({content:'确认取出'},() => { 
+				outMoney({amount:that.drawCash}).then(res=>{
+					if(res.code == 1){
+						that.getMainInfo()
+						that.$msg('操作成功')
+						that.drawCash = ''
+					}
+				})
+			})
+		},
+		inAmount(){
+			let that=this;
+			if(that.$util.isEmpty(that.saveCash) || Number(that.saveCash)<=0){
+				that.$msg('请填写金额')
+				return false
+			}
+			that.$util.confirmModal({content:'确认存入'},() => {       
+				inMoney({amount:that.saveCash}).then(res=>{
+					if(res.code == 1){
+						that.getMainInfo()
+						that.$msg('操作成功')
+						that.saveCash = ''
+					}
+				})
+			})
+		},
+	}
+};
+</script>
+<style lang="scss" scoped>
+.app-casher-area {
+	display: flex;
+	height: 100vh;
+	& .nav-left {
+		flex: 5;
+		background-color: rgba(72, 91, 107, 1);
+	}
+	& .work-list {
+		flex: 121;
+		.cash{
+			margin-left:50upx;
+			margin-top:50upx;
+		}
+		.draw{
+			margin-top:50upx;
+			margin-left:50upx;
+			.draw-input{
+				width:160upx;
+				border:1upx solid #ccc;
+				display: inline-block;
+				text-align: center;
+			}
+		}
+		.save{
+			margin-top:50upx;
+			margin-left:50upx;
+			.save-input{
+				width:160upx;
+				border:1upx solid #ccc;
+				display: inline-block;
+				text-align: center;
+			}
+		}
+	}
+}
+</style>