diff --git a/anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexing.vue b/anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexing.vue index e990e2df88..693dbf6f7b 100644 --- a/anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexing.vue +++ b/anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexing.vue @@ -222,6 +222,13 @@ export default { return { btndisabled: false, btnList: [ + { + type: 'primary', + size: 'small', + icon: 'plus', + btnKey: 'toQuickAdd', + btnLabel: '快速新增' + }, { type: 'primary', size: 'small', @@ -345,6 +352,9 @@ export default { btnHandle(btnKey) { console.log('XXXXXXXXXXXXXXX ' + btnKey) switch (btnKey) { + case 'toQuickAdd': + this.toQuickAdd() + break case 'toAdd': this.toAdd() break @@ -558,6 +568,29 @@ export default { this.sids = aa console.log('sids', this.sids) }, + // 打开快速添加 + toQuickAdd() { + if (this.sids.length === 1) { + this.viewState = 2 + const sid = this.sids[0] + this.$refs['divadd'].showQuickAdd(sid) + } else if (this.sids.length > 1) { + this.$notify({ + title: '提示', + message: '不能选中多个车型进行快速新增操作!', + type: 'info', + duration: 2000 + }) + } else { + this.$notify({ + title: '提示', + message: '没有选择车型进行快速新增操作!', + type: 'error', + duration: 2000 + }) + return + } + }, // 打开添加 toAdd() { this.viewState = 2 diff --git a/anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexingAdd.vue b/anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexingAdd.vue index a0541762bf..5d6557d444 100644 --- a/anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexingAdd.vue +++ b/anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexingAdd.vue @@ -191,8 +191,7 @@ import { SaveList, selectByOrgSid } from '@/api/cheliang/basevehiclemodel' -import {fetchBySid} from '@/api/cheliang/dictcommons' -import { typeValues } from '@/api/cheliang/dictcommons' +import { fetchBySid, typeValues } from '@/api/cheliang/dictcommons' import Upload from '@/components/uploadFile/uploadImg.vue' export default { @@ -353,7 +352,41 @@ export default { this.setDetaList() this.getChang() }, - + showQuickAdd(sid) { + this.$nextTick(() => { + this.$refs['dataForm'].clearValidate() + }) + this.dialogStatus = 'add' + this.stateId = 0 + this.viewTitle = '【新增】常用配置信息' + // 此时数据必须修改才能保存 + const userSid = window.sessionStorage.getItem('userSid') + getAll({ sid: sid, userSid: userSid }).then(resp => { + if (resp.success) { + const data = resp.data + this.temp = data + this.temp = JSON.parse(JSON.stringify(this.temp).replace( + /baseVehicleModelAppendixVos/g, + 'baseVehicleModelAppendixDtos' + ) + ) + this.temp.sid = '' + if (this.temp.baseVehicleModelAppendixDtos.length > 0) { + for (var i = 0; i < this.temp.baseVehicleModelAppendixDtos.length; i++) { + var imgName = this.temp.baseVehicleModelAppendixDtos[i].filePath.split('/') + this.imgList.push({ + name: imgName[imgName.length - 1], + url: this.temp.baseVehicleModelAppendixDtos[i].filePath + }) + } + console.log('123123', this.imgList) + } + } + }) + this.getPathSid() + this.setDetaList() + this.getChang() + }, showEdit(sid, row) { console.log(sid) console.log('imgList', this.imgList) @@ -426,13 +459,15 @@ export default { }, getUrl() { console.log('已有图片', this.imgList) + var img_file = [] for (var i = 0; i < this.imgList.length; i++) { console.log(this.temp) - this.temp.baseVehicleModelAppendixDtos.push({ + img_file.push({ modelSid: this.temp.sid, filePath: this.imgList[i].url }) } + this.temp.baseVehicleModelAppendixDtos = img_file }, updateUrl() { console.log('回显', this.imgList) diff --git a/anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanli.vue b/anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanli.vue index 6352d59481..02a6b66f85 100644 --- a/anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanli.vue +++ b/anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanli.vue @@ -29,6 +29,13 @@ + + + + +
查询 @@ -126,6 +133,8 @@ export default { vin: '', model: '', purchaseType: '', + inspectedStartDate:'', + inspectedEndDate:'', userSid: window.sessionStorage.getItem('userSid') } }, @@ -187,6 +196,8 @@ export default { vin: '', model: '', purchaseType: '', + inspectedStartDate:'', + inspectedEndDate:'', userSid: window.sessionStorage.getItem('userSid') } }