Sfoglia il codice sorgente

修改投稿/添加是否缴费按钮

lyn7568 4 anni fa
parent
commit
247ca077af

+ 1 - 2
src/views/modules/admin/paper.vue

@ -195,11 +195,10 @@ export default {
195 195
    requirements() {
196 196
      //投稿要求
197 197
      this.$http({
198
        url: this.$http.adornUrl("/admin/paperrequire/update"),
198
        url: this.$http.adornUrl("/admin/moneyaccount/infobymid/:mid"),
199 199
        method: "post",
200 200
        data: this.paprData
201 201
      }).then(res => {
202
        window.console.log(res);
203 202
        if (res.data && res.data.code === 0) {
204 203
          this.addOrVisible = false;
205 204
          (this.paprData.deadline = ""), (this.paprData.content = "");

+ 1 - 4
src/views/modules/admin/sign.vue

@ -76,13 +76,10 @@ export default {
76 76
      totalPage: 0,
77 77
      dataListLoading: false,
78 78
      dataListSelections: [],
79
      meetingId: 0
79
      meetingId: this.$route.params.id
80 80
    };
81 81
  },
82 82
  created() {
83
    this.meetingId = this.$route.params.id;
84
  },
85
  activated() {
86 83
    this.getDataList();
87 84
  },
88 85
  methods: {

+ 51 - 12
src/views/modules/admin/signinfo.vue

@ -47,8 +47,19 @@
47 47
      <el-table-column prop="servername" header-align="center" align="center" label="负责人"></el-table-column>
48 48
      <el-table-column prop="isPay" header-align="center" align="center" label="是否缴费">
49 49
        <template slot-scope="scope">
50
          <el-tag v-if="scope.row.isPay===1">是</el-tag>
51
          <el-tag v-else type="danger">否</el-tag>
50
          <el-button
51
            v-if="scope.row.isPay === 0"
52
            size="medium"
53
            hit="true"
54
            @click="changeStatus(1,scope.row.pid)"
55
          >否</el-button>
56
          <el-button
57
            v-else-if="scope.row.isPay === 1"
58
            size="medium"
59
            hit="true"
60
            type="success"
61
            @click="changeStatus(0,scope.row.pid)"
62
          >是</el-button>
52 63
        </template>
53 64
      </el-table-column>
54 65
      <el-table-column prop="createTime" header-align="center" align="center" label="创建时间"></el-table-column>
@ -103,7 +114,7 @@ export default {
103 114
    getDataList() {
104 115
      this.dataListLoading = true;
105 116
      this.$http({
106
        url: this.$http.adornUrl("/admin/signinfo/list"),
117
        url: this.$http.adornUrl("/admin/signinfo/listreg"),
107 118
        method: "get",
108 119
        params: this.$http.adornParams({
109 120
          page: this.pageIndex,
@ -112,6 +123,7 @@ export default {
112 123
          meetingId: this.$route.params.id
113 124
        })
114 125
      }).then(({ data }) => {
126
        window.console.log(data)
115 127
        if (data && data.code === 0) {
116 128
          this.dataList = data.page.list;
117 129
          this.totalPage = data.page.totalCount;
@ -151,15 +163,11 @@ export default {
151 163
        : this.dataListSelections.map(item => {
152 164
            return item.id;
153 165
          });
154
      this.$confirm(
155
        `确定删除?`,
156
        "提示",
157
        {
158
          confirmButtonText: "确定",
159
          cancelButtonText: "取消",
160
          type: "warning"
161
        }
162
      ).then(() => {
166
      this.$confirm(`确定删除?`, "提示", {
167
        confirmButtonText: "确定",
168
        cancelButtonText: "取消",
169
        type: "warning"
170
      }).then(() => {
163 171
        this.$http({
164 172
          url: this.$http.adornUrl("/admin/signinfo/delete"),
165 173
          method: "post",
@ -179,6 +187,37 @@ export default {
179 187
          }
180 188
        });
181 189
      });
190
    },
191
    // 修改缴费状态
192
    changeStatus(status, id) {
193
      window.console.log(status,id)
194
      this.$http({
195
        url: this.$http.adornUrl("/admin/payment/paystatus"),
196
        method: "post",
197
        data: this.$http.adornParams({
198
          id: id,
199
          status: status
200
        })
201
      }).then(({ data }) => {
202
        if (data && data.code === 0) {
203
          this.$message({
204
            message: "操作成功",
205
            type: "success",
206
            duration: 500,
207
            onClose: () => {
208
              var dList = this.dataList;
209
              dList.forEach(element => {
210
                if (element.pid === id) {
211
                  element.isPay = status;
212
                }
213
              });
214
              this.dataList = dList;
215
            }
216
          });
217
        } else {
218
          this.$message.error(data.msg);
219
        }
220
      });
182 221
    }
183 222
  }
184 223
};