|
|
@ -229,7 +229,6 @@ export class LookOverBoardInfosModal extends React.Component<LookOverBoardInfosM
|
|
|
|
this.InitWidth();
|
|
|
|
this.InitWidth();
|
|
|
|
|
|
|
|
|
|
|
|
let selectCtrl = app.Editor.SelectCtrl;
|
|
|
|
let selectCtrl = app.Editor.SelectCtrl;
|
|
|
|
let dr = new DrillingReactor();
|
|
|
|
|
|
|
|
const UpdateByRedoUndo = (historyRec: CommandHistoryRecord) =>
|
|
|
|
const UpdateByRedoUndo = (historyRec: CommandHistoryRecord) =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
loop1:
|
|
|
|
loop1:
|
|
|
@ -295,7 +294,7 @@ export class LookOverBoardInfosModal extends React.Component<LookOverBoardInfosM
|
|
|
|
e.stopPropagation();
|
|
|
|
e.stopPropagation();
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
end(dr, dr.StartReactor, () =>
|
|
|
|
end(app._drillingReactor, app._drillingReactor.StartReactor, () =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.UpdateDrillCount(this.dataList.realBr);
|
|
|
|
this.UpdateDrillCount(this.dataList.realBr);
|
|
|
|
}),
|
|
|
|
}),
|
|
|
@ -869,125 +868,123 @@ export class LookOverBoardInfosModal extends React.Component<LookOverBoardInfosM
|
|
|
|
const listItemHeight = 23;
|
|
|
|
const listItemHeight = 23;
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<div
|
|
|
|
<div
|
|
|
|
className={Classes.DIALOG_CONTAINER}
|
|
|
|
className={Classes.DIALOG_CONTAINER}
|
|
|
|
style={{ width: "100%", height: "100%" }}
|
|
|
|
style={{ width: "100%", height: "100%" }}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<div className={Classes.DIALOG + " br-lookover"}>
|
|
|
|
<div className={Classes.DIALOG + " br-lookover"}>
|
|
|
|
<ModalHeader
|
|
|
|
<ModalHeader
|
|
|
|
title="板件属性"
|
|
|
|
title="板件属性"
|
|
|
|
icon="bold"
|
|
|
|
icon="bold"
|
|
|
|
close={() => { this.OnOk(ModalState.Cancel); }}
|
|
|
|
close={() => { this.OnOk(ModalState.Cancel); }}
|
|
|
|
isPinBtn={true}
|
|
|
|
isPinBtn={true}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<div className={Classes.DIALOG_BODY + " flex " + Classes.CARD} style={{ height: 400, width: "100%" }}>
|
|
|
|
<div className={Classes.DIALOG_BODY + " flex " + Classes.CARD} style={{ height: 400, width: "100%" }}>
|
|
|
|
{/* 列表 */}
|
|
|
|
{/* 列表 */}
|
|
|
|
<Card>
|
|
|
|
<Card>
|
|
|
|
<AutoSizer>
|
|
|
|
<AutoSizer>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
({ height, width }) => (
|
|
|
|
|
|
|
|
<>
|
|
|
|
|
|
|
|
<BoardList
|
|
|
|
|
|
|
|
height={height}
|
|
|
|
|
|
|
|
width={width}
|
|
|
|
|
|
|
|
dragDivH={this.dragDivH}
|
|
|
|
|
|
|
|
searchRes={this.searchRes}
|
|
|
|
|
|
|
|
selectedBrOnList={this.selectedBrOnList}
|
|
|
|
|
|
|
|
UpdateDisplayData={this.UpdateDisplayData}
|
|
|
|
|
|
|
|
isCtrlDown={this.isCtrlDown}
|
|
|
|
|
|
|
|
processGroupMap={this.processGroupMap}
|
|
|
|
|
|
|
|
modifyBoardData={this.modifyBoardData}
|
|
|
|
|
|
|
|
UpdateSeletctedBr={this.UpdateSeletctedBr}
|
|
|
|
|
|
|
|
ModifyBoard={this.ModifyBoard}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
{/* 配件信息 */}
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<Divider style={{ height: 1, width: width * 0.99 }} />
|
|
|
|
|
|
|
|
<Rnd
|
|
|
|
|
|
|
|
className="drag-handle"
|
|
|
|
|
|
|
|
disableDragging={true}
|
|
|
|
|
|
|
|
enableResizing={{ top: true }}
|
|
|
|
|
|
|
|
maxHeight={335}
|
|
|
|
|
|
|
|
onResize={(e, direction, ref, delta, position) =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
this.dragDivH = ref.clientHeight;
|
|
|
|
|
|
|
|
this.setState({ dragDivH: ref.clientHeight });
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<>
|
|
|
|
|
|
|
|
<div style={{ height: this.state.dragDivH - 1, width: width, overflow: "auto", paddingLeft: 10, paddingTop: 4, marginTop: 1 }} >
|
|
|
|
|
|
|
|
{/* 配件信息 */}
|
|
|
|
|
|
|
|
<PartsTable partsCount={this.drillCount} titles={["配件拆单名", "数量", "单位"]} type={PartsType.Hole} />
|
|
|
|
|
|
|
|
<PartsTable partsCount={this.sealCount} titles={["配件拆单名", "宽度", "颜色", "数量", "单位"]} type={PartsType.Edge} />
|
|
|
|
|
|
|
|
<PartsTable partsCount={this.hardwareCount} titles={HardwareTitles} type={PartsType.Hardware} />
|
|
|
|
|
|
|
|
<PartsTable partsCount={this.areaCount} titles={AreaTitle} type={PartsType.Area} />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</>
|
|
|
|
|
|
|
|
</Rnd>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</AutoSizer>
|
|
|
|
|
|
|
|
</Card>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<ModalFooter hasConfig={false}>
|
|
|
|
|
|
|
|
<label className={Classes.LABEL + " " + Classes.INLINE}>
|
|
|
|
|
|
|
|
<label>{`总计 ${this.searchRes.dataBr.length} 块板, `}</label>
|
|
|
|
|
|
|
|
<label>{`总计 ${this.CalcArea()}平方 `}</label>
|
|
|
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<InputGroup className={"search"} type="search" placeholder="关键字查找..." dir="auto"
|
|
|
|
|
|
|
|
onChange={(e) => { this.searchingStr = e.target.value; this.SearchData(); }}
|
|
|
|
|
|
|
|
onFocus={this.ConvertBoardListDataToArray}
|
|
|
|
|
|
|
|
value={this.searchingStr} />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
text="重置"
|
|
|
|
|
|
|
|
intent={Intent.DANGER}
|
|
|
|
|
|
|
|
onClick={() =>
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.modifyBoardData = new Map();
|
|
|
|
({ height, width }) => (
|
|
|
|
this.dataList.dataBr = [];
|
|
|
|
<>
|
|
|
|
this.dataList.realBr.forEach((b) => { this.dataList.dataBr.push(b.Clone()); });
|
|
|
|
<BoardList
|
|
|
|
Object.assign(this.searchRes, this.dataList);
|
|
|
|
height={height}
|
|
|
|
}}
|
|
|
|
width={width}
|
|
|
|
/>
|
|
|
|
dragDivH={this.dragDivH}
|
|
|
|
<Button
|
|
|
|
searchRes={this.searchRes}
|
|
|
|
intent={Intent.PRIMARY}
|
|
|
|
selectedBrOnList={this.selectedBrOnList}
|
|
|
|
text="查看选中板"
|
|
|
|
UpdateDisplayData={this.UpdateDisplayData}
|
|
|
|
onClick={this.LookSelectBr}
|
|
|
|
isCtrlDown={this.isCtrlDown}
|
|
|
|
/>
|
|
|
|
processGroupMap={this.processGroupMap}
|
|
|
|
<Button
|
|
|
|
modifyBoardData={this.modifyBoardData}
|
|
|
|
intent={Intent.DANGER}
|
|
|
|
UpdateSeletctedBr={this.UpdateSeletctedBr}
|
|
|
|
text="清除所有选中"
|
|
|
|
ModifyBoard={this.ModifyBoard}
|
|
|
|
onClick={this.ClearSelectedBr}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
{/* 配件信息 */}
|
|
|
|
<Button
|
|
|
|
{
|
|
|
|
intent={Intent.PRIMARY}
|
|
|
|
<div>
|
|
|
|
text="显示同属性板件"
|
|
|
|
<Divider style={{ height: 1, width: width * 0.99 }} />
|
|
|
|
disabled={!(this.selectedBrOnList.length === 1)}
|
|
|
|
<Rnd
|
|
|
|
onClick={() => { this.CheckOutSameTypeBr(this.BoardList); }}
|
|
|
|
className="drag-handle"
|
|
|
|
/>
|
|
|
|
disableDragging={true}
|
|
|
|
<Button
|
|
|
|
enableResizing={{ top: true }}
|
|
|
|
text="应用数据修改"
|
|
|
|
maxHeight={335}
|
|
|
|
intent={Intent.SUCCESS}
|
|
|
|
onResize={(e, direction, ref, delta, position) =>
|
|
|
|
onClick={() =>
|
|
|
|
{
|
|
|
|
{ this.OnOk(ModalState.Ok, { type: EFindType.Modify }); }} />
|
|
|
|
this.dragDivH = ref.clientHeight;
|
|
|
|
{/* <Button
|
|
|
|
this.setState({ dragDivH: ref.clientHeight });
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<>
|
|
|
|
|
|
|
|
<div style={{ height: this.state.dragDivH - 1, width: width, overflow: "auto", paddingLeft: 10, paddingTop: 4, marginTop: 1 }} >
|
|
|
|
|
|
|
|
{/* 配件信息 */}
|
|
|
|
|
|
|
|
<PartsTable partsCount={this.drillCount} titles={["配件拆单名", "数量", "单位"]} type={PartsType.Hole} />
|
|
|
|
|
|
|
|
<PartsTable partsCount={this.sealCount} titles={["配件拆单名", "宽度", "颜色", "数量", "单位"]} type={PartsType.Edge} />
|
|
|
|
|
|
|
|
<PartsTable partsCount={this.hardwareCount} titles={HardwareTitles} type={PartsType.Hardware} />
|
|
|
|
|
|
|
|
<PartsTable partsCount={this.areaCount} titles={AreaTitle} type={PartsType.Area} />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</>
|
|
|
|
|
|
|
|
</Rnd>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</AutoSizer>
|
|
|
|
|
|
|
|
</Card>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<ModalFooter hasConfig={false}>
|
|
|
|
|
|
|
|
<label className={Classes.LABEL + " " + Classes.INLINE}>
|
|
|
|
|
|
|
|
<label>{`总计 ${this.searchRes.dataBr.length} 块板, `}</label>
|
|
|
|
|
|
|
|
<label>{`总计 ${this.CalcArea()}平方 `}</label>
|
|
|
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<InputGroup className={"search"} type="search" placeholder="关键字查找..." dir="auto"
|
|
|
|
|
|
|
|
onChange={(e) => { this.searchingStr = e.target.value; this.SearchData(); }}
|
|
|
|
|
|
|
|
onFocus={this.ConvertBoardListDataToArray}
|
|
|
|
|
|
|
|
value={this.searchingStr} />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
text="重置"
|
|
|
|
|
|
|
|
intent={Intent.DANGER}
|
|
|
|
|
|
|
|
onClick={() =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
this.modifyBoardData = new Map();
|
|
|
|
|
|
|
|
this.dataList.dataBr = [];
|
|
|
|
|
|
|
|
this.dataList.realBr.forEach((b) => { this.dataList.dataBr.push(b.Clone()); });
|
|
|
|
|
|
|
|
Object.assign(this.searchRes, this.dataList);
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
intent={Intent.PRIMARY}
|
|
|
|
|
|
|
|
text="查看选中板"
|
|
|
|
|
|
|
|
onClick={this.LookSelectBr}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
intent={Intent.DANGER}
|
|
|
|
|
|
|
|
text="清除所有选中"
|
|
|
|
|
|
|
|
onClick={this.ClearSelectedBr}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
intent={Intent.PRIMARY}
|
|
|
|
|
|
|
|
text="显示同属性板件"
|
|
|
|
|
|
|
|
disabled={!(this.selectedBrOnList.length === 1)}
|
|
|
|
|
|
|
|
onClick={() => { this.CheckOutSameTypeBr(this.BoardList); }}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
text="应用数据修改"
|
|
|
|
|
|
|
|
intent={Intent.SUCCESS}
|
|
|
|
|
|
|
|
onClick={() =>
|
|
|
|
|
|
|
|
{ this.OnOk(ModalState.Ok, { type: EFindType.Modify }); }} />
|
|
|
|
|
|
|
|
{/* <Button
|
|
|
|
// 待补充
|
|
|
|
// 待补充
|
|
|
|
text="修改选择板件的板材" /> */}
|
|
|
|
text="修改选择板件的板材" /> */}
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
intent={Intent.PRIMARY}
|
|
|
|
intent={Intent.PRIMARY}
|
|
|
|
text="导出CSV"
|
|
|
|
text="导出CSV"
|
|
|
|
onClick={this.HandleExportCSV}
|
|
|
|
onClick={this.HandleExportCSV}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</ModalFooter>
|
|
|
|
</ModalFooter>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|