Commit 16e65659 by wuwx

修复第一轮BUG

1 parent 08a0532e
...@@ -654,7 +654,7 @@ export default { ...@@ -654,7 +654,7 @@ export default {
handleConfirm() { handleConfirm() {
let validItem = this.phoneList.find(item => !item.valid) let validItem = this.phoneList.find(item => !item.valid)
if (validItem && validItem.tel) { if (validItem && validItem.tel && this.editForm.grantType == 1) {
return this.$message.error(`${this.receiveWay == 1 ? '手机号' : '车架号'}${validItem.tel}格式错误,请修改!`) return this.$message.error(`${this.receiveWay == 1 ? '手机号' : '车架号'}${validItem.tel}格式错误,请修改!`)
} }
if(this.editForm.grantType == 2){ if(this.editForm.grantType == 2){
......
...@@ -106,13 +106,13 @@ ...@@ -106,13 +106,13 @@
<div class="approval" slot="bannerToSubMerchant"> <div class="approval" slot="bannerToSubMerchant">
<el-radio v-model="editForm.bannerToSubMerchant" :label="'N'">否</el-radio> <el-radio v-model="editForm.bannerToSubMerchant" :label="'N'">否</el-radio>
<el-radio v-model="editForm.bannerToSubMerchant" :label="'Y'">是</el-radio> <el-radio v-model="editForm.bannerToSubMerchant" :label="'Y'">是</el-radio>
<el-button v-show="editForm.bannerToSubMerchant == 'Y'" type="default" @click="handleRelateStoreClose(scope)">{{ editForm.bannerMerchantList.length ? '更换门店' : '+选择门店' }}</el-button> <el-button v-show="editForm.bannerToSubMerchant == 'Y'" type="default" @click="handleRelateStoreClose('banner')">{{ editForm.bannerMerchantList.length ? '更换门店' : '+选择门店' }}</el-button>
</div> </div>
<!-- 公告管理配置门店 --> <!-- 公告管理配置门店 -->
<div class="approval" slot="noticeToSubMerchant"> <div class="approval" slot="noticeToSubMerchant">
<el-radio v-model="editForm.noticeToSubMerchant" :label="'N'">否</el-radio> <el-radio v-model="editForm.noticeToSubMerchant" :label="'N'">否</el-radio>
<el-radio v-model="editForm.noticeToSubMerchant" :label="'Y'">是</el-radio> <el-radio v-model="editForm.noticeToSubMerchant" :label="'Y'">是</el-radio>
<el-button v-show="editForm.noticeToSubMerchant == 'Y'" type="default" @click="handleRelateStoreCloses(scope)">{{ editForm.noticeMerchantList.length ? '更换门店' : '+选择门店' }}</el-button> <el-button v-show="editForm.noticeToSubMerchant == 'Y'" type="default" @click="handleRelateStoreClose('notice')">{{ editForm.noticeMerchantList.length ? '更换门店' : '+选择门店' }}</el-button>
</div> </div>
<!-- banner管理配置门店 --> <!-- banner管理配置门店 -->
<div slot="merchantTable" class="merchantTable" v-show="editForm.bannerToSubMerchant == 'Y'"> <div slot="merchantTable" class="merchantTable" v-show="editForm.bannerToSubMerchant == 'Y'">
...@@ -223,7 +223,7 @@ ...@@ -223,7 +223,7 @@
</el-row> </el-row>
</relate-store-dialog> </relate-store-dialog>
<!-- 公告管理配置门店 --> <!-- 公告管理配置门店 -->
<relate-store-dialog v-if="relateStoreVisibles" ref="relateStores" :relateStoreVisible="relateStoreVisibles" :storeApi="storeApi" :storeSearchForm="storeSearchForms" :storeSelected="selectedLists" @handleRelateStoreConfirm="handleRelateStoreConfirms" @handleRelateStoreClose="handleRelateStoreCloses"> <!-- <relate-store-dialog v-if="relateStoreVisibles" ref="relateStores" :relateStoreVisible="relateStoreVisibles" :storeApi="storeApi" :storeSearchForm="storeSearchForms" :storeSelected="selectedLists" @handleRelateStoreConfirm="handleRelateStoreConfirms" @handleRelateStoreClose="handleRelateStoreCloses">
<el-row slot> <el-row slot>
<el-form :model="storeSearchForms" ref="relate" :inline="true" label-width="90px"> <el-form :model="storeSearchForms" ref="relate" :inline="true" label-width="90px">
<el-form-item label="商户ID:" prop="merchantId"> <el-form-item label="商户ID:" prop="merchantId">
...@@ -237,7 +237,7 @@ ...@@ -237,7 +237,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </el-row>
</relate-store-dialog> </relate-store-dialog> -->
</div> </div>
</template> </template>
...@@ -250,7 +250,8 @@ export default { ...@@ -250,7 +250,8 @@ export default {
userInfo: {}, userInfo: {},
// 查看大图 // 查看大图
isImgVisible: false, isImgVisible: false,
showGh:false, showGh: false,
state: '',
dialogObj: { dialogObj: {
url: '', url: '',
uploadType: 'img' uploadType: 'img'
...@@ -544,7 +545,7 @@ export default { ...@@ -544,7 +545,7 @@ export default {
this.editForm.clueList = res.clueList.map(k => k.clueId) this.editForm.clueList = res.clueList.map(k => k.clueId)
this.editForm.preferentialPolicy = res.preferentialPolicy this.editForm.preferentialPolicy = res.preferentialPolicy
this.editForm.customerServerUserId = '' this.editForm.customerServerUserId = ''
this.editForm.customerServerType = +res.customerServerType this.editForm.customerServerType = +res.customerServerType || 1
this.editForm.customerServerUrl = res.customerServerUrl this.editForm.customerServerUrl = res.customerServerUrl
this.editForm.bannerToSubMerchant = res.bannerToSubMerchant || 'N' this.editForm.bannerToSubMerchant = res.bannerToSubMerchant || 'N'
this.editForm.noticeToSubMerchant = res.noticeToSubMerchant || 'N' this.editForm.noticeToSubMerchant = res.noticeToSubMerchant || 'N'
...@@ -599,30 +600,40 @@ export default { ...@@ -599,30 +600,40 @@ export default {
}) })
}, },
// 选择门店 // 选择门店
handleRelateStoreClose() { handleRelateStoreClose(v) {
console.log('v',v);
this.state = v
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') {
this.selectedList = this.$common.utils.deepClone(this.editForm.noticeMerchantList)
}
this.relateStoreVisible = !this.relateStoreVisible this.relateStoreVisible = !this.relateStoreVisible
}, },
handleRelateStoreCloses() { // handleRelateStoreCloses() {
this.selectedLists = this.$common.utils.deepClone(this.editForm.noticeMerchantList) // this.selectedLists = this.$common.utils.deepClone(this.editForm.noticeMerchantList)
this.relateStoreVisibles = !this.relateStoreVisibles // this.relateStoreVisibles = !this.relateStoreVisibles
}, // },
handleRelateStoreConfirm(selectedData) { handleRelateStoreConfirm(selectedData) {
if(this.state == 'banner') {
this.editForm.bannerMerchantList = selectedData this.editForm.bannerMerchantList = selectedData
this.selectedList = selectedData } else if(this.state == 'notice') {
this.handleRelateStoreClose()
},
handleRelateStoreConfirms(selectedData) {
this.editForm.noticeMerchantList = selectedData this.editForm.noticeMerchantList = selectedData
this.selectedLists = selectedData }
this.handleRelateStoreCloses() this.selectedList = selectedData
this.handleRelateStoreClose(this.state)
}, },
// handleRelateStoreConfirms(selectedData) {
// this.editForm.noticeMerchantList = selectedData
// this.selectedLists = selectedData
// this.handleRelateStoreCloses()
// },
handleSearchStore() { handleSearchStore() {
this.$refs.relateStore.handleCurrentChange(1) this.$refs.relateStore.handleCurrentChange(1)
}, },
handleSearchStores() { // handleSearchStores() {
this.$refs.relateStores.handleCurrentChange(1) // this.$refs.relateStores.handleCurrentChange(1)
}, // },
handleMerchantDelete(obj) { handleMerchantDelete(obj) {
this.$messageBox.confirm('是否删除该门店?', '删除', { this.$messageBox.confirm('是否删除该门店?', '删除', {
confirmButtonText: '确定', confirmButtonText: '确定',
......
<!-- 分享弹窗 --> <!-- 分享弹窗 -->
<template> <template>
<GLDialog title="分享" mode="mid" okText="关闭" :visible.sync="isShareVisible" :before-close="handleShareClose" @onCancel="handleShareClose" @onOk="handleShareClose"> <GLDialog title="分享" mode="mid" okText="关闭" :visible.sync="isShareVisible" :before-close="handleShareClose" :hasFooter="false">
<div class="share-dialog"> <div class="share-dialog flex">
<div class="flex">
<div class="flex box poster"> <div class="flex box poster">
<div> <div>
<p class="share-txt">海报</p> <p class="share-txt">海报</p>
<!-- <p>小程序码不带参数</p> --> <!-- <p>小程序码不带参数</p> -->
<el-button :size="size" type="primary" @click="handleSaveImg(shareForm.posterUrl)">保存图片</el-button> <img style="width: 170px; height: 271px;" :src="shareForm.posterUrl" />
<el-button style="display: block;margin-top: 16px;" :size="size" type="primary" @click="handleSaveImg(shareForm.posterUrl)">保存图片</el-button>
</div> </div>
<img style="width: 170px; height: 280px;" :src="shareForm.posterUrl" />
</div> </div>
<div class="flex box poster"> <div style="margin-left: 10px;">
<div class="flex box code">
<div> <div>
<p class="share-txt">小程序码</p> <p class="share-txt">小程序码</p>
<!-- <p>小程序码不带参数</p> --> <!-- <p>小程序码不带参数</p> -->
<el-button :size="size" type="primary" @click="handleSaveImg(shareForm.qrCodeUrl)">保存图片</el-button>
</div>
<img style="width: 120px; height: 120px" :src="shareForm.qrCodeUrl" /> <img style="width: 120px; height: 120px" :src="shareForm.qrCodeUrl" />
<el-button style="display: block;margin-top: 16px;" :size="size" type="primary" @click="handleSaveImg(shareForm.qrCodeUrl, '小程序码')">保存图片</el-button>
</div> </div>
</div> </div>
<div class="box page-route"> <div class="box page-route">
<div> <div>
<p class="route-txt">短链</p> <p class="share-txt">短链</p>
<div class="flex"> <div>
<p style="width: 426px;">{{ shareForm.linkUrl }}</p> <p class="link">{{ shareForm.linkUrl }}</p>
<el-button :size="size" type="primary" @click="handleSaveTxt(shareForm.linkUrl)">复制链接</el-button> <el-button style="display: block;margin-top: 16px;" :size="size" type="primary" @click="handleSaveTxt(shareForm.linkUrl)">复制链接</el-button>
<!-- <p>链接是直播间原始页面路径,如需加入参数,详见使用方法</p> --> <!-- <p>链接是直播间原始页面路径,如需加入参数,详见使用方法</p> -->
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
</GLDialog> </GLDialog>
</template> </template>
...@@ -55,11 +55,11 @@ export default { ...@@ -55,11 +55,11 @@ export default {
mounted() { }, mounted() { },
methods: { methods: {
handleSaveImg(url) { handleSaveImg(url, downloadTxt = '海报') {
var alink = document.createElement('a') var alink = document.createElement('a')
alink.href = url alink.href = url
alink.setAttribute('target', '_blank') alink.setAttribute('target', '_blank')
alink.download = '海报' alink.download = downloadTxt
alink.click() alink.click()
alink.remove() alink.remove()
}, },
...@@ -84,27 +84,35 @@ export default { ...@@ -84,27 +84,35 @@ export default {
</script> </script>
<style scoped> <style scoped>
.share-dialog .box { .share-dialog .box {
background: #f7f7f7; background: #F8F8F8;
border-radius: 6px; border-radius: 2px;
padding: 30px; padding: 20px;
} }
.share-dialog .poster { .share-dialog .poster {
width: 43%; width: 295px;
height: 425px;
} }
.share-dialog .poster img { .share-dialog .code {
width: 180px; width: 295px;
height: 297px; height: 194px;
margin-left: 45px;
} }
.share-dialog .page-route { .share-dialog .page-route {
margin-top: 16px; margin-top: 10px;
width: 295px;
height: 179px;
} }
.share-dialog .page-route .route-txt { .share-dialog .page-route .link {
font-weight: bold; width: 295px;
padding-bottom: 10px; font-family: PingFangSC-Medium;
font-size: 14px;
color: #5092FF;
font-weight: 500;
} }
.share-dialog .share-txt { .share-dialog .share-txt {
font-weight: bold; font-family: PingFangSC-Medium;
margin-bottom: 50px; font-size: 14px;
color: #333;
font-weight: 500;
margin-bottom: 8px;
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!