Commit dead33a30f3023875220076eafb4e8151e818b82

Authored by Min
1 parent 8ad6d035

1.AJT-MES纸箱需要移除作业指导书

src/components/Common/CommonViewDragable/rglUtils.js
@@ -12,7 +12,7 @@ export function getReactGridLayout(sParamType, selectedData = {}) { @@ -12,7 +12,7 @@ export function getReactGridLayout(sParamType, selectedData = {}) {
12 12
13 // 获取params数据 13 // 获取params数据
14 const recordDataAll = commonUtils.convertStrToObj( 14 const recordDataAll = commonUtils.convertStrToObj(
15 - sParams.replace(/[\n\r]/g, " "), 15 + sParams?.replace(/[\n\r]/g, " "),
16 [] 16 []
17 ); 17 );
18 const recordItem = 18 const recordItem =
src/mes/common/buttonComponent/index.js
@@ -17,6 +17,19 @@ const ButtonComponent = props => { @@ -17,6 +17,19 @@ const ButtonComponent = props => {
17 const { managementData, userinfo = {} } = app; 17 const { managementData, userinfo = {} } = app;
18 18
19 const { iTeamType, sWorkshopId } = userinfo; 19 const { iTeamType, sWorkshopId } = userinfo;
  20 + if(userinfo?.sBrandsId === '2222222222'){
  21 + const scheduledTasks = managementData.find(
  22 + item => (item.sMenuName === "计划任务" || item.sMenuName?.trim() === "Scheduled Task")
  23 + );
  24 + if (scheduledTasks && scheduledTasks.children) {
  25 + const iIndex = scheduledTasks?.children.findIndex(
  26 + child => (child.sMenuName === "工艺作业指导书" || child.sMenuName?.trim() === "Process Work Instructions")
  27 + );
  28 + if (iIndex !== -1) {
  29 + scheduledTasks.children.splice(iIndex, 1);
  30 + }
  31 + }
  32 + }
20 33
21 if ([3, 4, 5, 6].includes(iTeamType)) { 34 if ([3, 4, 5, 6].includes(iTeamType)) {
22 const scheduledTasks = managementData.find( 35 const scheduledTasks = managementData.find(
@@ -29,6 +42,15 @@ const ButtonComponent = props => { @@ -29,6 +42,15 @@ const ButtonComponent = props => {
29 if (iIndex !== -1) { 42 if (iIndex !== -1) {
30 scheduledTasks.children.splice(iIndex, 1); 43 scheduledTasks.children.splice(iIndex, 1);
31 } 44 }
  45 + console.log('aaa', props, userinfo?.sBrandsId);
  46 + if(userinfo?.sBrandsId === '2222222222'){
  47 + const iIndex = scheduledTasks.children.findIndex(
  48 + child => (child.sMenuName === "工艺作业指导书" || child.sMenuName?.trim() === "Process Work Instructions")
  49 + );
  50 + if (iIndex !== -1) {
  51 + scheduledTasks.children.splice(iIndex, 1);
  52 + }
  53 + }
32 } 54 }
33 55
34 const restArr = []; 56 const restArr = [];
@@ -103,7 +125,7 @@ const ButtonComponent = props => { @@ -103,7 +125,7 @@ const ButtonComponent = props => {
103 const [processReport, setProcessReport] = useState(false); 125 const [processReport, setProcessReport] = useState(false);
104 126
105 const [dataList, setDataList] = useState([]); 127 const [dataList, setDataList] = useState([]);
106 - 128 + console.log('2managementData22', managementData);
107 useEffect( 129 useEffect(
108 () => { 130 () => {
109 if (managementData.length) { 131 if (managementData.length) {