From 485d6246bbe063f2cf473cf089da157a5ea7c96c Mon Sep 17 00:00:00 2001 From: yunuo970428 <405378304@qq.com> Date: Fri, 30 Sep 2022 17:32:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=BD=A6=E8=BE=86=E5=8F=B0?= =?UTF-8?q?=E8=B4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/cheliang/basevehicle.js | 8 + .../cheliangtaizhang/cheliangtaizhang.vue | 196 ++++++++++++------ 2 files changed, 144 insertions(+), 60 deletions(-) diff --git a/anrui-scm/anrui-scm-ui/src/api/cheliang/basevehicle.js b/anrui-scm/anrui-scm-ui/src/api/cheliang/basevehicle.js index 26bce924f8..0e96540f7e 100644 --- a/anrui-scm/anrui-scm-ui/src/api/cheliang/basevehicle.js +++ b/anrui-scm/anrui-scm-ui/src/api/cheliang/basevehicle.js @@ -181,4 +181,12 @@ export function save(data) { }) } +// 车辆台账--修改备注 +export function updateVehRemarks(data) { + return request({ + url: 'base/v1/basevehicle/updateVehRemarks', + method: 'post', + params: data + }) +} diff --git a/anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangtaizhang/cheliangtaizhang.vue b/anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangtaizhang/cheliangtaizhang.vue index ee9b9a3999..830254f238 100644 --- a/anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangtaizhang/cheliangtaizhang.vue +++ b/anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangtaizhang/cheliangtaizhang.vue @@ -43,7 +43,9 @@ - + + + - + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -205,6 +223,24 @@
+ + + + + 备注 + + + + + + + + + + @@ -215,7 +251,8 @@ import { fetchByUseOrgSid, getUseOrgByUserSid, pagerList, - selectCarTransferListAll + selectCarTransferListAll, + updateVehRemarks } from '@/api/cheliang/basevehicle' import { typeValues } from '@/api/cheliang/dictcommons' import cheliangtaizhangAdd from './cheliangtaizhangAdd' @@ -249,6 +286,7 @@ export default { viewState: 1, isSearchShow: false, dialogVisible: false, + dialogRemarks: false, index: 0, searchxianshitit: '显示查询条件', btndisabled: false, @@ -296,6 +334,13 @@ export default { btnKey: 'doChange', btnLabel: '车辆配件更换记录' }, + { + type: 'primary', + size: 'small', + icon: '', + btnKey: 'ChangeRemarks', + btnLabel: '修改备注' + }, { type: 'success', size: 'small', @@ -349,8 +394,8 @@ export default { temp: {}, // 添加和修改 templook: {}, // 查看实体 textMap: { - update: '编辑', - create: '创建' + sid: '', + remarks: '' }, multipleSelection: [], dialogFormVisible: false, // 添加修改对话框状态 @@ -425,6 +470,9 @@ export default { case 'doChange': this.doChange() break + case 'ChangeRemarks': + this.ChangeRemarks() + break case 'doExport': this.doExport() break @@ -643,6 +691,34 @@ export default { this.viewState = 9 this.$refs['divPeiJian'].init(this.multipleSelection) }, + ChangeRemarks() { + if (this.sids.length === 0) { + this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行修改备注操作' }) + return + } else if (this.sids.length > 1) { + this.$message({ showClose: true, type: 'error', message: '只能选择一条记录进行修改备注操作' }) + return + } else { + this.dialogRemarks = true + this.textMap.sid = this.sids[0] + } + }, + handleConfirm() { + updateVehRemarks({ remarks: this.textMap.remarks, sid: this.textMap.sid }).then((resp) => { + if (resp.success) { + this.$message({ showClose: true, type: 'success', message: '修改成功' }) + this.handleQuXiao() + this.getList() + } + }) + }, + handleQuXiao() { + this.dialogRemarks = false + this.textMap = { + sid: '', + remarks: '' + } + }, handleCheckImg(row) { this.dialogImgVisible = true this.srcList = row.images