Commit f98ca382 by wangql

提交代码

2 parents 77304e01 6217c85e
<template> <template>
<div class="detail"> <div class="detail">
<gl-breadcrumb style="font-size: 20px;background: #f0f0f0;padding: 5px 10px;border-radius: 10px;display: inline-block;" separator='/'> <gl-breadcrumb class="detail-bread" style="" separator='/'>
<gl-breadcrumb-item><a <gl-breadcrumb-item><a
href='#' href='#'
@click='back' @click='back'
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
label='基本信息' label='基本信息'
name='first' name='first'
> >
<gl-col :span="24" style="border: 1px solid #ebeef5;background: #fafafa;padding: 10px 20px;"> <gl-col v-loading="IdChange[0]" :span="24" class="detail-basic">
<gl-col <gl-col
class="detail-row" class="detail-row"
:span="i.isMap || i.img? 24 : 12" :span="i.isMap? 24 : 8"
v-for="(i, index) in List" v-for="(i, index) in List"
:key="index+''" :key="index+''"
> >
...@@ -132,6 +132,11 @@ export default { ...@@ -132,6 +132,11 @@ export default {
return { return {
tabPosition: 'left', tabPosition: 'left',
merchantId: '', merchantId: '',
// loading标记
// loading: [0, 0, 0],
// basicLoading: false,
// staffLoading: false,
// groupLoading: false,
// 标记merchantId是否改变 // 标记merchantId是否改变
IdChange: [0, 0, 0], IdChange: [0, 0, 0],
activeName: 'first', activeName: 'first',
...@@ -166,10 +171,6 @@ export default { ...@@ -166,10 +171,6 @@ export default {
label: '联系电话', label: '联系电话',
value: '' value: ''
}, { }, {
label: 'POI位置点',
value: '',
isMap: true
}, {
name: 'phone', name: 'phone',
label: '服务电话', label: '服务电话',
value: '' value: ''
...@@ -181,6 +182,10 @@ export default { ...@@ -181,6 +182,10 @@ export default {
label: '商户LOGO', label: '商户LOGO',
value: '', value: '',
isImg: true isImg: true
}, {
label: 'POI位置点',
value: '',
isMap: true
} }
], ],
zoom: 12, zoom: 12,
...@@ -195,6 +200,7 @@ export default { ...@@ -195,6 +200,7 @@ export default {
// 员工信息 // 员工信息
staffTableData: { staffTableData: {
border: true, border: true,
stripe: true,
height: parseInt(this.$client_height() - 140), height: parseInt(this.$client_height() - 140),
align: 'center', align: 'center',
data: [], data: [],
...@@ -224,6 +230,7 @@ export default { ...@@ -224,6 +230,7 @@ export default {
// 分组信息 // 分组信息
groupTableData: { groupTableData: {
border: true, border: true,
stripe: true,
height: parseInt(this.$client_height() - 140), height: parseInt(this.$client_height() - 140),
align: 'center', align: 'center',
data: [], data: [],
...@@ -261,6 +268,7 @@ export default { ...@@ -261,6 +268,7 @@ export default {
diaWidth: '40%', diaWidth: '40%',
parentLevelTableData: { parentLevelTableData: {
border: true, border: true,
stripe: true,
align: 'center', align: 'center',
data: [], data: [],
column: [{ column: [{
...@@ -273,6 +281,7 @@ export default { ...@@ -273,6 +281,7 @@ export default {
}, },
childLevelTableData: { childLevelTableData: {
border: true, border: true,
stripe: true,
align: 'center', align: 'center',
data: [], data: [],
column: [{ column: [{
...@@ -339,6 +348,7 @@ export default { ...@@ -339,6 +348,7 @@ export default {
this.IdChange[0] = 0 this.IdChange[0] = 0
// notice.okTips() // notice.okTips()
}).catch(err => { }).catch(err => {
this.IdChange[0] = 0
notice.errorTips(err) notice.errorTips(err)
}) })
}, },
...@@ -365,8 +375,10 @@ export default { ...@@ -365,8 +375,10 @@ export default {
request.req(params).then(res => { request.req(params).then(res => {
this.staffTableData.data = res.merchantPersonals this.staffTableData.data = res.merchantPersonals
this.IdChange[1] = 0 this.IdChange[1] = 0
// notice.okTips() console.log(this.IdChange[1])
notice.okTips()
}).catch(err => { }).catch(err => {
this.IdChange[1] = 0
notice.errorTips(err) notice.errorTips(err)
}) })
}, },
...@@ -377,8 +389,10 @@ export default { ...@@ -377,8 +389,10 @@ export default {
request.req(params).then(res => { request.req(params).then(res => {
this.groupTableData.data = res.merchantGroups this.groupTableData.data = res.merchantGroups
this.IdChange[2] = 0 this.IdChange[2] = 0
// notice.okTips() console.log(this.IdChange[2])
notice.okTips()
}).catch(err => { }).catch(err => {
this.IdChange[2] = 0
notice.errorTips(err) notice.errorTips(err)
}) })
}, },
...@@ -416,9 +430,23 @@ export default { ...@@ -416,9 +430,23 @@ export default {
} }
.amap-demo { .amap-demo {
height: 300px; height: 300px;
border: 1px solid #ebeef5;
border-radius: 10px;
} }
.detail { .detail {
margin: 12px; margin: 12px;
font-size: 14px;
}
.detail-bread {
background: #f0f0f0;
padding: 5px 10px;
border-radius: 10px;
display: inline-block;
}
.detail-basic {
border: 1px solid #ebeef5;
background: #fafafa;
padding: 10px 20px;
} }
.detail a{ .detail a{
/* color: #0000FF; */ /* color: #0000FF; */
......
...@@ -105,6 +105,7 @@ export default { ...@@ -105,6 +105,7 @@ export default {
dialogVisible: false, dialogVisible: false,
tableData: { tableData: {
border: true, border: true,
stripe: true,
align: 'center', align: 'center',
height: parseInt(this.$client_height() - 140), height: parseInt(this.$client_height() - 140),
data: [], data: [],
...@@ -188,6 +189,7 @@ export default { ...@@ -188,6 +189,7 @@ export default {
request request
.req(params) .req(params)
.then(res => { .then(res => {
console.log(res)
this.total = res.pagination.totalCount this.total = res.pagination.totalCount
this.tableData.data = res.groupDicts this.tableData.data = res.groupDicts
this.tableLoading = false this.tableLoading = false
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
remote remote
:name="`item.merchant${idx+1}`" :name="`item.merchant${idx+1}`"
v-validate="item.merchant || item.merchantType ? 'required' : ''" v-validate="item.merchant || item.merchantType ? 'required' : ''"
:data-vv-as="`子商户${idx+1}`" :data-vv-as="`子商户`"
clearable clearable
placeholder="请输入商户名称/商户号" placeholder="请输入商户名称/商户号"
:remote-method="remoteChildList" :remote-method="remoteChildList"
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<gl-select v-model="item.merchantType" <gl-select v-model="item.merchantType"
:name="`item.merchantType${idx+1}`" :name="`item.merchantType${idx+1}`"
v-validate="item.merchant || item.merchantType ? 'required' : ''" v-validate="item.merchant || item.merchantType ? 'required' : ''"
:data-vv-as="`子商户${idx+1}类型`" :data-vv-as="`子商户类型`"
clearable clearable
placeholder="请选择"> placeholder="请选择">
<gl-option <gl-option
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
</gl-form-item> </gl-form-item>
</div> </div>
<span v-show="tip" class="error" style="float:right; margin-right: 43px;">{{ '请填写上一条子商户数据' }}</span> <span v-show="tip" class="error" style="float:right; margin-right: 43px;">{{ '请填写上一条子商户数据' }}</span>
<span v-show="isAdd" class="error" style="float:right; margin-right: 43px;">{{ '请填商户数据' }}</span>
<gl-button @click="addMore">添加更多</gl-button> <gl-button @click="addMore">添加更多</gl-button>
</gl-form> </gl-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -100,16 +101,19 @@ ...@@ -100,16 +101,19 @@
</template> </template>
<script> <script>
import { resetSearch } from '@/common/common'
import notice from '@/common/notice' import notice from '@/common/notice'
import { businessManagenMethods, groupDetailMethods, request } from '@/api' import { businessManagenMethods, groupDetailMethods, request } from '@/api'
export default { export default {
name: 'AddBusiness', name: 'AddBusiness',
props: { props: {
addDialogVisible: Boolean addDialogVisible: Boolean,
groupId: String
}, },
data() { data() {
return { return {
tip: false, tip: false, // 添加下一个子商户的提示
isAdd: false, // 添加子商户,需填写商户提示
addForm: { addForm: {
merchant: '', merchant: '',
merchantType: '' merchantType: ''
...@@ -124,18 +128,23 @@ export default { ...@@ -124,18 +128,23 @@ export default {
childLoading: false, childLoading: false,
businessList: [], businessList: [],
businessChildList: [], businessChildList: [],
addList: [ addList: []
{
label: '子商户1',
merchant: '',
merchantType: ''
}
]
} }
}, },
watch: { watch: {
addDialogVisible(val) { addDialogVisible(val) {
this.$validator.errors.clear() this.$validator.errors.clear()
},
'addForm.merchant'(val) {
if (this.addList.length !== 0) {
this.addList.forEach(item => {
for(var j in item) {
if (j == 'merchant' || j == 'merchantType') {
item[j] = ''
}
}
})
}
} }
}, },
mounted() { mounted() {
...@@ -145,6 +154,7 @@ export default { ...@@ -145,6 +154,7 @@ export default {
// 确定按钮 // 确定按钮
ok() { ok() {
this.tip = false this.tip = false
this.isAdd = false
this.$validator.validateAll().then((result) => { this.$validator.validateAll().then((result) => {
if (result) { if (result) {
this.addList.forEach(item => { this.addList.forEach(item => {
...@@ -168,12 +178,23 @@ export default { ...@@ -168,12 +178,23 @@ export default {
showAddDialog() { showAddDialog() {
this.$emit('addData') this.$emit('addData')
setTimeout(() => { setTimeout(() => {
this.addList = [{ label: '子商户1', merchant: '', merchantType: '' }] this.addList = []
this.addForm = { merchant: '', merchantType: '' } this.addForm = { merchant: '', merchantType: '' }
}, 400) }, 400)
}, },
// 添加更多按钮 // 添加更多按钮
addMore() { addMore() {
console.log(this.addForm.merchant)
if (this.addForm.merchant) {
this.isAdd = false
if (this.addList.length === 0) {
this.addList.push({
label: '子商户' + (this.addList.length + 1),
merchant: '',
merchantType: '',
show: true
})
} else {
const len = this.addList.length - 1 const len = this.addList.length - 1
if (this.addList[len].merchant == '' || this.addList[len].merchantType == '') { if (this.addList[len].merchant == '' || this.addList[len].merchantType == '') {
this.tip = true this.tip = true
...@@ -186,6 +207,10 @@ export default { ...@@ -186,6 +207,10 @@ export default {
show: true show: true
}) })
} }
}
} else {
this.isAdd = true
}
}, },
deleteBusiness(idx) { deleteBusiness(idx) {
this.addList.splice(idx, 1) this.addList.splice(idx, 1)
...@@ -195,7 +220,7 @@ export default { ...@@ -195,7 +220,7 @@ export default {
if (query !== '') { if (query !== '') {
this.loading = true this.loading = true
const params = {} const params = {}
params.groupId = 1 params.groupId = this.groupId
params.searchWrod = query params.searchWrod = query
params.method = groupDetailMethods.SearchList params.method = groupDetailMethods.SearchList
request.req(params).then(res => { request.req(params).then(res => {
...@@ -213,7 +238,8 @@ export default { ...@@ -213,7 +238,8 @@ export default {
if (query !== '') { if (query !== '') {
this.childLoading = true this.childLoading = true
const params = {} const params = {}
params.groupId = 1 params.groupId = this.groupId
params.merchantId = this.addForm.merchant
params.searchWrod = query params.searchWrod = query
params.method = groupDetailMethods.SearchChildList params.method = groupDetailMethods.SearchChildList
request.req(params).then(res => { request.req(params).then(res => {
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
:current-page="pageNum" :current-page="pageNum"
:page-sizes="[10,20,30,40]" :page-sizes="[10,20,30,40]"
:page-size="pageSize" :page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="sizes, total, ->, prev, pager, next, jumper"
:total="total" :total="total"
> >
</gl-pagination> </gl-pagination>
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
</div> </div>
</gl-dialog> </gl-dialog>
<add-business <add-business
:groupId="groupId+''"
:addDialogVisible="addDialogVisible" :addDialogVisible="addDialogVisible"
@addData="handleAddData" @addData="handleAddData"
></add-business> ></add-business>
...@@ -126,6 +127,7 @@ export default { ...@@ -126,6 +127,7 @@ export default {
this.times = [] this.times = []
resetSearch(this.searchParams) resetSearch(this.searchParams)
} }
this.loadingGetList()
} }
}, },
// mixins: [NoticeMixin], // mixins: [NoticeMixin],
...@@ -159,8 +161,9 @@ export default { ...@@ -159,8 +161,9 @@ export default {
eventBus: null, eventBus: null,
tableData: { tableData: {
border: true, border: true,
stripe: true,
align: 'center', align: 'center',
// height: parseInt(this.$client_height() - 140), height: parseInt(this.$client_height() - 140),
data: [], data: [],
column: [ column: [
{ {
...@@ -235,8 +238,7 @@ export default { ...@@ -235,8 +238,7 @@ export default {
this.searchParams.endTime = this.times[1].format('yyyy-MM-dd HH:mm:ss') this.searchParams.endTime = this.times[1].format('yyyy-MM-dd HH:mm:ss')
} }
const params = this.getParams() const params = this.getParams()
// params.groupId = this.groupId params.groupId = this.groupId
params.groupId = 1
params.method = groupDetailMethods.Search params.method = groupDetailMethods.Search
console.log(params) console.log(params)
request request
......
...@@ -152,7 +152,6 @@ export default { ...@@ -152,7 +152,6 @@ export default {
}, },
methods: { methods: {
handleClose() { handleClose() {
// this.eventBus.$emit('reset')
this.$emit('hideDialog') this.$emit('hideDialog')
}, },
handleComfrim() { handleComfrim() {
...@@ -162,7 +161,6 @@ export default { ...@@ -162,7 +161,6 @@ export default {
]).then((result) => { ]).then((result) => {
if (result[0] && result[1]) { if (result[0] && result[1]) {
this.$emit('comfirmDialog', this.areaInfo) this.$emit('comfirmDialog', this.areaInfo)
// this.eventBus.$emit('reset')
} }
}) })
}, },
...@@ -177,12 +175,12 @@ export default { ...@@ -177,12 +175,12 @@ export default {
}, },
getCityArea(params) { getCityArea(params) {
// console.log(params) // console.log(params)
this.areaInfo.provinceId = params[0] params[0] && (this.areaInfo.provinceId = params[0])
this.areaInfo.cityId = params[1] params[1] && (this.areaInfo.cityId = params[1])
this.areaInfo.areaId = params[2] params[2] && (this.areaInfo.areaId = params[2])
this.areaInfo.provinceName = params[3] params[3] && (this.areaInfo.provinceName = params[3])
this.areaInfo.cityName = params[4] params[4] && (this.areaInfo.cityName = params[4])
this.areaInfo.areaName = params[5] params[5] && (this.areaInfo.areaName = params[5])
} }
} }
} }
......
...@@ -60,7 +60,15 @@ ...@@ -60,7 +60,15 @@
style="width: 100%;" style="width: 100%;"
v-model="merchantSearch.merchantChannel" v-model="merchantSearch.merchantChannel"
placeholder="请选择渠道" placeholder="请选择渠道"
></gl-select> >
<gl-option
v-for="item in channelList"
:key="item.confId"
:label="item.confKey"
:value="item.confId"
>
</gl-option>
</gl-select>
</gl-form-item> </gl-form-item>
</gl-col> </gl-col>
<gl-col :span="12"> <gl-col :span="12">
...@@ -79,8 +87,8 @@ ...@@ -79,8 +87,8 @@
<gl-option <gl-option
v-for="(value, key) in statusItems" v-for="(value, key) in statusItems"
:key="value" :key="value"
:value="key"
:label="value" :label="value"
:value="key"
></gl-option> ></gl-option>
</gl-select> </gl-select>
</gl-form-item> </gl-form-item>
...@@ -126,13 +134,15 @@ ...@@ -126,13 +134,15 @@
<script> <script>
import Vue from 'vue' import Vue from 'vue'
import { CityArea } from '../components' import { CityArea } from '../components'
import { businessManagenMethods, request } from '@/api'
export default { export default {
name: 'SearchDialog', name: 'SearchDialog',
data() { data() {
return { return {
title: '高级搜索', title: '高级搜索',
eventBus: null, eventBus: null,
showCity: [1, 1] showCity: [1, 1],
channelList: []
} }
}, },
props: { props: {
...@@ -150,10 +160,25 @@ export default { ...@@ -150,10 +160,25 @@ export default {
components: { components: {
CityArea CityArea
}, },
watch: {
isVisible(val) {
val && this.getChannelList()
}
},
mounted() { mounted() {
this.eventBus = new Vue() this.eventBus = new Vue()
}, },
methods: { methods: {
getChannelList() {
const params = {}
params.method = businessManagenMethods.Channel
request.req(params).then(res => {
// console.log(res)
this.channelList = res.merchantDictList
}).catch(err => {
console.log(err)
})
},
handleClose() { handleClose() {
this.eventBus.$emit('reset') this.eventBus.$emit('reset')
this.$emit('hideDialog', true) this.$emit('hideDialog', true)
...@@ -167,8 +192,9 @@ export default { ...@@ -167,8 +192,9 @@ export default {
this.$emit('hideDialog') this.$emit('hideDialog')
}, },
getCityArea(params) { getCityArea(params) {
this.merchantSearch.provinceId = params[0] console.log(params)
this.merchantSearch.cityId = params[1] params[0] && (this.merchantSearch.provinceId = params[0])
params[1] && (this.merchantSearch.cityId = params[1])
} }
} }
} }
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<gl-table <gl-table
class="m-b10" class="m-b10"
:table="ListTableData" :table="ListTableData"
v-loading="tableLoading"
></gl-table> ></gl-table>
<gl-pagination <gl-pagination
background background
...@@ -45,6 +46,7 @@ ...@@ -45,6 +46,7 @@
import SearchDialog from './SearchDialog' import SearchDialog from './SearchDialog'
import AddDialog from './AddDialog' import AddDialog from './AddDialog'
import { bizMethods, request } from '@/api' import { bizMethods, request } from '@/api'
import { resetSearch } from '@/common/common'
import notice from '@/common/notice' import notice from '@/common/notice'
export default { export default {
name: 'businessList', name: 'businessList',
...@@ -54,6 +56,7 @@ export default { ...@@ -54,6 +56,7 @@ export default {
}, },
data() { data() {
return { return {
tableLoading: false,
// 新增弹窗 // 新增弹窗
addVisible: false, addVisible: false,
merchantForm: { merchantForm: {
...@@ -93,6 +96,7 @@ export default { ...@@ -93,6 +96,7 @@ export default {
// 分页所需参数-end // 分页所需参数-end
ListTableData: { ListTableData: {
border: true, border: true,
stripe: true,
height: parseInt(this.$client_height() - 140), height: parseInt(this.$client_height() - 140),
align: 'center', align: 'center',
data: [], data: [],
...@@ -147,7 +151,7 @@ export default { ...@@ -147,7 +151,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.getList() this.loadingGetList()
}, },
methods: { methods: {
// 获取页面参数 // 获取页面参数
...@@ -157,6 +161,10 @@ export default { ...@@ -157,6 +161,10 @@ export default {
params.pageCount = this.pageSize params.pageCount = this.pageSize
return params return params
}, },
loadingGetList() {
this.tableLoading = true
this.getList()
},
// 接口请求-start // 接口请求-start
getList() { getList() {
const params = this.getParams() const params = this.getParams()
...@@ -165,10 +173,12 @@ export default { ...@@ -165,10 +173,12 @@ export default {
request.req(params).then(res => { request.req(params).then(res => {
this.ListTableData.data = res.merchants this.ListTableData.data = res.merchants
this.totalCount = res.pagination.totalCount this.totalCount = res.pagination.totalCount
this.reset(this.merchantSearch) resetSearch(this.merchantSearch)
this.tableLoading = false
}).catch(err => { }).catch(err => {
notice.errorTips(err) notice.errorTips(err)
this.reset(this.merchantSearch) resetSearch(this.merchantSearch)
this.tableLoading = false
}) })
}, },
saveMerchant(areaInfo) { saveMerchant(areaInfo) {
...@@ -177,42 +187,43 @@ export default { ...@@ -177,42 +187,43 @@ export default {
params.method = bizMethods.Create params.method = bizMethods.Create
request.req(params).then(res => { request.req(params).then(res => {
notice.okTips() notice.okTips()
this.reset(this.merchantForm) // resetSearch(this.merchantForm)
this.handleAdd() this.handleAddHide()
this.getList() this.loadingGetList()
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
// resetSearch(this.merchantForm)
notice.errorTips(err) notice.errorTips(err)
}) })
}, },
// 接口请求-end // 接口请求-end
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val this.pageSize = val
this.getList() this.loadingGetList()
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.pageNum = val this.pageNum = val
this.getList() this.loadingGetList()
},
reset(params) {
for (var item in params) {
params[item] = ''
}
}, },
// reset(params) {
// for (var item in params) {
// params[item] = ''
// }
// },
// 搜索-start-------- // 搜索-start--------
handleSearch() { handleSearch() {
this.searchVisible = !this.searchVisible this.searchVisible = !this.searchVisible
}, },
// 隐藏/重置 // 隐藏/重置
handleSearchHide(hide) { handleSearchHide(hide) {
this.reset(this.merchantSearch) resetSearch(this.merchantSearch)
hide && this.handleSearch() hide && this.handleSearch()
console.log(this.merchantSearch) console.log(this.merchantSearch)
}, },
// 搜索 // 搜索
handleSearchComfirm() { handleSearchComfirm() {
this.handleSearch() this.handleSearch()
this.getList() this.loadingGetList()
}, },
// 搜索-end-------- // 搜索-end--------
// 新增 // 新增
...@@ -221,10 +232,9 @@ export default { ...@@ -221,10 +232,9 @@ export default {
}, },
handleAddHide() { handleAddHide() {
this.handleAdd() this.handleAdd()
this.reset(this.merchantForm) resetSearch(this.merchantForm)
}, },
handleAddComfirm(areaInfo) { handleAddComfirm(areaInfo) {
// this.handleAdd()
this.saveMerchant(areaInfo) this.saveMerchant(areaInfo)
} }
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
@click="add" @click="add"
>新增商户</gl-button> --> >新增商户</gl-button> -->
</div> </div>
<gl-table :table="tableData"></gl-table> <gl-table v-loading="tableLoading" :table="tableData"></gl-table>
<gl-dialog <gl-dialog
title="新增业务" title="新增业务"
:visible.sync="dialogFormVisible" :visible.sync="dialogFormVisible"
...@@ -69,17 +69,19 @@ ...@@ -69,17 +69,19 @@
</div> </div>
</template> </template>
<script> <script>
import Vue from 'vue' // import Vue from 'vue'
import notice from '@/common/notice' import notice from '@/common/notice'
import { businessManagenMethods, request } from '@/api' import { businessManagenMethods, request } from '@/api'
export default { export default {
name: 'BusinessManagement', name: 'BusinessManagement',
data() { data() {
return { return {
tableLoading: false,
tableData: { tableData: {
border: true, border: true,
stripe: true, stripe: true,
align: 'center', align: 'center',
height: parseInt(this.$client_height() - 140),
data: [], data: [],
column: [ column: [
{ {
...@@ -120,9 +122,13 @@ export default { ...@@ -120,9 +122,13 @@ export default {
} }
}, },
mounted() { mounted() {
this.getList() this.loadingGetList()
}, },
methods: { methods: {
loadingGetList() {
this.tableLoading = true
this.getList()
},
// 显示隐藏弹窗 // 显示隐藏弹窗
showDialog() { showDialog() {
this.dialogFormVisible = !this.dialogFormVisible this.dialogFormVisible = !this.dialogFormVisible
...@@ -142,7 +148,9 @@ export default { ...@@ -142,7 +148,9 @@ export default {
request.req(params).then(res => { request.req(params).then(res => {
// console.log(res) // console.log(res)
this.tableData.data = res.merchantDictList this.tableData.data = res.merchantDictList
this.tableLoading = false
}).catch(err => { }).catch(err => {
this.tableLoading = false
notice.errorTips(err) notice.errorTips(err)
}) })
}, },
...@@ -154,6 +162,7 @@ export default { ...@@ -154,6 +162,7 @@ export default {
request.req(params).then(res => { request.req(params).then(res => {
notice.okTips() notice.okTips()
this.showDialog() this.showDialog()
this.loadingGetList()
}).catch(err => { }).catch(err => {
notice.errorTips(err) notice.errorTips(err)
}) })
......
...@@ -135,6 +135,7 @@ export default { ...@@ -135,6 +135,7 @@ export default {
this.city = '' this.city = ''
this.area = '' this.area = ''
this.mutIndex = [] this.mutIndex = []
this.namesArr = []
clearTimeout(timer) clearTimeout(timer)
const timer = setTimeout(() => { const timer = setTimeout(() => {
this.$validator.errors.clear() this.$validator.errors.clear()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!