From 1e72942aa4848ae4835e7f30bb4adc01f9ce5bdc Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 23 二月 2024 11:45:58 +0800
Subject: [PATCH] mrshi
---
company/src/components/enterprise/additionSubtractionApplication.vue | 21 ++++++++--
company/src/components/enterprise/OperaInsuranceApplyWindow.vue | 2
company/src/components/business/OperaApplyChangeDetailWindow.vue | 12 +++---
company/src/components/business/OperaInsuranceApplyWindow.vue | 2
company/src/components/enterprise/directInvoicingApplication.vue | 10 ++++
company/src/utils/util.js | 21 ++++++++++
company/src/components/business/OperaApplyChangeUnitDetailWindow.vue | 15 +++++--
7 files changed, 65 insertions(+), 18 deletions(-)
diff --git a/company/src/components/business/OperaApplyChangeDetailWindow.vue b/company/src/components/business/OperaApplyChangeDetailWindow.vue
index 1702dc1..fd3d992 100644
--- a/company/src/components/business/OperaApplyChangeDetailWindow.vue
+++ b/company/src/components/business/OperaApplyChangeDetailWindow.vue
@@ -54,7 +54,7 @@
align="center"
label="淇濆崟鍙�">
<template slot-scope="{row}">
- <el-button type="text" @click="$refs.OperaInsuranceApplyDetails.open('鎶曚繚璇︽儏', { id: row.applyId })">{{row.applyCode}}</el-button>
+ <el-button type="text" @click="$refs.insuranceApplyDetails.open('鎶曚繚璇︽儏', { id: row.applyId })">{{row.applyCode}}</el-button>
</template>
</el-table-column>
<el-table-column
@@ -191,7 +191,7 @@
<!-- 鎹㈠巶鐢宠 -->
<factoryChange ref="factoryChange" @success="successEvent" />
<!-- 鎶曚繚璇︽儏 -->
- <OperaInsuranceApplyDetails ref="OperaInsuranceApplyDetails" @success="successEvent" />
+ <insuranceApplyDetails ref="insuranceApplyDetails" @success="successEvent" />
<template v-slot:footer>
<el-button @click="visible=false">杩斿洖</el-button>
</template>
@@ -207,7 +207,7 @@
import reinsurance from '@/components/enterprise/reinsurance'
import factoryChange from '@/components/enterprise/factoryChange'
import add_subtract_return from '@/components/enterprise/add_subtract_return'
-import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
+// import insuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
import {
getDetail,
getChangeDetail,
@@ -219,7 +219,7 @@
import { mapState } from 'vuex'
export default {
- name: 'OperaApplyChangeDetailWindow',
+ name: 'OperaApplyChangeDetailWindow1',
extends: BaseOpera,
components: {
GlobalWindow,
@@ -229,7 +229,7 @@
OperaInsuranceApply,
reinsurance,
factoryChange,
- OperaInsuranceApplyDetails
+ insuranceApplyDetails: () => import ('@/components/business/OperaInsuranceApplyWindow')
},
data () {
return {
@@ -310,7 +310,7 @@
capacity: 10,
page: this.currentPage,
model: {
- applyChangId: this.modelId,
+ applyChangeId: this.modelId,
types:[ this.activeName]
}
}).then(res => {
diff --git a/company/src/components/business/OperaApplyChangeUnitDetailWindow.vue b/company/src/components/business/OperaApplyChangeUnitDetailWindow.vue
index 54e3d2e..2a80040 100644
--- a/company/src/components/business/OperaApplyChangeUnitDetailWindow.vue
+++ b/company/src/components/business/OperaApplyChangeUnitDetailWindow.vue
@@ -25,9 +25,9 @@
<!-- <el-button v-if="[0, 2, 3, 10].includes(model.status)" type="danger" @click="$refs.applyReturn.open('鐢宠閫�鍥�', {id: dataId})">鐢宠閫�鍥�</el-button>-->
<el-button v-if="[5, 8].includes(model.status)" type="primary" @click="$refs.editFactoryChange.open('鎹㈠巶鐢宠', {id: dataId, applyChangId: modelId})">鍐嶆鎶曚繚</el-button>
<el-button type="primary" v-if="model.status == 0" @click="goSign">绛剧讲鐢宠鍗�</el-button>
- <el-button v-if="[0, 1, 2, 3, 7].includes(model.status)" type="primary" @click="$refs.add_subtract_return.open('鐢宠閫�鍥�', { id: modelId })">鐢宠閫�鍥�</el-button>
+ <el-button v-if="[0, 1, 3, 7].includes(model.status)" type="primary" @click="$refs.add_subtract_return.open('鐢宠閫�鍥�', { id: modelId })">鐢宠閫�鍥�</el-button>
<el-button v-if="model.status == 5" type="primary" @click="viewApplyFile">鏌ョ湅鐢宠鍗�</el-button>
- <el-button v-if="model.status == 5" type="primary" @click="viewPidan">鏌ョ湅鎵瑰崟</el-button>
+ <el-button v-if="model.status == 5 || model.status == 2" type="primary" @click="viewPidan">鏌ョ湅鎵瑰崟</el-button>
<el-button v-if="[5, 8].includes(model.status)" type="primary" @click="closeOrder">鍏抽棴璁㈠崟</el-button>
</template>
<template v-else>
@@ -56,6 +56,9 @@
prop="applyCode"
align="center"
label="鍏宠仈淇濆崟鍙�">
+ <template slot-scope="{row}">
+ <el-button type="text" @click="$refs.insuranceApplyDetails.open('鎶曚繚璇︽儏', { id: row.applyId })">{{row.applyCode}}</el-button>
+ </template>
</el-table-column>
<el-table-column
prop="solutionsName"
@@ -179,6 +182,8 @@
<!-- 鎹㈠巶鐢宠 -->
<factoryChange ref="factoryChange" @success="successEvent" />
<editFactoryChange ref="editFactoryChange" @success="successEvent" />
+ <!-- 鎶曚繚璇︽儏 -->
+ <insuranceApplyDetails ref="insuranceApplyDetails" @success="successEvent" />
<template v-slot:footer>
<el-button @click="visible=false">杩斿洖</el-button>
</template>
@@ -195,6 +200,7 @@
import editFactoryChange from '@/components/enterprise/editFactoryChange'
import applyReturn from '@/components/enterprise/applyReturn'
import add_subtract_return from '@/components/enterprise/add_subtract_return'
+// import insuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
import {
getDetail,
getChangeDetail,
@@ -217,7 +223,8 @@
additionSubtractionApplication,
factoryChange,
add_subtract_return,
- editFactoryChange
+ editFactoryChange,
+ insuranceApplyDetails: () => import ('@/components/business/OperaInsuranceApplyWindow')
},
data () {
return {
@@ -298,7 +305,7 @@
capacity: 10,
page: this.currentPage,
model: {
- applyChangId: this.modelId,
+ applyChangeId: this.modelId,
types:[2]
}
}).then(res => {
diff --git a/company/src/components/business/OperaInsuranceApplyWindow.vue b/company/src/components/business/OperaInsuranceApplyWindow.vue
index 0920d80..fb97b81 100644
--- a/company/src/components/business/OperaInsuranceApplyWindow.vue
+++ b/company/src/components/business/OperaInsuranceApplyWindow.vue
@@ -423,7 +423,7 @@
import { mapState } from 'vuex'
export default {
- name: 'OperaInsuranceApplyWindow',
+ name: 'OperaInsuranceApplyWindow1',
extends: BaseOpera,
components: {
GlobalWindow,
diff --git a/company/src/components/enterprise/OperaInsuranceApplyWindow.vue b/company/src/components/enterprise/OperaInsuranceApplyWindow.vue
index 5f75645..ab34c40 100644
--- a/company/src/components/enterprise/OperaInsuranceApplyWindow.vue
+++ b/company/src/components/enterprise/OperaInsuranceApplyWindow.vue
@@ -151,7 +151,7 @@
import { all, getNewVersion } from '@/api/business/solutions'
import { create, getCountCyclePriceVO, getDetail, findList, updateData } from '@/api/business/insuranceApply'
export default {
- name: 'OperaInsuranceApplyWindow',
+ name: 'OperaInsuranceApplyWindow2',
extends: BaseOpera,
components: { GlobalWindow, selectEmployees, addEmployee, importEmployees, confirmJobType },
data () {
diff --git a/company/src/components/enterprise/additionSubtractionApplication.vue b/company/src/components/enterprise/additionSubtractionApplication.vue
index 623e54c..466ab59 100644
--- a/company/src/components/enterprise/additionSubtractionApplication.vue
+++ b/company/src/components/enterprise/additionSubtractionApplication.vue
@@ -184,7 +184,7 @@
import { all } from '@/api/business/solutions'
import { getDetail } from '@/api/business/insuranceApply'
import { create, getChangeCountCyclePriceVO } from '@/api/business/applyChange'
- import { getDate } from '@/utils/util'
+ import { getDate, compareDates, getTomorrow } from '@/utils/util'
export default {
name: 'additionSubtractionApplication',
extends: BaseOpera,
@@ -286,11 +286,22 @@
this.form.solutionsName = res.solutionsName
this.pickerOptions = {
disabledDate(time) {
- // - 8.64e7
- if (getDate()) {
-
+ // 褰撳墠鏃ユ湡澶т簬绛変簬鐢熸晥鏃ユ湡骞朵笖鏈�鍚庝竴娆℃搷浣滄椂闂寸瓑浜庣┖
+ 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()
+ }
}
- return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date(res.lastChangeDate ? res.lastChangeDate : res.startTime).getTime()
}
};
// this.changeSolution1(res.solutionId)
diff --git a/company/src/components/enterprise/directInvoicingApplication.vue b/company/src/components/enterprise/directInvoicingApplication.vue
index a6a6441..dd7d7e8 100644
--- a/company/src/components/enterprise/directInvoicingApplication.vue
+++ b/company/src/components/enterprise/directInvoicingApplication.vue
@@ -208,7 +208,15 @@
this.$message.warning('璇疯緭鍏ユ帴鏀跺湴鍧�')
return
}
- if (this.list2.length > 0 && this.setectData.length === 0) {
+ // if (this.list2.length > 0 && this.setectData.length === 0) {
+ // this.$message.warning('鑷冲皯鍕鹃�変竴椤瑰啿绾㈠崟鏁版嵁')
+ // return
+ // }
+ let price = 0
+ this.list1.forEach(item => {
+ price += item.amount
+ })
+ if (price < 0 && this.setectData.length === 0) {
this.$message.warning('鑷冲皯鍕鹃�変竴椤瑰啿绾㈠崟鏁版嵁')
return
}
diff --git a/company/src/utils/util.js b/company/src/utils/util.js
index 779f5a3..2cbb86d 100644
--- a/company/src/utils/util.js
+++ b/company/src/utils/util.js
@@ -75,3 +75,24 @@
let day = currentDate.getDate(); // 鑾峰彇褰撳墠鏃ユ湡
return `${year}-${month}-${day}`
}
+
+// 瀵规瘮鏃ユ湡
+export function compareDates(date1, date2) {
+ if (new Date(date1).getTime() > new Date(date2).getTime()) {
+ return 1
+ } else if (new Date(date1).getTime() < new Date(date2).getTime()) {
+ return 2
+ } else {
+ return 3
+ }
+}
+
+// 鑾峰彇鏄庡ぉ鐨勬棩鏈�
+export function getTomorrow() {
+ var today = new Date();
+ today.setDate(today.getDate() + 1);
+ var year = today.getFullYear();
+ var month = today.getMonth() + 1;
+ var day = today.getDate();
+ return year + "-" + month + "-" + day;
+}
--
Gitblit v1.9.3