From 2e53cc38defedbd476b146d2582768de8c88e127 Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Fri, 22 Sep 2023 17:23:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=98=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../archivesManage/archivesCheck/index.vue | 51 ++++++++---- .../archivesCheck/module/addCheck.vue | 80 +++++++++++++----- .../archivesCheck/module/checkDetail.vue | 83 +++++++++++++------ .../caseList/module/detailDialog.vue | 4 +- 4 files changed, 154 insertions(+), 64 deletions(-) diff --git a/src/views/archivesManage/archivesCheck/index.vue b/src/views/archivesManage/archivesCheck/index.vue index 4f41a0a..6cdaf1e 100644 --- a/src/views/archivesManage/archivesCheck/index.vue +++ b/src/views/archivesManage/archivesCheck/index.vue @@ -56,27 +56,43 @@ @row-dblclick="handleDbClick" > - - - - + + + + - - - - - - - - + + + + + + + + + + + + + + + + + @@ -125,9 +141,9 @@ export default { case 0: return '待执行' case 1: - return '执行中' + return '盘点中' case 2: - return '已执行' + return '已完成' } } }, @@ -155,8 +171,8 @@ export default { stateOptions: [ { value: -1, label: '全部' }, { value: 0, label: '待执行' }, - { value: 1, label: '执行中' }, - { value: 2, label: '已执行' } + { value: 1, label: '盘点中' }, + { value: 2, label: '已完成' } ], cateSearch: 'region', cateSearchOptions: [ @@ -283,6 +299,7 @@ export default { checkDetailDom.tableData = res.content }) checkDetailDom.detailVisible = true + checkDetailDom.arrangeType = row.arrangeType }, // 导出 handleExport() { diff --git a/src/views/archivesManage/archivesCheck/module/addCheck.vue b/src/views/archivesManage/archivesCheck/module/addCheck.vue index 6c352dd..8aaf10d 100644 --- a/src/views/archivesManage/archivesCheck/module/addCheck.vue +++ b/src/views/archivesManage/archivesCheck/module/addCheck.vue @@ -36,17 +36,19 @@ @input="treeSelectInput" /> - - + + - + - + @@ -181,8 +183,8 @@ export default { checkForm: { selectAreaValue: [], categoryValue: null, - years: [], - checkType: null + archiveYears: [], + arrangeType: null }, addFormVisible: false, selectAreaOptions: [], @@ -218,8 +220,8 @@ export default { rules: { selectAreaValue: [{ required: true, trigger: 'change', message: '请选择区域' }], categoryValue: [{ required: true, trigger: 'change', message: '请选择门类' }], - years: [{ required: true, trigger: 'change', message: '请选择年度' }], - checkType: [{ required: true, trigger: 'change', message: '请选择盘点方式' }] + archiveYears: [{ required: true, trigger: 'change', message: '请选择年度' }], + arrangeType: [{ required: true, trigger: 'change', message: '请选择盘点方式' }] } } }, @@ -285,12 +287,11 @@ export default { }) }, treeSelectInput(value) { - console.log('this.categoryValue', this.checkForm.categoryValue) if (this.checkForm.categoryValue) { this.getYear() } else { this.yearsOptions = [] - this.checkForm.years = [] + this.checkForm.archiveYears = [] } }, getYear() { @@ -301,7 +302,6 @@ export default { 'size': 10 } FetchInitArchivesView(params).then(data => { - console.log(data.yearGroup) if (data) { this.yearsOptions = data.yearGroup.map(item => { const json = {} @@ -312,6 +312,31 @@ export default { } }) }, + selectAll() { + if (this.checkForm.archiveYears.length < this.yearsOptions.length) { + this.checkForm.archiveYears = [] + this.yearsOptions.map((item) => { + this.checkForm.archiveYears.push(item.value) + }) + this.checkForm.archiveYears.unshift('全选') + } else { + this.checkForm.archiveYears = [] + } + }, + changeSelect(val) { + if (!val.includes('全选') && val.length === this.yearsOptions.length) { + this.checkForm.archiveYears.unshift('全选') + } else if (val.includes('全选') && (val.length - 1) < this.yearsOptions.length) { + this.checkForm.archiveYears = this.checkForm.archiveYears.filter((item) => { + return item !== '全选' + }) + } + }, + removeTag(val) { + if (val === '全选') { + this.checkForm.archiveYears = [] + } + }, // 生成盘点单 handleBuild() { this.$refs['form'].validate(valid => { @@ -320,13 +345,10 @@ export default { } this.loading = true const paramsNo = this.getParams() - if (paramsNo.checkType === 1) { - this.isCaseOrFile = 1 - } else { - this.isCaseOrFile = 2 - } this.params.deviceIds = paramsNo.deviceIds this.params.categoryIds = paramsNo.categoryIds + this.params.arrangeType = paramsNo.arrangeType + this.params.archiveYears = paramsNo.archiveYears this.params.page = this.page.page - 1 this.params.size = this.page.size this.doPreArrange(this.params) @@ -372,11 +394,29 @@ export default { }) region = region.join(',') // 区域str // const categoryIds = this.checkForm.categoryValue.filter(item => item !== 0) + + if (this.checkForm.arrangeType === 1) { + this.isCaseOrFile = 1 + } else { + this.isCaseOrFile = 2 + } + + let archiveYearsValue + if (this.checkForm.archiveYears.includes('全选')) { + archiveYearsValue = null + } else { + archiveYearsValue = this.checkForm.archiveYears.join(',') + } + + const categoryIds = [] + categoryIds.push(this.checkForm.categoryValue) + const params = { - 'categoryIds': this.checkForm.categoryValue, + 'categoryIds': categoryIds, 'deviceIds': deviceIds, 'region': region, - 'checkType': this.checkForm.checkType + 'arrangeType': this.checkForm.arrangeType, + 'archiveYears': archiveYearsValue } return params } diff --git a/src/views/archivesManage/archivesCheck/module/checkDetail.vue b/src/views/archivesManage/archivesCheck/module/checkDetail.vue index b3e3ae1..b4a4738 100644 --- a/src/views/archivesManage/archivesCheck/module/checkDetail.vue +++ b/src/views/archivesManage/archivesCheck/module/checkDetail.vue @@ -4,28 +4,36 @@
- - + + - + + + + + + + + + + + + - - - - - - - - + + - - - - - - - - - + + + + + + + + + + - + + + + + + + + + + + + + + + -
+ + @@ -74,9 +106,9 @@ export default { case 0: return '待执行' case 1: - return '执行中' + return '盘点中' case 2: - return '已执行' + return '已完成' } }, checkResult(val) { @@ -103,7 +135,8 @@ export default { detailVisible: false, tableData: [], rowData: [], - classLend: '' + classLend: '', + arrangeType: null } }, methods: { diff --git a/src/views/archivesManage/caseManage/caseList/module/detailDialog.vue b/src/views/archivesManage/caseManage/caseList/module/detailDialog.vue index 2d1403d..90df8e1 100644 --- a/src/views/archivesManage/caseManage/caseList/module/detailDialog.vue +++ b/src/views/archivesManage/caseManage/caseList/module/detailDialog.vue @@ -40,8 +40,8 @@ - - + +