Commit 6df7890e by xuyl

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

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