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 | 568 ++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 520 insertions(+), 48 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 99f5833..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,51 +57,239 @@
sortName: "createDate",
});
+ // 缂栬緫琛ㄥ崟瀛楁 - 瀹屽叏鍖归厤鍚庣Dt_Formula瀹炰綋绫�
const editFormFields = ref({
id: "",
productCode: "",
productName: "",
- productLength: 0,
- productWidth: 0,
- productHeight: 0,
- screwDownsetDistance: 0,
- screwTorqueOutput: 0,
- dintAutoScrewOn: 0,
- xDirectionDistance1: 0,
- yDirectionHeight1: 0,
- xDirectionDistance2: 0,
- yDirectionHeight2: 0,
- xDirectionDistance3: 0,
- yDirectionHeight3: 0,
+ productLength: "",
+ productWidth: "",
+ productHeight: "",
+ pressNoTighten: "",
+ pressNoCheckBottomPlate: "",
+ screwDownsetDistance: "", // 鍚庣娉ㄩ噴涓猴細淇濆帇鍘嬪姏
+ screwTorqueOutput: "", // 鍚庣娉ㄩ噴涓猴細涓績楂樺害
+ dintAutoScrewOn: "",
+ pressFastenTorque: "",
+ p0P1Width: "",
+ p0P2Width: "",
+ p0P3Width: "",
+ 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: "涓婚敭ID",
- field: "id",
- type: "input",
+ title: "鎷х揣绋嬪簭鍙�",
+ field: "dintAutoScrewOn",
+ type: "string",
+ inputType: "number",
+ width: 180,
+ placeholder: "璇疯緭鍏ユ暣鏁�",
+ required: true,
+ },
+ ],
+ [
+ {
+ title: "浜у搧闀垮害", // 淇鍚庣娉ㄩ噴
+ field: "productLength",
+ type: "string",
+ inputType: "number",
width: 100,
- hidden: true,
- readonly: true,
+ placeholder: "淇濈暀2浣嶅皬鏁�",
+ attrs: { step: 0.01, min: 0 },
+ required: true,
+ },
+ {
+ title: "浜у搧瀹藉害", // 淇鍚庣娉ㄩ噴
+ field: "productWidth",
+ type: "string",
+ inputType: "number",
+ width: 100,
+ placeholder: "淇濈暀2浣嶅皬鏁�",
+ attrs: { step: 0.01, min: 0 },
+ required: true,
+ },
+ {
+ title: "浜у搧楂樺害", // 淇鍚庣娉ㄩ噴
+ field: "productHeight",
+ type: "string",
+ inputType: "number",
+ width: 100,
+ placeholder: "淇濈暀2浣嶅皬鏁�",
+ attrs: { step: 0.01, min: 0 },
+ required: true,
+ },
+ ],
+ [
+ {
+ 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: "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: "绱у浐鎵煩", // 琛ュ厖瀹屾暣瀛楁鍚嶇О
+ field: "pressFastenTorque",
+ type: "string",
+ inputType: "number",
+ width: 120,
+ placeholder: "淇濈暀2浣嶅皬鏁帮紝榛樿0.00",
+ attrs: { step: 0.01, min: 0 },
+ required: true, // 鏂板锛氬伐鑹哄弬鏁板繀濉�
+ },
+ {
+ title: "P0P1瀹藉害",
+ field: "p0P1Width",
+ type: "string",
+ inputType: "number",
+ width: 120,
+ placeholder: "淇濈暀2浣嶅皬鏁�",
+ attrs: { step: 0.01, min: 0 },
+ required: true, // 鏂板锛氬昂瀵稿弬鏁板繀濉�
+ },
+ ],
+ [
+ {
+ title: "P0P2瀹藉害",
+ field: "p0P2Width",
+ type: "string",
+ inputType: "number",
+ width: 120,
+ placeholder: "淇濈暀2浣嶅皬鏁�",
+ attrs: { step: 0.01, min: 0 },
+ required: true, // 鏂板锛氬昂瀵稿弬鏁板繀濉�
+ },
+ {
+ title: "P0P3瀹藉害",
+ field: "p0P3Width",
+ type: "string",
+ inputType: "number",
+ width: 120,
+ placeholder: "淇濈暀2浣嶅皬鏁�",
+ attrs: { step: 0.01, min: 0 },
+ required: true, // 鏂板锛氬昂瀵稿弬鏁板繀濉�
+ },
+ {
+ title: "鍘嬪姏宸��",
+ field: "pressPressureDiff",
+ type: "string",
+ inputType: "number",
+ width: 120,
+ placeholder: "淇濈暀2浣嶅皬鏁�",
+ attrs: { step: 0.01, min: 0 },
+ required: true, // 鏂板锛氬樊鍊煎弬鏁板繀濉�
+ },
+ ],
+ [
+ {
+ title: "鎵姏宸��",
+ field: "pressTorqueDiff",
+ type: "string",
+ inputType: "number",
+ width: 120,
+ placeholder: "淇濈暀2浣嶅皬鏁�",
+ attrs: { step: 0.01, min: 0 },
+ required: true, // 鏂板锛氬樊鍊煎弬鏁板繀濉�
+ },
+ {
+ 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: "",
@@ -80,105 +297,254 @@
createDate: "",
});
+ // 鎼滅储琛ㄥ崟閰嶇疆
const searchFormOptions = ref([
[
- { title: "鎴愬搧缂栧彿", field: "productCode", type: "like" },
- { title: "鎴愬搧鍚嶇О", field: "productName", type: "like" },
+ { title: "鎴愬搧缂栧彿", field: "productCode", type: "like", width: 200 },
+ { title: "鎴愬搧鍚嶇О", field: "productName", 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 },
],
]);
+ // 琛ㄦ牸鍒楅厤缃� - 淇瀛楁涓枃鍚嶇О鍜屾敞閲婏紝鍖归厤鍚庣瀹炰綋
const columns = ref([
{
field: "id",
- title: "搴忓彿",
+ title: "id",
type: "int",
- width: 90,
- hidden: true,
- readonly: true,
- require: true,
- align: "left",
+ width: 80,
+ // hidden: true,
+ align: "center",
},
{
field: "productCode",
title: "鎴愬搧缂栧彿",
type: "string",
link: true,
- width: 200,
+ width: 150,
align: "left",
},
{
field: "productName",
title: "鎴愬搧鍚嶇О",
type: "string",
- width: 200,
+ width: 150,
align: "left",
+ },
+ {
+ field: "productLength",
+ title: "浜у搧闀垮害", // 淇鍚庣娉ㄩ噴
+ type: "decimal",
+ width: 90,
+ align: "center",
+ },
+ {
+ field: "productWidth",
+ title: "浜у搧瀹藉害", // 淇鍚庣娉ㄩ噴
+ type: "decimal",
+ width: 90,
+ align: "center",
+ },
+ {
+ field: "productHeight",
+ title: "浜у搧楂樺害", // 淇鍚庣娉ㄩ噴
+ type: "decimal",
+ width: 90,
+ align: "center",
+ },
+ {
+ field: "pressNoTighten",
+ title: "涓嶆嫥绱�",
+ type: "select",
+ width: 100,
+ align: "center",
+ bind: {
+ key: "value",
+ data: [
+ { key: "0", value: "鍚�" },
+ { key: "1", value: "鏄�" },
+ ],
+ },
+ },
+ {
+ field: "pressNoCheckBottomPlate",
+ title: "涓嶆祴搴曟澘",
+ type: "select",
+ width: 110,
+ align: "center",
+ bind: {
+ key: "value",
+ data: [
+ { key: "0", value: "鍚�" },
+ { key: "1", value: "鏄�" },
+ ],
+ },
+ },
+ {
+ field: "screwDownsetDistance",
+ title: "淇濆帇鍘嬪姏", // 淇瀛楁涓枃鍚嶇О
+ type: "decimal",
+ width: 110,
+ align: "center",
+ },
+ {
+ field: "screwTorqueOutput",
+ title: "涓績楂樺害", // 淇瀛楁涓枃鍚嶇О
+ type: "decimal",
+ width: 90,
+ align: "center",
+ },
+ {
+ field: "pressFastenTorque",
+ title: "绱у浐鎵煩", // 琛ュ厖瀹屾暣瀛楁鍚嶇О
+ type: "decimal",
+ width: 90,
+ align: "center",
+ },
+ {
+ field: "dintAutoScrewOn",
+ title: "鎷х揣绋嬪簭鍙�",
+ type: "int",
+ width: 100,
+ align: "center",
+ },
+ {
+ field: "p0P1Width",
+ title: "P0P1瀹藉害",
+ type: "decimal",
+ width: 90,
+ align: "center",
+ },
+ {
+ field: "p0P2Width",
+ title: "P0P2瀹藉害",
+ type: "decimal",
+ width: 90,
+ align: "center",
+ },
+ {
+ field: "p0P3Width",
+ title: "P0P3瀹藉害",
+ type: "decimal",
+ width: 90,
+ align: "center",
+ },
+ {
+ field: "pressPressureDiff",
+ title: "鍘嬪姏宸��",
+ type: "decimal",
+ width: 100,
+ align: "center",
+ },
+ {
+ field: "pressTorqueDiff",
+ title: "鎵煩宸��",
+ type: "decimal",
+ width: 100,
+ align: "center",
+ },
+ {
+ 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: "鍒涘缓浜�",
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: "componentDetail",
+ cnName: "閰嶆柟淇℃伅璇︽儏",
+ table: "FormulaDetail",
columns: [
{
field: "formulaId",
- title: "ID",
+ title: "閰嶆柟ID",
type: "int",
width: 90,
hidden: true,
- require: true,
- align: "left",
+ readonly: true,
+ required: true,
+ align: "center",
},
{
field: "componentCode",
title: "闆朵欢缂栧彿",
type: "string",
+ edit: { type: "input" },
width: 120,
- require: true,
+ required: true, // 鏄庣粏鏍稿績瀛楁蹇呭~
align: "left",
},
{
field: "componentName",
title: "闆朵欢鍚嶇О",
type: "string",
+ edit: { type: "input" },
width: 150,
- require: true,
+ required: true, // 鏄庣粏鏍稿績瀛楁蹇呭~
+ align: "left",
+ },
+ {
+ field: "supplierCode",
+ title: "渚涙柟浠g爜",
+ type: "string",
+ edit: { type: "input" },
+ width: 150,
+ required: true, // 鏄庣粏鏍稿績瀛楁蹇呭~
align: "left",
},
{
title: "鏄惁鎵爜",
field: "isScanned",
type: "select",
+ width: 100,
+ align: "center",
bind: {
key: "value",
data: [
@@ -186,6 +552,7 @@
{ key: "1", value: "鏄�" },
],
},
+ required: true, // 鏄庣粏寮�鍏冲瓧娈靛繀濉�
},
],
sortName: "createDate",
@@ -201,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