删除
-
-
+ 已发货
+
+
@@ -357,7 +357,7 @@
合同信息
-
@@ -569,7 +569,8 @@ export default {
data() {
return {
loading: false,// 页面加载
- disabled: false,// 查看禁用。
+ isAdd: false, // 是否添加
+ viewDisabled: false,// 查看禁用
editDisabled: false,// 编辑禁用
renewDisabled: false,// 续费禁用
dataLoading: false,// 产品弹框加载
@@ -737,9 +738,14 @@ export default {
},
async created() {
this.token = sessionStorage.getItem("token");
+ // 处理添加状态
+ if (this.$route.query.isAdd) {
+ this.isAdd = true;
+ }
+
// 处于查看状态
if (this.$route.query.watch) {
- this.disabled = true;
+ this.viewDisabled = true;
await this.getDetail(this.$route.query.watch);
}
// 处于编辑状态
@@ -943,6 +949,7 @@ export default {
let param = {
pageSize: 10,
pageNum: this.platfromPage,
+ isEnable: 0, // 只获取上架的课程
curriculumName: this.curriculumName
};
this.dataLoading = true;
@@ -954,6 +961,15 @@ export default {
this.dataLoading = false;
});
},
+ courseSelectable(row, index) { // 禁止勾选已经选过的课程
+ let boolean = true;
+ this.coursePermissions.length && this.coursePermissions.some(e => {
+ if (e.dataOrCourseId === row.cid) {
+ boolean = false;
+ }
+ });
+ return boolean;
+ },
// 课程--弹框列表选中
handleSelectionChange(val) {
this.courseSelection = val;
@@ -983,6 +999,7 @@ export default {
discountRate: "",// 折扣率
accountNum: "",// 账号数
totalAmount: "",// 总价
+ isEnable: 1, // 启用否:1启用,0禁用
ship: 0,// 发货否(0未发货,1已发货,默认不发货)
authority: 1 // 区分权限 0为数据平台权限,1为课程权限
};
@@ -1064,6 +1081,15 @@ export default {
this.dataLoading = false;
});
},
+ dataSelectable(row, index) { // 禁止勾选已经选过的数据平台
+ let boolean = true;
+ this.dataPlatformPermissions.length && this.dataPlatformPermissions.some(e => {
+ if (e.dataOrCourseId === row.id) {
+ boolean = false;
+ }
+ });
+ return boolean;
+ },
// 数据平台--弹框列表选中
dataPlatformSelection(val) {
this.platformSelect = val;
@@ -1085,6 +1111,7 @@ export default {
discountRate: "",// 折扣率
accountNum: "",// 账号数
totalAmount: "",// 总价
+ isEnable: 1, // 启用否:1启用,0禁用
ship: 0,// 发货否(0未发货,1已发货,默认不发货)
authority: 0// 数据平台权限
};
@@ -1155,8 +1182,7 @@ export default {
// 课程/数据平台-发货
handleDeliver(e, row) {
if (this.editDisabled) {
- this.$post(this.api.ship + "?id=" + `${row.dataOrCourseId}`).then(res => {
- });
+ this.$post(this.api.ship + "?id=" + `${row.dataOrCourseId}`).then(res => {});
}
},
// 计算折扣率
@@ -1400,7 +1426,6 @@ export default {
handleRemove(file, fileList) {
this.contract.contractFile = "";
},
-
configure() {
this.ipVisible = true;
},
@@ -1409,24 +1434,6 @@ export default {
},
goBack() {
this.$router.go(-1);
- },
- dataSelectable(row, index) { // 禁止勾选已经选过的数据平台
- let boolean = true;
- this.dataPlatformPermissions.length && this.dataPlatformPermissions.some(e => {
- if (e.dataOrCourseId === row.id) {
- boolean = false;
- }
- });
- return boolean;
- },
- courseSelectable(row, index) { // 禁止勾选已经选过的课程
- let boolean = true;
- this.coursePermissions.length && this.coursePermissions.some(e => {
- if (e.dataOrCourseId === row.cid) {
- boolean = false;
- }
- });
- return boolean;
}
}
};
diff --git a/src/views/order/Order.vue b/src/views/order/Order.vue
index e76ffd3..a6f1d99 100644
--- a/src/views/order/Order.vue
+++ b/src/views/order/Order.vue
@@ -217,7 +217,7 @@ export default {
},
addOrder() {
this.$store.commit("systemData", { order_id: "" });
- this.$router.push("/addorder");
+ this.$router.push("/addorder?isAdd=true");
},
handle(val, row) {
this.$router.push("/addorder?" + val + "=" + row.orderId);