!699 优化排钻框校验

pull/699/MERGE
ZoeLeeFZ 5 years ago committed by ChenX
parent b92ac5c580
commit 8ada6313ff

@ -1,5 +1,5 @@
import React = require("react"); import React = require("react");
import { Button, Classes, Radio, RadioGroup } from "@blueprintjs/core"; import { Button, Classes, Radio, RadioGroup, Intent } from "@blueprintjs/core";
import { observable } from "mobx"; import { observable } from "mobx";
import { inject, observer } from "mobx-react"; import { inject, observer } from "mobx-react";
import { begin } from "xaop"; import { begin } from "xaop";
@ -170,7 +170,7 @@ export class ReferenceCuttingModal extends React.Component<{ store: ReferenceCut
onClick={() => onClick={() =>
{ {
if (store.HasInvailValue()) if (store.HasInvailValue())
AppToaster.show({ message: "存在无效数值,请修正", timeout: 1000 }); AppToaster.show({ message: "存在无效数值,请修正", timeout: 2000, intent: Intent.DANGER });
else else
store.OnOk(); store.OnOk();
}} }}

@ -36,6 +36,7 @@ export class DrawSpecialShapedBoard implements Command
br.BoardType = store.m_Option.type; br.BoardType = store.m_Option.type;
br.ApplyMatrix(br.OCSInv); br.ApplyMatrix(br.OCSInv);
br.Thickness = store.m_Option.thickness; br.Thickness = store.m_Option.thickness;
br.BoardProcessOption = store.BoardProcessOption;
if (store.m_Option.type === BoardType.Layer) if (store.m_Option.type === BoardType.Layer)
{ {
//基点修改 //基点修改

@ -166,6 +166,7 @@ export namespace CheckoutValid
case "grooveAddLength": case "grooveAddLength":
case "grooveAddDepth": case "grooveAddDepth":
case "grooveAddWidth": case "grooveAddWidth":
case "back":
if (isNaN(val)) if (isNaN(val))
return "数值不能为空且必须为数字"; return "数值不能为空且必须为数字";
default: default:
@ -191,8 +192,11 @@ export namespace CheckoutValid
case "pxlOffset": case "pxlOffset":
case "collsionDist": case "collsionDist":
case "tHoleOffset": case "tHoleOffset":
case "notGangDist":
if (v === "") if (v === "")
return "不能为空"; return "不能为空";
if (!(isNum(v)))
return "数值不能为空且必须为数字";
return ""; return "";
case "count": case "count":
case "pxlRad": case "pxlRad":

@ -311,16 +311,15 @@ export class DrillModal extends React.Component<{ store?: DrillStore; }, {}> {
</div> </div>
<h5 className={Classes.HEADING}></h5> <h5 className={Classes.HEADING}></h5>
<div className="small-input flexWrap flex-col"> <div className="small-input flexWrap flex-col">
<div> <div className="br-set">
<span></span> <span></span>
<input <ToasterInput
className="bp3-input" type={CheckObjectType.DR}
value={store.UIOption["notGangDist"]} optKey="notGangDist"
onChange={e => option={store.m_Option}
{ uiOption={store.UIOption}
store.UIOption["notGangDist"] = e.target.value; inline={true}
store.m_Option.notGangDist = safeEval(e.target.value); />
}} />
<span></span> <span></span>
</div> </div>
<Checkbox <Checkbox

Loading…
Cancel
Save