|
@@ -5,6 +5,14 @@
|
|
|
<view class="profile-section">
|
|
<view class="profile-section">
|
|
|
<image class="workbench-header-bg" :src="constant.hostUrl + '/image//workbench-header-bg.webp'" mode="aspectFill"></image>
|
|
<image class="workbench-header-bg" :src="constant.hostUrl + '/image//workbench-header-bg.webp'" mode="aspectFill"></image>
|
|
|
<view class="status-safe-area" :style="{ height: statusBarHeight + 'px' }"></view>
|
|
<view class="status-safe-area" :style="{ height: statusBarHeight + 'px' }"></view>
|
|
|
|
|
+ <view
|
|
|
|
|
+ v-if="showNavBack"
|
|
|
|
|
+ class="nav-back-btn"
|
|
|
|
|
+ :style="navBackStyle"
|
|
|
|
|
+ @click.stop="goBack"
|
|
|
|
|
+ >
|
|
|
|
|
+ <text class="nav-back-label">返回</text>
|
|
|
|
|
+ </view>
|
|
|
<view class="custom-nav" @click="pageTo({ url: '/admin/home/edit' })">
|
|
<view class="custom-nav" @click="pageTo({ url: '/admin/home/edit' })">
|
|
|
<text class="custom-nav-title">{{ workbenchTitle }}</text>
|
|
<text class="custom-nav-title">{{ workbenchTitle }}</text>
|
|
|
</view>
|
|
</view>
|
|
@@ -232,7 +240,8 @@ import { iconSrc } from "@/utils/iconSrc";
|
|
|
export default {
|
|
export default {
|
|
|
name: "PurchaseGhsPanel",
|
|
name: "PurchaseGhsPanel",
|
|
|
props: {
|
|
props: {
|
|
|
- statusBarHeight: { type: Number, default: 0 }
|
|
|
|
|
|
|
+ statusBarHeight: { type: Number, default: 0 },
|
|
|
|
|
+ showNavBack: { type: Boolean, default: false }
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -269,6 +278,18 @@ export default {
|
|
|
if (!this.supplierSearchTime) return false;
|
|
if (!this.supplierSearchTime) return false;
|
|
|
const twoDays = 2 * 24 * 60 * 60 * 1000;
|
|
const twoDays = 2 * 24 * 60 * 60 * 1000;
|
|
|
return (Date.now() - this.supplierSearchTime) < twoDays;
|
|
return (Date.now() - this.supplierSearchTime) < twoDays;
|
|
|
|
|
+ },
|
|
|
|
|
+ navBackStyle() {
|
|
|
|
|
+ if (!this.showNavBack) {
|
|
|
|
|
+ return {};
|
|
|
|
|
+ }
|
|
|
|
|
+ const safeH = this.statusBarHeight || 0;
|
|
|
|
|
+ const titleCenterPx = safeH + uni.upx2px(145 / 2);
|
|
|
|
|
+ const backHeightPx = uni.upx2px(56);
|
|
|
|
|
+ const topPx = titleCenterPx - uni.upx2px(10) - backHeightPx / 2;
|
|
|
|
|
+ return {
|
|
|
|
|
+ top: topPx + "px"
|
|
|
|
|
+ };
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
beforeDestroy() {
|
|
beforeDestroy() {
|
|
@@ -276,6 +297,9 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
iconSrc,
|
|
iconSrc,
|
|
|
|
|
+ goBack() {
|
|
|
|
|
+ uni.navigateBack({ delta: 1 });
|
|
|
|
|
+ },
|
|
|
handlePageLoad() {},
|
|
handlePageLoad() {},
|
|
|
handlePageUnload() {},
|
|
handlePageUnload() {},
|
|
|
handlePageShow() {
|
|
handlePageShow() {
|
|
@@ -763,6 +787,35 @@ export default {
|
|
|
z-index: 2;
|
|
z-index: 2;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.nav-back-btn {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 16upx;
|
|
|
|
|
+ z-index: 12;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ height: 56upx;
|
|
|
|
|
+ padding: 0 18upx 0 12upx;
|
|
|
|
|
+ border-radius: 999upx;
|
|
|
|
|
+ background: rgba(255, 255, 255, 0.88);
|
|
|
|
|
+ box-shadow: 0 4upx 14upx rgba(24, 37, 30, 0.1);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.nav-back-arrow {
|
|
|
|
|
+ font-size: 44upx;
|
|
|
|
|
+ line-height: 1;
|
|
|
|
|
+ color: #161819;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ margin-right: 2upx;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.nav-back-label {
|
|
|
|
|
+ font-size: 28upx;
|
|
|
|
|
+ line-height: 1;
|
|
|
|
|
+ color: #161819;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.custom-nav {
|
|
.custom-nav {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
height: 145upx;
|
|
height: 145upx;
|