From 69cd60158fbbd2be590a2f08c1997586cb1b5131 Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期一, 25 五月 2026 10:27:39 +0800
Subject: [PATCH] feat (production)报工页面直接取消审批人、报工页面添加成品名称finalProductModel
---
src/pages/productionManagement/productionReport/index.vue | 574 ++++++++++++++++++++++++++-------------------------
src/pages/productionManagement/workOrder/index.vue | 42 ++-
2 files changed, 317 insertions(+), 299 deletions(-)
diff --git a/src/pages/productionManagement/productionReport/index.vue b/src/pages/productionManagement/productionReport/index.vue
index 430ef2d..34a6c59 100644
--- a/src/pages/productionManagement/productionReport/index.vue
+++ b/src/pages/productionManagement/productionReport/index.vue
@@ -2,7 +2,7 @@
<view class="work-order">
<!-- 閫氱敤椤甸潰澶撮儴 -->
<PageHeader title="鐢熶骇鎶ュ伐" @back="goBack" />
-
+
<!-- 鎼滅储鍖哄煙 -->
<view class="search-section">
<view class="search-bar">
@@ -15,13 +15,13 @@
clearable
/>
</view>
-
+
<view class="filter-button" @click="handleQuery">
<up-icon name="search" size="24" color="#999"></up-icon>
</view>
</view>
</view>
-
+
<!-- 宸ュ崟鍒楄〃 -->
<scroll-view
scroll-y
@@ -30,7 +30,7 @@
lower-threshold="80"
@scrolltolower="loadMore"
>
- <view v-for="(item, index) in tableData" :key="item.id || index" class="ledger-item" @click="showTransferCard(item)">
+ <view v-for="(item, index) in tableData" :key="item.id || index" class="ledger-item">
<view class="item-header">
<view class="item-left">
<view class="document-icon">
@@ -42,16 +42,20 @@
<text class="item-tag tag-type">{{ item.workOrderType || '鏃�' }}</text>
</view>
</view>
-
+
<up-divider></up-divider>
-
+
<view class="item-details">
<view class="detail-row">
- <text class="detail-label">浜у搧鍚嶇О</text>
+ <text class="detail-label">鎴愬搧鍚嶇О</text>
+ <text class="detail-value">{{ item.finalProductModel || '鏃�' }}</text>
+ </view>
+ <view class="detail-row">
+ <text class="detail-label">鍔犲伐鍝佸悕绉�</text>
<text class="detail-value">{{ item.productName || '鏃�' }}</text>
</view>
<view class="detail-row">
- <text class="detail-label">瑙勬牸鍨嬪彿</text>
+ <text class="detail-label">鍔犲伐鍝佸瀷鍙�</text>
<text class="detail-value">{{ item.model || '鏃�' }}</text>
</view>
<view class="detail-row">
@@ -62,12 +66,12 @@
<text class="detail-label">闇�姹�/瀹屾垚鏁伴噺</text>
<text class="detail-value">{{ item.planQuantity || '鏃�' }} / {{ item.completeQuantity || '鏃�' }}</text>
</view>
-
+
<view class="progress-section">
<text class="detail-label">瀹屾垚杩涘害</text>
<view class="progress-bar">
- <up-line-progress
- :percentage="toProgressPercentage(item.completionStatus)"
+ <up-line-progress
+ :percentage="toProgressPercentage(item.completionStatus)"
activeColor="#2979ff"
:showText="true"
></up-line-progress>
@@ -87,13 +91,13 @@
</view>
<up-loadmore :status="loadStatus" />
</scroll-view>
-
+
<view v-else-if="!loading" class="no-data">
<up-empty mode="data" text="鏆傛棤宸ュ崟鏁版嵁"></up-empty>
</view>
- <!-- 娴佽浆鍗″脊绐� -->
- <up-popup :show="transferCardVisible" mode="center" @close="transferCardVisible = false" round="10">
+ <!-- 娴佽浆鍗″脊绐楋紙鎶ュ伐瀹℃牳璁板綍 - 宸茬鐢級 -->
+ <!-- <up-popup :show="transferCardVisible" mode="center" @close="transferCardVisible = false" round="10">
<view class="qr-popup">
<text class="qr-info" v-if="transferCardRowData">{{ transferCardRowData.workOrderNo || '-' }}</text>
<view class="transfer-records">
@@ -155,7 +159,7 @@
</view>
<up-button text="鍏抽棴" @click="transferCardVisible = false" style="margin-top: 20px;"></up-button>
</view>
- </up-popup>
+ </up-popup> -->
<!-- 鎶ュ伐寮圭獥 -->
<up-popup
@@ -178,7 +182,14 @@
</view>
</view>
- <scroll-view class="modal-content" scroll-y>
+ <scroll-view
+ class="modal-content"
+ scroll-y
+ :scroll-top="scrollTop"
+ :enhanced="true"
+ :bounces="false"
+ :show-scrollbar="true"
+ >
<!-- <view class="report-summary" v-if="endReportRow">
<view class="summary-left">
<text class="summary-title">{{ endReportRow.productName || '-' }}</text>
@@ -204,6 +215,9 @@
</up-form-item>
<up-form-item label="鎶ュ簾鏁伴噺">
<up-input v-model="endReportForm.scrapQty" type="number" placeholder="璇疯緭鍏�" />
+ </up-form-item>
+ <up-form-item label="鍔犳斁鏁�">
+ <up-input v-model="endReportForm.addQty" type="number" placeholder="璇疯緭鍏�" />
</up-form-item>
<up-form-item label="寮�濮嬫椂闂�" required>
<up-input
@@ -240,15 +254,6 @@
readonly
placeholder="璇烽�夋嫨(鍙閫�)"
@click="openTeamPicker"
- suffixIcon="arrow-down"
- />
- </up-form-item>
- <up-form-item label="瀹℃牳浜�" required>
- <up-input
- v-model="endReportForm.auditUserName"
- readonly
- placeholder="璇烽�夋嫨"
- @click="openAuditPicker"
suffixIcon="arrow-down"
/>
</up-form-item>
@@ -297,14 +302,7 @@
</view>
</up-popup>
- <!-- 瀹℃牳浜洪�夋嫨鍣� -->
- <up-action-sheet
- :show="auditPickerVisible"
- :actions="auditActions"
- title="閫夋嫨瀹℃牳浜�"
- @select="onAuditSelect"
- @close="auditPickerVisible = false"
- />
+ <!-- 鏈哄彴閫夋嫨鍣� -->
<up-action-sheet
:show="devicePickerVisible"
:actions="deviceActions"
@@ -349,30 +347,33 @@
const loading = ref(false);
const tableData = ref([]);
const loadStatus = ref('loadmore');
-const transferCardVisible = ref(false);
-const transferCardRowData = ref(null);
-const transferCardLoading = ref(false);
-const transferCardRecords = ref([]);
-const auditStatusOptions = ref([
- { label: "鏈鏍�", value: 0 },
- { label: "閫氳繃", value: 1 },
- { label: "涓嶉�氳繃", value: 2 },
-]);
-const transferRecordFields = [
- { label: "鎶ュ伐浜哄憳", prop: "teamNames", wide: true },
- { label: "瀹℃牳浜�", prop: "auditUserName" },
- { label: "鏈�缁堝鏍镐汉", prop: "sureAuditUserName" },
- { label: "宸ュ崟缂栧彿", prop: "workOrderNo" },
- { label: "璁㈠崟缂栧彿", prop: "salesContractNo" },
- { label: "浜у搧鍚嶇О", prop: "productName" },
- { label: "浜у搧瑙勬牸鍨嬪彿", prop: "productModelName" },
- { label: "浜у嚭鏁伴噺", prop: "quantity" },
- { label: "鎶ュ簾鏁伴噺", prop: "scrapQty" },
- { label: "鍗曚綅", prop: "unit" },
- { label: "瀹℃牳鐘舵��", prop: "auditStatus" },
- { label: "澶囨敞淇℃伅", prop: "auditOpinion", wide: true },
- { label: "鍒涘缓鏃堕棿", prop: "createTime", wide: true },
-];
+
+// 鎶ュ伐瀹℃牳璁板綍鐩稿叧 - 宸茬鐢�
+// const transferCardVisible = ref(false);
+// const transferCardRowData = ref(null);
+// const transferCardLoading = ref(false);
+// const transferCardRecords = ref([]);
+// const auditStatusOptions = ref([
+// { label: "鏈鏍�", value: 0 },
+// { label: "閫氳繃", value: 1 },
+// { label: "涓嶉�氳繃", value: 2 },
+// ]);
+// const transferRecordFields = [
+// { label: "鎶ュ伐浜哄憳", prop: "teamNames", wide: true },
+// { label: "瀹℃牳浜�", prop: "auditUserName" },
+// { label: "鏈�缁堝鏍镐汉", prop: "sureAuditUserName" },
+// { label: "宸ュ崟缂栧彿", prop: "workOrderNo" },
+// { label: "璁㈠崟缂栧彿", prop: "salesContractNo" },
+// { label: "浜у搧鍚嶇О", prop: "productName" },
+// { label: "浜у搧瑙勬牸鍨嬪彿", prop: "productModelName" },
+// { label: "浜у嚭鏁伴噺", prop: "quantity" },
+// { label: "鎶ュ簾鏁伴噺", prop: "scrapQty" },
+// { label: "鍗曚綅", prop: "unit" },
+// { label: "瀹℃牳鐘舵��", prop: "auditStatus" },
+// { label: "澶囨敞淇℃伅", prop: "auditOpinion", wide: true },
+// { label: "鍒涘缓鏃堕棿", prop: "createTime", wide: true },
+// ];
+
const workOrderFilesRef = ref(null);
const startSubmittingId = ref(null);
@@ -383,13 +384,12 @@
quantity: "",
replenishQty: "0",
scrapQty: "0",
+ addQty: "0",
deviceLedgerId: "",
deviceName: "",
teamList: [],
startTime: "",
endTime: "",
- auditUserId: "",
- auditUserName: "",
userId: "",
userName: "",
workOrderId: "",
@@ -399,8 +399,6 @@
});
const userOptions = ref([]);
-const auditPickerVisible = ref(false);
-const auditActions = computed(() => userOptions.value.map(u => ({ name: u.name, value: u.value })));
const deviceOptions = ref([]);
const devicePickerVisible = ref(false);
@@ -420,6 +418,7 @@
const endTimePickerVisible = ref(false);
const startTimeValue = ref(Date.now());
const endTimeValue = ref(Date.now());
+const scrollTop = ref(0);
const routeOrderRow = ref(null);
@@ -490,15 +489,15 @@
const getList = () => {
if (loading.value) return;
loading.value = true;
-
+
const params = { ...searchForm.value, ...page };
-
+
productWorkOrderPage(params).then((res) => {
loading.value = false;
const records = res.data.records || [];
tableData.value = page.current === 1 ? records : [...tableData.value, ...records];
page.total = res.data.total;
-
+
if (tableData.value.length >= page.total) {
loadStatus.value = 'nomore';
} else {
@@ -523,6 +522,14 @@
tableData.value = data ? [data] : [];
page.total = tableData.value.length;
loadStatus.value = 'nomore';
+
+ // 鎵爜杩涘叆鍚庤嚜鍔ㄦ墦寮�鎶ュ伐寮圭獥
+ if (data && routeOrderRow.value) {
+ // 绛夊緟鏁版嵁娓叉煋瀹屾垚鍚庢墦寮�鎶ュ伐寮圭獥
+ setTimeout(() => {
+ openEndReport(data);
+ }, 300);
+ }
} catch {
tableData.value = [];
showToast("鍔犺浇宸ュ崟澶辫触");
@@ -551,72 +558,73 @@
return Math.round(n);
};
-const getAuditStatusLabel = (val) => {
- const target = auditStatusOptions.value.find(item => Number(item.value) === Number(val));
- return target?.label || "鏈煡";
-};
+// 鎶ュ伐瀹℃牳璁板綍鐩稿叧鍑芥暟 - 宸茬鐢�
+// const getAuditStatusLabel = (val) => {
+// const target = auditStatusOptions.value.find(item => Number(item.value) === Number(val));
+// return target?.label || "鏈煡";
+// };
-const getAuditStatusType = (val) => {
- const typeMap = { 0: "info", 1: "success", 2: "danger" };
- return typeMap[Number(val)] || "default";
-};
+// const getAuditStatusType = (val) => {
+// const typeMap = { 0: "info", 1: "success", 2: "danger" };
+// return typeMap[Number(val)] || "default";
+// };
-const getTeamNameList = (val) => {
- if (!val) return [];
- return String(val)
- .split(",")
- .map(item => item.trim())
- .filter(Boolean);
-};
+// const getTeamNameList = (val) => {
+// if (!val) return [];
+// return String(val)
+// .split(",")
+// .map(item => item.trim())
+// .filter(Boolean);
+// };
-const formatTransferRecordValue = (record, prop) => {
- if (prop === "auditStatus") {
- return getAuditStatusLabel(record?.[prop]);
- }
+// const formatTransferRecordValue = (record, prop) => {
+// if (prop === "auditStatus") {
+// return getAuditStatusLabel(record?.[prop]);
+// }
- const value = record?.[prop];
- if (value === null || value === undefined || value === "") {
- return "-";
- }
+// const value = record?.[prop];
+// if (value === null || value === undefined || value === "") {
+// return "-";
+// }
- return String(value);
-};
+// return String(value);
+// };
-const getTransferCardParams = (row) => {
- const params = {
- current: 1,
- size: 100,
- };
+// const getTransferCardParams = (row) => {
+// const params = {
+// current: 1,
+// size: 100,
+// };
- if (row?.id != null) {
- params.workOrderId = row.id;
- }
- if (row?.workOrderNo) {
- params.workOrderNo = row.workOrderNo;
- }
- if (row?.productMainId != null) {
- params.productMainId = row.productMainId;
- }
+// if (row?.id != null) {
+// params.workOrderId = row.id;
+// }
+// if (row?.workOrderNo) {
+// params.workOrderNo = row.workOrderNo;
+// }
+// if (row?.productMainId != null) {
+// params.productMainId = row.productMainId;
+// }
- return params;
-};
+// return params;
+// };
-const showTransferCard = async (row) => {
- transferCardRowData.value = row;
- transferCardVisible.value = true;
- transferCardRecords.value = [];
- transferCardLoading.value = true;
+// const showTransferCard = async (row) => {
+// transferCardRowData.value = row;
+// transferCardVisible.value = true;
+// transferCardRecords.value = [];
+// transferCardLoading.value = true;
- try {
- const res = await getProductionProductMain(getTransferCardParams(row));
- transferCardRecords.value = res?.data?.records || res?.records || [];
- } catch {
- transferCardRecords.value = [];
- showToast("鍔犺浇鎶ュ伐瀹℃牳璁板綍澶辫触");
- } finally {
- transferCardLoading.value = false;
- }
-};
+// try {
+// const res = await getProductionProductMain(getTransferCardParams(row));
+// transferCardRecords.value = res?.data?.records || res?.records || [];
+// } catch {
+// transferCardRecords.value = [];
+// showToast("鍔犺浇鎶ュ伐瀹℃牳璁板綍澶辫触");
+// } finally {
+// transferCardLoading.value = false;
+// }
+// };
const getPendingQty = (row) => {
const plan = Number(row?.planQuantity) || 0;
@@ -713,6 +721,7 @@
endReportForm.quantity = String(getPendingQty(row));
endReportForm.replenishQty = "0";
endReportForm.scrapQty = "0";
+ endReportForm.addQty = "0";
endReportForm.deviceLedgerId = "";
endReportForm.deviceName = "";
endReportForm.teamList = [];
@@ -724,9 +733,6 @@
endReportForm.reportWork = row.reportWork;
endReportForm.productProcessRouteItemId = row.productProcessRouteItemId || "";
endReportForm.productMainId = row.productMainId ?? null;
-
- endReportForm.auditUserId = "";
- endReportForm.auditUserName = "";
endReportForm.startTime = row.startProductTime || "";
endReportForm.endTime = "";
@@ -751,17 +757,6 @@
const closeEndReport = () => {
endReportVisible.value = false;
endReportRow.value = null;
-};
-
-const openAuditPicker = async () => {
- await ensureUserOptions();
- auditPickerVisible.value = true;
-};
-
-const onAuditSelect = (e) => {
- endReportForm.auditUserId = String(e?.value ?? "");
- endReportForm.auditUserName = String(e?.name ?? "");
- auditPickerVisible.value = false;
};
const openDevicePicker = async () => {
@@ -806,10 +801,10 @@
const onEndTimeConfirm = (e) => {
const end = e.value;
- if (end <= startTimeValue.value) {
- showToast("缁撴潫鏃堕棿蹇呴』澶т簬寮�濮嬫椂闂�");
- return;
- }
+ // if (end <= startTimeValue.value) {
+ // showToast("缁撴潫鏃堕棿蹇呴』澶т簬寮�濮嬫椂闂�");
+ // return;
+ // }
endReportForm.endTime = formatDateTime(end);
endTimePickerVisible.value = false;
@@ -845,6 +840,13 @@
showToast("鎶ュ簾鏁伴噺蹇呴』涓哄ぇ浜庣瓑浜�0鐨勬暣鏁�");
return;
}
+
+ const addQty = endReportForm.addQty === "" ? 0 : Number(endReportForm.addQty);
+ if (!Number.isFinite(addQty) || !Number.isInteger(addQty) || addQty < 0) {
+ showToast("鍔犳斁鏁板繀椤讳负澶т簬绛変簬0鐨勬暣鏁�");
+ return;
+ }
+
if (!endReportForm.startTime) {
showToast("璇烽�夋嫨寮�濮嬫椂闂�");
return;
@@ -858,15 +860,10 @@
const start = new Date(endReportForm.startTime).getTime();
const end = new Date(endReportForm.endTime).getTime();
-if (end <= start) {
- showToast("缁撴潫鏃堕棿蹇呴』澶т簬寮�濮嬫椂闂�");
- return;
-}
-
- if (!endReportForm.auditUserId) {
- showToast("璇烽�夋嫨瀹℃牳浜�");
- return;
- }
+// if (end <= start) {
+// showToast("缁撴潫鏃堕棿蹇呴』澶т簬寮�濮嬫椂闂�");
+// return;
+// }
if (!endReportForm.deviceLedgerId) {
showToast("璇烽�夋嫨鏈哄彴");
@@ -882,10 +879,9 @@
quantity,
replenishQty,
scrapQty,
+ addQty,
userId: endReportForm.userId || userStore.id,
userName: endReportForm.userName || userStore.nickName,
- auditUserId: endReportForm.auditUserId,
- auditUserName: endReportForm.auditUserName,
deviceLedgerId: endReportForm.deviceLedgerId,
deviceName: endReportForm.deviceName,
};
@@ -959,7 +955,7 @@
gap: 10px;
padding: 12px 0;
border-top: 1px solid #f5f5f5;
-
+
:deep(.up-button) {
margin: 0;
width: auto;
@@ -995,134 +991,138 @@
font-size: 26rpx;
color: #666;
}
-.transfer-records {
- width: 100%;
- margin-top: 28rpx;
-}
-.transfer-records-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- gap: 16rpx;
- margin-bottom: 16rpx;
-}
-.transfer-records-title {
- font-size: 26rpx;
- font-weight: 600;
- color: #222;
-}
-.transfer-records-count {
- font-size: 22rpx;
- color: #8a8a8a;
-}
-.transfer-records-loading,
-.transfer-records-empty {
- padding: 28rpx 0;
- font-size: 24rpx;
- color: #8a8a8a;
- text-align: center;
-}
-.transfer-records-list {
- max-height: 500rpx;
- overflow: auto;
-}
-.transfer-record-item {
- padding: 20rpx 22rpx;
- border-radius: 16rpx;
- background: #f7f8fa;
-}
-.transfer-record-item + .transfer-record-item {
- margin-top: 16rpx;
-}
-.transfer-record-top {
- display: flex;
- justify-content: space-between;
- align-items: flex-start;
- gap: 24rpx;
-}
-.transfer-record-top-main {
- display: flex;
- flex-direction: column;
- gap: 8rpx;
- min-width: 0;
-}
-.transfer-record-no {
- font-size: 28rpx;
- font-weight: 600;
- color: #222;
- word-break: break-all;
-}
-.transfer-record-sub {
- font-size: 22rpx;
- color: #8a8a8a;
- word-break: break-all;
-}
-.transfer-record-grid {
- display: flex;
- flex-wrap: wrap;
- gap: 16rpx;
- margin-top: 18rpx;
-}
-.transfer-record-cell {
- width: 100%; // 鍘熸潵涓�琛屼袱涓� 鈫� 鏀规垚涓�琛屼竴涓�
-}
-.transfer-record-cell.is-wide {
- width: 100%;
-}
-.transfer-record-label {
- display: block;
- margin-bottom: 8rpx;
- font-size: 22rpx;
- color: #8a8a8a;
-}
-.transfer-record-content {
- min-height: 36rpx;
-}
-.transfer-record-value {
- display: block;
- font-size: 24rpx;
- color: #222;
- word-break: break-all;
-}
-.transfer-tag-list {
- display: flex;
- flex-wrap: wrap;
- gap: 10rpx;
-}
-.transfer-name-tag {
- padding: 6rpx 14rpx;
- border-radius: 999rpx;
- background: #e9f2ff;
- color: #2f6bff;
- font-size: 22rpx;
-}
-.audit-status-tag {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- min-height: 40rpx;
- padding: 0 16rpx;
- border-radius: 999rpx;
- font-size: 22rpx;
- box-sizing: border-box;
-}
-.audit-status-info {
- background: #edf1f5;
- color: #6b7280;
-}
-.audit-status-success {
- background: #e9f9ef;
- color: #16a34a;
-}
-.audit-status-danger {
- background: #feeeee;
- color: #dc2626;
-}
-.audit-status-default {
- background: #f4f4f5;
- color: #606266;
-}
+/* 鎶ュ伐瀹℃牳璁板綍鐩稿叧鏍峰紡 - 宸茬鐢� */
+// .transfer-records {
+// width: 100%;
+// margin-top: 28rpx;
+// }
+// .transfer-records-header {
+// display: flex;
+// justify-content: space-between;
+// align-items: center;
+// gap: 16rpx;
+// margin-bottom: 16rpx;
+// }
+// .transfer-records-title {
+// font-size: 26rpx;
+// font-weight: 600;
+// color: #222;
+// }
+
+/* 鎶ュ伐瀹℃牳璁板綍鐩稿叧鏍峰紡 - 宸茬鐢� */
+// .transfer-records-count {
+// font-size: 22rpx;
+// color: #8a8a8a;
+// }
+// .transfer-records-loading,
+// .transfer-records-empty {
+// padding: 28rpx 0;
+// font-size: 24rpx;
+// color: #8a8a8a;
+// text-align: center;
+// }
+// .transfer-records-list {
+// max-height: 500rpx;
+// overflow: auto;
+// }
+// .transfer-record-item {
+// padding: 20rpx 22rpx;
+// border-radius: 16rpx;
+// background: #f7f8fa;
+// }
+
+// .transfer-record-item + .transfer-record-item {
+// margin-top: 16rpx;
+// }
+// .transfer-record-top {
+// display: flex;
+// justify-content: space-between;
+// align-items: flex-start;
+// gap: 24rpx;
+// }
+// .transfer-record-top-main {
+// display: flex;
+// flex-direction: column;
+// gap: 8rpx;
+// min-width: 0;
+// }
+// .transfer-record-no {
+// font-size: 28rpx;
+// font-weight: 600;
+// color: #222;
+// word-break: break-all;
+// }
+// .transfer-record-sub {
+// font-size: 22rpx;
+// color: #8a8a8a;
+// word-break: break-all;
+// }
+// .transfer-record-grid {
+// display: flex;
+// flex-wrap: wrap;
+// gap: 16rpx;
+// margin-top: 18rpx;
+// }
+// .transfer-record-cell {
+// width: 100%;
+// }
+// .transfer-record-cell.is-wide {
+// width: 100%;
+// }
+// .transfer-record-label {
+// display: block;
+// margin-bottom: 8rpx;
+// font-size: 22rpx;
+// color: #8a8a8a;
+// }
+// .transfer-record-content {
+// min-height: 36rpx;
+// }
+// .transfer-record-value {
+// display: block;
+// font-size: 24rpx;
+// color: #222;
+// word-break: break-all;
+// }
+// .transfer-tag-list {
+// display: flex;
+// flex-wrap: wrap;
+// gap: 10rpx;
+// }
+// .transfer-name-tag {
+// padding: 6rpx 14rpx;
+// border-radius: 999rpx;
+// background: #e9f2ff;
+// color: #2f6bff;
+// font-size: 22rpx;
+// }
+// .audit-status-tag {
+// display: inline-flex;
+// align-items: center;
+// justify-content: center;
+// min-height: 40rpx;
+// padding: 0 16rpx;
+// border-radius: 999rpx;
+// font-size: 22rpx;
+// box-sizing: border-box;
+// }
+// .audit-status-info {
+// background: #edf1f5;
+// color: #6b7280;
+// }
+// .audit-status-success {
+// background: #e9f9ef;
+// color: #16a34a;
+// }
+// .audit-status-danger {
+// background: #feeeee;
+// color: #dc2626;
+// }
+// .audit-status-default {
+// background: #f4f4f5;
+// color: #606266;
+// }
.report-modal {
background: #fff;
@@ -1131,6 +1131,12 @@
flex-direction: column;
overflow: hidden;
}
+/* #ifdef H5 */
+.report-modal {
+ max-height: 85vh;
+ min-height: 60vh;
+}
+/* #endif */
.modal-header {
display: flex;
justify-content: space-between;
@@ -1164,7 +1170,15 @@
height: 0;
padding: 12px 12px 0;
background: #f7f8fa;
+ max-height: 60vh;
+ overflow-y: auto;
}
+/* #ifdef H5 */
+.modal-content {
+ max-height: 60vh;
+ -webkit-overflow-scrolling: touch;
+}
+/* #endif */
.modal-footer {
display: flex;
gap: 12px;
@@ -1252,13 +1266,13 @@
display: flex;
flex-direction: column;
align-items: center;
-
+
.qr-title {
font-size: 18px;
font-weight: bold;
margin-bottom: 20px;
}
-
+
.qr-box {
padding: 20px;
background-color: #fff;
@@ -1266,7 +1280,7 @@
border-radius: 8px;
margin-bottom: 15px;
}
-
+
.qr-info {
font-size: 14px;
color: #666;
diff --git a/src/pages/productionManagement/workOrder/index.vue b/src/pages/productionManagement/workOrder/index.vue
index aaba6b5..6e6f261 100644
--- a/src/pages/productionManagement/workOrder/index.vue
+++ b/src/pages/productionManagement/workOrder/index.vue
@@ -2,7 +2,7 @@
<view class="work-order">
<!-- 閫氱敤椤甸潰澶撮儴 -->
<PageHeader title="鐢熶骇宸ュ崟" @back="goBack" />
-
+
<!-- 鎼滅储鍖哄煙 -->
<view class="search-section">
<view class="search-bar">
@@ -15,13 +15,13 @@
clearable
/>
</view>
-
+
<view class="filter-button" @click="handleQuery">
<up-icon name="search" size="24" color="#999"></up-icon>
</view>
</view>
</view>
-
+
<!-- 宸ュ崟鍒楄〃 -->
<scroll-view scroll-y class="ledger-list" v-if="tableData.length > 0" @scrolltolower="loadMore">
<view v-for="(item, index) in tableData" :key="item.id || index" class="ledger-item">
@@ -36,16 +36,20 @@
<text class="item-tag tag-type">{{ item.workOrderType }}</text>
</view>
</view>
-
+
<up-divider></up-divider>
-
+
<view class="item-details">
<view class="detail-row">
- <text class="detail-label">浜у搧鍚嶇О</text>
+ <text class="detail-label">鎴愬搧鍚嶇О</text>
+ <text class="detail-value">{{ item.finalProductModel }}</text>
+ </view>
+ <view class="detail-row">
+ <text class="detail-label">鍔犲伐鍝佸悕绉�</text>
<text class="detail-value">{{ item.productName }}</text>
</view>
<view class="detail-row">
- <text class="detail-label">瑙勬牸鍨嬪彿</text>
+ <text class="detail-label">鍔犲伐鍝佸瀷鍙�</text>
<text class="detail-value">{{ item.model }}</text>
</view>
<view class="detail-row">
@@ -60,18 +64,18 @@
<text class="detail-label">闇�姹�/瀹屾垚鏁伴噺</text>
<text class="detail-value">{{ item.planQuantity }} / {{ item.completeQuantity }} {{ item.unit }}</text>
</view>
-
+
<view class="progress-section">
<text class="detail-label">瀹屾垚杩涘害</text>
<view class="progress-bar">
- <up-line-progress
- :percentage="toProgressPercentage(item.completionStatus)"
+ <up-line-progress
+ :percentage="toProgressPercentage(item.completionStatus)"
activeColor="#2979ff"
:showText="true"
></up-line-progress>
</view>
</view>
-
+
<view class="detail-row">
<text class="detail-label">璁″垝寮�濮�</text>
<text class="detail-value">{{ item.planStartTime }}</text>
@@ -84,7 +88,7 @@
</view>
<up-loadmore :status="loadStatus" />
</scroll-view>
-
+
<view v-else-if="!loading" class="no-data">
<up-empty mode="data" text="鏆傛棤宸ュ崟鏁版嵁"></up-empty>
</view>
@@ -152,15 +156,15 @@
const getList = () => {
if (loading.value) return;
loading.value = true;
-
+
const params = { ...searchForm.value, ...page };
-
+
productWorkOrderPage(params).then((res) => {
loading.value = false;
const records = res.data.records || [];
tableData.value = page.current === 1 ? records : [...tableData.value, ...records];
page.total = res.data.total;
-
+
if (tableData.value.length >= page.total) {
loadStatus.value = 'nomore';
} else {
@@ -232,7 +236,7 @@
gap: 10px;
padding: 12px 0;
border-top: 1px solid #f5f5f5;
-
+
:deep(.up-button) {
margin: 0;
width: auto;
@@ -245,13 +249,13 @@
display: flex;
flex-direction: column;
align-items: center;
-
+
.qr-title {
font-size: 18px;
font-weight: bold;
margin-bottom: 20px;
}
-
+
.qr-box {
padding: 20px;
background-color: #fff;
@@ -259,7 +263,7 @@
border-radius: 8px;
margin-bottom: 15px;
}
-
+
.qr-info {
font-size: 14px;
color: #666;
--
Gitblit v1.9.3