Commit efbda333 by cwq0219
2 parents 46336351 634f1533
......@@ -210,6 +210,15 @@ const getActivity = params => {
sign: true
})
}
const nameVaild = params => {
params.method = 'entmicro.api.one.template.name.valid'
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
export default {
customerList,
customerGroupList,
......@@ -231,5 +240,6 @@ export default {
getCard,
getCoupon,
getPackage,
getActivity
getActivity,
nameVaild
}
......@@ -13,6 +13,16 @@ const getRecordListApi = params => {
sign: true
})
}
const getVerificationCode=params=>{
params.method = `scrm.api.coupon.verification.code.verification`
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
// const auditGoodApi = params => {
// params.method = `${defaultPath}audit.goods`
......@@ -78,4 +88,4 @@ const getRecordListApi = params => {
// })
// }
export { getRecordListApi }
export { getRecordListApi,getVerificationCode }

18.6 KB | W: | H:

19.6 KB | W: | H:

src/assets/guestCustom/activity-logo.png
src/assets/guestCustom/activity-logo.png
src/assets/guestCustom/activity-logo.png
src/assets/guestCustom/activity-logo.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -2,27 +2,6 @@
<template>
<div class="edit-share marketing p-t-20 edit-box">
<div class="container edit-container" style="position: relative;">
<!-- <div class="right_show">
<div class="card-top"></div>
<div class="card-middle">
<div>
<span class="cname">{{ editForm.couponName }}</span>
<span class="ctype"><span class="ctypeName">代金券</span></span>
</div>
<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 == 2">{{ couponTime }}</span>
</div>
<div class="ctime">
<span class="ctime_name">使用限制:</span>
<span class="ctime_content">{{ editForm.useBarriers == 1 ? '无限制' : '满' + editForm.full + '可用' }}</span>
</div>
<div class="cremarks">使用说明:</div>
<div class="cremarks_content">{{ editForm.useDescription }}</div>
</div>
</div> -->
<div class="right_show">
<div class="card-top"></div>
<div class="card_one">
......@@ -55,12 +34,12 @@
<template slot="effectiveHtml">
<el-radio v-model="editForm.effectiveType" label="3" :disabled="apear != 'couponAdd'">无有效期</el-radio>
<br />
<el-form-item prop="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" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
</el-radio>
</el-form-item>
<el-form-item prop="effectiveDays">
<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" />
......@@ -70,7 +49,7 @@
</template>
<template slot="useBarriersHtml">
<el-radio v-model="editForm.useBarriers" label="1" :disabled="apear != 'couponAdd'">无限制</el-radio>
<el-form-item prop="full">
<el-form-item prop="full" ref="full">
<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" />
......@@ -93,9 +72,9 @@
</el-radio>
</template>
<!-- 新增时并且为指定商品时显示,编辑或者查看时也显示 -->
<div slot="proTable" class="select-pro" v-if="apear != 'couponAdd' || (editForm.useChannel == 1 && editForm.goods == 2)" style="margin-left:10px">
<div style="height:110px" v-if="editForm.goodsRefList.length"></div>
<GLTable v-show="editForm.goodsRefList.length" :hasPage="false" :tableParams="tableParams" :tableData="editForm.goodsRefList">
<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;padding-right:10px">
<template slot="goodsImage" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage" />
</template>
......@@ -188,7 +167,7 @@ export default {
couponName: [{ required: true, message: '请输入优惠券名称', trigger: 'change' }],
effectiveType: [{ required: true, message: '请选择有效期', trigger: 'change' }],
effectiveTime: [{ required: true, message: '有效期不能为空', trigger: 'change' }],
effectiveDays: [{ required: true, message: '有效天数不能为空', trigger: 'blur' }],
effectiveDays: [{ required: true, message: '有效天数不能为空', trigger: 'change' }],
useBarriers: [{ required: true, message: '请选择使用限制', trigger: 'change' }],
full: [{ required: true, message: '门槛数值不能为空', trigger: 'blur' }],
denomination: [{ required: true, message: '面值不能为空', trigger: 'change' }],
......@@ -239,7 +218,8 @@ export default {
{
// label: '门店',
name: '',
addHtml: 'proTable'
addHtml: 'proTable',
isHide: true
},
{
label: '使用说明',
......@@ -289,7 +269,7 @@ export default {
this.editForm.stock = limitPrice(newValue, oldValue, 6, 0, 1)
},
'editForm.effectiveTime'(newValue, oldValue) {
if (newValue && newValue.length > 0) {
if (newValue && newValue.length == 2) {
this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
} else {
this.couponTime = ''
......@@ -303,46 +283,58 @@ export default {
'editForm.useChannel'(newValue, oldValue) {
if (newValue == 1) {
this.editFormData[6].isHide = false
if (this.editForm.goodsRefList.length) {
this.editFormData[7].isHide = false
}
} else {
this.editForm.useBarriers = '1'
this.editForm.full = ''
this.editFormData[6].isHide = true
this.editFormData[7].isHide = true
}
},
'editForm.goods'(newValue, oldValue) {
if (newValue == 1) {
//全部商品
// var goods = this.selectedAllProList
// if(goods && goods.length > 0){
// this.minPirce = goods[0].retailPrice
// goods.forEach((item, index) => {
// if(item.retailPrice < this.minPirce){
// this.minPirce = item.retailPrice
// }
// })
// }else{
// this.priceFlag = true
// }
this.minPirce = this.minPirceForAll
this.editFormData[7].isHide = true
} else {
//指定商品
// var goods2 = this.editForm.goodsRefList
// if(goods2 && goods2.length > 0){
// this.minPirce = goods2[0].retailPrice*100
// goods2.forEach((item, index) => {
// var retailPrice = item.retailPrice*100
// if(retailPrice < this.minPirce){
// this.minPirce = retailPrice
// }
// })
// }
this.minPirce = this.minPirceForPart
if (this.editForm.goodsRefList.length) {
this.editFormData[7].isHide = false
}
}
if (this.editForm.denomination && this.minPirce && this.editForm.denomination * 100 > this.minPirce) {
this.priceFlag = true
} else {
this.priceFlag = false
}
},
'editForm.goodsRefList'(newValue, oldValue) {
if (newValue.length) {
this.editFormData[7].isHide = false
} else {
this.editFormData[7].isHide = true
}
},
'editForm.effectiveType'(newValue, oldValue) {
if (newValue == 3) {
this.$refs['effectiveTime'].resetField()
this.$refs['effectiveDays'].resetField()
} else if (newValue == 2) {
this.$refs['effectiveDays'].resetField()
} else if (newValue == 1) {
this.$refs['effectiveTime'].resetField()
}
},
'editForm.useBarriers'(newValue, oldValue) {
if (newValue == 1) {
this.$refs['full'].resetField()
}
}
},
......@@ -369,12 +361,6 @@ export default {
const goods = this.$common.utils.deepClone(res.list)
this.selectedAllProList = goods
if (goods && goods.length > 0) {
// this.minPirce = goods[0].retailPrice
// goods.forEach((item, index) => {
// if(item.retailPrice < this.minPirce){
// this.minPirce = item.retailPrice
// }
// })
this.minPirceForAll = goods[0].retailPrice
goods.forEach((item, index) => {
if (item.retailPrice < this.minPirceForAll) {
......@@ -393,31 +379,11 @@ export default {
this.handleMutiSelectClose()
},
// handleConfigSearch(){
// this.getAllGoods(this.searchProForm.name)
// },
// handleConfigReset(){
// this.getAllGoods()
// },
handleMutiSelectConfirm(selectedData) {
this.editForm.goodsRefList = selectedData
/** 选择指定商品时,面值最小值的判断区域应该在已选商品内 start*/
var goods = this.editForm.goodsRefList
// this.minPirce = goods[0].retailPrice*100
// goods.forEach((item, index) => {
// var retailPrice = item.retailPrice*100
// if(retailPrice < this.minPirce){
// this.minPirce = retailPrice
// }
// })
// if(this.editForm.denomination && this.editForm.denomination*100 > this.minPirce){
// this.priceFlag = true
// }else{
// this.priceFlag = false
// }
this.minPirceForPart = goods[0].retailPrice * 100
goods.forEach((item, index) => {
var retailPrice = item.retailPrice * 100
......
......@@ -50,12 +50,12 @@
<p class="edit-title">{{ title }}折扣劵</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="effectiveHtml">
<el-form-item prop="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" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
</el-radio>
</el-form-item>
<el-form-item prop="effectiveDays">
<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" />
......@@ -182,11 +182,18 @@ export default {
this.editForm.stock = limitPrice(newValue, oldValue, 6, 0, 1)
},
'editForm.effectiveTime'(newValue, oldValue) {
if (newValue && newValue.length > 0) {
if (newValue && newValue.length == 2) {
this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
} else {
this.couponTime = ''
}
},
'editForm.effectiveType'(newValue, oldValue) {
if (newValue == 2) {
this.$refs['effectiveDays'].resetField()
} else if (newValue == 1) {
this.$refs['effectiveTime'].resetField()
}
}
},
......
......@@ -29,12 +29,12 @@
<p class="edit-title">{{ title }}兑换券</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="effectiveHtml">
<el-form-item prop="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" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
</el-radio>
</el-form-item>
<el-form-item prop="effectiveDays">
<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" />
......@@ -161,11 +161,18 @@ export default {
this.editForm.stock = limitPrice(newValue, oldValue, 6, 0, 1)
},
'editForm.effectiveTime'(newValue, oldValue) {
if (newValue && newValue.length > 0) {
if (newValue && newValue.length == 2) {
this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
} else {
this.couponTime = ''
}
},
'editForm.effectiveType'(newValue, oldValue) {
if (newValue == 2) {
this.$refs['effectiveDays'].resetField()
} else if (newValue == 1) {
this.$refs['effectiveTime'].resetField()
}
}
},
......
......@@ -282,7 +282,10 @@ export default {
addLoading: false,
eventBus: new Vue(),
basicForm: {
condition: {}
selectType: 1,
condition: {
sex: ''
}
},
basicRules: {
userList: [
......
......@@ -14,7 +14,7 @@
label-width="120px"
>
<el-form-item label="群聊名称" prop="massName">
<el-input v-model="basicForm.massName" placeholder="群发名称仅内部可见" maxlength="10"></el-input>
<el-input v-model="basicForm.massName" placeholder="群发名称仅内部可见,且不可重复" maxlength="10"></el-input>
</el-form-item>
<el-form-item prop="userList">
<label slot="label" class="required">选择群主</label>
......@@ -169,6 +169,19 @@ export default {
}
}
}
const nameVaild = (rule, value, callback) => {
console.log(value)
if (value) {
this.$apis.customerTransform.nameVaild({ templateName: value }).then(res => {
console.log(res)
if (res) {
callback(new Error('群聊名称不可重复'))
} else {
callback()
}
})
}
}
return {
addLoading: false,
eventBus: new Vue(),
......@@ -178,7 +191,10 @@ export default {
// { required: true, message: '请选择群发账号', trigger: 'blur' },
{ validator: validatorUser, trigger: 'change' }
],
massName: [{ required: true, message: '请输入群聊名称', trigger: 'blur' }],
massName: [
{ required: true, message: '请输入群聊名称', trigger: 'blur' },
{ validator: nameVaild, trigger: 'blur' }
],
attachmentList: [
// { required: true, message: '请输入入群欢迎语' },
{ validator: validatorAttachment, trigger: 'change' }
......
......@@ -230,6 +230,9 @@ export default {
line-height: 24px;
}
/deep/ {
.el-pager {
height: 30px;
}
.el-checkbox:last-of-type {
margin-right: 8px;
}
......@@ -276,7 +279,8 @@ export default {
display: grid;
grid-template-columns: repeat(4, 25%);
grid-row-gap: 10px;
height: 38vh;
max-height: 35vh;
min-height: 35vh;
padding: 10px;
overflow: auto;
text-align: center;
......
......@@ -8,7 +8,7 @@
<div class="detail-label">创建者:</div>
<div class="detail-value">{{basicInfo.createdName ? basicInfo.createdName : '-'}}</div>
</div>
<div class="detail-item">
<div class="detail-item" v-show="form == 'customer'">
<div class="detail-label">群发类型:</div>
<div class="detail-value">{{basicInfo.sendType == 1 ? '立即发送': '定时发送'}}</div>
</div>
......@@ -16,9 +16,9 @@
<div class="detail-label">发送状态:</div>
<div class="detail-value">{{STATUS_TYPE[basicInfo.status]}}</div>
</div>
<div class="detail-item" v-show="form == 'customer' && basicInfo.sendType == 2">
<div class="detail-item">
<div class="detail-label">发送时间:</div>
<div class="detail-value">{{basicInfo.sendTime}}</div>
<div class="detail-value">{{basicInfo.sendTime ? basicInfo.sendTime : '--'}}</div>
</div>
<div class="detail-item">
<div class="detail-label">群发对象:</div>
......@@ -50,7 +50,7 @@
<div class="statistics-li">
<div class="statistics-number">
<span>{{form == 'customer' ? statistic.senderCustomerCount :statistic.senderGroupCount}}</span>
人
{{form == 'customer' ? '人' : '个'}}
</div>
<div class="statistics-text">送达{{form == 'customer' ? '客户': '群聊'}}</div>
</div>
......@@ -66,7 +66,7 @@
<div class="statistics-li">
<div class="statistics-number">
<span>{{form == 'customer' ?statistic.unSenderCustomerCount:statistic.unSenderGroupCount}}</span>
人
{{form == 'customer' ? '人' : '个'}}
</div>
<div class="statistics-text">未送达{{form == 'customer' ? '客户': '群聊'}}</div>
</div>
......@@ -93,6 +93,8 @@ const STATUS = {
'1': '发送成功',
'2': '发送失败'
}
import * as dayjs from 'dayjs'
import Preview from '../components/preview.vue'
export default {
name: 'BasicInof',
......@@ -117,6 +119,7 @@ export default {
this.$apis.customerTransform.customerDetail({ id }).then(res => {
console.log(res)
this.basicInfo = res
// this.basicInfo.sendTime = dayjs(this.basicInfo.sendTime).format('YYYY-MM-DD HH:mm:ss')
const previewList = res.attachmentList.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
return item
......
......@@ -3,13 +3,13 @@
<div class="preview-content">
<div class="preview-time">{{ currentTime }}</div>
<div class="preview-info" v-for="item in previewList" :key="item.id">
<img class="avatar" src="@/assets/logo.png" alt />
<img class="avatar" src="@/assets/guestCustom/default-customer.png" alt />
<template v-if="item.attType == 1">
<div class="preview-text text">{{ item.attContent }}</div>
</template>
<template v-else-if="item.attType == 7">
<div class="preview-activity">
<img class="applet-logo" src="@/assets/guestCustom/applet-logo.png" alt />
<!-- <img class="applet-logo" src="@/assets/guestCustom/applet-logo.png" alt /> -->
<div class="activity-name">{{item.attContent.marketingName}}</div>
<img class="activity-logo" src="@/assets/guestCustom/activity-logo.png" alt />
<div class="activity-footer">
......
......@@ -318,6 +318,8 @@ export default {
}
.customer-table {
display: flex;
margin-top: 0;
margin-left: 10px;
&.send {
width: 70px;
}
......
......@@ -24,6 +24,7 @@
</div>
<!-- 表格区域 开始 -->
<GLTable
:key="key"
ref="customer"
:getListApi="customerList"
:tableParams="gueastTableParams"
......@@ -60,6 +61,7 @@
</div>
<!-- 表格区域 开始 -->
<GLTable
:key="groupKey"
ref="customerGroup"
:getListApi="customerGroupList"
:tableParams="gueastGroupTableParams"
......@@ -99,7 +101,7 @@ export default {
}
return {
ATT_TYPE,
activeIndex: '1',
activeIndex: 1,
gueastTableParams: {
listName: 'data',
tableOption: false,
......@@ -125,14 +127,14 @@ export default {
label: '发送时间',
prop: 'sendTime',
width: 160,
line: 2,
formatter: cellValue => {
if (cellValue.sendTime) {
return dayjs(cellValue.sendTime).format('YYYY-MM-DD HH:mm:ss')
} else {
return ''
}
}
line: 2
// formatter: cellValue => {
// if (cellValue.sendTime) {
// return dayjs(cellValue.sendTime).format('YYYY-MM-DD HH:mm:ss')
// } else {
// return ''
// }
// }
},
{
label: '已发送员工',
......@@ -185,6 +187,13 @@ export default {
prop: 'sendTime',
width: 150,
line: 2
// formatter: cellValue => {
// if (cellValue.sendTime) {
// return dayjs(cellValue.sendTime).format('YYYY-MM-DD HH:mm:ss')
// } else {
// return ''
// }
// }
},
{
label: '已发送群主',
......@@ -192,7 +201,7 @@ export default {
line: 2
},
{
label: '已送达群聊',
label: '送达群聊',
prop: 'sendCustomerNum',
line: 2
},
......@@ -213,7 +222,9 @@ export default {
addHtml: 'optionBtns'
}
]
}
},
key: new Date(),
groupKey: new Date()
}
},
beforeRouteEnter(to, from, next) {
......@@ -225,11 +236,13 @@ export default {
},
methods: {
switchMenu(val) {
this.activeIndex = val
this.$nextTick(() => {
this.activeIndex = val
if (val == 1) {
this.key = new Date()
if (this.$refs.customer) this.$refs.customer.refreshTable()
} else {
this.groupKey = new Date()
if (this.$refs.customerGroup) this.$refs.customerGroup.refreshTable()
}
})
......
......@@ -269,6 +269,9 @@ export default {
}
this.getCardContentFun()
},
mounted () {
},
methods: {
oninput(value) {
let str = value
......
......@@ -58,7 +58,9 @@ export default {
this.$router.push('/memberCenter/center')
},
mounted() {},
mounted() {
},
methods: {
tabClick(index) {
......
......@@ -146,7 +146,9 @@ export default {
}
}
},
mounted () {
},
methods: {
tabClick(index) {
this.currentIndex = index
......
......@@ -94,7 +94,7 @@ export default {
// this.setTableData()
},
mounted() {
document.querySelector(".el-tabs").style.display="none"
this.$nextTick(() => {
let clientHeight = document.documentElement.clientHeight
let offsettop = document.getElementById('tableWrap').offsetTop
......@@ -125,7 +125,7 @@ export default {
console.log(this.detail, 'gggg')
// this.$router.go(-1)
this.$router.push("/memberCenter/order")
document.querySelector(".el-tabs").style.display="block"
}
}
}
......
......@@ -30,7 +30,8 @@
<el-date-picker :size="size" v-model="searchForm.daterange" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions || {}"></el-date-picker>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-form-item size="small" style="float: right">
<el-button :size="size" type="primary" @click="openDialog">核销</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" @click="handleReset">重置</el-button>
</el-form-item>
......@@ -42,18 +43,39 @@
<span>{{ dateFormatFun(scope.scope.verificationTime) }}</span>
</span>
</GLTable>
<glsx-dialog title="优惠券核销(请确保用户到店后核销,避免引起不必要问题)" :hasScroll="false" width="580px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleConfirm">
<div class="content-body">
<el-form :rules="rules" ref="ruleForm" :model="ruleForm" label-width="80px">
<!-- style="width: 440px" -->
<el-form-item size="small" label="核销码" prop="verficationCode" style="width: 380px">
<el-input size="small" v-model.trim="ruleForm.verficationCode" maxlength="50" placeholder="请输入核销码"></el-input>
</el-form-item>
</el-form>
</div>
</glsx-dialog>
</div>
</div>
</template>
<script>
import { getRecordListApi } from '@/api/modules/record'
import glsxDialog from '@/components/glsx-dialog'
import { getRecordListApi,getVerificationCode } from '@/api/modules/record'
import url from "@/assets/empty.png"
import { dateFormat } from '@/utils/index.js'
export default {
name: 'record',
components: {
glsxDialog
},
data() {
return {
ruleForm: {
verficationCode: ''
},
isDialogVisible: false,
rules: {
verficationCode: [{ required: true, message: '请输入核销码', trigger: 'blur' }]
},
url:url,
isReload:true,
pickerOptions: {
......@@ -71,7 +93,8 @@ export default {
userReq: '',
verificationOperator: '',
orderCode: '',
merchantId: 0
merchantId: 0,
discountTypes: [7]
},
// 44187877
searchFormTable: {},
......@@ -166,7 +189,30 @@ export default {
}
})
},
openDialog() {
this.isDialogVisible = true
},
handleClose() {
this.isDialogVisible = !this.isDialogVisible
this.$refs.ruleForm.resetFields()
},
handleConfirm() {
// getRecordListApi
this.$refs['ruleForm'].validate(valid => {
if (!valid) {
return
}
let params = {}
params.verficationCode = this.ruleForm.verficationCode
// params.discountTypes=[7]
getVerificationCode(params).then(res => {
if (res) {
this.handleClose()
this.handleSearch()
}
})
})
},
// 1-新增;2-编辑
handleEdit(addOrEdit, row) {
// console.log(row)
......@@ -192,7 +238,7 @@ export default {
// this.searchForm = { merchantId: 44184606 }
// this.handleSearch()
this.isReload=false
this.searchForm={ merchantId: this.merchantId }
this.searchForm={ merchantId: this.merchantId ,discountTypes: [7]}
this.$nextTick(()=>{
this.isReload=true
})
......@@ -214,4 +260,24 @@ export default {
.el-range-editor--small.el-input__inner {
width: 215px;
}
/deep/.el-dialog__header {
padding-top: 20px;
padding-bottom: 20px;
}
/deep/ .el-dialog__body {
border-bottom: 1px solid #e6e6e6;
border-top: 1px solid #e6e6e6;
padding: 30px 20px;
.content-body {
.el-input--small .el-input__inner {
width:300px
}
}
}
/deep/ .el-dialog__footer {
// text-align: center;
padding-top: 12px;
padding-bottom: 12px;
}
</style>
......@@ -133,6 +133,9 @@ export default {
}
this.getLoginCountFun()
},
mounted () {
},
methods: {
getLoginCountFun() {
//loginType:4是查会员服务浏览次数
......
......@@ -264,7 +264,7 @@ export default {
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
document.querySelector(".el-tabs").style.display="none"
},
methods: {
getPageDetail() {
......@@ -365,7 +365,7 @@ export default {
// console.log(res, '提交内容')
this.$message.success('创建服务成功')
this.$router.push('/memberCenter/service')
document.querySelector(".el-tabs").style.display="block"
} else {
this.$message({
type: 'error',
......@@ -387,7 +387,7 @@ export default {
if (res.code == 0) {
this.$message.success('编辑服务成功')
this.$router.push('/memberCenter/service')
document.querySelector(".el-tabs").style.display="block"
} else {
this.$message({
type: 'error',
......@@ -400,7 +400,6 @@ export default {
goBack() {
if(JSON.stringify(this.ruleForm)==JSON.stringify(this.copyRuleForm)){
this.$router.push('/memberCenter/service')
document.querySelector(".el-tabs").style.display="block"
}else{
// this.$message.error('是否保存信息')
this.isDialogVisible=true
......@@ -411,7 +410,6 @@ export default {
},
handleConfirm(){
this.$router.push('/memberCenter/service')
document.querySelector(".el-tabs").style.display="block"
},
oninput(value) {
let str = value
......
......@@ -10,7 +10,7 @@
<span slot="list" slot-scope="scope">
<div v-for="(item, index) in scope.scope.list" :key="index">{{ item.couponName }}×{{ item.serviceQuantity }}</div>
</span>
<span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope">
<span class="table-btns" slot="optionsFun" slot-scope="scope" :data="scope.scope">
<template v-if="scope.scope.state === 0">
<el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button>
<el-button type="text" @click="handleUpOption(scope.scope)">上架</el-button>
......@@ -28,17 +28,21 @@
</span>
</GLTable>
</div>
<!-- btnCancelLabel="关闭" -->
<!-- btnCancelLabel="关闭" -->
<glsx-dialog title="示例效果" width="1142px" :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" typeName="primary" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose">
<div class="content-body">
<div class="content-item col1">
<div class="subTitle">1、管理后台先创建套餐</div>
<div class="subTitle">
1、管理后台先创建套餐
</div>
<div class="imageWrap">
<img src="@/assets/table.png" alt="" />
</div>
</div>
<div class="content-item col2">
<div class="subTitle">2、小程序端进行展示</div>
<div class="subTitle">
2、小程序端进行展示
</div>
<div class="twoImageWrap">
<img src="@/assets/card1.png" alt="" />
<img src="@/assets/card2.png" alt="" />
......@@ -51,7 +55,7 @@
<script>
import glsxDialog from '@/components/glsx-dialog'
import url from '@/assets/empty.png'
import url from "@/assets/empty.png"
import { getSetMealListApi, deleteSetMeal, upDownPackage } from '@/api/modules/setmeal'
import { getLoginCount } from '@/api/modules/service'
......@@ -111,11 +115,14 @@ export default {
formatter: cellValue => {
return this.baseDataList.stateList.find(item => item.confId == cellValue.state).confName
}
},
{
label: '操作',
prop: 'optionsFun',
addHtml: 'optionsFun',
width: 160
}
],
tableOption: {
width: 80
}
]
},
baseDataList: {
stateList: stateList
......@@ -127,6 +134,8 @@ export default {
created() {
this.getLoginCountFun()
},
mounted () {
},
methods: {
getLoginCountFun() {
//loginType:5是查会员套餐浏览次数
......
......@@ -309,7 +309,6 @@ export default {
if (res.code == '0') {
// this.$router.go(-1)
this.$router.push("/memberCenter/setmeal")
document.querySelector(".el-tabs").style.display="block"
}
})
} else {
......@@ -333,7 +332,6 @@ export default {
})
if (res.code == '0') {
this.$router.push("/memberCenter/setmeal")
document.querySelector(".el-tabs").style.display="block"
}
})
}
......@@ -355,7 +353,6 @@ export default {
goBack() {
if (JSON.stringify(this.ruleForm) == JSON.stringify(this.copyRuleForm) && this.choseItemList.length == this.copyChoseItemList.length && this.totalPrice == this.copyTotalPrice) {
this.$router.push("/memberCenter/setmeal")
document.querySelector(".el-tabs").style.display="block"
} else {
this.isTipDialogVisible = true
}
......@@ -426,7 +423,6 @@ export default {
},
handleTipConfirm() {
this.$router.push("/memberCenter/setmeal")
document.querySelector(".el-tabs").style.display="block"
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!