Browse Source

完善车型管理--规格型号改为下拉

master
yunuo970428 3 years ago
parent
commit
5110ccacfd
  1. 85
      anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexingAdd.vue

85
anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexingAdd.vue

@ -126,7 +126,9 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item> <el-form-item>
<el-input v-model="temp.specifications" maxlength="125" placeholder="请输入" class="addinputw" clearable/> <el-select v-model="temp.specificationsKey" class="addinputw" filterable placeholder="请选择" @change="getGuiGe">
<el-option v-for="item in specifications" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" class="tleftb"> <el-col :span="4" class="tleftb">
@ -209,6 +211,7 @@ export default {
marketSegments: '', // key marketSegments: '', // key
marketSegmentsValue: '', // value marketSegmentsValue: '', // value
specifications: '', // specifications: '', //
specificationsKey: '',
insideCode: '', // insideCode: '', //
department: '', // key department: '', // key
departmentValue: '', // value departmentValue: '', // value
@ -225,6 +228,7 @@ export default {
facturer: [], facturer: [],
marketSegments: 'marketSegments', marketSegments: 'marketSegments',
segments: [], segments: [],
specifications: [],
vehicleType: 'vehicleType', vehicleType: 'vehicleType',
cleType: [], cleType: [],
emissionStandard: 'emissionStandard', emissionStandard: 'emissionStandard',
@ -433,6 +437,7 @@ export default {
marketSegments: '', // key marketSegments: '', // key
marketSegmentsValue: '', // value marketSegmentsValue: '', // value
specifications: '', // specifications: '', //
specificationsKey: '',
insideCode: '', // insideCode: '', //
department: '', // key department: '', // key
departmentValue: '', // value departmentValue: '', // value
@ -473,117 +478,92 @@ export default {
}, },
setDetaList() { setDetaList() {
// - // -
typeValues({ typeValues({ type: 'series' }).then((res) => {
type: 'series'
}).then((res) => {
if (res.success) { if (res.success) {
this.department_list = res.data this.department_list = res.data
console.log('下拉框请求系别', res.data) console.log('下拉框请求系别', res.data)
} }
}) })
// - // -
typeValues({ typeValues({ type: 'productLine' }).then((res) => {
type: 'productLine'
}).then((res) => {
if (res.success) { if (res.success) {
this.productLine_list = res.data this.productLine_list = res.data
console.log('下拉框请求系列', res.data) console.log('下拉框请求系列', res.data)
} }
}) })
typeValues({ typeValues({ type: 'vehicleFunction' }).then((res) => {
type: 'vehicleFunction'
}).then((res) => {
if (res.success) { if (res.success) {
this.vehicleFunction_list = res.data this.vehicleFunction_list = res.data
console.log('下拉框请求功能', res.data) console.log('下拉框请求功能', res.data)
} }
}) })
typeValues({ typeValues({ type: 'specificationModel' }).then((resp) => {
type: this.marketSegments if (resp.success) {
}).then(res => { this.specifications = resp.data
}
})
typeValues({ type: this.marketSegments }).then(res => {
if (res.success) { if (res.success) {
this.segments = res.data this.segments = res.data
} }
}) })
typeValues({ typeValues({ type: this.vehicleType }).then(res => {
type: this.vehicleType
}).then(res => {
if (res.success) { if (res.success) {
this.cleType = res.data this.cleType = res.data
} }
}) })
typeValues({ typeValues({ type: this.emissionStandard }).then(res => {
type: this.emissionStandard
}).then(res => {
if (res.success) { if (res.success) {
this.Standard = res.data this.Standard = res.data
} }
}) })
typeValues({ typeValues({ type: this.productLine }).then(res => {
type: this.productLine
}).then(res => {
if (res.success) { if (res.success) {
this.ctLine = res.data this.ctLine = res.data
} }
}) })
// //
typeValues({ typeValues({ type: this.suspension }).then(res => {
type: this.suspension
}).then(res => {
if (res.success) { if (res.success) {
this.pension = res.data this.pension = res.data
} }
}) })
typeValues({ typeValues({ type: this.series }).then(res => {
type: this.series
}).then(res => {
if (res.success) { if (res.success) {
this.opseries = res.data this.opseries = res.data
} }
}) })
// //
typeValues({ typeValues({ type: this.driver }).then(res => {
type: this.driver
}).then(res => {
if (res.success) { if (res.success) {
this.eForm = res.data this.eForm = res.data
} }
}) })
// //
typeValues({ typeValues({ type: this.horsepower }).then(res => {
type: this.horsepower
}).then(res => {
if (res.success) { if (res.success) {
this.epower = res.data this.epower = res.data
} }
}) })
// //
typeValues({ typeValues({ type: this.gearbox }).then(res => {
type: this.gearbox
}).then(res => {
if (res.success) { if (res.success) {
this.arbox = res.data this.arbox = res.data
} }
}) })
// //
typeValues({ typeValues({ type: this.fuelType }).then(res => {
type: this.fuelType
}).then(res => {
if (res.success) { if (res.success) {
this.lType = res.data this.lType = res.data
} }
}) })
// //
typeValues({ typeValues({ type: this.vehicleVersion }).then(res => {
type: this.vehicleVersion
}).then(res => {
if (res.success) { if (res.success) {
this.Version = res.data this.Version = res.data
} }
}) })
typeValues({ typeValues({ type: this.engineType }).then(res => {
type: this.engineType
}).then(res => {
if (res.success) { if (res.success) {
this.neType = res.data this.neType = res.data
} }
@ -652,7 +632,18 @@ export default {
}) })
this.temp.marketSegmentsValue = bb.name this.temp.marketSegmentsValue = bb.name
}, },
getGuiGe(value) {
let bb = null
this.specifications.forEach(e => {
if (e.dictKey === value) {
bb = {
name: e.dictValue,
vaule: e.dictKey
}
}
})
this.temp.specifications = bb.name
},
getQudong(value) { getQudong(value) {
let bb = null let bb = null
this.eForm.forEach(e => { this.eForm.forEach(e => {

Loading…
Cancel
Save