Commit d4314cad by 冒粤蓉
2 parents 5c216463 6f3409ee
...@@ -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,10 +44,12 @@ const VEHICLE_API = { ...@@ -44,10 +44,12 @@ const VEHICLE_API = {
VEHICLE_ADD: '/trialdrive/vehicle/drivevehicle/add', VEHICLE_ADD: '/trialdrive/vehicle/drivevehicle/add',
VEHICLE_EDIT: '/trialdrive/vehicle/drivevehicle/update', VEHICLE_EDIT: '/trialdrive/vehicle/drivevehicle/update',
VEHICLE_DELETE: '/trialdrive/vehicle/drivevehicle/delete', VEHICLE_DELETE: '/trialdrive/vehicle/drivevehicle/delete',
VEHICLE_UNBIND: '/trialdrive/vehicle/drivevehicle/unbindSn', VEHICLE_UNBIND: '/trialdrive/vehicle/unbindSn',
DOWNLOAD_TEMPLATE: '/trialdrice/vehicle/drivevehicle/downloadtemplate', DOWNLOAD_TEMPLATE: '/trialdrive/vehicle/drivevehicle/downloadtemplate',
VEHICLE_IMPORT: '/trialdrice/vehicle/drivevehicle/import', VEHICLE_IMPORT: '/trialdrive/vehicle/drivevehicle/import',
VEHICLE_FAILFILE: '/trialdrive/vehicle/drivevehicle/downloadFailFile',
VEHICLE_EXPORT: '/trialdrive/vehicle/drivevehicle/export', VEHICLE_EXPORT: '/trialdrive/vehicle/drivevehicle/export',
VEHICLE_INFO: '/trialdrive/vehicle/drivevehicle/findbyid',
SPECIAL_SHOP_LIST: '/trialdrive/specialshop/shopusers' SPECIAL_SHOP_LIST: '/trialdrive/specialshop/shopusers'
} }
// 审批管理 // 审批管理
......
...@@ -7,7 +7,6 @@ function getList (params) { ...@@ -7,7 +7,6 @@ function getList (params) {
return request(params, url) return request(params, url)
} }
/*特约店列表*/ /*特约店列表*/
function getSpecialShopList (params) { function getSpecialShopList (params) {
const url = VEHICLE_API.SPECIAL_SHOP_LIST const url = VEHICLE_API.SPECIAL_SHOP_LIST
...@@ -26,6 +25,12 @@ function editVehicle (params) { ...@@ -26,6 +25,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
...@@ -47,7 +52,7 @@ function downloadtemplate (params) { ...@@ -47,7 +52,7 @@ function downloadtemplate (params) {
// 导入车辆 // 导入车辆
function importVehicle (params) { function importVehicle (params) {
const url = VEHICLE_API.VEHICLE_IMPORT const url = VEHICLE_API.VEHICLE_IMPORT
return request(params, url) return request(params, url, 'post')
} }
// 导出车辆 // 导出车辆
...@@ -56,4 +61,4 @@ function exportVehicle (params) { ...@@ -56,4 +61,4 @@ function exportVehicle (params) {
return request(params, url) return request(params, url)
} }
export { getList, getSpecialShopList, addVehicle, downloadtemplate, editVehicle, deleteVehicle, unbindVehicle, importVehicle, exportVehicle } export { getList, getSpecialShopList, 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`,
// 处理状态 // 处理状态
......
...@@ -127,6 +127,8 @@ export default { ...@@ -127,6 +127,8 @@ export default {
case 'todo': case 'todo':
// 跳转 // 跳转
console.log(scope) console.log(scope)
if (scope.bizType == 1) this.$router.push({ name: 'testDriveCheckList' })
else if (scope.bizType == 2) this.$router.push({ name: 'vehicleCheck', params: { approvalId: scope.approvalId, url: 'check' } })
break break
} }
} }
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
>未选择任何文件</span> >未选择任何文件</span>
</div> </div>
</el-form-item> </el-form-item>
</el-form> <div v-if="$route.params.url != 'checkView'">
<el-button <el-button
class="pull-right m-l-md" class="pull-right m-l-md"
type="defalut" type="defalut"
...@@ -69,6 +69,8 @@ ...@@ -69,6 +69,8 @@
type="primary" type="primary"
@click="handleConfirm($route.params.url)" @click="handleConfirm($route.params.url)"
>{{$route.params.url == 'submit' ? '确定' : '通过'}}</el-button> >{{$route.params.url == 'submit' ? '确定' : '通过'}}</el-button>
</div>
</el-form>
</div> </div>
</template> </template>
...@@ -117,14 +119,48 @@ export default { ...@@ -117,14 +119,48 @@ export default {
} }
] ]
}, },
submitData: ['shopName', 'vin', 'modelName'], vehicleDefalutForm: {
list: [
{
docName: '车辆登记证',
docType: 1,
docUrl: ''
},
{
docName: '车辆发票',
docType: 2,
docUrl: ''
},
{
docName: '交强险',
docType: 3,
docUrl: ''
},
{
docName: '商业险',
docType: 4,
docUrl: ''
},
{
docName: '行驶证',
docType: 5,
docUrl: ''
},
{
docName: '车身照',
docType: 6,
docUrl: ''
}
]
},
submitData: ['shopName', 'vin', 'modelName', 'buyType'],
checkData: ['shopName', 'vin', 'modelName', 'licensePlate', 'buyType', 'registrationDate', 'saleManager', 'saleManagerPhone', 'remark'], checkData: ['shopName', 'vin', 'modelName', 'licensePlate', 'buyType', 'registrationDate', 'saleManager', 'saleManagerPhone', 'remark'],
vehicleData: [ vehicleData: [
{ label: '特约店名称:', prop: 'shopName', type: 'input', disabled: true }, { label: '特约店名称:', prop: 'shopName', type: 'input', disabled: true },
{ 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 },
...@@ -135,7 +171,7 @@ export default { ...@@ -135,7 +171,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 +179,7 @@ export default { ...@@ -143,7 +179,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' }]
}, },
...@@ -219,6 +255,7 @@ export default { ...@@ -219,6 +255,7 @@ export default {
type: 'success' type: 'success'
}) })
this.$router.replace('/vehicleSubmit') this.$router.replace('/vehicleSubmit')
this.vehicleForm = _.cloneDeep(this.vehicleDefalutForm)
} else { } else {
this.$message({ this.$message({
message: '操作失败', message: '操作失败',
...@@ -241,6 +278,7 @@ export default { ...@@ -241,6 +278,7 @@ export default {
type: 'success' type: 'success'
}) })
this.$router.replace('/vehicleCheck') this.$router.replace('/vehicleCheck')
this.vehicleForm = _.cloneDeep(this.vehicleDefalutForm)
} else { } else {
this.$message({ this.$message({
message: '操作失败', message: '操作失败',
...@@ -273,6 +311,7 @@ export default { ...@@ -273,6 +311,7 @@ export default {
type: 'success' type: 'success'
}) })
this.$router.replace('/vehicleCheck') this.$router.replace('/vehicleCheck')
this.vehicleForm = _.cloneDeep(this.vehicleDefalutForm)
} else { } else {
this.$message({ this.$message({
message: '操作失败', message: '操作失败',
...@@ -322,8 +361,6 @@ export default { ...@@ -322,8 +361,6 @@ export default {
this.$set(this.vehicleForm.list[index], 'docUrl', res.data.data) this.$set(this.vehicleForm.list[index], 'docUrl', res.data.data)
targetObj.url = res.data.data targetObj.url = res.data.data
} }
const fileData = new Array(targetObj)
return batchSaveFile(fileData, this.baseURL)
}).then(r => (this.vehicleForm[name] = r[0].id)) }).then(r => (this.vehicleForm[name] = r[0].id))
}, },
} }
......
...@@ -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"
...@@ -50,6 +50,13 @@ ...@@ -50,6 +50,13 @@
> >
审核 审核
</el-button> </el-button>
<el-button
v-else
type="text"
@click="btnClick('view', scope.scope)"
>
查看
</el-button>
</span> </span>
</basic-table> </basic-table>
</div> </div>
...@@ -154,8 +161,9 @@ export default { ...@@ -154,8 +161,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() {
...@@ -178,6 +186,9 @@ export default { ...@@ -178,6 +186,9 @@ export default {
case 'check': case 'check':
this.$router.push({ name: 'addVehicle', params: { vehicleId: scope.vehicleId, approvalId: scope.approvalId, url: 'check' } }) this.$router.push({ name: 'addVehicle', params: { vehicleId: scope.vehicleId, approvalId: scope.approvalId, url: 'check' } })
break break
case 'view':
this.$router.push({ name: 'addVehicle', params: { vehicleId: scope.vehicleId, approvalId: scope.approvalId, url: 'checkView' } })
break
} }
}, },
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!