|
@@ -56,7 +56,7 @@
|
|
|
<script>
|
|
|
import Header from "@/components/inputModules/common/Header";
|
|
|
import Nav from "@/components/inputModules/common/Nav";
|
|
|
-import { getContent } from "@/api/ajax";
|
|
|
+import { LearnWebSI } from "@/api/ajax";
|
|
|
import { getToken } from '@/utils/auth'
|
|
|
import { encodeURL } from 'js-base64';
|
|
|
export default {
|
|
@@ -104,12 +104,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
|
|
@@ -133,14 +134,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;
|
|
@@ -163,11 +165,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()
|
|
@@ -194,13 +198,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
|
|
|
}
|
|
|
}
|