Commit 6cbc399bd0f60b124d38cf07c63a88053a18e736
1 parent
c6622bb1
1.工单,工艺卡,点击部件,展示所有的部件材料
Showing
3 changed files
with
23 additions
and
0 deletions
src/components/Manufacture/ProcessCardPackTableTreeNew/index.js
| @@ -844,6 +844,13 @@ const ProcessCardPackTableTreeNewEvent = props => { | @@ -844,6 +844,13 @@ const ProcessCardPackTableTreeNewEvent = props => { | ||
| 844 | dispatchFunc(name, "onDataChange", ["name", "sFieldName", "changeValue", "sId", "dropDownData"], args); | 844 | dispatchFunc(name, "onDataChange", ["name", "sFieldName", "changeValue", "sId", "dropDownData"], args); |
| 845 | }; | 845 | }; |
| 846 | returnProps.onDataChange = handleTableChange; | 846 | returnProps.onDataChange = handleTableChange; |
| 847 | + // 行选择事件 | ||
| 848 | + const handleTableSelectRowChange = (...args) => { | ||
| 849 | + const [name0] = args; | ||
| 850 | + const name = name0.includes("materials") ? "materials" : name0; | ||
| 851 | + dispatchFunc(name, "onTableSelectRowChange", ["name", "selectedRowKeys"], args); | ||
| 852 | + }; | ||
| 853 | + returnProps.onTableSelectRowChange = handleTableSelectRowChange; | ||
| 847 | 854 | ||
| 848 | // 各种超链接点击 | 855 | // 各种超链接点击 |
| 849 | const handleViewChoose = (...args) => { | 856 | const handleViewChoose = (...args) => { |
| @@ -2746,6 +2753,10 @@ const controlProps = props => { | @@ -2746,6 +2753,10 @@ const controlProps = props => { | ||
| 2746 | packData, | 2753 | packData, |
| 2747 | }); | 2754 | }); |
| 2748 | }; | 2755 | }; |
| 2756 | + returnProps.onTableSelectRowChange = async ({ name, selectedRowKeys }) => { | ||
| 2757 | + const addState = await props.onTableSelectRowChange(name, selectedRowKeys, true); | ||
| 2758 | + props.onSaveState({ addState, processSelectedRowKeys: []}); | ||
| 2759 | + } | ||
| 2749 | returnProps.onViewChoose = ({ sName, record }) => { | 2760 | returnProps.onViewChoose = ({ sName, record }) => { |
| 2750 | const { sId } = record; /* 控制表主键 */ | 2761 | const { sId } = record; /* 控制表主键 */ |
| 2751 | const { enabled, slaveData } = props; | 2762 | const { enabled, slaveData } = props; |
src/components/Manufacture/WorkOrderPackTableTreeNew/index.js
| @@ -1294,6 +1294,13 @@ const WorkOrderPackTableTreeNewEvent = props => { | @@ -1294,6 +1294,13 @@ const WorkOrderPackTableTreeNewEvent = props => { | ||
| 1294 | }; | 1294 | }; |
| 1295 | returnProps.onDataChange = handleTableChange; | 1295 | returnProps.onDataChange = handleTableChange; |
| 1296 | 1296 | ||
| 1297 | + const handleTableSelectRowChange = (...args) => { | ||
| 1298 | + const [name0] = args; | ||
| 1299 | + const name = name0.includes("materials") ? "materials" : name0; | ||
| 1300 | + dispatchFunc(name, "onTableSelectRowChange", ["name", "selectedRowKeys"], args); | ||
| 1301 | + }; | ||
| 1302 | + returnProps.onTableSelectRowChange = handleTableSelectRowChange; | ||
| 1303 | + | ||
| 1297 | // 各种超链接点击 | 1304 | // 各种超链接点击 |
| 1298 | const handleViewChoose = (...args) => { | 1305 | const handleViewChoose = (...args) => { |
| 1299 | const [name0] = args; | 1306 | const [name0] = args; |
| @@ -3419,6 +3426,10 @@ const controlProps = props => { | @@ -3419,6 +3426,10 @@ const controlProps = props => { | ||
| 3419 | packData, | 3426 | packData, |
| 3420 | }); | 3427 | }); |
| 3421 | }; | 3428 | }; |
| 3429 | + returnProps.onTableSelectRowChange = async ({ name, selectedRowKeys }) => { | ||
| 3430 | + const addState = await props.onTableSelectRowChange(name, selectedRowKeys, true); | ||
| 3431 | + props.onSaveState({ addState, processSelectedRowKeys: []}); | ||
| 3432 | + } | ||
| 3422 | returnProps.onViewChoose = ({ name, sName, record }) => { | 3433 | returnProps.onViewChoose = ({ name, sName, record }) => { |
| 3423 | const { sId } = record; /* 控制表主键 */ | 3434 | const { sId } = record; /* 控制表主键 */ |
| 3424 | const { enabled, slaveData } = props; | 3435 | const { enabled, slaveData } = props; |
src/components/QuoQuotation/QuotationPackTableTree/QuotationPackTableTree.js
| @@ -1806,6 +1806,7 @@ class QuotationPackTableTree extends Component { | @@ -1806,6 +1806,7 @@ class QuotationPackTableTree extends Component { | ||
| 1806 | treeSelectedKeys = selectedRowKeys; /* 把树形选中节点赋值给表格部件选中节点 */ | 1806 | treeSelectedKeys = selectedRowKeys; /* 把树形选中节点赋值给表格部件选中节点 */ |
| 1807 | addState.treeSelectedKeys = treeSelectedKeys; | 1807 | addState.treeSelectedKeys = treeSelectedKeys; |
| 1808 | } | 1808 | } |
| 1809 | + addState.processSelectedRowKeys = []; /* 部件选中时 清空工序的选中 */ | ||
| 1809 | } | 1810 | } |
| 1810 | this.props.onSaveState(addState); | 1811 | this.props.onSaveState(addState); |
| 1811 | } else if (name === 'materials' || name === 'process') { | 1812 | } else if (name === 'materials' || name === 'process') { |