Commit 943a0449 by zhouzy

日期传参形式,提交返回,批量提交picker值绑定,提交失败和成功提示

1 parent 84b1b65a
<!-- --> <!-- -->
<template> <template>
<el-form <div class="container">
:model="ruleForm" <el-form
:rules="rules" :model="ruleForm"
ref="ruleForm" :rules="rules"
label-width="200px" ref="ruleForm"
class="demo-ruleForm" label-width="200px"
label-position="right" class="demo-ruleForm"
> label-position="right"
<div class="baseinformation">基础信息</div> >
<div class="itemContainer"> <div class="baseinformation">基础信息</div>
<el-form-item <div class="itemContainer">
label="权益卡名称:" <el-form-item
prop="name" label="权益卡名称:"
> prop="name"
<el-input
v-model="ruleForm.name"
style="width: 60%"
></el-input>
</el-form-item>
<el-form-item
label="权益卡说明:"
prop="explain"
>
<el-input
type="textarea"
v-model="ruleForm.explain"
style="width: 60%"
></el-input>
</el-form-item>
<el-form-item
label="套餐有效期:"
prop="validity"
>领卡时起
<el-input-number
v-model="ruleForm.validity"
controls-position="right"
:min="0"
:max="10"
size="mini"
></el-input-number>
月内有效
</el-form-item>
</div>
<div>权益配置</div>
<div class="itemContainer">
<el-form-item>
<el-checkbox v-model="ruleForm.currencyCheckbox">停驶返嘀币</el-checkbox>
</el-form-item>
<el-form-item
label="返嘀币(每小时):"
prop="currencyInpution"
>
<el-input
v-model="ruleForm.currencyInpution"
size="middle"
style="width: 60%"
:disabled="!ruleForm.currencyCheckbox"
></el-input>个
</el-form-item>
</div>
<div class="itemContainer">
<el-form-item>
<el-checkbox v-model="ruleForm.oilCheckbox">加油无忧</el-checkbox>
</el-form-item>
<el-form-item
label="油站推荐半径:"
prop="oilInpution"
>
<el-input
v-model="ruleForm.oilInpution"
size="middle"
style="width: 60%"
:disabled="!ruleForm.oilCheckbox"
></el-input>公里
</el-form-item>
<el-form-item
label="加油优惠推送最长间隔 :"
prop="timeInpution"
>
<el-input
v-model="ruleForm.timeInpution"
size="middle"
style="width: 60%"
:disabled="!ruleForm.oilCheckbox"
></el-input>天
</el-form-item>
</div>
<div class="itemContainer">
<el-form-item>
<el-checkbox v-model="ruleForm.worryFreeCheckbox">出险无忧</el-checkbox>
</el-form-item>
<el-form-item
label="启用碰撞推送:"
prop="pushCollision"
>
<el-switch
v-model="ruleForm.pushCollision"
active-color="#13ce66"
inactive-color="#ff4949"
:disabled="!ruleForm.worryFreeCheckbox"
> >
</el-switch> <el-input
</el-form-item> v-model="ruleForm.name"
</div> style="width: 60%"
<div class="itemContainer"> ></el-input>
<el-form-item> </el-form-item>
<el-checkbox v-model="ruleForm.specialOfferCheckbox">特惠商品</el-checkbox> <el-form-item
</el-form-item> label="权益卡说明:"
<el-form-item prop="explain"
label="嘀币返利比例(%):" >
prop="rebateRatio" <el-input
> type="textarea"
<el-input v-model="ruleForm.explain"
v-model="ruleForm.rebateRatio" style="width: 60%"
size="middle" ></el-input>
style="width: 60%" </el-form-item>
:disabled="!ruleForm.specialOfferCheckbox" <el-form-item
></el-input> label="套餐有效期:"
</el-form-item> prop="validity"
>领卡时起
<el-input-number
v-model="ruleForm.validity"
controls-position="right"
:min="0"
:max="10"
size="mini"
></el-input-number>
月内有效
</el-form-item>
</div>
<div>权益配置</div>
<div class="itemContainer">
<el-form-item>
<el-checkbox v-model="ruleForm.currencyCheckbox">停驶返嘀币</el-checkbox>
</el-form-item>
<el-form-item
label="返嘀币(每小时):"
prop="currencyInpution"
>
<el-input
v-model="ruleForm.currencyInpution"
size="middle"
style="width: 60%"
:disabled="!ruleForm.currencyCheckbox"
></el-input>个
</el-form-item>
</div>
<div class="itemContainer">
<el-form-item>
<el-checkbox v-model="ruleForm.oilCheckbox">加油无忧</el-checkbox>
</el-form-item>
<el-form-item
label="油站推荐半径:"
prop="oilInpution"
>
<el-input
v-model="ruleForm.oilInpution"
size="middle"
style="width: 60%"
:disabled="!ruleForm.oilCheckbox"
></el-input>公里
</el-form-item>
<el-form-item
label="加油优惠推送最长间隔 :"
prop="timeInpution"
>
<el-input
v-model="ruleForm.timeInpution"
size="middle"
style="width: 60%"
:disabled="!ruleForm.oilCheckbox"
></el-input>天
</el-form-item>
</div>
<div class="itemContainer">
<el-form-item>
<el-checkbox v-model="ruleForm.worryFreeCheckbox">出险无忧</el-checkbox>
</el-form-item>
<el-form-item
label="启用碰撞推送:"
prop="pushCollision"
>
<el-switch
v-model="ruleForm.pushCollision"
active-color="#13ce66"
inactive-color="#ff4949"
:disabled="!ruleForm.worryFreeCheckbox"
>
</el-switch>
</el-form-item>
</div>
<div class="itemContainer">
<el-form-item>
<el-checkbox v-model="ruleForm.specialOfferCheckbox">特惠商品</el-checkbox>
</el-form-item>
<el-form-item
label="嘀币返利比例(%):"
prop="rebateRatio"
>
<el-input
v-model="ruleForm.rebateRatio"
size="middle"
style="width: 60%"
:disabled="!ruleForm.specialOfferCheckbox"
></el-input>
</el-form-item>
<el-form-item> <el-form-item>
<el-checkbox v-model="ruleForm.rescueCheckbox">救援无忧</el-checkbox> <el-checkbox v-model="ruleForm.rescueCheckbox">救援无忧</el-checkbox>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-checkbox v-model="ruleForm.creditCheckbox">微众车主信用分期</el-checkbox> <el-checkbox v-model="ruleForm.creditCheckbox">微众车主信用分期</el-checkbox>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-checkbox v-model="ruleForm.meituanCheckbox">美团外卖,天天好劵</el-checkbox> <el-checkbox v-model="ruleForm.meituanCheckbox">美团外卖,天天好劵</el-checkbox>
</el-form-item> </el-form-item>
</div> </div>
<div class="buttonContainer"> <div class="buttonContainer">
<el-button size="middle">取消</el-button> <el-button size="middle">取消</el-button>
<el-button <el-button
size="middle" :plain="true"
type="primary" size="middle"
@click="jump" @click="jump"
>提交</el-button> type="primary"
</div> >提交</el-button>
</el-form> </div>
</el-form>
</div>
</template> </template>
<script> <script>
...@@ -235,6 +238,7 @@ export default { ...@@ -235,6 +238,7 @@ export default {
// creditInstallment: this.ruleForm.creditInstallment + '', // creditInstallment: this.ruleForm.creditInstallment + '',
// meiTuan: this.ruleForm.meiTuan + '' // meiTuan: this.ruleForm.meiTuan + ''
// } // }
} }
if (this.ruleForm.currencyCheckbox) { if (this.ruleForm.currencyCheckbox) {
...@@ -279,9 +283,18 @@ export default { ...@@ -279,9 +283,18 @@ export default {
equityItemJson: JSON.stringify(equityItemJson) equityItemJson: JSON.stringify(equityItemJson)
}) })
} }
insertMemberCardDefineRf(params).then((res) => { insertMemberCardDefineRf(params).then((res) => {
console.log(res)
if (res > 0) {
window.history.go(-1)
} else {
this.$message({
message: '增添失败!',
type: 'error'
})
}
}) })
} }
// inableInpution(checkStatus, inputStatus) { // inableInpution(checkStatus, inputStatus) {
...@@ -301,6 +314,10 @@ export default { ...@@ -301,6 +314,10 @@ export default {
margin: 0; margin: 0;
border: 0; border: 0;
} }
.container {
overflow-y: scroll;
height: 900px;
}
.itemContainer { .itemContainer {
margin-left: 20px; margin-left: 20px;
margin-top: 20px; margin-top: 20px;
......
...@@ -77,16 +77,12 @@ export default { ...@@ -77,16 +77,12 @@ export default {
}, },
{ {
label: '状态', label: '状态',
prop: 'status' prop: 'status',
// formatter: (cellValue) => { formatter: (cellValue) => {
// return { return {
// 0: '进行中', 1: '正常',
// 1: '未完成', }[cellValue.status]
// 2: '已过期', }
// 3: '线下关闭',
// 4: '线上关闭'
// }[cellValue.status]
// }
}, },
{ {
...@@ -104,7 +100,8 @@ export default { ...@@ -104,7 +100,8 @@ export default {
}, },
methods: { methods: {
addCard() { addCard() {
window.location.href = 'http://glsx-oss-equity2.frontend.test.glsx.com.cn/customer/newEquityCard.html' // window.location.href = 'http://glsx-oss-equity2.frontend.test.glsx.com.cn/customer/newEquityCard.html'
window.location.href = 'http://192.168.1.158:8085/customer/newEquityCard.html'
} }
// handleEdit() { // handleEdit() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!