Browse Source

商品包合并

En route 1 year ago
parent
commit
f96d5198dd

+ 8 - 0
src/newApi/orderBusiness.js

@@ -31,4 +31,12 @@ export default {
             method: 'get',
         })
     },
+    //新增商品包
+    addProductPack(data) {
+        return request({
+            url: '/order/business/config/withEntity',
+            method: 'post',
+            data
+        })
+    },
 }

+ 291 - 0
src/views/Marketing/productPackManage/component/editGoodsPack.vue

@@ -0,0 +1,291 @@
+<template>
+  <div>
+    <el-dialog
+      @closed="loadingClose"
+      :visible.sync="isEditDialog"
+      width="430px"
+      :show-close="false"
+      :close-on-click-modal="false"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          {{ dialogTitle }}
+        </div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Close@2x.png"
+            alt=""
+            @click="isEditDialog = false"
+          />
+        </div>
+      </div>
+      <div class="content">
+        <el-form
+          label-position="right"
+          label-width="100px"
+          :model="ruleForm"
+          :rules="rules"
+          ref="ruleForm"
+        >
+          <el-form-item label="商品包名称" prop="configName">
+            <el-input
+              v-model="ruleForm.configName"
+              placeholder="请输入"
+              style="width: 220px"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="教育类型" prop="educationTypeId">
+            <el-select v-model="ruleForm.educationTypeId" placeholder="请选择">
+              <el-option
+                v-for="(item, index) in educationType"
+                :key="index"
+                :label="item.educationName"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="业务层次" prop="businessId">
+            <el-select
+              v-model="ruleForm.businessId"
+              placeholder="请选择"
+              :disabled="!ruleForm.educationTypeId"
+            >
+              <el-option
+                v-for="(item, index) in newBusinessList"
+                :key="index"
+                :label="item.projectName + ' - ' + item.businessName"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="班级类型" prop="gradeType">
+            <el-select v-model="ruleForm.gradeType" placeholder="请选择">
+              <el-option
+                v-for="(item, index) in gradeType"
+                :key="index"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="上传主图" prop="mainImg">
+            <div
+              style="
+                width: 120px;
+                height: 120px;
+                border: 2px dashed #999;
+                border-radius: 28px;
+                line-height: 120px;
+                text-align: center;
+              "
+              v-if="!ruleForm.mainImg"
+            >
+              <label for="mainImg">
+                <i class="el-icon-circle-plus-outline iconStsz"></i>
+              </label>
+              <input
+                id="mainImg"
+                type="file"
+                ref="fileMianImg"
+                style="display: none"
+                @change="uploadImg"
+              />
+            </div>
+            <el-image
+              v-else
+              style="width: 120px; height: 120px"
+              :src="$methodsTools.splitImgHost(ruleForm.mainImg)"
+              :preview-src-list="[$methodsTools.splitImgHost(ruleForm.mainImg)]"
+            >
+            </el-image>
+            <el-button
+              v-if="ruleForm.mainImg"
+              style="margin-top: 10px; display: block"
+              type="danger"
+              size="mini"
+              @click="clearImgs()"
+            >
+              删除
+            </el-button>
+          </el-form-item>
+          <el-form-item label="状态" prop="status">
+            <el-radio-group v-model="ruleForm.status">
+              <el-radio :label="1">开启</el-radio>
+              <el-radio :label="0">关闭</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-form>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="isEditDialog = false">取 消</el-button>
+        <el-button type="primary" :loading="disabledBtn" @click="submitForm()"
+          >{{ dialogTitle === "新增" ? "下一步" : "确 定" }}
+        </el-button>
+      </span>
+    </el-dialog>
+
+    <matchingDialog ref="matchingDialog" @close="isEditDialog = false" />
+  </div>
+</template>
+  
+<script>
+import { mapGetters } from "vuex";
+import matchingDialog from "./matchingDialog.vue";
+export default {
+  components: { matchingDialog },
+  data() {
+    return {
+      ruleForm: {},
+      isEditDialog: false,
+      disabledBtn: false,
+      dialogTitle: "新增",
+      newBusinessList: [], //项目类型-业务层次
+      isBusinessId: true, // 用来判断,第一次打开弹窗不能清空businessId字段数据
+      rules: {
+        configName: [
+          { required: true, message: "请输入商品包名称", trigger: "blur" },
+        ],
+        educationTypeId: [
+          { required: true, message: "请选择教育类型", trigger: "blur" },
+        ],
+        businessId: [
+          { required: true, message: "请选择业务层次", trigger: "blur" },
+        ],
+        gradeType: [
+          { required: true, message: "请选择班级类型", trigger: "blur" },
+        ],
+        status: [{ required: true, message: "状态", trigger: "blur" }],
+        mainImg: [{ required: true, message: "未上传主图", trigger: "change" }],
+      },
+      gradeType: [
+        {
+          label: "基础班",
+          value: 1,
+        },
+        {
+          label: "强化班",
+          value: 2,
+        },
+        {
+          label: "私塾班",
+          value: 3,
+        },
+      ],
+    };
+  },
+  computed: {
+    ...mapGetters(["educationType"]),
+  },
+  watch: {
+    // 获取业务层次-项目类型列表
+    "ruleForm.educationTypeId"() {
+      if (this.isBusinessId) this.$set(this.ruleForm, "businessId", null);
+      this.$api
+        .inquirebusinessList({
+          status: 1,
+          educationId: this.ruleForm.educationTypeId,
+        })
+        .then((res) => {
+          this.newBusinessList = res.rows;
+        });
+      this.isBusinessId = true;
+    },
+  },
+  mounted() {},
+
+  methods: {
+    // 打开匹配弹窗
+    openMatchingDialog() {
+      this.$refs.matchingDialog.openBoxs(this.ruleForm);
+    },
+    openBoxs(row, type) {
+      this.isEditDialog = true;
+      if (type === "add") {
+        this.dialogTitle = "新增";
+        this.ruleForm = {};
+        return;
+      }
+      this.dialogTitle = "修改";
+      this.ruleForm = JSON.parse(JSON.stringify(row));
+      this.newBusinessList = [];
+      this.isBusinessId = false;
+    },
+    close() {
+      this.$emit("refresh");
+    },
+    submitForm() {
+      this.$refs["ruleForm"].validate((valid) => {
+        if (valid) {
+          this.disabledBtn = true;
+          const _request =
+            this.dialogTitle === "新增"
+              ? this.$api.addProductPack
+              : this.$api.editorderbusinessconfig;
+          _request(this.ruleForm)
+            .then((res) => {
+              if (this.dialogTitle === "新增") {
+                this.$refs.matchingDialog.openBoxs(res.data); // 打开下一步,商品包匹配弹窗
+              } else {
+                this.$message.success("操作成功");
+                this.isEditDialog = false;
+              }
+            })
+            .finally(() => {
+              this.disabledBtn = false;
+              console.log("end");
+            });
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    // 上传主图操作
+    uploadImg(e) {
+      console.log(e);
+      var self = this;
+      var file = e.target.files[0];
+      if (file === undefined) {
+        self.$set(self.ruleForm, "mainImg", "");
+        e.target.value = "";
+        return;
+      }
+      if (file.size > 2 * 1024 * 1024) {
+        self.$message.error("图片不得大于2MB");
+        return;
+      }
+      var type = e.target.value.toLowerCase().split(".").splice(-1);
+      if (
+        type[0] != "jpg" &&
+        type[0] != "png" &&
+        type[0] != "jpeg" &&
+        type[0] != "gif"
+      ) {
+        self.$message.error("上传格式需为:.jpg/.png/.jpeg/gif");
+        e.target.value = "";
+        return;
+      }
+      this.$upload
+        .upload(file, 0)
+        .then((res) => {
+          this.$set(this.ruleForm, "mainImg", res);
+          console.log(self.ruleForm.mainImg);
+        })
+        .finally(() => {
+          e.target.value = "";
+        });
+    },
+    // 清除上传图片
+    clearImgs() {
+      this.$set(this.ruleForm, "mainImg", "");
+    },
+  },
+};
+</script>
+  
+<style lang="scss" scoped>
+</style>
+  

+ 493 - 0
src/views/Marketing/productPackManage/component/matchingDialog.vue

@@ -0,0 +1,493 @@
+<template>
+  <div>
+    <el-dialog
+      @closed="close"
+      :visible.sync="isMatchingDialog"
+      width="830px"
+      :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="isMatchingDialog = false"
+          />
+        </div>
+      </div>
+      <div>
+        <div>
+          教育类型:{{ queryData.educationName }}
+          <span style="margin: 0 25px;">业务层次:{{queryData.projectName + ' - ' + queryData.businessName }} </span>
+          班级类型:{{
+            queryData.gradeType === 1
+              ? "基础班"
+              : queryData.gradeType === 2
+              ? "强化班" 
+              : "私塾班"
+          }}
+        </div>
+      </div>
+      <div
+        style="width: 100%; margin-top: 16px; height: 500px; overflow-y: auto"
+      >
+        <el-table
+          border
+          :data="tableData"
+          :header-cell-style="{ 'text-align': 'center' }"
+          :cell-style="{ 'text-align': 'center' }"
+          v-loading="loading"
+        >
+          <el-table-column label="序号" type="index" width="50">
+          </el-table-column>
+          <el-table-column
+            v-for="(item, index) in tableSet"
+            :key="index"
+            :prop="item.prop"
+            :label="item.label"
+            :width="item.width"
+          >
+            <template slot-scope="scope">
+              <ul v-if="item.scope === 'list'">
+                <li
+                  v-for="(items, indexs) in comList(
+                    scope.row[item.prop],
+                    item.goodsType
+                  )"
+                  :key="indexs"
+                >
+                  {{ items.goodsName }}
+                  <span v-if="items.categoryName"
+                    >({{ items.categoryName }})</span
+                  >
+                </li>
+              </ul>
+              <span v-else>{{ scope.row[item.prop] }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="操作"
+            align="center"
+            fixed="right"
+            width="180px"
+          >
+            <template slot-scope="scope">
+              <el-button type="text" @click="setOption(scope.row)"
+                >匹配商品</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </el-dialog>
+    <el-dialog
+      :visible.sync="disBoxs"
+      width="660px"
+      :show-close="false"
+      :close-on-click-modal="false"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">
+          匹配商品
+          <span style="font-size: 12px; color: #333333">(可以多选)</span>
+        </div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Close@2x.png"
+            alt=""
+            @click="disBoxs = false"
+          />
+        </div>
+      </div>
+      <div style="margin-bottom: 10px">
+        <el-input
+          :size="size"
+          v-model="goodsName"
+          style="width: 190px"
+          placeholder="请输入商品名称"
+        ></el-input>
+        <el-button
+          :size="size"
+          style="margin-left: 10px"
+          type="primary"
+          @click="getSeachData(activeType)"
+          >查询</el-button
+        >
+        <el-button :size="size" @click="init">重置</el-button>
+      </div>
+      <el-row :gutter="10">
+        <el-col :span="4">
+          <label>{{ newData.subjectName }} </label>
+          <ul>
+            <li
+              v-for="(item, index) in goodsType"
+              :key="index"
+              class="liSty"
+              :style="activeType === item.value ? 'color:red;' : ''"
+              @click="searchGoods(item.value)"
+            >
+              {{ item.label }}
+            </li>
+          </ul>
+        </el-col>
+        <el-col :span="20">
+          <div
+            style="margin-top: 14px; text-align: center"
+            v-if="!goodsList.length"
+          >
+            暂无符合条件商品
+          </div>
+          <el-checkbox-group v-model="checkList" v-loading="subLoading">
+            <ul
+              style="
+                max-height: 240px;
+                overflow: auto;
+                background: #eee;
+                margin-top: 10px;
+              "
+            >
+              <li
+                v-for="(item, index) in goodsList"
+                :key="index"
+                style="padding: 10px; font-size: 13px"
+              >
+                <el-checkbox :label="item.goodsId">
+                  {{ item.year }} / {{ item.goodsName }} /
+                  <span style="color: red">¥{{ item.standPrice }}</span>
+                </el-checkbox>
+              </li>
+            </ul>
+          </el-checkbox-group>
+        </el-col>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="disBoxs = false">取 消</el-button>
+        <el-button @click="submitForms">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+  
+  <script>
+export default {
+  data() {
+    return {
+      size: "mini",
+      queryData: {},
+      businessData: {},
+      tableData: [],
+      tableSet: [
+        {
+          label: "专业",
+          prop: "subjectName",
+        },
+        {
+          label: "视频商品",
+          prop: "goodsList",
+          scope: "list",
+          goodsType: 1,
+        },
+        {
+          label: "题库商品",
+          prop: "goodsList",
+          scope: "list",
+          goodsType: 2,
+        },
+      ],
+      disBoxs: false,
+      goodsType: [
+        {
+          label: "视频商品",
+          value: 1,
+        },
+        {
+          label: "题库商品",
+          value: 2,
+        },
+        {
+          label: "补考商品",
+          value: 3,
+        },
+        {
+          label: "前培商品",
+          value: 4,
+        },
+      ],
+      activeType: "",
+      goodsName: "",
+      newData: {},
+      goodsList: [],
+      checkList: [],
+      statusPop: "", //1新增2修改
+      isMatchingDialog: false,
+      loading: false, // 匹配商品加载
+      subLoading: false, // 搜索弹窗内容加载
+    };
+  },
+  computed: {
+    comList: function () {
+      return function (v, int) {
+        let arr = [];
+        v.forEach((item) => {
+          if (item.goodsType == int) {
+            arr.push(item);
+          }
+        });
+        return arr;
+      };
+    },
+  },
+  watch: {
+    activeType(val, oldVal) {
+      if (!val) return;
+      this.getSeachData(val);
+    },
+  },
+  methods: {
+    openBoxs(row) {
+      this.isMatchingDialog = true;
+      this.queryData = row;
+      this.tableData = []
+      console.log(this.queryData, "queryData");
+      this.initData();
+    },
+    init() {
+      this.goodsName = "";
+      this.getSeachData(this.activeType);
+    },
+    /**
+     * 搜索弹窗内容
+     */
+    getSeachData(type) {
+      this.subLoading = true
+      var data = {
+        educationTypeId: Number(this.queryData.educationTypeId),
+        businessId: Number(this.queryData.businessId),
+        goodsType: type,
+        goodsName: this.goodsName || "",
+        goodsStatus: 1,
+        status: 1,
+      };
+      if (type == 1 || type == 2) {
+        data.subjectId = this.newData.subjectId;
+      }
+      this.$api.inquireGoods(data).then((res) => {
+        this.goodsList = res.rows;
+      }).finally(() => {
+        this.subLoading = false
+      })
+    },
+    /**
+     * 设置
+     */
+    setOption(v) {
+      this.newData = JSON.parse(JSON.stringify(v));
+      this.checkList = v.goodsList.map((item) => {
+        return item.goodsId;
+      });
+      if (this.checkList.length) {
+        this.statusPop = 2;
+      } else {
+        this.statusPop = 1;
+      }
+      this.activeType = 1;
+      this.goodsName = "";
+      this.getSeachData(1);
+      this.disBoxs = true;
+    },
+    searchGoods(int) {
+      this.activeType = int;
+    },
+    submitForms() {
+      if (this.statusPop === 1) {
+        if (!this.checkList.length) {
+          this.$message.warning("请选择匹配商品");
+          return;
+        }
+        //新增
+        this.$api
+          .apporderconfiggoods({
+            configId: this.queryData.id,
+            subjectId: this.newData.subjectId,
+            status: 1,
+            goodsIds: this.checkList.toString(),
+          })
+          .then((res) => {
+            this.$message.success("提交成功");
+            this.disBoxs = false;
+            this.initData();
+          });
+      }
+      if (this.statusPop === 2) {
+        //修改
+        this.$api
+          .editorderconfiggoods({
+            configId: this.queryData.id,
+            id: this.newData.id,
+            subjectId: this.newData.subjectId,
+            status: this.checkList.length ? 1 : -1,
+            goodsIds: this.checkList.toString(),
+          })
+          .then((res) => {
+            this.$message.success("提交成功");
+            this.disBoxs = false;
+            this.initData();
+          });
+      }
+    },
+    close() {
+      this.$emit("close");
+    },
+    initData() {
+      this.loading = true;
+      this.$api
+        .inquireCourseSubject({
+          educationTypeId: Number(this.queryData.educationTypeId),
+          businessId: Number(this.queryData.businessId),
+          status: 1,
+        })
+        .then((res) => {
+          this.$api
+            .inquireorderconfiggoodsList({
+              configId: Number(this.queryData.id),
+            })
+            .then((result) => {
+              let arr = res.rows.map((item) => {
+                return {
+                  subjectId: item.id,
+                  subjectName: item.subjectName,
+                  goodsList: [],
+                };
+              });
+              result.rows.forEach((item) => {
+                0;
+                arr.forEach((items) => {
+                  if (items.subjectId == item.subjectId) {
+                    items.goodsList = item.goodsList;
+                    items.id = item.id;
+                  }
+                });
+              });
+              this.tableData = arr;
+            })
+            .finally(() => {
+              this.loading = false;
+            });
+        })
+        .finally(() => {
+          console.log('end')
+        });
+    },
+  },
+};
+</script>
+  
+  <style lang="less" scoped>
+.liSty {
+  padding: 8px 0px;
+  cursor: pointer;
+  text-align: center;
+}
+.topSty {
+  display: inline-block;
+  font-size: 14px;
+  margin-left: 12px;
+  background: #eee;
+  padding: 4px;
+}
+/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__body {
+    padding: 10px 20px;
+  }
+  .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;
+  }
+}
+</style>
+  

+ 378 - 0
src/views/Marketing/productPackManage/index.vue

@@ -0,0 +1,378 @@
+<template>
+  <div id="offlineOrder">
+    <search-box-new
+      ref="searchBox"
+      :formData="formData"
+      :formList="formList"
+      @search="search"
+      @init="init"
+    />
+    <table-list
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      :loading="loading"
+    >
+      <template slot="customize">
+        <el-button
+          size="medium"
+          type="warning"
+          @click="openEditGoodsPackDialog(null, 'add')"
+          >新增</el-button
+        >
+      </template>
+      <template slot="btn" slot-scope="props">
+        <el-button
+          type="text"
+          @click="openEditGoodsPackDialog(props.scope.row, 'edit')"
+          >修改</el-button
+        >
+        <el-button type="text" @click="openMatchingDialog(props.scope.row)"
+          >匹配</el-button
+        >
+        <el-button type="text" @click="del(props.scope.row)">删除</el-button>
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="formData.pageSize"
+      :currentPage="formData.pageNum"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+    <editGoodsPack ref="editGoodsPack" @refresh="init()" />
+    <matchingDialog ref="matchingDialog" @refresh="init()" />
+  </div>
+</template>
+  
+  <script>
+import searchBoxNew from "@/components/searchBoxNew";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+import editGoodsPack from "./component/editGoodsPack.vue";
+import matchingDialog from "./component/matchingDialog.vue";
+export default {
+  name: "OfflineOrder",
+  components: {
+    searchBoxNew,
+    tableList,
+    pagination,
+    editGoodsPack,
+    matchingDialog,
+  },
+  data() {
+    return {
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "商品包列表",
+        index: 0,
+        ch: "条",
+        addHide: true,
+        custom: false,
+        choice: true,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      //搜索
+      formList: [
+        {
+          prop: "educationId",
+          placeholder: "教育类型",
+          scope: "educationType",
+        },
+        {
+          prop: "businessId",
+          placeholder: "业务层次",
+          scope: "businessLevel",
+          edu: "educationId",
+        },
+        {
+          prop: "goodsStatus",
+          placeholder: "商品包状态",
+          scope: "select",
+          options: [
+            {
+              label: "开启",
+              value: 1,
+            },
+            {
+              label: "关闭",
+              value: 0,
+            },
+          ],
+        },
+        {
+          prop: "gradeType",
+          placeholder: "班级类型",
+          scope: "select",
+          options: [
+            {
+              label: "基础班",
+              value: 1,
+            },
+            {
+              label: "强化班",
+              value: 2,
+            },
+            {
+              label: "私塾班",
+              value: 3,
+            },
+          ],
+        },
+        {
+          prop: "configName",
+          placeholder: "商品包名称",
+        },
+      ],
+      formData: {
+        status: "0,1",
+        pageSize: 10,
+        pageNum: 1,
+      },
+      tableSet: [
+        {
+          label: "商品包名称",
+          prop: "configName",
+          hidden: true,
+        },
+        {
+          label: "教育类型",
+          prop: "educationName",
+          hidden: true,
+        },
+        {
+          label: "业务层次",
+          prop: "projectName",
+          hidden: true,
+        },
+        {
+          label: "主图",
+          prop: "mainImg",
+          scope: "img",
+          hidden: true,
+          width: "100",
+        },
+        {
+          label: "班级类型",
+          prop: "gradeType",
+          scope: "isOptions",
+          hidden: true,
+          options: [
+            {
+              label: "基础班",
+              value: 1,
+            },
+            {
+              label: "强化班",
+              value: 2,
+            },
+            {
+              label: "私塾班",
+              value: 3,
+            },
+          ],
+        },
+        {
+          label: "状态",
+          prop: "status",
+          scope: "isOptions",
+          hidden: true,
+          options: [
+            {
+              label: "开启",
+              value: 1,
+            },
+            {
+              label: "关闭",
+              value: 0,
+            },
+          ],
+        },
+      ],
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+    };
+  },
+  mounted() {
+    this.search();
+  },
+  activated() {
+    this.search();
+  },
+  methods: {
+    // 打开新增/编辑商品包弹窗
+    openEditGoodsPackDialog(row, type) {
+      this.$refs.editGoodsPack.openBoxs(row, type);
+    },
+    // 打开匹配弹窗
+    openMatchingDialog(row) {
+      this.$refs.matchingDialog.openBoxs(row);
+    },
+    search(int) {
+      this.loading = true;
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      if (int === 2) {
+        this.formData = {
+          status: "0,1",
+          pageSize: 10,
+          pageNum: 1,
+        };
+      }
+      if (this.formData.goodsStatus == 0 || this.formData.goodsStatus) {
+        this.formData.status = this.formData.goodsStatus;
+      }
+      var data = JSON.parse(JSON.stringify(this.formData));
+      this.$api
+        .inquireorderbusinessconfigList(data)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          this.navText.index = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    /**
+     * 删除
+     */
+    del(v) {
+      this.$alert(
+        "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
+        "提示",
+        {
+          dangerouslyUseHTMLString: true,
+        }
+      )
+        .then(() => {
+          var data = {
+            businessId: v.businessId,
+            id: v.id,
+            status: -1,
+          };
+          this.$api.editorderbusinessconfig(data).then((res) => {
+            this.$message.success("删除成功");
+            this.search(1);
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+    init() {
+      this.search(2);
+    },
+    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;
+  }
+}
+</style>
+  
+  

+ 11 - 8
src/views/education/examManagement/examArrangement/index.vue

@@ -13,14 +13,14 @@
         <el-button size="medium" type="warning" @click="setExamAdress"
           >配置考试地点</el-button
         >
-        <!-- <el-button size="medium" type="primary" @click="openPeopleNumDialog"
+        <el-button size="medium" type="primary" @click="openPeopleNumDialog"
           >批量修改人数</el-button
-        > -->
+        >
       </template>
       <template slot="btn" slot-scope="props">
-        <el-button type="text" @click="beforeFunc(props.scope.row)"
+        <!-- <el-button type="text" @click="beforeFunc(props.scope.row)"
           >前培设置</el-button
-        >
+        > -->
         <el-button
           type="text"
           @click="addClick(props.scope.row, 0)"
@@ -33,12 +33,12 @@
           :disabled="props.scope.row.status === 1"
           >考点设置</el-button
         >
-        <el-button
+        <!-- <el-button
           type="text"
           @click="setExams(props.scope.row, 2)"
           :disabled="props.scope.row.status === 1"
           >考培设置</el-button
-        >
+        > -->
         <el-button
           type="text"
           @click="editGoods(props.scope.row)"
@@ -762,7 +762,10 @@ export default {
       loading: false, //当前表单加载是否加载动画
       isPeopleNumDialog: false,
       peopleRules: { num: [{ required: true, message: "请输入", trigger: "blur" }]},
-      peopleNumDate: {},
+      peopleNumDate: {
+        num: '',
+        applyIds: []
+      },
       navText: {
         title: "考试安排",
         index: 0,
@@ -959,7 +962,6 @@ export default {
     },
     // 保存修改人数
     handlePeopleNum() {
-      this.isPeopleNumDialog = false
       this.$refs['peopleNum'].validate((valid) => {
         if (valid) {
           this.$api.editPeopleNum(this.peopleNumDate).then(res => {
@@ -967,6 +969,7 @@ export default {
             this.search();
           }).finally(() => {
             console.log('error submit!')
+            this.isPeopleNumDialog = false
           })
         } else {
           return false;

+ 8 - 8
src/views/resource/bankManagement/testPaperManagement/addPaper/topicAddPaper/index.vue

@@ -1136,14 +1136,14 @@ export default {
         this.disableTypeStatus =
           res.data.businessName === "安管三类" ? true : false;
         this.businObj = {
-          businessId: res.data.businessId,
-          businessName: res.data.businessName,
-          educationName: res.data.educationName,
-          educationTypeId: res.data.educationTypeId,
-          projectName: res.data.projectName,
-          projectId: res.data.projectId,
-          subjectName: res.data.subjectName,
-          subjectId: res.data.subjectId,
+          businessId: res.data.businessList[0].businessId,
+          businessName: res.data.businessList[0].businessName,
+          educationName: res.data.businessList[0].educationName,
+          educationTypeId: res.data.businessList[0].educationTypeId,
+          projectName: res.data.businessList[0].projectName,
+          projectId: res.data.businessList[0].projectId,
+          subjectName: res.data.businessList[0].subjectName,
+          subjectId: res.data.businessList[0].subjectId,
         };
         this.djTime = res.data.answerTime;
         this.djNum = res.data.answerNum;

+ 8 - 8
src/views/resource/bankManagement/testPaperManagement/editPaper/topicEditPaper/index.vue

@@ -1197,14 +1197,14 @@ export default {
         this.disableTypeStatus =
           res.data.businessName === "安管三类" ? true : false;
         this.businObj = {
-          businessId: res.data.businessId,
-          businessName: res.data.businessName,
-          educationName: res.data.educationName,
-          educationTypeId: res.data.educationTypeId,
-          projectName: res.data.projectName,
-          projectId: res.data.projectId,
-          subjectName: res.data.subjectName,
-          subjectId: res.data.subjectId,
+          businessId: res.data.businessList[0].businessId,
+          businessName: res.data.businessList[0].businessName,
+          educationName: res.data.businessList[0].educationName,
+          educationTypeId: res.data.businessList[0].educationTypeId,
+          projectName: res.data.businessList[0].projectName,
+          projectId: res.data.businessList[0].projectId,
+          subjectName: res.data.businessList[0].subjectName,
+          subjectId: res.data.businessList[0].subjectId,
         };
         this.djTime = res.data.answerTime;
         this.djNum = res.data.answerNum;

+ 41 - 39
src/views/systemManagement/roleManagement/index.vue

@@ -151,6 +151,7 @@
                   :disabled="statusPop === 2"
                   v-else-if="items.scope === 'textarea'"
                   type="textarea"
+                  :rows="1"
                   v-model="listData[items.prop]"
                 ></el-input>
                 <el-input-number
@@ -265,22 +266,22 @@ export default {
           hidden: true,
           scope: "status",
         },
-        // {
-        //   label: "手机号码权限",
-        //   prop: "phoneConceal",
-        //   hidden: true,
-        //   scope: "isOptions",
-        //   options: [
-        //     {
-        //       label: "显示",
-        //       value: 1,
-        //     },
-        //     {
-        //       label: "隐藏",
-        //       value: 0,
-        //     },
-        //   ],
-        // },
+        {
+          label: "手机号码权限",
+          prop: "phoneConceal",
+          hidden: true,
+          scope: "isOptions",
+          options: [
+            {
+              label: "显示",
+              value: 1,
+            },
+            {
+              label: "隐藏",
+              value: 0,
+            },
+          ],
+        },
         {
           label: "创建时间",
           prop: "createTime",
@@ -331,22 +332,27 @@ export default {
             },
           ],
         },
-        // {
-        //   label: "手机号码权限",
-        //   prop: "phoneConceal",
-        //   hidden: true,
-        //   scope: "status",
-        //   options: [
-        //     {
-        //       label: "显示",
-        //       value: 1,
-        //     },
-        //     {
-        //       label: "隐藏",
-        //       value: 0,
-        //     },
-        //   ],
-        // },
+        {
+          label: "手机号码权限",
+          prop: "phoneConceal",
+          hidden: true,
+          scope: "status",
+          options: [
+            {
+              label: "显示",
+              value: 1,
+            },
+            {
+              label: "隐藏",
+              value: 0,
+            },
+          ],
+        },
+        {
+          label: "备注",
+          prop: "remark",
+          scope: "textarea",
+        },
         {
           label: "菜单权限",
           prop: "menuIds",
@@ -357,11 +363,7 @@ export default {
           prop: "keys",
           scope: "treeInfo",
         },
-        {
-          label: "备注",
-          prop: "remark",
-          scope: "textarea",
-        },
+
       ],
       //   弹窗数据
       listData: {},
@@ -379,7 +381,7 @@ export default {
           { required: true, message: "请输入岗位顺序", trigger: "blur" },
         ],
         status: [{ required: true, message: "请选择状态", trigger: "change" }],
-        // phoneConceal: [{ required: true, message: "请选择手机号码权限", trigger: "change" }],
+        phoneConceal: [{ required: true, message: "请选择手机号码权限", trigger: "change" }],
         // remark: [{ required: true, message: "请填写备注", trigger: "blur" }],
       },
     };
@@ -588,7 +590,7 @@ export default {
         roleKey: undefined,
         roleSort: 0,
         status: "",
-        // phoneConceal: 0,
+        phoneConceal: 0,
         menuIds: [],
         deptIds: [],
         menuCheckStrictly: true,