Commit 125cf006 by chenwq

去掉error

1 parent 57e9e2cf
......@@ -7,10 +7,10 @@
<div slot="selectProBtn" slot-scope="scope" class="select-pro">
<el-button type="default" @click="handleMutiProClose(scope)">{{ editForm.goodsRefList.length ? '更换商品' : '+选择商品' }}</el-button>
</div>
<div slot="proTable" class="select-pro" style="padding-left: 20px;">
<div slot="proTable" class="select-pro" style="padding-left: 20px">
<GLTable v-show="editForm.goodsRefList.length" :hasPage="false" :tableParams="tableParams" :tableData="editForm.goodsRefList">
<template slot="goodsImage" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage"/>
<img class="img-60" :src="scope.scope.goodsImage" />
</template>
<span slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleProDelete(scope)">删除</el-button>
......@@ -112,7 +112,7 @@ export default {
prop: 'retailPrice'
}
]
},
}
}
},
......@@ -145,7 +145,7 @@ export default {
goodsImage: item.goods.goodsImage
})
})
this.$nextTick(()=>{
this.$nextTick(() => {
this.editStatus = false
})
})
......@@ -174,7 +174,7 @@ export default {
this.$messageBox.confirm('是否删除该商品?', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error',
// type: 'error',
callback: action => {
if (action == 'confirm') {
var idx = this.editForm.goodsRefList.findIndex(item => item.id == obj.scope.id)
......@@ -221,12 +221,13 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.cancelJump()
})
.catch(() => {})
.then(() => {
this.cancelJump()
})
.catch(() => {})
} else {
this.cancelJump()
this.cancelJump()
}
}
}
......
<!-- 编辑代金券 -->
<template>
<div class="edit-share marketing p-t-20 edit-box">
<div class="container edit-container" style="position: relative;">
<div class="container edit-container" style="position: relative">
<div class="right_show">
<div class="card-top"></div>
<div class="card_one">
......@@ -14,17 +14,12 @@
<div class="ctime">
<span class="ctime_name">有效期:</span>
<span class="ctime_content" v-if="editForm.effectiveType == 3">无限制</span>
<span
class="ctime_content"
v-if="editForm.effectiveType == 1"
>{{ editForm.effectiveDays }}天</span>
<span class="ctime_content" v-if="editForm.effectiveType == 1">{{ editForm.effectiveDays }}天</span>
<span class="ctime_content" v-if="editForm.effectiveType == 2">{{ couponTime }}</span>
</div>
<div class="ctime">
<span class="ctime_name">使用限制:</span>
<span
class="ctime_content"
>{{ editForm.useBarriers == 1 ? '无限制' : '满' + editForm.full + '可用' }}</span>
<span class="ctime_content">{{ editForm.useBarriers == 1 ? '无限制' : '满' + editForm.full + '可用' }}</span>
</div>
</div>
<div class="card_two">
......@@ -33,17 +28,7 @@
</div>
</div>
<p class="edit-title">{{ title }}代金券</p>
<glsx-combi-form
class="edit-form-container"
style="min-height: 570px;"
ref="editFormRef"
:isEdit="true"
:isBlock="true"
:formRef="editChildRef"
:formObj="editForm"
:formData="editFormData"
:formRules="editRule"
>
<glsx-combi-form class="edit-form-container" style="min-height: 570px" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="useChannelHtml">
<el-radio v-model="editForm.useChannel" label="1" :disabled="apear != 'couponAdd'">线上商品</el-radio>
<el-radio v-model="editForm.useChannel" label="2" :disabled="apear != 'couponAdd'">到店核销</el-radio>
......@@ -51,68 +36,34 @@
<template slot="effectiveHtml">
<el-radio v-model="editForm.effectiveType" label="3" :disabled="apear != 'couponAdd'">无有效期</el-radio>
<br />
<el-form-item
prop="effectiveTime"
ref="effectiveTime"
style="margin-top: 12px;display: block;"
>
<el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'">
<el-date-picker
v-model="editForm.effectiveTime"
type="daterange"
style="width:295px"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOption"
:disabled="editForm.effectiveType != 2 || apear != 'couponAdd'"
clearable
></el-date-picker>
<el-date-picker v-model="editForm.effectiveTime" type="daterange" style="width: 295px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
</el-radio>
</el-form-item>
<el-form-item prop="effectiveDays" ref="effectiveDays">
<el-radio v-model="editForm.effectiveType" label="1" :disabled="apear != 'couponAdd'">
领取后
<el-input
v-model="editForm.effectiveDays"
style="width:100px;margin-left:5px;margin-right:5px"
:disabled="apear != 'couponAdd' || editForm.effectiveType != 1"
/>天内有效
<el-input v-model="editForm.effectiveDays" style="width: 100px; margin-left: 5px; margin-right: 5px" :disabled="apear != 'couponAdd' || editForm.effectiveType != 1" />
天内有效
</el-radio>
</el-form-item>
</template>
<template slot="useBarriersHtml">
<el-radio v-model="editForm.useBarriers" label="1" :disabled="apear != 'couponAdd'">无限制</el-radio>
<el-form-item prop="full" ref="full">
<el-radio
v-model="editForm.useBarriers"
label="2"
:disabled="apear != 'couponAdd' || editForm.useChannel == 2"
>
<el-radio v-model="editForm.useBarriers" label="2" :disabled="apear != 'couponAdd' || editForm.useChannel == 2">
订单满
<el-input
v-model="editForm.full"
placeholder="输入金额(元)"
style="width: 110px;margin-left:5px;margin-right:5px"
:disabled="apear != 'couponAdd' || editForm.useBarriers != 2"
/>元可用
<el-input v-model="editForm.full" placeholder="输入金额(元)" style="width: 110px; margin-left: 5px; margin-right: 5px" :disabled="apear != 'couponAdd' || editForm.useBarriers != 2" />
元可用
</el-radio>
</el-form-item>
</template>
<template slot="denominationHtml">
<el-input
v-model="editForm.denomination"
style="width: 150px"
:disabled="apear != 'couponAdd'"
@blur.native.capture="editForm.useChannel == 1 && denominationBlur($event)"
>
<el-input v-model="editForm.denomination" style="width: 150px" :disabled="apear != 'couponAdd'" @blur.native.capture="editForm.useChannel == 1 && denominationBlur($event)">
<span slot="append">元</span>
</el-input>
<span
style="color:red;margin-left:15px"
v-if="priceFlag && editForm.useChannel == 1"
>{{ selectedAllProList.length ? '存在零售价低于代金券的商品' : '系统暂无已创建的商品,请先创建好商品后再配置代金券' }}</span>
<span style="color: red; margin-left: 15px" v-if="priceFlag && editForm.useChannel == 1">{{ selectedAllProList.length ? '存在零售价低于代金券的商品' : '系统暂无已创建的商品,请先创建好商品后再配置代金券' }}</span>
</template>
<!-- 只有使用途径为线上商品时才有效,到店核销时屏蔽 -->
<template slot="goodsHtml">
......@@ -125,13 +76,7 @@
<!-- 新增时并且为指定商品时显示,编辑或者查看时也显示 -->
<div slot="proTable" class="select-pro">
<!-- <div style="height:70px" v-if="editForm.goodsRefList.length"></div> -->
<GLTable
v-show="editForm.goodsRefList.length"
:hasPage="false"
:tableParams="tableParams"
:tableData="editForm.goodsRefList"
style="padding-left:10px;margin-right:340px;max-height:350px;overflow:auto;"
>
<GLTable v-show="editForm.goodsRefList.length" :hasPage="false" :tableParams="tableParams" :tableData="editForm.goodsRefList" style="padding-left: 10px; margin-right: 340px; max-height: 350px; overflow: auto">
<template slot="goodsImage" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage" />
</template>
......@@ -141,14 +86,7 @@
</GLTable>
</div>
<template slot="useDescriptionHtml">
<el-input
type="textarea"
v-model="editForm.useDescription"
style="width: 320px"
:autosize="{ minRows: 2, maxRows: 4 }"
maxlength="200"
:disabled="apear == 'couponSee'"
/>
<el-input type="textarea" v-model="editForm.useDescription" style="width: 320px" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="apear == 'couponSee'" />
</template>
</glsx-combi-form>
</div>
......@@ -157,14 +95,7 @@
<el-button v-if="apear != 'couponSee'" @click="handleCancel">取消</el-button>
<el-button v-if="apear == 'couponSee'" @click="handleCancel">返回</el-button>
</div>
<select-muti-pro-forcoupon-dialog
v-if="isMutiSelectVisible"
:isMutiSelectVisible="isMutiSelectVisible"
:searchForm="searchProForm"
:selectedProList="selectedProList"
@handleMutiSelectConfirm="handleMutiSelectConfirm"
@handleMutiSelectClose="handleMutiSelectClose"
></select-muti-pro-forcoupon-dialog>
<select-muti-pro-forcoupon-dialog v-if="isMutiSelectVisible" :isMutiSelectVisible="isMutiSelectVisible" :searchForm="searchProForm" :selectedProList="selectedProList" @handleMutiSelectConfirm="handleMutiSelectConfirm" @handleMutiSelectClose="handleMutiSelectClose"></select-muti-pro-forcoupon-dialog>
</div>
</template>
......@@ -497,7 +428,7 @@ export default {
this.$messageBox.confirm('是否删除该商品?', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error',
// type: 'error',
callback: action => {
if (action == 'confirm') {
var idx = this.editForm.goodsRefList.findIndex(item => item.id == obj.scope.id)
......
......@@ -21,12 +21,12 @@
<div class="banner-upload-box">
<div class="">
<div class="flex">
<div v-show="!subItem.bannerImg" class="activity-img home-img-w-h" style="margin-bottom: 11px;">
<div v-show="!subItem.bannerImg" class="activity-img home-img-w-h" style="margin-bottom: 11px">
<div class="add">+</div>
<span class="number">上传</span>
<input type="file" style="opacity: 0;" ref="file" class="activity-img home-img-w-h" accept="image/png, image/jpeg, image/gif, image/jpg" @change="e => handleImgChange(e, subIndex)" />
<input type="file" style="opacity: 0" ref="file" class="activity-img home-img-w-h" accept="image/png, image/jpeg, image/gif, image/jpg" @change="e => handleImgChange(e, subIndex)" />
</div>
<div v-show="!subItem.bannerImg" style="margin-left: 40px;">
<div v-show="!subItem.bannerImg" style="margin-left: 40px">
<el-button type="text" class="el-icon-delete" @click="handleBannerDelete(subIndex)"></el-button>
</div>
</div>
......@@ -46,15 +46,16 @@
<span>banner链接</span>
<div class="banner-link">
<el-radio-group v-model="subItem.bannerType">
<el-radio v-for="(m, n) in bannerRadioList" :key="n" :label="m.confId">{{m.confName}}</el-radio>
<el-radio v-for="(m, n) in bannerRadioList" :key="n" :label="m.confId">{{ m.confName }}</el-radio>
</el-radio-group>
<div v-show="subItem.bannerType != '0'" class="link-block">
<div v-show="(subItem.bannerType == '1' && !subItem.goodsId) || (subItem.bannerType == '2' && !subItem.imgLinkUrl) || (subItem.bannerType == '3' && !subItem.videoLinkUrl)">
<el-button class="banner-btn" type="primary" :size="size" @click="handleBnnerLinkClick(scope.scope, subIndex)">选择
<el-button class="banner-btn" type="primary" :size="size" @click="handleBnnerLinkClick(scope.scope, subIndex)">
选择
<input v-if="subItem.bannerType == '2'" type="file" ref="file" class="upload-btn" accept="image/png, image/jpeg, image/jpg" @change="e => handleUploadChange(e, item)" />
<input v-if="subItem.bannerType == '3'" type="file" ref="file" class="upload-btn" accept="video/mp4" @change="e => handleUploadVideoChange(e, item)" />
</el-button>
<p class="banner-tips-txt">点击banner后跳转{{subItem.bannerType == '1' ? '商品' : (subItem.bannerType == '2' ? '图文介绍' : '视频介绍')}}</p>
<p class="banner-tips-txt">点击banner后跳转{{ subItem.bannerType == '1' ? '商品' : subItem.bannerType == '2' ? '图文介绍' : '视频介绍' }}</p>
</div>
<!-- 选择商品 -->
<div v-show="subItem.bannerType == '1' && subItem.goodsId" class="flex-grow">
......@@ -103,7 +104,7 @@
</div>
<template slot="customerServerSuffix" slot-scope="scope">
<el-button v-show="!scope.scope.optionList.length" type="text"></el-button>
<p style="color: #5850ff;" @click="handleNoServer">请在首页-跟进专员模块里添加类型为“在线客服”的跟进专员</p>
<p style="color: #5850ff" @click="handleNoServer">请在首页-跟进专员模块里添加类型为“在线客服”的跟进专员</p>
</template>
<!-- <div slot="serviceTable" :style="{ 'margin-left': labelWidth, width: `calc(100% - ${labelWidth} )` }">
<GLTable v-show="editForm.customerServerUserId" :hasPage="false" :tableParams="tableParams" :tableData="customerServerList"></GLTable>
......@@ -111,7 +112,7 @@
</glsx-combi-form>
</div>
</div>
<div class="wechat-container m-r-20" style="margin-top: 59px;">
<div class="wechat-container m-r-20" style="margin-top: 59px">
<div class="wechat-box">
<img class="w-100-per" src="@/assets/phone.png" />
<img class="wechant-back" src="@/assets/home-set.png" />
......@@ -124,11 +125,11 @@
</el-carousel>
</div>
<div class="wechant-notice">
<img class="img-14" src="@/assets/icon_notice.png">
<img class="img-14" src="@/assets/icon_notice.png" />
<span>
<marquee width="200px" height="14px" scrolldelay="160">{{editForm.noticeContent}}</marquee>
<marquee width="200px" height="14px" scrolldelay="160">{{ editForm.noticeContent }}</marquee>
</span>
</div>
</div>
</div>
</div>
</div>
......@@ -137,23 +138,18 @@
</div>
<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">
<glsx-dialog class="server-dialog" title="在线客服" width="712px" :noBtnOk="true" :isVisible.sync="isConsultantVisible" @confirmDialog="handleConsultantConfirm" @closeDialog="handleConsultantClose">
<div class="server-container">
<img src="@/assets/no-server.png"/>
<img src="@/assets/no-server.png" />
<p class="server-txt">系统暂无已创建的在线客服</p>
</div>
<template slot="btn-middle">
<GLButton
type="primary"
:size="size"
fn="创建客服"
@click="handleConsultantConfirm"
>创建客服</GLButton>
<GLButton type="primary" :size="size" fn="创建客服" @click="handleConsultantConfirm">创建客服</GLButton>
</template>
</glsx-dialog>
<el-dialog v-if="isImgVisible" :visible.sync="isImgVisible" class="dialog-look">
<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>
<img v-else class="dialog-img" width="100%" :src="dialogObj.url" alt="" />
</el-dialog>
......@@ -308,7 +304,7 @@ export default {
this.editForm.customerServerUserTitle = tempObj.staffTitle
this.customerServerList.push({
customerServerName: tempObj.staffName,
customerServerUserTitle: tempObj.staffTitle,
customerServerUserTitle: tempObj.staffTitle
})
}
}
......@@ -366,10 +362,10 @@ export default {
imgLinkUrl: '',
videoLinkUrl: ''
}
if(item.bannerType == '2') {
if (item.bannerType == '2') {
params.imgLinkUrl = item.linkUrl
}
if(item.bannerType == '3') {
if (item.bannerType == '3') {
params.videoLinkUrl = item.linkUrl
}
if (item.goods) {
......@@ -397,7 +393,7 @@ export default {
this.$messageBox.confirm('是否删除该banner?', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error',
// type: 'error',
callback: action => {
if (action == 'confirm') {
this.editForm[attrName].splice(subIndex, 1)
......@@ -457,14 +453,14 @@ export default {
handleBnnerLinkClick(targetItem, idx) {
this.curBanner.idx = idx
this.curBanner.targetItem = targetItem
switch(this.editForm.bannerList[idx].bannerType) {
case '1':
switch (this.editForm.bannerList[idx].bannerType) {
case '1':
this.handleSinglePro(targetItem, idx)
break;
break
case '2':
break;
break
case '3':
break;
break
}
},
// banner - 图片上传
......@@ -569,7 +565,7 @@ export default {
linkUrl: '',
goods: {}
})
if(item.bannerType == '1' && item.goodsId) {
if (item.bannerType == '1' && item.goodsId) {
params.bannerList[idx].goodsId = item.goodsId
params.bannerList[idx].goods = {
id: item.goods.id,
......@@ -577,13 +573,13 @@ export default {
goodsImage: item.goods.goodsImage
}
}
if(item.bannerType == '2' && item.imgLinkUrl) {
if (item.bannerType == '2' && item.imgLinkUrl) {
params.bannerList[idx].linkUrl = item.imgLinkUrl
}
if(item.bannerType == '3' && item.videoLinkUrl) {
if (item.bannerType == '3' && item.videoLinkUrl) {
params.bannerList[idx].linkUrl = item.videoLinkUrl
}
if((item.bannerType == '1' && !item.goodsId) || (item.bannerType == '2' && !item.imgLinkUrl) || (item.bannerType == '3' && !item.videoLinkUrl)) {
if ((item.bannerType == '1' && !item.goodsId) || (item.bannerType == '2' && !item.imgLinkUrl) || (item.bannerType == '3' && !item.videoLinkUrl)) {
params.bannerList[idx].bannerType = 0
}
})
......@@ -610,7 +606,7 @@ export default {
position: absolute;
top: 56px;
left: 19px;
border: 1px solid #D8D8D8;
border: 1px solid #d8d8d8;
}
.home-set .wechat-container .wechat-box .wechant-banner-img {
position: absolute;
......@@ -681,8 +677,8 @@ export default {
width: 100%;
height: 72px;
text-align: center;
background-color: #F7F7F7;
border: 1px solid #DCDFE6;
background-color: #f7f7f7;
border: 1px solid #dcdfe6;
}
.home-set .link-block .banner-btn {
position: relative;
......
......@@ -155,7 +155,7 @@ export default {
this.editForm.merchantList.forEach(item => {
item.merchantNo = item.merchantId
})
this.$nextTick(()=>{
this.$nextTick(() => {
this.editStatus = false
})
})
......@@ -178,7 +178,7 @@ export default {
this.$messageBox.confirm('是否删除该门店?', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error',
// type: 'error',
callback: action => {
if (action == 'confirm') {
var idx = this.editForm.merchantList.findIndex(item => item.merchantNo == obj.scope.merchantNo)
......@@ -228,12 +228,13 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.cancelJump()
})
.catch(() => {})
.then(() => {
this.cancelJump()
})
.catch(() => {})
} else {
this.cancelJump()
this.cancelJump()
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!