From 3b44cd2e2d2527b224472124651031e3f25dea2c Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期四, 16 十月 2025 11:01:34 +0800
Subject: [PATCH] 表格修改
---
components/WorkOrderPrint.vue | 134 ++++++++++++++++++++++++++++++++++++++------
1 files changed, 115 insertions(+), 19 deletions(-)
diff --git a/components/WorkOrderPrint.vue b/components/WorkOrderPrint.vue
index 9a67d72..3f8d854 100644
--- a/components/WorkOrderPrint.vue
+++ b/components/WorkOrderPrint.vue
@@ -87,8 +87,106 @@
</view>
</view>
- <!-- 鍏朵綑妯℃澘淇濇寔鍘熸牱 -->
- <!-- ... -->
+ <view class="flex-row gap-lg">
+ <view class="print-section flex-grow">
+ <view class="barcode-info">
+ <view class="user-select">
+ <text>涓嶈壇鏁伴噺锛�</text>
+ <input v-model="customAmount" class="inp bad-input" placeholder="璇疯緭鍏ユ暟閲�" />
+ </view>
+ <view class="user-select">
+ <button class="details-btn" @click="confirmCustomAmount">纭鎻愪氦</button>
+ </view>
+ </view>
+ </view>
+
+ <view class="current-user-section fill-width">
+ <text>褰撳墠鎶ュ伐浜猴細</text>
+ <text class="current-user-name">{{ staffDisplay || '鏈�夋嫨' }}</text>
+ <button class="select-user-btn" @click="isShowUserSelect = true">閫変汉</button>
+ </view>
+ </view>
+
+ <!-- 閫変汉寮圭獥 -->
+ <view v-if="isShowUserSelect" class="overlay">
+ <view class="popup user-select-popup">
+ <!-- 鎼滅储鏍� -->
+ <view class="user-search-bar">
+ <input v-model.trim="userSearch"
+ type="text"
+ class="user-search-input"
+ placeholder="杈撳叆宸ュ彿鎴栧鍚嶆悳绱�"
+ @keydown.enter.prevent />
+ <button v-if="userSearch" class="user-search-clear" @click="userSearch=''">娓呯┖</button>
+ <view class="user-search-info">
+ 鍖归厤锛歿{ filteredUsers.length }} / {{ users.length }}
+ </view>
+ </view>
+ <view class="user-list-scroll">
+ <template v-if="filteredUsers.length">
+ <view class="user-list-grid">
+ <button v-for="(u, index) in filteredUsers"
+ :key="index"
+ :class="['user-list-btn', {'selected': u===staffNo}]"
+ @click="selectUser(u)">
+ <span class="user-code">{{ u.split(':')[0] }}</span>
+ <span class="user-name">{{ u.split(':')[1] }}</span>
+ </button>
+ </view>
+ </template>
+ <view v-else class="no-user-result">
+ 鏈壘鍒板尮閰嶄汉鍛�
+ </view>
+ </view>
+ <view class="user-popup-footer">
+ <button class="clean-btn wide-btn" @click="isShowUserSelect = false">鍏抽棴</button>
+ </view>
+ </view>
+ </view>
+
+ <view class="bottom-section">
+ <button class="save-btn" @click="save">淇濆瓨骞剁敓鏁�</button>
+ <button class="cancel-btn" @click="cancel">鍙栨秷</button>
+ </view>
+
+ <!-- 淇濈暀鏃у脊绐� -->
+ <view v-if="isShow" class="overlay">
+ <view class="popup">
+ <view class="bottom-section1">
+ <button class="clean-btn" type="warn" @click="deleteBarcode">鍏抽棴</button>
+ </view>
+ <view class="reason-section">
+ <text>鎶ュ伐浜猴細</text>
+ <view class="reason-buttons">
+ <button v-for="(u,index) in users" :key="index"
+ :class="{'reason-btn':true,'selected': user===u}"
+ @click="toggleUser(u)">
+ {{ formatUser(u) }}
+ </button>
+ </view>
+ </view>
+ </view>
+ </view>
+
+ <view v-if="barcodeIsShow" class="overlay">
+ <view class="popup">
+ <uni-table ref="table" border stripe emptyText="鏆傛棤鏇村鏁版嵁" class="table1">
+ <uni-tr>
+ <uni-th align="center" style="font-size:40px;">鐢熸垚鏃堕棿</uni-th>
+ <uni-th align="center" style="width:39%;font-size:40px;">鏉$爜</uni-th>
+ <uni-th align="center" style="font-size:40px;">鎶ュ伐浜�</uni-th>
+ <uni-th align="center" style="font-size:40px;">鎶ュ伐鏁伴噺</uni-th>
+ </uni-tr>
+ <uni-tr v-for="(item,index) in reportingList" :key="index">
+ <uni-td align="center"><input type="text" v-model="item.bgDate" style="width:26vh;" /></uni-td>
+ <uni-td align="center"><input v-model="item.itemNoCade" style="width:40vh;" /></uni-td>
+ <uni-td align="center"><input v-model="item.staffName" /></uni-td>
+ <uni-td align="center"><input v-model="item.okQty" /></uni-td>
+ </uni-tr>
+ </uni-table>
+ <view><button class="clean-btn" type="warn" @click="barcodeIsShow=false">鍏抽棴</button></view>
+ </view>
+ </view>
</view>
</view>
</template>
@@ -194,10 +292,9 @@
/* 鏂板锛氳幏鍙栧巻鍙叉姤宸ヨ褰� */
getReportingHistory() {
if (!this.orderNo) { this.reportingHistory = []; return; }
- this.$post({
- // 鍚庣闇�瑕佹彁渚涙寜 BILL_NO 鏌ヨ鐨勬帴鍙o紝绀轰緥璺緞锛�
- url: "/MesReporting/GetByBillNo",
- data: { billNo: this.orderNo }
+ this.$post({
+ url: "/Womdaa/GetByBillNoBG",
+ data: { billNo: this.orderNo, machineNo: this.machineNo || null }
}).then(res => {
const list = res?.data?.tbBillList || res?.data || [];
this.reportingHistory = list.map(r => {
@@ -213,8 +310,7 @@
productionCount: r.productionCount ?? r.todayOutput ?? 0,
totalProduction: r.kgQty ?? r.totalProduction ?? 0,
good: r.sQuantity ?? r.okQty ?? 0,
- defective: (r.defectiveQty ??
- ((r.kgQty ?? r.totalProduction ?? 0) - (r.sQuantity ?? r.okQty ?? 0)))
+ defective: r.ngQty
}
});
}).catch(() => { this.reportingHistory = []; });
@@ -340,18 +436,18 @@
</script>
<style scoped>
- /* 鍘熸牱寮忎繚鎸侊紝鏂板鍑犺杈呭姪鏍峰紡 */
- .report-table .summary-row {
- background: #f0f8ff;
- font-weight: 600;
- }
+ /* 鍘熸牱寮忎繚鎸侊紝鏂板鍑犺杈呭姪鏍峰紡 */
+ .report-table .summary-row {
+ background: #f0f8ff;
+ font-weight: 600;
+ }
- .report-table .no-data {
- text-align: center;
- color: #777;
- font-size: 14px;
- }
- /* 鍏朵綑鏍峰紡淇濇寔涓嶅彉 */
+ .report-table .no-data {
+ text-align: center;
+ color: #777;
+ font-size: 14px;
+ }
+ /* 鍏朵綑鏍峰紡淇濇寔涓嶅彉 */
.page {
padding: 1.2vh 2vw;
--
Gitblit v1.9.3