Commit c2839ca281a846fb1f3d270cc75725f83b6e3636

Authored by chenxt
1 parent 0bd4c698

质量完工

src/components/Common/CommonHooks/useCommonBase.js
... ... @@ -2771,17 +2771,20 @@ const useCommonBase = props => {
2771 2771 tableData,
2772 2772 config = {},
2773 2773 onSuccess,
2774   - nextProps
  2774 + nextProps,
  2775 + inscallback
2775 2776 } = params;
2776 2777 const { sControlName = "", sInstruct } = config;
2777 2778 const sControlLowerName = sControlName.toLowerCase();
2778 2779 // 调用指令集
  2780 + console.log(sInstruct, 'sInstruct');
2779 2781 if (sInstruct) {
2780 2782 handleExecInstructSet({
2781 2783 ...props,
2782 2784 btnConfig: config,
2783 2785 tableLineParams: params,
2784   - nextProps
  2786 + nextProps,
  2787 + inscallback
2785 2788 });
2786 2789 return;
2787 2790 }
... ...
src/components/Common/CommonTable/index.js
... ... @@ -34,6 +34,7 @@ import {
34 34 } from "@ant-design/icons";
35 35 import { Icon as LegacyIcon } from "@ant-design/compatible";
36 36 import "@ant-design/compatible/assets/index.css";
  37 +import * as commonServices from "@/services/services";
37 38 import lodash, { cloneDeep } from "lodash";
38 39 import {
39 40 Table,
... ... @@ -4855,6 +4856,7 @@ class CommonTableRc extends React.Component {
4855 4856 }}
4856 4857 loading={bLoading}
4857 4858 onClick={e => {
  4859 + console.log("🚀 ~ CommonTableRc ~ e:", e)
4858 4860 e.stopPropagation(); /* 阻止父级穿透 */
4859 4861 const onTempTableBtnClick = nextProps => {
4860 4862 props.onTableBtnClick &&
... ... @@ -4864,7 +4866,7 @@ class CommonTableRc extends React.Component {
4864 4866 config,
4865 4867 name: props.name,
4866 4868 tableData: props.data,
4867   - nextProps
  4869 + nextProps,
4868 4870 });
4869 4871 };
4870 4872  
... ... @@ -4876,7 +4878,52 @@ class CommonTableRc extends React.Component {
4876 4878 return
4877 4879 }
4878 4880 if (selectedRowKeys.includes(rowKeyId)) {
4879   - onTempTableBtnClick();
  4881 + if (sControlName.includes('_qlyqualityinspec')) {
  4882 + const { app } = props;
  4883 + const { token, currentMesPane } = app;
  4884 + const { sModelsId } = currentMesPane || {};
  4885 + props.onTableBtnClick &&
  4886 + props.onTableBtnClick({
  4887 + record,
  4888 + index,
  4889 + config,
  4890 + name: props.name,
  4891 + tableData: props.data,
  4892 + inscallback: async nextProps => {
  4893 + const value = {
  4894 + sBtnName: sControlName,
  4895 + sProName: "Sp_mes_qualityinspect_complete",
  4896 + sProInParam: JSON.stringify({
  4897 + changeValue: {},
  4898 + sButtonParam: {
  4899 + sproName: "Sp_mes_qualityinspect_complete",
  4900 + inMap: "qualityinspect.sId"
  4901 + },
  4902 + params: [
  4903 + {
  4904 + key: "qualityinspect",
  4905 + value: [
  4906 + {
  4907 + sId: record.sId,
  4908 + }
  4909 + ]
  4910 + }
  4911 + ]
  4912 + })
  4913 + };
  4914 + const url = `${commonConfig.server_host
  4915 + }procedureCall/doGenericProcedureCall?sModelsId=${sModelsId}`;
  4916 + const returnData = (await commonServices.postValueService(
  4917 + token,
  4918 + value,
  4919 + url
  4920 + )).data;
  4921 + }
  4922 + });
  4923 + } else {
  4924 + onTempTableBtnClick();
  4925 +
  4926 + }
4880 4927 } else {
4881 4928 props.onSaveState(
4882 4929 {
... ...