From 2ce1594481ca3a276b51cb7a9fa2f1177e2a20be Mon Sep 17 00:00:00 2001
From: jevononlie <728254585@qq.com>
Date: Tue, 14 May 2024 13:41:48 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=8D=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mes-ui/uni-app/src/App.vue | 46 ++++++++++---
.../pages/assembleReport/assembleReport.vue | 38 +++++++++--
.../uni-app/src/pages/assembleReport/list.vue | 35 +++++++---
.../pages/index/components/CategoryPanel.vue | 29 ++------
mes-ui/uni-app/src/pages/index/index.vue | 64 ++++++++++++------
.../components/dataItem.vue | 5 +-
.../components/detailPanel.vue | 12 ++--
mes-ui/uni-app/src/services/appUpdate.ts | 3 +-
.../static/images/assembleReport-default.png | Bin 44694 -> 82379 bytes
.../images/productionReport-default.png | Bin 63465 -> 81397 bytes
.../unqualifiedNotification-default.png | Bin 48044 -> 94204 bytes
11 files changed, 153 insertions(+), 79 deletions(-)
diff --git a/mes-ui/uni-app/src/App.vue b/mes-ui/uni-app/src/App.vue
index 1733bfb2..273c01a3 100644
--- a/mes-ui/uni-app/src/App.vue
+++ b/mes-ui/uni-app/src/App.vue
@@ -2,7 +2,7 @@
* @Author: 王文杰
* @Date: 2024-01-04 12:54:56
* @LastEditors: jevononlie 728254585@qq.com
- * @LastEditTime: 2024-05-11 17:16:10
+ * @LastEditTime: 2024-05-14 13:41:07
* @FilePath: /app-nx-personal/src/App.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -12,29 +12,29 @@ import { appUpdateApi } from '@/services/appUpdate'
onLaunch(async () => {
console.log('App Launch')
//#ifdef APP-PLUS
-
- let appid = '', version = '';
+ let version = '';
plus.runtime.getProperty(plus.runtime.appid, function (wgtinfo) {
if (wgtinfo.version) {
- appid = wgtinfo.appid
version = wgtinfo.version
} else {
- appid = plus.runtime.appid
version = plus.runtime.version
}
});
+ console.log('App Show-----',version)
const params = { //升级检测数据
- 'appId': appid
+ appId: 'com.chanko.yunxi.mes.android'
}
const res = await appUpdateApi(params)
- if (res.data.versionId !== version) {
+ console.log('App Show-----', res)
+ if (res.versionId !== version) {
uni.showModal({ //提醒用户更新
title: '更新提示',
- content: res.data.remark,
+ showCancel: false,
+ content: res.remark || '有新版本更新,请点击确定下载',
success: (res) => {
if (res.confirm) {
- plus.runtime.openURL(res.data.url);
- }
+ plus.runtime.openURL(res.url);
+ }
}
})
}
@@ -42,6 +42,32 @@ onLaunch(async () => {
})
onShow(() => {
console.log('App Show')
+ let version = '';
+ plus.runtime.getProperty(plus.runtime.appid, function (wgtinfo) {
+ if (wgtinfo.version) {
+ version = wgtinfo.version
+ } else {
+ version = plus.runtime.version
+ }
+ });
+ console.log('App Show-----',version)
+ const params = { //升级检测数据
+ appId: 'com.chanko.yunxi.mes.android'
+ }
+ const res = await appUpdateApi(params)
+ console.log('App Show-----', res)
+ if (res.versionId !== version) {
+ uni.showModal({ //提醒用户更新
+ title: '更新提示',
+ showCancel: false,
+ content: res.remark || '有新版本更新,请点击确定下载',
+ success: (res) => {
+ if (res.confirm) {
+ plus.runtime.openURL(res.url);
+ }
+ }
+ })
+ }
})
onHide(() => {
console.log('App Hide')
diff --git a/mes-ui/uni-app/src/pages/assembleReport/assembleReport.vue b/mes-ui/uni-app/src/pages/assembleReport/assembleReport.vue
index b80952bf..c0c51d94 100644
--- a/mes-ui/uni-app/src/pages/assembleReport/assembleReport.vue
+++ b/mes-ui/uni-app/src/pages/assembleReport/assembleReport.vue
@@ -5,7 +5,7 @@ import { ref } from 'vue'
const isLoading = ref(false)
// 提交表单
const onSubmit = async () => {
- if (isLoading.value) {
+ if (isLoading.value || !listReport.value.length) {
return
}
isLoading.value = true
@@ -14,16 +14,33 @@ const onSubmit = async () => {
const params = {
taskReportAssembleVOList: listReport.value,
}
- console.log(params)
const res = await postSubmitAssembleReportApi(params)
isLoading.value = false
+ uni.showToast({
+ icon: 'none',
+ duration: 3000,
+ title: '提交成功',
+ })
+ listReport.value = []
} catch (error) {
isLoading.value = false
}
}
const onClear = async () => {
- listReport.value.splice(0, listReport.value.length)
+ if (!listReport.value.length) {
+ return
+ }
+ uni.showModal({
+ content: '是否清空所有包装条形码,是否确定继续?',
+ confirmColor: '#3775F6',
+ success: async (res) => {
+ if (res.confirm) {
+ listReport.value.splice(0, listReport.value.length)
+ }
+ },
+ })
+
}
const onDel = async (idx) => {
uni.showModal({
@@ -89,9 +106,11 @@ const handleList = ()=> {
产品编码: {{ item.projectSubCode }}
产品名称: {{ item.projectSubName }}
- 报工工序: {{ item.procedureName }}
- 报工数量: {{ item.amount }}
- 报工人: {{ item.ownerName }}
+
+ 报工工序: {{ item.procedureName }}
+ 报工数量: {{ item.amount }}
+ 报工人: {{ item.ownerName }}
+