12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- /**
- * 项目管理
- */
- shr.defineClass("shr.project.projectManagementEdit",shr.framework.Edit,{
- initalizeDOM : function() {
- shr.project.projectManagementEdit.superClass.initalizeDOM.call(this);
- var _self = this;
- window.onload = function () {
- var projectStateElement = document.getElementById('projectState');
- if (projectStateElement) {
- // var projectStateValue = projectStateElement.options[projectStateElement.selectedIndex].text;
- var projectStateValue = projectStateElement.value;
- console.log('项目状态值为:', projectStateValue);
- if (projectStateValue =="1") {
- $("#edit").hide();
- }
- if (projectStateValue == "1" || projectStateValue == "2") {
- $("#enable").hide();
- }
- } else {
- console.log('未找到项目状态元素');
- }
- };
- },
- /**
- * 启用
- */
- enableAction : function(){
- var that = this;
- shr.showConfirm('是否现在启用?', function() {
- top.Messenger().hideAll();
- that.remoteCall({
- method : "enablePorject",
- param : {
- billId : that.billId
- },
- success : function(data) {
- if(data && data.state == "success"){
- parent.location.reload();
- shr.showSuccess({
- message : "启用成功!"
- });
- $.block.hide();
- }else{
- shr.showWarning({
- message : data.errorMsg
- });
- }
- }
- });
- });
- },
-
- /**
- * 禁用
- */
- disableAction : function(){
- var that = this;
- shr.showConfirm('是否现在禁用?', function() {
- top.Messenger().hideAll();
- that.remoteCall({
- method : "disablePorject",
- param : {
- billId : that.billId
- },
- success : function(data) {
- if(data && data.state == "success"){
- parent.location.reload();
- shr.showSuccess({
- message : "禁用成功!"
- });
- $.block.hide();
- }else{
- shr.showWarning({
- message : data.errorMsg
- });
- }
- }
- });
- });
- },
- });
|