From 891207469b41c23d22805876a4e179d75832572f Mon Sep 17 00:00:00 2001
From: leiqunqing <zhengqifeng@hnkhzn.com>
Date: 星期四, 05 三月 2026 11:03:52 +0800
Subject: [PATCH] 完整项目更新
---
代码管理/WIDESEAWCS_Client/src/views/basicinfo/processInfoDetail.vue | 334 ++++++++++++++++++++++++++++++-------------------------
1 files changed, 183 insertions(+), 151 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/processInfoDetail.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/processInfoDetail.vue"
index f267713..bd90e8c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/processInfoDetail.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/processInfoDetail.vue"
@@ -19,7 +19,14 @@
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",
@@ -27,38 +34,51 @@
name: "processInfoDetail",
url: "/processInfoDetail/",
sortName: "createDate",
- sortOrder: "desc", // 鏂板锛氬垱寤烘椂闂撮粯璁ゅ�掑簭锛屽拰涓婚〉闈繚鎸佷竴鑷�
+ sortOrder: "desc", // 鍒涘缓鏃堕棿榛樿鍊掑簭
});
- // 缂栬緫琛ㄥ崟瀛楁 - 鍚屾涓婚〉闈紝鏂板pressPressure锛堝帇瑁呭帇鍔涳級锛屽尮閰嶅悗绔疄浣�
+ // 缂栬緫琛ㄥ崟瀛楁 - 涓ユ牸鍖归厤鍚庣Dt_ProcessInfo瀹炰綋
const editFormFields = ref({
- id: "",
+ id: 0, // 涓婚敭榛樿鍊兼敼涓烘暟瀛�0
palletCode: "",
productCode: "",
productName: "",
- productSn: "", // 娴佹按鍙�
- pressTightenNg: "", // 鍘嬭鎷х揣_鎷х揣NG
- pressTightenOk: "", // 鍘嬭鎷х揣_鎷х揣OK
- pressTightenUnfinished: "", // 鍘嬭鎷х揣_鏈鍔犲伐鏈畬鎴�
- checkUnfinished: "", // 妫�娴媉鏈妫�娴嬫湭瀹屾垚
- pressHeight: "", // 鍘嬭浣嶄笅鍘嬮珮搴�
- screwTorque: "", // 鍘嬭浣嶆嫥绱ф壄鍔�
- screwAngle: "", // 鍘嬭浣嶆嫥绱ц搴�
- pressPressure: "", // 銆愭柊澧炪�戝帇瑁呬綅涓嬪帇鍘嬪姏锛堝尮閰嶅悗绔疄浣擄級
- height1: "", // 鎷х揣浣嶆娴嬮珮搴�1
- height2: "", // 鎷х揣浣嶆娴嬮珮搴�2
- height3: "", // 鎷х揣浣嶆娴嬮珮搴�3
+ 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: 160,
+ width: 180,
require: true,
placeholder: "璇疯緭鍏ュ伐瑁呮澘缂栧彿",
},
@@ -66,7 +86,7 @@
title: "鎴愬搧缂栧彿",
field: "productCode",
type: "input",
- width: 160,
+ width: 180,
require: true,
placeholder: "璇疯緭鍏ユ垚鍝佺紪鍙�",
},
@@ -74,7 +94,7 @@
title: "鎴愬搧鍚嶇О",
field: "productName",
type: "input",
- width: 160,
+ width: 180,
require: true,
placeholder: "璇疯緭鍏ユ垚鍝佸悕绉�",
},
@@ -82,158 +102,172 @@
title: "娴佹按鍙�",
field: "productSn",
type: "input",
- width: 180,
+ width: 200,
require: false,
placeholder: "璇疯緭鍏ヤ骇鍝佹祦姘村彿",
},
],
- // 绗簩琛岋細4涓姸鎬佸垪+涓婚敭锛岃ˉ鍏ㄩ粯璁ゅ��0锛堝惁锛夛紝缁熶竴瀹藉害/瀵归綈锛岄殣钘忎富閿�
+ // 鍔犲伐鐘舵�佽 - 绉婚櫎涓嶅瓨鍦ㄧ殑checkUnfinished锛屾柊澧炰骇鍝佺姸鎬�
[
{
- title: "鎷х揣NG",
- field: "pressTightenNg",
- type: "select",
- width: 150,
- align: "center",
- defaultValue: "0", // 鏂板榛樿鍊硷紝鍜屼富椤甸潰涓�鑷�
- data: [
- { key: "0", value: "鍚�" },
- { key: "1", value: "鏄�" },
- ],
- },
- {
- title: "鎷х揣OK",
+ title: "鍘嬭鎷х揣_鎷х揣OK",
field: "pressTightenOk",
type: "select",
- width: 150,
+ width: 160,
align: "center",
- defaultValue: "0", // 鏂板榛樿鍊�
- data: [
- { key: "0", value: "鍚�" },
- { key: "1", value: "鏄�" },
- ],
+ defaultValue: 0,
+ data: booleanOptions,
},
{
- title: "鎷х揣鏈畬鎴�",
+ title: "鍘嬭鎷х揣_鏈鍔犲伐鏈畬鎴�",
field: "pressTightenUnfinished",
type: "select",
- width: 170,
+ width: 180,
align: "center",
- defaultValue: "0",
- data: [
- { key: "0", value: "鍚�" },
- { key: "1", value: "鏄�" },
- ],
+ defaultValue: 0,
+ data: booleanOptions,
},
{
- title: "妫�娴嬫湭瀹屾垚",
- field: "checkUnfinished",
+ title: "浜у搧鐘舵��",
+ field: "productStatus",
type: "select",
- width: 150,
+ width: 160,
align: "center",
- defaultValue: "0", // 鏂板榛樿鍊硷紝缁熶竴瑙勮寖
- data: [
- { key: "0", value: "鍚�" },
- { key: "1", value: "鏄�" },
- ],
+ defaultValue: 0,
+ data: productStatusOptions,
},
{
- title: "涓婚敭ID",
- field: "id",
+ title: "鍘嬭浣嶄笅鍘嬪帇鍔�",
+ field: "pressPressure",
type: "input",
- width: 100,
- hidden: true,
- readonly: true,
+ 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: "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: "鍘嬭鎵姏",
+ title: "鍘嬭浣嶆嫥绱ф娴嬫壄鍔�",
field: "screwTorque",
type: "input",
inputType: "number",
- width: 160,
+ width: 180,
require: false,
attrs: { step: 0.01, min: 0 },
placeholder: "淇濈暀2浣嶅皬鏁�",
+ formatter: formatTwoDecimal,
+ onBlur: (e) => {
+ e.target.value = formatTwoDecimal(e.target.value);
+ },
},
{
- title: "鎷х揣瑙掑害",
+ title: "鍘嬭浣嶆嫥绱ф娴嬭搴�",
field: "screwAngle",
type: "input",
inputType: "number",
- width: 160,
+ 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",
+ title: "鎷х揣浣嶆娴嬮珮搴�1",
field: "height1",
type: "input",
inputType: "number",
- width: 200,
+ 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",
+ title: "鎷х揣浣嶆娴嬮珮搴�2",
field: "height2",
type: "input",
inputType: "number",
- width: 200,
+ 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",
+ title: "鎷х揣浣嶆娴嬮珮搴�3",
field: "height3",
type: "input",
inputType: "number",
- width: 200,
+ width: 180,
require: false,
attrs: { step: 0.01, min: 0 },
placeholder: "淇濈暀2浣嶅皬鏁�",
+ formatter: formatTwoDecimal,
+ onBlur: (e) => {
+ e.target.value = formatTwoDecimal(e.target.value);
+ },
},
],
]);
- // 鎼滅储琛ㄥ崟瀛楁 - 淇濇寔鍜屼富椤甸潰銆佸師鏈変唬鐮佷竴鑷达紝鏍稿績鎼滅储椤规棤璋冩暣
+ // 鎼滅储琛ㄥ崟瀛楁 - 鍖归厤鍚庣瀹炰綋锛岀Щ闄ゆ棤鍏冲瓧娈�
const searchFormFields = ref({
palletCode: "",
productCode: "",
productName: "",
- productSn: "", // 娴佹按鍙锋悳绱�
- creater: "",
+ productSn: "",
+ productStatus: "", // 鏂板锛氫骇鍝佺姸鎬佹悳绱�
createDate: "",
});
- // 鎼滅储琛ㄥ崟閰嶇疆 - 浼樺寲瀹藉害鍖归厤甯冨眬锛屽拰涓婚〉闈㈠畬鍏ㄤ竴鑷�
+ // 鎼滅储琛ㄥ崟閰嶇疆 - 浼樺寲甯冨眬锛屾柊澧炰骇鍝佺姸鎬佹悳绱�
const searchFormOptions = ref([
[
{ title: "宸ヨ鏉跨紪鍙�", field: "palletCode", type: "like", width: 180 },
@@ -242,12 +276,18 @@
{ title: "娴佹按鍙�", field: "productSn", type: "like", width: 200 },
],
[
- { title: "鍒涘缓浜�", field: "creater", type: "like", width: 200 },
+ {
+ title: "浜у搧鐘舵��",
+ field: "productStatus",
+ type: "select",
+ width: 180,
+ data: productStatusOptions,
+ },
{ title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime", width: 380 },
],
]);
- // 琛ㄦ牸鍒楅厤缃� - 銆愭柊澧瀙ressPressure鍒椼�戯紝缁熶竴鍒楀悕/瀹藉害/绫诲瀷锛屼慨澶嶉瀛楁瘝澶у啓闂锛屼紭鍖栧榻�
+ // 琛ㄦ牸鍒楅厤缃� - 淇瀛楁鍖归厤锛屾柊澧炰骇鍝佺姸鎬佸垪锛屼紭鍖栨爣棰�
const columns = ref([
{
field: "id",
@@ -286,115 +326,107 @@
align: "left",
overflow: "ellipsis",
},
- // 4涓姸鎬佸垪 - 淇鍘熸湁PressTightenNg棣栧瓧姣嶅ぇ鍐欓棶棰橈紝缁熶竴瑙勮寖
- {
- field: "pressTightenNg",
- title: "鎷х揣NG",
- type: "select",
- width: 120,
- align: "center",
- bind: {
- key: "value",
- data: [
- { key: "0", value: "鍚�" },
- { key: "1", value: "鏄�" },
- ],
- },
- },
+ // 鐘舵�佸垪 - 绉婚櫎checkUnfinished锛屾柊澧炰骇鍝佺姸鎬�
{
field: "pressTightenOk",
title: "鎷х揣OK",
type: "select",
- width: 120,
+ width: 100,
align: "center",
bind: {
key: "value",
- data: [
- { key: "0", value: "鍚�" },
- { key: "1", value: "鏄�" },
- ],
+ data: booleanOptions,
},
},
{
field: "pressTightenUnfinished",
title: "鎷х揣鏈畬鎴�",
type: "select",
- width: 140,
+ width: 120,
align: "center",
bind: {
key: "value",
- data: [
- { key: "0", value: "鍚�" },
- { key: "1", value: "鏄�" },
- ],
+ data: booleanOptions,
},
},
{
- field: "checkUnfinished",
- title: "妫�娴嬫湭瀹屾垚",
+ field: "productStatus",
+ title: "浜у搧鐘舵��",
type: "select",
width: 120,
align: "center",
bind: {
key: "value",
- data: [
- { key: "0", value: "鍚�" },
- { key: "1", value: "鏄�" },
- ],
+ data: productStatusOptions,
},
},
+ // 鍘嬭妫�娴嬪弬鏁板垪 - 浼樺寲鏍囬锛岀粺涓�鏍煎紡鍖�
{
- field: "pressHeight",
- title: "鍘嬭楂樺害",
+ field: "pressPressure",
+ title: "鍘嬭浣嶄笅鍘嬪帇鍔�",
type: "decimal",
- width: 100,
+ width: 120,
align: "center",
- },
- {
- field: "pressPressure", // 鏂板鍘嬭鍘嬪姏鍒�
- title: "鍘嬭鍘嬪姏",
- type: "decimal",
- width: 100,
- align: "center",
- columnDescription: "鍘嬭浣嶄笅鍘嬪帇鍔�",
+ formatter: (row) => formatTwoDecimal(row.pressPressure),
},
{
field: "screwTorque",
- title: "鍘嬭鎵姏",
+ title: "鎷х揣妫�娴嬫壄鍔�",
type: "decimal",
- width: 100,
+ width: 120,
align: "center",
+ formatter: (row) => formatTwoDecimal(row.screwTorque),
},
{
field: "screwAngle",
- title: "鎷х揣瑙掑害",
+ title: "鎷х揣妫�娴嬭搴�",
type: "decimal",
- width: 100,
+ 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",
+ title: "楂樺害1",
type: "decimal",
width: 100,
align: "center",
+ formatter: (row) => formatTwoDecimal(row.height1),
},
{
field: "height2",
- title: "妫�娴嬮珮搴�2",
+ title: "楂樺害2",
type: "decimal",
width: 100,
align: "center",
+ formatter: (row) => formatTwoDecimal(row.height2),
},
{
field: "height3",
- title: "妫�娴嬮珮搴�3",
+ title: "楂樺害3",
type: "decimal",
width: 100,
align: "center",
+ formatter: (row) => formatTwoDecimal(row.height3),
},
- // 鍏叡瀛楁 - 鍒涘缓/淇敼淇℃伅锛屽拰涓婚〉闈竴鑷�
+ // 鍏叡瀛楁
{
field: "creater",
title: "鍒涘缓浜�",
@@ -425,7 +457,7 @@
},
]);
- // 鏃犱簩绾ф槑缁嗭紝淇濇寔绌洪厤缃笉鍙�
+ // 鍔犲伐淇℃伅鏃犳槑缁�
const detail = ref({
cnName: "",
table: "",
--
Gitblit v1.9.3