Parcourir la source

新增关联模考

谢杰标 il y a 3 ans
Parent
commit
fe6f5a071f

+ 4 - 0
src/components/tableList.vue

@@ -961,6 +961,10 @@
               $methodsTools.onlyForma(scope.row[item.prop2], item.Diszing)
             }}</span
           >
+          <span v-else-if="item.scope === 'layered'">
+            <div>{{scope.row[item.prop1]}}</div>
+            <div v-if="scope.row[item.prop2]">({{scope.row[item.prop2]}})</div>
+          </span>
           <span v-else-if="item.scope === 'aTimeList'">{{
             scope.row[item.prop] === null
               ? "--"

+ 4 - 4
src/views/Marketing/goods/spec/compoent/SpecBox.vue

@@ -13,7 +13,7 @@
         <el-button type="text" @click="delSpec">删除规则</el-button>
       </div>
       <el-form-item label=" " prop="name">
-        <el-input v-model="form.name" style="width: 220px"></el-input>
+        <el-input v-model.trim="form.name" style="width: 220px"></el-input>
       </el-form-item>
       <div class="line"></div>
       <el-form-item
@@ -23,7 +23,7 @@
         :key="index"
         :rules="[{ required: true, validator: checkSpecVal, trigger: 'blur' }]"
       >
-        <el-input v-model="item.name"
+        <el-input v-model.trim="item.name"
           ><el-button
             @click="del(index)"
             style="margin-right: -60px"
@@ -33,7 +33,7 @@
           ></el-input
         >
       </el-form-item>
-      <el-button @click="add" style="margin: 30px 0 0 0" type="text"
+      <el-button @click="add" style="margin: 20px 0 0 0" type="text"
         >添加</el-button
       >
     </el-form>
@@ -180,7 +180,7 @@ export default {
   }
   /deep/ {
     .el-input {
-      margin-top: 20px;
+      // margin-top: 20px;
     }
     .el-form-item {
       margin-right: 60px;

+ 2 - 3
src/views/Marketing/goods/spec/specAdd.vue

@@ -46,7 +46,7 @@
           </div>
         </el-form-item>
         <el-form-item label="名称" prop="name">
-          <el-input v-model="ruleForm.name" style="width: 220px"></el-input>
+          <el-input v-model.trim="ruleForm.name" style="width: 220px"></el-input>
         </el-form-item>
         <el-form-item label="商品规格" class="eee" prop="specList">
           <div class="spec-title">最多添加两个商品规格类型</div>
@@ -217,9 +217,8 @@ export default {
     /deep/ {
       .eee {
         .el-form-item__content {
-          margin-top: 10px;
+          margin-top: 20px;
           background: #eee;
-          min-height: 60px;
         }
       }
     }

+ 2 - 3
src/views/Marketing/goods/spec/specEdit.vue

@@ -45,7 +45,7 @@
           </div>
         </el-form-item>
         <el-form-item label="名称" prop="name">
-          <el-input v-model="ruleForm.name" style="width: 220px"></el-input>
+          <el-input v-model.trim="ruleForm.name" style="width: 220px"></el-input>
         </el-form-item>
         <el-form-item label="商品规格" class="eee" prop="specList">
           <div class="spec-title">最多添加两个商品规格类型</div>
@@ -217,9 +217,8 @@ export default {
     /deep/ {
       .eee {
         .el-form-item__content {
-          margin-top: 10px;
+          margin-top: 20px;
           background: #eee;
-          min-height: 60px;
         }
       }
     }

+ 162 - 4
src/views/education/marketingCampaignManageMent/marketingActivitiesList/index.vue

@@ -59,8 +59,9 @@
           <el-form-item label="活动名称" prop="name">
             <el-input v-model="listData.name"></el-input>
           </el-form-item>
-          <el-form-item label="活动科目(多个科目使用逗号','隔开)" prop="majors">
-            <el-input v-model="listData.majors"></el-input>
+          <el-form-item label="关联模考" prop="mockApplyId">
+            <span style="margin-right: 10px">{{ listData.mockApplyName }}</span>
+            <el-button type="text" @click="showDialog">关联</el-button>
           </el-form-item>
           <el-form-item label="活动开始时间" prop="startTime"
             ><el-date-picker
@@ -88,6 +89,50 @@
         <el-button @click="closeBZ">取 消</el-button>
         <el-button @click="submitForm('listData')">确 定</el-button>
       </span>
+      <el-dialog
+        :visible.sync="dialogTableVisible"
+        width="1000px"
+        :close-on-click-modal="false"
+        :show-close="false"
+        append-to-body
+      >
+        <div slot="title" class="hearders">
+          <div class="leftTitle">关联模考</div>
+          <div class="rightBoxs">
+            <img
+              src="@/assets/images/Close@2x.png"
+              alt=""
+              @click="dialogTableVisible = false"
+            />
+          </div>
+        </div>
+        <search-box-new
+          ref="searchBox"
+          :formData="dialogFormData"
+          :formList="dialogFormList"
+          @search="getMockList"
+          @init="dialogInit"
+        />
+        <table-list
+          :tableSets="dialogTableSet"
+          :tableData="dialogTableData"
+          :navText="dialogNavText"
+          :loading="dialogLoading"
+          :radio.sync="tableRadio"
+        >
+        </table-list>
+        <pagination
+          :total="dialogTotal"
+          :pageSize="dialogFormData.pageSize"
+          :currentPage="dialogFormData.pageNum"
+          @handleSizeChange="dialogSizeChange"
+          @handleCurrentChange="dialogCurrentChange"
+        />
+        <div slot="footer" class="dialog-footer">
+          <el-button @click="dialogTableVisible = false">取 消</el-button>
+          <el-button type="primary" @click="submitAss">确 定</el-button>
+        </div>
+      </el-dialog>
     </el-dialog>
     <el-dialog
       :visible.sync="dialogVisibleCode"
@@ -133,6 +178,7 @@ export default {
     return {
       baseImgCode: "",
       dialogVisibleCode: false,
+      dialogTableVisible: false,
       loading: false, //当前表单加载是否加载动画
       navText: {
         title: "营销活动",
@@ -168,8 +214,10 @@ export default {
           hidden: true,
         },
         {
-          label: "科目",
-          prop: "majors",
+          label: "关联模考",
+          prop1: "mockApplyName",
+          prop2: "mockApplyCode",
+          scope: "layered",
           hidden: true,
         },
         {
@@ -226,12 +274,122 @@ export default {
       },
       listPop: 1, //1新增2修改
       dialogVisible: false,
+      dialogNavText: {
+        title: "营销活动",
+        index: 0,
+        ch: "条",
+        num: false,
+        border: true,
+        choice: false,
+        choiceRadio: true,
+        radioKey: "applyId",
+        tableHide: true,
+        addHide: true,
+        headShow: false,
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      dialogFormList: [
+        {
+          prop: "educationTypeId",
+          placeholder: "教育类型",
+          scope: "educationType",
+        },
+        {
+          prop: "businessId",
+          placeholder: "业务层次",
+          scope: "businessLevel",
+          edu: "educationTypeId",
+        },
+        {
+          prop: "searchKey",
+          placeholder: "请输入模考标题/模考编码",
+        },
+      ],
+      dialogFormData: {},
+      dialogTableSet: [
+        {
+          label: "模考编码",
+          prop: "code",
+          hidden: true,
+        },
+        {
+          label: "模考标题",
+          prop: "applyName",
+          hidden: true,
+        },
+        {
+          label: "业务层级",
+          prop1: "educationName",
+          prop2: "projectName",
+          prop3: "businessName",
+          hidden: true,
+          scope: "eduTypes",
+        },
+      ],
+      dialogTableData: [],
+      dialogLoading: false,
+      dialogTotal: 0,
+      tableRadio: "",
+      activityData: {},
     };
   },
   mounted() {
     this.search();
   },
   methods: {
+    dialogInit() {
+      this.dialogFormData = {
+        pageSize: 10,
+        pageNum: 1,
+        status: "0,1",
+        mockActivity: 1,
+      };
+    },
+    showDialog(id) {
+      this.dialogTableVisible = true;
+      this.tableRadio = id;
+      this.dialogInit();
+      this.getMockList();
+    },
+    getMockList() {
+      this.dialogLoading = true;
+      this.$api
+        .inquiremockapplylistApply(this.dialogFormData)
+        .then(({ rows, total }) => {
+          this.dialogTableData = rows;
+          this.dialogTotal = total;
+        })
+        .finally(() => {
+          this.dialogLoading = false;
+        });
+    },
+    dialogSizeChange(v) {
+      this.dialogFormData.pageSize = v;
+      this.dialogFormData.pageNum = 1;
+      this.getMockList();
+    },
+    dialogCurrentChange(v) {
+      this.dialogFormData.pageNum = v;
+      this.getMockList();
+    },
+    submitAss() {
+      if (!this.tableRadio) {
+        return this.$message({
+          message: "请选择关联模考",
+          type: "warning",
+        });
+      }
+      let { applyName, code } = this.dialogTableData.find(
+        (e) => e.applyId == this.tableRadio
+      );
+      this.listData.mockApplyName = applyName;
+      this.listData.mockApplyId = this.tableRadio;
+      this.listData.mockApplyCode = code;
+      this.dialogTableVisible = false;
+    },
     //将base64转换为blob
     dataURLtoBlob(dataurl) {
       if (!dataurl) {

+ 2 - 2
src/views/education/marketingCampaignManageMent/marketingActivitiesList/userBoxs.vue

@@ -82,8 +82,8 @@ export default {
           prop: "companyName",
         },
         {
-          label: "用户身份证号码",
-          prop: "userIdCard",
+          label: "报考专业",
+          prop: "mockMajorName",
         },
         {
           label: "用户手机号码",