natasha 3 éve
szülő
commit
b760c84c86
1 módosított fájl, 18 hozzáadás és 13 törlés
  1. 18 13
      src/views/discountCodeList.vue

+ 18 - 13
src/views/discountCodeList.vue

@@ -54,7 +54,7 @@
 </template>
 <script>
 import Header from "@/components/Header";
-import { getContent } from "@/api/ajax";
+import { LearnWebSI } from "@/api/ajax";
 import { getToken } from '@/utils/auth'
 export default {
     name: "courselist",
@@ -100,12 +100,13 @@ export default {
         onSubmit () {
             if(this.discountNumber){
                 this.loading = true;
-                let MethodName = 'book-book_manager-BatchCreateDiscountCodeForBook'
+                let MethodName = 'order-discount_manager-BatchCreateDiscountCodeFoGoods'
                 let data = {
-                    book_id:this.bookId,
+                    goods_id:this.bookId,
+                    goods_type:101,
                     count:Number(this.discountNumber)
                 }
-                getContent(MethodName, data)
+                LearnWebSI(MethodName, data)
                 .then((res) => {
                     this.$message.success("操作成功");
                     this.discountNumber = null
@@ -129,14 +130,15 @@ export default {
         },
         // 查询数据列表
         getList () {
-            let MethodName = "page_query-PageQueryBookDiscountCodeList";
+            let MethodName = "page_query-PageQueryGoodsDiscountCodeList";
             let data = {
-                book_id: this.bookId,
+                goods_id: this.bookId,
+                goods_type: 101,
                 page_capacity: this.page_capacity,
                 cur_page: this.currentPage,
                 use_status:-1
             };
-            getContent(MethodName, data).then(
+            LearnWebSI(MethodName, data).then(
                 (res) => {
                     let _this = this;
                     _this.tableData = res.discount_code_list;
@@ -159,11 +161,13 @@ export default {
                 type: "warning",
             })
                 .then(() => {
-                    let MethodName = "book-book_manager-DeleteBookDiscountCode";
+                    let MethodName = "order-discount_manager-DeleteGoodsDiscountCode";
                     let data = {
-                        id: row.id,
+                        goods_id:this.bookId,
+                        goods_type:101,
+                        discount_code_id: row.id,
                     };
-                    getContent(MethodName, data).then(
+                    LearnWebSI(MethodName, data).then(
                         (res) => {
                             this.currentPage = 1;
                             this.getList()
@@ -190,13 +194,14 @@ export default {
                 UserType = user.user_type;
                 SessionID = user.session_id;
             }
-            let MethodName = "data_export-ExportBookDiscountCodeList"
+            let MethodName = "data_export-ExportGoodsDiscountCodeList"
             let data = {
-                book_id: this.bookId,
+                goods_id: this.bookId,
+                goods_type: 101,
                 use_status:this.exportRadio
             }
             window.open(process.env.VUE_APP_BASE_API +
-                    `/GCLSBookWebSI/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}&Parameter=${encodeURIComponent(JSON.stringify(data))}`) 
+                    `/GCLSLearnWebSI/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}&Parameter=${encodeURIComponent(JSON.stringify(data))}`) 
             this.exportLoading = false
         }
     }