|
|
@@ -60,6 +60,25 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
+ <!-- 添加现金模块 -->
|
|
|
+ <view class="account-info_box content_box">
|
|
|
+ <view class="info-lf_box">
|
|
|
+ <view class="balance-title">
|
|
|
+ <text>现金(元)</text>
|
|
|
+ <text class="contact-service" @click.stop="suggest()">联系客服</text>
|
|
|
+ </view>
|
|
|
+ <view class="balance-amount">
|
|
|
+ <text class="currency">¥</text>
|
|
|
+ <span>{{ myInfo.money||0 }}</span>
|
|
|
+ </view>
|
|
|
+ <view class="balance-actions cash-actions">
|
|
|
+ <text class="action-btn" @click="pageTo({ url: '/admin/home/moneyChangeList' })">变动明细</text>
|
|
|
+ <text class="action-btn" @click="outAmountFn">取出</text>
|
|
|
+ <text class="action-btn" @click="inAmountFn">存入</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view class="module-com content_box user-open_bx">
|
|
|
<view class="settings-group">
|
|
|
|
|
|
@@ -191,6 +210,31 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
+
|
|
|
+ <modal-module :show="outAmountShow" @click="outAmountConfirm" :maskClosable="true" title="提取金额" padding="30rpx 30rpx" >
|
|
|
+ <template v-slot:content>
|
|
|
+ <view class="app-modal-input-wrap">
|
|
|
+ <view class="inp-list-line">
|
|
|
+ <view class="line-input">
|
|
|
+ <input type="digit" ref="input" style="width:61.8%;text-align:center;" v-model="outAmount" :adjust-position="false" class="inp-input" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ </modal-module>
|
|
|
+
|
|
|
+ <modal-module :show="inAmountShow" @click="inAmountConfirm" :maskClosable="true" title="存入金额" padding="30rpx 30rpx" >
|
|
|
+ <template v-slot:content>
|
|
|
+ <view class="app-modal-input-wrap">
|
|
|
+ <view class="inp-list-line">
|
|
|
+ <view class="line-input">
|
|
|
+ <input type="digit" ref="input" style="width:61.8%;text-align:center;" v-model="inAmount" :adjust-position="false" class="inp-input" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ </modal-module>
|
|
|
+
|
|
|
<custom-tab-bar :current="4" />
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -199,11 +243,13 @@ import AppAvatarModule from "@/components/module/app-avatar";
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
import { mainMy, applyCash } from "@/api/home";
|
|
|
import { modifySjName } from "@/api/shop";
|
|
|
+import { inMoney, outMoney } from "@/api/shop-money";
|
|
|
import DorpdownSelect from "@/components/module/dorpdownSelect";
|
|
|
import { selectShop } from "@/mixins";
|
|
|
import { list } from "@/mixins";
|
|
|
import { mapGetters } from "vuex";
|
|
|
import NotLogin from "@/components/not-login";
|
|
|
+import ModalModule from "@/components/plugin/modal";
|
|
|
import { clearLogin } from "@/api/admin";
|
|
|
import { APP_VERSION } from "@/config";
|
|
|
export default {
|
|
|
@@ -212,7 +258,8 @@ export default {
|
|
|
AppAvatarModule,
|
|
|
TuiListCell,
|
|
|
DorpdownSelect,
|
|
|
- NotLogin
|
|
|
+ NotLogin,
|
|
|
+ ModalModule
|
|
|
},
|
|
|
mixins: [selectShop, list],
|
|
|
computed: {
|
|
|
@@ -224,7 +271,13 @@ export default {
|
|
|
myInfo:{},
|
|
|
version:'1.0.0',
|
|
|
lookMoney:0,
|
|
|
- editName: ''
|
|
|
+ editName: '',
|
|
|
+ inAmount:'',
|
|
|
+ outAmount:'',
|
|
|
+ outAmountShow:false,
|
|
|
+ inAmountShow:false,
|
|
|
+ inAmountFocus:false,
|
|
|
+ outAmountFocus:false
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh () {
|
|
|
@@ -351,6 +404,60 @@ export default {
|
|
|
changeShop() {
|
|
|
this.$util.pageTo({ url: "/admin/shop/myShop"});
|
|
|
},
|
|
|
+ inAmountFn(){
|
|
|
+ this.inAmountShow = true
|
|
|
+ setTimeout(x => {
|
|
|
+ this.$nextTick(() => this.setInAmountFocus())
|
|
|
+ }, 200)
|
|
|
+ },
|
|
|
+ setInAmountFocus(){
|
|
|
+ this.inAmountFocus = true
|
|
|
+ },
|
|
|
+ outAmountFn(){
|
|
|
+ this.outAmountShow = true
|
|
|
+ setTimeout(x => {
|
|
|
+ this.$nextTick(() => this.setOutAmountFocus())
|
|
|
+ }, 200)
|
|
|
+ },
|
|
|
+ setOutAmountFocus(){
|
|
|
+ this.outAmountFocus = true
|
|
|
+ },
|
|
|
+ outAmountConfirm(val){
|
|
|
+ let that=this;
|
|
|
+ if (val.index == 0) {
|
|
|
+ that.outAmountShow = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(that.$util.isEmpty(that.outAmount) || Number(that.outAmount)<=0){
|
|
|
+ that.$msg('请填写金额')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ outMoney({amount:that.outAmount}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg('操作成功')
|
|
|
+ that.outAmountShow = false
|
|
|
+ that.getMyInfo()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ inAmountConfirm(val){
|
|
|
+ let that=this;
|
|
|
+ if (val.index == 0) {
|
|
|
+ that.inAmountShow = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(that.$util.isEmpty(that.inAmount) || Number(that.inAmount)<=0){
|
|
|
+ that.$msg('请填写金额')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ inMoney({amount:that.inAmount}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg('操作成功')
|
|
|
+ that.inAmountShow = false
|
|
|
+ that.getMyInfo()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
getMyInfo () {
|
|
|
mainMy().then(res=>{
|
|
|
if(res.code == 1){
|
|
|
@@ -611,6 +718,10 @@ export default {
|
|
|
flex-basis: 100%;
|
|
|
margin-bottom: 8upx;
|
|
|
}
|
|
|
+ &.cash-actions > text:first-child {
|
|
|
+ flex-basis: auto;
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
& .action-btn {
|
|
|
border: 1upx solid #e5e5e5;
|
|
|
border-radius: 20upx;
|
|
|
@@ -632,6 +743,13 @@ export default {
|
|
|
height: 50upx;
|
|
|
border-radius: 25upx;
|
|
|
}
|
|
|
+ & .to-cash {
|
|
|
+ margin-left:30upx;
|
|
|
+ border: 1upx solid rgba(0, 0, 0, 0.2);
|
|
|
+ border-radius: 25upx;
|
|
|
+ font-size: 22upx;
|
|
|
+ padding: 6upx 17upx 6upx 17upx;
|
|
|
+ }
|
|
|
}
|
|
|
& .user-open_bx {
|
|
|
margin-top: 20upx;
|