From cf48d1167855244fd174f2c5f156b20267076f6b Mon Sep 17 00:00:00 2001
From: yunkexin <760754045@qq.com>
Date: Fri, 28 Nov 2025 09:44:14 +0800
Subject: [PATCH] 1
---
.../subPages/FO/1preShiftMeetingEdit.vue | 160 +++++++++++++-----
1 file changed, 117 insertions(+), 43 deletions(-)
diff --git a/pages/apply/subPages/FO/1preShiftMeetingEdit.vue b/pages/apply/subPages/FO/1preShiftMeetingEdit.vue
index 992a1e4..6995d0d 100644
--- a/pages/apply/subPages/FO/1preShiftMeetingEdit.vue
+++ b/pages/apply/subPages/FO/1preShiftMeetingEdit.vue
@@ -4,16 +4,21 @@
-
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+
+
+
+
@@ -73,8 +78,8 @@
-
-
+
@@ -98,7 +103,8 @@
getTeamUsers
} from '../../../../services/apply/FOServices/FOServices';
import {
- getUserLists
+ getUserLists,
+ getClassLists,
} from '../../../../services/safe';
import config from '../../../../config/common'
@@ -156,8 +162,14 @@
TaskID: '',
isLoadOK: false,
showDelModalIndex: undefined,
- showCheckDate1: false,
- showCheckDate2: false,
+ dateTimePickerInfo: {
+ showCheckDate: false,
+ dataIndex: undefined,
+ defaultDateTime: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM:ss'),
+ value: '',
+ name: '',
+ mode: ''
+ },
isAdd: 0,
START_TIME: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM:ss'),
END_TIME: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM:ss'),
@@ -193,6 +205,29 @@
DEAL_STATUS: 0,
})
},
+ showCheckDate(dataIndex) {
+ // let date = new Date()
+ // this.dateTimePickerInfo.showCheckDate = true
+ this.dateTimePickerInfo = {
+ showCheckDate: true,
+ defaultDateTime: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM:ss'),
+ dataIndex: dataIndex,
+ mode: dataIndex == 3 ? 'date' : 'datetime'
+ }
+ },
+ //隐藏控件 显示时间
+ handleCheckDate(e) {
+
+ if (this.dateTimePickerInfo.dataIndex == 1) {
+ this.model.START_TIME = uni.$u.timeFormat(e.value,
+ 'yyyy-mm-dd hh:MM:ss')
+ } else if (this.dateTimePickerInfo.dataIndex == 2) {
+ this.model.END_TIME = uni.$u.timeFormat(e.value,
+ 'yyyy-mm-dd hh:MM:ss')
+ }
+ this.dateTimePickerInfo.showCheckDate = false
+
+ },
handleDelRowBefore(index, item) {
if (item.USER_ID == "") {
this.model.Nav_Users.splice(index, 1)
@@ -216,12 +251,8 @@
handleSearchMonitor(val, pageIndex) {
const orgId = uni.getStorageSync('orgId')
const json = initFilter(orgId, "", "NAME", '', pageIndex)
- extendInclude(json, "Nav_Department")
+
extendRule(json, 'ENABLE_STATUS', 1, '0')
- if(orgId === '8b3c41aa-51b1-7ce9-1879-248a038c1b5c')
- {
- extendRule(json, 'DEPARTMENT_ID', 1, uni.getStorageSync('appInfo')?.User?.DEPARTMENT_ID)
- }
if (val !== 'init') {
const tempGroup = initFilterGroup(false);
extendGroupRule(tempGroup, 'NAME', 9, val)
@@ -231,25 +262,60 @@
if (pageIndex) {
json.Start = (pageIndex - 1) * 20;
}
-
- getUserLists(json).then(res => {
- if (res.IsSuccessful) {
- this.monitorLists = res.Data.map(i => {
- return {
- ...i,
- name: i.NAME,
- code: i.CODE
- }
- })
- this.curTotalMonitor = res.TotalCount
+ if (
+ this.currentOperateMonitor == 'Nav_User'
+ ) {
+ extendInclude(json, "Nav_Department")
+ if (orgId === '8b3c41aa-51b1-7ce9-1879-248a038c1b5c') {
+ extendRule(json, 'DEPARTMENT_ID', 1, uni.getStorageSync('appInfo')?.User?.DEPARTMENT_ID)
}
- })
+ getUserLists(json).then(res => {
+ if (res.IsSuccessful) {
+ this.monitorLists = res.Data.map(i => {
+ return {
+ ...i,
+ name: i.NAME,
+ code: i.CODE
+ }
+ })
+ this.curTotalMonitor = res.TotalCount
+ }
+ })
+ } else if (this.currentOperateMonitor == 'Nav_Class') {
+ extendInclude(json, 'Nav_ClassDetail');
+ getClassLists(json).then(res => {
+ if (res.IsSuccessful) {
+ this.monitorLists = res.Data.map(i => {
+ return {
+ ...i,
+ name: i.NAME,
+ code: i.CODE
+ }
+ })
+ this.curTotalMonitor = res.TotalCount
+ }
+ })
+ }
+
},
handleSelectedMonitor(val) {
this.showPopupMonitor = false
+
+ if (this.currentOperateMonitor == 'Nav_User') {
+ this.model.Nav_User = val
+ this.model.USER_ID = val.ID
+ } else if (this.currentOperateMonitor == 'Nav_Class') {
+ this.model.Nav_Class = val
+ this.model.CLASS_ID = val.ID
+ let DATE_TIME = uni.$u.timeFormat(new Date(), 'yyyy-mm-dd')
+ let start = uni.$u.timeFormat(val.Nav_ClassDetail[0].STARTTIME, 'hh:MM:ss')
+ let end = uni.$u.timeFormat(val.Nav_ClassDetail[0].ENDTIME, 'hh:MM:ss')
+ this.model.START_TIME = DATE_TIME + ' ' + start
+ this.model.END_TIME = DATE_TIME + ' ' + end
+
+ }
this.currentOperateMonitor = val
- this.model.Nav_User = val
- this.model.USER_ID = val.ID
+
},
handleClosePopupMonitor() {
this.showPopupMonitor = false
@@ -372,28 +438,36 @@
submit(type) {
const ele = this.$refs
ele['wForm'].validate().then(res => {
- this.model.RATE = type;
+ this.modelEdit = JSON.parse(JSON.stringify(this.model))
+ const startTime = new Date(this.modelEdit.START_TIME).getTime();
+ const endTime = new Date(this.modelEdit.END_TIME).getTime();
+ if (endTime <= startTime) {
+ uni.$showErrorInfo('下班时间必须大于上班时间');
+ return; // 终止提交流程
+ }
+ this.modelEdit.RATE = type;
if (this.TaskID != "") {
- this.model.TaskID = this.TaskID;
+ this.modelEdit.TaskID = this.TaskID;
}
- if (this.model.ORG_ID == "") {
- this.model.ORG_ID = this.ORG_ID;
+ if (this.modelEdit.ORG_ID == "") {
+ this.modelEdit.ORG_ID = this.ORG_ID;
}
- if (this.model.USER_ID == "") {
- this.model.USER_ID = uni.getStorageSync('appInfo').User.ID;
+ if (this.modelEdit.USER_ID == "") {
+ this.modelEdit.USER_ID = uni.getStorageSync('appInfo').User.ID;
}
- this.model.Nav_Users.forEach(item => {
+ this.modelEdit.Nav_Users.forEach(item => {
item.Nav_User = null;
});
- this.model.Nav_Files.forEach(item => {
+ this.modelEdit.Nav_Files.forEach(item => {
if (item.PRE_SHIFT_MEETING_RECORD_ID == undefined) {
- item.PRE_SHIFT_MEETING_RECORD_ID = this.model.ID;
+ item.PRE_SHIFT_MEETING_RECORD_ID = this.modelEdit.ID;
}
if (item.ORG_ID == undefined) {
- item.ORG_ID = this.model.ORG_ID;
+ item.ORG_ID = this.modelEdit.ORG_ID;
}
});
- getRequest(this.model, "/FO/FOPreShiftMeetingRecord/FullUpdate").then(res => {
+ delete this.modelEdit.Nav_Class
+ getRequest(this.modelEdit, "/FO/FOPreShiftMeetingRecord/FullUpdate").then(res => {
if (res) {
uni.$showMsgFunc('操作成功!', () => {
uni.navigateBack()