| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182 |
- <template>
- <div id="asPlanned">
- <search-box-new
- ref="searchBox"
- :formData="formData"
- :formList="formList"
- @search="search"
- @init="init"
- />
- <table-list
- :tableSets="tableSet"
- :tableData="tableData"
- :navText="navText"
- @addClick="addClick"
- :loading="loading"
- @editInfo="editInfo"
- ref="tableList"
- >
- <template slot="customize">
- <el-button :size="size" type="warning" @click="moreActive(2)"
- >取消预约</el-button
- >
- <el-button :size="size" type="primary" @click="moreActive(5)"
- >前培账号标记</el-button
- >
- <el-button :size="size" type="primary" @click="moreActive(3)"
- >考试登记</el-button
- >
- <!-- <el-button :size="size" type="primary" @click="moreActive(4)"
- >批量:成绩证书登记</el-button
- > -->
- <el-button :size="size" type="success" @click="moreActive(1)"
- >批量导入</el-button
- >
- </template>
- <template slot="btn" slot-scope="props">
- <el-button
- type="text"
- @click="examBox(props.scope.row, 2)"
- :disabled="props.scope.row.subscribeStatus === 2"
- >考试登记</el-button
- >
- <el-button
- type="text"
- @click="openZS(props.scope.row, 2)"
- :disabled="props.scope.row.subscribeStatus === 2"
- >成绩和证书登记</el-button
- >
- </template>
- </table-list>
- <pagination
- :total="total"
- :pageSize="formData.pageSize"
- :currentPage="formData.pageNum"
- @handleSizeChange="handleSizeChange"
- @handleCurrentChange="handleCurrentChange"
- />
- <el-dialog
- :visible.sync="dialogCG"
- width="560px"
- :show-close="false"
- :close-on-click-modal="false"
- >
- <div slot="title" class="hearders">
- <div class="leftTitle">考试登记</div>
- <div class="rightBoxs">
- <img
- src="@/assets/images/Close@2x.png"
- alt=""
- @click="dialogCG = false"
- />
- </div>
- </div>
- <div>
- <div v-if="ints === 1" class="aListBottom">{{ listData.realname }}</div>
- <ul v-if="ints === 2">
- <li class="liBVS" v-for="(item, index) in peopleList" :key="index">
- {{ item.realname }}
- <i
- v-if="peopleList.length > 1"
- class="el-icon-error clsw"
- @click="peopleList.splice(index, 1)"
- ></i>
- </li>
- <div style="clear: both"></div>
- </ul>
- <el-form
- :model="listData"
- label-width="120px"
- class="demo-ruleForm"
- :rules="rules"
- ref="listData"
- >
- <el-form-item label="考试登记状态" prop="examStatus">
- <el-radio-group v-model="listData.examStatus">
- <el-radio :label="1">正常</el-radio>
- <el-radio :label="2">缺考</el-radio>
- <el-radio :label="3">作弊</el-radio>
- <el-radio :label="4">替考</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item label="考试登记补充" prop="remark">
- <el-input
- v-model="listData.remark"
- type="textarea"
- :rows="4"
- ></el-input>
- </el-form-item>
- </el-form>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogCG = false">取消</el-button>
- <el-button type="primary" @click="submitChecks('listData')"
- >确定</el-button
- >
- </span>
- </el-dialog>
- <el-dialog
- :visible.sync="dialogDJ"
- width="560px"
- :show-close="false"
- :close-on-click-modal="false"
- >
- <div slot="title" class="hearders">
- <div class="leftTitle">取消预约</div>
- <div class="rightBoxs">
- <img
- src="@/assets/images/Close@2x.png"
- alt=""
- @click="dialogDJ = false"
- />
- </div>
- </div>
- <div>
- <div v-if="ints === 1" class="aListBottom">{{ listData.realname }}</div>
- <ul v-if="ints === 2">
- <li class="liBVS" v-for="(item, index) in peopleList" :key="index">
- {{ item.realname }}
- <i
- v-if="peopleList.length > 1"
- class="el-icon-error clsw"
- @click="peopleList.splice(index, 1)"
- ></i>
- </li>
- <div style="clear: both"></div>
- </ul>
- <p style="margin: 0px">您确定要取消所选学员的考试预约吗?</p>
- <p style="margin: 0px">取消后将无法恢复,请慎重考虑!</p>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogDJ = false">取消</el-button>
- <el-button type="primary" @click="submitChecksDJ">确定</el-button>
- </span>
- </el-dialog>
- <el-dialog
- :visible.sync="dialogQP"
- width="460px"
- :show-close="false"
- :close-on-click-modal="false"
- >
- <div slot="title" class="hearders">
- <div class="leftTitle">前培账号已开通标记</div>
- <div class="rightBoxs">
- <img
- src="@/assets/images/Close@2x.png"
- alt=""
- @click="dialogQP = false"
- />
- </div>
- </div>
- <div>
- <div v-if="ints === 1" class="aListBottom">{{ listData.realname }}</div>
- <ul v-if="ints === 2" style="margin: 0px">
- <li class="liBVS" v-for="(item, index) in peopleList" :key="index">
- {{ item.realname }}
- <i
- v-if="peopleList.length > 1"
- class="el-icon-error clsw"
- @click="peopleList.splice(index, 1)"
- ></i>
- </li>
- <div style="clear: both"></div>
- </ul>
- <el-select
- size="small"
- v-model="plan"
- placeholder="请选择前培计划"
- style="margin-bottom: 12px"
- >
- <el-option
- v-for="item in optionsList"
- :key="item.beforeId"
- :label="item.beforeName"
- :value="item.beforeId"
- >
- </el-option>
- </el-select>
- <p style="margin: 0px">所选学员的前培账号标记为【已开通】吗?</p>
- <div style="text-align: center; margin-top: 12px">
- <el-radio-group v-model="beforeStatus">
- <el-radio :label="1">是</el-radio>
- <el-radio :label="2">否</el-radio>
- </el-radio-group>
- </div>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogQP = false">取消</el-button>
- <el-button type="primary" @click="submitChecksQP">确定</el-button>
- </span>
- </el-dialog>
- <el-dialog
- :visible.sync="dialogPLS"
- width="460px"
- :show-close="false"
- :close-on-click-modal="false"
- >
- <div slot="title" class="hearders">
- <div class="leftTitle">成绩和证书登记</div>
- <div class="rightBoxs">
- <img
- src="@/assets/images/Close@2x.png"
- alt=""
- @click="dialogPLS = false"
- />
- </div>
- </div>
- <div>
- <div v-for="(item, index) in peopleList" :key="index">
- <div class="aListBottom">
- {{ item.realname }}
- <i
- v-if="peopleList.length > 1"
- class="el-icon-error clsw"
- @click="peopleList.splice(index, 1)"
- ></i>
- </div>
- <el-form label-width="100px">
- <el-form-item label="考试成绩" required>
- <el-input-number
- :controls="false"
- v-model="item.performance"
- :min="0"
- ></el-input-number
- >分
- </el-form-item>
- <el-form-item label="考试结果" required>
- <el-radio-group v-model="item.result">
- <el-radio :label="1">通过</el-radio>
- <el-radio :label="0">不通过</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item label="证书编号">
- <el-input v-model="item.certificateCode"></el-input>
- </el-form-item>
- <el-form-item label="登记补充">
- <el-input
- v-model="item.remark"
- type="textarea"
- :rows="4"
- ></el-input>
- </el-form-item>
- </el-form>
- </div>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogPLS = false">取消</el-button>
- <el-button type="primary" @click="submitChecksPals">确定</el-button>
- </span>
- </el-dialog>
- <el-dialog
- :visible.sync="dialogDR"
- width="660px"
- :show-close="false"
- :close-on-click-modal="false"
- >
- <div slot="title" class="hearders">
- <div class="leftTitle">导入</div>
- <div class="rightBoxs">
- <img
- src="@/assets/images/Close@2x.png"
- alt=""
- @click="dialogDR = false"
- />
- </div>
- </div>
- <div>
- <div class="swq">
- <img
- style="width: 182px; height: 168px"
- src="@/assets/images/dr.png"
- alt=""
- />
- </div>
- <div style="padding-left: 100px">
- <p>第一步:下载导入模板</p>
- <p style="padding-left: 50px">
- <i class="el-icon-upload"></i
- ><span class="dowmStys" @click="getDowm">下载模板</span>
- </p>
- <p>
- 第二步:(批量新增):适用于新增预约考试;使用模版整理文件,点击“上传Excel”完成导入
- </p>
- <label
- for="mobles"
- class="el-button el-button--primary"
- style="margin-left: 50px; padding: 10px 20px"
- >上传Excel</label
- ><input
- style="display: none"
- type="file"
- id="mobles"
- ref="input1"
- @change="importMobleadd"
- />
- <p>
- (批量修改):适用于修改预约、分数登记;使用模版整理文件,点击“上传Excel”完成导入
- </p>
- <label
- for="moblest"
- class="el-button el-button--primary"
- style="margin-left: 50px; padding: 10px 20px"
- >上传Excel</label
- ><input
- style="display: none"
- type="file"
- id="moblest"
- ref="input2"
- @change="importMobleEdit"
- />
- </div>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogDR = false">取消</el-button>
- <!-- <el-button type="primary" @click="submitChecksDR">确定</el-button> -->
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import * as baseUrls from "@/utils/request.js";
- import searchBoxNew from "@/components/searchBoxNew";
- import tableList from "@/components/tableList";
- import pagination from "@/components/pagination";
- export default {
- name: "AsPlanned",
- components: { searchBoxNew, tableList, pagination },
- data() {
- return {
- size: "small",
- plan: "",
- loading: false, //当前表单加载是否加载动画
- navText: {
- border: true,
- title: "计划",
- index: 0,
- ch: "条",
- num: false,
- choice: true,
- changeWidth: "240px",
- addHide: true,
- backFatherBtn: {
- status: false,
- title: "未定义",
- },
- },
- //搜索
- formList: [
- {
- prop: "subscribeStatus",
- placeholder: "预约状态",
- scope: "select",
- options: [
- { label: "正常", value: 1 },
- { label: "取消", value: 2 },
- ],
- },
- {
- prop: "applyId",
- placeholder: "考试标题",
- scope: "examList",
- },
- {
- prop: "beforeId",
- placeholder: "前培标题",
- scope: "beforeList",
- },
- {
- prop: "studentType",
- placeholder: "学员报名类型",
- scope: "select",
- options: [
- { label: "非补考学员", value: 1 },
- { label: "补考学员", value: 2 },
- ],
- },
- {
- prop: "examStatus",
- placeholder: "考试登记类型",
- scope: "select",
- options: [
- { label: "待登记", value: 0 },
- { label: "正常", value: 1 },
- { label: "缺考", value: 2 },
- { label: "作弊", value: 3 },
- { label: "替考", value: 4 },
- ],
- },
- {
- prop: "majorId",
- placeholder: "所报专业",
- scope: "ProfessionalList",
- },
- {
- prop: "realname",
- placeholder: "请输入用户名",
- },
- ],
- formData: {
- pageSize: 10,
- pageNum: 1,
- applyId: "",
- beforeId: "",
- },
- // 表单
- tableSet: [
- {
- label: "预约状态",
- prop: "subscribeStatus",
- hidden: true,
- width: "130px",
- scope: "isOptions",
- options: [
- {
- label: "正常",
- value: 1,
- },
- {
- label: "取消",
- value: 2,
- },
- ],
- },
- {
- label: "前培标记",
- prop: "beforeStatus",
- hidden: true,
- width: "130px",
- scope: "isOptions",
- options: [
- {
- label: "已开通",
- value: 1,
- },
- ],
- },
- {
- label: "考试登记",
- prop: "examStatus",
- hidden: true,
- width: "130px",
- scope: "isOptionsDZYQ",
- options: [
- {
- label: "待登记",
- value: 0,
- },
- {
- label: "正常",
- value: 1,
- },
- {
- label: "缺考",
- value: 2,
- },
- {
- label: "作弊",
- value: 3,
- },
- {
- label: "替考",
- value: 4,
- },
- ],
- },
- {
- label: "考试成绩和结果",
- prop1: "performance",
- prop2: "result",
- hidden: true,
- width: "130px",
- scope: "resultType",
- },
- {
- label: "证书编号",
- prop: "certificateCode",
- hidden: true,
- width: "130px",
- },
- {
- label: "考试标题",
- prop: "applyName",
- hidden: true,
- width: "130px",
- },
- {
- label: "前培标题",
- prop: "beforeName",
- hidden: true,
- width: "130px",
- },
- {
- label: "学员姓名",
- prop: "realname",
- hidden: true,
- width: "130px",
- },
- {
- label: "学员身份证",
- prop: "idCard",
- hidden: true,
- width: "170px",
- },
- {
- label: "所购商品",
- prop1: "goodsCode",
- prop2: "goodsName",
- prop3: "standPrice",
- hidden: true,
- width: "220px",
- scope: "goodsInfos",
- },
- {
- label: "学员报考类型",
- prop: "studentType",
- hidden: true,
- width: "130px",
- scope: "isOptions",
- options: [
- {
- label: "非补考学员",
- value: 1,
- },
- {
- label: "补考学员",
- value: 2,
- },
- ],
- },
- {
- label: "所报专业",
- prop: "categoryName",
- hidden: true,
- width: "130px",
- },
- {
- label: "预约场次(考试地点和时间)",
- prop1: "applySiteAddress",
- prop2: "applySiteExamTime",
- prop3: "applySiteStartTime",
- prop4: "applySiteEndTime",
- hidden: true,
- width: "280px",
- scope: "changAdress",
- },
- {
- label: "考试次数消耗",
- prop: "examExpend",
- hidden: true,
- width: "130px",
- },
- {
- label: "预约场次(考培地点和时间)",
- prop1: "applySiteAddressTrain",
- prop2: "applySiteExamTrainTime",
- prop3: "applySiteStartTrainTime",
- prop4: "applySiteEndTrainTime",
- hidden: true,
- width: "280px",
- scope: "changAdress",
- },
- {
- label: "前培次数消耗",
- prop: "beforeExpend",
- hidden: true,
- width: "130px",
- },
- {
- label: "创建时间",
- prop: "createTime",
- hidden: true,
- scope: "aTimeList",
- width: "160px",
- },
- ],
- tableData: [], //表单数据
- total: 0, //一共多少条
- dialogCG: false,
- dialogDJ: false,
- dialogQP: false,
- dialogPLS: false,
- dialogDR: false,
- listData: {},
- rules: {
- examStatus: [
- { required: true, message: "请选择考试登记状态", trigger: "change" },
- ],
- },
- ints: 0, //1单选2多选
- peopleList: [],
- optionsList: [],
- beforeStatus: "", //1已开通0未开通
- };
- },
- mounted() {
- if (this.$route.query.type == 1) {
- this.formData.applyId = Number(this.$route.query.id);
- }
- if (this.$route.query.type == 2) {
- this.formData.beforeId = Number(this.$route.query.id);
- }
- this.search();
- this.getQP();
- },
- activated() {
- this.search();
- this.getQP();
- },
- methods: {
- getDowm() {
- let url = baseUrls.BASE_IMG_URL + "/oss/images/file/20211228.xls";
- let link = document.createElement("a");
- let fileName = "导入模板" + ".xlsx";
- document.body.appendChild(link);
- link.href = url;
- link.dowmload = fileName;
- link.click();
- link.remove();
- },
- importMobleadd(e) {
- var self = this;
- var file = e.target.files[0];
- let formData = new FormData();
- formData.append("file", file);
- this.$api
- .editsystemimportDatae(formData)
- .then((res) => {
- if (res.msg) {
- let url = baseUrls.baseURL + "common/download?fileName=" + res.msg;
- let link = document.createElement("a");
- let fileName = "失败原因" + ".xlsx";
- document.body.appendChild(link);
- link.href = url;
- link.dowmload = fileName;
- link.click();
- link.remove();
- self.$message.warning("导出失败,请看失败xlsx原因");
- } else {
- self.$message.success("导入成功");
- }
- self.search();
- })
- .finally(() => {
- e.target.value = "";
- });
- },
- importMobleEdit(e) {
- var self = this;
- var file = e.target.files[0];
- let formData = new FormData();
- formData.append("file", file);
- this.$api
- .editsystemimportUpdateData(formData)
- .then((res) => {
- if (res.msg) {
- let url = baseUrls.baseURL + "common/download?fileName=" + res.msg;
- let link = document.createElement("a");
- let fileName = "失败原因" + ".xlsx";
- document.body.appendChild(link);
- link.href = url;
- link.dowmload = fileName;
- link.click();
- link.remove();
- self.$message.warning("导出失败,请看失败xlsx原因");
- } else {
- self.$message.success("导入成功");
- }
- self.search();
- })
- .finally(() => {
- e.target.value = "";
- });
- },
- openZS(row, int) {
- if (row.examStatus !== 1) {
- this.$message.warning("考试登记状态为正常的计划才可执行该操作");
- return;
- }
- this.ints = 1;
- this.peopleList = [JSON.parse(JSON.stringify(row))];
- this.dialogPLS = true;
- },
- //证书
- submitChecksPals() {
- for (let i = 0; i < this.peopleList.length; i++) {
- if (
- !this.peopleList[i].performance &&
- this.peopleList[i].performance !== 0
- ) {
- this.$message.warning(
- `第${i + 1}条数据未填写考试成绩,请填写考试成绩!`
- );
- return;
- }
- if (!this.peopleList[i].result && this.peopleList[i].result !== 0) {
- this.$message.warning(
- `第${i + 1}条数据未选择考试结果,请选择考试结果!`
- );
- return;
- }
- }
- this.$api.appsystemsubscribe(this.peopleList).then((res) => {
- if (this.ints === 1) {
- this.$message.success("已修改成绩和证书登记");
- }
- if (this.ints === 2) {
- this.$message.success("已批量修改成绩和证书登记");
- }
- this.search();
- this.dialogPLS = false;
- });
- },
- getQP() {
- this.$api.inquiresystembefore({ status: 1 }).then((res) => {
- this.optionsList = res.rows;
- });
- },
- submitChecksDR() {},
- moreActive(int) {
- if (int === 1) {
- this.$router.push({
- path: "bulkImportPlan",
- });
- return;
- }
- if (int === 2) {
- this.$router.push({
- path: "cancelAppointMent",
- });
- return;
- }
- if (int === 3) {
- this.$router.push({
- path: "examRegistration",
- });
- return;
- }
- if (int === 5) {
- this.$router.push({
- path: "formerAccount",
- });
- return;
- }
- if (int === 1) {
- this.dialogDR = true;
- return;
- }
- if (!this.$refs.tableList.allCheckData.length) {
- this.$message.warning("请勾选需要操作的计划");
- return;
- }
- if (int === 2) {
- this.$router.push({
- path: "cancelAppointMent",
- });
- return;
- this.peopleList = JSON.parse(
- JSON.stringify(this.$refs.tableList.allCheckData)
- );
- var ast = this.peopleList.every((item) => {
- return (
- item.subscribeStatus === 1 &&
- item.beforeStatus !== 1 &&
- item.examStatus === 0 &&
- !item.examExpend
- );
- });
- if (ast) {
- this.listData = {};
- this.ints = 2;
- this.dialogDJ = true;
- } else {
- this.$message({
- type: "warning",
- duration: 7000,
- showClose: true,
- message:
- "请勾选预约考试为正常和前培标记【空】以及考试登记状态为待登记和没有消耗过考试次数的计划",
- });
- return;
- }
- }
- if (int === 3) {
- this.peopleList = JSON.parse(
- JSON.stringify(this.$refs.tableList.allCheckData)
- );
- var ast = this.peopleList.every((item) => {
- return item.subscribeStatus === 1;
- });
- if (ast) {
- this.listData = {};
- this.ints = 2;
- this.dialogCG = true;
- } else {
- this.$message.warning("请勾选预约状态为正常的计划");
- return;
- }
- }
- if (int === 4) {
- this.peopleList = JSON.parse(
- JSON.stringify(this.$refs.tableList.allCheckData)
- );
- var ast = this.peopleList.every((item) => {
- return item.examStatus === 1 && item.subscribeStatus === 1;
- });
- if (ast) {
- this.listData = {};
- this.ints = 2;
- this.dialogPLS = true;
- } else {
- this.$message.warning("请勾选考试登记状态以及预约状态为正常的计划");
- return;
- }
- }
- if (int === 5) {
- this.peopleList = JSON.parse(
- JSON.stringify(this.$refs.tableList.allCheckData)
- );
- var ast = this.peopleList.every((item) => {
- return (
- item.examStatus === 0 && item.subscribeStatus === 1
- // && item.beforeCount
- );
- });
- if (ast) {
- this.listData = {};
- this.ints = 2;
- this.plan = "";
- this.beforeStatus = "";
- this.dialogQP = true;
- } else {
- this.$message({
- type: "warning",
- duration: 7000,
- showClose: true,
- message:
- "请勾选考试登记为待登记和预约状态为正常以及存在预约前培场次",
- });
- return;
- }
- }
- },
- examBox(row) {
- this.ints = 1;
- this.listData = JSON.parse(JSON.stringify(row));
- this.dialogCG = true;
- },
- editInfo(v) {
- this.addClick(v, 2);
- },
- submitChecks(formName) {
- this.$refs[formName].validate((valid) => {
- if (valid) {
- if (!this.listData.examStatus) {
- this.$message.warning("请选择考试登记状态");
- return;
- }
- this.submitForm();
- } else {
- console.log("error submit!!");
- return false;
- }
- });
- },
- submitChecksDJ() {
- if (this.ints === 1) {
- var data = JSON.parse(JSON.stringify(this.listData));
- data.subscribeId = [data.subscribeId];
- data.subscribeStatus = 2;
- this.$api.editsystemsubscribe(data).then((res) => {
- this.$message.success("已取消预约");
- this.dialogDJ = false;
- this.search();
- });
- }
- if (this.ints === 2) {
- var data = JSON.parse(JSON.stringify(this.listData));
- var arrays = [];
- this.peopleList.forEach((item) => {
- arrays.push(item.subscribeId);
- });
- data.subscribeId = arrays;
- data.subscribeStatus = 2;
- this.$api.editsystemsubscribe(data).then((res) => {
- this.$message.success("已批量取消预约");
- this.dialogDJ = false;
- this.search();
- });
- }
- },
- submitForm() {
- if (this.ints === 1) {
- var data = JSON.parse(JSON.stringify(this.listData));
- data.subscribeId = [data.subscribeId];
- this.$api.editsystemsubscribe(data).then((res) => {
- this.$message.success("考试登记修改成功");
- this.dialogCG = false;
- this.search();
- });
- }
- if (this.ints === 2) {
- var data = JSON.parse(JSON.stringify(this.listData));
- var arrays = [];
- this.peopleList.forEach((item) => {
- arrays.push(item.subscribeId);
- });
- data.subscribeId = arrays;
- this.$api.editsystemsubscribe(data).then((res) => {
- this.$message.success("批量考试登记修改成功");
- this.dialogCG = false;
- this.search();
- });
- }
- },
- submitChecksQP() {
- var data = JSON.parse(JSON.stringify(this.listData));
- if (!this.plan && this.beforeStatus === 1) {
- this.$message.warning("请选择前培计划");
- return;
- }
- if (!this.beforeStatus) {
- this.$message.warning("请选择是或否");
- return;
- }
- var arrays = [];
- this.peopleList.forEach((item) => {
- arrays.push(item.subscribeId);
- });
- data.subscribeId = arrays;
- if (this.beforeStatus === 1) {
- data.beforeStatus = 1;
- data.beforeId = this.plan;
- }
- if (this.beforeStatus === 2) {
- data.beforeStatus = 0;
- data.beforeId = "";
- }
- this.$api.editsystemsubscribe(data).then((res) => {
- this.$message.success("前培账号已开通标记修改成功");
- this.dialogQP = false;
- this.search();
- });
- },
- search(int) {
- this.loading = true;
- if (int === 1) {
- this.formData.pageNum = 1;
- }
- if (int === 2) {
- this.formData = {
- pageSize: 10,
- pageNum: 1,
- };
- }
- this.$api
- .inquiresystemsubscribelist(this.formData)
- .then((res) => {
- this.$refs.tableList.allCheckData = [];
- this.tableData = res.rows;
- this.total = res.total;
- this.navText.index = res.total;
- })
- .finally(() => {
- this.loading = false;
- });
- },
- init() {
- this.search(2);
- },
- del(v) {
- this.$alert(
- "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
- "提示",
- {
- dangerouslyUseHTMLString: true,
- }
- )
- .then(() => {
- var data = {
- gradeId: v.gradeId,
- status: -1,
- };
- this.$api.editGradegrade(data).then((res) => {
- this.$message.success("删除成功");
- this.search();
- });
- })
- .catch(() => {
- this.$message({
- type: "info",
- message: "已取消删除",
- });
- });
- },
- addClick(v, int) {
- console.log(v);
- // int = 2详情 3学员管理
- if (v === undefined) {
- // 添加班级
- this.$router.push({
- path: "addClass",
- });
- } else {
- if (int === 2) {
- //班级详情
- this.$router.push({
- path: "manageClass",
- query: {
- id: v.gradeId,
- },
- });
- }
- if (int === 3) {
- // 学员管理
- this.$router.push({
- path: "studentMenu",
- query: {
- id: v.gradeId,
- goodsId: v.goodsList[0].goodsId,
- },
- });
- }
- }
- },
- handleSizeChange(v) {
- this.formData.pageSize = v;
- this.formData.pageNum = 1;
- this.search();
- },
- handleCurrentChange(v) {
- this.formData.pageNum = v;
- this.search();
- },
- },
- };
- </script>
- <style lang="less" scoped>
- /deep/.el-button {
- border-radius: 8px;
- }
- /deep/.el-dialog {
- border-radius: 8px;
- .el-dialog__header {
- padding: 0;
- .hearders {
- height: 40px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0px 18px 0px 20px;
- border-bottom: 1px solid #e2e2e2;
- .leftTitle {
- font-size: 14px;
- font-weight: bold;
- color: #2f4378;
- }
- .rightBoxs {
- display: flex;
- align-items: center;
- img {
- width: 14px;
- height: 14px;
- margin-left: 13px;
- cursor: pointer;
- }
- }
- }
- }
- .el-dialog__footer {
- padding: 0;
- .dialog-footer {
- padding: 0px 40px;
- height: 70px;
- border-top: 1px solid #e2e2e2;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- }
- }
- }
- .imgBox {
- width: 100%;
- // height: 210px;
- border: 1px solid #e2e2e2;
- border-radius: 8px;
- padding: 8px 8px 3px;
- display: flex;
- flex-direction: column;
- align-items: center;
- .imgLabel {
- flex: 1;
- width: 100%;
- border: 1px dotted #e2e2e2;
- color: #999;
- font-size: 14px;
- cursor: pointer;
- border-radius: 8px;
- .msPhoto {
- display: flex;
- justify-content: center;
- align-items: center;
- max-width: 100%;
- max-height: 270px;
- img {
- max-width: 100%;
- max-height: 270px;
- }
- }
- .imgbbx {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- width: 100%;
- height: 100%;
- i {
- font-weight: bold;
- margin: 14px 0;
- font-size: 24px;
- }
- }
- }
- p {
- margin: 5px 0px;
- }
- }
- .aListBottom {
- margin-left: 20px;
- padding: 0px 6px;
- border: 1px solid #999;
- border-radius: 4px;
- height: 30px;
- line-height: 30px;
- display: inline-block;
- }
- .liBVS {
- margin-right: 20px;
- margin-bottom: 12px;
- padding: 0px 6px;
- border: 1px solid #999;
- border-radius: 4px;
- height: 30px;
- line-height: 30px;
- display: inline-block;
- float: left;
- }
- .clsw {
- margin-left: 4px;
- cursor: pointer;
- color: #f56c6c;
- }
- .swq {
- text-align: center;
- border-bottom: 1px solid #eee;
- }
- .dowmStys {
- color: blue;
- cursor: pointer;
- }
- </style>
|