Commit e7dbf3ee by xuyl Committed by chenwq

开通方式增加下拉搜索条件

1 parent 6d0a045b
......@@ -29,9 +29,9 @@
</div> -->
<div class="membership">
<span>会员卡试用:</span>
<span class="membershipDays" v-if="ruleForm.tryAble==1">{{ ruleForm.tryNum }}天试用</span>
<span class="membershipDays" v-if="ruleForm.tryAble == 1">{{ ruleForm.tryNum }}天试用</span>
<span class="membershipDays" v-else>已关闭</span>
<span class="lookQR" @click="extensionQR" v-if="ruleForm.tryAble==1">查看小程序推广码</span>
<span class="lookQR" @click="extensionQR" v-if="ruleForm.tryAble == 1">查看小程序推广码</span>
<!-- <el-button class="lookQR" size="small" type="primary" @click="extensionQR" v-if="ruleForm.tryAble==1">生成小程序推广码</el-button> -->
</div>
<el-button class="seeEquity" size="small" type="primary" @click="openDialog">查看权益</el-button>
......@@ -56,21 +56,18 @@
</el-input>
</el-form-item>
</div>
<el-form-item :class="!ruleForm.tryNum? 'is-error' : ''" class="memberTrial" label="会员卡试用" size="small" >
<el-form-item :class="!ruleForm.tryNum ? 'is-error' : ''" class="memberTrial" label="会员卡试用" size="small">
<div class="trialMerge">
<el-switch class="switchTag" active-value="1" inactive-value="0" v-model="ruleForm.tryAble" active-color="#5850FF" inactive-color="#E8E8EA" active-text="开" inactive-text="关"></el-switch>
<div class="trialDays" v-if="ruleForm.tryAble == 1">
<span>试用时长</span>
<el-input-number v-model="ruleForm.tryNum" :controls="false" :min="1" :max="365" ></el-input-number>
<el-input-number v-model="ruleForm.tryNum" :controls="false" :min="1" :max="365"></el-input-number>
<span>天试用</span>
</div>
<div class="el-form-item__error trialDays_error" v-if="ruleForm.tryAble==1 && !ruleForm.tryNum">
请输入试用时长
</div>
<div class="el-form-item__error trialDays_error" v-if="ruleForm.tryAble == 1 && !ruleForm.tryNum">请输入试用时长</div>
</div>
<!-- <div v-if="ruleForm.tryAble" class="promoteQR">生成小程序码推广</div> -->
</el-form-item>
</el-form>
<div style="display: flex">
......@@ -165,7 +162,7 @@
</el-form-item>
</div>
</el-form>
<div slot="footer" style="margin-left:360px">
<div slot="footer" style="margin-left: 360px">
<el-button size="small" @click="handleQRClose">取消</el-button>
<el-button type="primary" @click="handleQRConfirm" size="small">确定</el-button>
</div>
......@@ -183,7 +180,7 @@ const cloneText = message => {
document.body.removeChild(input)
}
import glsxDialog from '@/components/glsx-dialog'
import { getCenterListApi, getMoreMerchant, getCardContent, updateCardContent, memberExportApi,getQrUrl } from '@/api/modules/center'
import { getCenterListApi, getMoreMerchant, getCardContent, updateCardContent, memberExportApi, getQrUrl } from '@/api/modules/center'
import { statusList, memberTypeList, exportFn } from '@/common/constant'
export default {
components: {
......@@ -207,11 +204,11 @@ export default {
// }, 1000)
}
return {
promotionForm:{
QRurl:'',
QRcode:''
},//推广
isQRVisible:false,
promotionForm: {
QRurl: '',
QRcode: ''
}, //推广
isQRVisible: false,
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
......@@ -224,7 +221,7 @@ export default {
status: '',
merchantName: '',
memberType: '',
activeType:''
activeType: ''
},
searchFormTable: {},
memberTypeLists: [
......@@ -253,6 +250,10 @@ export default {
{
dictValue: 12,
dictLabel: '无忧服务'
},
{
dictValue: 0,
dictLabel: '试用领取'
}
],
memberCenterStatus: [
......@@ -332,15 +333,14 @@ export default {
copyRuleForm: {},
rules: {
cardName: [
{ required: true,min: 1, max: 15, message: '请输入会员卡名称',trigger: 'blur'},
{ required: true, min: 1, max: 15, message: '请输入会员卡名称', trigger: 'blur' }
// { min: 1, max: 15, message: '请输入1 到 15 个字符' }
],
price: [
{ required: true, message: '请输入售价',trigger: 'blur'}
{ required: true, message: '请输入售价', trigger: 'blur' }
// { validator: checkPrice, trigger: 'blur' }
],
marketPrice:
[{ required: true, message: '请输入市场价',trigger: 'blur'}]
marketPrice: [{ required: true, message: '请输入市场价', trigger: 'blur' }]
},
//权益 - 弹窗
isDialogVisible: false,
......@@ -367,16 +367,16 @@ export default {
this.$message.success('复制成功')
},
// 查看小程序推广码
extensionQR(){
extensionQR() {
console.log(this.ruleForm.equityId)
const params = {
id:this.ruleForm.equityId
id: this.ruleForm.equityId
}
getQrUrl(params).then(res => {
this.isQRVisible = !this.isQRVisible
this.promotionForm.QRurl = res.data.url
this.promotionForm.QRcode =res.data.qrCode
this.promotionForm.QRcode = res.data.qrCode
})
},
oninput(value) {
......@@ -395,7 +395,7 @@ export default {
if (len1 == '-') {
str = ''
} //限制只能输入一个小数点
if(value !== '' && value==0){
if (value !== '' && value == 0) {
return (str = 0.01)
}
if (Number(value) >= 99999) {
......@@ -414,7 +414,7 @@ export default {
return str
},
getCardContentFun() {
if(this.merchantModel ==2 && this.accountLevel ==1) return
if (this.merchantModel == 2 && this.accountLevel == 1) return
getCardContent({ merchantId: this.merchantId }).then(res => {
if (!res) {
return
......@@ -429,7 +429,7 @@ export default {
})
},
openEditWrap() {
if(!this.ruleForm.equityId) return
if (!this.ruleForm.equityId) return
this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm))
this.isShowEditWrap = true
},
......@@ -439,7 +439,7 @@ export default {
this.isShowEditWrap = false
},
submitRuleForm(formName) {
if(this.ruleForm.tryAble==true && this.ruleForm.tryNum == undefined){
if (this.ruleForm.tryAble == true && this.ruleForm.tryNum == undefined) {
return
}
this.$refs[formName].validate(valid => {
......@@ -511,10 +511,10 @@ export default {
// }
this.$refs.memberCenterRef.data.length ? (this.$refs.memberCenterRef.tableHeightValues = '') : this.$refs.memberCenterRef.setTableHeightFun()
},
handleQRClose(){
handleQRClose() {
this.isQRVisible = !this.isQRVisible
},
handleQRConfirm(){
handleQRConfirm() {
this.isQRVisible = !this.isQRVisible
},
handleClose() {
......@@ -535,7 +535,7 @@ export default {
</script>
<style lang="scss" scoped>
.proForm{
.proForm {
// display: flex;
// justify-content: center;
}
......@@ -551,13 +551,13 @@ export default {
width: 160px;
height: 160px;
}
.main-qrcode .tryDays{
.main-qrcode .tryDays {
margin-top: 12px;
}
// .form {
// padding: 32px 20px 32px 48px;
// }
.form{
.form {
padding: 20px 0;
}
.addCardsDialog .el-dialog__header {
......@@ -787,7 +787,7 @@ export default {
display: flex;
align-items: center;
height: 33px;
.trialDays_error{
.trialDays_error {
margin-left: 135px;
}
.switchTag .el-switch__label {
......@@ -817,9 +817,9 @@ export default {
width: 50px !important;
}
}
.promoteQR{
color:#5850FF;
margin-bottom:26px
.promoteQR {
color: #5850ff;
margin-bottom: 26px;
}
}
.membership {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!