From 659168c1ca463b00d74f9dead9f85df7ea997aa0 Mon Sep 17 00:00:00 2001
From: 如洲 陈 <1278080563@qq.com>
Date: 星期五, 12 九月 2025 19:04:31 +0800
Subject: [PATCH] 出库检和退货检
---
pages/BasePages/main.vue | 384 +++++++++++++++++++++++++++++++++---------------------
1 files changed, 235 insertions(+), 149 deletions(-)
diff --git a/pages/BasePages/main.vue b/pages/BasePages/main.vue
index 99476ef..8f00f8a 100644
--- a/pages/BasePages/main.vue
+++ b/pages/BasePages/main.vue
@@ -1,164 +1,250 @@
<template>
- <uni-base-page :footer="false">
- <view slot="page">
- <view v-if="loginInfo.hasLogin">
- <!-- 鏁欏瑙嗛銆佸叕鍙稿唴閮ㄥ浼犲浘鐗囩瓑 -->
- <swiper indicator-dots="true" :autoplay="true" :interval="3000">
- <swiper-item v-for="(img,key) in imgUrls" :key="key">
- <image :src="img"/>
- </swiper-item>
- </swiper>
- <!-- 閫氭姤鎵硅瘎銆佹秷鎭璀︺�佸叕鍛娿�佹姤鍛� -->
- <uni-notice-bar :show-icon="true" :scrollable="true" :speed="30" :single="true"
- text="閫氭姤鎵硅瘎,娑堟伅棰勮,鍏憡/鎶ュ憡,鎻愮ず娑堟伅,閫氭姤鎵硅瘎,娑堟伅棰勮,鍏憡/鎶ュ憡,鎻愮ず娑堟伅,閫氭姤鎵硅瘎,娑堟伅棰勮,鍏憡/鎶ュ憡,鎻愮ず娑堟伅,閫氭姤鎵硅瘎,娑堟伅棰勮,鍏憡/鎶ュ憡,鎻愮ず娑堟伅,閫氭姤鎵硅瘎,娑堟伅棰勮,鍏憡/鎶ュ憡,鎻愮ず娑堟伅,閫氭姤鎵硅瘎,娑堟伅棰勮,鍏憡/鎶ュ憡,鎻愮ず娑堟伅,閫氭姤鎵硅瘎,娑堟伅棰勮,鍏憡/鎶ュ憡,鎻愮ず娑堟伅,"/>
- <!-- 鐢ㄦ埛绯荤粺鑿滃崟妯″潡 -->
- <view class="example-body">
- <uni-grid :column="col" :showBorder="true">
- <uni-grid-item v-for="(item, index) in userMenu" :index="index" :key="index">
- <navigator navigateTo class="grid-item-box" hover-class="none"
- :url="`../${item.path}`">
- <image v-if="item.icoimg" class="imgMenu" :src="`${item.icoimg}`" ></image>
- <image v-else class="imgMenu" src="/static/img/imgMenu/APP01.png" ></image>
- <uni-notice-bar v-if="item.pagE_VIEW.length>6" :speed="30"
- style="padding:0;margin-bottom:0;font-weight: 900;" textSize="13px"
- background-color="#ffffff" color="#000000" :scrollable="item.pagE_VIEW.length>6"
- :single="true" :text="item.pagE_VIEW"/>
- <text v-else class="text">{{ item.pagE_VIEW }}</text>
- </navigator>
- </uni-grid-item>
- </uni-grid>
- </view>
- </view>
- <view v-if="!loginInfo.hasLogin">
- <view class="title">
- 鎮ㄥソ 娓稿銆�
- </view>
- <view class="ul">
- <view>杩欐槸 XXMES 棣栭〉銆�</view>
- <view>鍦� 鈥滄垜鐨勨�� 涓偣鍑� 鈥滅櫥褰曗�� 鍙互 鈥滅櫥褰曟偍鐨勮处鎴封��</view>
- </view>
- </view>
- </view>
- </uni-base-page>
+ <uni-base-page :footer="false">
+ <view slot="page">
+ <view v-if="loginInfo.hasLogin">
+ <!-- 鏁欏瑙嗛銆佸叕鍙稿唴閮ㄥ浼犲浘鐗囩瓑 -->
+ <swiper indicator-dots="true" :autoplay="true" :interval="3000">
+ <swiper-item v-for="(img,key) in imgUrls" :key="key">
+ <image :src="img" />
+ </swiper-item>
+ </swiper>
+ <!-- 閫氭姤鎵硅瘎銆佹秷鎭璀︺�佸叕鍛娿�佹姤鍛� -->
+ <uni-notice-bar :show-icon="true" :scrollable="true" :speed="30" :single="true"
+ text="閫氭姤鎵硅瘎,娑堟伅棰勮,鍏憡/鎶ュ憡,鎻愮ず娑堟伅,閫氭姤鎵硅瘎,娑堟伅棰勮,鍏憡/鎶ュ憡,鎻愮ず娑堟伅,閫氭姤鎵硅瘎,娑堟伅棰勮,鍏憡/鎶ュ憡,鎻愮ず娑堟伅,閫氭姤鎵硅瘎,娑堟伅棰勮,鍏憡/鎶ュ憡,鎻愮ず娑堟伅,閫氭姤鎵硅瘎,娑堟伅棰勮,鍏憡/鎶ュ憡,鎻愮ず娑堟伅,閫氭姤鎵硅瘎,娑堟伅棰勮,鍏憡/鎶ュ憡,鎻愮ず娑堟伅,閫氭姤鎵硅瘎,娑堟伅棰勮,鍏憡/鎶ュ憡,鎻愮ず娑堟伅," />
+ <!-- 鐢ㄦ埛绯荤粺鑿滃崟妯″潡 -->
+ <view class="example-body">
+ <uni-grid :column="col" :showBorder="true">
+ <uni-grid-item v-for="(item, index) in userMenu" :index="index" :key="index">
+ <navigator navigateTo class="grid-item-box" hover-class="none" :url="`../${item.path}`">
+ <image v-if="item.icoimg" class="imgMenu" :src="`${item.icoimg}`"></image>
+ <image v-else class="imgMenu" src="/static/img/imgMenu/APP01.png"></image>
+ <uni-notice-bar v-if="item.pagE_VIEW.length>6" :speed="30"
+ style="padding:0;margin-bottom:0;font-weight: 900;" textSize="13px"
+ background-color="#ffffff" color="#000000" :scrollable="item.pagE_VIEW.length>6"
+ :single="true" :text="item.pagE_VIEW" />
+ <text v-else class="text">{{ item.pagE_VIEW }}</text>
+ </navigator>
+ </uni-grid-item>
+ </uni-grid>
+ </view>
+ </view>
+ <view v-if="!loginInfo.hasLogin">
+ <view class="title">
+ 鎮ㄥソ 娓稿銆�
+ </view>
+ <view class="ul">
+ <view>杩欐槸 XXMES 棣栭〉銆�</view>
+ <view>鍦� 鈥滄垜鐨勨�� 涓偣鍑� 鈥滅櫥褰曗�� 鍙互 鈥滅櫥褰曟偍鐨勮处鎴封��</view>
+ </view>
+ </view>
+ </view>
+ </uni-base-page>
</template>
<script>
-export default {
- data() {
- return {
- loginInfo: this.$loginInfo,
- color: this.$defaultColor,
- userMenu: [],
- imgUrls: [
- "../../static/img/SN-GG.png",
- "../../static/img/SN-GG1.png"
- ],
- col: 4, //鑿滃崟鍒楁暟
- };
- },
- methods: {
- getMenu(isShowMask) {
- if (isShowMask) uni.showLoading({
- mask: true,
- title: "鍔犺浇涓�..."
- });
- this.$getUserMenu({
- type: 'sys',
- programId: this.loginInfo.sysNumber,
- success: (res) => {
- this.userMenu = res;
- uni.stopPullDownRefresh();
- },
- fail: (err) => {
+ export default {
+ data() {
+ return {
+ loginInfo: this.$loginInfo,
+ color: this.$defaultColor,
+ userMenu: [],
+ imgUrls: [
+ "../../static/img/SN-GG.png",
+ "../../static/img/SN-GG1.png"
+ ],
+ col: 4, //鑿滃崟鍒楁暟
+ };
+ },
+ methods: {
+ getMenu(isShowMask) {
+ if (isShowMask) uni.showLoading({
+ mask: true,
+ title: "鍔犺浇涓�..."
+ });
+ this.$getUserMenu({
+ type: 'sys',
+ programId: this.loginInfo.sysNumber,
+ success: (res) => {
+ this.userMenu = res;
+ uni.stopPullDownRefresh();
+ },
+ fail: (err) => {
- },
- complete() {
- if (isShowMask) uni.hideLoading();
- }
- });
- }
- },
- onLoad() {
- if (!this.loginInfo.hasLogin) {
- uni.showModal({
- title: '鏈櫥褰�',
- content: '鎮ㄦ湭鐧诲綍锛岄渶瑕佺櫥褰曞悗鎵嶈兘缁х画',
- /**
- * 濡傛灉闇�瑕佸己鍒剁櫥褰曪紝涓嶆樉绀哄彇娑堟寜閽�
- */
- showCancel: !this.loginInfo.forcedLogin,
- success: (res) => {
- if (res.confirm) {
- /**
- * 濡傛灉闇�瑕佸己鍒剁櫥褰曪紝浣跨敤reLaunch鏂瑰紡
- */
- if (this.loginInfo.forcedLogin) {
- uni.reLaunch({
- url: 'login'
- });
- } else {
- uni.navigateTo({
- url: 'login'
- });
- }
- }
- }
- });
- } else {
- this.getMenu(true);
- }
+ },
+ complete() {
+ if (isShowMask) uni.hideLoading();
+ }
+ });
+ },
+ getIsMsg() {
+ this.$post({
+ url: "/MessageCenter/IsShow",
+ data: {
+ createBy: this.$loginInfo.account,
+ isShow: 1,
+ },
+ }).then(res => {
+ if (res.data.tbBillList > 0) {
+ this.msg = "鎮ㄦ湁鏂扮殑寮傚父寰呭鐞�/鎮ㄦ湁鏂扮殑寮傚父寰呭鐞�";
+ //灞曠ず鍥炬爣
+ uni.showTabBarRedDot({
+ index: 1
+ });
+ } else {
+ this.msg = "瀹佹尝骞挎繁绉戞妧鏈夐檺鍏徃";
+ //灞曠ず鍥炬爣
+ uni.hideTabBarRedDot({
+ index: 1
+ });
+ }
+ })
+ },
+ checkForUpdate() {
+ this.$post({
+ url: "/Login/getAppUpgradeInfo",
+ data: {}
+ }).then(res => {
- },
- onPullDownRefresh() {
- if (this.loginInfo.hasLogin)
- this.getMenu(true);
- },
-}
+ let newVersion = res.data.version;
+ let currentVersion = uni.getSystemInfoSync(); // 鑾峰彇褰撳墠 APK 鐗堟湰鍙�
+
+ if (newVersion > currentVersion.appVersion) {
+ uni.showModal({
+ title: "鍙戠幇鏂扮増鏈�",
+ content: "鏄惁涓嬭浇鏈�鏂扮増鏈�?",
+ success: (modalRes) => {
+ if (modalRes.confirm) {
+ this.downloadNewApk(res.data.apkUrl);
+ }
+ }
+ });
+ //this.downloadNewApk(res.data.apkUrl);
+ this.updateChecked = true; // 鏍囪鏇存柊宸叉鏌ヨ繃
+ // // 濡傛灉鏈夋柊鐗堟湰锛屽紑濮嬩笅杞�
+ //download(res.data.apkUrl);
+ }
+ })
+
+ },
+
+
+ downloadNewApk(apkUrl) {
+ uni.showToast({
+ title: "寮�濮嬩笅杞芥洿鏂�...",
+ icon: "none",
+ duration: 2000
+ });
+
+ uni.downloadFile({
+ url: apkUrl,
+ success: (res) => {
+ if (res.statusCode === 200) {
+ plus.runtime.install(res.tempFilePath, {
+ force: true
+ }, function() {
+ console.log("瀹夎鎴愬姛锛岄噸鍚簲鐢�");
+ //plus.runtime.restart();
+ //plus.runtime.quit();
+ // uni.navigateBack()
+ }, function(e) {
+ console.error("瀹夎澶辫触:", e);
+ });
+ }
+ },
+ fail: (err) => {
+ console.error("涓嬭浇澶辫触:", err);
+ uni.showToast({
+ title: "涓嬭浇澶辫触锛岃妫�鏌ョ綉缁�",
+ icon: "none",
+ duration: 2000
+ });
+ }
+ });
+ }
+
+ },
+ onLoad() {
+ if (!this.loginInfo.hasLogin) {
+ uni.showModal({
+ title: '鏈櫥褰�',
+ content: '鎮ㄦ湭鐧诲綍锛岄渶瑕佺櫥褰曞悗鎵嶈兘缁х画',
+ /**
+ * 濡傛灉闇�瑕佸己鍒剁櫥褰曪紝涓嶆樉绀哄彇娑堟寜閽�
+ */
+ showCancel: !this.loginInfo.forcedLogin,
+ success: (res) => {
+ if (res.confirm) {
+ /**
+ * 濡傛灉闇�瑕佸己鍒剁櫥褰曪紝浣跨敤reLaunch鏂瑰紡
+ */
+ if (this.loginInfo.forcedLogin) {
+ uni.reLaunch({
+ url: 'login'
+ });
+ } else {
+ uni.navigateTo({
+ url: 'login'
+ });
+ }
+ }
+ }
+ });
+ } else {
+ this.getMenu(true);
+ }
+
+ },
+ onPullDownRefresh() {
+ if (this.loginInfo.hasLogin)
+ this.getMenu(true);
+ },
+
+ }
</script>
<style>
-.text {
- /* color: #ffffff; */
- /* font-size: 15px; */
- font-weight: 900;
-}
+ .text {
+ /* color: #ffffff; */
+ /* font-size: 15px; */
+ font-weight: 900;
+ }
-.example-body {
- flex-direction: row;
- flex-wrap: wrap;
- justify-content: center;
- padding: 0;
- font-size: 14px;
- /* background-color: #ffffff; */
-}
+ .example-body {
+ flex-direction: row;
+ flex-wrap: wrap;
+ justify-content: center;
+ padding: 0;
+ font-size: 14px;
+ /* background-color: #ffffff; */
+ }
-.grid-item-box {
- flex: 1;
- /* position: relative;*/
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 5px 0;
-}
+ .grid-item-box {
+ flex: 1;
+ /* position: relative;*/
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 5px 0;
+ }
-.imgMenu {
- width: 100rpx;
- height: 100rpx;
-}
+ .imgMenu {
+ width: 100rpx;
+ height: 100rpx;
+ }
-image,
-swiper,
-.img-view {
- width: 100%;
- height: 350rpx;
- margin-bottom: 10rpx;
-}
+ image,
+ swiper,
+ .img-view {
+ width: 100%;
+ height: 350rpx;
+ margin-bottom: 10rpx;
+ }
-.example-body {
- flex-direction: row;
- justify-content: flex-start;
-}
+ .example-body {
+ flex-direction: row;
+ justify-content: flex-start;
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.3