Commit 2a7329179a1c3ce922c69d1f15b11c925243490a

Authored by chenxt
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 509 let bManualTableProps
510 510 let bManualSlaveTableProps
511 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 514 bManualTableProps = {
515 515 ...tableBaseProps,
  516 + selectedRowKeys: tableBaseProps.selectedRowKeys ? tableBaseProps.selectedRowKeys : [tableBaseProps?.data?.sId],
516 517 fixedHeight: "calc(50vh - 218px)"
517 518 }
518 519 bManualSlaveTableProps = {
519 520 ...slaveTableBaseProps,
  521 + data: slaveTableBaseProps?.data?.filter(item=>item.sParentId === bManualTableProps.selectedRowKeys?.[0]),
520 522 fixedHeight: "calc(50vh - 126px)"
521 523  
522 524 }
523 525 }
  526 +
524 527 const handleSave = (props) => {
525 528 props.onExecInstructSet({
526 529 btnConfig: {
... ... @@ -588,7 +591,10 @@ const TeamInfo = baseProps => {
588 591 <Button
589 592 type="primary"
590 593 onClick={() => {
591   - console.log(1111111);
  594 +
  595 + if (props.masterData && !props.masterData.length) {
  596 + return message.warning('请先添加一条班组信息!')
  597 + }
592 598 setFaceModal(true);
593 599 }}
594 600  
... ... @@ -755,18 +761,16 @@ const FaceLoginModal = props =&gt; {
755 761  
756 762 // 人脸登录成功回调
757 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 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 774 setFaceModal(false)
771 775 // handleSubmit(value);
772 776 };
... ...