diff --git a/mes-ui/mini-app/src/pages/pgMaster/pgMaster-detail.vue b/mes-ui/mini-app/src/pages/pgMaster/pgMaster-detail.vue
index 3211cea..0785794 100644
--- a/mes-ui/mini-app/src/pages/pgMaster/pgMaster-detail.vue
+++ b/mes-ui/mini-app/src/pages/pgMaster/pgMaster-detail.vue
@@ -328,16 +328,16 @@
//算时间和数量
//算时间
- var lastIndex = historyList.value.length - 1;
- var lastItem = historyList.value[lastIndex];
- console.log(historyList.value)
- workTime.value = Math.floor(Math.abs(lastItem.createTime - Date.now()) / (1000 * 60 * 60)).toString();
+ // var lastIndex = historyList.value.length - 1;
+ var lastItem = historyList.value[0];
+ var www = new Date();
+ workTime.value = Math.floor(Math.abs(lastItem.createTime - www.getTime()) / (1000 * 60 * 60)).toString();
//算数量
if (historyList.value.length == 1) {
amount.value = detailInfo.value.amount;
} else {
var beforeAmount = 0;
- for (var i = 0; i < historyList.value.length - 1; i++) {
+ for (var i = 1; i < historyList.value.length ; i++) {
beforeAmount += historyList.value[i].amount
}
var finalamount = detailInfo.value.amount - beforeAmount
diff --git a/mes-ui/mini-app/src/pages/productionReport/productionReport-detail.vue b/mes-ui/mini-app/src/pages/productionReport/productionReport-detail.vue
index c9cb719..b27107e 100644
--- a/mes-ui/mini-app/src/pages/productionReport/productionReport-detail.vue
+++ b/mes-ui/mini-app/src/pages/productionReport/productionReport-detail.vue
@@ -281,7 +281,7 @@
@click="handleComplate">
- 质检结束
+ 生产结束
diff --git a/mes-ui/mini-app/src/pages/unqualifiedNotification/unqualifiedNotification-detail.vue b/mes-ui/mini-app/src/pages/unqualifiedNotification/unqualifiedNotification-detail.vue
index 17e9d3e..63bd23a 100644
--- a/mes-ui/mini-app/src/pages/unqualifiedNotification/unqualifiedNotification-detail.vue
+++ b/mes-ui/mini-app/src/pages/unqualifiedNotification/unqualifiedNotification-detail.vue
@@ -3,7 +3,7 @@
import { formatDate } from '@/utils/index'
import { onLoad, onShow } from '@dcloudio/uni-app'
import { useLoginStore } from '@/stores/modules/login'
- import { getNotificationDetailAPI,operateWx } from '@/services/unqualifiedNotification'
+ import { getNotificationDetailAPI, operateWx } from '@/services/unqualifiedNotification'
import { serviceDomain } from '@/services/constants'
const popup = ref()
const userStore = useLoginStore()
@@ -144,15 +144,15 @@
}
}
const range = [
- { value: 1, text: "返修" },
- { value: 2, text: "让步接收" },
- { value: 3, text: "报废" },
- ]
+ { value: 1, text: "返修" },
+ { value: 2, text: "让步接收" },
+ { value: 3, text: "报废" },
+ ]
// 提交报工
- const handleOk = async() =>{
- if(detailInfo.value.auditOpinion){
- await submitForm(detailInfo.value.auditOpinion);
- }else{
+ const handleOk = async () => {
+ if (detailInfo.value.auditOpinion) {
+ await submitForm(detailInfo.value.auditOpinion);
+ } else {
uni.showToast({
icon: 'none',
duration: 3000,
@@ -170,11 +170,11 @@
auditOpinion: active,
auditor: userId,
projectId: 0,
- projectSubId:0,
+ projectSubId: 0,
status: 1,
- notificationStatus:3
+ notificationStatus: 3
}
- await operateWx(params);
+ await operateWx(params);
} catch (error) {
uni.showToast({
icon: 'none',
@@ -183,7 +183,7 @@
})
} finally {
isLoading.value = false;
- // const url = `/pages/pgMaster/pgMaster-detail?id=${detailInfo.value.id}`
+ // const url = `/pages/unqualifiedNotification/unqualifiedNotification`
// uni.redirectTo({
// url,
// })
@@ -204,10 +204,23 @@
await getDetailData(idValue.value, typeName.value)
}
- const audit = ()=>{
+ const audit = () => {
popup.value.open()
}
-
+ const cancel = () => {
+ uni.navigateBack({
+ delta: 1 // 返回的页面数,这里1表示返回上一页
+ });
+ }
+ const getSuger = (val) => {
+ if (val == 1) {
+ return '返修'
+ } else if (val == 2) {
+ return '让步接收'
+ } else if (val == 3) {
+ return '报废'
+ }
+ }
const detailId = ref()
@@ -225,14 +238,18 @@
子项目:{{ detailInfo.projectSubCode || '' }}
{{' ' + detailInfo.projectSubName }}
- 通知日期:{{detailInfo.createTime}}
+ 通知日期:{{formatDate(detailInfo.createTime, 'YYYY-MM-DD HH:mm')}}
+
+ 审核日期:{{formatDate(detailInfo.auditTime, 'YYYY-MM-DD HH:mm')}}
+
+ 审核意见:{{getSuger(detailInfo.auditOpinion)}}
-
- 零件名称:{{ detailInfo.materialName }}
-
-
- 工序:{{ detailInfo.procedureName }}
-
+
+ 零件名称:{{ detailInfo.materialName }}
+
+
+ 工序:{{ detailInfo.procedureName }}
+
@@ -268,7 +285,11 @@
是否复检:
- {{ detailInfo.isRepre == 0 ?'否':'是' }}
+ {{ detailInfo.isRepre == 1 ?'否':'是' }}
+
+
+ 是否合格:
+ {{ detailInfo.isQua == 0?'合格':'不合格' }}
@@ -287,12 +308,12 @@
-
- 取消
- 审核
-
+ 取消
+ 审核
+
@@ -322,24 +336,33 @@
+
\ No newline at end of file
diff --git a/mes-ui/mini-app/src/pages/zjPgMaster/zjPgMaster-detail.vue b/mes-ui/mini-app/src/pages/zjPgMaster/zjPgMaster-detail.vue
index 49cc5ea..f1f94a3 100644
--- a/mes-ui/mini-app/src/pages/zjPgMaster/zjPgMaster-detail.vue
+++ b/mes-ui/mini-app/src/pages/zjPgMaster/zjPgMaster-detail.vue
@@ -304,15 +304,14 @@
const handleStop = async () => {
// var lastIndex = historyList.value.length-1;
var lastItem = historyList.value[0];
- console.log(historyList.value)
- workTime.value = Math.floor(Math.abs(lastItem.createTime - Date.now()) / (1000 * 60 * 60)).toString();
+ var nowDate = new Date();
+ workTime.value = Math.floor(Math.abs(lastItem.createTime - nowDate.getTime()) / (1000 * 60 * 60)).toString();
//算数量
if (historyList.value.length == 1) {
amount.value = detailInfo.value.amount;
} else {
var beforeAmount = 0;
- for (var i = historyList.value.length - 1; i > 0; i--) {
- console.log(historyList.value[i])
+ for (var i = 1; i < historyList.value.length ; i++) {
beforeAmount += historyList.value[i].amount
}
var finalamount = detailInfo.value.amount - beforeAmount
@@ -397,7 +396,7 @@
icon: 'none', // 显示纯文本时icon设为none
duration: 2000
});
- await initPage()
+ // await initPage()
const pages = getCurrentPages(); // 获取当前页面栈
const currentPage = pages[pages.length - 1]; // 当前页面
const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`;