| | |
| | | <view class="work-order"> |
| | | <!-- 通用页面头部 --> |
| | | <PageHeader title="生产工单" @back="goBack" /> |
| | | |
| | | |
| | | <!-- 搜索区域 --> |
| | | <view class="search-section"> |
| | | <view class="search-bar"> |
| | |
| | | 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"> |
| | |
| | | <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"> |
| | |
| | | <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> |
| | |
| | | </view> |
| | | <up-loadmore :status="loadStatus" /> |
| | | </scroll-view> |
| | | |
| | | |
| | | <view v-else-if="!loading" class="no-data"> |
| | | <up-empty mode="data" text="暂无工单数据"></up-empty> |
| | | </view> |
| | |
| | | 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 { |
| | |
| | | gap: 10px; |
| | | padding: 12px 0; |
| | | border-top: 1px solid #f5f5f5; |
| | | |
| | | |
| | | :deep(.up-button) { |
| | | margin: 0; |
| | | width: auto; |
| | |
| | | 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; |
| | |
| | | border-radius: 8px; |
| | | margin-bottom: 15px; |
| | | } |
| | | |
| | | |
| | | .qr-info { |
| | | font-size: 14px; |
| | | color: #666; |