Commit 49782261 by qiaoyanqi

按钮状态

parent 64f88049
...@@ -149,7 +149,16 @@ export default { ...@@ -149,7 +149,16 @@ export default {
}) })
}, },
getBillStateDisable(val, btnItem) { getBillStateDisable(val, btnItem) {
console.log(this.define.btnGroupAction[btnItem], val, btnItem); let disableState = val.split(";");
const getBillState = () => {
if (this.tmpBill.state === "") {
return disableState.includes("billEdit");
} else if (this.tmpBill.state === "readOnly") {
return disableState.includes("billReadOnly");
} else {
return false;
}
};
if (//不走工作流的情况下,执行自定义的按钮禁用状态 if (//不走工作流的情况下,执行自定义的按钮禁用状态
this.define.btnGroupAction && this.define.btnGroupAction &&
this.define.btnGroupAction[btnItem] && this.define.btnGroupAction[btnItem] &&
...@@ -166,7 +175,7 @@ export default { ...@@ -166,7 +175,7 @@ export default {
break; break;
} }
} }
return flag; return flag || getBillState();
} else { } else {
if (!val) return false; if (!val) return false;
let approveState = null; let approveState = null;
...@@ -177,7 +186,7 @@ export default { ...@@ -177,7 +186,7 @@ export default {
} else { } else {
approveState = this.workflowState; approveState = this.workflowState;
} }
let disableState = val.split(";");
// 配置工作流已提交未审批90, billReadOnly状态下可用 // 配置工作流已提交未审批90, billReadOnly状态下可用
// 主要用于保存在审批状态下可用,审批还能修改·· // 主要用于保存在审批状态下可用,审批还能修改··
if ( if (
...@@ -193,15 +202,6 @@ export default { ...@@ -193,15 +202,6 @@ export default {
} }
}); });
} }
const getBillState = () => {
if (this.tmpBill.state === "") {
return disableState.includes("billEdit");
} else if (this.tmpBill.state === "readOnly") {
return disableState.includes("billReadOnly");
} else {
return false;
}
};
switch (approveState) { switch (approveState) {
case 90: // 待审批 case 90: // 待审批
return disableState.includes("90"); return disableState.includes("90");
...@@ -255,4 +255,4 @@ export default { ...@@ -255,4 +255,4 @@ export default {
} }
} }
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment