|
@@ -40,9 +40,12 @@
|
|
<h3 class="qr-code hand" @click="showQr(scope.row)"></h3>
|
|
<h3 class="qr-code hand" @click="showQr(scope.row)"></h3>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+ <el-table-column label="积分" prop="xdx_jf" width="120">
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="操作">
|
|
<el-table-column label="操作">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button type="text" @click="handleWatch(scope.row)">查看评分</el-button>
|
|
<el-button type="text" @click="handleWatch(scope.row)">查看评分</el-button>
|
|
|
|
+ <el-button type="text" @click="handleAward(scope.row)">兑换奖品</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -60,7 +63,7 @@
|
|
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
|
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
- <el-dialog title="评分详情" :visible.sync="watchVisible" width="850px">
|
|
|
|
|
|
+ <el-dialog title="评分详情" :visible.sync="watchVisible" width="950px">
|
|
<div class="flex justify-between px-10px">
|
|
<div class="flex justify-between px-10px">
|
|
<div> 学生姓名: {{ stuData.xdx_xsxm }}</div>
|
|
<div> 学生姓名: {{ stuData.xdx_xsxm }}</div>
|
|
<div> 学生学籍号: {{ stuData.xdx_xsxh }}</div>
|
|
<div> 学生学籍号: {{ stuData.xdx_xsxh }}</div>
|
|
@@ -77,18 +80,53 @@
|
|
<div v-else>-</div>
|
|
<div v-else>-</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+ <el-table-column label="操作">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button type="text" @click="editScore(scope.row)">编辑</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
- <div class="flex justify-end">
|
|
|
|
|
|
+ <div class="flex justify-end mt-20px">
|
|
<el-pagination background layout="total,prev, pager, next" :page-size="query.limit" :total="pfTotal"
|
|
<el-pagination background layout="total,prev, pager, next" :page-size="query.limit" :total="pfTotal"
|
|
:current-page.sync="query.page" @current-change="handleTableChange"></el-pagination>
|
|
:current-page.sync="query.page" @current-change="handleTableChange"></el-pagination>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <el-dialog title="编辑分数" :visible.sync="editScoreVisible" width="450px">
|
|
|
|
+ <div class="flex items-center justify-center w-full">
|
|
|
|
+ <div class="mr-20px">得分: </div>
|
|
|
|
+ <el-input style="width: 200px;" v-model="wdwp_xs_df" placeholder="请输入分数"></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ <div slot="footer" class="text-center">
|
|
|
|
+ <el-button type="primary" @click="editScoreSubmit">确 定</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <el-dialog title="兑换奖品" :visible.sync="dhjpVisible" width="620px">
|
|
|
|
+ <el-form ref="jfForm" label-width="150px" :model="jfForm" :rules="jfRules" class="jfform">
|
|
|
|
+ <el-form-item label="学生姓名" prop="xdwxdj_xs_xm">
|
|
|
|
+ <el-input disabled v-model="jfForm.xdwxdj_xs_xm" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="学生学籍号" prop="xdwxdj_xs_xjh">
|
|
|
|
+ <el-input disabled v-model="jfForm.xdwxdj_xs_xjh" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="兑换奖品名称" prop="xdwxdj_dhjp">
|
|
|
|
+ <el-input v-model="jfForm.xdwxdj_dhjp" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="兑换消耗积分" prop="xdwxdj_dhxhjf">
|
|
|
|
+ <el-input type="number" v-model="jfForm.xdwxdj_dhxhjf" @input="isTrueNum($event);" />
|
|
|
|
+ <!-- <template slot-scope="{ error }">
|
|
|
|
+ {{error}}
|
|
|
|
+ </template> -->
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <div slot="footer" class="text-center">
|
|
|
|
+ <el-button type="primary" @click="jfdhSubmit('jfForm')">确 定</el-button>
|
|
|
|
+ </div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { xsewm_list, xsewm_export, grade_search, class_search, wypj_pf } from "./api";
|
|
|
|
|
|
+import { xsewm_list, xsewm_export, grade_search, class_search, wypj_pf, wypj_edit, jfdh_add } from "./api";
|
|
import { useUserStore } from "@/stores/user";
|
|
import { useUserStore } from "@/stores/user";
|
|
const { token } = useUserStore();
|
|
const { token } = useUserStore();
|
|
import VueQr from "vue-qr";
|
|
import VueQr from "vue-qr";
|
|
@@ -132,6 +170,31 @@ export default {
|
|
},
|
|
},
|
|
pfTotal: 100,
|
|
pfTotal: 100,
|
|
stu_id: '',
|
|
stu_id: '',
|
|
|
|
+ editScoreVisible: false,
|
|
|
|
+ scoreInfo: {},
|
|
|
|
+ wdwp_xs_df: '',
|
|
|
|
+ dhjpVisible: false,
|
|
|
|
+ jfForm: {
|
|
|
|
+ xdwxdj_xs_xjh: '',
|
|
|
|
+ xdwxdj_xs_xm: '',
|
|
|
|
+ xdwxdj_dhjp: '',
|
|
|
|
+ xdwxdj_dhxhjf: '',
|
|
|
|
+ },
|
|
|
|
+ jfRules: {
|
|
|
|
+ xdwxdj_xs_xjh: [
|
|
|
|
+ { required: true, message: "请输入学生学籍号", trigger: "submit" },
|
|
|
|
+ ],
|
|
|
|
+ xdwxdj_xs_xm: [
|
|
|
|
+ { required: true, message: "请输入学生姓名", trigger: "submit" },
|
|
|
|
+ ],
|
|
|
|
+ xdwxdj_dhjp: [
|
|
|
|
+ { required: true, message: "请输入兑换奖品", trigger: "submit" },
|
|
|
|
+ ],
|
|
|
|
+ xdwxdj_dhxhjf: [
|
|
|
|
+ { required: true, message: "请输入兑换消耗积分", trigger: "submit" },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ flag: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -228,7 +291,7 @@ export default {
|
|
},
|
|
},
|
|
showQr(item) {
|
|
showQr(item) {
|
|
this.appSrc =
|
|
this.appSrc =
|
|
- "http://60.188.226.44:8000/app/xddy/#/scanCode?xsxm=" +
|
|
|
|
|
|
+ "http://60.188.226.44:8000/app/mobile/#/scanCode?xsxm=" +
|
|
item.xdx_xsxm +
|
|
item.xdx_xsxm +
|
|
"&xsxh=" +
|
|
"&xsxh=" +
|
|
item.xdx_xsxh +
|
|
item.xdx_xsxh +
|
|
@@ -241,6 +304,7 @@ export default {
|
|
|
|
|
|
this.dialogVisible = true;
|
|
this.dialogVisible = true;
|
|
},
|
|
},
|
|
|
|
+ // #region 评分列表弹窗
|
|
getPfList() {
|
|
getPfList() {
|
|
wypj_pf({ wdwp_xs_xjh: this.stuData?.xdx_xsxh, ...this.query }).then(res => {
|
|
wypj_pf({ wdwp_xs_xjh: this.stuData?.xdx_xsxh, ...this.query }).then(res => {
|
|
if (res.code == '1') {
|
|
if (res.code == '1') {
|
|
@@ -255,6 +319,104 @@ export default {
|
|
this.stuData = item;
|
|
this.stuData = item;
|
|
this.getPfList();
|
|
this.getPfList();
|
|
},
|
|
},
|
|
|
|
+ // #endregion
|
|
|
|
+
|
|
|
|
+ // #region 编辑分数
|
|
|
|
+ editScore(item) {
|
|
|
|
+ this.editScoreVisible = true;
|
|
|
|
+ this.scoreInfo = item;
|
|
|
|
+ this.wdwp_xs_df = item.wdwp_xs_df;
|
|
|
|
+ },
|
|
|
|
+ editScoreSubmit() {
|
|
|
|
+ if (!this.wdwp_xs_df) {
|
|
|
|
+ return this.$message({
|
|
|
|
+ message: '请输入分数',
|
|
|
|
+ type: 'danger'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ let data = {
|
|
|
|
+ wdwp_id: this.scoreInfo.wdwp_id,
|
|
|
|
+ xddy_dygl_wypj_pjjl: {
|
|
|
|
+ wdwp_xs_df: this.wdwp_xs_df,
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ wypj_edit(data).then(res => {
|
|
|
|
+ if (res.code == '1') {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '编辑成功',
|
|
|
|
+ type: 'success'
|
|
|
|
+ })
|
|
|
|
+ this.editScoreVisible = false;
|
|
|
|
+ this.getPfList();
|
|
|
|
+ this.getListData();
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // #endregion
|
|
|
|
+
|
|
|
|
+ // #region 兑换奖品
|
|
|
|
+ handleAward(item) {
|
|
|
|
+ this.dhjpVisible = true;
|
|
|
|
+ this.stuData = item;
|
|
|
|
+ this.jfForm = {
|
|
|
|
+ xdwxdj_xs_xm: item.xdx_xsxm,
|
|
|
|
+ xdwxdj_xs_xjh: item.xdx_xsxh,
|
|
|
|
+ xdwxdj_dhjp: '',
|
|
|
|
+ xdwxdj_dhxhjf: '',
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ isTrueNum(event) {
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ console.log(event, '33333333333');
|
|
|
|
+ if (event > this.stuData.xdx_jf * 1) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '超过所得积分值',
|
|
|
|
+ type: 'error',
|
|
|
|
+ })
|
|
|
|
+ this.flag = true;
|
|
|
|
+ } else {
|
|
|
|
+ this.flag = false;
|
|
|
|
+ }
|
|
|
|
+ // if (row.estimatedGenerationCost - event.target.value < 0) {
|
|
|
|
+ // alert("超过值了,请重新输入")
|
|
|
|
+ // //
|
|
|
|
+ // event.target.value = event.target.value.slice(0, event.target.value.length - 1)
|
|
|
|
+ // this.settlementList.supplierPaidAmount = event.target.value
|
|
|
|
+ // }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ jfdhSubmit(formName) {
|
|
|
|
+ this.$refs[formName].validate((valid) => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ if (this.flag) {
|
|
|
|
+ return this.$message({
|
|
|
|
+ message: `请填写不大于${this.stuData.xdx_jf}的积分值`,
|
|
|
|
+ type:'error'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ let data = {
|
|
|
|
+ xddy_dygl_wypj_xsjfdhqk: this.jfForm,
|
|
|
|
+ }
|
|
|
|
+ jfdh_add(data).then(res => {
|
|
|
|
+ if (res.code == '1') {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '兑换成功',
|
|
|
|
+ type: 'success'
|
|
|
|
+ })
|
|
|
|
+ this.dhjpVisible = false;
|
|
|
|
+ this.getListData();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '操作失败',
|
|
|
|
+ type: 'danger'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // #endregion
|
|
|
|
+
|
|
switchGrade() {
|
|
switchGrade() {
|
|
this.firstForm.class = "";
|
|
this.firstForm.class = "";
|
|
this.classListData();
|
|
this.classListData();
|
|
@@ -283,4 +445,12 @@ export default {
|
|
background: url("@/assets/images/a-2.png") center no-repeat;
|
|
background: url("@/assets/images/a-2.png") center no-repeat;
|
|
background-size: 28px 28px;
|
|
background-size: 28px 28px;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+::v-deep {
|
|
|
|
+ .jfform {
|
|
|
|
+ .el-input__inner {
|
|
|
|
+ width: 300px !important;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
</style>
|
|
</style>
|