Commit d4314cad by 冒粤蓉
2 parents 5c216463 6f3409ee
......@@ -14,9 +14,13 @@
<div slot="footer">
<slot name="btn-front"></slot>
<el-button @click="handleClose">取消</el-button>
<el-button
@click="handleClose"
:size="btn_size"
>取消</el-button>
<el-button
type="primary"
:size="btn_size"
@click="handleConfirm"
>{{btnOkLabel}}</el-button>
<slot name="btn-behind"></slot>
......
......@@ -44,10 +44,12 @@ const VEHICLE_API = {
VEHICLE_ADD: '/trialdrive/vehicle/drivevehicle/add',
VEHICLE_EDIT: '/trialdrive/vehicle/drivevehicle/update',
VEHICLE_DELETE: '/trialdrive/vehicle/drivevehicle/delete',
VEHICLE_UNBIND: '/trialdrive/vehicle/drivevehicle/unbindSn',
DOWNLOAD_TEMPLATE: '/trialdrice/vehicle/drivevehicle/downloadtemplate',
VEHICLE_IMPORT: '/trialdrice/vehicle/drivevehicle/import',
VEHICLE_UNBIND: '/trialdrive/vehicle/unbindSn',
DOWNLOAD_TEMPLATE: '/trialdrive/vehicle/drivevehicle/downloadtemplate',
VEHICLE_IMPORT: '/trialdrive/vehicle/drivevehicle/import',
VEHICLE_FAILFILE: '/trialdrive/vehicle/drivevehicle/downloadFailFile',
VEHICLE_EXPORT: '/trialdrive/vehicle/drivevehicle/export',
VEHICLE_INFO: '/trialdrive/vehicle/drivevehicle/findbyid',
SPECIAL_SHOP_LIST: '/trialdrive/specialshop/shopusers'
}
// 审批管理
......
......@@ -7,7 +7,6 @@ function getList (params) {
return request(params, url)
}
/*特约店列表*/
function getSpecialShopList (params) {
const url = VEHICLE_API.SPECIAL_SHOP_LIST
......@@ -26,6 +25,12 @@ function editVehicle (params) {
return request(params, url, 'post')
}
// 解绑车辆
function infoVehicle (params) {
const url = VEHICLE_API.VEHICLE_INFO
return request(params, url)
}
// 批量删除车辆
function deleteVehicle (params) {
const url = VEHICLE_API.VEHICLE_DELETE
......@@ -47,7 +52,7 @@ function downloadtemplate (params) {
// 导入车辆
function importVehicle (params) {
const url = VEHICLE_API.VEHICLE_IMPORT
return request(params, url)
return request(params, url, 'post')
}
// 导出车辆
......@@ -56,4 +61,4 @@ function exportVehicle (params) {
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 = {
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 {
case 'todo':
// 跳转
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
}
}
......
......@@ -58,17 +58,19 @@
>未选择任何文件</span>
</div>
</el-form-item>
<div v-if="$route.params.url != 'checkView'">
<el-button
class="pull-right m-l-md"
type="defalut"
@click="handleClose($route.params.url)"
>{{$route.params.url == 'submit' ? '取消' : '驳回'}}</el-button>
<el-button
class="pull-right"
type="primary"
@click="handleConfirm($route.params.url)"
>{{$route.params.url == 'submit' ? '确定' : '通过'}}</el-button>
</div>
</el-form>
<el-button
class="pull-right m-l-md"
type="defalut"
@click="handleClose($route.params.url)"
>{{$route.params.url == 'submit' ? '取消' : '驳回'}}</el-button>
<el-button
class="pull-right"
type="primary"
@click="handleConfirm($route.params.url)"
>{{$route.params.url == 'submit' ? '确定' : '通过'}}</el-button>
</div>
</template>
......@@ -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'],
vehicleData: [
{ label: '特约店名称:', prop: 'shopName', type: 'input', disabled: true },
{ label: '车架号:', prop: 'vin', type: 'input', disabled: true },
{ label: '车型:', prop: 'modelName', type: 'input', disabled: 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: 'saleManager', type: 'input', clearable: true },
{ label: '销售经理电话:', prop: 'saleManagerPhone', type: 'input', clearable: true },
......@@ -135,7 +171,7 @@ export default {
{ label: '车架号:', prop: 'vin', type: 'input', disabled: true },
{ label: '车型:', prop: 'modelName', type: 'input', disabled: 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: 'saleManager', type: 'input', clearable: true },
{ label: '销售经理电话:', prop: 'saleManagerPhone', type: 'input', clearable: true },
......@@ -143,7 +179,7 @@ export default {
],
vehicleRules: {
licensePlate: [{ required: true, message: '请输入车牌', trigger: 'blur' }],
serveType: [{ required: true, message: '请选择购置方式', trigger: 'change' }],
buyType: [{ required: true, message: '请选择购置方式', trigger: 'change' }],
saleManager: [{ required: true, message: '请输入销售经理', trigger: 'blur' }],
saleManagerPhone: [{ required: true, message: '请输入销售经理电话', trigger: 'blur' }]
},
......@@ -219,6 +255,7 @@ export default {
type: 'success'
})
this.$router.replace('/vehicleSubmit')
this.vehicleForm = _.cloneDeep(this.vehicleDefalutForm)
} else {
this.$message({
message: '操作失败',
......@@ -241,6 +278,7 @@ export default {
type: 'success'
})
this.$router.replace('/vehicleCheck')
this.vehicleForm = _.cloneDeep(this.vehicleDefalutForm)
} else {
this.$message({
message: '操作失败',
......@@ -273,6 +311,7 @@ export default {
type: 'success'
})
this.$router.replace('/vehicleCheck')
this.vehicleForm = _.cloneDeep(this.vehicleDefalutForm)
} else {
this.$message({
message: '操作失败',
......@@ -322,8 +361,6 @@ export default {
this.$set(this.vehicleForm.list[index], 'docUrl', 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))
},
}
......
......@@ -23,7 +23,7 @@
</search-form>
<h3>上牌资料信息</h3>
<basic-table
ref="vehicleForm"
ref="vehicleSubmitTable"
:tableParams="submitTableParams"
:getListApi="getListApi"
:searchForm="searchForm"
......@@ -147,6 +147,12 @@ export default {
approvalStatusList: []
}
},
watch: {
'$route'(val) {
console.log(val)
if (val.path == '/vehicleSubmit') this.$refs.vehicleSubmitTable.refreshTable()
}
},
mounted() {
dictInfo('submitStatus').then(res => {
this.submitFormList[1].options = res.data
......
......@@ -23,7 +23,7 @@
</search-form>
<h3>上牌资料审核</h3>
<basic-table
ref="vehicleForm"
ref="vehicleCheckTable"
:tableParams="checkTableParams"
:getListApi="getListApi"
:searchForm="searchForm"
......@@ -50,6 +50,13 @@
>
审核
</el-button>
<el-button
v-else
type="text"
@click="btnClick('view', scope.scope)"
>
查看
</el-button>
</span>
</basic-table>
</div>
......@@ -154,8 +161,9 @@ export default {
}
},
watch: {
'$router'(val) {
'$route'(val) {
console.log(val)
if (val.path == '/vehicleCheck') this.$refs.vehicleCheckTable.refreshTable()
}
},
mounted() {
......@@ -178,6 +186,9 @@ export default {
case 'check':
this.$router.push({ name: 'addVehicle', params: { vehicleId: scope.vehicleId, approvalId: scope.approvalId, url: 'check' } })
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!