| | |
| | | */ |
| | | CoursePackage.editCoursePackageState = function (state) { |
| | | if (this.check()) { |
| | | |
| | | if(CoursePackage.seItem.state == state){ |
| | | Feng.error("不能重复操作"); |
| | | return |
| | | } |
| | | parent.layer.confirm(state == 1 ? '是否上架' : "是否下架" , { |
| | | btn: ['确定', '取消'] |
| | | }, function (index) { |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/editCoursePackageState", function (data) { |
| | | Feng.success(state == 1 ? '上架' : "下架" + "成功!"); |
| | | CoursePackage.table.refresh(); |
| | |
| | | ajax.set("id", CoursePackage.seItem.id); |
| | | ajax.set("state", state); |
| | | ajax.start(); |
| | | parent.layer.close(index); |
| | | |
| | | }, function (index) { |
| | | parent.layer.close(index); |
| | | } |
| | | |
| | | |
| | | ) |
| | | |
| | | } |
| | | }; |
| | | |