From f7e32ea89cfe67db4530d3862d2ce95a0c89151b Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Sun, 20 Aug 2023 14:28:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=89=B9=E9=87=8F=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=89=8D=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/applyforrematch.vue | 7 ++- .../components/batSetting.vue | 6 +- .../otaAuthentication/components/detil.vue | 62 ++++++++++++------- .../components/rejectReason.vue | 7 ++- 4 files changed, 53 insertions(+), 29 deletions(-) diff --git a/jero-web/src/views/otamanagement/otaAuthentication/components/applyforrematch.vue b/jero-web/src/views/otamanagement/otaAuthentication/components/applyforrematch.vue index f39ada6ee..7f75cb222 100644 --- a/jero-web/src/views/otamanagement/otaAuthentication/components/applyforrematch.vue +++ b/jero-web/src/views/otamanagement/otaAuthentication/components/applyforrematch.vue @@ -94,7 +94,7 @@ export default { // } // ], }, - ids: '' + ids: [] } }, mounted() { @@ -123,7 +123,7 @@ export default { if (valid) { let query = { ...this.formInline, - ids:this.ids + ids:this.ids.join(',') } this.confirmLoading = true getAction('/ota/otaManageApplyEO/applyRematch', query).then((res) => { @@ -131,6 +131,7 @@ export default { this.$message.success(this.$t('OperationSuccessful')) this.visible = false this.confirmLoading = false + this.ids = [] this.$emit('getList') } else { this.$message.warning(this.$t('operationFailed')) @@ -142,7 +143,7 @@ export default { }, handleCancel() { this.formInline = {} - this.ids = '' + this.ids = [] this.visible = false }, // dateChange(item) { diff --git a/jero-web/src/views/otamanagement/otaAuthentication/components/batSetting.vue b/jero-web/src/views/otamanagement/otaAuthentication/components/batSetting.vue index c9e19f0e2..5f4dec75d 100644 --- a/jero-web/src/views/otamanagement/otaAuthentication/components/batSetting.vue +++ b/jero-web/src/views/otamanagement/otaAuthentication/components/batSetting.vue @@ -156,9 +156,10 @@ export default { handleOk() { this.$refs.ruleForm.validate(valid => { if (valid) { + let OtaManageApplyEO = JSON.parse(JSON.stringify(this.ids)) let query = { + list: OtaManageApplyEO, ...this.formInline, - ids:this.ids } this.confirmLoading = true postAction('/ota/otaManageApplyEO/updateVdrBatch', query).then((res) => { @@ -166,6 +167,7 @@ export default { this.$message.success(this.$t('OperationSuccessful')) this.visible = false this.confirmLoading = false + this.ids = [] this.$emit('getList') } else { this.$message.warning(this.$t('operationFailed')) @@ -177,7 +179,7 @@ export default { }, handleCancel() { this.formInline = {} - this.ids = '' + this.ids = [] this.visible = false }, // dateChange(item) { diff --git a/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue b/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue index 899d339e8..f5eb6678b 100644 --- a/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue +++ b/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue @@ -312,7 +312,7 @@
- {{ item.nioNumber }} + {{ item }}
@@ -942,6 +942,7 @@ export default { }, searchReset() { this.queryParam = {} + this.selectedRowKeys = [] this.pageNo = 1 this.getList() }, @@ -961,6 +962,7 @@ export default { queryParam[val] = queryParam[val].join(',') } }) + this.selectedRowKeys = [] queryParam.appliedVehicleProject = this.vehicleTypeCode == '全部'?queryParam.appliedVehicleProject:this.vehicleTypeCode queryParam.plannedBpLaunchBatch = this.$route.query.plannedBpLaunchBatch let query = { @@ -1040,18 +1042,18 @@ export default { // 批量设置 BatchSetting(){ if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { - let disabledList = [] + let flag = 1 this.selectedRowKeysRecord.forEach(item => { - if(item.disabled){ - disabledList.push(item.disabled) + if(item.disabled == true){ + flag = 2 + return } }) - const index = disabledList.indexOf(true); - console.log(index) - if (index !== -1) { + console.log(flag) + if (flag == 2) { this.$message.warning(this.$t('datacannotbeedited')) } else { - this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)),this.vehicleTypeCode) + this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeysRecord)),this.vehicleTypeCode) } } else { this.$message.warning(this.$t('selectLeastOne')) @@ -1060,18 +1062,18 @@ export default { // 申请重新匹配 applyforrematch(){ if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { - let statusList = [] + let flag = 1 this.selectedRowKeysRecord.forEach(item => { - if(item.status){ - statusList.push(item.status) + if(item.matchStatus !== 'locked'){ + flag = 2 + return } }) - const index = statusList.indexOf('locked'); - console.log(index) - if (index == -1) { - this.$message.warning(this.$t('selectlocked')) - } else { + console.log(flag) + if (flag !== 2) { this.$refs.applyforrematchRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)),this.vehicleTypeCode) + } else { + this.$message.warning(this.$t('selectlocked')) } } else { this.$message.warning(this.$t('selectLeastOne')) @@ -1150,10 +1152,11 @@ export default { postAction('/ota/otaManageApplyEO/submit', query).then((res) => { if (res.success) { if(res.result.msgList && res.result.msgList.length == 0){ + this.selectedRowKeys = [] this.getList() this.$message.success(this.$t('OperationSuccessful')) }else{ - this.selectedRowKeysValue = res.result.msgList + this.NotSelectedRowKeysValue = res.result.msgList this.visibleoperationFailed = true } } else { @@ -1167,13 +1170,20 @@ export default { // 确认 confirm(){ if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { + console.log(this.selectedRowKeys) let query = { - ids:this.selectedRowKeys + ids:this.selectedRowKeys.join(',') } getAction('/ota/otaManageApplyEO/confirm', query).then((res) => { if (res.success) { - this.$message.success(this.$t('OperationSuccessful')) - this.getList() + if(res.result.msgList && res.result.msgList.length == 0){ + this.selectedRowKeys = [] + this.getList() + this.$message.success(this.$t('OperationSuccessful')) + }else{ + this.NotSelectedRowKeysValue = res.result.msgList + this.visibleoperationFailed = true + } } else { this.$message.warning(this.$t('operationFailed')) } @@ -1334,7 +1344,7 @@ export default { }, // 错误数据的弹框 cancleoperationFailed() { - this.selectedRowKeysValue = [] + this.NotSelectedRowKeysValue = [] this.visibleoperationFailed = false this.getList() // this.GetgetTableList() @@ -1479,4 +1489,14 @@ popconfirmmize { background: #fff; border-radius: 0 0 2px 2px; } +.imports-footer { + .imports-footer-wrap { + margin: 20px 0; + text-align: center; + + .imports-sub { + margin-right: 20px; + } + } +} \ No newline at end of file diff --git a/jero-web/src/views/otamanagement/otaAuthentication/components/rejectReason.vue b/jero-web/src/views/otamanagement/otaAuthentication/components/rejectReason.vue index 21b45cde9..d7e8fc903 100644 --- a/jero-web/src/views/otamanagement/otaAuthentication/components/rejectReason.vue +++ b/jero-web/src/views/otamanagement/otaAuthentication/components/rejectReason.vue @@ -78,7 +78,7 @@ export default { // } // ], }, - ids: '' + ids: [] } }, mounted() { @@ -97,7 +97,7 @@ export default { if (valid) { let query = { ...this.formInline, - ids:this.ids + ids:this.ids.join(',') } this.confirmLoading = true getAction('/ota/otaManageApplyEO/reject', query).then((res) => { @@ -105,6 +105,7 @@ export default { this.$message.success(this.$t('OperationSuccessful')) this.visible = false this.confirmLoading = false + this.ids = [] this.$emit('getList') } else { this.$message.warning(this.$t('operationFailed')) @@ -116,7 +117,7 @@ export default { }, handleCancel() { this.formInline = {} - this.ids = '' + this.ids = [] this.visible = false }, // dateChange(item) { From d8d40b2acd072fc45cff4f79a2b3ff52e85c70b4 Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Sun, 20 Aug 2023 15:15:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=80=80=E5=9B=9E=E6=8F=90=E7=A4=BA=20?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E5=AF=B9=E6=8E=A5=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../otaAuthentication/components/detil.vue | 31 ++++++++++++------- .../components/rejectReason.vue | 3 +- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue b/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue index f5eb6678b..5b62f98bc 100644 --- a/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue +++ b/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue @@ -249,7 +249,7 @@ - + @@ -291,7 +291,7 @@ show-quick-jumper show-size-changer :page-size.sync="pageSizehistory" - :total="total" + :total="historytotal" :current="pageNohistory" @change="onChangehistory" @showSizeChange="SizeChangehistory" @@ -378,6 +378,7 @@ export default { checkedList: [], serialNumber: '', total: 0, + historytotal: 0, pageSize: 10, pageNo: 1, pageNohistory: 1, @@ -397,7 +398,7 @@ export default { columnshistory: [ { title: this.$t('OperationDetails'), - dataIndex: 'logContent', + dataIndex: 'content', align: 'left', width: 320, ellipsis: true, @@ -1098,22 +1099,21 @@ export default { let query = { pageNo: this.pageNohistory, pageSize: this.pageSizehistory, - paramsManifestId: this.$route.query.id, - paramsCollectManifestId: this.paramsReportDetailId + applyId: this.paramsReportDetailId } - this.loading = true - getAction('paramsCollectManifestLog/paramsCollectManifestLogEO/page', query).then((res) => { + // this.loading = true + getAction('/ota/otaManageHistory/page', query).then((res) => { if (res.success) { this.dataSourcehistory = res.result.records if (this.dataSourcehistory && this.dataSourcehistory.length > 0) { this.dataSourcehistory.forEach(val => { - val.logContent = val.logContent.replace(/\"/g, '"') + val.content = val.content.replace(/\"/g, '"') }) } - this.total = res.result.total - this.loading = false + this.historytotal = res.result.total + // this.loading = false } else { - this.loading = false + // this.loading = false } }) }, @@ -1200,6 +1200,15 @@ export default { this.$message.warning(this.$t('selectLeastOne')) } }, + msgForm(data){ + if(data && data.length !== 0){ + this.NotSelectedRowKeysValue = data + this.visibleoperationFailed = true + }else{ + this.selectedRowKeys = [] + this.getList() + } + }, // 备注编辑 getremark(item){ this.$refs.remarkRef.edit(JSON.parse(JSON.stringify(item))) diff --git a/jero-web/src/views/otamanagement/otaAuthentication/components/rejectReason.vue b/jero-web/src/views/otamanagement/otaAuthentication/components/rejectReason.vue index d7e8fc903..8eb00e75b 100644 --- a/jero-web/src/views/otamanagement/otaAuthentication/components/rejectReason.vue +++ b/jero-web/src/views/otamanagement/otaAuthentication/components/rejectReason.vue @@ -106,7 +106,8 @@ export default { this.visible = false this.confirmLoading = false this.ids = [] - this.$emit('getList') + this.$emit('msgForm',res.result.msgList) + // this.$emit('getList') } else { this.$message.warning(this.$t('operationFailed')) this.confirmLoading = false