shish 2 лет назад
Родитель
Сommit
ab0f0c7690
4 измененных файлов с 50 добавлено и 37 удалено
  1. 44 35
      hdApp/src/admin/ghs/pay.vue
  2. 1 1
      hdApp/src/admin/home/workbench.vue
  3. 4 0
      hdApp/src/api/ghs/index.js
  4. 1 1
      hdApp/src/pages.json

+ 44 - 35
hdApp/src/admin/ghs/pay.vue

@@ -3,9 +3,13 @@
 		<div class="delivery-wrap">
 			<div class="shop-logo-wrap">
 				<div class="logo-img">
-					<img :src="`${constant.imgUrl}/logo4.png`" alt mode="widthFix" />
+					<image class="logo" :src="`${constant.imgUrl}/logo4.png`" alt mode="widthFix" ></image>
+					<div class="title">{{ ghsInfo.name?ghsInfo.name:'' }}</div>
 				</div>
 			</div>
+			<div v-if="Number(customInfo.remainDebtAmount)>0" style="padding:10upx 0 25upx 10upx;font-size:30upx;">
+				{{ customInfo.name?customInfo.name:'' }},您的待结款<text style="color:red;font-weight:bold;">{{ customInfo.remainDebtAmount }}元</text>,这里可直接付款
+			</div>
 			<div class="module-com pay-input-wrap">
 				<pay-input-module :focus="inpFocus" :num="amount" @focusFn="focusFn" @blurFn="blurFn" @clickKey="clickKeyFn" />
 			</div>
@@ -28,6 +32,7 @@
 	import AppCouponSel from '@/components/app-coupon-sel'
 	import { share } from '@/mixins'
 	import { fastPay } from '@/api/pay'
+	import { getGhsData } from '@/api/ghs'
 	import { recharge } from '@/api/member'
 	import { getOrderShop } from '@/utils/config'
 	export default {
@@ -44,9 +49,11 @@
 				inpFocus: false,
 				amount: '',
 				form: { payWay: 0 },
-				aliPayHtml: '',
-				passwordModal: false,
-				payCallData: null
+				payCallData: null,
+				id:0,
+				salt:'',
+				ghsInfo:[],
+				customInfo:[]
 			}
 		},
 		computed: {
@@ -54,9 +61,9 @@
 			...mapGetters({ shopUser: 'getShopUser' })
 		},
 		onLoad(option) {
-            // #ifdef H5
+			// #ifdef H5
 			this.specialInit()
-            // #endif
+			// #endif
 		},
 		mounted() {},
 		methods: {
@@ -64,6 +71,20 @@
 				this.specialInit();
 			},
 			specialInit() {
+				let that = this
+				let id = this.option.id?this.option.id:0
+				let salt = this.option.salt?this.option.salt:''
+				this.id = id
+				this.salt = salt
+				getGhsData({id:id,salt:salt}).then(res=>{
+					if(res.code == 1){
+						if (res.data && res.data.ghs && !this.$util.isEmpty(res.data.ghs)){
+							that.ghsInfo = res.data.ghs
+							that.customInfo = res.data.custom?res.data.custom:[]
+						}
+					}
+				})
+
 				getOrderShop(true).then(res => {
 					this.inpFocus = true
 					// 设置分享
@@ -136,17 +157,6 @@
 			hideAlert() {
 				this.$util.pageTo('/pages/user/password')
 			},
-			passwordModalClick(e) {
-				if (e.index === 0) {
-					this.modalCancel()
-				} else {
-					this.toPay()
-				}
-			},
-			modalCancel() {
-				this.passwordModal = false
-			},
-			// 支付成功
 			paySuccess() {
 				this.$util.pageTo({
 					url: '/pages/callback/index',
@@ -183,21 +193,7 @@
 		font-size: 30upx;
 		box-shadow: 4upx 4upx 10upx #eee;
 	}
-
 	.pay-wrap {
-		.logo-wrap {
-			padding-top: 70upx;
-			padding-bottom: 60upx;
-			text-align: center;
-			.logo-img {
-				width: 120upx;
-				margin: 0 auto 20upx;
-				border-radius:10upx;
-				img {
-					border-radius: 50%;
-				}
-			}
-		}
 		.pay-input-wrap {
 			background-color: #fff;
 			border-top-left-radius: 20upx;
@@ -248,11 +244,24 @@
 			padding-bottom: 20upx;
 			@include disFlex(center, center);
 			.logo-img {
-				width: 120upx;
-				border-radius: 10upx;
+				width: 100%;
 				margin: 10upx auto;
-				img {
-					border-radius: 50%;
+				align-items: center;
+				.logo {
+					width: 100upx;
+					height:100upx;
+					border-radius: 10upx;
+					margin-left:10upx;
+					float: left;
+				}
+				.title{
+					margin-left:20upx;
+					float:left;
+					width:600upx;
+					height:100upx;
+					line-height:100upx;
+					font-size:38upx;
+					font-weight: bold;
 				}
 			}
 		}

+ 1 - 1
hdApp/src/admin/home/workbench.vue

@@ -133,7 +133,7 @@
     <button class="admin-button-com mini-btn blue" style="margin-left:11upx;padding-top:17upx;padding-bottom:17upx;" @click="pageTo({url:'/admin/stat/cgItem'})">采购统计</button>
     <button class="admin-button-com mini-btn blue" style="margin-left:11upx;padding-top:17upx;padding-bottom:17upx;" @click="goMore()">更多</button>
   </view>
-  <view style="text-align:center;">{{ loginInfo.admin && loginInfo.admin.name ? loginInfo.admin.name : '' }} {{ loginInfo.admin && loginInfo.admin.mobile ? loginInfo.admin.mobile : '' }}</view>
+  <view style="text-align:center;font-size:29upx;">{{ loginInfo.admin && loginInfo.admin.name ? loginInfo.admin.name : '' }} {{ loginInfo.admin && loginInfo.admin.mobile ? loginInfo.admin.mobile : '' }}</view>
   <template v-if="!$util.isEmpty(ad)">
     <block v-for="(adInfo, adIndex) in ad" :key="adIndex">
       <view style="text-align:center;" @click.stop="pageTo({url:adInfo.url})">

+ 4 - 0
hdApp/src/api/ghs/index.js

@@ -1,5 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+export const getGhsData = data => {
+	return https.get('/ghs/get-ghs-data', data)
+}
+
 export const getWlList = data => {
 	return https.get('/ghs/get-wl-list', data)
 }

+ 1 - 1
hdApp/src/pages.json

@@ -166,7 +166,7 @@
 			"root": "admin/ghs",
 			"pages": [
 				{ "path": "shop", "style": {"navigationBarTitleText": "供货商"}},
-				{ "path": "pay", "style": {"navigationBarTitleText": "充值销账"}},
+				{ "path": "pay", "style": {"navigationBarTitleText": "收银台"}},
 				{ "path": "addGhs", "style": {"navigationBarTitleText": "添加"}},
 				{ "path": "debtChange", "style": {"navigationBarTitleText": "欠款变动明细"}},
 				{ "path": "balanceChange", "style": {"navigationBarTitleText": "余额变动明细"}}