Commit e8f0f6f9 by cwq0219

修改

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