Merge remote-tracking branch 'origin/dev_20230808_OTA' into dev_20230808_OTA

This commit is contained in:
高嵩
2023-08-20 15:26:23 +08:00
4 changed files with 75 additions and 41 deletions
@@ -94,7 +94,7 @@ export default {
// } // }
// ], // ],
}, },
ids: '' ids: []
} }
}, },
mounted() { mounted() {
@@ -123,7 +123,7 @@ export default {
if (valid) { if (valid) {
let query = { let query = {
...this.formInline, ...this.formInline,
ids:this.ids ids:this.ids.join(',')
} }
this.confirmLoading = true this.confirmLoading = true
getAction('/ota/otaManageApplyEO/applyRematch', query).then((res) => { getAction('/ota/otaManageApplyEO/applyRematch', query).then((res) => {
@@ -131,6 +131,7 @@ export default {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.visible = false this.visible = false
this.confirmLoading = false this.confirmLoading = false
this.ids = []
this.$emit('getList') this.$emit('getList')
} else { } else {
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
@@ -142,7 +143,7 @@ export default {
}, },
handleCancel() { handleCancel() {
this.formInline = {} this.formInline = {}
this.ids = '' this.ids = []
this.visible = false this.visible = false
}, },
// dateChange(item) { // dateChange(item) {
@@ -156,9 +156,10 @@ export default {
handleOk() { handleOk() {
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
let OtaManageApplyEO = JSON.parse(JSON.stringify(this.ids))
let query = { let query = {
list: OtaManageApplyEO,
...this.formInline, ...this.formInline,
ids:this.ids
} }
this.confirmLoading = true this.confirmLoading = true
postAction('/ota/otaManageApplyEO/updateVdrBatch', query).then((res) => { postAction('/ota/otaManageApplyEO/updateVdrBatch', query).then((res) => {
@@ -166,6 +167,7 @@ export default {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.visible = false this.visible = false
this.confirmLoading = false this.confirmLoading = false
this.ids = []
this.$emit('getList') this.$emit('getList')
} else { } else {
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
@@ -177,7 +179,7 @@ export default {
}, },
handleCancel() { handleCancel() {
this.formInline = {} this.formInline = {}
this.ids = '' this.ids = []
this.visible = false this.visible = false
}, },
// dateChange(item) { // dateChange(item) {
@@ -249,7 +249,7 @@
</div> </div>
<batSetting :url="url" @getList="getList" ref="batSettingRef"/> <batSetting :url="url" @getList="getList" ref="batSettingRef"/>
<applyforrematch :url="url" @getList="getList" ref="applyforrematchRef"/> <applyforrematch :url="url" @getList="getList" ref="applyforrematchRef"/>
<rejectReason :url="url" @getList="getList" ref="rejectReasonRef"/> <rejectReason :url="url" @getList="getList" @msgForm='msgForm' ref="rejectReasonRef"/>
<remark @remarkForm='remarkForm' ref="remarkRef"/> <remark @remarkForm='remarkForm' ref="remarkRef"/>
<vdrDetial @vdrDetial='vdrDetial' ref="vdrDetialRef"/> <vdrDetial @vdrDetial='vdrDetial' ref="vdrDetialRef"/>
<!-- 历史记录--> <!-- 历史记录-->
@@ -291,7 +291,7 @@
show-quick-jumper show-quick-jumper
show-size-changer show-size-changer
:page-size.sync="pageSizehistory" :page-size.sync="pageSizehistory"
:total="total" :total="historytotal"
:current="pageNohistory" :current="pageNohistory"
@change="onChangehistory" @change="onChangehistory"
@showSizeChange="SizeChangehistory" @showSizeChange="SizeChangehistory"
@@ -312,7 +312,7 @@
<div style='font-size: 18px;margin-bottom: 20px;display: flex;justify-content: center' <div style='font-size: 18px;margin-bottom: 20px;display: flex;justify-content: center'
class="box-title-text-index" v-for='(item,key) in NotSelectedRowKeysValue'> class="box-title-text-index" v-for='(item,key) in NotSelectedRowKeysValue'>
<div> <div>
<span>{{ item.nioNumber }}</span> <span>{{ item }}</span>
</div> </div>
</div> </div>
</a-col> </a-col>
@@ -378,6 +378,7 @@ export default {
checkedList: [], checkedList: [],
serialNumber: '', serialNumber: '',
total: 0, total: 0,
historytotal: 0,
pageSize: 10, pageSize: 10,
pageNo: 1, pageNo: 1,
pageNohistory: 1, pageNohistory: 1,
@@ -397,7 +398,7 @@ export default {
columnshistory: [ columnshistory: [
{ {
title: this.$t('OperationDetails'), title: this.$t('OperationDetails'),
dataIndex: 'logContent', dataIndex: 'content',
align: 'left', align: 'left',
width: 320, width: 320,
ellipsis: true, ellipsis: true,
@@ -942,6 +943,7 @@ export default {
}, },
searchReset() { searchReset() {
this.queryParam = {} this.queryParam = {}
this.selectedRowKeys = []
this.pageNo = 1 this.pageNo = 1
this.getList() this.getList()
}, },
@@ -961,6 +963,7 @@ export default {
queryParam[val] = queryParam[val].join(',') queryParam[val] = queryParam[val].join(',')
} }
}) })
this.selectedRowKeys = []
queryParam.appliedVehicleProject = this.vehicleTypeCode == '全部'?queryParam.appliedVehicleProject:this.vehicleTypeCode queryParam.appliedVehicleProject = this.vehicleTypeCode == '全部'?queryParam.appliedVehicleProject:this.vehicleTypeCode
queryParam.plannedBpLaunchBatch = this.$route.query.plannedBpLaunchBatch queryParam.plannedBpLaunchBatch = this.$route.query.plannedBpLaunchBatch
let query = { let query = {
@@ -1040,18 +1043,18 @@ export default {
// 批量设置 // 批量设置
BatchSetting(){ BatchSetting(){
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let disabledList = [] let flag = 1
this.selectedRowKeysRecord.forEach(item => { this.selectedRowKeysRecord.forEach(item => {
if(item.disabled){ if(item.disabled == true){
disabledList.push(item.disabled) flag = 2
return
} }
}) })
const index = disabledList.indexOf(true); console.log(flag)
console.log(index) if (flag == 2) {
if (index !== -1) {
this.$message.warning(this.$t('datacannotbeedited')) this.$message.warning(this.$t('datacannotbeedited'))
} else { } 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 { } else {
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
@@ -1060,18 +1063,18 @@ export default {
// 申请重新匹配 // 申请重新匹配
applyforrematch(){ applyforrematch(){
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let statusList = [] let flag = 1
this.selectedRowKeysRecord.forEach(item => { this.selectedRowKeysRecord.forEach(item => {
if(item.status){ if(item.matchStatus !== 'locked'){
statusList.push(item.status) flag = 2
return
} }
}) })
const index = statusList.indexOf('locked'); console.log(flag)
console.log(index) if (flag !== 2) {
if (index == -1) {
this.$message.warning(this.$t('selectlocked'))
} else {
this.$refs.applyforrematchRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)),this.vehicleTypeCode) this.$refs.applyforrematchRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)),this.vehicleTypeCode)
} else {
this.$message.warning(this.$t('selectlocked'))
} }
} else { } else {
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
@@ -1096,22 +1099,21 @@ export default {
let query = { let query = {
pageNo: this.pageNohistory, pageNo: this.pageNohistory,
pageSize: this.pageSizehistory, pageSize: this.pageSizehistory,
paramsManifestId: this.$route.query.id, applyId: this.paramsReportDetailId
paramsCollectManifestId: this.paramsReportDetailId
} }
this.loading = true // this.loading = true
getAction('paramsCollectManifestLog/paramsCollectManifestLogEO/page', query).then((res) => { getAction('/ota/otaManageHistory/page', query).then((res) => {
if (res.success) { if (res.success) {
this.dataSourcehistory = res.result.records this.dataSourcehistory = res.result.records
if (this.dataSourcehistory && this.dataSourcehistory.length > 0) { if (this.dataSourcehistory && this.dataSourcehistory.length > 0) {
this.dataSourcehistory.forEach(val => { this.dataSourcehistory.forEach(val => {
val.logContent = val.logContent.replace(/\"/g, '<span class=\'textData\'>"</span>') val.content = val.content.replace(/\"/g, '<span class=\'textData\'>"</span>')
}) })
} }
this.total = res.result.total this.historytotal = res.result.total
this.loading = false // this.loading = false
} else { } else {
this.loading = false // this.loading = false
} }
}) })
}, },
@@ -1150,10 +1152,11 @@ export default {
postAction('/ota/otaManageApplyEO/submit', query).then((res) => { postAction('/ota/otaManageApplyEO/submit', query).then((res) => {
if (res.success) { if (res.success) {
if(res.result.msgList && res.result.msgList.length == 0){ if(res.result.msgList && res.result.msgList.length == 0){
this.selectedRowKeys = []
this.getList() this.getList()
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
}else{ }else{
this.selectedRowKeysValue = res.result.msgList this.NotSelectedRowKeysValue = res.result.msgList
this.visibleoperationFailed = true this.visibleoperationFailed = true
} }
} else { } else {
@@ -1167,13 +1170,20 @@ export default {
// 确认 // 确认
confirm(){ confirm(){
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
console.log(this.selectedRowKeys)
let query = { let query = {
ids:this.selectedRowKeys ids:this.selectedRowKeys.join(',')
} }
getAction('/ota/otaManageApplyEO/confirm', query).then((res) => { getAction('/ota/otaManageApplyEO/confirm', query).then((res) => {
if (res.success) { if (res.success) {
this.$message.success(this.$t('OperationSuccessful')) if(res.result.msgList && res.result.msgList.length == 0){
this.getList() this.selectedRowKeys = []
this.getList()
this.$message.success(this.$t('OperationSuccessful'))
}else{
this.NotSelectedRowKeysValue = res.result.msgList
this.visibleoperationFailed = true
}
} else { } else {
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
} }
@@ -1190,6 +1200,15 @@ export default {
this.$message.warning(this.$t('selectLeastOne')) 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){ getremark(item){
this.$refs.remarkRef.edit(JSON.parse(JSON.stringify(item))) this.$refs.remarkRef.edit(JSON.parse(JSON.stringify(item)))
@@ -1334,7 +1353,7 @@ export default {
}, },
// 错误数据的弹框 // 错误数据的弹框
cancleoperationFailed() { cancleoperationFailed() {
this.selectedRowKeysValue = [] this.NotSelectedRowKeysValue = []
this.visibleoperationFailed = false this.visibleoperationFailed = false
this.getList() this.getList()
// this.GetgetTableList() // this.GetgetTableList()
@@ -1479,4 +1498,14 @@ popconfirmmize {
background: #fff; background: #fff;
border-radius: 0 0 2px 2px; border-radius: 0 0 2px 2px;
} }
.imports-footer {
.imports-footer-wrap {
margin: 20px 0;
text-align: center;
.imports-sub {
margin-right: 20px;
}
}
}
</style> </style>
@@ -78,7 +78,7 @@ export default {
// } // }
// ], // ],
}, },
ids: '' ids: []
} }
}, },
mounted() { mounted() {
@@ -97,7 +97,7 @@ export default {
if (valid) { if (valid) {
let query = { let query = {
...this.formInline, ...this.formInline,
ids:this.ids ids:this.ids.join(',')
} }
this.confirmLoading = true this.confirmLoading = true
getAction('/ota/otaManageApplyEO/reject', query).then((res) => { getAction('/ota/otaManageApplyEO/reject', query).then((res) => {
@@ -105,7 +105,9 @@ export default {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.visible = false this.visible = false
this.confirmLoading = false this.confirmLoading = false
this.$emit('getList') this.ids = []
this.$emit('msgForm',res.result.msgList)
// this.$emit('getList')
} else { } else {
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false this.confirmLoading = false
@@ -116,7 +118,7 @@ export default {
}, },
handleCancel() { handleCancel() {
this.formInline = {} this.formInline = {}
this.ids = '' this.ids = []
this.visible = false this.visible = false
}, },
// dateChange(item) { // dateChange(item) {