Commit 410fa059 by chenwq

首页设置-弹窗

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