From c47ec7b37e7f68c49b40fc4b59098e79626e66de Mon Sep 17 00:00:00 2001 From: xwt <2740516069@qq.com> Date: 星期日, 03 八月 2025 13:39:14 +0800 Subject: [PATCH] 首检巡检 --- pages/QC/XJ/Add.vue | 97 +++++++++++++++++++++++++++++++ manifest.json | 2 pages/QC/LLJ/Add.vue | 52 +++++++++++++---- store/index.js | 4 4 files changed, 138 insertions(+), 17 deletions(-) diff --git a/manifest.json b/manifest.json index c8d4d3b..f129550 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name" : "GS-MES-AP", "appid" : "__UNI__F08FAE3", "description" : "", - "versionName" : "1.1.2.6", + "versionName" : "1.1.2.7", "versionCode" : 1, "transformPx" : false, /* 5+App鐗规湁鐩稿叧 */ diff --git a/pages/QC/LLJ/Add.vue b/pages/QC/LLJ/Add.vue index eb106b4..89c2ef6 100644 --- a/pages/QC/LLJ/Add.vue +++ b/pages/QC/LLJ/Add.vue @@ -1882,7 +1882,7 @@ font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif; max-width: 1000px; margin: 0 auto; - padding: 20px; + padding: 20px 20px 100px 20px; /* 搴曢儴澧炲姞鍐呰竟璺濅负鍥哄畾鎸夐挳鐣欑┖闂� */ background-color: #fff; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); min-height: 100vh; @@ -2022,11 +2022,19 @@ /* 琛ㄥ崟涓嬫柟鎿嶄綔鎸夐挳鍖烘牱寮� */ .bottom-action-buttons { display: flex; - justify-content: flex-end; - gap: 10px; - margin: 20px 0; - padding: 10px; + justify-content: center; + gap: 8px; + padding: 12px; flex-wrap: wrap; + align-items: center; + position: fixed; /* 鍥哄畾鍦ㄥ睆骞曞簳閮� */ + bottom: 0; /* 璺濈搴曢儴0px */ + left: 0; /* 璺濈宸﹁竟0px */ + right: 0; /* 璺濈鍙宠竟0px */ + background-color: #fff; /* 鑳屾櫙鑹� */ + border-top: 1px solid #e9ecef; /* 椤堕儴杈规 */ + z-index: 1000; /* 纭繚鍦ㄦ渶涓婂眰 */ + box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); /* 椤堕儴闃村奖 */ } .action-btn { @@ -2062,9 +2070,14 @@ /* 灏忓昂瀵告寜閽牱寮� */ .action-btn.small { - padding: 8px 12px; - font-size: 12px; - min-height: 36px; + padding: 10px 12px; + font-size: 14px; + min-height: 44px; + white-space: nowrap; + flex-shrink: 0; + min-width: 80px; + max-width: 120px; + flex: 1; } /* 鍘熸湁鎸夐挳鏍峰紡淇濇寔鍏煎 */ @@ -2527,12 +2540,27 @@ } .bottom-action-buttons { - flex-direction: column; - align-items: stretch; + flex-direction: row; + align-items: center; + justify-content: center; + padding: 8px; + gap: 6px; + position: fixed; /* 淇濇寔鍥哄畾鍦ㄥ睆骞曞簳閮� */ + bottom: 0; + left: 0; + right: 0; + background-color: #fff; + border-top: 1px solid #e9ecef; + z-index: 1000; + box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); } - .action-btn { - width: 100%; + .action-btn.small { + min-width: 70px; + max-width: 100px; + padding: 8px 10px; + font-size: 13px; + min-height: 40px; } .inspection-table table { diff --git a/pages/QC/XJ/Add.vue b/pages/QC/XJ/Add.vue index f152e1e..7140538 100644 --- a/pages/QC/XJ/Add.vue +++ b/pages/QC/XJ/Add.vue @@ -24,10 +24,18 @@ <view class="info-value">{{ formData.createDate }}</view> </view> <view class="info-item"> + <view class="info-label">鐢熶骇杞﹂棿</view> + <picker v-if="isUpdate" class="picker-input" name="selector" :range="departmentList" range-key="departmentname" + @change="onDepartmentChange"> + <view class="picker-value">{{ getSelectedDepartmentName() || '璇烽�夋嫨杞﹂棿' }}</view> + </picker> + <view v-else class="info-value">{{ WORKSHOP }}</view> + </view> + <view class="info-item"> <view class="info-label">绾夸綋缂栧彿</view> - <picker v-if="isUpdate" class="picker-input" name="selector" :range="DAA020List" + <picker v-if="isUpdate" class="picker-input" name="selector" :range="filteredDAA020List" @change="onDaa020Change"> - <view class="picker-value">{{ DAA020List[DAA020Index] || '璇烽�夋嫨' }}</view> + <view class="picker-value">{{ filteredDAA020List[DAA020Index] || '璇烽�夋嫨' }}</view> </picker> <view v-else class="info-value">{{ formData.daa020 }}</view> </view> @@ -163,6 +171,7 @@ DAA020List: [], DAA020Index: -1, + filteredDAA020List: [], DAA001List: [], DAA001Index: -1, @@ -186,6 +195,11 @@ remarks: "", remarksPopup: false, + + // 閮ㄩ棬閫夋嫨鐩稿叧 + departmentList: [], + selectedDepartment: '', + WORKSHOP: '', }; }, onLoad(options) { @@ -215,7 +229,11 @@ }).then(res => { this.lineList = res.data.tbBillList; this.DAA020List = res.data.tbBillList.map(item => item.lineName); + this.filteredDAA020List = this.DAA020List; // 鍒濆鏃舵樉绀烘墍鏈夌嚎浣� }) + + // 鑾峰彇閮ㄩ棬鍒楄〃 + this.loadDepartments(); } }, methods: { @@ -283,6 +301,81 @@ this.isUpdate = false; }); }, + + // 鍔犺浇閮ㄩ棬鍒楄〃 + loadDepartments() { + this.$post({ + url: "/XJ/getDepartmentsWithLines" + }).then(res => { + if (res.status === 0) { + this.departmentList = res.data.tbBillList; + } else { + this.$showMessage("鑾峰彇閮ㄩ棬鍒楄〃澶辫触"); + } + }); + }, + + // 閮ㄩ棬閫夋嫨鍙樺寲澶勭悊 + onDepartmentChange(e) { + const index = e.detail.value; + if (index >= 0 && index < this.departmentList.length) { + const selectedDept = this.departmentList[index]; + this.selectedDepartment = selectedDept.departmentid; + this.WORKSHOP = selectedDept.departmentname; + + // 鏍规嵁閫変腑鐨勯儴闂ㄨ繃婊ょ嚎浣撳垪琛� + this.filterLinesByDepartment(selectedDept.departmentid); + + // 淇濆瓨閮ㄩ棬閫夋嫨 + this.saveDepartmentSelection(); + } + }, + + // 鑾峰彇閫変腑鐨勯儴闂ㄥ悕绉� + getSelectedDepartmentName() { + if (!this.selectedDepartment) return ''; + const dept = this.departmentList.find(item => item.departmentid === this.selectedDepartment); + return dept ? dept.departmentname : ''; + }, + + // 淇濆瓨閮ㄩ棬閫夋嫨 + saveDepartmentSelection() { + if (this.formData.id && this.selectedDepartment) { + this.$post({ + url: "/XJ/saveDepartmentSelection", + data: { + id: this.formData.id, + departmentId: this.selectedDepartment, + departmentName: this.WORKSHOP + } + }).then(res => { + if (res.status === 0) { + this.$showMessage("閮ㄩ棬閫夋嫨宸蹭繚瀛�"); + } + }); + } + }, + + // 鏍规嵁閮ㄩ棬杩囨护绾夸綋鍒楄〃 + filterLinesByDepartment(departmentId) { + this.$post({ + url: "/XJ/getLinesByDepartment", + data: { + departmentId: departmentId + } + }).then(res => { + if (res.status === 0) { + this.filteredDAA020List = res.data.tbBillList.map(item => item.lineName); + this.lineList = res.data.tbBillList; + // 閲嶇疆绾夸綋閫夋嫨绱㈠紩 + this.DAA020Index = -1; + this.formData.daa020 = ''; + } else { + this.$showMessage("鑾峰彇绾夸綋鍒楄〃澶辫触"); + } + }); + }, + //鐢熶骇绾垮埆閫夋嫨骞跺垵濮嬭瘽宸ュ崟鍙� onDaa020Change(event) { //鑾峰彇鐢熶骇绾垮埆鐨勪笅鏍囧湴鍧� diff --git a/store/index.js b/store/index.js index d50ed24..3fb8f02 100644 --- a/store/index.js +++ b/store/index.js @@ -10,9 +10,9 @@ networkFlag:'鍐呯綉', serverURLInt:'http://192.168.11.251:10055',//鏈嶅姟鍣ㄤ綋妫� 10.0.1.104:10054 serverURL:'http://localhost:10055',//鏈湴璋冭瘯鍦板潃 - //serverAPI:'http://localhost:5184/api',//褰撳墠姝e湪浣跨敤鐨勬湇鍔″櫒,榛樿涓哄缃� localhost + serverAPI:'http://localhost:5184/api',//褰撳墠姝e湪浣跨敤鐨勬湇鍔″櫒,榛樿涓哄缃� localhost //serverAPI:'http://192.168.1.22:10054/api',//鍐呯綉 - serverAPI:'http://36.26.21.214:10055/api', + //serverAPI:'http://36.26.21.214:10055/api', ftpServer:'ftp://36.26.21.214',//FTP鏈嶅姟鍣ㄥ湴鍧� } }, -- Gitblit v1.9.3