Commit b9cbf1438ba966ba41a1bcd5f6101fa47907e73b
1 parent
3d4ce1ac
1.主页增加iJsOrder排序
2.工艺流程去掉部分按钮
Showing
2 changed files
with
12 additions
and
8 deletions
src/components/Common/Flows/CommonFlow.js
| @@ -36,7 +36,7 @@ const OverviewFlow = (props) => { | @@ -36,7 +36,7 @@ const OverviewFlow = (props) => { | ||
| 36 | if (commonutils.isNotEmptyArr(initialEdges)) { | 36 | if (commonutils.isNotEmptyArr(initialEdges)) { |
| 37 | initialEdges.forEach((item) => { | 37 | initialEdges.forEach((item) => { |
| 38 | if (commonutils.isNotEmptyStr(item.markerEnd)) { | 38 | if (commonutils.isNotEmptyStr(item.markerEnd)) { |
| 39 | - const markerObj = { | 39 | + const markerObj = { |
| 40 | type: MarkerType.ArrowClosed, | 40 | type: MarkerType.ArrowClosed, |
| 41 | } | 41 | } |
| 42 | item.markerEnd = markerObj | 42 | item.markerEnd = markerObj |
| @@ -123,11 +123,11 @@ const OverviewFlow = (props) => { | @@ -123,11 +123,11 @@ const OverviewFlow = (props) => { | ||
| 123 | <Button onClick={onAdd} id='AddSole'>单一部件</Button> | 123 | <Button onClick={onAdd} id='AddSole'>单一部件</Button> |
| 124 | <Button onClick={onAdd} id='AddPortalBundle'>合版部件</Button> | 124 | <Button onClick={onAdd} id='AddPortalBundle'>合版部件</Button> |
| 125 | <Button onClick={onAdd} id='AddClaim'>组装部件</Button> | 125 | <Button onClick={onAdd} id='AddClaim'>组装部件</Button> |
| 126 | - <Button onClick={onMadl}>选择工序</Button> | ||
| 127 | - <Button onClick={onMadl}>选择材料</Button> | ||
| 128 | - <Button onClick={onDel}>删除</Button> | ||
| 129 | - <Button onClick={onSave}>保存</Button> | ||
| 130 | - <Button id='Generate' onClick={onMadl}>反向生成工单</Button> | 126 | + {/*<Button onClick={onMadl}>选择工序</Button>*/} |
| 127 | + {/*<Button onClick={onMadl}>选择材料</Button>*/} | ||
| 128 | + {/*<Button onClick={onDel}>删除</Button>*/} | ||
| 129 | + {/*<Button onClick={onSave}>保存</Button>*/} | ||
| 130 | + {/*<Button id='Generate' onClick={onMadl}>反向生成工单</Button>*/} | ||
| 131 | <Button id='Err' onClick={onMadl}>开单逻辑错误</Button> | 131 | <Button id='Err' onClick={onMadl}>开单逻辑错误</Button> |
| 132 | <Modal title="添加部件名称" visible={isModalVisible} onOk={handleOk} onCancel={handleCancel}><Input placeholder="Basic usage" onChange={e => handleChangeValue(e)} value={value} /></Modal> | 132 | <Modal title="添加部件名称" visible={isModalVisible} onOk={handleOk} onCancel={handleCancel}><Input placeholder="Basic usage" onChange={e => handleChangeValue(e)} value={value} /></Modal> |
| 133 | </div> | 133 | </div> |
src/components/IndexCenter/IndexCenter.js
| @@ -204,12 +204,16 @@ class IndexCenter extends Component { | @@ -204,12 +204,16 @@ class IndexCenter extends Component { | ||
| 204 | // this.tableTree.scrollTop = 0; | 204 | // this.tableTree.scrollTop = 0; |
| 205 | // } | 205 | // } |
| 206 | const addState = {}; | 206 | const addState = {}; |
| 207 | - Object.keys(model).forEach((child, index) => { | 207 | + Object.keys(model).sort((a, b) => { |
| 208 | + const firstA = model[a][0]?.iJsOrder || 0; | ||
| 209 | + const firstB = model[b][0]?.iJsOrder || 0; | ||
| 210 | + return firstA - firstB; | ||
| 211 | + }).forEach((child, index) => { | ||
| 208 | const name = child.split('_')[0]; | 212 | const name = child.split('_')[0]; |
| 209 | // const num = child.split('_')[1]; | 213 | // const num = child.split('_')[1]; |
| 210 | let num = 0; | 214 | let num = 0; |
| 211 | // const key = name; | 215 | // const key = name; |
| 212 | - const data = model[child]; | 216 | + const data = model[child].sort((a, b) => a.iJsOrder - b.iJsOrder); |
| 213 | data.forEach((item, index) => { | 217 | data.forEach((item, index) => { |
| 214 | let { dToDayNum } = item; | 218 | let { dToDayNum } = item; |
| 215 | dToDayNum = Number(dToDayNum); | 219 | dToDayNum = Number(dToDayNum); |