Commit d1e45fda by 张立顺

feat 样式功能修改

1 parent 42d18188
// components/navigationBar/navigationBar.js // components/navigationBar/navigationBar.js
import util from '../../utils/util' import util from '../../utils/util'
const app = getApp()
Component({ Component({
options: { options: {
styleIsolation: 'shared' styleIsolation: 'shared'
...@@ -16,7 +17,16 @@ Component({ ...@@ -16,7 +17,16 @@ Component({
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: {}, data: {
// navigationBarHeight: 70
// // 状态栏高度
// statusBarHeight: app.globalData.statusBarHeight,
// // 导航栏高度
// navigationBarHeight: app.globalData.navigationBarHeight,
// navigationBarStyle: 'font-size: var(--fontSize34)',
// // navigationBarTextWidth: `width:${app.globalData.navigationBarWidth / 2}rpx;padding:0 ${app.globalData.navigationBarPadding / 2}rpx; 0 ${app.globalData.navigationBarPadding / 2}rpx;`
// navigationBarTextWidth: `width:${app.globalData.navigationBarWidth / 2}rpx;padding:${app.globalData.navigationBarPadding / 2}rpx;`
},
/** /**
* 组件的方法列表 * 组件的方法列表
...@@ -33,6 +43,12 @@ Component({ ...@@ -33,6 +43,12 @@ Component({
* 获取自定义导航栏信息 * 获取自定义导航栏信息
*/ */
let _this = this let _this = this
// 获取屏幕宽度和高度
const { windowWidth, windowHeight } = wx.getSystemInfoSync();
// 判断屏幕方向
const isLandscape = windowWidth > windowHeight; // '横屏' : '竖屏'
wx.getSystemInfo({ wx.getSystemInfo({
success(res) { success(res) {
let { let {
...@@ -47,13 +63,14 @@ Component({ ...@@ -47,13 +63,14 @@ Component({
top top
} = wx.getMenuButtonBoundingClientRect() } = wx.getMenuButtonBoundingClientRect()
let navigationBarHeight = height + (top - statusBarHeight) * 2 + 5 // let navigationBarHeight = height + (top - statusBarHeight) * 2 + 5
let navigationBarHeight = `var(--fontSize${(height + (top - statusBarHeight) * 2 + 5) * (isLandscape ? 1 : 2)})`
let navigationBarPadding = screenWidth - right let navigationBarPadding = screenWidth - right
let navigationBarWidth = screenWidth - (navigationBarPadding * 2 + width) - width let navigationBarWidth = screenWidth - (navigationBarPadding * 2 + width) - width
// if(deviceOrientation == 'landscape') statusBarHeight = 0 // if(deviceOrientation == 'landscape') statusBarHeight = 0
_this.setData({ _this.setData({
statusBarHeight, statusBarHeight: `var(--fontSize${statusBarHeight * (isLandscape ? 1 : 2)})`,
navigationBarHeight, navigationBarHeight,
// navigationBarStyle: `font-size:${fontSizeSetting}px;`, // navigationBarStyle: `font-size:${fontSizeSetting}px;`,
navigationBarStyle: 'font-size: var(--fontSize34)', navigationBarStyle: 'font-size: var(--fontSize34)',
...@@ -72,15 +89,49 @@ Component({ ...@@ -72,15 +89,49 @@ Component({
}, },
this this
) )
}, 100) }, 0)
} }
}, },
pageLifetimes: { pageLifetimes: {
resize(res) { resize(res) {
if (res.deviceOrientation == 'landscape') this.setData({ if (res.deviceOrientation == 'landscape') {
statusBarHeight: 0 wx.getSystemInfo({
success(res) {
let {
fontSizeSetting,
statusBarHeight,
screenWidth
} = res
const {
height,
right,
width,
top
} = wx.getMenuButtonBoundingClientRect()
// let navigationBarHeight = height + (top - statusBarHeight) * 2 + 5
let navigationBarHeight = `var(--fontSize${(height + (top - statusBarHeight) * 2 + 5)})`
let navigationBarPadding = screenWidth - right
let navigationBarWidth = screenWidth - (navigationBarPadding * 2 + width) - width
// if(deviceOrientation == 'landscape') statusBarHeight = 0
_this.setData({
statusBarHeight: `var(--fontSize${statusBarHeight})`,
navigationBarHeight,
// navigationBarStyle: `font-size:${fontSizeSetting}px;`,
navigationBarStyle: 'font-size: var(--fontSize34)',
navigationBarTextWidth: `width:${navigationBarWidth}px;padding:0 ${navigationBarPadding}px; 0 ${navigationBarPadding}px;`
})
}
}) })
else this.init() } else {
this.init()
}
// this.setData({
// statusBarHeight: 0
// })
// else
} }
}, },
ready() { ready() {
......
<view class='navigation-bar' id='navigation-bar' style='padding-top:{{statusBarHeight}}px;height:{{navigationBarHeight}}px;{{navStyle}}'> <view class='navigation-bar' id='navigation-bar' style='padding-top:{{statusBarHeight}};height:{{navigationBarHeight}};{{navStyle}}'>
<!-- hidden="{{!showNavBar}}" wx:if="{{showNavBar}}" --> <!-- hidden="{{!showNavBar}}" wx:if="{{showNavBar}}" -->
<view class="navigation-bar-box" style="{{navigationBarStyle}}"> <view class="navigation-bar-box" style="{{navigationBarStyle}}">
<view class="navigation-bar-titleText" style="{{navigationBarTextWidth}}"> <view class="navigation-bar-titleText" style="{{navigationBarTextWidth}}">
<slot/> <slot />
</view> </view>
<block wx:if="{{showBack}}"> <block wx:if="{{showBack}}">
<view class="back-box" bindtap="back"> <view class="back-box" bindtap="back">
...@@ -20,4 +20,3 @@ ...@@ -20,4 +20,3 @@
</block> </block>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
<view class="popup" hidden="{{!showPopup}}" catchtouchmove="noScroll"> <view class="popup" hidden="{{!showPopup}}">
<!-- catchtouchmove="noScroll" -->
<view class="popup-bg" bindtap="hidePopup" /> <view class="popup-bg" bindtap="hidePopup" />
<view class="popup-content" style="height:{{height}}"> <view class="popup-content" style="height:{{height}}">
<block wx:if="{{title}}"> <block wx:if="{{title}}">
...@@ -6,7 +7,7 @@ ...@@ -6,7 +7,7 @@
</block> </block>
<!-- {{isFullSucreen?title?'isFullSucreen':'isFullSucreen-notitle':''}}" --> <!-- {{isFullSucreen?title?'isFullSucreen':'isFullSucreen-notitle':''}}" -->
<view class="{{tips?'popup-slot-other':'popup-slot'}}"> <view class="{{tips?'popup-slot-other':'popup-slot'}}">
<slot/> <slot />
</view> </view>
<block wx:if="{{tips}}"> <block wx:if="{{tips}}">
<view class="tips text-center">{{tips}}</view> <view class="tips text-center">{{tips}}</view>
...@@ -18,4 +19,3 @@ ...@@ -18,4 +19,3 @@
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/aiInspection/aiInspection.wxss */
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/aiInspectionDetail/aiInspectionDetail.wxss */
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/aiInspectionReception/aiInspectionReception.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -158,7 +158,8 @@ ...@@ -158,7 +158,8 @@
</view> </view>
</block> </block>
<block wx:if="{{showWorkBox}}"> <block wx:if="{{showWorkBox}}">
<view class="work-box" catchtouchmove="noScroll"> <!-- catchtouchmove="noScroll" -->
<view class="work-box">
<view class="work-bg" bindtap="showWork" /> <view class="work-bg" bindtap="showWork" />
<view class="work-content"> <view class="work-content">
<view class="work-title text-center hasborder">工位设置</view> <view class="work-title text-center hasborder">工位设置</view>
......
...@@ -316,7 +316,7 @@ page { ...@@ -316,7 +316,7 @@ page {
overflow: hidden; overflow: hidden;
left: 0; left: 0;
width: 100%; width: 100%;
height: 80%; height: 73%;
overflow: scroll; overflow: scroll;
padding: 0 var(--fontSize32); padding: 0 var(--fontSize32);
box-sizing: border-box; box-sizing: border-box;
......
...@@ -3,20 +3,14 @@ ...@@ -3,20 +3,14 @@
{{!show_confirm?'工单列表':'筛选'}} {{!show_confirm?'工单列表':'筛选'}}
</navigation-bar> </navigation-bar>
<!-- wx:if="{{navBarHeight > 0}}" --> <!-- wx:if="{{navBarHeight > 0}}" -->
<block wx:if="{{navBarHeight > 0}}" > <!-- -->
<block wx:if="{{navBarHeight > 0}}">
<view class="main" style="margin-top:{{navBarHeight}}px"> <view class="main" style="margin-top:{{navBarHeight}}px">
<view class="to-box" style="top:{{navBarHeight}}px"> <view class="to-box" style="top:{{navBarHeight}}px">
<view class="search-box"> <view class="search-box">
<view class="search-input"> <view class="search-input">
<image src="/images/search.png" class="search-icon" /> <image src="/images/search.png" class="search-icon" />
<input <input type="text" placeholder="客户姓名/商品名称/订单编号/手机号" class="input" value="{{keyword}}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
type="text"
placeholder="客户姓名/商品名称/订单编号/手机号"
class="input"
value="{{keyword}}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search" />
<block wx:if="{{keyword}}"> <block wx:if="{{keyword}}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" /> <image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block> </block>
...@@ -32,42 +26,15 @@ ...@@ -32,42 +26,15 @@
</view> </view>
<!-- 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 , 9 已撤销 --> <!-- 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 , 9 已撤销 -->
<block wx:if="{{flag}}"> <block wx:if="{{flag}}">
<scroll-view <scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="search" bindscrolltolower="scrollonReachBottom" bindscroll="onPageScroll" class="list" style="height:calc(100vh - {{navBarHeight}}px - var(--fontSize160));" refresher-threshold="104" refresher-triggered="{{triggered}}">
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="search"
bindscrolltolower="scrollonReachBottom"
bindscroll="onPageScroll"
class="list"
style="height:calc(100vh - {{navBarHeight}}px - var(--fontSize160));"
refresher-threshold="104"
refresher-triggered="{{triggered}}">
<block wx:if="{{list.length > 0}}"> <block wx:if="{{list.length > 0}}">
<block wx:for="{{list}}" wx:key="index"> <block wx:for="{{list}}" wx:key="index">
<block <block wx:for="{{item}}" wx:for-item="li" wx:for-index="ind" wx:key="ind">
wx:for="{{item}}" <view style="{{li.txtStyle}}" class="touch-item {{li.isTouchMove ? 'touch-move-active' : ''}}" data-ind='{{ind}}' data-index='{{index}}'>
wx:for-item="li"
wx:for-index="ind"
wx:key="ind">
<view
style="{{li.txtStyle}}"
class="touch-item {{li.isTouchMove ? 'touch-move-active' : ''}}"
data-ind='{{ind}}'
data-index='{{index}}'>
<!-- 广汇订单出库成功 --> <!-- 广汇订单出库成功 -->
<image wx:if="{{li.outboundStatus == 4}}" class="stockIcon" src="../../images/stockIcon.png" /> <image wx:if="{{li.outboundStatus == 4}}" class="stockIcon" src="../../images/stockIcon.png" />
<!-- class="item content {{li.status == 9 ||li.status ==11?'gray':''}} " --> <!-- class="item content {{li.status == 9 ||li.status ==11?'gray':''}} " -->
<view <view class="item content" catchtap="jump" data-ind='{{ind}}' data-index='{{index}}' bindtouchstart="touchstart" bindtouchmove="touchmove" bindtouchend="touchE" data-name="{{li.status == 3 ? 'confirmOrder' : li.status == 1 ? (li.filmOrder == 1 ? 'premiumUpgrade' : 'createOrder') : 'orderDetail'}}" data-item="{{li}}">
class="item content"
catchtap="jump"
data-ind='{{ind}}'
data-index='{{index}}'
bindtouchstart="touchstart"
bindtouchmove="touchmove"
bindtouchend="touchE"
data-name="{{li.status == 3 ? 'confirmOrder' : li.status == 1 ? (li.filmOrder == 1 ? 'premiumUpgrade' : 'createOrder') : 'orderDetail'}}"
data-item="{{li}}">
<view class="status text-center" style="color:{{li.statuscolor }};background-color:{{li.statusbackground }};"> <view class="status text-center" style="color:{{li.statuscolor }};background-color:{{li.statusbackground }};">
<block wx:if="{{li.status == 1||li.status == 3}}"> <block wx:if="{{li.status == 1||li.status == 3}}">
<block wx:if="{{status[li.status].background}}"> <block wx:if="{{status[li.status].background}}">
...@@ -84,15 +51,11 @@ ...@@ -84,15 +51,11 @@
<view class="name"> <view class="name">
<!-- <image src="/images/avatar.png" /> --> <!-- <image src="/images/avatar.png" /> -->
<view class="name-text text-hide ">{{li.customer.customerName}}</view> <view class="name-text text-hide ">{{li.customer.customerName}}</view>
<image class="name-sex-icon" src="{{IMG_URL}}{{li.customer.customerSex == 1 ? 'miniProgram/icon-man.png' : 'miniProgram/icon-woman.png'}}" mode=""/> <image class="name-sex-icon" src="{{IMG_URL}}{{li.customer.customerSex == 1 ? 'miniProgram/icon-man.png' : 'miniProgram/icon-woman.png'}}" mode="" />
</view> </view>
<view class="goods-list" style="padding-bottom:{{li.subOrderList.length<1?0:''}}"> <view class="goods-list" style="padding-bottom:{{li.subOrderList.length<1?0:''}}">
<block wx:if="{{li.subOrderList.length}}"> <block wx:if="{{li.subOrderList.length}}">
<block <block wx:for="{{li.subOrderList}}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex">
wx:for="{{li.subOrderList}}"
wx:key="sindex"
wx:for-item="i"
wx:for-index="sindex">
<view class="goods" wx:if="{{li.showAllGoodsListFlag ? true : sindex < 2}}"> <view class="goods" wx:if="{{li.showAllGoodsListFlag ? true : sindex < 2}}">
<view class="goods-name text-hide"> <view class="goods-name text-hide">
{{filter.replaceItemText(i.upgradeGoodsAlias) ||filter.replaceItemText(i.upgradeGoodsName) || ''}} {{filter.replaceItemText(i.upgradeGoodsAlias) ||filter.replaceItemText(i.upgradeGoodsName) || ''}}
...@@ -112,21 +75,13 @@ ...@@ -112,21 +75,13 @@
</block> </block>
</view> </view>
<view class="order-list"> <view class="order-list">
<block <block wx:for="{{orderObj}}" wx:key="sindex" wx:for-index="sindex" wx:for-item="i">
wx:for="{{orderObj}}"
wx:key="sindex"
wx:for-index="sindex"
wx:for-item="i">
<view class="order"> <view class="order">
<view class="order-label">{{i.label}}</view> <view class="order-label">{{i.label}}</view>
<view class="order-value"> <view class="order-value">
<block wx:if="{{i.arr}}"> <block wx:if="{{i.arr}}">
<block wx:if="{{li[i.arr[1]]}}"> <block wx:if="{{li[i.arr[1]]}}">
<block <block wx:for="{{i.arr}}" wx:key="sindex" wx:for-index="arr_index" wx:for-item="k">
wx:for="{{i.arr}}"
wx:key="sindex"
wx:for-index="arr_index"
wx:for-item="k">
<view class="order-value-item text-hide"> <view class="order-value-item text-hide">
<block wx:if="{{arr_index == 1}}"> <block wx:if="{{arr_index == 1}}">
<text class="split">|</text> <text class="split">|</text>
...@@ -148,9 +103,9 @@ ...@@ -148,9 +103,9 @@
<view class="payType-label">支付方式</view> <view class="payType-label">支付方式</view>
<view class="payType-value"> <view class="payType-value">
{{payType[li['selectPayType']]}} {{payType[li['selectPayType']]}}
<image wx:if="{{li.selectPayType == 1}}" class="payType-image" src="{{IMG_URL}}miniProgram/wxPay.png" mode=""/> <image wx:if="{{li.selectPayType == 1}}" class="payType-image" src="{{IMG_URL}}miniProgram/wxPay.png" mode="" />
<image wx:if="{{li.selectPayType == 2}}" class="payType-image" src="{{IMG_URL}}miniProgram/store_pay.png" mode=""/> <image wx:if="{{li.selectPayType == 2}}" class="payType-image" src="{{IMG_URL}}miniProgram/store_pay.png" mode="" />
<image wx:if="{{li.selectPayType == 3}}" class="payType-image" src="{{IMG_URL}}miniProgram/posPay.png" mode=""/> <image wx:if="{{li.selectPayType == 3}}" class="payType-image" src="{{IMG_URL}}miniProgram/posPay.png" mode="" />
</view> </view>
<!-- &&userInfo.userType!=2 --> <!-- &&userInfo.userType!=2 -->
<!-- <block wx:if="{{li.repeal}}">(可撤销)</block> --> <!-- <block wx:if="{{li.repeal}}">(可撤销)</block> -->
...@@ -159,7 +114,7 @@ ...@@ -159,7 +114,7 @@
<block wx:if="{{li.status != 1 && li.selectPayType != 0 && li.total_price != 0}}"> <block wx:if="{{li.status != 1 && li.selectPayType != 0 && li.total_price != 0}}">
<view class="order-price"> <view class="order-price">
<view class="order-price-label">实付金额</view> <view class="order-price-label">实付金额</view>
<view class="price" > <view class="price">
<text class="unit">¥</text> <text class="unit">¥</text>
{{li.totalPrice}} {{li.totalPrice}}
</view> </view>
...@@ -179,22 +134,11 @@ ...@@ -179,22 +134,11 @@
<!-- </block> --> <!-- </block> -->
<!-- </block> --> <!-- </block> -->
</view> </view>
<view <view wx:if="{{!li['confirmIndex']}}" class="del" catchtap="delBtn" data-ind="{{ind}}" data-item="{{li}}" data-index="{{index}}">
wx:if="{{!li['confirmIndex']}}"
class="del"
catchtap="delBtn"
data-ind="{{ind}}"
data-item="{{li}}"
data-index="{{index}}">
<view>撤销</view> <view>撤销</view>
<view>工单</view> <view>工单</view>
</view> </view>
<view <view wx:else class="del confirm" catchtap="repeal" data-item="{{li}}" data-index="{{index}}">
wx:else
class="del confirm"
catchtap="repeal"
data-item="{{li}}"
data-index="{{index}}">
确认删除 确认删除
</view> </view>
</view> </view>
...@@ -211,7 +155,7 @@ ...@@ -211,7 +155,7 @@
</block> </block>
</view> </view>
<block wx:if="{{!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && showIcon1}}"> <block wx:if="{{!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && showIcon1}}">
<view class="fixed-btns" > <view class="fixed-btns">
<view class="btn text-center" bindtap="jump" data-name="createOrder"> <view class="btn text-center" bindtap="jump" data-name="createOrder">
<image src="{{IMG_URL}}upgrade/scancode_verification02.png" /> <image src="{{IMG_URL}}upgrade/scancode_verification02.png" />
新增工单 新增工单
...@@ -229,10 +173,5 @@ ...@@ -229,10 +173,5 @@
</block> </block>
</block> </block>
<page-container show="{{show_confirm}}" duration="{{0}}" overlay="{{false}}" bind:afterleave="back"> <page-container show="{{show_confirm}}" duration="{{0}}" overlay="{{false}}" bind:afterleave="back">
<order-screen <order-screen show="{{show_confirm}}" userInfo="{{userInfo}}" navBarHeight="{{navBarHeight}}" orderStatus="{{tabIndex}}" />
show="{{show_confirm}}"
userInfo="{{userInfo}}"
navBarHeight="{{navBarHeight}}"
orderStatus="{{tabIndex}}" />
</page-container> </page-container>
\ No newline at end of file \ No newline at end of file
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
.headerSlot { .headerSlot {
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #347BFF; color: #347BFF;
max-width: var(--fontSize135); max-width: var(--fontSize125);
/* max-width: 150rpx; */ /* max-width: 150rpx; */
/* margin-left: 3rpx; */ /* margin-left: 3rpx; */
margin-left: var(--fontSize3); margin-left: var(--fontSize3);
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<gl-cell-staff headerSlot="{{ orderObj.staffName }}" class="{{ role != 'staff' || !orderObj.isDateWithin7Days?'disabled':'' }}" border valueAlign="right" labelText="每日填写本人该业务的新车客户接待数" label="到店流量(会员权益/延保)" requiredAfter labelWidth="500rpx" required> <gl-cell-staff headerSlot="{{ orderObj.staffName }}" class="{{ role != 'staff' || !orderObj.isDateWithin7Days?'disabled':'' }}" border valueAlign="right" labelText="每日填写本人该业务的新车客户接待数" label="到店流量(会员权益/延保)" requiredAfter labelWidth="500rpx" required>
<input placeholder="点击输入" class="input" type="number" placeholder-class="placeholder-class" maxlength="3" value="{{ orderObj.equityToShopCount }}" bindinput="input" data-name="equityToShopCount" disabled="{{ role != 'staff' || !orderObj.isDateWithin7Days }}" always-embed></input> <input placeholder="点击输入" class="input" type="number" placeholder-class="placeholder-class" maxlength="3" value="{{ orderObj.equityToShopCount }}" bindinput="input" data-name="equityToShopCount" disabled="{{ role != 'staff' || !orderObj.isDateWithin7Days }}" always-embed></input>
</gl-cell-staff> </gl-cell-staff>
<gl-cell-staff headerSlot="{{orderObj.staffName}}" class="{{role != 'staff' || !orderObj.isDateWithin7Days?'disabled':'' }}" border valueAlign="right" labelText="每日填写本人该业务的售后客户接待数" label="售后到店流量(会员权益/延保)" requiredAfter labelWidth="530rpx" required> <gl-cell-staff headerSlot="{{orderObj.staffName}}" class="{{role != 'staff' || !orderObj.isDateWithin7Days?'disabled':'' }}" border valueAlign="right" labelText="每日填写本人该业务的售后客户接待数" label="售后到店流量(会员权益/延保)" requiredAfter labelWidth="510rpx" required>
<input placeholder="点击输入" class="input" type="number" placeholder-class="placeholder-class" maxlength="3" value="{{ orderObj.afterSaleEquityToShopCount }}" bindinput="input" data-name="afterSaleEquityToShopCount" disabled="{{ role != 'staff' || !orderObj.isDateWithin7Days }}" always-embed></input> <input placeholder="点击输入" class="input" type="number" placeholder-class="placeholder-class" maxlength="3" value="{{ orderObj.afterSaleEquityToShopCount }}" bindinput="input" data-name="afterSaleEquityToShopCount" disabled="{{ role != 'staff' || !orderObj.isDateWithin7Days }}" always-embed></input>
</gl-cell-staff> </gl-cell-staff>
<view class="user-portrait"> <view class="user-portrait">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!