Commit 49782261 by qiaoyanqi

按钮状态

parent 64f88049
......@@ -149,7 +149,16 @@ export default {
})
},
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 (//不走工作流的情况下,执行自定义的按钮禁用状态
this.define.btnGroupAction &&
this.define.btnGroupAction[btnItem] &&
......@@ -166,7 +175,7 @@ export default {
break;
}
}
return flag;
return flag || getBillState();
} else {
if (!val) return false;
let approveState = null;
......@@ -177,7 +186,7 @@ export default {
} else {
approveState = this.workflowState;
}
let disableState = val.split(";");
// 配置工作流已提交未审批90, billReadOnly状态下可用
// 主要用于保存在审批状态下可用,审批还能修改··
if (
......@@ -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) {
case 90: // 待审批
return disableState.includes("90");
......@@ -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