Commit 4d5eb0c3 authored by pengguangpu's avatar pengguangpu

合并远程代码,解决冲突,自测;

parents a0181d1d ac55c441
{ {
"pages": [ "pages": [
"pages/index/index", "pages/index/index",
"pages/poster/poster",
"pages/home/home", "pages/home/home",
"pages/poster/poster", "pages/poster/poster",
"pages/waitoperate/waitoperate", "pages/waitoperate/waitoperate",
......
...@@ -30,3 +30,6 @@ export const ACTION_GO_HOME = "ACTION_GO_HOME"; ...@@ -30,3 +30,6 @@ export const ACTION_GO_HOME = "ACTION_GO_HOME";
//获取账户信息 //获取账户信息
export const ACTION_GET_ACCOUNT = "ACTION_GET_ACCOUNT"; export const ACTION_GET_ACCOUNT = "ACTION_GET_ACCOUNT";
//直接收款
export const ACTION_DIRECT_PAYMENT = "ACTION_DIRECT_PAYMENT";
/* home样式 */ /* home样式 */
.homePage { .homePage {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -7,8 +6,22 @@ ...@@ -7,8 +6,22 @@
height: 100%; height: 100%;
background: white; background: white;
/* border: 2px solid red; */ /* border: 2px solid red; */
position: absolute
}
/* home样式 */
.homePageFilter {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
background: #F3F7F9;
filter: blur(3px);
position: absolute;
} }
.homeTopView { .homeTopView {
position: relative; position: relative;
width: 750rpx; width: 750rpx;
...@@ -502,6 +515,14 @@ ...@@ -502,6 +515,14 @@
height: 155rpx; height: 155rpx;
} }
/* 自定义键盘 */
.land-keybord{
width: 100%;
height: 100%;
position: absolute;
border: 2px solid red;
}
/* 结算页 */ /* 结算页 */
.balanceTopView { .balanceTopView {
......
<view> <view>
<view class="homePage" hidden="{{!pageShow['home']}}"> <view class="homePage" hidden="{{!pageShow['home']}}">
<view class="topView"> <view class="{{scene != 0 ? 'homePageFilter' : 'homePage' }}" hidden="{{!pageShow['home']}}">
<view class="store"> <view class="homeTopView">
<image mode="aspectFit" style="position:absolute;width:24rpx;height:21rpx;left: 19rpx;top:19rpx;" src="/images/icon_store.png"/> <view class="store">
<text style="position:absolute;font-size:19rpx;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:rgba(0,0,0,0.85);line-height:22rpx;left:55rpx;top:19rpx;">{{storeName}}</text> <image mode="aspectFit" style="position:absolute;width:24rpx;height:21rpx;left: 19rpx;top:19rpx;" src="/images/icon_store.png"/>
</view> <text style="position:absolute;font-size:19rpx;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:rgba(0,0,0,0.85);line-height:22rpx;left:55rpx;top:19rpx;">{{storeName}}</text>
<view style="position:absolute;font-size:22rpx;font-family:PingFangSC-Medium,PingFang SC;font-weight:500;color:rgba(51,51,51,1);line-height:22rpx;left:0rpx;top:19rpx;width:100%;text-align:center;">首页</view> </view>
<view style="display:flex;flex-direction:row-reverse;position:absolute;right:19rpx;top:19rpx;width:auto;background:#ffffff;"> <view style="position:absolute;font-size:22rpx;font-family:PingFangSC-Medium,PingFang SC;font-weight:500;color:rgba(51,51,51,1);line-height:22rpx;left:0rpx;top:19rpx;width:100%;text-align:center;">首页</view>
<view style="font-size:19rpx;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:rgba(51,51,51,1);line-height:22rpx;">退出</view> <view style="display:flex;flex-direction:row-reverse;position:absolute;right:19rpx;top:19rpx;width:auto;background:#ffffff;">
<image mode="aspectFit" src="/images/icon_exit.png" style="position:relative;width:19rpx;height:19rpx;margin-right:8rpx;margin-top:1rpx;"/> <view style="font-size:19rpx;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:rgba(51,51,51,1);line-height:22rpx;">退出</view>
<image mode="aspectFit" src="/images/icon_exit.png" style="position:relative;width:19rpx;height:19rpx;margin-right:8rpx;margin-top:1rpx;"/>
</view>
</view> </view>
</view> <view class="homeBodyView" style="height:100%;">
<view class="homeBodyView" style="height:100%;"> <swiper indicator-dots="{{true}}">
<swiper indicator-dots="{{true}}"> <swiper-item>
<swiper-item> <view style="margin:0 auto;width:100%;height:352rpx;display:flex;flex-direction:column;">
<view style="margin:0 auto;width:100%;height:352rpx;display:flex;flex-direction:column;"> <view style="margin:0 auto;width:698rpx;height:100%;display:flex; flex-direction: row;margin-top:30rpx;flex-wrap:wrap;align-content:flex-start;">
<view style="margin:0 auto;width:698rpx;height:100%;display:flex; flex-direction: row;margin-top:30rpx;flex-wrap:wrap;align-content:flex-start;"> <view class="homeItemView" onTap="sendGoToCollections">
<view class="homeItemView" onTap="sendGoToCollections"> <image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_cashier.png"/>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_cashier.png"/> <text class="homeItemText">收银</text>
<text class="homeItemText">收银</text> </view>
</view> <view class="homeItemView" onTap="onHomeCashierImmediatelyClicked">
<view class="homeItemView" onTap="onHomeCashierImmediatelyClicked"> <image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_cashier_immediately.png"/>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_cashier_immediately.png"/> <text class="homeItemText">直接收款</text>
<text class="homeItemText">直接收款</text> </view>
</view> <view class="homeItemView" onTap="onHomeExchangeClicked">
<view class="homeItemView" onTap="onHomeExchangeClicked"> <image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_exchange.png"/>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_exchange.png"/> <text class="homeItemText">兑换</text>
<text class="homeItemText">兑换</text> </view>
</view> <view class="homeItemView" onTap="onHomePosterClicked">
<view class="homeItemView" onTap="onHomePosterClicked"> <image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_poster.png"/>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_poster.png"/> <text class="homeItemText">海报</text>
<text class="homeItemText">海报</text> </view>
</view> <view class="homeItemView" style="margin-top:12rpx;" onTap="onHomeRefundClicked">
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomeRefundClicked"> <image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_refund.png"/>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_refund.png"/> <text class="homeItemText">退款</text>
<text class="homeItemText">退款</text> </view>
</view> <view class="homeItemView" style="margin-top:12rpx;" onTap="onHomePrintLastOrderClicked">
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomePrintLastOrderClicked"> <image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_print_last_order.png"/>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_print_last_order.png"/> <text class="homeItemText">打印上一单</text>
<text class="homeItemText">打印上一单</text> </view>
</view> <view class="homeItemView" style="margin-top:12rpx;" onTap="onHomeVerifyClicked">
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomeVerifyClicked"> <image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_verify.png"/>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_verify.png"/> <text class="homeItemText">核验</text>
<text class="homeItemText">核验</text> </view>
</view> <view class="homeItemView" style="margin-top:12rpx;" onTap="onHomePickUpGoodsClicked">
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomePickUpGoodsClicked"> <image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_pick_up_goods.png"/>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_pick_up_goods.png"/> <text class="homeItemText">提货</text>
<text class="homeItemText">提货</text> </view>
</view> </view>
</view> </view>
</view> </swiper-item>
</swiper-item> <swiper-item>
<swiper-item> <view style="margin:0 auto;width:100%;height:352rpx;display:flex;flex-direction:column;">
<view style="margin:0 auto;width:100%;height:352rpx;display:flex;flex-direction:column;"> <view style="margin:0 auto;width:698rpx;height:100%;display:flex; flex-direction: row;margin-top:30rpx;flex-wrap:wrap;align-content:flex-start;">
<view style="margin:0 auto;width:698rpx;height:100%;display:flex; flex-direction: row;margin-top:30rpx;flex-wrap:wrap;align-content:flex-start;"> <view class="homeItemView" onTap="onHomeDayCheckClicked">
<view class="homeItemView" onTap="onHomeDayCheckClicked"> <image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_day_check.png"/>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_day_check.png"/> <text class="homeItemText">日结</text>
<text class="homeItemText">日结</text> </view>
</view> <view class="homeItemView" onTap="onHomeAboutAppClicked">
<view class="homeItemView" onTap="onHomeAboutAppClicked"> <image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_about_app.png"/>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_about_app.png"/> <text class="homeItemText">关于系统</text>
<text class="homeItemText">关于系统</text> </view>
</view> <view class="homeItemView" onTap="onHomeSysSettingClicked">
<view class="homeItemView" onTap="onHomeSysSettingClicked"> <image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_sys_setting.png"/>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_sys_setting.png"/> <text class="homeItemText">系统设置</text>
<text class="homeItemText">系统设置</text> </view>
</view> <view class="homeItemView" onTap="onHomeAppSettingClicked">
<view class="homeItemView" onTap="onHomeAppSettingClicked"> <image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_app_setting.png"/>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_app_setting.png"/> <text class="homeItemText">应用设置</text>
<text class="homeItemText">应用设置</text> </view>
</view> </view>
</view> </view>
</view> </swiper-item>
</swiper-item> </swiper>
</swiper> </view>
</view> </view>
</view> </view>
<!--扫码页--> <!--扫码页-->
...@@ -146,9 +148,6 @@ ...@@ -146,9 +148,6 @@
<button class="cancel-use-coupon" size="default" type="ghost" onTap="couponBack">取消</button> <button class="cancel-use-coupon" size="default" type="ghost" onTap="couponBack">取消</button>
</view> </view>
</view> </view>
<!-- 键盘 -->
<land-keybord scene="{{scene}}" onKeyBordFinished="onKeyBordFinished" onKeyBordClose="onKeyBordClose">
</land-keybord>
</view> </view>
<!-- 结算页 --> <!-- 结算页 -->
<view class="balance" hidden="{{!pageShow['waitoperate']}}"> <view class="balance" hidden="{{!pageShow['waitoperate']}}">
...@@ -243,4 +242,7 @@ ...@@ -243,4 +242,7 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 键盘 -->
<land-keybord scene="{{scene}}" onKeyBordFinished="onKeyBordFinished" onKeyBordClose="onKeyBordClose">
</land-keybord>
</view> </view>
\ No newline at end of file
...@@ -10,6 +10,8 @@ import { ACTION_ON_PAY_SUCCESS } from '../../const/actioncmd' ...@@ -10,6 +10,8 @@ import { ACTION_ON_PAY_SUCCESS } from '../../const/actioncmd'
import { ACTION_ON_PAY_FAILED } from '../../const/actioncmd' import { ACTION_ON_PAY_FAILED } from '../../const/actioncmd'
import { ACTION_GO_HOME } from '../../const/actioncmd' import { ACTION_GO_HOME } from '../../const/actioncmd'
import { ACTION_GET_ACCOUNT } from '../../const/actioncmd' import { ACTION_GET_ACCOUNT } from '../../const/actioncmd'
import { ACTION_DIRECT_PAYMENT } from '../../const/actioncmd'
Page({ Page({
data: { data: {
...@@ -126,7 +128,7 @@ Page({ ...@@ -126,7 +128,7 @@ Page({
context.goPage('landscan'); context.goPage('landscan');
} else if (res.action == ACTION_GO_BALANCE) { } else if (res.action == ACTION_GO_BALANCE) {
//跳转 //跳转
context.goPage('waitoperate'); context.goPage('waitoperate');
} else if (res.action == ACTION_ON_PAY_SUCCESS) { } else if (res.action == ACTION_ON_PAY_SUCCESS) {
//分转元 //分转元
...@@ -149,6 +151,11 @@ Page({ ...@@ -149,6 +151,11 @@ Page({
context.setData({ context.setData({
storeName: res.data.storeName storeName: res.data.storeName
}); });
}else if(res.action == ACTION_DIRECT_PAYMENT){
if(res.data != null){
context.setData({totalPrice:res.data})
}
context.goPage('waitoperate');
} }
} }
}); });
...@@ -331,6 +338,36 @@ Page({ ...@@ -331,6 +338,36 @@ Page({
}); });
}, },
//直接收银
directPayment(e) {
this.setData({scene:3})
},
//发生直接收银事件
sendPaymentToFront(payment) {
var commonRequest = {
action: ACTION_DIRECT_PAYMENT,
data: payment
};
let context = this;
my.ix.sendBuddyMessage({
target: getApp().globalData.frontScreenAppId,
data: commonRequest,
success: (res) => {
console.log("发送直接收款事件到前屏小程序 成功 ===》" + JSON.stringify(res));
},
fail: (res) => {
console.log("发送收款事件到前屏小程序 失败 ===》 " + JSON.stringify(res));
my.showToast({
type: 'fail',
content: '操作失败',
duration: 3000,
success: () => {
},
});
},
});
},
/**landscan页面逻辑方法 */ /**landscan页面逻辑方法 */
//把所有的商品数据发送到后屏 //把所有的商品数据发送到后屏
...@@ -356,10 +393,17 @@ Page({ ...@@ -356,10 +393,17 @@ Page({
//键盘完成 //键盘完成
onKeyBordFinished(barcode) { onKeyBordFinished(result) {
if(this.data.scene == 3){
this.sendPaymentToFront(result)
}else if(this.data.scene == 1){
this.sendGoodsInfoToFront(result)
}
this.onKeyBordClose(); this.onKeyBordClose();
},
//把手输条码发生到前屏
sendGoodsInfoToFront(barcode) {
my.showLoading({}); my.showLoading({});
var commonRequest = { var commonRequest = {
action: ACTION_REQUEST_GOOD_INFO, action: ACTION_REQUEST_GOOD_INFO,
...@@ -376,15 +420,19 @@ Page({ ...@@ -376,15 +420,19 @@ Page({
my.hideLoading(); my.hideLoading();
my.showToast({ my.showToast({
type: 'fail', type: 'fail',
content: '发送商品条码到后屏失败', content: '操作失败',
duration: 3000, duration: 3000,
success: () => { success: () => {
}, },
}); });
} }
}) })
}, },
// 键盘关闭 // 键盘关闭
onKeyBordClose() { onKeyBordClose() {
this.setData({ scene: 0 }) this.setData({ scene: 0 })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment