Browse Source

车型管理新增快速新增按钮

master
Zhao Qiqi 3 years ago
parent
commit
7879d15f9a
  1. 33
      anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexing.vue
  2. 43
      anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexingAdd.vue
  3. 11
      anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanli.vue

33
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

43
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)

11
anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanli.vue

@ -29,6 +29,13 @@
</el-select>
<!-- <el-input v-model="listQuery.params.warehouseContract" placeholder="请输入负责人" clearable/>-->
</el-form-item>
<el-form-item label="验车日期">
<el-date-picker v-model="listQuery.params.inspectedStartDate" class="filter-item" type="date"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="请选择"/>
<label></label>
<el-date-picker v-model="listQuery.params.inspectedEndDate" class="filter-item" type="date"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="请选择"/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" size="small" @click="getList">查询</el-button>
@ -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')
}
}

Loading…
Cancel
Save