Commit 2a7329179a1c3ce922c69d1f15b11c925243490a
1 parent
bde00f75
手工机台上班
Showing
1 changed file
with
17 additions
and
13 deletions
src/mes/teamInfo/index.js
| @@ -509,18 +509,21 @@ const TeamInfo = baseProps => { | @@ -509,18 +509,21 @@ const TeamInfo = baseProps => { | ||
| 509 | let bManualTableProps | 509 | let bManualTableProps |
| 510 | let bManualSlaveTableProps | 510 | let bManualSlaveTableProps |
| 511 | if (bManual) { | 511 | if (bManual) { |
| 512 | - const tableBaseProps = commonBusiness.getTableTypes("master", props); | ||
| 513 | - const slaveTableBaseProps = commonBusiness.getTableTypes("slave", props); | 512 | + const tableBaseProps = commonBusiness.getTableTypes("slave", props); |
| 513 | + const slaveTableBaseProps = commonBusiness.getTableTypes("slave1", props); | ||
| 514 | bManualTableProps = { | 514 | bManualTableProps = { |
| 515 | ...tableBaseProps, | 515 | ...tableBaseProps, |
| 516 | + selectedRowKeys: tableBaseProps.selectedRowKeys ? tableBaseProps.selectedRowKeys : [tableBaseProps?.data?.sId], | ||
| 516 | fixedHeight: "calc(50vh - 218px)" | 517 | fixedHeight: "calc(50vh - 218px)" |
| 517 | } | 518 | } |
| 518 | bManualSlaveTableProps = { | 519 | bManualSlaveTableProps = { |
| 519 | ...slaveTableBaseProps, | 520 | ...slaveTableBaseProps, |
| 521 | + data: slaveTableBaseProps?.data?.filter(item=>item.sParentId === bManualTableProps.selectedRowKeys?.[0]), | ||
| 520 | fixedHeight: "calc(50vh - 126px)" | 522 | fixedHeight: "calc(50vh - 126px)" |
| 521 | 523 | ||
| 522 | } | 524 | } |
| 523 | } | 525 | } |
| 526 | + | ||
| 524 | const handleSave = (props) => { | 527 | const handleSave = (props) => { |
| 525 | props.onExecInstructSet({ | 528 | props.onExecInstructSet({ |
| 526 | btnConfig: { | 529 | btnConfig: { |
| @@ -588,7 +591,10 @@ const TeamInfo = baseProps => { | @@ -588,7 +591,10 @@ const TeamInfo = baseProps => { | ||
| 588 | <Button | 591 | <Button |
| 589 | type="primary" | 592 | type="primary" |
| 590 | onClick={() => { | 593 | onClick={() => { |
| 591 | - console.log(1111111); | 594 | + |
| 595 | + if (props.masterData && !props.masterData.length) { | ||
| 596 | + return message.warning('请先添加一条班组信息!') | ||
| 597 | + } | ||
| 592 | setFaceModal(true); | 598 | setFaceModal(true); |
| 593 | }} | 599 | }} |
| 594 | 600 | ||
| @@ -755,18 +761,16 @@ const FaceLoginModal = props => { | @@ -755,18 +761,16 @@ const FaceLoginModal = props => { | ||
| 755 | 761 | ||
| 756 | // 人脸登录成功回调 | 762 | // 人脸登录成功回调 |
| 757 | const handleIdentifySuccess = e => { | 763 | const handleIdentifySuccess = e => { |
| 758 | - const { sBrandsId: sParentId, sSubsidiaryId: sId, sEmployeeNo } = e.dataset.rows[0]; | ||
| 759 | - // ZY0232 | ||
| 760 | - const value = { | ||
| 761 | - sParentId, sId, sEmployeeNo | ||
| 762 | - }; | ||
| 763 | - const { slaveData = [] } = props | ||
| 764 | - const faceData = {... e.dataset.rows[0],handleType:'add'} | 764 | + const { sSubsidiaryId: sId, sEmployeeNo } = e.dataset.rows[0]; |
| 765 | + // ZY023 | ||
| 766 | + const { slave1Data = [] } = props | ||
| 767 | + const faceData = {... e.dataset.rows[0],handleType:'add', sParentId: props.slaveSelectedRowKeys?.[0] || ''}; | ||
| 765 | const list = [ | 768 | const list = [ |
| 766 | - ...slaveData, | ||
| 767 | - faceData | 769 | + ...slave1Data, |
| 770 | + faceData, | ||
| 771 | + | ||
| 768 | ] | 772 | ] |
| 769 | - props.onSaveState({ slaveData: list }); | 773 | + props.onSaveState({ slave1Data: list }); |
| 770 | setFaceModal(false) | 774 | setFaceModal(false) |
| 771 | // handleSubmit(value); | 775 | // handleSubmit(value); |
| 772 | }; | 776 | }; |