From 56edbd80963acea41d9b9737bb9264f57a6e4ae2 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 19 十一月 2024 09:13:41 +0800
Subject: [PATCH] 优化
---
company/src/components/enterprise/OperaInsuranceApplyAddWindow.vue | 86 +++++++++++++++++++++++++++++++-----------
1 files changed, 63 insertions(+), 23 deletions(-)
diff --git a/company/src/components/enterprise/OperaInsuranceApplyAddWindow.vue b/company/src/components/enterprise/OperaInsuranceApplyAddWindow.vue
index 4940722..98b1247 100644
--- a/company/src/components/enterprise/OperaInsuranceApplyAddWindow.vue
+++ b/company/src/components/enterprise/OperaInsuranceApplyAddWindow.vue
@@ -426,28 +426,68 @@
price = price + item.fee
})
// }
- if (!this.form.companyId) {
- this.$refs.detailsPolicyholder.open('鎶曚繚璇︽儏鍗�', {
- companyName: this.userInfo.company.name,
- solutionName: this.item.name,
- solutionType: this.item.type,
- applyStartTime: this.form.applyStartTime,
- applyEndTime: this.form.applyEndTime,
- insureNum: this.tableData.length,
- totalPrice: price,
- detailList: this.tableData
- })
+ const endTime = Number(this.item.correctWarnTime.split(':')[0] + this.item.correctWarnTime.split(':')[1])
+ const now = new Date();
+ const hours = now.getHours();
+ const minutes = now.getMinutes();
+ const date = `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`;
+ const startTime = Number(date.split(':')[0] + date.split(':')[1])
+ if (startTime > endTime) {
+ this.$confirm('鎮ㄥ凡瓒呰繃褰撳ぉ鏈�鏅氭壒鏀规椂闂达紝淇濆崟瀹為檯鐢熸晥鏃堕棿浠ヤ繚闄╁叕鍙稿鏍镐负鍑嗭紒', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ if (!this.form.companyId) {
+ this.$refs.detailsPolicyholder.open('鎶曚繚璇︽儏鍗�', {
+ companyName: this.userInfo.company.name,
+ solutionName: this.item.name,
+ solutionType: this.item.type,
+ applyStartTime: this.form.applyStartTime,
+ applyEndTime: this.form.applyEndTime,
+ insureNum: this.tableData.length,
+ totalPrice: price,
+ detailList: this.tableData
+ })
+ } else {
+ this.$refs.detailsPolicyholder.open('鎶曚繚璇︽儏鍗�', {
+ companyName: this.form.companyName,
+ solutionName: this.item.name,
+ solutionType: this.item.type,
+ applyStartTime: this.form.applyStartTime,
+ applyEndTime: this.form.applyEndTime,
+ insureNum: this.tableData.length,
+ totalPrice: price,
+ detailList: this.tableData
+ })
+ }
+ }).catch(() => {
+
+ });
} else {
- this.$refs.detailsPolicyholder.open('鎶曚繚璇︽儏鍗�', {
- companyName: this.form.companyName,
- solutionName: this.item.name,
- solutionType: this.item.type,
- applyStartTime: this.form.applyStartTime,
- applyEndTime: this.form.applyEndTime,
- insureNum: this.tableData.length,
- totalPrice: price,
- detailList: this.tableData
- })
+ if (!this.form.companyId) {
+ this.$refs.detailsPolicyholder.open('鎶曚繚璇︽儏鍗�', {
+ companyName: this.userInfo.company.name,
+ solutionName: this.item.name,
+ solutionType: this.item.type,
+ applyStartTime: this.form.applyStartTime,
+ applyEndTime: this.form.applyEndTime,
+ insureNum: this.tableData.length,
+ totalPrice: price,
+ detailList: this.tableData
+ })
+ } else {
+ this.$refs.detailsPolicyholder.open('鎶曚繚璇︽儏鍗�', {
+ companyName: this.form.companyName,
+ solutionName: this.item.name,
+ solutionType: this.item.type,
+ applyStartTime: this.form.applyStartTime,
+ applyEndTime: this.form.applyEndTime,
+ insureNum: this.tableData.length,
+ totalPrice: price,
+ detailList: this.tableData
+ })
+ }
}
}
})
@@ -511,7 +551,7 @@
this.$message.warning('璇峰厛閫夋嫨淇濋櫓鏂规')
return
}
- this.$refs.importEmployees.open('涓婁紶鍚嶅崟', { arr: this.tableData, solutionId: this.form.solutionId, type: 1, price: this.price })
+ this.$refs.importEmployees.open('涓婁紶鍚嶅崟', { arr: this.tableData, solutionId: this.form.solutionId, type: 1, hasDispatchUnit: this.item.hasDispatchUnit, price: this.price })
},
// 鍒囨崲鏂规
changeSolution (e) {
@@ -595,7 +635,7 @@
},
// 鏌ヨ鍏ㄩ儴鏂规
getCompany () {
- getUseList(this.form.companyId, 2)
+ getUseList(this.form.companyId ? this.form.companyId : this.userInfo.companyId, 2)
.then(res => {
this.company = res
})
--
Gitblit v1.9.3