Commit e77b2b95 by 胡悦

提交

1 parent 5108d0f3
...@@ -14,9 +14,13 @@ ...@@ -14,9 +14,13 @@
<div slot="footer"> <div slot="footer">
<slot name="btn-front"></slot> <slot name="btn-front"></slot>
<el-button @click="handleClose">取消</el-button> <el-button
@click="handleClose"
:size="btn_size"
>取消</el-button>
<el-button <el-button
type="primary" type="primary"
:size="btn_size"
@click="handleConfirm" @click="handleConfirm"
>{{btnOkLabel}}</el-button> >{{btnOkLabel}}</el-button>
<slot name="btn-behind"></slot> <slot name="btn-behind"></slot>
......
...@@ -44,7 +44,8 @@ const VEHICLE_API = { ...@@ -44,7 +44,8 @@ const VEHICLE_API = {
VEHICLE_UNBIND: '/trialdrive/vehicle/drivevehicle/unbindSn', VEHICLE_UNBIND: '/trialdrive/vehicle/drivevehicle/unbindSn',
DOWNLOAD_TEMPLATE: '/trialdrice/vehicle/drivevehicle/downloadtemplate', DOWNLOAD_TEMPLATE: '/trialdrice/vehicle/drivevehicle/downloadtemplate',
VEHICLE_IMPORT: '/trialdrice/vehicle/drivevehicle/import', VEHICLE_IMPORT: '/trialdrice/vehicle/drivevehicle/import',
VEHICLE_EXPORT: '/trialdrive/vehicle/drivevehicle/export' VEHICLE_EXPORT: '/trialdrive/vehicle/drivevehicle/export',
VEHICLE_INFO: '/trialdrive/vehicle/drivevehicle/findbyid'
} }
// 审批管理 // 审批管理
const APPROVAL_API = { const APPROVAL_API = {
......
...@@ -19,6 +19,12 @@ function editVehicle (params) { ...@@ -19,6 +19,12 @@ function editVehicle (params) {
return request(params, url, 'post') return request(params, url, 'post')
} }
// 解绑车辆
function infoVehicle (params) {
const url = VEHICLE_API.VEHICLE_INFO
return request(params, url)
}
// 批量删除车辆 // 批量删除车辆
function deleteVehicle (params) { function deleteVehicle (params) {
const url = VEHICLE_API.VEHICLE_DELETE const url = VEHICLE_API.VEHICLE_DELETE
...@@ -49,4 +55,4 @@ function exportVehicle (params) { ...@@ -49,4 +55,4 @@ function exportVehicle (params) {
return request(params, url) return request(params, url)
} }
export { getList, addVehicle, downloadtemplate, editVehicle, deleteVehicle, unbindVehicle, importVehicle, exportVehicle } export { getList, addVehicle, downloadtemplate, editVehicle, deleteVehicle, unbindVehicle, importVehicle, exportVehicle, infoVehicle }
const MAP_KEY = '75116f653f3b2e4568116dad8cd9b899'; const MAP_KEY = '75116f653f3b2e4568116dad8cd9b899'
const Constants = { const Constants = {
AMAP_URL: `https://webapi.amap.com/maps?v=1.4.2&key=${MAP_KEY}&plugin=AMap.PolyEditor,AMap.CircleEditor,AMap.DistrictSearch,AMap.Autocomplete,AMap.MarkerClusterer,AMap.MouseTool,AMap.Text`, AMAP_URL: `https://webapi.amap.com/maps?v=1.4.2&key=${MAP_KEY}&plugin=AMap.PolyEditor,AMap.CircleEditor,AMap.DistrictSearch,AMap.Autocomplete,AMap.MarkerClusterer,AMap.MouseTool,AMap.Text`,
// 处理状态 // 处理状态
......
...@@ -135,7 +135,8 @@ ...@@ -135,7 +135,8 @@
</template> </template>
<script> <script>
import { getList, addVehicle, editVehicle, downloadtemplate, deleteVehicle, unbindVehicle, importVehicle, exportVehicle } from 'services/vehicle' import { dictInfo } from 'services/common'
import { getList, addVehicle, editVehicle, downloadtemplate, deleteVehicle, unbindVehicle, importVehicle, exportVehicle, infoVehicle } from 'services/vehicle'
export default { export default {
data() { data() {
return { return {
...@@ -240,8 +241,20 @@ export default { ...@@ -240,8 +241,20 @@ export default {
vehicleVisible: false, vehicleVisible: false,
vehicleTitle: '', vehicleTitle: '',
vehicleForm: {}, vehicleForm: {},
vehicleArr: ['shopName', 'vin', 'modelId', 'configDesc', 'licensePlate', 'color', 'innerColor', 'serveType', 'sn'],
vehicleData: [ vehicleData: [
{ label: '特约店名称:', prop: 'shopName', type: 'select', options: [{ label: '121', value: 'fdfa' }], clearable: true }, { label: '特约店名称:', prop: 'shopName', type: 'select', options: [], clearable: true },
{ label: '车架号:', prop: 'vin', type: 'input', clearable: true },
{ label: '车型:', prop: 'modelId', type: 'select', options: [], key: 'dictLabel', value: 'dictValue', clearable: true },
{ label: '配置:', prop: 'configDesc', type: 'input', clearable: true },
{ label: '车牌:', prop: 'licensePlate', type: 'input', clearable: true },
{ label: '外色:', prop: 'color', type: 'input', clearable: true },
{ label: '内色:', prop: 'innerColor', type: 'input', clearable: true },
{ label: '服役类型:', prop: 'serveType', type: 'select', options: [{ label: '未上牌', value: '0' }, { label: '已上牌', value: '1' }], clearable: true },
{ label: '设备号:', prop: 'sn', type: 'input', clearable: true }
],
vehicleDefaltData: [
{ label: '特约店名称:', prop: 'shopName', type: 'select', options: [], clearable: true },
{ label: '车架号:', prop: 'vin', type: 'input', clearable: true }, { label: '车架号:', prop: 'vin', type: 'input', clearable: true },
{ label: '车型:', prop: 'modelId', type: 'select', options: [], clearable: true }, { label: '车型:', prop: 'modelId', type: 'select', options: [], clearable: true },
{ label: '配置:', prop: 'configDesc', type: 'input', clearable: true }, { label: '配置:', prop: 'configDesc', type: 'input', clearable: true },
...@@ -269,6 +282,11 @@ export default { ...@@ -269,6 +282,11 @@ export default {
deviceList: [] deviceList: []
} }
}, },
mounted() {
dictInfo('trialdrive_vehicle_model').then(res => {
this.vehicleData.find(item => item.prop == 'modelId').options = res.data
})
},
methods: { methods: {
btnClick(pType, scope) { btnClick(pType, scope) {
switch (pType) { switch (pType) {
...@@ -289,7 +307,11 @@ export default { ...@@ -289,7 +307,11 @@ export default {
this.vehicleVisible = !this.vehicleVisible this.vehicleVisible = !this.vehicleVisible
if (this.vehicleVisible) { if (this.vehicleVisible) {
this.vehicleTitle = '编辑车辆' this.vehicleTitle = '编辑车辆'
this.vehicleForm = JSON.parse(JSON.stringify(scope)) infoVehicle({ tempId: scope.tempId }).then(res => {
this.vehicleArr.forEach(item => {
this.$set(this.vehicleForm, item, res.data[item])
})
})
this.vehicleData.map(item => { this.vehicleData.map(item => {
if (item.type == 'input') return item.readonly = false if (item.type == 'input') return item.readonly = false
else return item.disabled = false else return item.disabled = false
...@@ -300,7 +322,11 @@ export default { ...@@ -300,7 +322,11 @@ export default {
console.log('view') console.log('view')
this.vehicleVisible = !this.vehicleVisible this.vehicleVisible = !this.vehicleVisible
if (this.vehicleVisible) { if (this.vehicleVisible) {
this.vehicleForm = JSON.parse(JSON.stringify(scope)) infoVehicle({ tempId: scope.tempId }).then(res => {
this.vehicleArr.forEach(item => {
this.$set(this.vehicleForm, item, res.data[item])
})
})
this.vehicleTitle = '查看车辆' this.vehicleTitle = '查看车辆'
this.vehicleData.map(item => { this.vehicleData.map(item => {
if (item.type == 'input') return item.readonly = true if (item.type == 'input') return item.readonly = true
...@@ -402,6 +428,6 @@ export default { ...@@ -402,6 +428,6 @@ export default {
<style scope> <style scope>
.vehicle .el-form .el-input__inner { .vehicle .el-form .el-input__inner {
width: 300px; width: 320px;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -124,7 +124,7 @@ export default { ...@@ -124,7 +124,7 @@ export default {
{ label: '车架号:', prop: 'vin', type: 'input', disabled: true }, { label: '车架号:', prop: 'vin', type: 'input', disabled: true },
{ label: '车型:', prop: 'modelName', type: 'input', disabled: true }, { label: '车型:', prop: 'modelName', type: 'input', disabled: true },
{ label: '车牌:', prop: 'licensePlate', type: 'input', clearable: true }, { label: '车牌:', prop: 'licensePlate', type: 'input', clearable: true },
{ label: '购置方式:', prop: 'buyType', type: 'select', options: [{ label: '租赁方式购置', value: 1 }], clearable: true }, { label: '购置方式:', prop: 'buyType', type: 'select', options: [{ label: '租赁方式购置', value: '1' }], clearable: true },
{ label: '上牌日期:', prop: 'registrationDate', type: 'input', disabled: true }, { label: '上牌日期:', prop: 'registrationDate', type: 'input', disabled: true },
{ label: '销售经理:', prop: 'saleManager', type: 'input', clearable: true }, { label: '销售经理:', prop: 'saleManager', type: 'input', clearable: true },
{ label: '销售经理电话:', prop: 'saleManagerPhone', type: 'input', clearable: true }, { label: '销售经理电话:', prop: 'saleManagerPhone', type: 'input', clearable: true },
...@@ -143,7 +143,7 @@ export default { ...@@ -143,7 +143,7 @@ export default {
], ],
vehicleRules: { vehicleRules: {
licensePlate: [{ required: true, message: '请输入车牌', trigger: 'blur' }], licensePlate: [{ required: true, message: '请输入车牌', trigger: 'blur' }],
serveType: [{ required: true, message: '请选择购置方式', trigger: 'change' }], buyType: [{ required: true, message: '请选择购置方式', trigger: 'change' }],
saleManager: [{ required: true, message: '请输入销售经理', trigger: 'blur' }], saleManager: [{ required: true, message: '请输入销售经理', trigger: 'blur' }],
saleManagerPhone: [{ required: true, message: '请输入销售经理电话', trigger: 'blur' }] saleManagerPhone: [{ required: true, message: '请输入销售经理电话', trigger: 'blur' }]
}, },
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</search-form> </search-form>
<h3>上牌资料信息</h3> <h3>上牌资料信息</h3>
<basic-table <basic-table
ref="vehicleForm" ref="vehicleSubmitTable"
:tableParams="submitTableParams" :tableParams="submitTableParams"
:getListApi="getListApi" :getListApi="getListApi"
:searchForm="searchForm" :searchForm="searchForm"
...@@ -147,6 +147,12 @@ export default { ...@@ -147,6 +147,12 @@ export default {
approvalStatusList: [] approvalStatusList: []
} }
}, },
watch: {
'$route'(val) {
console.log(val)
if (val.path == '/vehicleSubmit') this.$refs.vehicleSubmitTable.refreshTable()
}
},
mounted() { mounted() {
dictInfo('submitStatus').then(res => { dictInfo('submitStatus').then(res => {
this.submitFormList[1].options = res.data this.submitFormList[1].options = res.data
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</search-form> </search-form>
<h3>上牌资料审核</h3> <h3>上牌资料审核</h3>
<basic-table <basic-table
ref="vehicleForm" ref="vehicleCheckTable"
:tableParams="checkTableParams" :tableParams="checkTableParams"
:getListApi="getListApi" :getListApi="getListApi"
:searchForm="searchForm" :searchForm="searchForm"
...@@ -154,8 +154,9 @@ export default { ...@@ -154,8 +154,9 @@ export default {
} }
}, },
watch: { watch: {
'$router'(val) { '$route'(val) {
console.log(val) console.log(val)
if (val.path == '/vehicleCheck') this.$refs.vehicleCheckTable.refreshTable()
} }
}, },
mounted() { mounted() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!