yangdamao 3 年 前
コミット
be5f9baa3f

+ 1 - 1
src/components/tableList.vue

@@ -2126,7 +2126,7 @@ export default {
       if (int === 4) {
         const jump = () => {
           this.$router.push({
-            path: "/Marketing/goods/commodityManageMentEdit",
+            name: "CommodityManageMentEdit",
             query: {
               id: v.goodsId,
             },

+ 8 - 0
src/newApi/course.js

@@ -46,6 +46,14 @@ export default {
             method: 'get',
         })
     },
+    //查询商品课程列表
+    obtainCourseGoodsList(data) {
+        return request({
+            url: `/goods/course/getList`,
+            method: 'get',
+            params: data
+        })
+    },
     //查询商品双师资模板列表
     inquireCourseTeacherList(data) {
         return request({

+ 14 - 4
src/views/Marketing/goods/commodityManageMent/teacher/selectCourse.vue

@@ -17,18 +17,19 @@
           />
         </div>
       </div>
-      <!-- <div style="margin-bottom: 10px">
+      <div style="margin-bottom: 10px">
         <el-input
           style="width: 230px; margin: 0px 10px"
           :size="size"
-          v-model="formData['key']"
+          v-model="courseName"
+          clearable
           placeholder="课程标题/课程编码"
         ></el-input>
         <el-button :size="size" type="primary" @click="getInfos(1)"
           >查询</el-button
         >
         <el-button :size="size" @click="getInfos(0)">重置</el-button>
-      </div> -->
+      </div>
       <span style="color: red">注:最多选择3条数据进行关联</span>
       <el-table
         ref="multipleTable"
@@ -96,6 +97,7 @@ export default {
       dialogVisibleTableBoxs: false,
       tableData: [],
       goodsId: "",
+      courseName: '',
       tableSet: [
         { label: "课程编码", prop: "code", width: "140px" },
         { label: "课程科目", prop: "subjectName"},
@@ -141,15 +143,23 @@ export default {
      * 搜索数据
      */
     getInfos(int) {
+      console.log(this.courseName,'this.courseName');
       //重置0
       if (int === 0) {
         this.formData.pageSize = 10;
         this.formData.pageNum = 1;
+        this.courseName = ''
       }
       if (int === 1) {
         this.formData.pageNum = 1;
       }
-      this.$api.obtainCourseSgoodsId(this.goodsId).then((res) => {
+      let param = {
+        goodsId: this.goodsId,
+        pageSize: this.formData.pageSize,
+        pageNum: this.formData.pageNum,
+        keyWord: this.courseName
+      }
+      this.$api.obtainCourseGoodsList(param).then((res) => {
         this.tableData = res.rows;
         this.total = res.total;
       });