Commit 410fa059 by chenwq

首页设置-弹窗

1 parent 87da18c1
......@@ -187,37 +187,38 @@
</GLFooter>
<select-single-pro-dialog v-if="isSingleSelectVisible" :isSingleSelectVisible="isSingleSelectVisible" :selectedProInfo="selectedProInfo" @handleSingleSelectConfirm="handleSingleSelectConfirm" @handleSingleSelectClose="handleSingleSelectClose"></select-single-pro-dialog>
<!-- 在线客服 -->
<glsx-dialog class="server-dialog" title="在线客服" width="712px" :noBtnOk="true" :isVisible.sync="isConsultantVisible" @confirmDialog="handleConsultantConfirm" @closeDialog="handleConsultantClose">
<GLDialog class="server-dialog" title="在线客服" mode="mid" :visible.sync="isConsultantVisible" @onOk="handleConsultantConfirm" @onCancel="handleConsultantClose">
<div class="server-container">
<img src="@/assets/no-server.png" />
<p class="server-txt">系统暂无已创建的在线客服</p>
</div>
<template slot="btn-middle">
<template slot="footer">
<el-button size="small" @click="handleConsultantClose">取 消</el-button>
<GLButton type="primary" :size="size" fn="创建客服" @click="handleConsultantConfirm">创建客服</GLButton>
</template>
</glsx-dialog>
<el-dialog v-if="isImgVisible" :visible.sync="isImgVisible" class="dialog-look">
</GLDialog>
<GLDialog v-if="isImgVisible" bigTitle="查看" mode="big" :visible.sync="isImgVisible" class="dialog-look" :hasFooter="false">
<video v-if="dialogObj.uploadType == 'video'" class="dialog-video" controls>
<source :src="dialogObj.url" type="video/mp4" />
</video>
<img v-else class="dialog-img" width="100%" :src="dialogObj.url" alt="" />
</el-dialog>
</GLDialog>
<!-- banner管理配置门店 -->
<relate-store-dialog v-if="relateStoreVisible" ref="relateStore" :relateStoreVisible="relateStoreVisible" :storeApi="storeApi" :storeSearchForm="storeSearchForm" :storeSelected="selectedList" @handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose">
<el-row slot>
<el-form :model="storeSearchForm" ref="relate" :inline="true" label-width="90px">
<el-form-item label="商户ID:" prop="merchantId">
<el-input :size="size" v-model.trim="storeSearchForm.merchantId" placeholder="请输入商户ID" clearable></el-input>
</el-form-item>
<el-form-item label="门店名称:" prop="merchantName">
<el-input :size="size" v-model.trim="storeSearchForm.merchantName" placeholder="请输入门店名称" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button :size="size" type="primary" @click="handleSearchStore">搜索</el-button>
</el-form-item>
</el-form>
</el-row>
</relate-store-dialog>
<el-row slot>
<el-form :model="storeSearchForm" ref="relate" :inline="true" label-width="90px">
<el-form-item label="商户ID:" prop="merchantId">
<el-input :size="size" v-model.trim="storeSearchForm.merchantId" placeholder="请输入商户ID" clearable></el-input>
</el-form-item>
<el-form-item label="门店名称:" prop="merchantName">
<el-input :size="size" v-model.trim="storeSearchForm.merchantName" placeholder="请输入门店名称" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button :size="size" type="primary" @click="handleSearchStore">搜索</el-button>
</el-form-item>
</el-form>
</el-row>
</relate-store-dialog>
</div>
</template>
......@@ -259,7 +260,7 @@ export default {
// }
// ]
// },
// 选择门店
// 选择门店
relateStoreVisible: false,
relateStoreVisibles: false,
storeApi: this.$apis.common.getSimpleMerchantList,
......@@ -409,9 +410,9 @@ export default {
title: '在线客服',
editFormData: [
{
label: '在线客服',
name: '',
addHtml: 'customerServerUserId'
label: '在线客服',
name: '',
addHtml: 'customerServerUserId'
}
]
}
......@@ -442,7 +443,7 @@ export default {
this.getInfo()
this.getConsultant()
// 非集团账号隐藏配置门店
if(!this.$isGroupUp){
if (!this.$isGroupUp) {
let idx = this.externalFormList.findIndex(item => item.title == 'Banner管理')
let idxx = this.externalFormList[idx].editFormData.findIndex(item => item.name == 'bannerToSubMerchant')
let idxxx = this.externalFormList.findIndex(item => item.title == '公告管理')
......@@ -455,25 +456,25 @@ export default {
},
methods: {
selectAddAttr(value){
var tempObj = {
customerServerName: '',
customerServerUserTitle: ''
}
this.customerServerList = []
this.editForm.customerServerId = ''
this.editForm.customerServerName = ''
this.editForm.customerServerUserTitle = ''
if (value) {
tempObj = this.baseData.consultantList.find(item => item.userOneid == value)
this.editForm.customerServerId = tempObj.id
this.editForm.customerServerName = tempObj.staffName
this.editForm.customerServerUserTitle = tempObj.staffTitle
this.customerServerList.push({
customerServerName: tempObj.staffName,
customerServerUserTitle: tempObj.staffTitle
})
}
selectAddAttr(value) {
var tempObj = {
customerServerName: '',
customerServerUserTitle: ''
}
this.customerServerList = []
this.editForm.customerServerId = ''
this.editForm.customerServerName = ''
this.editForm.customerServerUserTitle = ''
if (value) {
tempObj = this.baseData.consultantList.find(item => item.userOneid == value)
this.editForm.customerServerId = tempObj.id
this.editForm.customerServerName = tempObj.staffName
this.editForm.customerServerUserTitle = tempObj.staffTitle
this.customerServerList.push({
customerServerName: tempObj.staffName,
customerServerUserTitle: tempObj.staffTitle
})
}
},
getInfo() {
this.$apis.homeSet.getHomeInfoListApi({}).then(res => {
......@@ -541,19 +542,19 @@ export default {
// 选择门店
handleRelateStoreClose(v) {
this.state = v
if(v == 'banner') {
this.selectedList = this.$common.utils.deepClone(this.editForm.bannerMerchantList)
} else if(v == 'notice') {
this.selectedList = this.$common.utils.deepClone(this.editForm.noticeMerchantList)
if (v == 'banner') {
this.selectedList = this.$common.utils.deepClone(this.editForm.bannerMerchantList)
} else if (v == 'notice') {
this.selectedList = this.$common.utils.deepClone(this.editForm.noticeMerchantList)
}
this.relateStoreVisible = !this.relateStoreVisible
},
handleRelateStoreConfirm(selectedData) {
console.log('selectedData',selectedData);
if(this.state == 'banner') {
this.editForm.bannerMerchantList = selectedData
} else if(this.state == 'notice') {
this.editForm.noticeMerchantList = selectedData
console.log('selectedData', selectedData);
if (this.state == 'banner') {
this.editForm.bannerMerchantList = selectedData
} else if (this.state == 'notice') {
this.editForm.noticeMerchantList = selectedData
}
this.selectedList = selectedData
this.handleRelateStoreClose(this.state)
......@@ -600,7 +601,7 @@ export default {
this.$messageBox.confirm('是否删除该banner?', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
// type: 'error',
type: 'warning',
callback: action => {
if (action == 'confirm') {
this.editForm[attrName].splice(subIndex, 1)
......@@ -792,31 +793,31 @@ export default {
})
// banner管理配置门店
params.bannerMerchantList = []
if(this.editForm.bannerToSubMerchant == 'Y') {
this.editForm.bannerMerchantList.forEach(item => {
params.bannerMerchantList.push({
merchantId: item.merchantNo,
merchantName: item.merchantName,
merchantAccountLevel: item.merchantAccountLevel
})
})
if (this.editForm.bannerToSubMerchant == 'Y') {
this.editForm.bannerMerchantList.forEach(item => {
params.bannerMerchantList.push({
merchantId: item.merchantNo,
merchantName: item.merchantName,
merchantAccountLevel: item.merchantAccountLevel
})
})
}
// 公告管理配置门店
params.noticeMerchantList = []
if(this.editForm.noticeToSubMerchant == 'Y') {
this.editForm.noticeMerchantList.forEach(item => {
params.noticeMerchantList.push({
merchantId: item.merchantNo,
merchantName: item.merchantName,
merchantAccountLevel: item.merchantAccountLevel
})
})
if (this.editForm.noticeToSubMerchant == 'Y') {
this.editForm.noticeMerchantList.forEach(item => {
params.noticeMerchantList.push({
merchantId: item.merchantNo,
merchantName: item.merchantName,
merchantAccountLevel: item.merchantAccountLevel
})
})
}
// 金刚区管理
params.clueList = this.editForm.clueList.length
? this.editForm.clueList.map(k => {
return { clueId: k }
})
return { clueId: k }
})
: []
console.log(params)
this.$apis.homeSet.updateHomeApi(params).then(res => {
......@@ -967,9 +968,9 @@ export default {
height: 20px;
font-size: 16px;
}
.home-set .server-dialog .el-dialog__footer {
/* .home-set .server-dialog .el-dialog__footer {
text-align: center;
}
} */
.merchantTable {
width: 800px;
margin-left: 45px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!