|
|
@@ -1,131 +1,167 @@
|
|
|
<template>
|
|
|
- <ContainerQuery>
|
|
|
- <div v-if="$accessCheck($Access.CommissionRuleAddCommissionRule)" slot="left">
|
|
|
- <el-button size="small" type="primary" @click="$router.push('/Shareholders/RuleCommission')">
|
|
|
- 新增股东
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
- <div slot="more">
|
|
|
- <el-form size="small" :inline="true">
|
|
|
- <el-form-item>
|
|
|
- <el-date-picker v-model="time" clearable type="date" end-placeholder="添加日期" @change="changeTime">
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
- <el-table :data="rule_list">
|
|
|
- <el-table-column prop="name" label="股东名称" show-overflow-tooltip min-width="155"></el-table-column>
|
|
|
- <el-table-column prop="number" label="联系方式" show-overflow-tooltip min-width="155"></el-table-column>
|
|
|
- <el-table-column prop="dends" label="分红股份" min-width="140"></el-table-column>
|
|
|
- <el-table-column prop="shares" label="原始股份" min-width="140"></el-table-column>
|
|
|
- <el-table-column prop="createTime" label="添加时间" min-width="140"></el-table-column>
|
|
|
- <el-table-column prop="name" label="操作" min-width="120">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button v-if="$accessCheck($Access.CommissionRuleEditCommissionRule)" type="text" @click="
|
|
|
- $router.push(
|
|
|
- '/Shareholders/RuleCommissionEdit?id=' + scope.row.id
|
|
|
- )
|
|
|
- ">
|
|
|
- 修改
|
|
|
- </el-button>
|
|
|
- <el-button v-if="$accessCheck($Access.CommissionRuleDelCommissionRule)" type="text"
|
|
|
+ <div>
|
|
|
+ <ContainerQuery v-if="!balanceAdjustment">
|
|
|
+ <!-- <el-button slot="left" size="small" type="primary" @click="infoShow = true">
|
|
|
+ 新增文章
|
|
|
+ </el-button> -->
|
|
|
+ <el-table :data="rule_list">
|
|
|
+ <el-table-column prop="id" label="文章id" show-overflow-tooltip min-width="155"></el-table-column>
|
|
|
+ <el-table-column prop="title" label="文章标题" show-overflow-tooltip min-width="155"></el-table-column>
|
|
|
+ <el-table-column prop="createTime" label="添加时间" min-width="140">
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ $_common.formatDate(row.createTime) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="操作" min-width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button v-if="$accessCheck($Access.CommissionRuleEditCommissionRule)" type="text"
|
|
|
+ @click="balanceAdjustmentFlag(scope.row)">
|
|
|
+ 修改
|
|
|
+ </el-button>
|
|
|
+ <!-- <el-button v-if="$accessCheck($Access.CommissionRuleDelCommissionRule)" type="text"
|
|
|
@click="delData(scope.row.id)">
|
|
|
删除
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <FooterPage :page-size="pageSize" :total-page.sync="total" :current-page.sync="page" @pageChange="pageChange"
|
|
|
- @sizeChange="sizeChange"></FooterPage>
|
|
|
- </ContainerQuery>
|
|
|
+ </el-button> -->
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <!-- <FooterPage :page-size="pageSize" :total-page.sync="total" :current-page.sync="page" @pageChange="pageChange"
|
|
|
+ @sizeChange="sizeChange"></FooterPage> -->
|
|
|
+
|
|
|
+ </ContainerQuery>
|
|
|
+ <InfoAdd v-if="infoShow" :is-edit="isEdit" :visible="infoShow" @close="infoShow = false"
|
|
|
+ @confirm="staffConfirm"></InfoAdd>
|
|
|
+ <info-update v-if="info_update_show" :visible="true" :art-detail="formData" @close="info_update_show = false"
|
|
|
+ @confirm="updateConfirm"></info-update>
|
|
|
+</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {
|
|
|
- Lst,
|
|
|
- } from "@/api/Holders";
|
|
|
- import {
|
|
|
- enableRewardRule,
|
|
|
- getAllRewardRule,
|
|
|
- deleteRewardRule,
|
|
|
- } from "@/api/Reward";
|
|
|
- export default {
|
|
|
- name: "RewardList",
|
|
|
- data() {
|
|
|
- return {
|
|
|
- rule_list: [],
|
|
|
- time: '',
|
|
|
- search_form: {
|
|
|
- start: "",
|
|
|
- },
|
|
|
- total: 0,
|
|
|
- page: 1,
|
|
|
- pageSize: 10,
|
|
|
- };
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.Lst();
|
|
|
- },
|
|
|
- activated() {
|
|
|
- if (this.$_isInit()) return;
|
|
|
- this.Lst();
|
|
|
- },
|
|
|
- methods: {
|
|
|
- // 订单时间
|
|
|
- changeTime(val) {
|
|
|
- if (val && val.length) {
|
|
|
- this.search_form.start = val[0] / 1000;
|
|
|
- } else {
|
|
|
- this.search_form.start = "";
|
|
|
- }
|
|
|
- this.pageChange(1);
|
|
|
- },
|
|
|
- pageChange(page) {
|
|
|
- this.page = page;
|
|
|
- this.Lst();
|
|
|
- },
|
|
|
- // 每页数据大小改变
|
|
|
- sizeChange(val) {
|
|
|
- this.pageSize = val;
|
|
|
- this.pageChange(1);
|
|
|
- },
|
|
|
- editData(index) {},
|
|
|
- async Lst() {
|
|
|
- const {
|
|
|
- data,
|
|
|
- pageTotal
|
|
|
- } = await Lst({
|
|
|
- page: this.page,
|
|
|
- pageSize: this.pageSize,
|
|
|
- createTime: this.search_form.start,
|
|
|
- });
|
|
|
- this.rule_list = data.map((item) => {
|
|
|
- const staffName = data.map((item) => item.staffName);
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- staffName: staffName.length ? staffName.join(",") : "",
|
|
|
- };
|
|
|
- });
|
|
|
- this.total = pageTotal;
|
|
|
- },
|
|
|
- // 删除
|
|
|
- async delData(id) {
|
|
|
- this.$confirm("是否要将该提成规则删除?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- }).then(async () => {
|
|
|
- const data = await deleteRewardRule(id);
|
|
|
+ import {
|
|
|
+ Lst,
|
|
|
+ } from "@/api/Holders";
|
|
|
+ import {
|
|
|
+ getArtList,
|
|
|
+ getArtDetail,
|
|
|
+ getArtUpdate
|
|
|
+ } from '@/api/info'
|
|
|
+
|
|
|
+ import InfoAdd from "./components/InfoAdd.vue";
|
|
|
+ import InfoUpdate from "./components/infoUpdate.vue";
|
|
|
+
|
|
|
+ export default {
|
|
|
+ name: "InfoArticleList",
|
|
|
+ components: {
|
|
|
+ InfoAdd,
|
|
|
+ InfoUpdate
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ // 是否显示添加弹窗
|
|
|
+ infoShow:false,
|
|
|
+ info_update_show: false,
|
|
|
+ content: '',
|
|
|
+ rule_list: [],
|
|
|
+ time: '',
|
|
|
+ search_form: {
|
|
|
+ start: "",
|
|
|
+ },
|
|
|
+ total: 0,
|
|
|
+ page: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ balanceAdjustment: false,
|
|
|
+ formData: {},
|
|
|
+ rules: {
|
|
|
+ title: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入标题",
|
|
|
+ trigger: "blur"
|
|
|
+ }],
|
|
|
+ content:[{
|
|
|
+ required: true,
|
|
|
+ message: "请输入内容",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.Lst();
|
|
|
+ // this.getArtList()
|
|
|
+ },
|
|
|
+ activated() {
|
|
|
+ if (this.$_isInit()) return;
|
|
|
+ this.Lst();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ updateConfirm() {
|
|
|
+ this.Lst();
|
|
|
+ },
|
|
|
+ rechargeMemberBalance() {
|
|
|
+ this.$refs.form.validate(async (valid) => {
|
|
|
+ if(valid) {
|
|
|
+ getArtUpdate(this.formData).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ this.Lst();
|
|
|
+ this.closeBalanceAdjustment()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ closeBalanceAdjustment() {
|
|
|
+ this.balanceAdjustment = false
|
|
|
+ },
|
|
|
+ balanceAdjustmentFlag(row) {
|
|
|
+ console.log(row);
|
|
|
+ this.formData = {}
|
|
|
+ getArtDetail({
|
|
|
+ id: row.id
|
|
|
+ }).then(({
|
|
|
+ data
|
|
|
+ }) => {
|
|
|
+ this.formData = data;
|
|
|
+ this.info_update_show = true;
|
|
|
+ })
|
|
|
+
|
|
|
+ // this.formData.name = row.name;
|
|
|
+ },
|
|
|
+ // 每页数据大小改变
|
|
|
+ sizeChange(val) {
|
|
|
+ this.pageSize = val;
|
|
|
+ this.pageChange(1);
|
|
|
+ },
|
|
|
+ editData(index) {},
|
|
|
+ async Lst() {
|
|
|
+ const {
|
|
|
+ data,
|
|
|
+ pageTotal
|
|
|
+ } = await getArtList({
|
|
|
+ page: this.page,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ // createTime: this.search_form.start,
|
|
|
+ });
|
|
|
+ this.rule_list = data
|
|
|
+ // this.total = pageTotal;
|
|
|
+ },
|
|
|
+ // 删除
|
|
|
+ async delData(id) {
|
|
|
+ this.$confirm("是否要将该提成规则删除?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(async () => {
|
|
|
+ const data = await deleteRewardRule(id);
|
|
|
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "操作成功!",
|
|
|
- });
|
|
|
- this.getAllRewardRule();
|
|
|
- });
|
|
|
- },
|
|
|
- },
|
|
|
- };
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!",
|
|
|
+ });
|
|
|
+ this.getAllRewardRule();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+ };
|
|
|
</script>
|
|
|
|
|
|
<style scoped></style>
|