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/formula.vue | 420 +++++++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 319 insertions(+), 101 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/formula.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/formula.vue"
index fc822f3..a213ecf 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/formula.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/formula.vue"
@@ -11,14 +11,43 @@
:extend="extend"
>
</view-grid>
+
+ <!-- 鍙充晶鍥剧墖渚ц竟鏍� - 澧炲姞z-index灞傜骇 -->
+ <div class="image-sidebar" :class="{ 'sidebar-open': isSidebarOpen }">
+ <div class="sidebar-toggle" @click="toggleSidebar">
+ <span>{{ isSidebarOpen ? ">" : "<" }}</span>
+ </div>
+ <div class="sidebar-content">
+ <div class="image-container">
+ <img :src="logoUrl" alt="鍙傝�冨浘鐗�" class="reference-image" />
+ <div class="image-description">閰嶆柟甯冨眬鍙傝�冨浘</div>
+ </div>
+ </div>
+ </div>
</template>
<script>
import extend from "@/extension/basicinfo/formula.js";
-import { ref, defineComponent } from "vue";
+import { ref, defineComponent, computed } from "vue";
export default defineComponent({
setup() {
+ const isSidebarOpen = ref(false);
+
+ // 鍥剧墖璺緞
+ const logoUrl = computed(() => {
+ try {
+ return require("@/assets/test.png");
+ } catch (e) {
+ console.log("浣跨敤鐩稿璺緞鍔犺浇鍥剧墖");
+ return "/assets/test.png";
+ }
+ });
+
+ const toggleSidebar = () => {
+ isSidebarOpen.value = !isSidebarOpen.value;
+ };
+
const table = ref({
key: "id",
footer: "Foots",
@@ -28,7 +57,7 @@
sortName: "createDate",
});
- // 缂栬緫琛ㄥ崟瀛楁 - 鏂板pressFastenTorque锛堝帇瑁呬綅绱у浐鎵煩锛�
+ // 缂栬緫琛ㄥ崟瀛楁 - 瀹屽叏鍖归厤鍚庣Dt_Formula瀹炰綋绫�
const editFormFields = ref({
id: "",
productCode: "",
@@ -37,173 +66,230 @@
productWidth: "",
productHeight: "",
pressNoTighten: "",
- screwDownsetDistance: "",
- screwTorqueOutput: "",
- pressFastenTorque: "", // 銆愭柊澧炪�戝帇瑁呬綅绱у浐鎵煩
+ pressNoCheckBottomPlate: "",
+ screwDownsetDistance: "", // 鍚庣娉ㄩ噴涓猴細淇濆帇鍘嬪姏
+ screwTorqueOutput: "", // 鍚庣娉ㄩ噴涓猴細涓績楂樺害
dintAutoScrewOn: "",
+ pressFastenTorque: "",
p0P1Width: "",
p0P2Width: "",
p0P3Width: "",
- p1P3Height: "",
- p2P3Height: "",
- productImagePath: "",
+ pressPressureDiff: "",
+ pressTorqueDiff: "",
+ detectHeightDiff: "",
+ screwPositionDiff: "",
+ // 绉婚櫎浜哻enterHeight瀛楁锛堝悗绔棤姝ゅ瓧娈碉紝鍘熷墠绔厤缃敊璇槧灏勶級
});
- // 缂栬緫琛ㄥ崟閰嶇疆-鏂板鍘嬭浣嶇揣鍥烘壄鐭╋紝甯冨眬閫傞厤鍘熸湁绱у噾鎬�
+ // 缂栬緫琛ㄥ崟閰嶇疆 - 淇瀛楁涓枃鍚嶇О鍜屾敞閲婏紝鍖归厤鍚庣瀹炰綋
+ // 閲嶇偣锛氫负鏍稿績瀛楁琛ュ厖蹇呭~閰嶇疆锛坮equire: true锛�
const editFormOptions = ref([
- // 绗竴琛岋細鍩虹鏍囪瘑
[
{
title: "鎴愬搧缂栧彿",
+ required: true,
field: "productCode",
- type: "input",
+ type: "string",
width: 200,
- require: true,
},
{
title: "鎴愬搧鍚嶇О",
field: "productName",
- type: "input",
+ type: "string",
width: 200,
- require: true,
+ required: true,
},
{
title: "鎷х揣绋嬪簭鍙�",
field: "dintAutoScrewOn",
- type: "input",
+ type: "string",
inputType: "number",
width: 180,
placeholder: "璇疯緭鍏ユ暣鏁�",
- },
- {
- title: "浜у搧闀垮害",
- field: "productLength",
- type: "input",
- inputType: "number",
- width: 120,
- placeholder: "淇濈暀2浣嶅皬鏁�",
- attrs: { step: 0.01, min: 0 },
+ required: true,
},
],
[
{
- title: "浜у搧瀹藉害",
+ title: "浜у搧闀垮害", // 淇鍚庣娉ㄩ噴
+ field: "productLength",
+ type: "string",
+ inputType: "number",
+ width: 100,
+ placeholder: "淇濈暀2浣嶅皬鏁�",
+ attrs: { step: 0.01, min: 0 },
+ required: true,
+ },
+ {
+ title: "浜у搧瀹藉害", // 淇鍚庣娉ㄩ噴
field: "productWidth",
- type: "input",
+ type: "string",
inputType: "number",
- width: 120,
+ width: 100,
placeholder: "淇濈暀2浣嶅皬鏁�",
attrs: { step: 0.01, min: 0 },
+ required: true,
},
{
- title: "浜у搧楂樺害",
+ title: "浜у搧楂樺害", // 淇鍚庣娉ㄩ噴
field: "productHeight",
- type: "input",
+ type: "string",
inputType: "number",
- width: 120,
+ width: 100,
placeholder: "淇濈暀2浣嶅皬鏁�",
attrs: { step: 0.01, min: 0 },
+ required: true,
},
+ ],
+ [
{
- title: "鍘嬭浣嶄笉鎷х揣",
+ title: "涓嶆嫥绱�",
field: "pressNoTighten",
type: "select",
width: 120,
align: "center",
+ defaultValue: "0",
data: [
{ key: "0", value: "鍚�" },
{ key: "1", value: "鏄�" },
],
+ required: true, // 鏂板锛氬紑鍏崇被瀛楁蹇呭~
+ },
+ {
+ title: "涓嶆祴搴曟澘",
+ field: "pressNoCheckBottomPlate",
+ type: "select",
+ width: 120,
+ align: "center",
+ defaultValue: "0",
+ data: [
+ { key: "0", value: "鍚�" },
+ { key: "1", value: "鏄�" },
+ ],
+ required: true, // 鏂板锛氬紑鍏崇被瀛楁蹇呭~
},
{
title: "淇濆帇鍘嬪姏",
field: "screwDownsetDistance",
- type: "input",
- inputType: "number",
- width: 150,
- placeholder: "淇濈暀2浣嶅皬鏁�",
- attrs: { step: 0.01, min: 0 },
- },
- ],
- [
- {
- title: "涓績楂樺害",
- field: "screwTorqueOutput",
- type: "input",
+ type: "string",
inputType: "number",
width: 120,
placeholder: "淇濈暀2浣嶅皬鏁�",
attrs: { step: 0.01, min: 0 },
+ required: true, // 鏂板锛氬伐鑹哄弬鏁板繀濉�
+ },
+ ],
+ [
+ {
+ title: "涓績楂樺害", // 淇瀛楁涓枃鍚嶇О锛堝悗绔敞閲婏級
+ field: "screwTorqueOutput",
+ type: "string",
+ inputType: "number",
+ width: 120,
+ placeholder: "淇濈暀2浣嶅皬鏁�",
+ attrs: { step: 0.01, min: 0 },
+ required: true, // 鏂板锛氬伐鑹哄弬鏁板繀濉�
},
{
- title: "绱у浐鎵煩",
+ title: "绱у浐鎵煩", // 琛ュ厖瀹屾暣瀛楁鍚嶇О
field: "pressFastenTorque",
- type: "input",
+ type: "string",
inputType: "number",
- width: 150,
+ width: 120,
placeholder: "淇濈暀2浣嶅皬鏁帮紝榛樿0.00",
attrs: { step: 0.01, min: 0 },
+ required: true, // 鏂板锛氬伐鑹哄弬鏁板繀濉�
},
{
title: "P0P1瀹藉害",
field: "p0P1Width",
- type: "input",
+ type: "string",
inputType: "number",
width: 120,
placeholder: "淇濈暀2浣嶅皬鏁�",
attrs: { step: 0.01, min: 0 },
+ required: true, // 鏂板锛氬昂瀵稿弬鏁板繀濉�
},
+ ],
+ [
{
title: "P0P2瀹藉害",
field: "p0P2Width",
- type: "input",
+ type: "string",
inputType: "number",
width: 120,
placeholder: "淇濈暀2浣嶅皬鏁�",
attrs: { step: 0.01, min: 0 },
+ required: true, // 鏂板锛氬昂瀵稿弬鏁板繀濉�
},
- ],
- // 绗洓琛岋細P绯诲垪楂樺害 + 浜у搧鍥剧墖璺緞
- [
{
title: "P0P3瀹藉害",
field: "p0P3Width",
- type: "input",
+ type: "string",
inputType: "number",
width: 120,
placeholder: "淇濈暀2浣嶅皬鏁�",
attrs: { step: 0.01, min: 0 },
+ required: true, // 鏂板锛氬昂瀵稿弬鏁板繀濉�
},
{
- title: "P1P3楂樺害",
- field: "p1P3Height",
- type: "input",
+ title: "鍘嬪姏宸��",
+ field: "pressPressureDiff",
+ type: "string",
inputType: "number",
- width: 150,
+ width: 120,
placeholder: "淇濈暀2浣嶅皬鏁�",
attrs: { step: 0.01, min: 0 },
+ required: true, // 鏂板锛氬樊鍊煎弬鏁板繀濉�
},
+ ],
+ [
{
- title: "P2P3楂樺害",
- field: "p2P3Height",
- type: "input",
+ title: "鎵姏宸��",
+ field: "pressTorqueDiff",
+ type: "string",
inputType: "number",
- width: 150,
+ width: 120,
placeholder: "淇濈暀2浣嶅皬鏁�",
attrs: { step: 0.01, min: 0 },
+ required: true, // 鏂板锛氬樊鍊煎弬鏁板繀濉�
},
{
- title: "浜у搧鍥剧墖璺緞",
- field: "productImagePath",
- type: "textarea",
- width: 400,
- rows: 2,
- placeholder: "璇疯緭鍏ュ浘鐗囧畬鏁磋矾寰勶紝鏀寔500瀛楃浠ュ唴",
+ title: "楂樺害宸��",
+ field: "detectHeightDiff",
+ type: "string",
+ inputType: "number",
+ width: 120,
+ placeholder: "淇濈暀2浣嶅皬鏁�",
+ attrs: { step: 0.01, min: 0 },
+ required: true, // 鏂板锛氬樊鍊煎弬鏁板繀濉�
+ },
+ {
+ title: "铻虹汗宸��",
+ field: "screwPositionDiff",
+ type: "string",
+ inputType: "number",
+ width: 120,
+ placeholder: "淇濈暀2浣嶅皬鏁�",
+ attrs: { step: 0.01, min: 0 },
+ required: true, // 鏂板锛氬樊鍊煎弬鏁板繀濉�
+ },
+ ],
+ [
+ {
+ title: "鍨墖楂樺害",
+ field: "gasketHeight",
+ type: "string",
+ inputType: "number",
+ width: 120,
+ placeholder: "淇濈暀2浣嶅皬鏁�",
+ attrs: { step: 0.01, min: 0 },
+ required: true,
},
],
]);
- // 鎼滅储琛ㄥ崟瀛楁 - 鏃犻渶淇敼
+ // 鎼滅储琛ㄥ崟瀛楁
const searchFormFields = ref({
productCode: "",
productName: "",
@@ -211,7 +297,7 @@
createDate: "",
});
- // 鎼滅储琛ㄥ崟閰嶇疆 - 鏃犻渶淇敼
+ // 鎼滅储琛ㄥ崟閰嶇疆
const searchFormOptions = ref([
[
{ title: "鎴愬搧缂栧彿", field: "productCode", type: "like", width: 200 },
@@ -223,14 +309,14 @@
],
]);
- // 琛ㄦ牸鍒楅厤缃� - 鏂板鍘嬭浣嶇揣鍥烘壄鐭╁垪
+ // 琛ㄦ牸鍒楅厤缃� - 淇瀛楁涓枃鍚嶇О鍜屾敞閲婏紝鍖归厤鍚庣瀹炰綋
const columns = ref([
{
field: "id",
- title: "搴忓彿",
+ title: "id",
type: "int",
width: 80,
- hidden: true,
+ // hidden: true,
align: "center",
},
{
@@ -250,28 +336,28 @@
},
{
field: "productLength",
- title: "浜у搧闀垮害",
+ title: "浜у搧闀垮害", // 淇鍚庣娉ㄩ噴
type: "decimal",
width: 90,
align: "center",
},
{
field: "productWidth",
- title: "浜у搧瀹藉害",
+ title: "浜у搧瀹藉害", // 淇鍚庣娉ㄩ噴
type: "decimal",
width: 90,
align: "center",
},
{
field: "productHeight",
- title: "浜у搧楂樺害",
+ title: "浜у搧楂樺害", // 淇鍚庣娉ㄩ噴
type: "decimal",
width: 90,
align: "center",
},
{
field: "pressNoTighten",
- title: "鍘嬭浣嶄笉鎷х揣",
+ title: "涓嶆嫥绱�",
type: "select",
width: 100,
align: "center",
@@ -284,24 +370,38 @@
},
},
{
+ field: "pressNoCheckBottomPlate",
+ title: "涓嶆祴搴曟澘",
+ type: "select",
+ width: 110,
+ align: "center",
+ bind: {
+ key: "value",
+ data: [
+ { key: "0", value: "鍚�" },
+ { key: "1", value: "鏄�" },
+ ],
+ },
+ },
+ {
field: "screwDownsetDistance",
- title: "淇濆帇鍘嬪姏",
+ title: "淇濆帇鍘嬪姏", // 淇瀛楁涓枃鍚嶇О
type: "decimal",
width: 110,
align: "center",
},
{
field: "screwTorqueOutput",
- title: "涓績楂樺害",
+ title: "涓績楂樺害", // 淇瀛楁涓枃鍚嶇О
type: "decimal",
width: 90,
align: "center",
},
{
- field: "pressFastenTorque", // 銆愭柊澧炪�戣〃鏍煎垪
- title: "鍘嬭浣嶇揣鍥烘壄鐭�",
+ field: "pressFastenTorque",
+ title: "绱у浐鎵煩", // 琛ュ厖瀹屾暣瀛楁鍚嶇О
type: "decimal",
- width: 120,
+ width: 90,
align: "center",
},
{
@@ -311,7 +411,6 @@
width: 100,
align: "center",
},
- // P绯诲垪瀹藉害
{
field: "p0P1Width",
title: "P0P1瀹藉害",
@@ -333,30 +432,41 @@
width: 90,
align: "center",
},
- // P绯诲垪楂樺害
{
- field: "p1P3Height",
- title: "P1P3楂樺害",
+ field: "pressPressureDiff",
+ title: "鍘嬪姏宸��",
type: "decimal",
- width: 90,
+ width: 100,
align: "center",
},
{
- field: "p2P3Height",
- title: "P2P3楂樺害",
+ field: "pressTorqueDiff",
+ title: "鎵煩宸��",
type: "decimal",
- width: 90,
+ width: 100,
align: "center",
},
{
- field: "productImagePath",
- title: "鍥剧墖璺緞",
- type: "string",
- width: 200,
- align: "left",
- overflow: "ellipsis",
+ field: "detectHeightDiff",
+ title: "楂樺害宸��",
+ type: "decimal",
+ width: 100,
+ align: "center",
},
- // 鍏叡瀛楁
+ {
+ field: "screwPositionDiff",
+ title: "铻虹汗宸��",
+ type: "decimal",
+ width: 100,
+ align: "center",
+ },
+ {
+ field: "gasketHeight",
+ title: "鍨墖楂樺害",
+ type: "decimal",
+ width: 100,
+ align: "center",
+ },
{
field: "creater",
title: "鍒涘缓浜�",
@@ -387,7 +497,7 @@
},
]);
- // 閰嶆柟鏄庣粏閰嶇疆 - 鏃犻渶淇敼
+ // 閰嶆柟鏄庣粏閰嶇疆 - 鍚屾牱缁欐槑缁嗗瓧娈垫坊鍔犲繀濉�
const detail = ref({
cnName: "閰嶆柟淇℃伅璇︽儏",
table: "FormulaDetail",
@@ -399,32 +509,34 @@
width: 90,
hidden: true,
readonly: true,
- require: true,
+ required: true,
align: "center",
},
{
field: "componentCode",
title: "闆朵欢缂栧彿",
type: "string",
- edit: { type: "" },
+ edit: { type: "input" },
width: 120,
- require: true,
+ required: true, // 鏄庣粏鏍稿績瀛楁蹇呭~
align: "left",
},
{
field: "componentName",
title: "闆朵欢鍚嶇О",
type: "string",
- edit: { type: "" },
+ edit: { type: "input" },
width: 150,
+ required: true, // 鏄庣粏鏍稿績瀛楁蹇呭~
align: "left",
},
{
field: "supplierCode",
title: "渚涙柟浠g爜",
type: "string",
- edit: { type: "" },
+ edit: { type: "input" },
width: 150,
+ required: true, // 鏄庣粏鏍稿績瀛楁蹇呭~
align: "left",
},
{
@@ -440,6 +552,7 @@
{ key: "1", value: "鏄�" },
],
},
+ required: true, // 鏄庣粏寮�鍏冲瓧娈靛繀濉�
},
],
sortName: "createDate",
@@ -455,7 +568,112 @@
searchFormOptions,
columns,
detail,
+ isSidebarOpen,
+ logoUrl,
+ toggleSidebar,
};
},
});
</script>
+
+<style scoped>
+/* 渚ц竟鏍忔牱寮� - 澧炲姞z-index灞傜骇 */
+.image-sidebar {
+ position: fixed;
+ top: 0;
+ right: -600px;
+ width: 600px;
+ height: 100vh;
+ background: #fff;
+ box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
+ transition: right 0.3s ease;
+ z-index: 9999;
+ display: flex;
+}
+
+.sidebar-open {
+ right: 0;
+}
+
+.sidebar-toggle {
+ position: absolute;
+ left: -40px;
+ top: 50%;
+ transform: translateY(-50%);
+ width: 40px;
+ height: 80px;
+ background: #409eff;
+ color: white;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ cursor: pointer;
+ border-radius: 8px 0 0 8px;
+ font-size: 16px;
+ font-weight: bold;
+ transition: all 0.3s ease;
+ box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
+ z-index: 10000; /* 鍒囨崲鎸夐挳鐨剒-index鏇撮珮 */
+}
+
+.sidebar-toggle:hover {
+ background: #66b1ff;
+}
+
+.sidebar-toggle span {
+ transition: transform 0.3s ease;
+}
+
+.sidebar-open .sidebar-toggle span {
+ transform: rotate(180deg);
+}
+
+.sidebar-content {
+ flex: 1;
+ padding: 20px;
+ overflow-y: auto;
+ z-index: 9999; /* 鍐呭鍖哄煙涔熻缃珮z-index */
+}
+
+.image-container {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ height: 100%;
+}
+
+.reference-image {
+ max-width: 100%;
+ max-height: 60vh;
+ object-fit: contain;
+ border: 1px solid #ddd;
+ border-radius: 8px;
+ padding: 10px;
+ background: #f8f9fa;
+}
+
+.image-description {
+ margin-top: 15px;
+ padding: 10px;
+ background: #409eff;
+ color: white;
+ border-radius: 4px;
+ font-size: 14px;
+ text-align: center;
+}
+
+/* 鍝嶅簲寮忚璁� */
+@media (max-width: 768px) {
+ .image-sidebar {
+ width: 250px;
+ right: -250px;
+ }
+
+ .sidebar-toggle {
+ left: -30px;
+ width: 30px;
+ height: 60px;
+ }
+}
+</style>
--
Gitblit v1.9.3