Commit 7a75763c by 前端

Merge branch 'wuwx_dev_v2.7.0' into 'v2.7.0'

Wuwx dev v2.7.0

See merge request !276
2 parents dd6560ed 16e65659
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div> <div>
<el-input @blur.stop="formatPhone" type="textarea" v-model="phones" :placeholder="placeholder"></el-input> <el-input @blur.stop="formatPhone" type="textarea" v-model="phones" :placeholder="placeholder"></el-input>
<span v-if="isTip" class="approval-tip" style="margin-left:0;">{{ tip }}</span> <span v-if="isTip" class="approval-tip" style="margin-left:0;">{{ tip }}</span>
<div style="width: 672px;"> <div style="width: 565px;">
<div :class="['tel-item', !item.valid ? 'valid-tel' : receiveType == 1 ? 'realTel' : 'realNum']" v-for="(item, index) in phoneLists" :key="index"> <div :class="['tel-item', !item.valid ? 'valid-tel' : receiveType == 1 ? 'realTel' : 'realNum']" v-for="(item, index) in phoneLists" :key="index">
{{ item.tel }} {{ item.tel }}
<i style="cursor:pointer" class="el-icon-close" @click="delPhone(item.tel)"></i> <i style="cursor:pointer" class="el-icon-close" @click="delPhone(item.tel)"></i>
...@@ -74,7 +74,7 @@ export default { ...@@ -74,7 +74,7 @@ export default {
}) })
}) })
this.phoneLists = arr.filter(item => item.tel) this.phoneLists = arr.filter(item => item.tel)
this.$emit('changePhoneList', this.phoneLists) this.$emit('changePhoneList', this.phoneLists, this.phones)
}, },
} }
} }
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<p class="grantType-tip">(根据手机号将礼包中的优惠券直接发放到小程序对应账户的卡包中)</p> <p class="grantType-tip">(根据手机号将礼包中的优惠券直接发放到小程序对应账户的卡包中)</p>
</div> </div>
<div class="approval" slot="receiveDetails"> <div class="approval" slot="receiveDetails">
<phoneArea :phones="phones" :phoneLists="phoneLists" ref="phoneArea" placeholder="请输入领取手机号,多个手机号以换行隔开" /> <phoneArea :phones="phones" :phoneLists="phoneLists" ref="phoneArea" @changePhoneList="changePhoneList" placeholder="请输入领取手机号,多个手机号以换行隔开" />
</div> </div>
</glsx-combi-form> </glsx-combi-form>
<div v-if="routeInfo.addOrEdit != 'add'" class="approval_note_container"> <div v-if="routeInfo.addOrEdit != 'add'" class="approval_note_container">
...@@ -288,7 +288,8 @@ export default { ...@@ -288,7 +288,8 @@ export default {
{ {
label: '库存数量', label: '库存数量',
name: 'stock', name: 'stock',
addHtml: 'stockNumInput' addHtml: 'stockNumInput',
isDisabled: false,
}, },
{ {
label: '审批要求', label: '审批要求',
...@@ -419,9 +420,11 @@ export default { ...@@ -419,9 +420,11 @@ export default {
let idxx = this.editFormData.findIndex(item => item.name == 'approveFlag') let idxx = this.editFormData.findIndex(item => item.name == 'approveFlag')
let idxxx = this.editFormData.findIndex(item => item.name == 'receiveRule') let idxxx = this.editFormData.findIndex(item => item.name == 'receiveRule')
let idxxxx = this.editFormData.findIndex(item => item.name == 'receiveDetails') let idxxxx = this.editFormData.findIndex(item => item.name == 'receiveDetails')
let idxxxxx = this.editFormData.findIndex(item => item.name == 'stock')
this.editFormData[idx].isHide = newValue == 2 this.editFormData[idx].isHide = newValue == 2
this.editFormData[idxx].isHide = newValue == 2 this.editFormData[idxx].isHide = newValue == 2
this.editFormData[idxxx].isHide = newValue == 2 this.editFormData[idxxx].isHide = newValue == 2
this.editFormData[idxxxxx].isHide = newValue == 2
this.editFormData[idxxxx].isHide = newValue == 1 this.editFormData[idxxxx].isHide = newValue == 1
}, },
}, },
...@@ -450,6 +453,10 @@ export default { ...@@ -450,6 +453,10 @@ export default {
}, },
methods: { methods: {
changePhoneList(val,v){
this.phoneLists = val
this.phones = v
},
resetTextArea() { resetTextArea() {
this.phone = '' this.phone = ''
this.phoneList = [] this.phoneList = []
...@@ -590,7 +597,6 @@ export default { ...@@ -590,7 +597,6 @@ export default {
}, },
handleGiftAdd() { handleGiftAdd() {
// console.log(this.couponObj, '')
this.selectedGiftList = JSON.parse(JSON.stringify(this.couponObj)) this.selectedGiftList = JSON.parse(JSON.stringify(this.couponObj))
this.handleGiftClose() this.handleGiftClose()
}, },
...@@ -648,7 +654,7 @@ export default { ...@@ -648,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){
......
...@@ -49,6 +49,11 @@ ...@@ -49,6 +49,11 @@
<span :class="['phone', editForm.receiveWay == 1 ? 'realTel' : 'realNum']" v-for="(item, id) in receiveDetailList" :key="id">{{ item }}</span> <span :class="['phone', editForm.receiveWay == 1 ? 'realTel' : 'realNum']" v-for="(item, id) in receiveDetailList" :key="id">{{ item }}</span>
</div> </div>
</div> </div>
<div slot="phones">
<div v-if="receiveDetailList" class="phone-wrap">
<span :class="['phone', editForm.receiveWay == 1 ? 'realTel' : 'realNum']" v-for="(item, id) in receiveDetailList" :key="id">{{ item }}</span>
</div>
</div>
<div slot="staffListBlock" class="sale-select" v-show="editForm.staffList && editForm.staffList.length != 0"> <div slot="staffListBlock" class="sale-select" v-show="editForm.staffList && editForm.staffList.length != 0">
<div :key="key" class="el-input-tag input-tag-wrapper-detail"> <div :key="key" class="el-input-tag input-tag-wrapper-detail">
<el-tag effect="plain" type="info" v-for="(tag, idx) in editForm.staffList" :key="idx" :disable-transitions="false" @close="handleStaffRemove(tag, idx)"> <el-tag effect="plain" type="info" v-for="(tag, idx) in editForm.staffList" :key="idx" :disable-transitions="false" @close="handleStaffRemove(tag, idx)">
...@@ -147,7 +152,8 @@ export default { ...@@ -147,7 +152,8 @@ export default {
receiveWay: [{ required: true, message: '请选择领取规则', trigger: 'change' }], receiveWay: [{ required: true, message: '请选择领取规则', trigger: 'change' }],
staffList: [{ required: true, message: '请选择发放员工', trigger: 'change' }], staffList: [{ required: true, message: '请选择发放员工', trigger: 'change' }],
approveFlag: [{ required: true, message: '请选择审批要求', trigger: 'change' }], approveFlag: [{ required: true, message: '请选择审批要求', trigger: 'change' }],
stock: [{ required: true, message: '请选择库存数量', trigger: 'change' }] stock: [{ required: true, message: '请选择库存数量', trigger: 'change' }],
phones: [{ required: true, message: '请选择用户手机号', trigger: 'change' }]
}, },
isEdit: true, isEdit: true,
editFormData: [ editFormData: [
...@@ -169,17 +175,20 @@ export default { ...@@ -169,17 +175,20 @@ export default {
{ {
label: '库存数量', label: '库存数量',
name: 'stock', name: 'stock',
type: 'showTxt' type: 'showTxt',
isHide: false
}, },
{ {
label: '审批要求', label: '审批要求',
name: 'approveFlag', name: 'approveFlag',
addHtml: 'approveFlagBlock' addHtml: 'approveFlagBlock',
isHide: false
}, },
{ {
label: '领取规则', label: '领取规则',
name: 'receiveWay', name: 'receiveWay',
addHtml: 'receiveDetails' addHtml: 'receiveDetails',
isHide: false
}, },
{ {
label: '发放员工', label: '发放员工',
...@@ -187,6 +196,12 @@ export default { ...@@ -187,6 +196,12 @@ export default {
addHtml: 'staffListBlock' addHtml: 'staffListBlock'
}, },
{ {
label: '用户手机号',
name: 'phones',
addHtml: 'phones',
isHide: true
},
{
label: '赠送原因', label: '赠送原因',
name: 'giveReason', name: 'giveReason',
type: 'showTxt' type: 'showTxt'
...@@ -214,6 +229,16 @@ export default { ...@@ -214,6 +229,16 @@ export default {
res.data.createdDate = dayjs(res.data.createdDate).format('YYYY-MM-DD HH:mm:ss') res.data.createdDate = dayjs(res.data.createdDate).format('YYYY-MM-DD HH:mm:ss')
res.data.updatedDate = dayjs(res.data.updatedDate).format('YYYY-MM-DD HH:mm:ss') res.data.updatedDate = dayjs(res.data.updatedDate).format('YYYY-MM-DD HH:mm:ss')
this.editForm = res.data this.editForm = res.data
if(res?.data?.grantType==2){
let target = this.editFormData.find(item => item.name == 'stock')
let targets = this.editFormData.find(item => item.name == 'approveFlag')
let targetss = this.editFormData.find(item => item.name == 'receiveWay')
let targetsss = this.editFormData.find(item => item.name == 'phones')
target.isHide = true
targets.isHide = true
targetss.isHide = true
targetsss.isHide = false
}
let arr = [] let arr = []
res.data.receiveDetails && (arr = res.data.receiveDetails.split(',')) res.data.receiveDetails && (arr = res.data.receiveDetails.split(','))
this.receiveDetailList = [...arr] this.receiveDetailList = [...arr]
......
...@@ -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!