Commit cca1d392 by yuzhenWang

Merge branch 'dev' into 'master'

Dev

See merge request !142
parents 047971d2 6bf15b7d
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<!-- ===== vConsole 提前加载 ===== --> <script>
<!-- <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script> --> // ============ 新增:解析 URL 参数并设置状态栏占位 ============
<!-- <script> //解决项目以h5的方式内嵌到app的webview中,手机状态栏和页面顶部内容重叠的问题
// 立即初始化,不依赖任何框架 (function() {
var vConsole = new window.VConsole(); function getQueryParam(name) {
console.log('[vConsole] 已初始化'); // 从 hash 中提取查询参数
</script> --> const hash = window.location.hash;
<!-- ===== vConsole 加载结束 ===== --> const queryIndex = hash.indexOf('?');
<!-- ===== 1. 状态栏占位 ===== --> console.log('queryIndex', queryIndex);
<script> if (queryIndex === -1) return null;
(function() { const queryString = hash.substring(queryIndex + 1);
function getQueryParam(name) { const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)');
var searchParams = new URLSearchParams(window.location.search); const r = queryString.match(reg);
if (searchParams.has(name)) return searchParams.get(name); console.log('匹配结果', r);
var hash = window.location.hash; if (r != null) return decodeURIComponent(r[2]);
var queryIndex = hash.indexOf('?'); return null;
if (queryIndex !== -1) { }
var params = new URLSearchParams(hash.substring(queryIndex + 1)); const statusBarHeight = getQueryParam('statusBarHeight');
if (params.has(name)) return params.get(name); console.log('状态栏高度', statusBarHeight);
} if (statusBarHeight) {
return null; const height = parseInt(statusBarHeight, 10);
} if (!isNaN(height) && height > 0) {
document.write('<style>' +
'html, body { margin:0; padding:0; height:100%; overflow:hidden; }' +
'body { padding-top: ' + height + 'px; box-sizing: border-box; }' +
'#app { height: 100%; overflow-y: auto; }' +
'</style>');
}
}
})();
// ============ 新增结束 ============
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
var statusBarHeight = getQueryParam('statusBarHeight'); // 判断是否在小程序Webview环境中
if (statusBarHeight) { function isInMiniProgram() {
var height = parseInt(statusBarHeight, 10); // 更安全的小程序环境判断
if (!isNaN(height) && height > 0) { try {
var style = document.createElement('style'); return typeof wx !== 'undefined' && wx.miniProgram && wx.miniProgram.getEnv;
style.textContent = } catch (e) {
'html, body { margin:0; padding:0; height:100%; overflow:hidden; }' + return false;
'body { padding-top: ' + height + 'px; box-sizing: border-box; }' + }
'#app { height: 100%; overflow-y: auto; }'; }
document.head.appendChild(style);
}
}
})();
</script>
<!-- ===== 2. Viewport ===== --> // 页面加载完成后执行
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover" /> document.addEventListener('DOMContentLoaded', function() {
// 非小程序环境才加载微信JS-SDK
<title>银盾家办</title> if (!isInMiniProgram()) {
<link rel="stylesheet" href="./static/font/iconfont.css"> var script = document.createElement('script');
<link rel="shortcut icon" href="./static/suplogo.ico"> script.src = 'https://res2.wx.qq.com/open/js/jweixin-1.6.0.js';
</head> document.head.appendChild(script);
<body> console.log('加载微信JS-SDK');
<div id="app"></div> } else {
<script type="module" src="/main.js"></script> console.log('小程序Webview环境,不加载微信JS-SDK');
</body> }
</html> });
\ No newline at end of file </script>
<title>银盾家办</title>
<link rel="stylesheet" href="./static/font/iconfont.css">
<link rel="shortcut icon" href="./static/suplogo.ico">
</head>
<body>
<div id="app">
<!--app-html-->
</div>
<script>
(function() {
// 1. 判断是否在 App WebView 中
function isAppWebView() {
// 检测 5+ App(plus 对象)
if (typeof window.plus !== 'undefined') {
return true;
}
// 检测 UserAgent
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('html5plus') !== -1 || ua.indexOf('uni-app') !== -1) {
return true;
}
// 检测 uni-app 注入的全局对象(部分版本)
if (typeof window.__uni__ !== 'undefined') {
return true;
}
return false;
}
if (isAppWebView()) {
console.log('[环境] 检测到 App WebView,开始加载 uni.webview.js');
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = '/appYdhomeoffice/static/uni.webview.1.5.4.js';
script.onload = function() {
// 脚本加载成功后,执行原有逻辑(挂载 webViewJs)
var webViewJs = window.uni?.webView;
if (!webViewJs) {
console.error('uni.webview.js 加载成功但 webViewJs 不存在');
} else {
console.log('uni.webview.js 加载成功', webViewJs);
window.webViewJs = webViewJs;
console.log('window.webViewJs 已挂载', window);
}
};
script.onerror = function() {
console.error('uni.webview.js 加载失败,请检查路径');
};
document.head.appendChild(script);
} else {
console.log('[环境] 非 App WebView,跳过加载 uni.webview.js');
}
})();
</script>
<script type="module" src="/main.js"></script>
</body>
</html>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<view class="wapperBox"> <view class="wapperBox">
<view class="header"> <view class="header">
<text class="title">薪资<text class="highlight">单</text></text> <text class="title"><text class="highlight">积分</text></text>
<view class="year-badge" @click="showTime1=true"> <view class="year-badge" @click="showTime1=true">
<CommonTimePicker :timeData="startDate" :visible="showTime1" @confirmDate="changeStartTime" <CommonTimePicker :timeData="startDate" :visible="showTime1" @confirmDate="changeStartTime"
@closeTime="showTime1=false" :showMonth="false" iconColor="#2A36AE"/> @closeTime="showTime1=false" :showMonth="false" iconColor="#2A36AE"/>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<!-- <text class="label">{{ item.statusName }}</text> --> <!-- <text class="label">{{ item.statusName }}</text> -->
<view class="money" @click="showMoney(index)"> <view class="money" @click="showMoney(index)">
<text v-if="item.mask" class="mask-text">*****</text> <text v-if="item.mask" class="mask-text">*****</text>
<text v-else class="real-text">¥ {{ item.paidAmount.toFixed(2) }}</text> <text v-else class="real-text">{{ item.paidAmount.toFixed(2) }}(HKD)</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -44,31 +44,31 @@ ...@@ -44,31 +44,31 @@
<!-- <view style="border-top:2px solid #dce3ed; margin:0px 0;"></view> --> <!-- <view style="border-top:2px solid #dce3ed; margin:0px 0;"></view> -->
<view class="detail-grid"> <view class="detail-grid">
<view class="grid-row"> <view class="grid-row" v-if=" item.detail.grossAmount">
<text class="label">应发金额</text> <text class="label">应发金额</text>
<text class="value">{{ item.detail.grossAmount.toFixed(2) }} (HKD)</text> <text class="value">{{ item.detail.grossAmount.toFixed(2) }} (HKD)</text>
</view> </view>
<view class="grid-row"> <view class="grid-row" v-if=" item.detail.mpfAmount">
<text class="label">MPF事项金额</text> <text class="label">MPF事项金额</text>
<text class="value">{{ item.detail.mpfAmount.toFixed(2) }} (HKD)</text> <text class="value">{{ item.detail.mpfAmount.toFixed(2) }} (HKD)</text>
</view> </view>
<view class="grid-row"> <view class="grid-row" v-if=" item.detail.otherAmount">
<text class="label">其他调整总金额</text> <text class="label">其他调整总金额</text>
<text class="value">{{ item.detail.otherAmount.toFixed(2) }} (HKD)</text> <text class="value">{{ item.detail.otherAmount.toFixed(2) }} (HKD)</text>
</view> </view>
<view class="grid-row"> <view class="grid-row" v-if=" item.detail.paidAmount">
<text class="label">实发金额</text> <text class="label">实发金额</text>
<text class="value">{{ item.detail.paidAmount.toFixed(2) }}(HKD)</text> <text class="value">{{ item.detail.paidAmount.toFixed(2) }}(HKD)</text>
</view> </view>
<view class="grid-row"> <view class="grid-row" v-if=" item.detail.remark">
<text class="label">备注</text> <text class="label">备注</text>
<text class="value txtValue">{{ item.detail.remark || '--'}}</text> <text class="value txtValue">{{ item.detail.remark || '--'}}</text>
</view> </view>
<view class="grid-row"> <view class="grid-row" v-if=" item.detail.otherRemark">
<text class="label">其他调整备注</text> <text class="label">其他调整备注</text>
<text class="value txtValue">{{ item.detail.otherRemark || '--' }}</text> <text class="value txtValue">{{ item.detail.otherRemark || '--' }}</text>
</view> </view>
<view class="grid-row" style="margin-bottom: 10rpx;"> <view class="grid-row" style="margin-bottom: 10rpx;" v-if=" item.detail.cancelRemark">
<text class="label">取消理由</text> <text class="label">取消理由</text>
<text class="value txtValue">{{ item.detail.cancelRemark || '--' }}</text> <text class="value txtValue">{{ item.detail.cancelRemark || '--' }}</text>
</view> </view>
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
<text class="value negative">-¥{{ Math.abs(sub.amount).toFixed(2) }}</text> <text class="value negative">-¥{{ Math.abs(sub.amount).toFixed(2) }}</text>
</view> --> </view> -->
</view> </view>
<view class="detail-header"> <view class="detail-header" style="margin-top: 30rpx;">
<text class="total-label"> 打款明细</text> <text class="total-label"> 打款明细</text>
<!-- <text class="total-amount">¥{{ item.detail.grossAmount }} <text class="unit">元</text></text> --> <!-- <text class="total-amount">¥{{ item.detail.grossAmount }} <text class="unit">元</text></text> -->
</view> </view>
...@@ -92,33 +92,36 @@ ...@@ -92,33 +92,36 @@
<view class="detail-grid" <view class="detail-grid"
v-for="(bank,index) in item.detail.apiSalaryRemittanceFzDTO.salaryRemittanceDTOList" v-for="(bank,index) in item.detail.apiSalaryRemittanceFzDTO.salaryRemittanceDTOList"
:key="bank.salaryRemittanceBizId"> :key="bank.salaryRemittanceBizId">
<view class="detail-title"> <view class="" v-if="bank.amount">
打款信息{{index+1}} <view class="detail-title">
</view> 打款信息{{index+1}}
<view class="grid-row"> </view>
<text class="label">收款银行</text> <view class="grid-row">
<text class="value txtValue">{{ bank.bankName}}</text> <text class="label">收款银行</text>
</view> <text class="value txtValue">{{ bank.bankName}}</text>
<view class="grid-row"> </view>
<text class="label">账户尾号</text> <view class="grid-row">
<text class="value">{{ bank.accountEndNo}}</text> <text class="label">账户尾号</text>
</view> <text class="value">{{ bank.accountEndNo}}</text>
<view class="grid-row"> </view>
<text class="label">发放金额</text> <view class="grid-row">
<text class="value">{{ bank.amount.toFixed(2) }} <text v-if="bank.currency">({{bank.currency}}) </text></text> <text class="label">发放金额</text>
</view> <text class="value">{{ bank.amount.toFixed(2) }} <text v-if="bank.currency">({{bank.currency}}) </text></text>
<view class="grid-row"> </view>
<text class="label">币种</text> <!-- <view class="grid-row">
<text class="value">{{ bank.currency}}</text> <text class="label">币种</text>
</view> <text class="value">{{ bank.currency}}</text>
<view class="grid-row"> </view> -->
<text class="label">汇率</text> <view class="grid-row">
<text class="value">{{ bank.exchangeRate.toFixed(4)}}</text> <text class="label">汇率</text>
</view> <text class="value">{{ bank.exchangeRate.toFixed(4)}}</text>
<view class="grid-row"> </view>
<text class="label">备注</text> <view class="grid-row" v-if="bank.remark">
<text class="value txtValue">{{ bank.remark || '--'}}</text> <text class="label">备注</text>
<text class="value txtValue">{{ bank.remark || '--'}}</text>
</view>
</view> </view>
</view> </view>
......
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