|
|
@ -23,6 +23,7 @@ import { Config_ModalType } from './UserConfig';
|
|
|
|
interface IBoardFindState
|
|
|
|
interface IBoardFindState
|
|
|
|
{
|
|
|
|
{
|
|
|
|
userInputName: string;
|
|
|
|
userInputName: string;
|
|
|
|
|
|
|
|
hardwareInput: string;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@inject('store')
|
|
|
|
@inject('store')
|
|
|
@ -33,12 +34,16 @@ export default class BoardFindModifyModal extends React.Component<{ store?: Boar
|
|
|
|
["左侧板", false], ["右侧板", false], ["顶板", false], ["底板", false],
|
|
|
|
["左侧板", false], ["右侧板", false], ["顶板", false], ["底板", false],
|
|
|
|
["层板", false], ["背板", false], ["地脚线", false],
|
|
|
|
["层板", false], ["背板", false], ["地脚线", false],
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
@observable _hardwareNameList: [string, boolean][] = [
|
|
|
|
|
|
|
|
["无盖铰链", false], ["半盖铰链", false], ["全盖铰链", false],
|
|
|
|
|
|
|
|
];
|
|
|
|
private showShops = observable.box(false);
|
|
|
|
private showShops = observable.box(false);
|
|
|
|
constructor(props)
|
|
|
|
constructor(props)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
super(props);
|
|
|
|
super(props);
|
|
|
|
this.state = {
|
|
|
|
this.state = {
|
|
|
|
userInputName: "",
|
|
|
|
userInputName: "",
|
|
|
|
|
|
|
|
hardwareInput: "",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
componentDidMount()
|
|
|
|
componentDidMount()
|
|
|
@ -110,6 +115,14 @@ export default class BoardFindModifyModal extends React.Component<{ store?: Boar
|
|
|
|
app.Editor.ModalManage.ToggleShow();
|
|
|
|
app.Editor.ModalManage.ToggleShow();
|
|
|
|
app.Editor.MaskManage.ShowMask();
|
|
|
|
app.Editor.MaskManage.ShowMask();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private async getHardWareOption(key: string, content: string)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
app.Editor.MaskManage.Clear();
|
|
|
|
|
|
|
|
app.Editor.ModalManage.ToggleShow();
|
|
|
|
|
|
|
|
await app.Editor.ModalManage.ExecCmd({ type: EFindType.GetHardWareOption, key, content });
|
|
|
|
|
|
|
|
app.Editor.ModalManage.ToggleShow();
|
|
|
|
|
|
|
|
app.Editor.MaskManage.ShowMask();
|
|
|
|
|
|
|
|
}
|
|
|
|
private handleApplyBrName = () =>
|
|
|
|
private handleApplyBrName = () =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
let name = this.state.userInputName;
|
|
|
|
let name = this.state.userInputName;
|
|
|
@ -123,6 +136,19 @@ export default class BoardFindModifyModal extends React.Component<{ store?: Boar
|
|
|
|
});
|
|
|
|
});
|
|
|
|
this.setState({ userInputName: name });
|
|
|
|
this.setState({ userInputName: name });
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
private handleApplyBrHardWare = () =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
let name = this.state.hardwareInput;
|
|
|
|
|
|
|
|
if (name)
|
|
|
|
|
|
|
|
name += ",";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this._hardwareNameList.forEach(v =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (v[1])
|
|
|
|
|
|
|
|
name += v[0] + ",";
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.setState({ hardwareInput: name });
|
|
|
|
|
|
|
|
};
|
|
|
|
private handleSelectGoods = (good: IGoodInfo) =>
|
|
|
|
private handleSelectGoods = (good: IGoodInfo) =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const option = this.props.store.m_Option;
|
|
|
|
const option = this.props.store.m_Option;
|
|
|
@ -367,7 +393,11 @@ export default class BoardFindModifyModal extends React.Component<{ store?: Boar
|
|
|
|
<input
|
|
|
|
<input
|
|
|
|
className={Classes.INPUT}
|
|
|
|
className={Classes.INPUT}
|
|
|
|
value={option.brName}
|
|
|
|
value={option.brName}
|
|
|
|
onChange={e => option.brName = e.target.value}
|
|
|
|
onChange={e =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
option.brName = e.target.value;
|
|
|
|
|
|
|
|
this.setState({ userInputName: e.target.value });
|
|
|
|
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<div className="select-name">
|
|
|
|
<div className="select-name">
|
|
|
|
<Button text="拾取" onClick={() => this.getBoardOption("brName", "选择板件获取板名")} />
|
|
|
|
<Button text="拾取" onClick={() => this.getBoardOption("brName", "选择板件获取板名")} />
|
|
|
@ -429,6 +459,93 @@ export default class BoardFindModifyModal extends React.Component<{ store?: Boar
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className="br-find-item small">
|
|
|
|
|
|
|
|
<Checkbox
|
|
|
|
|
|
|
|
checked={option.condition.hardwareName}
|
|
|
|
|
|
|
|
label="实体名"
|
|
|
|
|
|
|
|
onChange={() =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
option.condition.hardwareName = !option.condition.hardwareName;
|
|
|
|
|
|
|
|
this.handleIsSelectAll();
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<HTMLSelect
|
|
|
|
|
|
|
|
value={option.compareType.hardwareName}
|
|
|
|
|
|
|
|
options={["=", "!=", "//"]}
|
|
|
|
|
|
|
|
onChange={e =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
option.compareType.hardwareName = e.target.value as ECompareType;
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<input
|
|
|
|
|
|
|
|
className={Classes.INPUT}
|
|
|
|
|
|
|
|
value={option.hardwareName}
|
|
|
|
|
|
|
|
onChange={e =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
option.hardwareName = e.target.value;
|
|
|
|
|
|
|
|
this.setState({ hardwareInput: e.target.value });
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<div className="select-name">
|
|
|
|
|
|
|
|
<Button text="拾取" onClick={() => this.getHardWareOption("hardwareName", "选择五金获取实体名")} />
|
|
|
|
|
|
|
|
<Popover
|
|
|
|
|
|
|
|
usePortal={false}
|
|
|
|
|
|
|
|
modifiers={{
|
|
|
|
|
|
|
|
arrow: { enabled: false },
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
position={Position.LEFT}
|
|
|
|
|
|
|
|
content={
|
|
|
|
|
|
|
|
<Card style={{ width: 300 }}>
|
|
|
|
|
|
|
|
<H5>选择五金实体名</H5>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
this._hardwareNameList.map(v =>
|
|
|
|
|
|
|
|
<Checkbox
|
|
|
|
|
|
|
|
key={v[0]}
|
|
|
|
|
|
|
|
checked={v[1]}
|
|
|
|
|
|
|
|
label={v[0]}
|
|
|
|
|
|
|
|
inline
|
|
|
|
|
|
|
|
onChange={() =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
v[1] = !v[1];
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
text="应用选中"
|
|
|
|
|
|
|
|
intent={Intent.PRIMARY}
|
|
|
|
|
|
|
|
onClick={this.handleApplyBrHardWare}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
用逗号分割五金名称
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<input
|
|
|
|
|
|
|
|
className={Classes.INPUT}
|
|
|
|
|
|
|
|
value={this.state.hardwareInput}
|
|
|
|
|
|
|
|
onChange={e => this.setState({ hardwareInput: e.target.value })}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<div className="flex-arround">
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
text="确定"
|
|
|
|
|
|
|
|
className={Classes.POPOVER_DISMISS}
|
|
|
|
|
|
|
|
intent={Intent.SUCCESS}
|
|
|
|
|
|
|
|
onClick={() =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
option.hardwareName = this.state.hardwareInput;
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
className={Classes.POPOVER_DISMISS}
|
|
|
|
|
|
|
|
text="取消"
|
|
|
|
|
|
|
|
intent={Intent.DANGER} />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</Card>}
|
|
|
|
|
|
|
|
target={<Button text="选择" />}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<Checkbox
|
|
|
|
<Checkbox
|
|
|
|
checked={option.condition.useKeyWord}
|
|
|
|
checked={option.condition.useKeyWord}
|
|
|
|