门店参数新增
parent
17be547c16
commit
97852140a9
@ -1,89 +1,89 @@
|
||||
<template>
|
||||
<el-dialog :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="dialogVisible" width="1000px" append-to-body>
|
||||
<el-table @row-dblclick="confirms" :data="list" @row-click="rowClick" max-height="600" v-loading="listLoading" :element-loading-text="elementLoadingText" class="margin-top-xs" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)' ,color:'#eeeeee'}">
|
||||
<el-table-column label="选择" width="60">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="radio" :label="scope.row.id" @change.native="scope.row;">
|
||||
{{ "" }}
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="120" align="left" prop="rechargeTypeNum" label="充值编码"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="120" align="left" prop="rechargeTypeName" label="充值卡"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="80" align="left" prop="type" label="类别">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.type==0?'赠送卡':scope.row.type==1?'折扣卡':'活动卡'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="80" align="center" prop="cardRestMoney" label="剩余金额"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="80" align="center" prop="cardConsumeMoney" label="可用金额"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="100" align="center" prop="discount" label="享受优惠(%)"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="80" align="center" prop="cardGiftMoney" label="赠送金额"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="100" align="center" prop="discountFreeAmount" label="赠送折扣(%)"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="105" align="center" prop="endTime" label="到期日期"></el-table-column>
|
||||
</el-table>
|
||||
</el-table>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" type="primary" plain @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button size="mini" type="primary" @click="confirms()">确 定 </el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { recAccountList } from "@/api/eashier.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
radio: null, //单选值
|
||||
radioForm: {}, //单选对象
|
||||
list: [], //主数组
|
||||
dialogVisible: false, //弹窗开关
|
||||
title: "选择会员充值帐户",
|
||||
elementLoadingText: "数据加载中...", //list加载提示文字
|
||||
listLoading: false, //list加载提示开启动画
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//组件传值
|
||||
show(form) {
|
||||
this.form = { ...form };
|
||||
this.list = [];
|
||||
this.dialogVisible = true;
|
||||
this.getData();
|
||||
},
|
||||
//点击选中
|
||||
rowClick(row) {
|
||||
this.radio = row.id;
|
||||
this.radioForm = row;
|
||||
},
|
||||
//获取数据
|
||||
async getData() {
|
||||
this.listLoading = true;
|
||||
recAccountList({ memberId: this.form.memberId }).then((res) => {
|
||||
this.listLoading = false;
|
||||
if (res.code === "000000") {
|
||||
this.listLoading = false;
|
||||
this.list = res.rows;
|
||||
} else {
|
||||
this.$alert("查询会员充值帐户 : " + res.message, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => {},
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
//确认返回方法
|
||||
confirms() {
|
||||
this.$emit("recTypeData", this.radioForm);
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
<template>
|
||||
<el-dialog :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="dialogVisible" width="1000px" append-to-body>
|
||||
<el-table @row-dblclick="confirms" :data="list" @row-click="rowClick" max-height="600" v-loading="listLoading" :element-loading-text="elementLoadingText" class="margin-top-xs" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)' ,color:'#eeeeee'}">
|
||||
<el-table-column label="选择" width="60">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="radio" :label="scope.row.id" @change.native="scope.row;">
|
||||
{{ "" }}
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="120" align="left" prop="rechargeTypeNum" label="充值编码"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="120" align="left" prop="rechargeTypeName" label="充值卡"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="80" align="left" prop="type" label="类别">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.type==0?'赠送卡':scope.row.type==1?'折扣卡':'活动卡'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="80" align="center" prop="cardRestMoney" label="剩余金额"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="80" align="center" prop="cardConsumeMoney" label="可用金额"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="100" align="center" prop="discount" label="享受优惠(%)"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="80" align="center" prop="cardGiftMoney" label="赠送金额"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="100" align="center" prop="discountFreeAmount" label="赠送折扣(%)"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="105" align="center" prop="endTime" label="到期日期"></el-table-column>
|
||||
</el-table>
|
||||
</el-table>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" type="primary" plain @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button size="mini" type="primary" @click="confirms()">确 定 </el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { recAccountList } from "@/api/eashier.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
radio: null, //单选值
|
||||
radioForm: {}, //单选对象
|
||||
list: [], //主数组
|
||||
dialogVisible: false, //弹窗开关
|
||||
title: "选择会员充值帐户",
|
||||
elementLoadingText: "数据加载中...", //list加载提示文字
|
||||
listLoading: false, //list加载提示开启动画
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//组件传值
|
||||
show(form) {
|
||||
this.form = { ...form };
|
||||
this.list = [];
|
||||
this.dialogVisible = true;
|
||||
this.getData();
|
||||
},
|
||||
//点击选中
|
||||
rowClick(row) {
|
||||
this.radio = row.id;
|
||||
this.radioForm = row;
|
||||
},
|
||||
//获取数据
|
||||
async getData() {
|
||||
this.listLoading = true;
|
||||
recAccountList({ memberId: this.form.memberId }).then((res) => {
|
||||
this.listLoading = false;
|
||||
if (res.code === "000000") {
|
||||
this.listLoading = false;
|
||||
this.list = res.rows;
|
||||
} else {
|
||||
this.$alert("查询会员充值帐户 : " + res.message, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => {},
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
//确认返回方法
|
||||
confirms() {
|
||||
this.$emit("recTypeData", this.radioForm);
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
@ -1,124 +1,129 @@
|
||||
<template>
|
||||
<el-dialog :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="dialogVisible" width="1000px" append-to-body>
|
||||
<el-table @row-dblclick="confirms" :data="list" @row-click="rowClick" max-height="600" v-loading="listLoading" :element-loading-text="elementLoadingText" class="margin-top-xs" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)' ,color:'#eeeeee'}">
|
||||
<el-table-column label="选择" width="60">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="radio" :label="scope.row.id" @change.native="scope.row;">
|
||||
{{ "" }}
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" show-overflow-tooltip min-width="100" prop="rechargeTypeNum" label="编码"></el-table-column>
|
||||
<el-table-column align="center" show-overflow-tooltip min-width="120" prop="rechargeTypeName" label="名称"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="75" align="left" prop="type" label="类别">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.type==0?'赠送卡':scope.row.type==1?'折扣卡':'活动卡'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" min-width="75" prop="firstAmount" label="首充金额">
|
||||
<template slot-scope="scope">{{scope.row.firstAmount?scope.row.firstAmount:'无首充'}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" min-width="75" prop="rechargeMoney" label="续充金额"></el-table-column>
|
||||
<el-table-column align="center" min-width="80" prop="discount" label="享受折扣(%)"></el-table-column>
|
||||
<el-table-column align="center" min-width="75" prop="giftMoney" label="赠送金额">
|
||||
<template slot-scope="scope">{{scope.row.giftMoney?scope.row.giftMoney:'无赠送'}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" min-width="80" prop="discountFreeAmount" label="赠送折扣(%)">
|
||||
<template slot-scope="scope">{{scope.row.discountFreeAmount?scope.row.discountFreeAmount:'无折扣'}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" min-width="80" prop="validTime" label="有效期限(月)"></el-table-column>
|
||||
<el-table-column align="center" show-overflow-tooltip min-width="115" prop="stopDates" label="到期日期"></el-table-column>
|
||||
</el-table>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" type="primary" plain @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button size="mini" type="primary" @click="confirms()">确 定 </el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { recTypeList } from "@/api/eashier.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
radio: null, //单选值
|
||||
radioForm: {}, //单选对象
|
||||
list: [], //主数组
|
||||
dialogVisible: false, //弹窗开关
|
||||
title: "选择充值类别", //弹窗标题
|
||||
elementLoadingText: "数据加载中...", //list加载提示文字
|
||||
listLoading: false, //list加载提示开启动画
|
||||
selectNumber: null, //充值类别类型0 赠送卡 1 折扣卡 2活动卡
|
||||
selcetList: [], //已经选择的充值类别列表
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//组件传值
|
||||
show(number, list) {
|
||||
console.log(number);
|
||||
console.log(list);
|
||||
if (list) {
|
||||
this.selcetList = list;
|
||||
}
|
||||
if (number) {
|
||||
this.selectNumber = number;
|
||||
}
|
||||
this.list = [];
|
||||
this.radio = null;
|
||||
this.radioForm = {};
|
||||
this.dialogVisible = true;
|
||||
this.getData();
|
||||
},
|
||||
//点击选中
|
||||
rowClick(row) {
|
||||
this.radio = row.id;
|
||||
this.radioForm = row;
|
||||
},
|
||||
//获取数据
|
||||
async getData() {
|
||||
this.listLoading = true;
|
||||
let form = {
|
||||
id: "",
|
||||
storeId: sessionStorage.getItem("parentId"),
|
||||
};
|
||||
if (this.selectNumber) {
|
||||
form.type = this.selectNumber;
|
||||
}
|
||||
recTypeList(form).then((res) => {
|
||||
this.listLoading = false;
|
||||
if (res.code === "000000") {
|
||||
if (this.selcetList.length == 0) {
|
||||
this.list = res.rows;
|
||||
} else {
|
||||
var list = [];
|
||||
this.selcetList.forEach((item) => {
|
||||
res.rows.forEach((items) => {
|
||||
if (item.newRechargeTypeId == items.id) {
|
||||
list.push(items);
|
||||
}
|
||||
});
|
||||
});
|
||||
this.list = list;
|
||||
}
|
||||
} else {
|
||||
this.$alert("查询充值列表 : " + res.message, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => {},
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
//确定返回方法
|
||||
confirms() {
|
||||
this.$emit("recTypeData", this.radioForm);
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
<template>
|
||||
<el-dialog :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="dialogVisible" width="1000px" append-to-body>
|
||||
<el-table @row-dblclick="confirms" :data="list" @row-click="rowClick" max-height="600" v-loading="listLoading" :element-loading-text="elementLoadingText" class="margin-top-xs" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)' ,color:'#eeeeee'}">
|
||||
<el-table-column label="选择" width="60">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="radio" :label="scope.row.id" @change.native="scope.row;">
|
||||
{{ "" }}
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" show-overflow-tooltip min-width="100" prop="rechargeTypeNum" label="编码"></el-table-column>
|
||||
<el-table-column align="center" show-overflow-tooltip min-width="120" prop="rechargeTypeName" label="名称"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="75" align="left" prop="type" label="类别">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.type==0?'赠送卡':scope.row.type==1?'折扣卡':'活动卡'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" min-width="75" prop="firstAmount" label="首充金额">
|
||||
<template slot-scope="scope">{{scope.row.firstAmount?scope.row.firstAmount:'无首充'}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" min-width="75" prop="rechargeMoney" label="续充金额"></el-table-column>
|
||||
<el-table-column align="center" min-width="80" prop="discount" label="享受折扣(%)"></el-table-column>
|
||||
<el-table-column align="center" min-width="75" prop="giftMoney" label="赠送金额">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.donateType==0">固</span>
|
||||
<span v-if="scope.row.donateType==1">比</span>
|
||||
<span>{{scope.row.giftMoney}}</span>
|
||||
<span v-if="scope.row.donateType==1">%</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" min-width="80" prop="discountFreeAmount" label="赠送折扣(%)">
|
||||
<template slot-scope="scope">{{scope.row.discountFreeAmount?scope.row.discountFreeAmount:'无折扣'}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" min-width="80" prop="validTime" label="有效期限(月)"></el-table-column>
|
||||
<el-table-column align="center" show-overflow-tooltip min-width="115" prop="stopDates" label="到期日期"></el-table-column>
|
||||
</el-table>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" type="primary" plain @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button size="mini" type="primary" @click="confirms()">确 定 </el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { recTypeList } from "@/api/eashier.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
radio: null, //单选值
|
||||
radioForm: {}, //单选对象
|
||||
list: [], //主数组
|
||||
dialogVisible: false, //弹窗开关
|
||||
title: "选择充值类别", //弹窗标题
|
||||
elementLoadingText: "数据加载中...", //list加载提示文字
|
||||
listLoading: false, //list加载提示开启动画
|
||||
selectNumber: null, //充值类别类型0 赠送卡 1 折扣卡 2活动卡
|
||||
selcetList: [], //已经选择的充值类别列表
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//组件传值
|
||||
show(number, list) {
|
||||
console.log(number);
|
||||
console.log(list);
|
||||
if (list) {
|
||||
this.selcetList = list;
|
||||
}
|
||||
if (number) {
|
||||
this.selectNumber = number;
|
||||
}
|
||||
this.list = [];
|
||||
this.radio = null;
|
||||
this.radioForm = {};
|
||||
this.dialogVisible = true;
|
||||
this.getData();
|
||||
},
|
||||
//点击选中
|
||||
rowClick(row) {
|
||||
this.radio = row.id;
|
||||
this.radioForm = row;
|
||||
},
|
||||
//获取数据
|
||||
async getData() {
|
||||
this.listLoading = true;
|
||||
let form = {
|
||||
id: "",
|
||||
storeId: sessionStorage.getItem("parentId"),
|
||||
};
|
||||
if (this.selectNumber) {
|
||||
form.type = this.selectNumber;
|
||||
}
|
||||
recTypeList(form).then((res) => {
|
||||
this.listLoading = false;
|
||||
if (res.code === "000000") {
|
||||
if (this.selcetList.length == 0) {
|
||||
this.list = res.rows;
|
||||
} else {
|
||||
var list = [];
|
||||
this.selcetList.forEach((item) => {
|
||||
res.rows.forEach((items) => {
|
||||
if (item.newRechargeTypeId == items.id) {
|
||||
list.push(items);
|
||||
}
|
||||
});
|
||||
});
|
||||
this.list = list;
|
||||
}
|
||||
} else {
|
||||
this.$alert("查询充值列表 : " + res.message, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => {},
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
//确定返回方法
|
||||
confirms() {
|
||||
this.$emit("recTypeData", this.radioForm);
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue