diff --git a/src/components/Common/CommonInstructSet.js b/src/components/Common/CommonInstructSet.js
index b781f98..dc0643a 100644
--- a/src/components/Common/CommonInstructSet.js
+++ b/src/components/Common/CommonInstructSet.js
@@ -865,18 +865,17 @@ const handleSave = (props, instruct) => {
const data = [];
Object.keys(allSlaveData).forEach(key => {
const config = props[`${key}Config`];
- const saveTmpData = key === "master" ? [masterData] : props[`${key}Data`];
- const delTmpData = key === "master" ? null : props[`${key}DelData`];
+ const saveTmpData = key === "master" ? (Array.isArray(masterData) ? masterData: [masterData]) : props[`${key}Data`];
+ const delTmpData = key === "master" ? null : props[`${key}DelData`] || null;
data.push(
commonBusiness.mergeData(key, config.sTbName, saveTmpData, delTmpData)
);
});
-
- if (masterData.sId) {
+ if (Array.isArray(masterData) || masterData.sId) {
utils.saveData(props, {
data,
sClientType: "1",
- sSysLogSrcId: masterData.sId
+ sSysLogSrcId: Array.isArray(masterData) ? masterData[0].sId : masterData.sId
});
}
diff --git a/src/components/Common/CommonTable/index.js b/src/components/Common/CommonTable/index.js
index d982dba..36c776c 100644
--- a/src/components/Common/CommonTable/index.js
+++ b/src/components/Common/CommonTable/index.js
@@ -4378,7 +4378,7 @@ class CommonTableRc extends React.Component {
if (
column.dataIndex === "spicture" ||
column.dataIndex === "tableLastEmpty" ||
- props?.data?.some(item =>
+ Array.isArray(props?.data) && props?.data?.some(item =>
item.costomEnabledList?.includes(column.dataIndex)
)
) {
diff --git a/src/mes/common/commonModelComponent/index.js b/src/mes/common/commonModelComponent/index.js
index 96c945c..1adf46f 100644
--- a/src/mes/common/commonModelComponent/index.js
+++ b/src/mes/common/commonModelComponent/index.js
@@ -501,7 +501,6 @@ const useCommonModelEvent = props => {
}
}
}
-
if (Object.keys(addState).length > 0) {
props.onSaveState?.({ ...addState });
}
@@ -1801,6 +1800,8 @@ const CommonModelComponent = props => {
});
window.refreshTableList = null;
}
+ props.onSaveState({slaveSelectedRowKeys:[]})
+
}}
>
{configList
diff --git a/src/mes/teamInfo/index.js b/src/mes/teamInfo/index.js
index e315add..1b735b0 100644
--- a/src/mes/teamInfo/index.js
+++ b/src/mes/teamInfo/index.js
@@ -44,10 +44,10 @@ const useTeamInfoEvent = props => {
...result,
bFinish: true
};
- props.onSaveState({ ...addState, loadings: false ,mesRefresh:false});
+ props.onSaveState({ ...addState, loadings: false, mesRefresh: false });
}
},
- [formData,mesRefresh]
+ [formData, mesRefresh]
);
// 监听人员表第一条数据的实际上班人员
@@ -230,9 +230,8 @@ const useTeamInfoEvent = props => {
} else if (loginType === 2) {
// 账号密码登陆
let loginConfig;
- const configUrl = `${
- commonConfig.server_host
- }business/getModelBysId/${sModelsId}?sModelsId=${sModelsId}&sName=/commonAuto`;
+ const configUrl = `${commonConfig.server_host
+ }business/getModelBysId/${sModelsId}?sModelsId=${sModelsId}&sName=/commonAuto`;
const configReturn = (await commonServices.getService("", configUrl))
.data;
if (configReturn.code === 1) {
@@ -277,9 +276,8 @@ const useTeamInfoEvent = props => {
}
const { sBrandsId, sSubsidiaryId } = mesSysbrands;
- const url = `${
- commonConfig.server_host
- }userloginUserNo/${sBrandsId}/${sSubsidiaryId}`;
+ const url = `${commonConfig.server_host
+ }userloginUserNo/${sBrandsId}/${sSubsidiaryId}`;
const value = {
username: loginInfo.sUserNo || loginInfo.sUserName,
password: loginInfo.sPassWord
@@ -299,7 +297,7 @@ const useTeamInfoEvent = props => {
}
const result = dataset.rows[0];
-
+
resolve(result);
});
}
@@ -345,8 +343,8 @@ const useTeamInfoEvent = props => {
onSuccess: () => {
handleRefreshDataByTableName(name, props);
},
- onConfirm: () => {},
- onError: () => {}
+ onConfirm: () => { },
+ onError: () => { }
});
// const tableDataNew = [...tableData];
@@ -358,7 +356,7 @@ const useTeamInfoEvent = props => {
const handleRefreshDataByTableName = (tableName, props) => {
const { [`${tableName}Config`]: config } = props;
handleGetData([{ ...config, specifyTableName: tableName }]);
- props.onSaveState({mesRefresh:true})
+ props.onSaveState({ mesRefresh: true })
};
// props.setLoading(false)
@@ -413,9 +411,11 @@ const useTeamInfoEvent = props => {
// 班组信息
const TeamInfo = baseProps => {
+ const bManuals = baseProps?.app?.userinfo?.bManual
const [faceModal, setFaceModal] = useState(false);
+ const { userinfo } = baseProps?.app
const props = useTeamInfoEvent(
- useCommonBase({ ...baseProps, sModelsId: teamInfoSid })
+ useCommonBase({ ...baseProps, sModelsId: bManuals ? '172117190122117691507197360' : teamInfoSid })
);
const { formData = [] } = props;
if (!formData.length) return "";
@@ -437,7 +437,7 @@ const TeamInfo = baseProps => {
const tableProps = {
...tableBaseProps,
tableProps: {
- onChange: () => {}
+ onChange: () => { }
// AutoTableHeight: 400,
},
fixedHeight: "calc(25vh - 80px)",
@@ -486,8 +486,7 @@ const TeamInfo = baseProps => {
const { sForemanName = "", sIpqcName = "", sEmployeeName = "" } =
props.slaveData && props.slaveData.length !== 0 ? props.slaveData[0] : {};
- const { app } = props;
- const { userinfo }= app;
+
const bManual = userinfo?.bManual;
const { sTeamEmployeeNo = "" } = props.slave0Data?.[0] || {};
@@ -507,78 +506,172 @@ const TeamInfo = baseProps => {
bManual
};
const tableHeight = bManual ? "calc(88vh - 80px)" : "calc(25vh - 80px)";
+ let bManualTableProps
+ let bManualSlaveTableProps
+ if (bManual) {
+ const tableBaseProps = commonBusiness.getTableTypes("master", props);
+ const slaveTableBaseProps = commonBusiness.getTableTypes("slave", props);
+ bManualTableProps = {
+ ...tableBaseProps,
+ fixedHeight: "calc(50vh - 218px)"
+ }
+ bManualSlaveTableProps = {
+ ...slaveTableBaseProps,
+ fixedHeight: "calc(50vh - 126px)"
+
+ }
+ }
+ const handleSave = (props) => {
+ props.onExecInstructSet({
+ btnConfig: {
+ showName: "保存",
+ sInstruct: JSON.stringify([
+ {
+ opr: "save",
+ },
+ {
+ opr: "refresh",
+ },
+ ])
+ },
+ inscallback: () => {
+ props.onSaveState({
+ currentId: props.masterData.sId, enabled: false
+ });
+ }
+ });
+ }
return (
{bManual ? (
// bManual = true 时的布局:左右结构
-
-
-
-
-
- 班组信息
-
-
-
- {props.app.userinfo.sJzPicturePath ? (
-

{
- event.target.src = userImgs;
- }}
- />
- ) : (
-

- )}
-
- -
-
- {sEmployeeName}
-
- -
-
- {props.app.userinfo?.sTeamNo}
-
- -
-
-
- {props.app.userinfo?.sShift == "1"
- ? "白班"
- : props.app.userinfo?.sShift == "2"
- ? "夜班"
- : ""}
-
-
-
-
-
- -
-
- {sForemanName}
-
- -
-
- {sIpqcName}
-
-
-
-
-
-
-
-
+
+ {
+ bManuals ?
+
+
+
+
+
+ {bManualTableProps?.config?.showName}
+
+
+
+
+
+
+
+
+
+
+
+
+ {bManualSlaveTableProps?.config?.showName}
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+ 班组信息
+
+
+
+ {props.app.userinfo.sJzPicturePath ? (
+

{
+ event.target.src = userImgs;
+ }}
+ />
+ ) : (
+

+ )}
+
+ -
+
+ {sEmployeeName}
+
+ -
+
+ {props.app.userinfo?.sTeamNo}
+
+ -
+
+
+ {props.app.userinfo?.sShift == "1"
+ ? "白班"
+ : props.app.userinfo?.sShift == "2"
+ ? "夜班"
+ : ""}
+
+
+
+
+
+ -
+
+ {sForemanName}
+
+ -
+
+ {sIpqcName}
+
+
+
+
+
+
+
+
+ }
+
) : (
// bManual = false 时的布局:维持原样
@@ -662,11 +755,19 @@ const FaceLoginModal = props => {
// 人脸登录成功回调
const handleIdentifySuccess = e => {
- // const { sBrandsId: sParentId, sSubsidiaryId: sId, sEmployeeNo } = e.dataset.rows[0];
- // // ZY0232
- // const value = {
- // sParentId, sId, sEmployeeNo
- // };
+ const { sBrandsId: sParentId, sSubsidiaryId: sId, sEmployeeNo } = e.dataset.rows[0];
+ // ZY0232
+ const value = {
+ sParentId, sId, sEmployeeNo
+ };
+ const { slaveData = [] } = props
+ const faceData = {... e.dataset.rows[0],handleType:'add'}
+ const list = [
+ ...slaveData,
+ faceData
+ ]
+ props.onSaveState({ slaveData: list });
+ setFaceModal(false)
// handleSubmit(value);
};
@@ -695,9 +796,9 @@ const FaceLoginModal = props => {
};
const TeamJoinInfo = props => {
- const { slave1Config, slave1Data} = props;
+ const { slave1Config, slave1Data } = props;
const { app } = props;
- const { userinfo }= app;
+ const { userinfo } = app;
const bManual = userinfo?.bManual;
const joinInfoData = commonUtils.filteredArr(
@@ -722,7 +823,7 @@ const TeamJoinInfo = props => {
const result = {
...commonBusiness.getTableTypes(tableName, props),
tableProps: {
- onChange: () => {}
+ onChange: () => { }
},
onTableBtnClick: props.onTableBtnClick,
fixedHeight: tableName === "slave4" ? "230px" : "160px"
@@ -746,7 +847,7 @@ const TeamJoinInfo = props => {
});
props.onChangeRouter({ type: "name", path: ["计划任务", "机台任务"] });
};
- const workHandoverInformation= commonFunc.showLocalMessage(props, 'workHandoverInformation', '上班交接信息');
+ const workHandoverInformation = commonFunc.showLocalMessage(props, 'workHandoverInformation', '上班交接信息');
return (
diff --git a/src/mes/teamInfo/index.less b/src/mes/teamInfo/index.less
index 92e5839..0fa2882 100644
--- a/src/mes/teamInfo/index.less
+++ b/src/mes/teamInfo/index.less
@@ -30,7 +30,11 @@
padding-bottom: 25px;
}
-
+.boxFlex{
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
.teamInfo {
.size();
@@ -46,7 +50,88 @@
display: flex;
flex-direction: column;
gap: 10px;
+ .teamInfoTops {
+ background-color: #fff;
+ padding: 10px;
+ border-radius: 5px;
+ box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.05);
+ height: 50%;
+ h2 {
+ font-weight: 600;
+ font-size: 18px;
+ color: #1890ff;
+ .flex(center);
+ gap: 8px;
+
+ img {
+ width: 24px;
+ }
+ }
+
+ .userWorkBox {
+ height: calc(100% - 37px);
+ display: flex;
+ gap: 10px;
+ flex-direction: column;
+ text-wrap: nowrap;
+
+ .workTop {
+ display: flex;
+ background: #f2f2f2;
+ gap: 20px;
+ height: 70%;
+
+ ul {
+ width: calc(65% - 10px);
+ display: flex;
+ flex-direction: column;
+ justify-content: space-evenly;
+ font-size: 1.3em;
+ padding: 15px 0;
+ list-style: none;
+ }
+ }
+
+ img {
+ width: 35%;
+ background: #cccccc;
+ }
+
+ & > ul {
+ height: 30%;
+ background: #f2f2f2;
+ padding: 10px 20px;
+ font-size: 1.3em;
+
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: flex-start;
+ li {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ }
+
+ label {
+ width: 115px;
+ display: block;
+ text-align: end;
+ }
+ }
+
+ label {
+ font-weight: 600;
+
+ &::after {
+ content: ":";
+ margin: 0 4px;
+ margin-right: 6px;
+ }
+ }
+ }
+ }
.teamInfoTop {
background-color: #fff;
padding: 10px;
@@ -177,7 +262,229 @@
}
}
}
+ .teamInfoLefts {
+ display: flex;
+ flex-direction: column;
+ gap: 10px;
+ width: 40%;
+ .teamInfoTops {
+ background-color: #fff;
+ padding: 10px;
+ border-radius: 5px;
+ box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.05);
+ height: 50%;
+ position: relative;
+ .loginSubmit {
+ position: absolute;
+ right: 10px;
+ bottom: 0;
+ }
+ h2 {
+ font-weight: 600;
+ font-size: 18px;
+ color: #1890ff;
+ .flex(center);
+ gap: 8px;
+
+ img {
+ width: 24px;
+ }
+ }
+
+ .userWorkBox {
+ height: calc(100% - 37px);
+ display: flex;
+ gap: 10px;
+ flex-direction: column;
+ text-wrap: nowrap;
+
+ .workTop {
+ display: flex;
+ background: #f2f2f2;
+ gap: 20px;
+ height: 70%;
+
+ ul {
+ width: calc(65% - 10px);
+ display: flex;
+ flex-direction: column;
+ justify-content: space-evenly;
+ font-size: 1.3em;
+ padding: 15px 0;
+ list-style: none;
+ }
+ }
+
+ img {
+ width: 35%;
+ background: #cccccc;
+ }
+
+ & > ul {
+ height: 30%;
+ background: #f2f2f2;
+ padding: 10px 20px;
+ font-size: 1.3em;
+
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: flex-start;
+
+ li {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ }
+
+ label {
+ width: 115px;
+ display: block;
+ text-align: end;
+ }
+ }
+
+ label {
+ font-weight: 600;
+
+ &::after {
+ content: ":";
+ margin: 0 4px;
+ margin-right: 6px;
+ }
+ }
+ }
+ }
+ .teamInfoTop {
+ background-color: #fff;
+ padding: 10px;
+ border-radius: 5px;
+ box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.05);
+ height: 30%;
+
+ h2 {
+ font-weight: 600;
+ font-size: 18px;
+ color: #1890ff;
+ .flex(center);
+ gap: 8px;
+
+ img {
+ width: 24px;
+ }
+ }
+
+ .userWorkBox {
+ height: calc(100% - 37px);
+ display: flex;
+ gap: 10px;
+ flex-direction: column;
+ text-wrap: nowrap;
+ .workTop {
+ display: flex;
+ background: #f2f2f2;
+ gap: 20px;
+ height: 70%;
+
+ ul {
+ width: calc(65% - 10px);
+ display: flex;
+ flex-direction: column;
+ justify-content: space-evenly;
+ font-size: 1.3em;
+ padding: 15px 0;
+ list-style: none;
+ }
+ }
+
+ img {
+ width: 35%;
+ background: #cccccc;
+ }
+
+ & > ul {
+ height: 30%;
+ background: #f2f2f2;
+ padding: 10px 20px;
+ font-size: 1.3em;
+
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: flex-start;
+
+ li {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ }
+
+ label {
+ width: 115px;
+ display: block;
+ text-align: end;
+ }
+ }
+
+ label {
+ font-weight: 600;
+
+ &::after {
+ content: ":";
+ margin: 0 4px;
+ margin-right: 6px;
+ }
+ }
+ }
+ }
+
+
+ .teamInfoLeftdiv {
+ flex: 1;
+ background-color: #fff;
+ border-radius: 5px;
+ box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.05);
+ overflow: hidden;
+
+ .joinInfo{
+ height: 90%;
+ }
+
+ // 添加infoBox样式
+ .infoBox {
+ padding: 10px;
+ height: calc(100% / 3); // 三个infoBox均等高度
+ background-color: #fff;
+ border-bottom: 1px solid #f0f0f0;
+
+ &:last-child {
+ border-bottom: none;
+ }
+
+ h2 {
+ font-weight: 600;
+ font-size: 16px;
+ color: #333;
+ margin-bottom: 8px;
+ .flex(center);
+ gap: 8px;
+
+ img {
+ width: 18px;
+ }
+ }
+
+ .infoBorBox {
+ height: calc(100% - 32px);
+ background-color: #f2f2f2;
+ padding: 8px;
+ border-radius: 4px;
+ overflow: auto;
+ }
+ }
+ }
+ }
.teamInfoRight {
width: 60%;
@@ -406,4 +713,5 @@
}
}
}
+
}