瀏覽代碼

up:BUG处理

yangdamao 3 年之前
父節點
當前提交
5b58636212

+ 73 - 0
src/views/2Cport/referralManageMent/tab1/addGL.vue

@@ -62,6 +62,46 @@
               </el-option>
             </el-select>
           </el-form-item>
+          <el-form-item
+          label=""
+          prop="majorId"
+          v-if="listData.businessId"
+        >
+          <el-select 
+            v-model="listData.majorId"
+            :disabled="listData.goodsList.length > 0"
+            placeholder="请选择专业">
+            <el-option
+              v-for="(item, index) in newMajorOption"
+              :key="index"
+              :label="item.categoryName"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item
+          label=""
+          prop="subjectIds"
+          v-if="listData.businessId"
+        >
+          <el-select
+            v-model="listData.subjectIds"
+            :disabled="listData.goodsList.length > 0"
+            placeholder="请选择科目"
+            multiple
+            collapse-tags
+          @change="subjectChanges"
+          >
+            <el-option
+              v-for="(item, index) in newSubjectOption"
+              :key="index"
+              :label="item.subjectName"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
           <div v-if="listData.businessId" style="margin-bottom: 10px">
             <p class="p_sty">
               <span style="color: red">注:推荐位最多显示15个商品</span>
@@ -198,6 +238,8 @@ export default {
       disabledBtn: false,
       listData: {
         businessId: "",
+        majorId:"",
+        subjectIds:"",
         goodsList: [],
       },
       rules: {
@@ -244,6 +286,8 @@ export default {
         },
       ],
       newBusinessLevel: [],
+      newMajorOption: [],
+      newSubjectOption: [],
       activeNum: [], //已选商品ID
       newActiveNum: [],
       goodsList: [], //商品列表
@@ -261,6 +305,7 @@ export default {
             break;
           }
         }
+        this.getInitBabelList(val);
       }
     },
   },
@@ -295,6 +340,32 @@ export default {
         .then((res) => {
           this.newBusinessLevel = res.rows;
         });
+    },
+     /**
+     * 根据条件获取院校、专业列表
+     */
+    getInitBabelList(val) {
+      /**
+       * 专业
+       */
+      this.$api
+        .inquireCourseMajor({ status: 1, businessId: val })
+        .then((res) => {
+          this.newMajorOption = res.rows;
+        });
+      /**
+       * 科目
+       */
+      this.$api
+        .inquireCourseSubject({ status: 1, businessId: val })
+        .then((res) => {
+          this.newSubjectOption = res.rows;
+        });
+    },
+    subjectChanges() {
+      console.log(123)
+      this.$bus.$emit("sendBybus");
+      this.$bus.$emit("sendBybusBank");
     },
     loadingClose() {
       this.disabledBtn = false;
@@ -381,6 +452,8 @@ export default {
       this.$api
         .inquireGoods({
           businessId: this.listData.businessId,
+          majorId: this.listData.majorId,
+          subjectIdList: this.listData.subjectIds,
           status: 1,
           goodsType: this.$parent.activeName === "first" ? 1 : 2,
         })

+ 4 - 1
src/views/Marketing/order/offlineOrder/batchRecord/secondStep/setGoodsList.vue

@@ -227,7 +227,7 @@ export default {
         goodsType: type,
         goodsName: this.goodsName || "",
         standPrice: this.goodsPrice || "",
-        // goodsStatus: 1,//可售状态
+        // goodsStatus: 1,
         status: 1,
         businessIds: this.oldObj.businessId,
         subjectId : subjectId
@@ -313,6 +313,9 @@ export default {
           if (oldObj.type.indexOf(4) !== -1) {
             options.push({ label: "前培商品", value: 4 });
           }
+          if (oldObj.type.indexOf(6) !== -1) {
+            options.push({ label: "直播商品", value: 6 });
+          }
           this.dataList = res.rows.map((item) => {
             return {
               id: item.id,