| | |
| | | color="#999"></up-icon> |
| | | </view> |
| | | </view> |
| | | <!-- 设备筛选 --> |
| | | <view class="device-filter" |
| | | @click="openDeviceFilter"> |
| | | <text :class="{ placeholder: !searchForm.deviceName }">{{ searchForm.deviceName || "全部设备" }}</text> |
| | | <up-icon name="arrow-down" |
| | | size="14" |
| | | color="#999"></up-icon> |
| | | </view> |
| | | </view> |
| | | <!-- 列表区域 --> |
| | | <scroll-view scroll-y |
| | |
| | | <view class="detail-row"> |
| | | <text class="detail-label">报工人员</text> |
| | | <text class="detail-value highlight">{{ item.nickName || '-' }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">使用设备</text> |
| | | <text class="detail-value">{{ item.deviceName || "-" }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">工时(h)</text> |
| | |
| | | text="暂无参数数据" /> |
| | | </view> |
| | | </up-modal> |
| | | <!-- 设备筛选 --> |
| | | <up-action-sheet :show="showDeviceSheet" |
| | | :actions="deviceOptions" |
| | | title="选择设备" |
| | | @select="selectDevice" |
| | | @close="showDeviceSheet = false" /> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | productionProductInputListPage, |
| | | } from "@/api/productionManagement/productionProductMain.js"; |
| | | import PageHeader from "@/components/PageHeader.vue"; |
| | | import { getDeviceLedger } from "@/api/equipmentManagement/ledger"; |
| | | import modal from "@/plugins/modal"; |
| | | |
| | | const tableData = ref([]); |
| | |
| | | |
| | | const searchForm = reactive({ |
| | | keyword: "", |
| | | deviceId: "", |
| | | deviceName: "", |
| | | }); |
| | | |
| | | // 设备筛选 |
| | | const showDeviceSheet = ref(false); |
| | | const deviceOptions = ref([ |
| | | { name: "全部设备", value: "" }, |
| | | ]); |
| | | |
| | | const loadDevices = async () => { |
| | | if (deviceOptions.value.length > 1) return; |
| | | try { |
| | | const { data } = await getDeviceLedger(); |
| | | const rows = Array.isArray(data) ? data : data?.records || []; |
| | | deviceOptions.value = [ |
| | | { name: "全部设备", value: "" }, |
| | | ...rows.map(item => ({ |
| | | name: item.deviceName || item.name || "-", |
| | | value: item.id, |
| | | })), |
| | | ]; |
| | | } catch (error) { |
| | | console.error("加载设备列表失败:", error); |
| | | } |
| | | }; |
| | | |
| | | const openDeviceFilter = () => { |
| | | loadDevices(); |
| | | showDeviceSheet.value = true; |
| | | }; |
| | | |
| | | const selectDevice = e => { |
| | | searchForm.deviceId = e.value; |
| | | searchForm.deviceName = e.value ? e.name : ""; |
| | | showDeviceSheet.value = false; |
| | | handleQuery(); |
| | | }; |
| | | |
| | | // 投入详情相关 |
| | | const inputVisible = ref(false); |
| | |
| | | current: page.current, |
| | | size: page.size, |
| | | workOrderNo: searchForm.keyword, |
| | | deviceId: searchForm.deviceId || undefined, |
| | | }; |
| | | |
| | | productionProductMainListPage(params) |
| | |
| | | height: 0; |
| | | } |
| | | |
| | | .device-filter { |
| | | margin-top: 12px; |
| | | height: 40px; |
| | | background: #f5f5f5; |
| | | border-radius: 8px; |
| | | padding: 0 12px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | font-size: 14px; |
| | | color: #333; |
| | | |
| | | .placeholder { |
| | | color: #999; |
| | | } |
| | | } |
| | | |
| | | .ledger-item { |
| | | .item-header { |
| | | .item-tag { |