Browse Source

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

lyn7568 4 years ago
parent
commit
247ca077af

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

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

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

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

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

47
      <el-table-column prop="servername" header-align="center" align="center" label="负责人"></el-table-column>
47
      <el-table-column prop="servername" header-align="center" align="center" label="负责人"></el-table-column>
48
      <el-table-column prop="isPay" header-align="center" align="center" label="是否缴费">
48
      <el-table-column prop="isPay" header-align="center" align="center" label="是否缴费">
49
        <template slot-scope="scope">
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
        </template>
63
        </template>
53
      </el-table-column>
64
      </el-table-column>
54
      <el-table-column prop="createTime" header-align="center" align="center" label="创建时间"></el-table-column>
65
      <el-table-column prop="createTime" header-align="center" align="center" label="创建时间"></el-table-column>
103
    getDataList() {
114
    getDataList() {
104
      this.dataListLoading = true;
115
      this.dataListLoading = true;
105
      this.$http({
116
      this.$http({
106
        url: this.$http.adornUrl("/admin/signinfo/list"),
117
        url: this.$http.adornUrl("/admin/signinfo/listreg"),
107
        method: "get",
118
        method: "get",
108
        params: this.$http.adornParams({
119
        params: this.$http.adornParams({
109
          page: this.pageIndex,
120
          page: this.pageIndex,
112
          meetingId: this.$route.params.id
123
          meetingId: this.$route.params.id
113
        })
124
        })
114
      }).then(({ data }) => {
125
      }).then(({ data }) => {
126
        window.console.log(data)
115
        if (data && data.code === 0) {
127
        if (data && data.code === 0) {
116
          this.dataList = data.page.list;
128
          this.dataList = data.page.list;
117
          this.totalPage = data.page.totalCount;
129
          this.totalPage = data.page.totalCount;
151
        : this.dataListSelections.map(item => {
163
        : this.dataListSelections.map(item => {
152
            return item.id;
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
        this.$http({
171
        this.$http({
164
          url: this.$http.adornUrl("/admin/signinfo/delete"),
172
          url: this.$http.adornUrl("/admin/signinfo/delete"),
165
          method: "post",
173
          method: "post",
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
};