|
|
@ -1,14 +1,7 @@ |
|
|
|
<template> |
|
|
|
<div class="app-container"> |
|
|
|
<div v-show="pageState === 1"> |
|
|
|
<div class="tab-header webtop"> |
|
|
|
<div>车型关联常用配置</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" size="small" @click="handleGuanlian()">关联</el-button> |
|
|
|
<el-button type="danger" size="small" @click="handleDelete()">解除</el-button> |
|
|
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<button-bar view-title="车型关联常用配置" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|
|
|
<div class="main-content"> |
|
|
|
<div class="searchcon"> |
|
|
|
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|
|
@ -129,7 +122,6 @@ |
|
|
|
<el-table-column width="80px" fixed label="序号" type="index" :index="indexMethod" align="center"/> |
|
|
|
<el-table-column label="操作" fixed align="center" width="180px" class-name="small-padding fixed-width"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<el-button size="mini" type="primary" :disabled="row.guidedPrice !== ''" @click="handleJiage(row)">价格维护</el-button> |
|
|
|
<el-button size="mini" type="primary" @click="handleBiaoQian(row)">标签</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
@ -176,6 +168,7 @@ |
|
|
|
import { deleteRel, pagerList } from '@/api/cheliang/basemodelconfig' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
|
import chexingpeizhijiageweihu from './chexingpeizhijiageweihuAdd' |
|
|
|
import changyongpeizhi from './changyongpeizhi' |
|
|
|
import chexingpeizhibiaoqian from './chexingpeizhibiaoqian' |
|
|
@ -186,6 +179,7 @@ export default { |
|
|
|
components: { |
|
|
|
Pagination, |
|
|
|
pageye, |
|
|
|
ButtonBar, |
|
|
|
chexingpeizhijiageweihu, |
|
|
|
changyongpeizhi, |
|
|
|
chexingpeizhibiaoqian |
|
|
@ -193,6 +187,37 @@ export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
pageState: 1, |
|
|
|
btndisabled: false, |
|
|
|
btnList: [ |
|
|
|
{ |
|
|
|
type: 'primary', |
|
|
|
size: 'small', |
|
|
|
icon: '', |
|
|
|
btnKey: 'toPreserve', |
|
|
|
btnLabel: '价格维护' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'primary', |
|
|
|
size: 'small', |
|
|
|
icon: '', |
|
|
|
btnKey: 'toRelevancy', |
|
|
|
btnLabel: '关联' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'danger', |
|
|
|
size: 'small', |
|
|
|
icon: '', |
|
|
|
btnKey: 'toRemove', |
|
|
|
btnLabel: '解除' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'info', |
|
|
|
size: 'small', |
|
|
|
icon: 'cross', |
|
|
|
btnKey: 'doClose', |
|
|
|
btnLabel: '关闭' |
|
|
|
} |
|
|
|
], |
|
|
|
isSearchShow: false, |
|
|
|
searchxianshitit: '显示查询条件', |
|
|
|
title: '', |
|
|
@ -265,6 +290,9 @@ export default { |
|
|
|
}, |
|
|
|
created() { |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.$refs['btnbar'].setButtonList(this.btnList) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 搜索条件效果 |
|
|
|
clicksearchShow() { |
|
|
@ -275,6 +303,25 @@ export default { |
|
|
|
this.searchxianshitit = '显示查询条件' |
|
|
|
} |
|
|
|
}, |
|
|
|
btnHandle(btnKey) { |
|
|
|
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|
|
|
switch (btnKey) { |
|
|
|
case 'toPreserve': |
|
|
|
this.toPreserve() |
|
|
|
break |
|
|
|
case 'toRelevancy': |
|
|
|
this.toRelevancy() |
|
|
|
break |
|
|
|
case 'toRemove': |
|
|
|
this.toRemove() |
|
|
|
break |
|
|
|
case 'doClose': |
|
|
|
this.doClose() |
|
|
|
break |
|
|
|
default: |
|
|
|
break |
|
|
|
} |
|
|
|
}, |
|
|
|
showGuanlian(row) { |
|
|
|
this.setRelList.modelSid = row.sid |
|
|
|
this.chesid = row.sid |
|
|
@ -433,8 +480,18 @@ export default { |
|
|
|
this.pageState = 4 |
|
|
|
this.$refs['biaoqian'].showEdit(row.sid, this.listQuery.params.useOrgSid) |
|
|
|
}, |
|
|
|
// 价格维护 |
|
|
|
toPreserve() { |
|
|
|
if (this.sids.length === 1) { |
|
|
|
this.pageState = 2 |
|
|
|
this.$refs['weihu'].showWeiHu(this.sids[0]) |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行价格维护操作' }) |
|
|
|
return |
|
|
|
} |
|
|
|
}, |
|
|
|
// 打开关联 |
|
|
|
handleGuanlian() { |
|
|
|
toRelevancy() { |
|
|
|
this.pageState = 3 |
|
|
|
let sids = [] |
|
|
|
console.log('yiyouyouyo', this.list) |
|
|
@ -445,7 +502,7 @@ export default { |
|
|
|
this.$refs['changyongpeizhi'].showSetRel(this.setRelList.modelSid, sids.toString()) |
|
|
|
}, |
|
|
|
// 解除关联 |
|
|
|
handleDelete() { |
|
|
|
toRemove() { |
|
|
|
if (this.sids.length === 0) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' }) |
|
|
|
return |
|
|
@ -459,7 +516,7 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
// 返回 |
|
|
|
handleReturn() { |
|
|
|
doClose() { |
|
|
|
this.$emit('doback') |
|
|
|
}, |
|
|
|
// 序号 |
|
|
|