From 3a0712a70ab0f97b4190842c33d27ba8d0d6cec3 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期六, 11 五月 2024 10:48:08 +0800
Subject: [PATCH] 提交一把
---
company/src/components/enterprise/editFactoryChange.vue | 39 ++++++++++++++++++++++++++++-----------
1 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/company/src/components/enterprise/editFactoryChange.vue b/company/src/components/enterprise/editFactoryChange.vue
index a46d79b..f4ef3b3 100644
--- a/company/src/components/enterprise/editFactoryChange.vue
+++ b/company/src/components/enterprise/editFactoryChange.vue
@@ -167,6 +167,7 @@
import { all } from '@/api/business/solutions'
import { getDetail, findList } from '@/api/business/insuranceApply'
import { create, update, applyChagneDetailList } from '@/api/business/applyChange'
+ import { getDate, compareDates, getTomorrow } from '@/utils/util'
export default {
name: 'editFactoryChange',
extends: BaseOpera,
@@ -175,7 +176,7 @@
return {
form: {
id: null,
- applyChangId: '',
+ applyChangeId: '',
solutionId: '',
solutionsName: '',
applyStartTime: '',
@@ -219,7 +220,7 @@
this.$nextTick(() => {
this.$refs.form.resetFields()
this.form.id = target.id
- this.form.applyChangId = target.applyChangId
+ this.form.applyChangeId = target.applyChangId
this.getDetails()
this.getapplyChagneDetailList()
})
@@ -236,15 +237,15 @@
// 鑾峰彇鎹㈠巶浜哄憳
getapplyChagneDetailList() {
applyChagneDetailList({
- applyChangId: this.form.applyChangId,
+ applyChangeId: this.form.applyChangeId,
types: [2]
}).then(res => {
res.forEach(item => {
item.idCard = item.memberIdcardNo
- item.oldDuId = item.duId
- item.oldDuName = item.duName
- item.oldWorkTypeName = item.workTypeName
- item.oldWorktypeId = item.worktypeId
+ // item.oldDuId = item.duId
+ // item.oldDuName = item.duName
+ // item.oldWorkTypeName = item.workTypeName
+ // item.oldWorktypeId = item.worktypeId
item.workTypeName = ''
item.worktypeId = ''
item.duId = ''
@@ -255,7 +256,7 @@
},
// 鑾峰彇鎶曚繚璇︽儏
getDetails() {
- findList({ applyId: this.form.id })
+ /*findList({ applyId: this.form.id })
.then(res => {
res.forEach(item => {
item.idCard = item.idcardNo
@@ -272,7 +273,7 @@
item.duName = ''
})
// this.form.factory = res
- })
+ })*/
getDetail(this.form.id)
.then(res => {
this.list.push(res)
@@ -282,7 +283,23 @@
this.pickerOptions = {
disabledDate(time) {
// - 8.64e7
- return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date().getTime()
+ // return time.getTime() > new Date(res.endTime).getTime() || time.getTime() <new Date(res.startTime).getTime()
+ // 褰撳墠鏃ユ湡澶т簬绛変簬鐢熸晥鏃ユ湡骞朵笖鏈�鍚庝竴娆℃搷浣滄椂闂寸瓑浜庣┖
+ if ([1, 3].includes(compareDates(getDate(), res.startTime)) && !res.lastChangeDate) {
+ return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date(getTomorrow()).getTime()
+ // 褰撳墠鏃ユ湡灏忎簬鐢熸晥鏃ユ湡骞朵笖鏈�鍚庝竴娆℃搷浣滄椂闂寸瓑浜庣┖
+ } else if (compareDates(getDate(), res.startTime) === 2 && !res.lastChangeDate) {
+ return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date(res.startTime).getTime()
+ // 鏈�鍚庝竴娆℃搷浣滄椂闂存湁鍊�
+ } else if (res.lastChangeDate) {
+ // 褰撳墠鏃ユ湡澶т簬鏈�鍚庝竴娆℃搷浣滄椂闂�
+ if ([1, 3].includes(compareDates(getDate(), res.lastChangeDate))) {
+ return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date(getTomorrow()).getTime()
+ // 褰撳墠鏃堕棿灏忎簬鏈�鍚庝竴娆℃搷浣滄椂闂�
+ } else if (compareDates(getDate(), res.lastChangeDate) === 2) {
+ return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date(res.lastChangeDate).getTime()
+ }
+ }
}
};
this.changeSolution1(res.solutionId)
@@ -323,7 +340,7 @@
// })
this.isWorking = true
update({
- id: this.form.applyChangId,
+ id: this.form.applyChangeId,
applyId: this.form.id,
changeDetailList: this.form.factory,
validTime: this.form.applyStartTime,
--
Gitblit v1.9.3