From 6f1ad9bcb73a415f1d45f1adc6bdeb3e80ddf95f Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 05 三月 2024 09:33:39 +0800
Subject: [PATCH] mrshi
---
company/src/components/enterprise/factoryChange.vue | 51 +++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 43 insertions(+), 8 deletions(-)
diff --git a/company/src/components/enterprise/factoryChange.vue b/company/src/components/enterprise/factoryChange.vue
index cf2bfb7..6335c16 100644
--- a/company/src/components/enterprise/factoryChange.vue
+++ b/company/src/components/enterprise/factoryChange.vue
@@ -16,10 +16,10 @@
<div style="display: flex; flex-direction: column;">
<el-date-picker
v-model="form.applyStartTime"
- type="datetime"
+ type="date"
:picker-options="pickerOptions"
- value-format="yyyy-MM-dd hh:mm:ss"
- format="yyyy-MM-dd hh:mm:ss"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ format="yyyy-MM-dd HH:mm:ss"
placeholder="閫夋嫨鏃ユ湡">
</el-date-picker>
<span style="color: #F95601; font-size: 14px;">锛堟鏃ョ敓鏁堟姇淇濊浜�17:30鍓嶆彁浜わ紝瓒呮椂鎻愪氦浠ヤ繚闄╁崟涓哄噯锛�</span>
@@ -77,7 +77,7 @@
<el-table-column
prop="currentFee"
align="center"
- label="褰撳墠璐圭敤(鍏�)">
+ label="宸蹭骇鐢熻垂鐢�(鍏�)">
</el-table-column>
<el-table-column
prop="fee"
@@ -147,7 +147,7 @@
<span v-if="item.ortherInfo">{{item.ortherInfo}}</span>
</div>
<!-- 閫夋嫨鍛樺伐 -->
- <selectEmployees ref="selectEmployees" @result="getValue" />
+ <selectEmployees ref="selectEmployees" @result="getValue1" />
<!-- 娣诲姞鍛樺伐 -->
<addEmployee ref="addEmployee" @result="getValue" />
<!-- 瀵煎叆鍚嶅崟 -->
@@ -181,6 +181,7 @@
applyEndTime: '',
factory: []
},
+ newVersionSolutionId: '',
pickerOptions: {},
price: '',
endTime: '', // 瀹為檯淇濋櫓鐢熸晥姝㈡湡
@@ -208,6 +209,7 @@
this.form.addDetailList = []
this.form.delDetailList = []
this.list = []
+ this.form.factory = []
this.form.id = null
this.item = null
this.form.solutionId = ''
@@ -252,14 +254,16 @@
})
getDetail(this.form.id)
.then(res => {
+ console.log(res)
this.list.push(res)
this.endTime = res.endTime
this.form.solutionId = res.solutionId
+ this.newVersionSolutionId = res.newVersionSolutionId
this.form.solutionsName = res.solutionsName
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.lastChangeDate ? res.lastChangeDate : res.startTime).getTime()
}
};
this.changeSolution1(res.solutionId)
@@ -321,7 +325,11 @@
this.$message.warning('璇峰厛閫夋嫨淇濋櫓鏂规')
return
}
- this.$refs.selectEmployees.open('閫夊彇鍛樺伐', { arr: this.form.delDetailList, price: this.price, insuranceApplyId: this.form.id })
+ if (!this.form.applyStartTime) {
+ this.$message.warning('璇峰厛閫夋嫨鎵瑰崟鐢熸晥璧锋湡')
+ return
+ }
+ this.$refs.selectEmployees.open('閫夊彇鍛樺伐', { arr: this.form.delDetailList, price: this.price, insuranceApplyId: this.form.id, validTime: this.form.applyStartTime })
},
addUser() {
if (!this.form.solutionId) {
@@ -376,7 +384,7 @@
this.$message.warning('璇烽�夋嫨鍛樺伐')
return
}
- this.$refs.confirmJobType.open('纭宸ョ', { solutionId: this.form.solutionId })
+ this.$refs.confirmJobType.open('纭宸ョ', { solutionId: this.newVersionSolutionId })
},
// 鏌ヨ鍏ㄩ儴鏂规
getCompany() {
@@ -412,6 +420,33 @@
handleSelectionChange (e) {
this.seleData = e.map(item => item.memberName)
},
+ // 閫夊彇鍛樺伐
+ getValue1 (list) {
+ let arr = JSON.parse(JSON.stringify(list))
+
+ arr.forEach(item => {
+ item.oldDuId = item.duId
+ item.oldDuName = item.duName
+ item.oldWorkTypeName = item.workTypeName
+ item.oldWorktypeId = item.worktypeId
+
+ item.duId = ''
+ item.duName = ''
+ item.workTypeName = ''
+ item.worktypeId = ''
+ })
+
+ for (let a = 0; a < arr.length; a++) {
+ for (let b = 0; b < this.form.factory.length; b++) {
+ if (arr[a].id === this.form.factory[b].id) {
+ this.$message.warning(`${arr[a].companyName}鍛樺伐閲嶅锛乣)
+ return
+ }
+ }
+ }
+
+ this.form.factory.push(...arr)
+ },
getValue(list) {
let arr = JSON.parse(JSON.stringify(list))
--
Gitblit v1.9.3