From b52018589bf6c7ec1d51ce8ad000a7aa993b0ab5 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期一, 13 四月 2026 16:06:15 +0800
Subject: [PATCH] 优化组盘表获取成品编号、流水号、供方代码
---
代码管理/WIDESEAWCS_Client/src/views/basicinfo/processInfoDetail.vue | 363 +++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 334 insertions(+), 29 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 5800e3f..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,6 +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",
@@ -26,133 +34,430 @@
name: "processInfoDetail",
url: "/processInfoDetail/",
sortName: "createDate",
+ sortOrder: "desc", // 鍒涘缓鏃堕棿榛樿鍊掑簭
});
+ // 缂栬緫琛ㄥ崟瀛楁 - 涓ユ牸鍖归厤鍚庣Dt_ProcessInfo瀹炰綋
const editFormFields = ref({
- id: "",
+ id: 0, // 涓婚敭榛樿鍊兼敼涓烘暟瀛�0
palletCode: "",
productCode: "",
productName: "",
+ 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,
+ width: 180,
require: true,
+ placeholder: "璇疯緭鍏ュ伐瑁呮澘缂栧彿",
},
{
title: "鎴愬搧缂栧彿",
field: "productCode",
type: "input",
- width: 200,
+ width: 180,
require: true,
+ placeholder: "璇疯緭鍏ユ垚鍝佺紪鍙�",
},
{
title: "鎴愬搧鍚嶇О",
field: "productName",
type: "input",
- width: 200,
+ width: 180,
require: true,
+ placeholder: "璇疯緭鍏ユ垚鍝佸悕绉�",
+ },
+ {
+ title: "娴佹按鍙�",
+ field: "productSn",
+ type: "input",
+ width: 200,
+ require: false,
+ placeholder: "璇疯緭鍏ヤ骇鍝佹祦姘村彿",
},
],
+ // 鍔犲伐鐘舵�佽 - 绉婚櫎涓嶅瓨鍦ㄧ殑checkUnfinished锛屾柊澧炰骇鍝佺姸鎬�
[
{
- title: "涓婚敭ID",
- field: "id",
+ title: "鍘嬭鎷х揣_鎷х揣OK",
+ field: "pressTightenOk",
+ type: "select",
+ width: 160,
+ align: "center",
+ defaultValue: 0,
+ data: booleanOptions,
+ },
+ {
+ title: "鍘嬭鎷х揣_鏈鍔犲伐鏈畬鎴�",
+ field: "pressTightenUnfinished",
+ type: "select",
+ width: 180,
+ align: "center",
+ defaultValue: 0,
+ data: booleanOptions,
+ },
+ {
+ title: "浜у搧鐘舵��",
+ field: "productStatus",
+ type: "select",
+ width: 160,
+ align: "center",
+ defaultValue: 0,
+ data: productStatusOptions,
+ },
+ {
+ 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: "screwTorque",
+ 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: "screwAngle",
+ 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: "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",
+ 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",
+ 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",
+ 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);
+ },
},
],
]);
+ // 鎼滅储琛ㄥ崟瀛楁 - 鍖归厤鍚庣瀹炰綋锛岀Щ闄ゆ棤鍏冲瓧娈�
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: "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: "pressTightenUnfinished",
+ title: "鎷х揣鏈畬鎴�",
+ type: "select",
+ width: 120,
+ align: "center",
+ bind: {
+ key: "value",
+ data: booleanOptions,
+ },
+ },
+ {
+ field: "productStatus",
+ title: "浜у搧鐘舵��",
+ type: "select",
+ width: 120,
+ align: "center",
+ bind: {
+ key: "value",
+ data: productStatusOptions,
+ },
+ },
+ // 鍘嬭妫�娴嬪弬鏁板垪 - 浼樺寲鏍囬锛岀粺涓�鏍煎紡鍖�
+ {
+ field: "pressPressure",
+ title: "鍘嬭浣嶄笅鍘嬪帇鍔�",
+ type: "decimal",
+ width: 120,
+ align: "center",
+ formatter: (row) => formatTwoDecimal(row.pressPressure),
+ },
+ {
+ field: "screwTorque",
+ title: "鎷х揣妫�娴嬫壄鍔�",
+ type: "decimal",
+ width: 120,
+ align: "center",
+ formatter: (row) => formatTwoDecimal(row.screwTorque),
+ },
+ {
+ field: "screwAngle",
+ 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: "decimal",
+ width: 100,
+ align: "center",
+ formatter: (row) => formatTwoDecimal(row.height1),
+ },
+ {
+ field: "height2",
+ title: "楂樺害2",
+ type: "decimal",
+ width: 100,
+ align: "center",
+ formatter: (row) => formatTwoDecimal(row.height2),
+ },
+ {
+ field: "height3",
+ 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: "",
--
Gitblit v1.9.3