Commit 5108d0f3 by 胡悦

上牌资料接口

1 parent 028cc576
......@@ -18,18 +18,20 @@
:type="item.inputType || 'text'"
:placeholder="item.placeholder || '请输入'"
:readonly="item.readonly || false"
clearable
></el-input>
</template>
<template v-else-if="item.type === 'select'">
<el-select
v-model="formModel[item.prop]"
:placeholder="item.placeholder || '请选择'"
clearable
>
<el-option
v-for="i in item.options"
:key="i[item.value] || i.value"
:label="i[item.key] || i.label"
:value="i[item.value] || i.value"
:key="i[item.value] || i.value || i.dictValue"
:label="i[item.key] || i.label || i.dictLabel"
:value="i[item.value] || i.value || i.dictValue"
:disabled="i.disabled"
>
</el-option>
......@@ -78,6 +80,13 @@
>
</el-date-picker>
</template>
<template
name="self"
slot-scope="scope"
>
<slot :scope="scope">
</slot>
</template>
</template>
</el-form-item>
<el-form-item>
......
......@@ -32,7 +32,8 @@ const VEHICLEDOC_API = {
DOC_SEARCH: '/trialdrive/vehicleDoc/search',
DOC_BY_CONDITION: '/trialdrive/vehicleDoc/findVehDocByCondition',
CHENCK_SEARCH: '/trialdrive/approval/searchVehiclelicApp',
SAVE_DOC: '/trialdrive/vehicleDoc/saveOrUpdateVehDoc'
SAVE_DOC: '/trialdrive/vehicleDoc/saveOrUpdateVehDoc',
UPDATE_APPROVAL: '/trialdrive/approval/updateApproval'
}
// 试驾车辆管理接口
const VEHICLE_API = {
......
......@@ -9,7 +9,7 @@ function getProvinceList (params) {
// 获取字典详情
function dictInfo (params) {
const url = `${DICT_API.DICTDATA_TYPE}/${params}`
const url = `${COMMON_API.DICTDATA_TYPE}/${params}`
return request({}, url)
}
......
......@@ -22,7 +22,13 @@ function findVehDoc (params) {
// 保存或者更新上牌资料
function saveDoc (params) {
const url = VEHICLEDOC_API.SAVE_DOC
return request(params, url)
return request(params, url, 'post')
}
// 修改审批的流程
function updateApproval (params) {
const url = VEHICLEDOC_API.UPDATE_APPROVAL
return request(params, url, 'post')
}
export { getDocList, getCheckList, findVehDoc, saveDoc }
export { getDocList, getCheckList, findVehDoc, saveDoc, updateApproval }
......@@ -6,6 +6,10 @@
float: left;
}
.m-l-md {
margin-left: 20px;
}
.table-btn {
margin-bottom: 20px;
}
......
......@@ -72,10 +72,10 @@ export default {
value: ''
}, {
label: '未处理',
value: 0
value: 1
}, {
label: '已处理',
value: 1
value: 2
}]
},
{
......@@ -126,6 +126,7 @@ export default {
switch (type) {
case 'todo':
// 跳转
console.log(scope)
break
}
}
......
......@@ -145,7 +145,7 @@ export default {
label: '关键字:',
type: 'input',
inputType: 'text',
prop: 'status',
prop: 'searchKey',
placeholder: '特约店编码|店名称|车架号|设备号|车型',
}
],
......@@ -314,7 +314,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteVehicle({}).then(res => {
deleteVehicle({ tempId: scope.tempId }).then(res => {
this.$message({
type: 'success',
message: '删除成功!'
......@@ -328,7 +328,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
unbindVehicle({}).then(res => {
unbindVehicle({ tempId: scope.tempId }).then(res => {
this.$message({
type: 'success',
message: '解绑成功!'
......
......@@ -17,6 +17,7 @@
type="primary"
:size="btn_size"
icon="el-icon-refresh"
@click="reset"
>重置</el-button>
</slot>
</search-form>
......@@ -43,6 +44,7 @@
slot-scope="scope"
>
<el-button
v-if="scope.scope.isbutton"
type="text"
@click="btnClick('submit', scope.scope)"
>
......@@ -56,6 +58,7 @@
<script>
import { getDocList } from 'services/vehicledoc'
import { dictInfo } from 'services/common'
export default {
data() {
return {
......@@ -65,20 +68,20 @@ export default {
label: '关键字:',
type: 'input',
inputType: 'text',
prop: 'status',
prop: 'keywords',
placeholder: '特约店编码|店名称|围栏名称',
},
{
label: '提交状态:',
type: 'select',
prop: '',
prop: 'submitStatus',
placeholder: '请选择',
options: []
},
{
label: '审核状态:',
type: 'select',
prop: '',
prop: 'approvalStatus',
placeholder: '请选择',
options: []
}
......@@ -90,7 +93,7 @@ export default {
tableColumns: [
{
label: '所属大区',
prop: 'tempId'
prop: 'area'
}, {
label: '所属省',
prop: 'province'
......@@ -108,7 +111,7 @@ export default {
prop: 'shopLevel'
}, {
label: '车辆类型',
prop: 'shopLevel'
prop: 'vehicleType'
}, {
label: '车架号',
prop: 'vin'
......@@ -119,33 +122,50 @@ export default {
label: '配置',
prop: 'configDesc'
}, {
label: '车牌',
prop: 'licensePlate'
}, {
label: '外色',
prop: 'sns'
prop: 'color'
}, {
label: '内色',
prop: 'installedTime'
prop: 'innerColor'
}, {
label: '提交状态',
prop: 'installedTime'
prop: 'submitStatus',
formatter: (cellValue) => {
return this.submitStatusList.find(item => item.dictValue == cellValue.submitStatus).dictLabel
}
}, {
label: '审核状态',
prop: 'installedTime'
prop: 'approvalStatus'
}, {
label: '审核结果备注',
prop: 'installedTime'
prop: 'remark'
}
]
},
getListApi: getDocList,
submitStatusList: [],
approvalStatusList: []
}
},
mounted() {
dictInfo('submitStatus').then(res => {
this.submitFormList[1].options = res.data
this.submitStatusList = res.data
})
dictInfo('approval_status').then(res => {
this.submitFormList[2].options = res.data
this.approvalStatusList = res.data
})
},
methods: {
reset() {
this.searchForm = {}
},
btnClick(pType, scope) {
console.log(scope)
switch (pType) {
case 'submit':
this.$router.push({ name: 'addVehicle', params: { vehicleId: scope.vehicleId, url: 'submit' } })
break
}
},
......
......@@ -17,6 +17,7 @@
type="primary"
:size="btn_size"
icon="el-icon-refresh"
@click="reset"
>重置</el-button>
</slot>
</search-form>
......@@ -43,10 +44,11 @@
slot-scope="scope"
>
<el-button
v-if="scope.scope.approvalStatus == 1"
type="text"
@click="btnClick('submit', scope.scope)"
@click="btnClick('check', scope.scope)"
>
提交上牌资料
审核
</el-button>
</span>
</basic-table>
......@@ -56,6 +58,7 @@
<script>
import { getCheckList } from 'services/vehicledoc'
import { dictInfo } from 'services/common'
export default {
data() {
return {
......@@ -71,14 +74,14 @@ export default {
{
label: '提交状态:',
type: 'select',
prop: '',
prop: 'submitStatus',
placeholder: '请选择',
options: []
},
{
label: '审核状态:',
type: 'select',
prop: '',
prop: 'approvalStatus',
placeholder: '请选择',
options: []
}
......@@ -90,7 +93,7 @@ export default {
tableColumns: [
{
label: '所属大区',
prop: 'tempId'
prop: 'area'
}, {
label: '所属省',
prop: 'province'
......@@ -108,7 +111,7 @@ export default {
prop: 'shopLevel'
}, {
label: '车辆类型',
prop: 'shopLevel'
prop: 'vehicleType'
}, {
label: '车架号',
prop: 'vin'
......@@ -120,36 +123,60 @@ export default {
prop: 'configDesc'
}, {
label: '外色',
prop: 'sns'
prop: 'color'
}, {
label: '内色',
prop: 'installedTime'
prop: 'innerColor'
}, {
label: '提交时间',
prop: 'installedTime'
prop: 'submitTime'
}, {
label: '销售经理',
prop: 'installedTime'
prop: 'saleManager'
}, {
label: '销售经理电话',
prop: 'installedTime'
prop: 'saleManagerPhone'
}, {
label: '上牌备注',
prop: 'installedTime'
prop: 'velRemark'
}, {
label: '审核结果',
prop: 'approvalResult'
}, {
label: '审核结果备注',
prop: 'installedTime'
label: '备注',
prop: 'remark'
}
]
},
getListApi: getCheckList,
submitStatusList: [],
approvalStatusList: []
}
},
watch: {
'$router'(val) {
console.log(val)
}
},
mounted() {
dictInfo('submitStatus').then(res => {
this.checkFormList[1].options = res.data
this.submitStatusList = res.data
})
dictInfo('approval_status').then(res => {
this.checkFormList[2].options = res.data
this.approvalStatusList = res.data
})
},
methods: {
reset() {
this.searchForm = {}
},
btnClick(pType, scope) {
console.log(scope)
switch (pType) {
case 'submit':
this.$router.push({ name: 'addVehicle' })
case 'check':
this.$router.push({ name: 'addVehicle', params: { vehicleId: scope.vehicleId, approvalId: scope.approvalId, url: 'check' } })
break
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!