Commit 1c6cde674ab4521631ccc98483168272bf76f98d

Authored by zhangz
1 parent 3f781827

整体下班前新增确认;

src/mes/common/commonOperationBarComponent/index.js
... ... @@ -10,7 +10,7 @@ import costomPageFun from "@/mes/costomPageFun";
10 10 import * as commonConfig from "@/utils/config";
11 11  
12 12 import styles from "./index.less";
13   -import { Button, Space, Input, Modal, Dropdown } from "antd";
  13 +import { Button, Space, Input, Modal, Dropdown, Popconfirm } from "antd";
14 14 import { ScanOutlined } from "@ant-design/icons";
15 15  
16 16 const useCommonOperationBarComponentEvent = props => {
... ... @@ -676,7 +676,7 @@ const useCommonOperationBarComponentEvent = props => {
676 676 } else {
677 677 rowDataValue = rowDataValue.toString();
678 678 }
679   - } catch (error) {}
  679 + } catch (error) { }
680 680 switch (conditionStr) {
681 681 case "===":
682 682 return rowDataValue === conditionValue;
... ... @@ -957,23 +957,23 @@ const CommonOperationBarComponent = basProps => {
957 957 bFilter =
958 958 searchValue !== undefined && searchValue !== ""
959 959 ? [
960   - {
961   - bFilterCondition: bExactMatch ? "=" : "like",
962   - bFilterName: "sWorkOrderNo",
963   - bFilterValue: searchValue
964   - }
965   - ]
  960 + {
  961 + bFilterCondition: bExactMatch ? "=" : "like",
  962 + bFilterName: "sWorkOrderNo",
  963 + bFilterValue: searchValue
  964 + }
  965 + ]
966 966 : undefined;
967 967 } else {
968 968 bFilter =
969 969 searchValue !== undefined && searchValue !== ""
970 970 ? [
971   - {
972   - bFilterCondition: bExactMatch ? "=" : "like",
973   - bFilterName: searchField.sName,
974   - bFilterValue: searchValue
975   - }
976   - ]
  971 + {
  972 + bFilterCondition: bExactMatch ? "=" : "like",
  973 + bFilterName: searchField.sName,
  974 + bFilterValue: searchValue
  975 + }
  976 + ]
977 977 : undefined;
978 978 }
979 979  
... ... @@ -1054,6 +1054,23 @@ const CommonOperationBarComponent = basProps => {
1054 1054 ""
1055 1055 )}
1056 1056 {btnRightConfig.map(item => {
  1057 + // 整体下班
  1058 + if (item.sControlName === 'BtnRight.EndWork') {
  1059 + const btnProps = props.onGetBtnPropps(item, searchField);
  1060 + if (!btnProps.disabled) {
  1061 + return (
  1062 + <Popconfirm
  1063 + title="是否确定整体下班"
  1064 + placement="topRight"
  1065 + overlayClassName={styles.popconfirm}
  1066 + onConfirm={btnProps.onClick}
  1067 + >
  1068 + <Button {...btnProps} onClick={null}>
  1069 + {item.showName}
  1070 + </Button>
  1071 + </Popconfirm>);
  1072 + }
  1073 + }
1057 1074 return (
1058 1075 <Button {...props.onGetBtnPropps(item, searchField)}>
1059 1076 {item.showName}
... ...