diff --git a/src/mes/productionExec/productionExecMain/index.js b/src/mes/productionExec/productionExecMain/index.js
index c71d56a..e73a76c 100644
--- a/src/mes/productionExec/productionExecMain/index.js
+++ b/src/mes/productionExec/productionExecMain/index.js
@@ -31,7 +31,8 @@ const list = [
{ sName: "qztable0", sGrd: "qztable0" }, // 切纸生产执行
{ sName: "jytable0", sGrd: "jytable0" }, // 胶印生产执行
{ sName: "wytable0", sGrd: "wytable0" }, // 凹印生产执行
- { sName: "wytgtable0", sGrd: "wytgtable0" } // 凹印挑规生产执行
+ { sName: "wytgtable0", sGrd: "wytgtable0" }, // 凹印挑规生产执行
+ { sName: "zztable0", sGrd: "zztable0" }
];
const useProductionExecMainEvent = props => {
@@ -68,6 +69,8 @@ const useProductionExecMainEvent = props => {
? list
: list.filter((_, index) => iInterface == index);
+ listFilter.push({ sName: "zztable0", sGrd: "zztable0" });
+
// 页面表明和配置表名对应关系
const tableNameCompareJson = {};
[...listFilter, ...props.execListExtra].forEach(item => {
@@ -410,11 +413,19 @@ const ProductionExecMain = baseProps => {
const { app = {} } = baseProps;
const [refreshCount, setRefreshCount] = useState(0);
+ const [sStatusNew, setStatusNew] = useState(undefined);
useEffect(() => {
const getValue = () => {
const changeExecInfo = commonUtils.getAppData("changeExecInfo");
- if (changeExecInfo.dReplyPalletERp === 1) {
+ setStatusNew(changeExecInfo.sStatus);
+
+ const refreshExecInfo = commonUtils.getAppData("refreshExecInfo");
+ if (refreshExecInfo.dReplyPalletERp === 1) {
+ commonUtils.setAppData("refreshExecInfo", {
+ ...refreshExecInfo,
+ dReplyPalletERp: 0
+ });
props.onRefresh();
setRefreshCount(pre => pre + 1);
}
@@ -504,6 +515,7 @@ const ProductionExecMain = baseProps => {
{...props}
changeExecInfo={app.changeExecInfo}
refreshCount={refreshCount}
+ sStatusNew={sStatusNew}
/>
)}
@@ -534,7 +546,8 @@ const ProductionExecContentByType = props => {
deviceTargetInfoConfig = {},
deviceTargetInfoData = [],
setPagesLoading,
- refreshCount = 0
+ refreshCount = 0,
+ sStatusNew
} = props;
/**
@@ -584,7 +597,7 @@ const ProductionExecContentByType = props => {
return showValue[flag];
},
- [deviceTargetInfoConfig, deviceTargetInfoData]
+ [deviceTargetInfoConfig, deviceTargetInfoData, sStatusNew]
);
props = { ...props, sStatusNameProcess };
@@ -595,11 +608,15 @@ const ProductionExecContentByType = props => {
return "";
}
- const type0 =
+ let type0 =
window.execTest && productionExecType
? productionExecType
: `type${iInterface === 0 ? "" : iInterface - 1}`;
+ if (props.workOrderInfoData?.[0]?.bZZ) {
+ type0 = "type10";
+ }
+
const type = `${type0}-${refreshCount}`;
const content = {
@@ -613,7 +630,8 @@ const ProductionExecContentByType = props => {
type6: ,
type7: ,
type8: ,
- type9:
+ type9: ,
+ type10:
};
return content[type0] || "";
@@ -915,10 +933,32 @@ const ProductionExecContent0 = props => {
const viewConfigs = config.gdsconfigformslave
.filter(item => item.bControl && item.sControlName.indexOf("Btn") === -1)
// .filter((_, index) => index < 8)
- .map(item => ({
- ...item,
- iColValue: 24
- }));
+ .map(item => {
+ const addState = {};
+ if (item.sName === "dReportQty") {
+ if (
+ props.workOrderInfoData?.[0]?.sProcessName?.includes("切纸") ||
+ props.workOrderInfoData?.[0]?.sProcessName?.includes("胶印") ||
+ props.workOrderInfoData?.[0]?.sProcessName === "大切张F"
+ ) {
+ addState.showName = `${item.showName}(张)`;
+ } else if (
+ ["大模压F", "UV模压F", "蒸镀F", "大分条F", "贴合F"].includes(
+ props.workOrderInfoData?.[0]?.sProcessName
+ )
+ ) {
+ addState.showName = `${item.showName}(米)`;
+ } else {
+ addState.showName = `${item.showName}(个)`;
+ }
+ }
+
+ return {
+ ...item,
+ ...addState,
+ iColValue: 24
+ };
+ });
const viewRow =
(selectedRowKeys[0]
@@ -981,6 +1021,12 @@ const ProductionExecContent0 = props => {
});
return;
}
+
+ props.onTableBtnClick({
+ name: tableName,
+ record: viewRow,
+ config: btnConfig
+ });
}
};
};
@@ -2111,6 +2157,251 @@ const ProductionExecContent9 = props => {
);
};
+// 类型10-成品组装
+const ProductionExecContent10 = props => {
+ const tableName = "zztable0";
+ const tableTypes = commonBusiness.getTableTypes(tableName, props);
+ const {
+ config: configOld = {},
+ data = [],
+ selectedRowKeys = [],
+ name
+ } = tableTypes;
+ const config = props.onMergeTableConfig(configOld);
+ const sIdGroupStr = data.map(item => item.sId).toString();
+
+ const timer = useRef(null);
+ useEffect(
+ () => {
+ if (!data.length) return;
+ // 让第一条选中
+ clearTimeout(timer.current);
+ timer.current = setTimeout(() => {
+ props.onSaveState({
+ [`${tableName}SelectedRowKeys`]: [data[0].sId]
+ });
+ }, 200);
+ },
+ [sIdGroupStr]
+ );
+
+ const tableProps = {
+ ...tableTypes,
+ footer: "hidden", // 合计栏
+ tableProps: {}
+ };
+
+ const viewConfigs = config.gdsconfigformslave
+ .filter(item => item.bControl && item.sControlName.indexOf("Btn") === -1)
+ .map(item => ({
+ ...item,
+ iColValue: 24
+ }));
+
+ const viewRow =
+ (selectedRowKeys[0]
+ ? data.find(item => item.sId === selectedRowKeys[0])
+ : data[0]) || {};
+
+ const viewProps = {
+ ...props,
+ viewConfigs,
+ tableConfig: config,
+ iColValueView: 24,
+ viewRow,
+ tableName: name,
+ enabled: commonUtils.isNotEmptyObject(viewRow)
+ };
+
+ const btnProps = {
+ type: "primary",
+ size: "large",
+ style: { width: 80 }
+ };
+
+ const getBtnConfigByControlName = sControlName => {
+ const btnConfig =
+ config.gdsconfigformslave.find(
+ item => item.sControlName === sControlName
+ ) || {};
+ return {
+ ...btnConfig,
+ disabled: props.onGetBtnStatus(tableName, btnConfig),
+ onClick: async () => {
+ if (!props.onGetBtnContinue()) return;
+ await props.awaitPromiseReturn();
+ const { sButtonParam, sInstruct } = btnConfig;
+ // 调用指令集
+ if (sInstruct) {
+ props.onExecInstructSet({
+ ...props,
+ btnConfig,
+ tableLineParams: {
+ name: tableName,
+ record: viewRow,
+ index: data.findIndex(item => item.sId === viewRow.sId)
+ }
+ });
+ return;
+ }
+ // 调用存储过程
+ if (sButtonParam) {
+ props.onProcedureCall({
+ btnConfig,
+ onSuccess: () => {
+ props.onRefresh && props.onRefresh();
+ },
+ onConfirm: () => {},
+ onError: () => {}
+ });
+ return;
+ }
+
+ props.onTableBtnClick({
+ name: tableName,
+ record: viewRow,
+ config: btnConfig
+ });
+ }
+ };
+ };
+
+ const operationBarProps = {
+ ...props,
+ sName: name,
+ bCostom: true,
+ onRefresh: props.onRefresh // 刷新页面
+ };
+
+ const btnTableList = [
+ "palletBatchMaterial",
+ "workerOrderBatchMaterial",
+ "assembletray"
+ ];
+ const formDataNew = props.formData.filter(
+ item => item.sGrd && btnTableList.includes(item.sGrd)
+ );
+
+ const { workOrderInfoData = [] } = props;
+ const commonModelProps = {
+ ...props,
+ costomModal: true,
+ formData: formDataNew,
+ sFilterConditions: {
+ // sId: selectedRowKeys[0],
+ sSrcSlaveId: workOrderInfoData[0]?.sWorkOrderId,
+ sProductId: workOrderInfoData[0]?.sProductId
+ }
+ // noGetData: !selectedRowKeys.length
+ };
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {/* */}
+
+
+
+
+
+
+
+
+ {/* */}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
// 成品不良类比弹窗
const BllbModalComponent = props => {
const { bllbVisible, setBllbVisible } = props;