Browse Source

完善车型管理、车辆台账

master
yunuo970428 3 years ago
parent
commit
39c5238a6f
  1. 2
      anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangtaizhang/cheliangtaizhangAdd.vue
  2. 29
      anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/relation/changyongpeizhi.vue
  3. 168
      anrui-scm/anrui-scm-ui/src/views/cheliang/chexingpeizhi/changyongpeizhiAdd.vue

2
anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangtaizhang/cheliangtaizhangAdd.vue

@ -436,6 +436,8 @@ export default {
this.temp.settlementStatusValue = '未买断'
this.temp.freight = 0
this.temp.isProblemVeh = '0'
this.temp.purchaseSystemName = window.sessionStorage.getItem('departmentName')
this.temp.purchaseSystemSid = window.sessionStorage.getItem('departmentSid')
this.getType()
this.getPathSid()
},

29
anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/relation/changyongpeizhi.vue

@ -5,6 +5,7 @@
<div class="tab-header webtop">
<div>常用配置管理</div>
<div>
<el-button type="primary" size="small" @click="handleXinZeng()">快速新增</el-button>
<el-button type="primary" size="small" @click="handleCreate()">新增配置</el-button>
<el-button type="primary" size="small" @click="handleConfirm()">确认</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
@ -126,19 +127,24 @@
</div>
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column width="50px" type="selection" align="center"/>
<el-table-column width="80px" fixed label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column fixed label="操作" align="center" width="80px" class-name="small-padding fixed-width">
<el-table-column width="50" type="selection" align="center"/>
<el-table-column width="60" fixed label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column fixed label="操作" align="center" width="80" class-name="small-padding fixed-width">
<template slot-scope="{row}">
<el-button size="mini" type="primary" @click="handleCheck(row)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="配置归属" width="190px" align="center">
<el-table-column fixed label="配置编码" width="120" align="center">
<template slot-scope="scope">
<span>{{ scope.row.configCode }}</span>
</template>
</el-table-column>
<el-table-column label="配置归属" width="190" align="center">
<template slot-scope="scope">
<span>{{ scope.row.createOrg }}</span>
</template>
</el-table-column>
<el-table-column width="110px" label="颜色" align="center">
<el-table-column width="110" label="颜色" align="center">
<template slot-scope="scope">
<span>{{ scope.row.carColor }}</span>
</template>
@ -631,6 +637,19 @@ export default {
const sid = row.sid
this.$refs['divinfo'].showInfo(sid, row)
},
handleXinZeng() {
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.pageState = 4
console.log(this.sids[0], this.sids)
this.$refs['divadd'].showQuickAdd({ sid: this.sids[0] })
}
},
//
handleCreate() {
this.pageState = 4

168
anrui-scm/anrui-scm-ui/src/views/cheliang/chexingpeizhi/changyongpeizhiAdd.vue

@ -1,4 +1,4 @@
<template xmlns="" xmlns="">
<template>
<div class="app-container">
<div class="tab-header webtop">
<!-- <div v-if="stateId==='0'">车型详细配置</div>-->
@ -18,11 +18,8 @@
<span>颜色</span>
</div>
<el-form-item prop="carColor">
<el-select v-model="temp.carColor" placeholder="请选择" filterable clearable
@change="changeCarColor"
class="addinputw">
<el-option v-for="item in carColor_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictValue"/>
<el-select v-model="temp.carColor" placeholder="请选择" filterable clearable @change="changeCarColor" class="addinputw">
<el-option v-for="item in carColor_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
</el-select>
</el-form-item>
</el-col>
@ -30,8 +27,6 @@
<div class="span-sty">
<span>缓速器</span>
</div>
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<el-form-item prop="slowMachine">
<el-select v-model="temp.slowMachine" placeholder="请选择" filterable clearable class="addinputw" @change="changeSlowMachine">
<el-option v-for="item in slowMachine_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
@ -42,8 +37,6 @@
<div class="span-sty">
<span>后视镜</span>
</div>
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<el-form-item prop="rearViewMirror">
<el-select v-model="temp.rearViewMirror" placeholder="请选择" filterable clearable class="addinputw" @change="changeRearViewMirror">
<el-option v-for="item in rearViewMirror_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
@ -54,12 +47,9 @@
<div class="span-sty">
<span>轮胎</span>
</div>
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<el-form-item prop="tireSize">
<el-select v-model="temp.tireSize" placeholder="请选择" filterable clearable class="addinputw" @change="changeTireSize">
<el-option v-for="item in tireSize_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"
/>
<el-option v-for="item in tireSize_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
</el-select>
</el-form-item>
</el-col>
@ -67,8 +57,6 @@
<div class="span-sty">
<span>驾驶室</span>
</div>
<!-- </el-col>-->
<!-- <el-col :span="2">-->
<el-form-item prop="specification">
<el-select v-model="temp.specification" placeholder="请选择" filterable clearable class="addinputw addinputw02" @change="changeSpecification">
<el-option v-for="item in specification_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
@ -81,13 +69,9 @@
<div class="span-sty">
<span>后桥</span>
</div>
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<el-form-item prop="rearAxleValue">
<el-select v-model="temp.rearAxleValue" placeholder="请选择" filterable clearable class="addinputw"
@change="changeRearAxleValue">
<el-option v-for="item in rearAxleValue_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictValue"/>
<el-select v-model="temp.rearAxleValue" placeholder="请选择" filterable clearable class="addinputw" @change="changeRearAxleValue">
<el-option v-for="item in rearAxleValue_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
</el-select>
</el-form-item>
</el-col>
@ -95,27 +79,19 @@
<div class="span-sty">
<span>速比</span> <!-- 原后桥速比 -->
</div>
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<el-form-item prop="rearAxleRatio">
<el-select v-model="temp.rearAxleRatio" placeholder="请选择" filterable clearable class="addinputw"
@change="changeRearAxleRatio">
<el-option v-for="item in rearAxleRatio_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictValue"/>
<el-select v-model="temp.rearAxleRatio" placeholder="请选择" filterable clearable class="addinputw" @change="changeRearAxleRatio">
<el-option v-for="item in rearAxleRatio_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<div class="span-sty">
<span>空调</span> <!-- 0 1-->
<span>空调</span>
</div>
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<el-form-item prop="airConditioner">
<el-select v-model="temp.airConditioner" placeholder="请选择" filterable clearable class="addinputw"
@change="changeAirConditioner">
<el-option v-for="item in airConditioner_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictValue"/>
<el-select v-model="temp.airConditioner" placeholder="请选择" filterable clearable class="addinputw" @change="changeAirConditioner">
<el-option v-for="item in airConditioner_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
</el-select>
</el-form-item>
</el-col>
@ -123,8 +99,6 @@
<div class="span-sty">
<span>轮毂材质</span>
</div>
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<el-form-item prop="hubMaterial">
<el-select v-model="temp.hubMaterial" placeholder="请选择" filterable clearable class="addinputw" @change="changeHubMaterial">
<el-option v-for="item in hubMaterial_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
@ -133,15 +107,11 @@
</el-col>
<el-col :span="4">
<div class="span-sty">
<span>导流罩</span> <!-- 0 1 -->
<span>导流罩</span>
</div>
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<el-form-item prop="baffleModel">
<el-select v-model="temp.baffleModel" placeholder="请选择" filterable clearable class="addinputw"
@change="changeBaffleModel">
<el-option v-for="item in baffleModel_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictValue"/>
<el-select v-model="temp.baffleModel" placeholder="请选择" filterable clearable class="addinputw" @change="changeBaffleModel">
<el-option v-for="item in baffleModel_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
</el-select>
</el-form-item>
</el-col>
@ -151,13 +121,9 @@
<div class="span-sty">
<span>悬架</span>
</div>
<!-- </el-col>-->
<!-- <el-col :span="2">-->
<el-form-item prop="suspension">
<el-select v-model="temp.suspension" placeholder="请选择" filterable clearable class="addinputw addinputw02"
@change="changeSuspension">
<el-option v-for="item in suspension_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictValue"/>
<el-select v-model="temp.suspension" placeholder="请选择" filterable clearable class="addinputw addinputw02" @change="changeSuspension">
<el-option v-for="item in suspension_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
</el-select>
</el-form-item>
</el-col>
@ -165,22 +131,16 @@
<div class="span-sty">
<span>座椅</span>
</div>
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<el-form-item prop="seat">
<el-select v-model="temp.seat" placeholder="请选择" filterable clearable class="addinputw"
@change="changeSeat">
<el-option v-for="item in seat_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictValue"/>
<el-select v-model="temp.seat" placeholder="请选择" filterable clearable class="addinputw" @change="changeSeat">
<el-option v-for="item in seat_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<div class="span-sty">
<span>护轮罩</span> <!-- 0 1 -->
<span>护轮罩</span>
</div>
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<el-form-item prop="tireCover">
<el-select v-model="temp.tireCover" placeholder="请选择" filterable clearable class="addinputw" @change="changeTireCover">
<el-option v-for="item in tireCover_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
@ -191,8 +151,6 @@
<div class="span-sty">
<span>鞍座</span>
</div>
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<el-form-item prop="saddle">
<el-select v-model="temp.saddle" placeholder="请选择" filterable clearable class="addinputw" @change="changeSaddle">
<el-option v-for="item in saddle_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
@ -203,13 +161,9 @@
<div class="span-sty">
<span>轴距</span>
</div>
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<el-form-item prop="wheelbase">
<el-select v-model="temp.wheelbase" placeholder="请选择" filterable clearable class="addinputw"
@change="changeWheelbase">
<el-option v-for="item in wheelbase_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictValue"/>
<el-select v-model="temp.wheelbase" placeholder="请选择" filterable clearable class="addinputw" @change="changeWheelbase">
<el-option v-for="item in wheelbase_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
</el-select>
</el-form-item>
</el-col>
@ -219,13 +173,9 @@
<div class="span-sty">
<span>保险杠</span>
</div>
<!-- </el-col>-->
<!-- <el-col :span="2">-->
<el-form-item prop="bumper">
<el-select v-model="temp.bumper" placeholder="请选择" filterable clearable class="addinputw addinputw02"
@change="changeBumper">
<el-option v-for="item in bumper_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictValue"/>
<el-select v-model="temp.bumper" placeholder="请选择" filterable clearable class="addinputw addinputw02" @change="changeBumper">
<el-option v-for="item in bumper_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
</el-select>
</el-form-item>
</el-col>
@ -233,22 +183,16 @@
<div class="span-sty">
<span>配置包</span>
</div>
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<el-form-item prop="configuringBao">
<el-select v-model="temp.configuringBao" placeholder="请选择" filterable clearable class="addinputw"
@change="changeConfiguringBao">
<el-option v-for="item in configuringBao_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictValue"/>
<el-select v-model="temp.configuringBao" placeholder="请选择" filterable clearable class="addinputw" @change="changeConfiguringBao">
<el-option v-for="item in configuringBao_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<div class="span-sty">
<span>独立热源</span> <!-- 0 1 -->
<span>独立热源</span>
</div>
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<el-form-item prop="independentSources">
<el-select v-model="temp.independentSources" placeholder="请选择" filterable clearable class="addinputw" @change="changeIndependentSources">
<el-option v-for="item in independentSources_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
@ -259,8 +203,6 @@
<div class="span-sty">
<span>燃料箱</span>
</div>
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<el-form-item prop="fuelTank">
<el-select v-model="temp.fuelTank" placeholder="请选择" filterable clearable class="addinputw" @change="changefuelTank">
<el-option v-for="item in fuelTank_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
@ -271,13 +213,9 @@
<div class="span-sty">
<span>多媒体</span>
</div>
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<el-form-item prop="multimedia">
<el-select v-model="temp.multimedia" placeholder="请选择" filterable clearable class="addinputw"
@change="changeMultimedia">
<el-option v-for="item in multimedia_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictValue"/>
<el-select v-model="temp.multimedia" placeholder="请选择" filterable clearable class="addinputw" @change="changeMultimedia">
<el-option v-for="item in multimedia_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
</el-select>
</el-form-item>
</el-col>
@ -299,12 +237,8 @@
<div class="span-sty">
<span>更多配置</span>
</div>
<!-- </el-col>-->
<!-- <el-col :span="22">-->
<el-form-item prop="otherConfig">
<el-input type="textarea" :rows="3" placeholder="请输入内容" class="addinputw addinputwTwo" v-model="temp.otherConfig">
</el-input>
<!-- <el-input v-model="temp.otherConfig" maxlength="125" placeholder="" class="addinputw" clearable/>-->
<el-input type="textarea" :rows="3" placeholder="请输入内容" class="addinputw addinputwTwo" v-model="temp.otherConfig"/>
</el-form-item>
</el-col>
</el-row>
@ -318,12 +252,9 @@
import { details, pullDown, SaveList, Update } from '@/api/cheliang/basemodelconfig'
import { getPathSidByUserSid } from '@/api/cheliang/basevehiclemodel'
import { fetchBySid } from '@/api/cheliang/dictcommons'
// import { getFileType, parseDate, parseTime, ConvertMenuState } from "@/utils";
// import { findButtonByUserId } from '@/api/sys/permission'
export default {
name: 'changyongpeizhiAdd',
// components: { },
data() {
return {
viewTitle: '',
@ -365,10 +296,10 @@ export default {
independentSources_list: [], //
fuelTank_list: [], //
multimedia_list: [], //
packingCase_list: [], //
packingCase_list: [], //
temp: {
createOrgSId:'',
createOrg:'',
createOrgSId: '',
createOrg: '',
airConditioner: '', //
airConditionerKey: '', // key
baffleModel: '', // ()
@ -449,7 +380,7 @@ export default {
},
methods: {
// ------------------------------------------------------
showQuickAdd(row){
showQuickAdd(row) {
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
@ -458,7 +389,7 @@ export default {
details(row.sid).then(resp => {
this.temp = resp.data
this.temp.sid = ''
console.log('1122334455',this.temp)
console.log('1122334455', this.temp)
})
this.getType()
this.getPathSid()
@ -488,14 +419,14 @@ export default {
},
getPathSid() {
const userSid = window.sessionStorage.getItem('userSid')
getPathSidByUserSid({userSid:userSid}).then((res) => {
getPathSidByUserSid({ userSid: userSid }).then((res) => {
if (res.code === '200') {
this.temp.createOrgSId = res.data
this.getCreateOrgName(res.data)
}
})
},
getCreateOrgName(sid){
getCreateOrgName(sid) {
fetchBySid(sid).then((res) => {
if (res.code === '200') {
this.temp.createOrg = res.data.name
@ -837,7 +768,7 @@ export default {
this.temp.rearAxleRatioKey = bb.key
console.log('name', this.temp.rearAxleRatio)
},
changeRearAxleValue(value){
changeRearAxleValue(value) {
console.log('触发下拉框按钮')
let bb = null
this.rearAxleValue_list.forEach((e) => {
@ -854,7 +785,7 @@ export default {
this.temp.rearAxleKey = bb.key
console.log('name', this.temp.rearAxleValue)
},
changeRatioValue(value){
changeRatioValue(value) {
console.log('触发下拉框按钮')
let bb = null
this.ratioValue_list.forEach((e) => {
@ -1083,17 +1014,15 @@ export default {
},
//
handleCreate() {
// console.log('' + JSON.stringify(this.temp))
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.FormLoading = true
if (this.stateId === 0) {
console.log('77777777777777', this.temp)
// this.temp.vehicleSid = this.sid
this.temp.userSid = window.sessionStorage.getItem('userSid')
SaveList(this.temp).then((response) => {
this.FormLoading = false
if (response.code === '200') {
if (response.success) {
this.dialogFormVisible = false
this.$notify({
title: '提示',
@ -1102,13 +1031,6 @@ export default {
duration: 2000
})
this.handleReturn('true')
} else {
this.$notify({
title: '提示',
message: '添加失败',
type: 'error',
duration: 2000
})
}
})
} else {
@ -1118,9 +1040,8 @@ export default {
Update(this.temp, this.sid).then((response) => {
console.log('返回值:', response)
this.FormLoading = false
if (response.code === '200') {
if (response.success) {
this.handleReturn('true')
} else {
}
})
}
@ -1144,14 +1065,17 @@ export default {
line-height: 40px !important;
font-weight: 600;
}
.formaddcopy02 .el-row /deep/ .el-col {
padding:0 8px;
padding: 0 8px;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw{
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 65px;
width: calc(100% - 70px);
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputwTwo{
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputwTwo {
width: calc(100% - 70px);
}
</style>

Loading…
Cancel
Save