|
|
@ -1,4 +1,4 @@
|
|
|
|
import { Alert, Button, Classes, Label, Tag } from '@blueprintjs/core';
|
|
|
|
import { Alert, Button, Classes, Intent, Label, Tag } from '@blueprintjs/core';
|
|
|
|
import { observable } from 'mobx';
|
|
|
|
import { observable } from 'mobx';
|
|
|
|
import { observer } from 'mobx-react';
|
|
|
|
import { observer } from 'mobx-react';
|
|
|
|
import * as React from 'react';
|
|
|
|
import * as React from 'react';
|
|
|
@ -6,7 +6,6 @@ import { Vector3 } from 'three';
|
|
|
|
import { app } from '../../../ApplicationServices/Application';
|
|
|
|
import { app } from '../../../ApplicationServices/Application';
|
|
|
|
import { arrayRemove } from '../../../Common/ArrayExt';
|
|
|
|
import { arrayRemove } from '../../../Common/ArrayExt';
|
|
|
|
import { EBoardKeyList } from '../../../Common/BoardKeyList';
|
|
|
|
import { EBoardKeyList } from '../../../Common/BoardKeyList';
|
|
|
|
import { CheckObjectType } from '../../../Common/CheckoutVaildValue';
|
|
|
|
|
|
|
|
import { CommandNames } from '../../../Common/CommandNames';
|
|
|
|
import { CommandNames } from '../../../Common/CommandNames';
|
|
|
|
import { FixedNotZero } from '../../../Common/Utils';
|
|
|
|
import { FixedNotZero } from '../../../Common/Utils';
|
|
|
|
import { Board } from '../../../DatabaseServices/Entity/Board';
|
|
|
|
import { Board } from '../../../DatabaseServices/Entity/Board';
|
|
|
@ -15,12 +14,15 @@ import { HardwareTopline } from '../../../DatabaseServices/Hardware/HardwareTopl
|
|
|
|
import { ProcessingGroupRecord } from '../../../DatabaseServices/ProcessingGroup/ProcessingGroupRecord';
|
|
|
|
import { ProcessingGroupRecord } from '../../../DatabaseServices/ProcessingGroup/ProcessingGroupRecord';
|
|
|
|
import { CommandWrap } from '../../../Editor/CommandMachine';
|
|
|
|
import { CommandWrap } from '../../../Editor/CommandMachine';
|
|
|
|
import { PromptStatus } from '../../../Editor/PromptResult';
|
|
|
|
import { PromptStatus } from '../../../Editor/PromptResult';
|
|
|
|
|
|
|
|
import { GoodsType, IGoodInfo } from '../../MaterialEditor/GoodsList';
|
|
|
|
|
|
|
|
import { GoodsListDiv } from '../../MaterialEditor/GoodsListDiv';
|
|
|
|
import { BaseHardwareStore } from '../../Store/RightPanelStore/HardwareStore';
|
|
|
|
import { BaseHardwareStore } from '../../Store/RightPanelStore/HardwareStore';
|
|
|
|
import { ToasterInput } from '../Toaster';
|
|
|
|
import { EMetalsType } from './RightPanelInterface';
|
|
|
|
|
|
|
|
|
|
|
|
export interface ICommonMetalPanelProps
|
|
|
|
export interface ICommonMetalPanelProps
|
|
|
|
{
|
|
|
|
{
|
|
|
|
store: BaseHardwareStore;
|
|
|
|
store: BaseHardwareStore;
|
|
|
|
|
|
|
|
compositeType?: EMetalsType;
|
|
|
|
isTopline?: boolean;
|
|
|
|
isTopline?: boolean;
|
|
|
|
entity?: Entity;//五金类实体(包括顶线)
|
|
|
|
entity?: Entity;//五金类实体(包括顶线)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -33,6 +35,7 @@ export class CommonMetalPanel extends React.Component<ICommonMetalPanelProps>
|
|
|
|
|
|
|
|
|
|
|
|
private showAlert = observable.box(false);
|
|
|
|
private showAlert = observable.box(false);
|
|
|
|
@observable private tags: string[] = [];
|
|
|
|
@observable private tags: string[] = [];
|
|
|
|
|
|
|
|
private _ShowShops = observable.box(false);
|
|
|
|
|
|
|
|
|
|
|
|
private updateTags = () =>
|
|
|
|
private updateTags = () =>
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -99,6 +102,11 @@ export class CommonMetalPanel extends React.Component<ICommonMetalPanelProps>
|
|
|
|
app.Editor.ModalManage.ToggleShow();
|
|
|
|
app.Editor.ModalManage.ToggleShow();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private handleOpenShopList = () =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
this._ShowShops.set(true);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
componentDidMount(): void
|
|
|
|
componentDidMount(): void
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.updateTags();
|
|
|
|
this.updateTags();
|
|
|
@ -156,7 +164,7 @@ export class CommonMetalPanel extends React.Component<ICommonMetalPanelProps>
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<label className="bp3-label bp3-inline .modifier" style={{ display: "flex" }}>
|
|
|
|
<label className="bp3-label bp3-inline .modifier" style={{ display: "flex" }}>
|
|
|
|
<span style={{ width: 47 }}>加工组:</span>
|
|
|
|
<span style={{ width: 53 }}>加工组:</span>
|
|
|
|
<div style={{ display: "inline-flex", flex: 1, minWidth: 120 }}>
|
|
|
|
<div style={{ display: "inline-flex", flex: 1, minWidth: 120 }}>
|
|
|
|
<input className="bp3-input" title="双击查看详细内容" value={this.tags.length > 0 ? this.tags.join(", ") : ""} readOnly style={{ minWidth: 100, flex: 1 }} onDoubleClick={this.onProcessInputDbClick} />
|
|
|
|
<input className="bp3-input" title="双击查看详细内容" value={this.tags.length > 0 ? this.tags.join(", ") : ""} readOnly style={{ minWidth: 100, flex: 1 }} onDoubleClick={this.onProcessInputDbClick} />
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
@ -166,7 +174,8 @@ export class CommonMetalPanel extends React.Component<ICommonMetalPanelProps>
|
|
|
|
minHeight: 18,
|
|
|
|
minHeight: 18,
|
|
|
|
height: 18,
|
|
|
|
height: 18,
|
|
|
|
padding: 0,
|
|
|
|
padding: 0,
|
|
|
|
fontSize: 12
|
|
|
|
fontSize: 12,
|
|
|
|
|
|
|
|
marginLeft: 6
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
onClick={() => this.onProcessInputDbClick()}
|
|
|
|
onClick={() => this.onProcessInputDbClick()}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
@ -289,7 +298,7 @@ export class CommonMetalPanel extends React.Component<ICommonMetalPanelProps>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
metalTypeFields.map(([t, k]) => (
|
|
|
|
metalTypeFields.map(([t, k]) => (
|
|
|
|
<Label className={`metal-label ${Classes.INLINE}`} key={k}>
|
|
|
|
<Label className={`metal-label ${Classes.INLINE}`} key={k}>
|
|
|
|
<span >{t}</span>
|
|
|
|
<span>{t}</span>
|
|
|
|
<input
|
|
|
|
<input
|
|
|
|
tabIndex={1}
|
|
|
|
tabIndex={1}
|
|
|
|
type="text"
|
|
|
|
type="text"
|
|
|
@ -301,6 +310,40 @@ export class CommonMetalPanel extends React.Component<ICommonMetalPanelProps>
|
|
|
|
))
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className='room-cabinet-name' style={{ display: "flex", justifyContent: "left" }}>
|
|
|
|
|
|
|
|
<Label className={Classes.INLINE + " metal-label"} key={"goods_type"}>
|
|
|
|
|
|
|
|
<span>商品编码:</span>
|
|
|
|
|
|
|
|
<input tabIndex={1} className={Classes.INPUT} value={option.goodsSn} readOnly={true} />
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
this._ShowShops.get() && <GoodsListDiv
|
|
|
|
|
|
|
|
open={this._ShowShops}
|
|
|
|
|
|
|
|
goods_type={this.props.compositeType === EMetalsType.Metals ? GoodsType.metals : GoodsType.comp}
|
|
|
|
|
|
|
|
select={(good: IGoodInfo) =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
option.goodsId = good.goods_id;
|
|
|
|
|
|
|
|
option.goodsSn = good.goods_sn;
|
|
|
|
|
|
|
|
this._ShowShops.set(false);
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</Label>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
text="选择"
|
|
|
|
|
|
|
|
intent={Intent.NONE}
|
|
|
|
|
|
|
|
style={{ minHeight: 20, height: 20, marginLeft: 5, minWidth: 31, width: 31, padding: 0, fontSize: 12 }}
|
|
|
|
|
|
|
|
onClick={this.handleOpenShopList}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
text="清空"
|
|
|
|
|
|
|
|
intent={Intent.NONE}
|
|
|
|
|
|
|
|
style={{ minHeight: 20, height: 20, marginLeft: 5, minWidth: 31, width: 31, padding: 0, fontSize: 12 }}
|
|
|
|
|
|
|
|
onClick={() =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
option.goodsId = "";
|
|
|
|
|
|
|
|
option.goodsSn = "";
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
isTopline && (
|
|
|
|
isTopline && (
|
|
|
|
<div className="metal-param">
|
|
|
|
<div className="metal-param">
|
|
|
@ -331,10 +374,21 @@ export class CommonMetalPanel extends React.Component<ICommonMetalPanelProps>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{this.ProcessingGroupAndPrice()}
|
|
|
|
{this.ProcessingGroupAndPrice()}
|
|
|
|
{this.MetalParam()}
|
|
|
|
{this.MetalParam()}
|
|
|
|
{!isTopline && <Label className={`metal-label_count ${Classes.INLINE}`}>
|
|
|
|
{
|
|
|
|
<span>数量:</span>
|
|
|
|
!isTopline &&
|
|
|
|
<ToasterInput type={CheckObjectType.None} option={option} optKey="count" />
|
|
|
|
<div className="metal-param">
|
|
|
|
</Label>}
|
|
|
|
< Label className={`metal-label ${Classes.INLINE}`}>
|
|
|
|
|
|
|
|
<span>数量:</span>
|
|
|
|
|
|
|
|
<input
|
|
|
|
|
|
|
|
tabIndex={1}
|
|
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
|
|
className={Classes.INPUT}
|
|
|
|
|
|
|
|
value={option["count"]}
|
|
|
|
|
|
|
|
onChange={(e) => (option["count"] = e.target.value)}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</Label>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
}
|
|
|
|
{!isTopline && !isRightMetalPanel && (
|
|
|
|
{!isTopline && !isRightMetalPanel && (
|
|
|
|
<div className="metal-param">
|
|
|
|
<div className="metal-param">
|
|
|
|
{
|
|
|
|
{
|
|
|
|