|
@@ -44,8 +44,6 @@
|
|
<!-- 操作按钮 -->
|
|
<!-- 操作按钮 -->
|
|
<div class="table-operator">
|
|
<div class="table-operator">
|
|
<a-button id="permissionSetting-brand" type="primary" class="button-error" @click="chooseTModal">选择品类</a-button>
|
|
<a-button id="permissionSetting-brand" type="primary" class="button-error" @click="chooseTModal">选择品类</a-button>
|
|
- <!-- <a-button id="permissionSetting-type" type="primary" class="button-info" @click="choosePModal('CATEGORY')">选择产品分类</a-button>
|
|
|
|
- <a-button id="permissionSetting-product" type="primary" class="button-success" @click="choosePModal('PRODUCT')">选择产品</a-button> -->
|
|
|
|
</div>
|
|
</div>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<s-table
|
|
<s-table
|
|
@@ -61,31 +59,20 @@
|
|
bordered>
|
|
bordered>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
|
|
+ <a-button size="small" type="link" class="button-info" @click="handleEdit(record)">编辑</a-button>
|
|
<a-button size="small" type="link" class="button-error" @click="handleDel(record)">删除</a-button>
|
|
<a-button size="small" type="link" class="button-error" @click="handleDel(record)">删除</a-button>
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
</a-card>
|
|
</a-card>
|
|
</a-spin>
|
|
</a-spin>
|
|
- <!-- 选择产品品牌 -->
|
|
|
|
- <chooseBrandModal :openModal="openBrandModal" :chooseData="chooseBrand" @close="openBrandModal=false" @ok="handleBrandOk" />
|
|
|
|
<!-- 选择产品分类 -->
|
|
<!-- 选择产品分类 -->
|
|
<chooseTypeModal :openModal="openTypeModal" :dataList="detailDataList" @close="openTypeModal=false" @ok="handleTypeOk" />
|
|
<chooseTypeModal :openModal="openTypeModal" :dataList="detailDataList" @close="openTypeModal=false" @ok="handleTypeOk" />
|
|
- <!-- 选择产品 -->
|
|
|
|
- <chooseProductsModal
|
|
|
|
- type="dealership"
|
|
|
|
- :dealerSn="$route.params.sn"
|
|
|
|
- :openModal="openProductsModal"
|
|
|
|
- :chooseData="chooseProducts"
|
|
|
|
- @close="openProductsModal=false"
|
|
|
|
- @ok="handleProductsOk" />
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
-import ChooseProductsModal from '@/views/common/chooseProductsModal.vue'
|
|
|
|
-import ChooseBrandModal from '@/views/common/chooseBrandModal.vue'
|
|
|
|
import ChooseTypeModal from './chooseTypeModal.vue'
|
|
import ChooseTypeModal from './chooseTypeModal.vue'
|
|
import productTypeAll from '@/views/common/productTypeAll.js'
|
|
import productTypeAll from '@/views/common/productTypeAll.js'
|
|
import ProductBrand from '@/views/common/productBrand.js'
|
|
import ProductBrand from '@/views/common/productBrand.js'
|
|
@@ -93,7 +80,7 @@ import { dealerScopeList, dealerScopeSave, dealerScopeDel, dealerScopeQueryList
|
|
export default {
|
|
export default {
|
|
name: 'MerchantInfoManagementSet',
|
|
name: 'MerchantInfoManagementSet',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
- components: { STable, VSelect, ChooseProductsModal, ChooseBrandModal, ChooseTypeModal, productTypeAll, ProductBrand },
|
|
|
|
|
|
+ components: { STable, VSelect, ChooseTypeModal, productTypeAll, ProductBrand },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
@@ -163,36 +150,8 @@ export default {
|
|
chooseTModal () {
|
|
chooseTModal () {
|
|
this.openTypeModal = true
|
|
this.openTypeModal = true
|
|
},
|
|
},
|
|
- // 选择产品
|
|
|
|
- choosePModal (type) {
|
|
|
|
- const productList = []
|
|
|
|
- const brandList = []
|
|
|
|
- const typeList = []
|
|
|
|
- dealerScopeQueryList({ dealerSn: this.$route.params.sn, goodsType: type }).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- const data = res.data
|
|
|
|
- data.map(item => {
|
|
|
|
- if (item.goodsType == 'PRODUCT') {
|
|
|
|
- productList.push(item)
|
|
|
|
- } else if (item.goodsType == 'BRAND') {
|
|
|
|
- brandList.push(item)
|
|
|
|
- } else if (item.goodsType == 'CATEGORY') {
|
|
|
|
- typeList.push(item)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- if (type == 'PRODUCT') { // 选择产品
|
|
|
|
- // this.chooseProducts = productList // 包含先前所选产品
|
|
|
|
- this.chooseProducts = [] // 不包含先前所选产品
|
|
|
|
- this.openProductsModal = true
|
|
|
|
- } else if (type == 'BRAND') { // 选择品牌
|
|
|
|
- this.chooseBrand = brandList
|
|
|
|
- this.openBrandModal = true
|
|
|
|
- } else if (type == 'CATEGORY') { // 选择分类
|
|
|
|
- this.chooseType = typeList
|
|
|
|
- this.openTypeModal = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ handleEdit () {
|
|
|
|
+
|
|
},
|
|
},
|
|
// 产品分类 change
|
|
// 产品分类 change
|
|
changeProductType (val, opt) {
|
|
changeProductType (val, opt) {
|
|
@@ -200,16 +159,6 @@ export default {
|
|
this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
},
|
|
},
|
|
- // 品牌
|
|
|
|
- handleBrandOk (obj) {
|
|
|
|
- this.chooseBrand = obj
|
|
|
|
- this.changeData('BRAND')
|
|
|
|
- },
|
|
|
|
- // 产品
|
|
|
|
- handleProductsOk (obj) {
|
|
|
|
- this.chooseProducts = obj
|
|
|
|
- this.changeData('PRODUCT')
|
|
|
|
- },
|
|
|
|
// 分类
|
|
// 分类
|
|
handleTypeOk (obj) {
|
|
handleTypeOk (obj) {
|
|
this.chooseType = obj
|
|
this.chooseType = obj
|
|
@@ -268,7 +217,7 @@ export default {
|
|
const _this = this
|
|
const _this = this
|
|
this.$confirm({
|
|
this.$confirm({
|
|
title: '提示',
|
|
title: '提示',
|
|
- content: '确认要删除吗?',
|
|
|
|
|
|
+ content: '删除后无法向总部或上级采购,确认删除吗?',
|
|
centered: true,
|
|
centered: true,
|
|
onOk () {
|
|
onOk () {
|
|
_this.spinning = true
|
|
_this.spinning = true
|