Browse Source

车辆台账新增增加品牌,厂家回款通路和车型根据品牌sid获取

master
yunuo970428 3 years ago
parent
commit
a36639c47b
  1. 57
      anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangtaizhang/cheliangtaizhangAdd.vue
  2. 10
      anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangtaizhang/cheliangtaizhangInfo.vue

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

@ -14,7 +14,7 @@
<el-col :span="24" class="tleftb">金额单位</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-col :span="8">
<el-form-item prop="purchaseSystemName">
<span slot="label">采购系统</span>
<el-select v-model="temp.purchaseSystemName" class="addinputw" clearable placeholder="" filterable @change="orgDeptChange">
@ -22,8 +22,16 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item>
<el-col :span="8">
<el-form-item prop="carBrandName">
<span slot="label">品牌</span>
<el-select v-model="temp.carBrandName" class="addinputw" clearable placeholder="" @change="carBrandChange" filterable>
<el-option v-for="item in carBrand_list" :key="item.sid" :label="item.brandName" :value="item.brandName"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="configNameStyle">
<div style="display: flex;flex-direction: row;justify-content: space-between;align-items: center">
<div>
<span slot="label"><span class="icon">*</span>车型(配置简述)</span>
@ -269,7 +277,7 @@
<script>
import { SaveList, Update, selVehModelByUseOrgSidAll, details } from '@/api/cheliang/basevehicle'
import { typeValues, selectOrgLists, getPathSidByUserSid, fetchByUseOrgSid, fetchBySid, selectNameByOrg } from '@/api/cheliang/dictcommons'
import { typeValues, selectOrgLists, getPathSidByUserSid, fetchByUseOrgSid, fetchBySid, selectNameByOrg, brandDown } from '@/api/cheliang/dictcommons'
import Pagination from '@/components/pagination'
export default {
@ -293,10 +301,12 @@ export default {
useOrgSid: '',
vehicleAlias: '',
configName: '',
brandSid: ''
}
},
FormLoading: false,
//
carBrand_list: [],
orgDept_list: [],
actualPay_list: [],
vehicleState_list: [], //
@ -344,12 +354,15 @@ export default {
manufSaleAccessSid: '',
manufSaleAccessName: '',
rebate1: '',
isProblemVeh: ''
isProblemVeh: '',
carBrandSid: '',
carBrandName: ''
}, //
dialogFormVisible: false, //
dialogStatus: '', //
rules: {
purchaseSystemName: [{ required: true, message: '采购系统不能为空', trigger: 'change' }],
carBrandName: [{ required: true, message: '品牌不能为空', trigger: 'change' }],
vinNo: [{ required: true, message: '车架号不能为空', trigger: 'blur' }],
manPurOrderTypeValue: [{ required: true, message: '采购类型不能为空', trigger: 'change' }],
lockedStateValue: [{ required: true, message: '锁定状态不能为空', trigger: 'change' }],
@ -401,7 +414,12 @@ export default {
})
},
handSelect() {
if (this.temp.carBrandName === '') {
this.$message({ showClose: true, type: 'error', message: '请先选择品牌' })
return
}
this.dialogVisible = true
this.listQuery.params.brandSid = this.temp.carBrandSid
this.getList()
},
handleConfig() {
@ -416,11 +434,6 @@ export default {
this.temp.modelConfigSid = row.configSid
this.temp.price = row.price
this.temp.insideCode = row.insideCode
selectNameByOrg({ carBrandSid: row.carBrand }).then((respsone) => {
if (respsone.success) {
this.actualPay_list = respsone.data
}
})
},
showAdd() {
this.$nextTick(() => {
@ -451,7 +464,7 @@ export default {
details(sid).then((response) => {
if (response.code === '200') {
this.temp = response.data
actualList({ modelSid: this.temp.modelSid }).then((respsone) => {
selectNameByOrg({ carBrandSid: this.temp.carBrandSid }).then((respsone) => {
if (respsone.success) {
this.actualPay_list = respsone.data
}
@ -478,6 +491,11 @@ export default {
this.location_list = resp.data
}
})
brandDown({ useOrg: res.data }).then((resp) => {
if (resp.success) {
this.carBrand_list = resp.data
}
})
}
})
},
@ -517,6 +535,15 @@ export default {
const choosetItem = this.orgDept_list.filter((item) => item.orgDeptName === val)
this.temp.purchaseSystemSid = choosetItem[0].orgDeptSid
},
carBrandChange(val) {
const choosetItem = this.carBrand_list.filter((item) => item.brandName === val)
this.temp.carBrandSid = choosetItem[0].sid
selectNameByOrg({ carBrandSid: this.temp.carBrandSid }).then((respsone) => {
if (respsone.success) {
this.actualPay_list = respsone.data
}
})
},
vehicleStateValueChange(val) {
const choosetItem = this.vehicleState_list.filter((item) => item.dictKey === val)
this.temp.vehicleStateValue = choosetItem[0].dictValue
@ -585,7 +612,10 @@ export default {
purchaseSystemName: '',
manufSaleAccessSid: '',
manufSaleAccessName: '',
rebate1: ''
rebate1: '',
carBrandSid: '',
carBrandName: '',
isProblemVeh: ''
}
this.$emit('doback')
},
@ -657,4 +687,7 @@ export default {
/deep/ .tlineheightb .el-form-item .el-form-item__label {
line-height: 15px !important;
}
/deep/ .configNameStyle .el-form-item__content {
margin-left: 1% !important;
}
</style>

10
anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangtaizhang/cheliangtaizhangInfo.vue

@ -13,13 +13,19 @@
<el-col :span="24" class="tleftb">金额单位</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-col :span="8">
<el-form-item>
<span slot="label">采购系统</span>
<span>{{ temp.purchaseSystemName }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="8">
<el-form-item>
<span slot="label">品牌</span>
<span>{{ temp.carBrandName }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<span slot="label">车型(配置简述)</span>
<span>{{ temp.modelName }}</span>

Loading…
Cancel
Save