Commit e8f0f6f9 by cwq0219

修改

1 parent a1346f6e
......@@ -248,7 +248,8 @@ export default {
label: '详情',
type: 'text',
callback: (index, rows) => {
this.getGroupLevelInfo(rows[index].GroupName)
// console.log(rows[index])
this.getGroupLevelInfo(rows[index].id)
}
}]
}
......@@ -356,7 +357,7 @@ export default {
},
// 员工信息
getStaffInfo() {
const params = ({ merchantId: this.merchantId })
const params = { merchantId: this.merchantId }
params.method = bizMethods.Personal
request.req(params).then(res => {
this.staffTableData.data = res.merchantPersonals
......@@ -368,7 +369,7 @@ export default {
},
// 分组信息
getGroupInfo() {
const params = ({ merchantId: this.merchantId })
const params = { merchantId: this.merchantId }
params.method = bizMethods.Group
request.req(params).then(res => {
this.groupTableData.data = res.merchantGroups
......@@ -379,15 +380,17 @@ export default {
})
},
// 分组信息-详情
getGroupLevelInfo(groupName) {
const params = ({ merchantId: this.merchantId, groupId: groupName })
getGroupLevelInfo(groupId) {
const params = { merchantId: this.merchantId, groupId: groupId }
params.method = bizMethods.GroupLevel
console.log(params)
this.detailVisible()
request.req(params).then(res => {
console.log([res.parentMerchantLevel])
// console.log([res.parentMerchantLevel])
this.parentLevelTableData.data = [res.parentMerchantLevel]
this.childLevelTableData.data = res.childMerchantLevels
this.detailVisible()
}).catch(err => {
// console.log(err)
notice.errorTips(err)
})
},
......
......@@ -154,10 +154,10 @@ export default {
label: '分组名称',
prop: 'groupName'
},
// {
// label: '分组编号',
// prop: 'groupCode'
// },
{
label: '分组编号',
prop: 'groupCode'
},
{
label: '业务编号',
prop: 'businessCode'
......@@ -211,23 +211,18 @@ export default {
this.getList()
},
/* 接口请求-start */
// getParams() {
// return Object.assign(
// {
// pageNum: this.pageNum,
// pageSize: this.pageSize
// },
// this.searchCondition
// )
// },
getList() {
// const params = this.getParams()
getParams() {
const params = {}
params.pageCount = this.pageNum
params.pageSize = this.pageSize
return params
},
getList() {
const params = this.getParams()
params.method = groupMethods.Search
request
.req(params)
.then(res => {
console.log(res)
this.total = res.pagination.totalCount
this.tableData.data = res.groupDicts
this.tableLoading = false
......@@ -237,21 +232,21 @@ export default {
console.log(err)
})
},
getBusinessList() {
const params = {}
params.method = groupMethods.BusinessList
request
.req(params)
.then(res => {
res.merchantDictList.forEach((item, index) => {
this.businessList.push({ 'label': item.confKey, 'value': item.confId })
})
})
.catch(err => {
this.tableLoading = false
console.log(err)
})
},
// getBusinessList() {
// const params = {}
// params.method = groupMethods.BusinessList
// request
// .req(params)
// .then(res => {
// res.merchantDictList.forEach((item, index) => {
// this.businessList.push({ 'label': item.confKey, 'value': item.confId })
// })
// })
// .catch(err => {
// this.tableLoading = false
// console.log(err)
// })
// },
handleSizeChange(val) {
this.pageSize = val
this.loadingGetList()
......
......@@ -148,6 +148,7 @@ export default {
data() {
return {
// searchCondition: {},
merchantId: '',
searchParams: {
groupId: null,
merchantName: '',
......@@ -243,6 +244,7 @@ export default {
},
mounted() {
this.$root.eventBus.$on('params', (params) => {
this.merchantId = params.merchantId
this.searchParams.merchantId = params.merchantId
})
this.getList()
......
......@@ -48,7 +48,14 @@
<gl-select
v-model="merchantForm.merchantChannel"
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 label="联系人:">
<gl-input
......@@ -87,6 +94,7 @@
<script>
import Vue from 'vue'
import { CityArea } from '../components'
import { businessManagenMethods, request } from '@/api'
const isPhone = {
validate: (value, args) => {
return value.length === 11 && /^1[345789]\d{9}$/.test(value)
......@@ -97,6 +105,7 @@ export default {
data() {
return {
title: '新增商户',
channelList: [],
// 省市区组件-配置
eventBus: null,
showCity: [1, 1, 1],
......@@ -128,8 +137,10 @@ export default {
},
watch: {
isVisible(val) {
this.$validator.errors.clear()
val && this.getChannel()
if (!val) {
this.$validator.errors.clear()
this.eventBus.$emit('reset')
this.areaInfo = {}
}
}
......@@ -140,7 +151,7 @@ export default {
},
methods: {
handleClose() {
this.eventBus.$emit('reset')
// this.eventBus.$emit('reset')
this.$emit('hideDialog')
},
handleComfrim() {
......@@ -150,10 +161,19 @@ export default {
]).then((result) => {
if (result[0] && result[1]) {
this.$emit('comfirmDialog', this.areaInfo)
this.eventBus.$emit('reset')
// this.eventBus.$emit('reset')
}
})
},
getChannel() {
const params = {}
params.method = businessManagenMethods.Channel
request.req(params).then(res => {
this.channelList = res.merchantDictList
}).catch(err => {
console.log(err)
})
},
getCityArea(params) {
// console.log(params)
this.areaInfo.provinceId = params[0]
......
......@@ -91,6 +91,7 @@
type="date"
placeholder="选择日期"
v-model="merchantSearch.startTime"
value-format="yyyy-MM-dd"
style="width:92%;"
></gl-date-picker>
</gl-col>
......@@ -103,6 +104,7 @@
type="date"
placeholder="选择日期"
v-model="merchantSearch.endTime"
value-format="yyyy-MM-dd"
style="width: 100%;"
></gl-date-picker>
</gl-col>
......
......@@ -97,9 +97,6 @@ export default {
align: 'center',
data: [],
column: [{
label: '序号',
prop: 'id'
}, {
label: '商户名称',
prop: 'merchantName'
}, {
......@@ -137,6 +134,14 @@ export default {
this.$root.to(['商户数据平台', '商户数据平台', '商户数据平台', '商户列表', '*商户详情'], { merchantId: rows[index].merchantId })
}
}]
},
number: {
label: '序号',
width: '90',
index: (index) => {
++index
return index
}
}
}
}
......@@ -156,27 +161,28 @@ export default {
getList() {
const params = this.getParams()
params.method = bizMethods.Search
console.log(params)
request.req(params).then(res => {
this.ListTableData.data = res.merchants
this.totalCount = res.pagination.totalCount
this.reset(this.merchantSearch)
}).catch(err => {
// console.log(err)
notice.errorTips(err)
console.log('失败-------------')
this.reset(this.merchantSearch)
})
},
saveMerchant(areaInfo) {
this.merchantForm = Object.assign(this.merchantForm, areaInfo)
const params = this.merchantForm
params.methods = bizMethods.Create
params.method = bizMethods.Create
request.req(params).then(res => {
notice.okTips()
this.reset(this.merchantForm)
this.handleAdd()
this.getList()
}).catch(err => {
console.log(err)
notice.errorTips()
notice.errorTips(err)
})
},
// 接口请求-end
......@@ -217,7 +223,7 @@ export default {
this.reset(this.merchantForm)
},
handleAddComfirm(areaInfo) {
this.handleAdd()
// this.handleAdd()
this.saveMerchant(areaInfo)
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!