Tang 3 年 前
コミット
2b6cbdda5f

+ 13 - 6
src/components/searchBoxNew.vue

@@ -683,22 +683,29 @@ export default {
     /**
      *
      * @param {int} id
+     * @param {bool} status1 //是否不清空业务层级
      * @remark 点击教育类型触发事件
      */
-    changeEducationType(id) {
+    changeEducationType(id, status1) {
+      if (!id) {
+        return;
+      }
       const indexs = this.educationType.findIndex((item) => {
         return item.id === id;
       });
       this.tireStatus = this.educationType[indexs].tireStatus;
-      if (this.formData.businessId) {
-        this.formData.businessId = "";
+      if (!status1) {
+        if (this.formData.businessId) {
+          this.formData.businessId = "";
+        }
+        if (this.formData.ProfessionalId) {
+          this.formData.ProfessionalId = "";
+        }
       }
       if (this.formData.schoolId) {
         this.formData.schoolId = "";
       }
-      if (this.formData.ProfessionalId) {
-        this.formData.ProfessionalId = "";
-      }
+
       if (this.formData.subjectId) {
         this.formData.subjectId = "";
       }

+ 71 - 34
src/views/Marketing/goods/commodityManageMent/add/index.vue

@@ -447,6 +447,9 @@
                   ? "回放"
                   : "未知"
               }}</span>
+              <span v-else-if="item.scope === 'businessType'">
+                {{ scope.row[item.prop1] }}-{{ scope.row[item.prop2] }}
+              </span>
               <span v-else-if="item.scope === 'type'">
                 {{
                   scope.row[item.prop] === 1
@@ -564,6 +567,7 @@
               </el-form-item>
               <el-form-item label="补考次数" prop="studyCount">
                 <el-input-number
+                  :precision="0"
                   class="numInputs"
                   v-model="listData.studyCount"
                   :min="1"
@@ -614,6 +618,7 @@
               </el-form-item>
               <el-form-item label="学习次数" prop="studyCount">
                 <el-input-number
+                  :precision="0"
                   class="numInputs"
                   v-model="listData.studyCount"
                   :min="1"
@@ -647,12 +652,11 @@
           class="dis_fs"
           v-if="listData.goodsType === 1 || listData.goodsType === 2"
         >
-          <el-popover
-            placement="bottom-start"
-            trigger="click"
-            class="checkBoxSty1"
-          >
-            <el-checkbox-group v-model="listData.certificateIds">
+          <el-popover placement="bottom-start" trigger="click">
+            <el-checkbox-group
+              v-model="listData.certificateIds"
+              class="checkBix"
+            >
               <el-checkbox
                 v-for="(item, index) in certificateOption"
                 :key="index"
@@ -905,6 +909,7 @@
       </span>
     </el-dialog>
     <el-dialog
+    @opened="prepareEnd"
       :visible.sync="dialogVisibleTableBoxs2"
       width="800px"
       :show-close="false"
@@ -969,6 +974,9 @@
                     : "未知"
                 }}
               </span>
+              <span v-else-if="item.scope === 'businessType'">
+                {{ scope.row[item.prop1] }}-{{ scope.row[item.prop2] }}
+              </span>
               <span v-else-if="item.scope === 'type'">
                 {{
                   scope.row[item.prop] === 1
@@ -1665,6 +1673,12 @@ export default {
             },
           ],
         },
+        {
+          prop: "subjectId",
+          placeholder: "科目",
+          scope: "sujectType",
+          edu: "educationTypeId",
+        },
         {
           prop: "names",
           placeholder: "请输入标题名称",
@@ -1772,7 +1786,7 @@ export default {
       aboutJYBox: false,
       jYtableSet: [
         { label: "讲义编码", prop: "encoder", width: "150px" },
-        { label: "讲义标题", prop: "handoutsName"},
+        { label: "讲义标题", prop: "handoutsName" },
         // {
         //   label: "适合业务层级",
         //   prop: "courseHandoutsBusinessVo",
@@ -1781,8 +1795,13 @@ export default {
         //   prop3: "businessName",
         //   scope: "eduType",
         // },
-        { label: "是否可下载", prop: "canDownload", scope: "canDownload",width:"140px"  },
-        { label: "发布状态", prop: "status", scope: "Status",width:"140px" },
+        {
+          label: "是否可下载",
+          prop: "canDownload",
+          scope: "canDownload",
+          width: "140px",
+        },
+        { label: "发布状态", prop: "status", scope: "Status", width: "140px" },
       ],
       jYtableData: [],
       jYactiveBoxs: false,
@@ -1794,21 +1813,38 @@ export default {
       //   题库商品表格数据------------------------------------------------------------------------start
       tableSetTSB2: [
         { label: "排序", prop: "sort", scope: "inputs", width: "100" },
+        { label: "题卷名称", prop: "name", width: "300" },
         { label: "科目", prop: "subjectName", width: "130" },
-        { label: "题卷名称", prop: "name" },
+        {
+          label: "业务层次",
+          prop1: "projectName",
+          prop2: "businessName",
+          width: "300",
+          scope: "businessType",
+        },
+        { label: "教育类型", prop: "educationName", width: "160" },
         { label: "题库类型", prop: "type", scope: "type", width: "120" },
-        // {
-        //   label: "发布状态",
-        //   prop: "publishStatus",
-        //   scope: "Status",
-        //   width: "120",
-        // },
+        {
+          label: "发布状态",
+          prop: "publishStatus",
+          scope: "Status",
+          width: "120",
+        },
       ],
       tableSetTSBBOX2: [
-        { label: "编码", prop: "code" },
-        { label: "前缀", prop: "prefixName", width: "120" },
-        { label: "名称", prop: "name" },
-        { label: "题库类型", prop: "type", scope: "type" },
+        { label: "题卷编码", prop: "code", width: "120" },
+        { label: "题卷前缀", prop: "prefixName", width: "120" },
+        { label: "题卷名称", prop: "name", width: "300" },
+        { label: "科目", prop: "subjectName", width: "160" },
+        {
+          label: "业务层次",
+          prop1: "projectName",
+          prop2: "businessName",
+          width: "300",
+          scope: "businessType",
+        },
+        { label: "教育类型", prop: "educationName", width: "160" },
+        { label: "题库类型", prop: "type", scope: "type", width: "120" },
         {
           label: "发布状态",
           prop: "publishStatus",
@@ -1861,10 +1897,10 @@ export default {
     },
   },
   created() {
-    this.getDict();
   },
   mounted() {
     // this.getJyData();
+     this.getDict();
   },
   methods: {
     judgeResult1(v) {
@@ -2187,7 +2223,7 @@ export default {
         res.rows.map((item, index) => {
           var array = [];
           item.courseProjectTypeVo.map((items, indexs) => {
-            array.push(items.id);
+            array.push(items.educationId);
           });
           item.courseArrays = array;
         });
@@ -2239,7 +2275,7 @@ export default {
             }
           });
           this.majorOption.map((items) => {
-            if (items.courseArrays.indexOf(item.projectId) !== -1) {
+            if (items.courseArrays.indexOf(item.educationId) != -1) {
               newMajorOption.push(items);
             }
           });
@@ -2692,7 +2728,7 @@ export default {
       });
     },
     prepareEnd() {
-      this.$refs.searchBox.changeEducationType(this.listData.educationTypeId);
+      this.$refs.searchBox.changeEducationType(this.listData.educationTypeId,true);
     },
     submitTab() {
       if (this.activeLists.length === 0) {
@@ -2784,6 +2820,7 @@ export default {
       // this.formData3.educationTypeId = "";
       // this.formData3.businessId = "";
       this.formData3.names = "";
+      this.formData3.subjectId = "";
       this.search3();
     },
     search3(int) {
@@ -2880,9 +2917,9 @@ export default {
           if (int === 1) {
             self.$nextTick(function () {
               self.$refs.multipleTable2.clearSelection();
-              self.$refs.searchBox.changeEducationType(
-                self.listData.educationTypeId
-              );
+              // self.$refs.searchBox.changeEducationType(
+              //   self.listData.educationTypeId
+              // );
               self.formData3.businessId = self.listData.businessId;
             });
           }
@@ -2908,9 +2945,9 @@ export default {
           if (int === 1) {
             self.$nextTick(function () {
               self.$refs.multipleTable2.clearSelection();
-              self.$refs.searchBox.changeEducationType(
-                self.listData.educationTypeId
-              );
+              // self.$refs.searchBox.changeEducationType(
+              //   self.listData.educationTypeId
+              // );
               self.formData3.businessId = self.listData.businessId;
             });
           }
@@ -2937,9 +2974,9 @@ export default {
           if (int === 1) {
             self.$nextTick(function () {
               self.$refs.multipleTable2.clearSelection();
-              self.$refs.searchBox.changeEducationType(
-                self.listData.educationTypeId
-              );
+              // self.$refs.searchBox.changeEducationType(
+              //   self.listData.educationTypeId
+              // );
               self.formData3.businessId = self.listData.businessId;
             });
           }
@@ -3112,7 +3149,7 @@ export default {
 </script>
 
 <style lang="less" scoped>
-.checkBoxSty1 {
+.checkBix {
   display: flex;
   flex-direction: column;
 }

+ 89 - 41
src/views/Marketing/goods/commodityManageMent/edit/index.vue

@@ -453,6 +453,9 @@
                   ? "回放"
                   : "未知"
               }}</span>
+              <span v-else-if="item.scope === 'businessType'">
+                {{ scope.row[item.prop1] }}-{{ scope.row[item.prop2] }}
+              </span>
               <span v-else-if="item.scope === 'type'">
                 {{
                   scope.row[item.prop] === 1
@@ -571,6 +574,7 @@
               </el-form-item>
               <el-form-item label="补考次数" prop="studyCount">
                 <el-input-number
+                  :precision="0"
                   class="numInputs"
                   v-model="listData.studyCount"
                   :min="1"
@@ -619,8 +623,9 @@
                   >
                 </div>
               </el-form-item>
-              <el-form-item label="补考次数" prop="studyCount">
+              <el-form-item label="学习次数" prop="studyCount">
                 <el-input-number
+                  :precision="0"
                   class="numInputs"
                   v-model="listData.studyCount"
                   :min="1"
@@ -657,7 +662,7 @@
           <el-popover placement="bottom-start" trigger="click">
             <el-checkbox-group
               v-model="listData.certificateIds"
-              class="checkBoxSty1"
+              class="checkBix"
             >
               <el-checkbox
                 v-for="(item, index) in certificateOption"
@@ -920,6 +925,7 @@
       </span>
     </el-dialog>
     <el-dialog
+    @opened="prepareEnd"
       :visible.sync="dialogVisibleTableBoxs2"
       width="800px"
       :show-close="false"
@@ -984,6 +990,9 @@
                     : "未知"
                 }}
               </span>
+              <span v-else-if="item.scope === 'businessType'">
+                {{ scope.row[item.prop1] }}-{{ scope.row[item.prop2] }}
+              </span>
               <span v-else-if="item.scope === 'type'">
                 {{
                   scope.row[item.prop] === 1
@@ -1664,18 +1673,19 @@ export default {
       //   视频商品表格数据------------------------------------------------------------------------start
       tableSetTSB: [
         { label: "排序", prop: "sort", scope: "inputs", width: "100" },
-        { label: "科目名称", prop: "code" },
-        { label: "课程名称", prop: "prefixName", width: "120" },
-        { label: "科目", prop: "subjectName" },
+        { label: "课程编码", prop: "code", width: "140" },
+        { label: "课程名称", prop: "prefixName", width: "190" },
+        { label: "科目", prop: "subjectName", width: "150" },
         { label: "专业", prop: "categoryName" },
-        { label: "院校", prop: "schoolName" },
+        { label: "院校", prop: "schoolName", width: "150" },
         {
           label: "业务层次",
           prop1: "projectName",
           prop2: "businessName",
           scope: "busin",
+          width: "350px",
         },
-        { label: "教育类型", prop: "educationName" },
+        { label: "教育类型", prop: "educationName", width: "160" },
         {
           label: "发布状态",
           prop: "publishStatus",
@@ -1684,14 +1694,14 @@ export default {
         },
       ],
       tableSetTSBBOX: [
-        { label: "课程编码", prop: "code" },
-        { label: "名称前缀", prop: "prefixName", width: "120" },
-        { label: "课程标题", prop: "courseName" },
+        { label: "课程编码", prop: "code", width: "140px" },
+        { label: "名称前缀", prop: "prefixName", width: "160px" },
+        { label: "课程标题", prop: "courseName", width: "300px" },
         {
           label: "发布状态",
           prop: "publishStatus",
           scope: "Status",
-          width: "120",
+          width: "120px",
         },
       ],
       total: 0, //一共多少条
@@ -1736,17 +1746,18 @@ export default {
       auditionList: [],
       aboutJYBox: false,
       jYtableSet: [
-        { label: "讲义编码", prop: "encoder" },
-        { label: "讲义标题", prop: "handoutsName" },
-        {
-          label: "适合业务层级",
-          prop: "courseHandoutsBusinessVo",
-          prop1: "educationName",
-          prop2: "projectName",
-          prop3: "businessName",
-          scope: "eduType",
-        },
-        { label: "发布状态", prop: "status", scope: "Status" },
+        { label: "讲义编码", prop: "encoder", width: "150px" },
+        { label: "讲义标题", prop: "handoutsName"},
+        // {
+        //   label: "适合业务层级",
+        //   prop: "courseHandoutsBusinessVo",
+        //   prop1: "educationName",
+        //   prop2: "projectName",
+        //   prop3: "businessName",
+        //   scope: "eduType",
+        // },
+        { label: "是否可下载", prop: "canDownload", scope: "canDownload",width:"140px"  },
+        { label: "发布状态", prop: "status", scope: "Status",width:"140px" },
       ],
       jYtableData: [],
       jYactiveBoxs: false,
@@ -1783,6 +1794,12 @@ export default {
             },
           ],
         },
+        {
+          prop: "subjectId",
+          placeholder: "科目",
+          scope: "sujectType",
+          edu: "educationTypeId",
+        },
         {
           prop: "names",
           placeholder: "请输入标题名称",
@@ -1793,15 +1810,38 @@ export default {
       //   题库商品表格数据------------------------------------------------------------------------start
       tableSetTSB2: [
         { label: "排序", prop: "sort", scope: "inputs", width: "100" },
+        { label: "题卷名称", prop: "name", width: "300" },
         { label: "科目", prop: "subjectName", width: "130" },
-        { label: "题卷名称", prop: "name" },
+        {
+          label: "业务层次",
+          prop1: "projectName",
+          prop2: "businessName",
+          width: "300",
+          scope: "businessType",
+        },
+        { label: "教育类型", prop: "educationName", width: "160" },
         { label: "题库类型", prop: "type", scope: "type", width: "120" },
+        {
+          label: "发布状态",
+          prop: "publishStatus",
+          scope: "Status",
+          width: "120",
+        },
       ],
       tableSetTSBBOX2: [
-        { label: "编码", prop: "code" },
-        { label: "前缀", prop: "prefixName", width: "120" },
-        { label: "名称", prop: "name" },
-        { label: "题库类型", prop: "type", scope: "type" },
+        { label: "题卷编码", prop: "code", width: "120" },
+        { label: "题卷前缀", prop: "prefixName", width: "120" },
+        { label: "题卷名称", prop: "name", width: "300" },
+        { label: "科目", prop: "subjectName", width: "160" },
+        {
+          label: "业务层次",
+          prop1: "projectName",
+          prop2: "businessName",
+          width: "300",
+          scope: "businessType",
+        },
+        { label: "教育类型", prop: "educationName", width: "160" },
+        { label: "题库类型", prop: "type", scope: "type", width: "120" },
         {
           label: "发布状态",
           prop: "publishStatus",
@@ -2206,7 +2246,7 @@ export default {
           res.rows.map((item, index) => {
             var array = [];
             item.courseProjectTypeVo.map((items, indexs) => {
-              array.push(items.id);
+              array.push(items.educationId);
             });
             item.courseArrays = array;
           });
@@ -2394,7 +2434,7 @@ export default {
             }
           });
           this.majorOption.map((items) => {
-            if (items.courseArrays.indexOf(item.projectId) !== -1) {
+            if (items.courseArrays.indexOf(item.educationId) !== -1) {
               newMajorOption.push(items);
             }
           });
@@ -2440,7 +2480,7 @@ export default {
             }
           });
           this.majorOption.map((items) => {
-            if (items.courseArrays.indexOf(item.projectId) !== -1) {
+            if (items.courseArrays.indexOf(item.educationId) !== -1) {
               newMajorOption.push(items);
             }
           });
@@ -2791,6 +2831,13 @@ export default {
         );
         // this.listData.standPriceJson[this.NUMBerS] = this.listitemData;
       } else {
+        const INQU = this.listData.standPriceJson.some((item) => {
+          return item.priceTypeId === this.listitemData.priceTypeId;
+        });
+        if (INQU) {
+          this.$message.warning("已存在相同费用类型,禁止重复");
+          return;
+        }
         this.listitem[0].options.map((i, k) => {
           if (i.costId === Number(this.listitemData.priceTypeId)) {
             this.listitemData.priceTypeName = i.costName;
@@ -2883,7 +2930,7 @@ export default {
       });
     },
     prepareEnd() {
-      this.$refs.searchBox.changeEducationType(this.listData.educationTypeId);
+      this.$refs.searchBox.changeEducationType(this.listData.educationTypeId,true);
     },
     submitTab() {
       if (this.activeLists.length === 0) {
@@ -2986,6 +3033,7 @@ export default {
       // this.formData3.majorId = "";
       // this.formData3.schoolId = "";
       this.formData3.names = "";
+      this.formData3.subjectId = "";
       this.search3();
     },
     search3(int) {
@@ -3083,9 +3131,9 @@ export default {
           if (int === 1) {
             self.$nextTick(function () {
               self.$refs.multipleTable2.clearSelection();
-              self.$refs.searchBox.changeEducationType(
-                self.listData.educationTypeId
-              );
+              // self.$refs.searchBox.changeEducationType(
+              //   self.listData.educationTypeId
+              // );
               self.formData3.businessId = self.listData.businessId;
             });
           }
@@ -3111,9 +3159,9 @@ export default {
           if (int === 1) {
             self.$nextTick(function () {
               self.$refs.multipleTable2.clearSelection();
-              self.$refs.searchBox.changeEducationType(
-                self.listData.educationTypeId
-              );
+              // self.$refs.searchBox.changeEducationType(
+              //   self.listData.educationTypeId
+              // );
               self.formData3.businessId = self.listData.businessId;
             });
           }
@@ -3140,9 +3188,9 @@ export default {
           if (int === 1) {
             self.$nextTick(function () {
               self.$refs.multipleTable2.clearSelection();
-              self.$refs.searchBox.changeEducationType(
-                self.listData.educationTypeId
-              );
+              // self.$refs.searchBox.changeEducationType(
+              //   self.listData.educationTypeId
+              // );
               self.formData3.businessId = self.listData.businessId;
             });
           }
@@ -3316,7 +3364,7 @@ export default {
 </script>
 
 <style lang="less" scoped>
-.checkBoxSty1 {
+.checkBix{
   display: flex;
   flex-direction: column;
 }