master
wangxubin@yeah.net 3 years ago
parent 5569d600ef
commit 8f63279cc4

File diff suppressed because it is too large Load Diff

@ -3,57 +3,131 @@
<div class="flex justify-between align-center"> <div class="flex justify-between align-center">
<div> <div>
<el-button size="mini" type="primary" @click="edit(-1)"></el-button> <el-button size="mini" type="primary" @click="edit(-1)"></el-button>
<el-button size="mini" type="primary" @click="download()"></el-button> <el-button size="mini" type="primary" @click="download()"
>下载模板</el-button
>
</div> </div>
<!-- <el-button size="mini" type="success" @click="exit()"></el-button> --> <!-- <el-button size="mini" type="success" @click="exit()"></el-button> -->
<div> <div>
<el-button size="mini" v-if="radioRowValueList.state != undefined" type="warning" @click="infoDialog = true"></el-button> <el-button
<el-button size="mini" type="" @click="detail" :disabled="radioRowValueList.state == undefined">明细</el-button> size="mini"
<el-button size="mini" type="danger" @click="del()" v-if="radioRowValueList.state==0" plain>删除</el-button> v-if="radioRowValueList.state != undefined"
<el-button size="mini" type="primary" @click="edit(0)" :disabled=" type="warning"
@click="infoDialog = true"
>导入</el-button
>
<el-button
size="mini"
type=""
@click="detail"
:disabled="radioRowValueList.state == undefined"
>明细</el-button
>
<el-button
size="mini"
type="danger"
@click="del()"
v-if="radioRowValueList.state == 0"
plain
>删除</el-button
>
<el-button
size="mini"
type="primary"
@click="edit(0)"
:disabled="
radioRowValueList.state == undefined || radioRowValueList.state == undefined ||
radioRowValueList.state == 1 || radioRowValueList.state == 1 ||
radioRowValueList.state == 3 radioRowValueList.state == 3
" plain>修改</el-button> "
<el-button size="mini" type="primary" @click="edit(1)" :disabled=" plain
>修改</el-button
>
<el-button
size="mini"
type="primary"
@click="edit(1)"
:disabled="
radioRowValueList.state == 3 || radioRowValueList.state == 3 ||
radioRowValueList.state == 1 || radioRowValueList.state == 1 ||
radioRowValueList.state == undefined radioRowValueList.state == undefined
">送审 "
>送审
</el-button> </el-button>
<el-button size="mini" type="primary" @click="edit(2)" :disabled=" <el-button
size="mini"
type="primary"
@click="edit(2)"
:disabled="
radioRowValueList.state == undefined || radioRowValueList.state == undefined ||
radioRowValueList.state == 0 || radioRowValueList.state == 0 ||
radioRowValueList.state == 3 || radioRowValueList.state == 3 ||
radioRowValueList.state == 2 || radioRowValueList.state == 2 ||
radioRowValueList.state == 4 radioRowValueList.state == 4
" plain>回收</el-button> "
<el-button size="mini" type="primary" @click="edit(3)" :disabled=" plain
>回收</el-button
>
<el-button
size="mini"
type="primary"
@click="edit(3)"
:disabled="
radioRowValueList.state == undefined || radioRowValueList.state == undefined ||
radioRowValueList.state == 0 || radioRowValueList.state == 0 ||
radioRowValueList.state == 3 || radioRowValueList.state == 3 ||
radioRowValueList.state == 2 || radioRowValueList.state == 2 ||
radioRowValueList.state == 4 radioRowValueList.state == 4
"> "
审核</el-button> >
<el-button size="mini" type="primary" @click="edit(4)" :disabled=" 审核</el-button
>
<el-button
size="mini"
type="primary"
@click="edit(4)"
:disabled="
radioRowValueList.state == undefined || radioRowValueList.state == undefined ||
radioRowValueList.state == 1 || radioRowValueList.state == 1 ||
radioRowValueList.state == 0 || radioRowValueList.state == 0 ||
radioRowValueList.state == 4 radioRowValueList.state == 4
" plain>反审核</el-button> "
plain
>反审核</el-button
>
</div> </div>
</div> </div>
<el-table class="margin-top-xs" border @row-click="rowClick" v-loading="listLoading" :data="list" :element-loading-text="elementLoadingText" @row-dblclick="rowdbClick" max-height="650" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}"> <el-table
class="margin-top-xs"
border
@row-click="rowClick"
v-loading="listLoading"
:data="list"
:element-loading-text="elementLoadingText"
@row-dblclick="rowdbClick"
max-height="650"
:header-cell-style="{
background: 'linear-gradient(#6cb3ff, #1873d4)',
color: '#eeeeee'
}"
>
<el-table-column type="index" width="40" align="center"></el-table-column> <el-table-column type="index" width="40" align="center"></el-table-column>
<el-table-column align="center" min-width="50" label="选择"> <el-table-column align="center" min-width="50" label="选择">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio v-model="radioRowValue" :label="scope.row.id" @change.native="scope.row">{{null}}</el-radio> <el-radio
v-model="radioRowValue"
:label="scope.row.id"
@change.native="scope.row"
>{{ null }}</el-radio
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" min-width="75" label="状态"> <el-table-column align="center" min-width="75" label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag size="medium" effect="dark" :type=" <el-tag
size="medium"
effect="dark"
:type="
scope.row.state == 0 scope.row.state == 0
? '' ? ''
: '' || scope.row.state == 1 : '' || scope.row.state == 1
@ -65,7 +139,8 @@
: '' || scope.row.state == 4 : '' || scope.row.state == 4
? 'warning' ? 'warning'
: '' : ''
"> "
>
<div> <div>
<span v-show="scope.row.state == 0"></span> <span v-show="scope.row.state == 0"></span>
<span v-show="scope.row.state == 1"></span> <span v-show="scope.row.state == 1"></span>
@ -76,30 +151,136 @@
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column show-overflow-tooltip align="center" min-width="100" prop="docNum" label="单据号"></el-table-column> <el-table-column
<el-table-column show-overflow-tooltip align="center" min-width="100" prop="docDate" label="日期"></el-table-column> show-overflow-tooltip
<el-table-column show-overflow-tooltip align="center" min-width="100" prop="rechargeTypeNum" label="充值编码"></el-table-column> align="center"
<el-table-column show-overflow-tooltip align="center" min-width="100" prop="rechargeTypeName" label="充值名称"></el-table-column> min-width="100"
<el-table-column show-overflow-tooltip align="center" min-width="80" prop="rechargeMoney" label="金额"></el-table-column> prop="docNum"
<el-table-column show-overflow-tooltip align="center" min-width="80" prop="discount" label="折扣"></el-table-column> label="单据号"
<el-table-column show-overflow-tooltip align="center" min-width="100" prop="expireDate" sortable label="到期时间"></el-table-column> ></el-table-column>
<el-table-column show-overflow-tooltip align="center" min-width="80" prop="quantity" sortable label="份数"></el-table-column> <el-table-column
<el-table-column show-overflow-tooltip align="center" min-width="80" prop="remakr" sortable label="单位"></el-table-column> show-overflow-tooltip
align="center"
min-width="100"
prop="docDate"
label="日期"
></el-table-column>
<el-table-column
show-overflow-tooltip
align="center"
min-width="100"
prop="rechargeTypeNum"
label="充值编码"
></el-table-column>
<el-table-column
show-overflow-tooltip
align="center"
min-width="100"
prop="rechargeTypeName"
label="充值名称"
></el-table-column>
<el-table-column
show-overflow-tooltip
align="center"
min-width="80"
prop="rechargeMoney"
label="金额"
></el-table-column>
<el-table-column
show-overflow-tooltip
align="center"
min-width="80"
prop="discount"
label="折扣"
></el-table-column>
<el-table-column
show-overflow-tooltip
align="center"
min-width="100"
prop="expireDate"
sortable
label="到期时间"
></el-table-column>
<el-table-column
show-overflow-tooltip
align="center"
min-width="80"
prop="quantity"
sortable
label="份数"
></el-table-column>
<el-table-column
show-overflow-tooltip
align="center"
min-width="80"
prop="remakr"
sortable
label="单位"
></el-table-column>
<el-table-column align="center" prop="inputBy" :show-overflow-tooltip="true" label="创建人" min-width="80"></el-table-column> <el-table-column
<el-table-column align="center" prop="inputDate" :show-overflow-tooltip="true" label="创建时间" min-width="100"></el-table-column> align="center"
<el-table-column align="center" prop="updateBy" :show-overflow-tooltip="true" label="修改人" min-width="80"></el-table-column> prop="inputBy"
<el-table-column align="center" prop="updateDate" :show-overflow-tooltip="true" label="修改时间" min-width="100"></el-table-column> :show-overflow-tooltip="true"
<el-table-column align="center" prop="auditBy" :show-overflow-tooltip="true" label="审核人" min-width="80"></el-table-column> label="创建人"
<el-table-column align="center" prop="auditDate" :show-overflow-tooltip="true" label="审核时间" min-width="100"></el-table-column> min-width="80"
></el-table-column>
<el-table-column
align="center"
prop="inputDate"
:show-overflow-tooltip="true"
label="创建时间"
min-width="100"
></el-table-column>
<el-table-column
align="center"
prop="updateBy"
:show-overflow-tooltip="true"
label="修改人"
min-width="80"
></el-table-column>
<el-table-column
align="center"
prop="updateDate"
:show-overflow-tooltip="true"
label="修改时间"
min-width="100"
></el-table-column>
<el-table-column
align="center"
prop="auditBy"
:show-overflow-tooltip="true"
label="审核人"
min-width="80"
></el-table-column>
<el-table-column
align="center"
prop="auditDate"
:show-overflow-tooltip="true"
label="审核时间"
min-width="100"
></el-table-column>
</el-table> </el-table>
<div class="block margin-top-xs"> <div class="block margin-top-xs">
<!-- 分页组件 --> <!-- 分页组件 -->
<el-pagination align="left" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryForm.pageNum" :page-sizes="[10,20,30,40,50]" :page-size="queryForm.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination> <el-pagination
align="left"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryForm.pageNum"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="queryForm.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
></el-pagination>
</div> </div>
<edit ref="edit" @editData="editData"></edit> <edit ref="edit" @editData="editData"></edit>
<detail ref="detail" @detailData="detailData"></detail> <detail ref="detail" @detailData="detailData"></detail>
<el-dialog title="导入表格" :visible.sync="infoDialog" :close-on-click-modal="false"> <el-dialog
title="导入表格"
:visible.sync="infoDialog"
:close-on-click-modal="false"
>
<excel @fileData="fileData" @infoDialogV="infoDialogV"></excel> <excel @fileData="fileData" @infoDialogV="infoDialogV"></excel>
</el-dialog> </el-dialog>
</div> </div>
@ -115,7 +296,7 @@ import {
baseGrouponCardPage, baseGrouponCardPage,
importBaseGrouponList, importBaseGrouponList,
downloadBaseGrouponList, downloadBaseGrouponList,
delBaseGrouponCard, delBaseGrouponCard
} from "@/api/promotion.js"; } from "@/api/promotion.js";
export default { export default {
components: { edit, detail, excel }, components: { edit, detail, excel },
@ -128,12 +309,12 @@ export default {
queryForm: { queryForm: {
// //
pageNum: 1, pageNum: 1,
pageSziz: 10, pageSziz: 10
}, },
total: 0, // total: 0, //
radioRowValue: null, // radioRowValue: null, //
radioRowValueList: {}, // radioRowValueList: {}, //
infoDialog: false, // infoDialog: false //
}; };
}, },
methods: { methods: {
@ -146,19 +327,19 @@ export default {
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: action => {}
}); });
} else { } else {
fileData.append("multipartFile", v); fileData.append("multipartFile", v);
fileData.append("grouponCardId", this.radioRowValueList.id); fileData.append("grouponCardId", this.radioRowValueList.id);
importBaseGrouponList(fileData).then((res) => { importBaseGrouponList(fileData).then(res => {
if (res.rows != undefined) { if (res.rows != undefined) {
this.infoList = res.rows; this.infoList = res.rows;
this.infoErrorDialog = true; this.infoErrorDialog = true;
} else { } else {
if (res.code == "000000") { if (res.code == "000000") {
this.$message.success({ this.$message.success({
message: res.message, message: res.message
}); });
this.getData(); this.getData();
} else { } else {
@ -167,7 +348,7 @@ export default {
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: action => {}
}); });
} }
} }
@ -180,7 +361,7 @@ export default {
}, },
// //
download() { download() {
downloadBaseGrouponList().then((res) => { downloadBaseGrouponList().then(res => {
let blob = new Blob([res]); let blob = new Blob([res]);
console.log(blob); console.log(blob);
var a = document.createElement("a"); var a = document.createElement("a");
@ -198,7 +379,7 @@ export default {
if (this.searchForm.projectTypeName == "") { if (this.searchForm.projectTypeName == "") {
delete this.searchForm.projectTypeName; delete this.searchForm.projectTypeName;
} }
proExport(this.searchForm).then((res) => { proExport(this.searchForm).then(res => {
let blob = new Blob([res]); let blob = new Blob([res]);
var a = document.createElement("a"); var a = document.createElement("a");
var url = window.URL.createObjectURL(blob); var url = window.URL.createObjectURL(blob);
@ -222,11 +403,11 @@ export default {
this.$refs.edit.show(this.radioRowValueList); this.$refs.edit.show(this.radioRowValueList);
} else { } else {
let form = { id: this.radioRowValueList.id, state: number }; let form = { id: this.radioRowValueList.id, state: number };
stateBaseGrouponCard(form).then((res) => { stateBaseGrouponCard(form).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
this.radioRowValueList.state = number; this.radioRowValueList.state = number;
this.$message.success({ this.$message.success({
message: "操作成功!", message: "操作成功!"
}); });
this.getData(); this.getData();
} else { } else {
@ -235,7 +416,7 @@ export default {
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: action => {}
}); });
} }
}); });
@ -259,20 +440,20 @@ export default {
}, },
del() { del() {
var id = { var id = {
id: this.radioRowValueList.id, id: this.radioRowValueList.id
}; };
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", { this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
cancelButtonClass: "cancelbtnFalses", cancelButtonClass: "cancelbtnFalses",
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses"
}) })
.then(() => { .then(() => {
delBaseGrouponCard(id).then((res) => { delBaseGrouponCard(id).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
this.$message.success({ this.$message.success({
message: " 删除成功!", message: " 删除成功!"
}); });
this.getData(); this.getData();
} else { } else {
@ -281,14 +462,14 @@ export default {
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: action => {}
}); });
} }
}); });
}) })
.catch(() => { .catch(() => {
this.$message.info({ this.$message.info({
message: "已取消操作!", message: "已取消操作!"
}); });
}); });
}, },
@ -304,32 +485,32 @@ export default {
//console.log(val); //console.log(val);
}, },
// //
async getData() { async getData() {
this.listLoading = true; this.listLoading = true;
baseGrouponCardPage(this.queryForm).then((res) => { baseGrouponCardPage(this.queryForm).then(res => {
this.listLoading = false; this.listLoading = false;
if (res.code == "000000") { if (res.code == "000000") {
this.list = res.pageInfo.list; this.list = res.pageInfo.list;
this.total = res.pageInfo.total; this.total = res.pageInfo.total;
this.list=this.list.reverse() this.list = this.list.reverse();
console.log(this.list) console.log(this.list);
} else { } else {
this.$alert(res.message, "提示", { this.$alert(res.message, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: action => {}
}); });
} }
}); });
}, }
}, },
created() { created() {
this.getData(); this.getData();
}, }
}; };
</script> </script>
<style> <style></style>
</style>

@ -83,7 +83,7 @@ export default {
this.dialogFormVisible = false; this.dialogFormVisible = false;
this.$message.success({ message: this.title + "成功" }); this.$message.success({ message: this.title + "成功" });
this.$emit("editData"); this.$emit("editData");
this.close(); this.handleClose();
} else { } else {
this.$alert(res.message, "提示", { this.$alert(res.message, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

@ -87,7 +87,7 @@ export default {
this.dialogFormVisible = false; this.dialogFormVisible = false;
this.$message.success({ message: this.title + "成功" }); this.$message.success({ message: this.title + "成功" });
this.$emit("editData"); this.$emit("editData");
this.close(); this.handleClose();
} else { } else {
this.$alert(res.message, "提示", { this.$alert(res.message, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

Loading…
Cancel
Save