Commit 767f9edb by 冒粤蓉

fix checklist

1 parent 8b223115
...@@ -24,7 +24,8 @@ const SPECIALSHOP_API = { ...@@ -24,7 +24,8 @@ const SPECIALSHOP_API = {
SHOP_SEARCH: '/trialdrive/specialshop/search', SHOP_SEARCH: '/trialdrive/specialshop/search',
GET_FENCE_DETAIL: '/trialdrive/specialshop/info', GET_FENCE_DETAIL: '/trialdrive/specialshop/info',
SAVE_FENCE: '/trialdrive/specialshop/add', SAVE_FENCE: '/trialdrive/specialshop/add',
UPDATE_FENCE: '/trialdrive/specialshop/edit' UPDATE_FENCE: '/trialdrive/specialshop/edit',
EXPORT_TABLE: '/trialdrive/specialshop/export'
} }
// 试驾报表 // 试驾报表
const REPORT_API = { const REPORT_API = {
......
...@@ -111,6 +111,8 @@ ...@@ -111,6 +111,8 @@
<script> <script>
import { getList } from 'services/specialshop' import { getList } from 'services/specialshop'
import { getSimpleRoot, getSimpleList } from 'services/common' import { getSimpleRoot, getSimpleList } from 'services/common'
import { SPECIALSHOP_API } from '@/config/config'
import store from '@/store'
export default { export default {
data() { data() {
return { return {
...@@ -184,12 +186,12 @@ export default { ...@@ -184,12 +186,12 @@ export default {
type: 'primary', type: 'primary',
pType: 'create' pType: 'create'
}, },
{ // {
id: 2, // id: 2,
name: '批量删除', // name: '批量删除',
type: 'default', // type: 'default',
pType: 'delete' // pType: 'delete'
}, // },
{ {
id: 3, id: 3,
name: '导出', name: '导出',
...@@ -213,12 +215,20 @@ export default { ...@@ -213,12 +215,20 @@ export default {
this.searchForm = {} this.searchForm = {}
}, },
btnClick(pType, scope) { btnClick(pType, scope) {
console.log(scope) if(scope) {
const { shopId } = scope; const { shopId } = scope;
}
switch (pType) { switch (pType) {
case 'create': case 'create':
this.$router.push({ name: 'addShop' }) this.$router.push({ name: 'addShop' })
break break
case 'export':
this.$Common.exportExcel({
url: `${store.state.baseURL}${SPECIALSHOP_API.EXPORT_TABLE}`,
method: 'GET',
data: this.searchForm
})
break
case 'edit': case 'edit':
this.$router.push({ this.$router.push({
name: 'addShop', name: 'addShop',
......
...@@ -54,7 +54,17 @@ ...@@ -54,7 +54,17 @@
@click="btnClick(j.pType, scope.scope)" @click="btnClick(j.pType, scope.scope)"
>{{j.name}}</el-button> >{{j.name}}</el-button>
</template> </template>
<template v-if="(j.pType !== 'pass' && j.pType !== 'reject') && scope.scope.approvalStatus != 1"> <template v-if="(j.pType !== 'pass' && j.pType !== 'reject') && scope.scope.approvalStatus != 1 && scope.scope.isAdd == 2">
<el-button
:key="idx"
:type="j.type || 'text'"
size="mini"
plain
@click="btnClick(j.pType, scope.scope)"
>{{j.name}}</el-button>
</template>
<!-- isAdd => 1: 只展示查看原围栏 2: 展示查看原围栏和修改后的围栏 -->
<template v-if="(j.remark == 'viewOrigin') && scope.scope.approvalStatus != 1 && scope.scope.isAdd == 1">
<el-button <el-button
:key="idx" :key="idx"
:type="j.type || 'text'" :type="j.type || 'text'"
...@@ -142,18 +152,22 @@ export default { ...@@ -142,18 +152,22 @@ export default {
{ {
name: '查看原围栏', name: '查看原围栏',
pType: 'view', pType: 'view',
remark: 'viewOrigin'
}, },
{ {
name: '查看修改后围栏', name: '查看修改后围栏',
pType: 'view', pType: 'view',
remark: 'viewUpdated'
}, },
{ {
name: '通过', name: '通过',
pType: 'pass', pType: 'pass',
remark: ''
}, },
{ {
name: '驳回', name: '驳回',
pType: 'reject', pType: 'reject',
remark: ''
} }
] ]
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!