fix:bug87155:预估到账日期查询的样式,改成分段的,不是一次性选择

This commit is contained in:
fengchenchen
2024-07-15 16:56:28 +08:00
parent 38063d2ae7
commit 773372161c
5 changed files with 107 additions and 58 deletions
+35 -17
View File
@@ -16,25 +16,43 @@ export const MonthRangeMixin = {
}, },
methods:{ methods:{
moment, moment,
onMonthRangeDateChange(value, dateString) { // onMonthRangeDateChange(value, dateString) {
this.queryParam[this.rangeMonthKey.start] = dateString[0] || null // this.queryParam[this.rangeMonthKey.start] = dateString[0] || null
this.queryParam[this.rangeMonthKey.end] = dateString[1] || null // this.queryParam[this.rangeMonthKey.end] = dateString[1] || null
this.queryParam.estimatedArrivalDate = value // this.queryParam.estimatedArrivalDate = value
}, // },
handleMonthRangePanelChange(value, mode) { // handleMonthRangePanelChange(value, mode) {
this.queryParam[this.rangeMonthKey.start] = !value[0] ? null : value[0].format(this.rangeMonthDateFormat) // this.queryParam[this.rangeMonthKey.start] = !value[0] ? null : value[0].format(this.rangeMonthDateFormat)
this.queryParam[this.rangeMonthKey.end] = !value[1] ? null : value[1].format(this.rangeMonthDateFormat) // this.queryParam[this.rangeMonthKey.end] = !value[1] ? null : value[1].format(this.rangeMonthDateFormat)
this.queryParam.estimatedArrivalDate = value // this.queryParam.estimatedArrivalDate = value
this.rangeMonthDateModel = [mode[0] === 'date' ? 'month' : mode[0], mode[1] === 'date' ? 'month' : mode[1]] // this.rangeMonthDateModel = [mode[0] === 'date' ? 'month' : mode[0], mode[1] === 'date' ? 'month' : mode[1]]
}, // },
// 重写查询方法--删除预估到账日期属性 // // 重写查询方法--删除预估到账日期属性
searchQuery() { // searchQuery() {
this.lastQueryParam = {...this.queryParam} // this.lastQueryParam = {...this.queryParam}
if(this.lastQueryParam.estimatedArrivalDate) { // if(this.lastQueryParam.estimatedArrivalDate) {
delete this.lastQueryParam.estimatedArrivalDate // delete this.lastQueryParam.estimatedArrivalDate
// }
// this.loadData(1)
// },
disabledStartMonth(startValue) {
const endValue = this.queryParam[this.rangeMonthKey.end] && moment(this.queryParam[this.rangeMonthKey.end], this.rangeMonthDateFormat)
if (!startValue || !endValue) {
return false
} }
this.loadData(1) return startValue.valueOf() > endValue.valueOf()
}, },
disabledEndMonth(endValue) {
const startValue = this.queryParam[this.rangeMonthKey.start] && moment(this.queryParam[this.rangeMonthKey.start], this.rangeMonthDateFormat)
if (!endValue || !startValue) {
return false
}
return startValue.valueOf() > endValue.valueOf()
},
disabledDateBeforeToday(current) {
return current < moment().subtract(1, 'day') // 当天之前的不可选,不包括当天
}
} }
} }
@@ -47,16 +47,22 @@
<j-year-date style="width:100%" placeholder="请选择来款年份" v-model="queryParam.year"></j-year-date> <j-year-date style="width:100%" placeholder="请选择来款年份" v-model="queryParam.year"></j-year-date>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="10" :lg="11" :md="12" :sm="24">
<a-form-item label="预估到账日期" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="预估到账日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-range-picker <j-month-date placeholder="请选择开始日期"
style="width: 100%" class="query-group-cust"
format="YYYY-MM" v-model="queryParam[rangeMonthKey.start]"
v-model="queryParam.estimatedArrivalDate" :trigger-change="true"
:mode="rangeMonthDateModel" date-format="YYYY-MM"
:placeholder="['开始时间', '结束时间']" :disabled-date="disabledStartMonth"
@panelChange="handleMonthRangePanelChange" />
@change="onMonthRangeDateChange" <span class="query-group-split-cust"></span>
<j-month-date placeholder="请选择结束日期"
class="query-group-cust"
v-model="queryParam[rangeMonthKey.end]"
:trigger-change="true"
date-format="YYYY-MM"
:disabled-date="disabledEndMonth"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -182,6 +188,7 @@ import {getAction} from '@api/manage'
import {getFileInfo} from '@api/api' import {getFileInfo} from '@api/api'
import {getPayConfirmList} from '@api/incomePaymentsApi' import {getPayConfirmList} from '@api/incomePaymentsApi'
import { MonthRangeMixin } from '../../../mixins/MonthRangeMixins' import { MonthRangeMixin } from '../../../mixins/MonthRangeMixins'
import JMonthDate from '../../../components/tools/JMonthDate'
export default { export default {
name: 'SafeguardMemberList', name: 'SafeguardMemberList',
@@ -192,7 +199,8 @@ export default {
ProjectDetailModal, ProjectDetailModal,
StatusSlot, StatusSlot,
PageHeaderTitle, PageHeaderTitle,
PreviewFile PreviewFile,
JMonthDate
}, },
data() { data() {
return { return {
@@ -50,16 +50,22 @@
></j-dict-select-tag> ></j-dict-select-tag>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="10" :lg="11" :md="12" :sm="24">
<a-form-item label="预估到账日期"> <a-form-item label="预估到账日期">
<a-range-picker <j-month-date placeholder="请选择开始日期"
style="width: 100%" class="query-group-cust"
format="YYYY-MM" v-model="queryParam[rangeMonthKey.start]"
v-model="queryParam.estimatedArrivalDate" :trigger-change="true"
:mode="rangeMonthDateModel" date-format="YYYY-MM"
:placeholder="['开始时间', '结束时间']" :disabled-date="disabledStartMonth"
@panelChange="handleMonthRangePanelChange" />
@change="onMonthRangeDateChange" <span class="query-group-split-cust"></span>
<j-month-date placeholder="请选择结束日期"
class="query-group-cust"
v-model="queryParam[rangeMonthKey.end]"
:trigger-change="true"
date-format="YYYY-MM"
:disabled-date="disabledEndMonth"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -230,6 +236,7 @@ import MemberEquityModal from './modules/MemberEquityModal'
import MemberCopyModal from './modules/MemberCopyModal' import MemberCopyModal from './modules/MemberCopyModal'
import { ProjectTypeEnums } from '@/enums/commonEnums' import { ProjectTypeEnums } from '@/enums/commonEnums'
import { MonthRangeMixin } from '../../../mixins/MonthRangeMixins' import { MonthRangeMixin } from '../../../mixins/MonthRangeMixins'
import JMonthDate from '../../../components/tools/JMonthDate'
export default { export default {
name: 'SafeguardStardsMemberList', name: 'SafeguardStardsMemberList',
@@ -241,7 +248,8 @@ export default {
PreviewFile, PreviewFile,
SafeguardStardsMemberModal, SafeguardStardsMemberModal,
MemberEquityModal, MemberEquityModal,
MemberCopyModal MemberCopyModal,
JMonthDate
}, },
computed: { computed: {
importExcelUrl: function () { importExcelUrl: function () {
@@ -42,16 +42,22 @@
<j-year-date style="width:100%" placeholder="请选择运行年份" v-model="queryParam.year"></j-year-date> <j-year-date style="width:100%" placeholder="请选择运行年份" v-model="queryParam.year"></j-year-date>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="10" :lg="11" :md="12" :sm="24">
<a-form-item label="预估到账日期" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="预估到账日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-range-picker <j-month-date placeholder="请选择开始日期"
style="width: 100%" class="query-group-cust"
format="YYYY-MM" v-model="queryParam[rangeMonthKey.start]"
v-model="queryParam.estimatedArrivalDate" :trigger-change="true"
:mode="rangeMonthDateModel" date-format="YYYY-MM"
:placeholder="['开始时间', '结束时间']" :disabled-date="disabledStartMonth"
@panelChange="handleMonthRangePanelChange" />
@change="onMonthRangeDateChange" <span class="query-group-split-cust"></span>
<j-month-date placeholder="请选择结束日期"
class="query-group-cust"
v-model="queryParam[rangeMonthKey.end]"
:trigger-change="true"
date-format="YYYY-MM"
:disabled-date="disabledEndMonth"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -163,10 +169,11 @@ import IconProjectManagement from '@/assets/imgs/icon/icon_project_management.pn
import { formatMoney } from '../../utils/formatMoney' import { formatMoney } from '../../utils/formatMoney'
import {getPayConfirmList} from '@api/incomePaymentsApi' import {getPayConfirmList} from '@api/incomePaymentsApi'
import { MonthRangeMixin } from '../../mixins/MonthRangeMixins' import { MonthRangeMixin } from '../../mixins/MonthRangeMixins'
import JMonthDate from '../../components/tools/JMonthDate'
export default { export default {
name: 'GeneralProjectManagement', name: 'GeneralProjectManagement',
components: { JYearDate, GeneralProjectModule, SelectPrincipal, ProjectDetailModal, StatusSlot, PageHeaderTitle }, components: { JYearDate, GeneralProjectModule, SelectPrincipal, ProjectDetailModal, StatusSlot, PageHeaderTitle, JMonthDate },
mixins: [JeroListMixin, MonthRangeMixin], mixins: [JeroListMixin, MonthRangeMixin],
computed: { computed: {
importExcelUrl: function () { importExcelUrl: function () {
@@ -70,16 +70,22 @@
<a-input placeholder="请输入标签名称" v-model="queryParam.label" :maxLength='50'></a-input> <a-input placeholder="请输入标签名称" v-model="queryParam.label" :maxLength='50'></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="10" :lg="11" :md="12" :sm="24">
<a-form-item label="预估到账日期" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="预估到账日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-range-picker <j-month-date placeholder="请选择开始日期"
style="width: 100%" class="query-group-cust"
format="YYYY-MM" v-model="queryParam[rangeMonthKey.start]"
v-model="queryParam.estimatedArrivalDate" :trigger-change="true"
:mode="rangeMonthDateModel" date-format="YYYY-MM"
:placeholder="['开始时间', '结束时间']" :disabled-date="disabledStartMonth"
@panelChange="handleMonthRangePanelChange" />
@change="onMonthRangeDateChange" <span class="query-group-split-cust"></span>
<j-month-date placeholder="请选择结束日期"
class="query-group-cust"
v-model="queryParam[rangeMonthKey.end]"
:trigger-change="true"
date-format="YYYY-MM"
:disabled-date="disabledEndMonth"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -248,7 +254,8 @@ import WorkGroupSetLabel from './modules/WorkGroupSetLabel'
import { formatMoney } from '../../utils/formatMoney' import { formatMoney } from '../../utils/formatMoney'
import {YesOrNoEnums} from '@/enums/commonEnums' import {YesOrNoEnums} from '@/enums/commonEnums'
import { MonthRangeMixin } from '../../mixins/MonthRangeMixins' import { MonthRangeMixin } from '../../mixins/MonthRangeMixins'
import { getAction } from "../../api/manage"; import { getAction } from '../../api/manage'
import JMonthDate from '../../components/tools/JMonthDate'
// eslint-disable-next-line no-undef,no-unused-vars // eslint-disable-next-line no-undef,no-unused-vars
const Base64 = require('js-base64').Base64 const Base64 = require('js-base64').Base64
@@ -264,7 +271,8 @@ export default {
WorkingGroupMemberSetChargeNotice, WorkingGroupMemberSetChargeNotice,
PreviewFile, PreviewFile,
EmailErrorMsgModal, EmailErrorMsgModal,
WorkGroupSetLabel WorkGroupSetLabel,
JMonthDate
}, },
mixins: [JeroListMixin, MonthRangeMixin], mixins: [JeroListMixin, MonthRangeMixin],
computed: { computed: {