Browse Source

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

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

Loading…
Cancel
Save