| | |
| | | |
| | | export default defineComponent({ |
| | | setup() { |
| | | // å·¥å
·å½æ°ï¼æ ¼å¼åæ°å为两ä½å°æ° |
| | | const formatTwoDecimal = (value) => { |
| | | if (value === "" || value === null || value === undefined) return ""; |
| | | const num = parseFloat(value); |
| | | return isNaN(num) ? "" : num.toFixed(2); |
| | | }; |
| | | |
| | | // è¡¨æ ¼åºç¡é
ç½® |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "å 工信æ¯", |
| | | name: "processInfo", |
| | | url: "/processInfo/", |
| | | sortName: "createDate", |
| | | url: "/processInfo/", |
| | | sortName: "createDate", |
| | | sortOrder: "desc", // å建æ¶é´é»è®¤ååº |
| | | }); |
| | | |
| | | // ç¼è¾è¡¨ååæ®µ - ä¸¥æ ¼å¹é
å端Dt_ProcessInfoå®ä½ |
| | | const editFormFields = ref({ |
| | | id: "", |
| | | palletCode: "", |
| | | id: 0, // 主é®é»è®¤å¼æ¹ä¸ºæ°å0 |
| | | palletCode: "", |
| | | productCode: "", |
| | | productName: "", |
| | | componentQty: "", |
| | | torsioValue: "", |
| | | torsioValueStandard: "", |
| | | stiffnessValue: "", |
| | | stiffnessValueStandard: "", |
| | | testResult: "", |
| | | pressHeight: "", |
| | | productSn: "", |
| | | pressTightenOk: 0, // æ¹ä¸ºæ°åé»è®¤å¼ |
| | | pressTightenUnfinished: 0, // æ¹ä¸ºæ°åé»è®¤å¼ |
| | | productStatus: 0, // æ°å¢ï¼äº§åç¶æåæ®µ |
| | | screwTorque: "", |
| | | screwAngle: "", |
| | | pressPressure: "", |
| | | productCheckHeight: "", |
| | | threadPositionHeight: "", |
| | | height1: "", |
| | | height2: "", |
| | | height3: "", |
| | | }); |
| | | |
| | | |
| | | // 产åç¶æä¸æé项ï¼å¹é
å端注éï¼ |
| | | const productStatusOptions = [ |
| | | { key: "0", value: "ä¸åæ ¼" }, |
| | | { key: "1", value: "åæ ¼" }, |
| | | { key: "2", value: "äººå·¥ç¡®è®¤åæ ¼" }, |
| | | ]; |
| | | |
| | | // å¸å°å䏿é项ï¼éç¨ï¼ |
| | | const booleanOptions = [ |
| | | { key: "0", value: "å¦" }, |
| | | { key: "1", value: "æ¯" }, |
| | | ]; |
| | | |
| | | // ç¼è¾è¡¨åé
ç½® - ä¿®æ£å段å¹é
ï¼ä¼åå¸å±åå½å |
| | | const editFormOptions = ref([ |
| | | // åºç¡ä¿¡æ¯è¡ |
| | | [ |
| | | { |
| | | title: "å·¥è£
æ¿ç¼å·", |
| | | field: "palletCode", |
| | | type: "input", |
| | | width: 200, |
| | | require: true |
| | | width: 180, |
| | | require: true, |
| | | placeholder: "请è¾å
¥å·¥è£
æ¿ç¼å·", |
| | | }, |
| | | { |
| | | title: "æåç¼å·", |
| | | field: "productCode", |
| | | type: "input", |
| | | width: 200, |
| | | require: true |
| | | width: 180, |
| | | require: true, |
| | | placeholder: "请è¾å
¥æåç¼å·", |
| | | }, |
| | | { |
| | | title: "æååç§°", |
| | | field: "productName", |
| | | type: "input", |
| | | width: 180, |
| | | require: true, |
| | | placeholder: "请è¾å
¥æååç§°", |
| | | }, |
| | | { |
| | | title: "æµæ°´å·", |
| | | field: "productSn", |
| | | type: "input", |
| | | width: 200, |
| | | require: true |
| | | } |
| | | require: false, |
| | | placeholder: "请è¾å
¥äº§åæµæ°´å·", |
| | | }, |
| | | ], |
| | | // å å·¥ç¶æè¡ - ç§»é¤ä¸åå¨çcheckUnfinishedï¼æ°å¢äº§åç¶æ |
| | | [ |
| | | { |
| | | title: "é¶ä»¶æ°é", |
| | | field: "componentQty", |
| | | type: "input", |
| | | width: 200, |
| | | require: true |
| | | title: "åè£
æ§ç´§_æ§ç´§OK", |
| | | field: "pressTightenOk", |
| | | type: "select", |
| | | width: 160, |
| | | align: "center", |
| | | defaultValue: 0, |
| | | data: booleanOptions, |
| | | }, |
| | | { |
| | | title: "æåå¼", |
| | | field: "torsioValue", |
| | | type: "input", |
| | | width: 200, |
| | | require: false |
| | | title: "åè£
æ§ç´§_æ¬æ¬¡å å·¥æªå®æ", |
| | | field: "pressTightenUnfinished", |
| | | type: "select", |
| | | width: 180, |
| | | align: "center", |
| | | defaultValue: 0, |
| | | data: booleanOptions, |
| | | }, |
| | | { |
| | | title: "æå弿 å", |
| | | field: "torsioValueStandard", |
| | | title: "产åç¶æ", |
| | | field: "productStatus", |
| | | type: "select", |
| | | width: 160, |
| | | align: "center", |
| | | defaultValue: 0, |
| | | data: productStatusOptions, |
| | | }, |
| | | { |
| | | title: "åè£
ä½ä¸ååå", |
| | | field: "pressPressure", |
| | | type: "input", |
| | | width: 200, |
| | | require: false |
| | | } |
| | | inputType: "number", |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | ], |
| | | // åè£
æ£æµåæ°è¡ - ä¼åæ é¢ï¼å¹é
å端注é |
| | | [ |
| | | { |
| | | title: "å度å¼", |
| | | field: "stiffnessValue", |
| | | type: "input", |
| | | width: 200, |
| | | require: false |
| | | }, |
| | | { |
| | | title: "ååº¦å¼æ å", |
| | | field: "stiffnessValueStandard", |
| | | type: "input", |
| | | width: 200, |
| | | require: false |
| | | }, |
| | | { |
| | | 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 |
| | | inputType: "number", |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | { |
| | | title: "åè£
使§ç´§æ£æµè§åº¦", |
| | | field: "screwAngle", |
| | | type: "input", |
| | | width: 200, |
| | | require: false |
| | | } |
| | | inputType: "number", |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | { |
| | | title: "äº§åæ£æµé«åº¦", |
| | | field: "productCheckHeight", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | { |
| | | title: "èºçº¹ä½ç½®é«åº¦", |
| | | field: "threadPositionHeight", |
| | | type: "input", |
| | | inputType: "number", |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | ], |
| | | // æ§ç´§ä½æ£æµé«åº¦è¡ |
| | | [ |
| | | { |
| | | title: "æ§ç´§ä½æ£æµé«åº¦1", |
| | | field: "height1", |
| | | type: "input", |
| | | width: 200, |
| | | require: false |
| | | inputType: "number", |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | { |
| | | title: "æ§ç´§ä½æ£æµé«åº¦2", |
| | | field: "height2", |
| | | type: "input", |
| | | width: 200, |
| | | require: false |
| | | inputType: "number", |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | { |
| | | title: "æ§ç´§ä½æ£æµé«åº¦3", |
| | | field: "height3", |
| | | type: "input", |
| | | width: 200, |
| | | require: false |
| | | } |
| | | inputType: "number", |
| | | width: 180, |
| | | require: false, |
| | | attrs: { step: 0.01, min: 0 }, |
| | | placeholder: "ä¿ç2ä½å°æ°", |
| | | formatter: formatTwoDecimal, |
| | | onBlur: (e) => { |
| | | e.target.value = formatTwoDecimal(e.target.value); |
| | | }, |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "主é®ID", |
| | | field: "id", |
| | | type: "input", |
| | | width: 100, |
| | | hidden: true, |
| | | readonly: true |
| | | } |
| | | ] |
| | | ]); |
| | | |
| | | // æç´¢è¡¨ååæ®µ - å¹é
å端å®ä½ï¼ç§»é¤æ å
³å段 |
| | | const searchFormFields = ref({ |
| | | palletCode: "", |
| | | productCode: "", |
| | | productName: "", |
| | | creater: "", |
| | | productSn: "", |
| | | productStatus: "", // æ°å¢ï¼äº§åç¶ææç´¢ |
| | | 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: "productStatus", |
| | | type: "select", |
| | | width: 180, |
| | | data: productStatusOptions, |
| | | }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datetime", width: 380 }, |
| | | ], |
| | | ]); |
| | | |
| | | // è¡¨æ ¼åé
ç½® - ä¿®æ£å段å¹é
ï¼æ°å¢äº§åç¶æåï¼ä¼åæ é¢ |
| | | 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", |
| | | }, |
| | | // ç¶æå - ç§»é¤checkUnfinishedï¼æ°å¢äº§åç¶æ |
| | | { |
| | | field: "pressTightenOk", |
| | | title: "æ§ç´§OK", |
| | | type: "select", |
| | | width: 100, |
| | | align: "center", |
| | | bind: { |
| | | key: "value", |
| | | data: booleanOptions, |
| | | }, |
| | | }, |
| | | { |
| | | field: "torsioValue", |
| | | title: "æåå¼", |
| | | type: "float", |
| | | width: 200, |
| | | align: "left", |
| | | field: "pressTightenUnfinished", |
| | | title: "æ§ç´§æªå®æ", |
| | | type: "select", |
| | | width: 120, |
| | | align: "center", |
| | | bind: { |
| | | key: "value", |
| | | data: booleanOptions, |
| | | }, |
| | | }, |
| | | { |
| | | field: "torsioValueStandard", |
| | | title: "æå弿 å", |
| | | type: "float", |
| | | width: 200, |
| | | align: "left", |
| | | field: "productStatus", |
| | | title: "产åç¶æ", |
| | | type: "select", |
| | | width: 120, |
| | | align: "center", |
| | | bind: { |
| | | key: "value", |
| | | data: productStatusOptions, |
| | | }, |
| | | }, |
| | | // åè£
æ£æµåæ°å - ä¼åæ é¢ï¼ç»ä¸æ ¼å¼å |
| | | { |
| | | field: "stiffnessValue", |
| | | title: "å度å¼", |
| | | type: "float", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "stiffnessValueStandard", |
| | | title: "ååº¦å¼æ å", |
| | | type: "float", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "testResult", |
| | | title: "æµè¯ç»æ", |
| | | type: "int", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "pressHeight", |
| | | title: "åè£
ä½ä¸åæ£æµé«åº¦", |
| | | type: "float", |
| | | width: 200, |
| | | align: "left", |
| | | field: "pressPressure", |
| | | title: "åè£
ä½ä¸ååå", |
| | | type: "decimal", |
| | | width: 120, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.pressPressure), |
| | | }, |
| | | { |
| | | field: "screwTorque", |
| | | title: "åè£
使§ç´§æ£æµæå", |
| | | type: "float", |
| | | width: 200, |
| | | align: "left", |
| | | title: "æ§ç´§æ£æµæå", |
| | | type: "decimal", |
| | | width: 120, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.screwTorque), |
| | | }, |
| | | { |
| | | field: "screwAngle", |
| | | title: "åè£
使§ç´§æ£æµè§åº¦", |
| | | type: "float", |
| | | width: 200, |
| | | align: "left", |
| | | title: "æ§ç´§æ£æµè§åº¦", |
| | | type: "decimal", |
| | | width: 120, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.screwAngle), |
| | | }, |
| | | // äº§åæ£æµé«åº¦å |
| | | { |
| | | field: "productCheckHeight", |
| | | title: "äº§åæ£æµé«åº¦", |
| | | type: "decimal", |
| | | width: 120, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.productCheckHeight), |
| | | }, |
| | | { |
| | | field: "threadPositionHeight", |
| | | title: "èºçº¹ä½ç½®é«åº¦", |
| | | type: "decimal", |
| | | width: 120, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.threadPositionHeight), |
| | | }, |
| | | { |
| | | field: "height1", |
| | | title: "æ§ç´§ä½æ£æµé«åº¦1", |
| | | type: "float", |
| | | width: 200, |
| | | align: "left", |
| | | title: "é«åº¦1", |
| | | type: "decimal", |
| | | width: 100, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.height1), |
| | | }, |
| | | { |
| | | field: "height2", |
| | | title: "æ§ç´§ä½æ£æµé«åº¦2", |
| | | type: "float", |
| | | width: 200, |
| | | align: "left", |
| | | title: "é«åº¦2", |
| | | type: "decimal", |
| | | width: 100, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.height2), |
| | | }, |
| | | { |
| | | field: "height3", |
| | | title: "æ§ç´§ä½æ£æµé«åº¦3", |
| | | type: "float", |
| | | width: 200, |
| | | align: "left", |
| | | title: "é«åº¦3", |
| | | type: "decimal", |
| | | width: 100, |
| | | align: "center", |
| | | formatter: (row) => formatTwoDecimal(row.height3), |
| | | }, |
| | | // å
Œ
±å段 |
| | | { |
| | | 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: "", |
| | |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | </script> |