leiqunqing
2026-02-06 15b3879cd259108e7ebb755fe02c190f28f1e20c
´úÂë¹ÜÀí/WIDESEAWCS_Client/src/views/basicinfo/processInfo.vue
@@ -19,328 +19,526 @@
export default defineComponent({
  setup() {
    // è¡¨æ ¼åŸºç¡€é…ç½®
    const table = ref({
      key: "id",
      footer: "Foots",
      cnName: "加工信息",
      name: "processInfo",
      url: "/processInfo/",
      sortName: "createDate",
      url: "/processInfo/",
      sortName: "createDate",
      sortOrder: "desc", // æ–°å¢žï¼šåˆ›å»ºæ—¶é—´é»˜è®¤å€’序,符合常规使用
    });
    // ç¼–辑表单字段 - å®Œå…¨åŒ¹é…åŽç«¯Dt_ProcessInfo实体
    // æ–°å¢žï¼špressPressure(压装位下压压力),补全所有后端字段
    const editFormFields = ref({
      id: "",
      palletCode: "",
      palletCode: "",
      productCode: "",
      productName: "",
      componentQty: "",
      torsioValue: "",
      torsioValueStandard: "",
      stiffnessValue: "",
      stiffnessValueStandard: "",
      testResult: "",
      pressHeight: "",
      screwTorque: "",
      screwAngle: "",
      height1: "",
      height2: "",
      height3: "",
      productSn: "", // æµæ°´å·
      pressTightenNg: "", // åŽ‹è£…æ‹§ç´§_拧紧NG
      pressTightenOk: "", // åŽ‹è£…æ‹§ç´§_拧紧OK
      pressTightenUnfinished: "", // åŽ‹è£…æ‹§ç´§_本次加工未完成
      checkUnfinished: "", // æ£€æµ‹_本次检测未完成
      //componentQty: "", // é›¶ä»¶æ•°é‡
      // torsioValue: "", // æ‰­åЛ值
      // torsioValueStandard: "", // æ‰­åŠ›å€¼æ ‡å‡†
      // stiffnessValue: "", // åˆšåº¦å€¼
      // stiffnessValueStandard: "", // åˆšåº¦å€¼æ ‡å‡†
      // testResult: "", // æµ‹è¯•结果
      pressHeight: "", // åŽ‹è£…ä½ä¸‹åŽ‹é«˜åº¦
      screwTorque: "", // åŽ‹è£…ä½æ‹§ç´§æ‰­åŠ›
      screwAngle: "", // åŽ‹è£…ä½æ‹§ç´§è§’åº¦
      pressPressure: "", // ã€æ–°å¢žã€‘压装位下压压力(匹配后端实体)
      height1: "", // æ‹§ç´§ä½æ£€æµ‹é«˜åº¦1
      height2: "", // æ‹§ç´§ä½æ£€æµ‹é«˜åº¦2
      height3: "", // æ‹§ç´§ä½æ£€æµ‹é«˜åº¦3
    });
    // ç¼–辑表单配置-【取消分类,均匀排布】,保留所有原有校验/默认值/属性
    const editFormOptions = ref([
      // ç¬¬ä¸€è¡Œï¼š5个字段(基础标识+1个状态),宽度协调
      [
        {
          title: "工装板编号",
          field: "palletCode",
          type: "input",
          width: 200,
          require: true
          width: 160,
          require: true,
          placeholder: "请输入工装板编号",
        },
        {
          title: "成品编号",
          field: "productCode",
          type: "input",
          width: 200,
          require: true
          width: 160,
          require: true,
          placeholder: "请输入成品编号",
        },
        {
          title: "成品名称",
          field: "productName",
          type: "input",
          width: 200,
          require: true
        }
          width: 160,
          require: true,
          placeholder: "请输入成品名称",
        },
        {
          title: "流水号",
          field: "productSn",
          type: "input",
          width: 180,
          require: false,
          placeholder: "请输入产品流水号",
        },
      ],
      [
        {
          title: "零件数量",
          field: "componentQty",
          type: "input",
          width: 200,
          require: true
          title: "拧紧NG",
          field: "pressTightenNg",
          type: "select",
          width: 150,
          align: "center",
          defaultValue: "0",
          data: [
            { key: "0", value: "否" },
            { key: "1", value: "是" },
          ],
        },
        {
          title: "扭力值",
          field: "torsioValue",
          type: "input",
          width: 200,
          require: false
          title: "拧紧OK",
          field: "pressTightenOk",
          type: "select",
          width: 150,
          align: "center",
          defaultValue: "0",
          data: [
            { key: "0", value: "否" },
            { key: "1", value: "是" },
          ],
        },
        {
          title: "扭力值标准",
          field: "torsioValueStandard",
          type: "input",
          width: 200,
          require: false
        }
      ],
      [
        {
          title: "刚度值",
          field: "stiffnessValue",
          type: "input",
          width: 200,
          require: false
          title: "拧紧未完成",
          field: "pressTightenUnfinished",
          type: "select",
          width: 170,
          align: "center",
          defaultValue: "0",
          data: [
            { key: "0", value: "否" },
            { key: "1", value: "是" },
          ],
        },
        {
          title: "刚度值标准",
          field: "stiffnessValueStandard",
          type: "input",
          width: 200,
          require: false
          title: "检测未完成",
          field: "checkUnfinished",
          type: "select",
          width: 150,
          align: "center",
          defaultValue: "0",
          data: [
            { key: "0", value: "否" },
            { key: "1", value: "是" },
          ],
        },
        {
          title: "测试结果",
          field: "testResult",
          type: "input",
          width: 200,
          require: false
        }
      ],
      [
        {
          title: "压装位下压检测高度",
          field: "pressHeight",
          type: "input",
          width: 200,
          require: false
        },
        {
          title: "压装位拧紧检测扭力",
          field: "screwTorque",
          type: "input",
          width: 200,
          require: false
        },
        {
          title: "压装位拧紧检测角度",
          field: "screwAngle",
          type: "input",
          width: 200,
          require: false
        }
      ],
      [
        {
          title: "拧紧位检测高度1",
          field: "height1",
          type: "input",
          width: 200,
          require: false
        },
        {
          title: "拧紧位检测高度2",
          field: "height2",
          type: "input",
          width: 200,
          require: false
        },
        {
          title: "拧紧位检测高度3",
          field: "height3",
          type: "input",
          width: 200,
          require: false
        }
      ],
      [
        // {
        //   title: "零件数量",
        //   field: "componentQty",
        //   type: "input",
        //   inputType: "number",
        //   width: 140,
        //   require: false,
        //   attrs: { min: 0, step: 1 },
        //   placeholder: "请输入正整数",
        // },
        {
          title: "主键ID",
          field: "id",
          type: "input",
          width: 100,
          hidden: true,
          readonly: true
        }
      ]
          readonly: true,
        },
      ],
      // // ç¬¬ä¸‰è¡Œï¼š5个字段(扭力/刚度相关+测试结果),小数校验
      // [
      //   {
      //     title: "扭力值",
      //     field: "torsioValue",
      //     type: "input",
      //     inputType: "number",
      //     width: 140,
      //     require: false,
      //     attrs: { step: 0.01, min: 0 },
      //     placeholder: "保留2位小数",
      //   },
      //   {
      //     title: "扭力值标准",
      //     field: "torsioValueStandard",
      //     type: "input",
      //     inputType: "number",
      //     width: 160,
      //     require: false,
      //     attrs: { step: 0.01, min: 0 },
      //     placeholder: "保留2位小数",
      //   },
      //   {
      //     title: "刚度值",
      //     field: "stiffnessValue",
      //     type: "input",
      //     inputType: "number",
      //     width: 140,
      //     require: false,
      //     attrs: { step: 0.01, min: 0 },
      //     placeholder: "保留2位小数",
      //   },
      //   {
      //     title: "刚度值标准",
      //     field: "stiffnessValueStandard",
      //     type: "input",
      //     inputType: "number",
      //     width: 160,
      //     require: false,
      //     attrs: { step: 0.01, min: 0 },
      //     placeholder: "保留2位小数",
      //   },
      //   {
      //     title: "测试结果",
      //     field: "testResult",
      //     type: "input",
      //     inputType: "number",
      //     width: 140,
      //     require: false,
      //     placeholder: "请输入数字结果",
      //   },
      // ],
      // ç¬¬å››è¡Œï¼š4个字段(压装位全参数),小数校验,新增压装压力
      [
        {
          title: "压装高度",
          field: "pressHeight",
          type: "input",
          inputType: "number",
          width: 160,
          require: false,
          attrs: { step: 0.01, min: 0 },
          placeholder: "保留2位小数",
        },
        {
          title: "压装压力",
          field: "pressPressure",
          type: "input",
          inputType: "number",
          width: 160,
          require: false,
          attrs: { step: 0.01, min: 0 },
          placeholder: "保留2位小数",
        },
        {
          title: "压装扭力",
          field: "screwTorque",
          type: "input",
          inputType: "number",
          width: 160,
          require: false,
          attrs: { step: 0.01, min: 0 },
          placeholder: "保留2位小数",
        },
        {
          title: "拧紧角度",
          field: "screwAngle",
          type: "input",
          inputType: "number",
          width: 160,
          require: false,
          attrs: { step: 0.01, min: 0 },
          placeholder: "保留2位小数",
        },
      ],
      // ç¬¬äº”行:3个字段(拧紧位检测高度),小数校验,居中排布
      [
        {
          title: "检测高度1",
          field: "height1",
          type: "input",
          inputType: "number",
          width: 200,
          require: false,
          attrs: { step: 0.01, min: 0 },
          placeholder: "保留2位小数",
        },
        {
          title: "检测高度2",
          field: "height2",
          type: "input",
          inputType: "number",
          width: 200,
          require: false,
          attrs: { step: 0.01, min: 0 },
          placeholder: "保留2位小数",
        },
        {
          title: "检测高度3",
          field: "height3",
          type: "input",
          inputType: "number",
          width: 200,
          require: false,
          attrs: { step: 0.01, min: 0 },
          placeholder: "保留2位小数",
        },
      ],
    ]);
    // æœç´¢è¡¨å•字段 - æ ¸å¿ƒæœç´¢é¡¹ï¼ˆæµæ°´å·+基础信息+创建信息)
    const searchFormFields = ref({
      palletCode: "",
      productCode: "",
      productName: "",
      productSn: "", // æµæ°´å·æœç´¢
      creater: "",
      createDate: "",
    });
    // æœç´¢è¡¨å•配置 - ä¼˜åŒ–宽度,匹配布局
    const searchFormOptions = ref([
      [
        { title: "工装板编号", field: "palletCode", type: "like" },
        { title: "成品编号", field: "productCode", type: "like" },
        { title: "成品名称", field: "productName", type: "like" },
        { title: "工装板编号", field: "palletCode", type: "like", width: 180 },
        { title: "成品编号", field: "productCode", type: "like", width: 180 },
        { title: "成品名称", field: "productName", type: "like", width: 180 },
        { title: "流水号", field: "productSn", type: "like", width: 200 },
      ],
      [
        { title: "创建人", field: "creater", type: "like" },
        { title: "创建时间", field: "createDate", type: "datetime" },
        { title: "创建人", field: "creater", type: "like", width: 200 },
        { title: "创建时间", field: "createDate", type: "datetime", width: 380 },
      ],
    ]);
    // è¡¨æ ¼åˆ—配置 - å®Œå…¨åŒ¹é…åŽç«¯å®žä½“,新增pressPressure列,优化列宽/对齐
    const columns = ref([
      {
        field: "id",
        title: "序号",
        type: "int",
        width: 90,
        width: 80,
        hidden: true,
        readonly: true,
        require: true,
        align: "left",
        align: "center",
      },
      {
        field: "palletCode",
        title: "工装板编号",
        type: "string",
        width: 200,
        width: 140,
        align: "left",
      },
      {
        field: "productCode",
        title: "成品编号",
        type: "string",
        width: 200,
        width: 140,
        align: "left",
      },
      {
        field: "productName",
        title: "成品名称",
        type: "string",
        width: 200,
        width: 150,
        align: "left",
      },
      {
        field: "componentQty",
        title: "零件数量",
        type: "int",
        width: 200,
        field: "productSn",
        title: "流水号",
        type: "string",
        width: 180,
        align: "left",
        overflow: "ellipsis",
      },
      // 4个状态列 - æ˜¯å¦æ ¼å¼åŒ–显示
      {
        field: "pressTightenNg",
        title: "拧紧NG",
        type: "select",
        width: 120,
        align: "center",
        bind: {
          key: "value",
          data: [
            { key: "0", value: "否" },
            { key: "1", value: "是" },
          ],
        },
      },
      {
        field: "torsioValue",
        title: "扭力值",
        type: "float",
        width: 200,
        align: "left",
        field: "pressTightenOk",
        title: "拧紧OK",
        type: "select",
        width: 120,
        align: "center",
        bind: {
          key: "value",
          data: [
            { key: "0", value: "否" },
            { key: "1", value: "是" },
          ],
        },
      },
      {
        field: "torsioValueStandard",
        title: "扭力值标准",
        type: "float",
        width: 200,
        align: "left",
        field: "pressTightenUnfinished",
        title: "拧紧未完成",
        type: "select",
        width: 140,
        align: "center",
        bind: {
          key: "value",
          data: [
            { key: "0", value: "否" },
            { key: "1", value: "是" },
          ],
        },
      },
      {
        field: "stiffnessValue",
        title: "刚度值",
        type: "float",
        width: 200,
        align: "left",
        field: "checkUnfinished",
        title: "检测未完成",
        type: "select",
        width: 120,
        align: "center",
        bind: {
          key: "value",
          data: [
            { key: "0", value: "否" },
            { key: "1", value: "是" },
          ],
        },
      },
      {
        field: "stiffnessValueStandard",
        title: "刚度值标准",
        type: "float",
        width: 200,
        align: "left",
      },
      {
        field: "testResult",
        title: "测试结果",
        type: "int",
        width: 200,
        align: "left",
      },
      // {
      //   field: "componentQty",
      //   title: "零件数量",
      //   type: "int",
      //   width: 90,
      //   align: "center",
      // },
      // // æ‰­åŠ›/刚度相关 - decimal类型(保留2位小数)
      // {
      //   field: "torsioValue",
      //   title: "扭力值",
      //   type: "decimal",
      //   width: 90,
      //   align: "center",
      // },
      // {
      //   field: "torsioValueStandard",
      //   title: "扭力标准",
      //   type: "decimal",
      //   width: 100,
      //   align: "center",
      // },
      // {
      //   field: "stiffnessValue",
      //   title: "刚度值",
      //   type: "decimal",
      //   width: 90,
      //   align: "center",
      // },
      // {
      //   field: "stiffnessValueStandard",
      //   title: "刚度标准",
      //   type: "decimal",
      //   width: 100,
      //   align: "center",
      // },
      // {
      //   field: "testResult",
      //   title: "测试结果",
      //   type: "int",
      //   width: 90,
      //   align: "center",
      // },
      // åŽ‹è£…ä½æ£€æµ‹å‚æ•° - ã€æ–°å¢žpressPressure列】decimal类型
      {
        field: "pressHeight",
        title: "压装位下压检测高度",
        type: "float",
        width: 200,
        align: "left",
        title: "压装高度",
        type: "decimal",
        width: 100,
        align: "center",
      },
      {
        field: "pressPressure", // ã€æ–°å¢žã€‘压装位下压压力
        title: "压装压力",
        type: "decimal",
        width: 100,
        align: "center",
        columnDescription: "压装位下压压力",
      },
      {
        field: "screwTorque",
        title: "压装位拧紧检测扭力",
        type: "float",
        width: 200,
        align: "left",
        title: "压装扭力",
        type: "decimal",
        width: 100,
        align: "center",
      },
      {
        field: "screwAngle",
        title: "压装位拧紧检测角度",
        type: "float",
        width: 200,
        align: "left",
        title: "拧紧角度",
        type: "decimal",
        width: 100,
        align: "center",
      },
      // æ‹§ç´§ä½æ£€æµ‹é«˜åº¦
      {
        field: "height1",
        title: "拧紧位检测高度1",
        type: "float",
        width: 200,
        align: "left",
        title: "检测高度1",
        type: "decimal",
        width: 100,
        align: "center",
      },
      {
        field: "height2",
        title: "拧紧位检测高度2",
        type: "float",
        width: 200,
        align: "left",
        title: "检测高度2",
        type: "decimal",
        width: 100,
        align: "center",
      },
      {
        field: "height3",
        title: "拧紧位检测高度3",
        type: "float",
        width: 200,
        align: "left",
        title: "检测高度3",
        type: "decimal",
        width: 100,
        align: "center",
      },
      // å…¬å…±å­—段 - åˆ›å»º/修改信息
      {
        field: "creater",
        title: "创建人",
        type: "string",
        width: 90,
        align: "left",
        width: 80,
        align: "center",
      },
      {
        field: "createDate",
        title: "创建时间",
        type: "datetime",
        width: 150,
        align: "left",
        width: 160,
        align: "center",
      },
      {
        field: "modifier",
        title: "修改人",
        type: "string",
        width: 100,
        align: "left",
        width: 80,
        align: "center",
      },
      {
        field: "modifyDate",
        title: "修改时间",
        type: "datetime",
        width: 160,
        align: "left",
        align: "center",
      },
    ]);
    // åŠ å·¥ä¿¡æ¯æ— æ˜Žç»†ï¼Œä¿æŒç©ºé…ç½®
    const detail = ref({
      cnName: "",
      table: "",
@@ -361,4 +559,4 @@
    };
  },
});
</script>
</script>