diff --git a/src/views/modules/course/catalogue-price.vue b/src/views/modules/course/catalogue-price.vue index f203086..6735db2 100644 --- a/src/views/modules/course/catalogue-price.vue +++ b/src/views/modules/course/catalogue-price.vue @@ -92,7 +92,8 @@ {{ item.productName }} @@ -205,11 +206,11 @@ export default { if (e == 0) { // this.dataForm.oldFee = this.dataForm.halfFee; - this.dataForm.currentFee = this.dataForm.halfFee; + // this.dataForm.currentFee = JSON.parse(JSON.stringify(this.dataForm.halfFee)); } else if (e == 1) { // this.dataForm.oldFee = this.dataForm.fee; - this.dataForm.currentFee = this.dataForm.fee; + // this.dataForm.currentFee = JSON.parse(JSON.stringify(this.dataForm.fee)); } }, changeType(e) { @@ -225,15 +226,15 @@ export default { this.dataForm = { ...row } || {}; this.dataForm.courseId = courseid || ""; this.visible = true; - this.dataForm.currentFee = this.dataForm.halfFee; - this.dataForm.old = this.dataForm.halfFee; + // this.dataForm.currentFee = this.dataForm.halfFee; + // this.dataForm.old = this.dataForm.halfFee; this.dataForm.yearType = 0; this.$forceUpdate(); if (row.productList && row.productList.length > 0) { this.goodsList = [...row.productList]; - this.currentGoodsList = this.goodsList.filter(e => - e.productName.includes("半年") - ); + // this.currentGoodsList = this.goodsList.filter(e => + // e.productName.includes("半年") + // ); } }, // 表单提交 diff --git a/src/views/modules/course/courseCatalogue.vue b/src/views/modules/course/courseCatalogue.vue index 659ceef..9d60ff2 100644 --- a/src/views/modules/course/courseCatalogue.vue +++ b/src/views/modules/course/courseCatalogue.vue @@ -64,15 +64,20 @@ width="500" > - - + + 修改价格 + 创建商品 + + @@ -172,11 +189,15 @@ export default { dataListLoading: false, dataListSelections: [], addOrUpdateVisible: false, - priceVisible: false + priceVisible: false, + urlList: { + createProduct: "/master/course/createProductForCatalogue" + } }; }, components: { - AddOrUpdate,price + AddOrUpdate, + price }, activated() { this.courseid = this.$route.query.id; @@ -236,6 +257,31 @@ export default { this.$refs.addOrUpdate.init(row, this.courseid); }); }, + handleCreateProduct(id) { + console.log('id at line 260:', id) + this.$http + .request({ + url: this.$http.adornUrl(`${this.urlList.createProduct}`), + method: "POST", + data: { + id: id + }, + header: { + //默认 无 说明:请求头 + "Content-Type": "application/json" + } + }) + + .then(res => { + console.log("result at line 452:", res); + if (res && res.data.code === 0) { + this.$message.success(res.data.msg); + this.getDataList(); + } else { + this.$message.error(res.data.msg); + } + }); + }, priceHandle(row) { console.log("row1", row); this.priceVisible = true;