| | |
| | | <view class="search-input"> |
| | | <up-input class="search-text" |
| | | v-model="queryParams.name" |
| | | placeholder="请输入工序名称" |
| | | placeholder="请输入部件名称" |
| | | clearable |
| | | @change="handleSearch" /> |
| | | </view> |
| | |
| | | <up-divider></up-divider> |
| | | <view class="item-details"> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">部件类型</text> |
| | | <text class="detail-value">{{ item.processType || "-" }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">关联设备</text> |
| | | <text class="detail-value">{{ getDeviceName(item.deviceLedgerId) }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">工资定额</text> |
| | | <text class="detail-value highlight">¥{{ item.salaryQuota || 0 }}</text> |
| | | <text class="detail-label">计划工时</text> |
| | | <text class="detail-value highlight">{{ item.salaryQuota || 0 }}小时</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">工序状态</text> |
| | | <view class="detail-value"> |
| | | <up-tag :text="item.isQuality ? '质检' : '非质检'" |
| | | :type="item.isQuality ? 'warning' : 'info'" |
| | | size="mini" |
| | | style="margin-left: 8rpx" /> |
| | | <up-tag :text="item.isProduction ? '生产' : '不生产'" |
| | | :type="item.isProduction ? 'warning' : 'info'" |
| | | size="mini" |
| | | style="margin-left: 8rpx" /> |
| | | <up-tag v-if="item.type !== null && item.type !== undefined" |
| | | :text="item.type == 0 ? '计时' : '计件'" |
| | | :type="item.type == 1 ? 'primary' : 'success'" |
| | | size="mini" |
| | | style="margin-left: 8rpx" /> |
| | | </view> |
| | | <text class="detail-label">计划人员</text> |
| | | <text class="detail-value">{{ getEmployeeName(item.planPerson) }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">计划执行人员</text> |
| | | <text class="detail-value">{{ getEmployeeName(item.executor) }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">备注</text> |
| | | <text class="detail-value">{{ item.remark || "-" }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="status-tags"> |
| | | <up-tag :text="item.isQuality ? '质检' : '非质检'" |
| | | :type="item.isQuality ? 'warning' : 'info'" |
| | | size="mini" /> |
| | | <up-tag :text="item.isProduction ? '生产' : '不生产'" |
| | | :type="item.isProduction ? 'warning' : 'info'" |
| | | size="mini" |
| | | style="margin-left: 8rpx" /> |
| | | </view> |
| | | <view class="action-buttons"> |
| | | <up-button class="action-btn" |
| | |
| | | </view> |
| | | <view v-else |
| | | class="no-data"> |
| | | <text>暂无工序数据</text> |
| | | <text>暂无部件数据</text> |
| | | </view> |
| | | <view class="fab-button" |
| | | @click="goAdd"> |
| | |
| | | del, |
| | | getDeviceLedger, |
| | | } from "@/api/productionManagement/processManagement"; |
| | | import { staffOnJobListPage } from "@/api/personnelManagement/onboarding"; |
| | | |
| | | const queryParams = reactive({ |
| | | name: "", |
| | | }); |
| | | const list = ref([]); |
| | | const deviceOptions = ref([]); |
| | | const employeeOptions = ref([]); |
| | | const pageStatus = ref("loadmore"); |
| | | |
| | | const page = reactive({ |
| | |
| | | return device?.deviceName || "未关联"; |
| | | }; |
| | | |
| | | const getEmployeeName = employeeId => { |
| | | if (!employeeId) return "未指定"; |
| | | const emp = employeeOptions.value.find(item => item.id === Number(employeeId)); |
| | | return emp?.staffName || "未指定"; |
| | | }; |
| | | |
| | | const loadDevices = async () => { |
| | | try { |
| | | const { data } = await getDeviceLedger(); |
| | | deviceOptions.value = data || []; |
| | | } catch (error) { |
| | | console.error("加载设备列表失败", error); |
| | | } |
| | | }; |
| | | |
| | | const loadEmployees = async () => { |
| | | try { |
| | | const res = await staffOnJobListPage({ current: -1, size: -1, staffState: 1 }); |
| | | employeeOptions.value = res.data?.records || []; |
| | | } catch (error) { |
| | | console.error("加载员工列表失败", error); |
| | | } |
| | | }; |
| | | |
| | |
| | | }); |
| | | |
| | | onShow(async () => { |
| | | await loadDevices(); |
| | | await Promise.all([loadDevices(), loadEmployees()]); |
| | | handleSearch(); |
| | | }); |
| | | </script> |
| | |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .status-tags { |
| | | display: flex; |
| | | align-items: center; |
| | | padding-bottom: 16rpx; |
| | | } |
| | | |
| | | .action-buttons { |
| | | display: flex; |
| | | justify-content: flex-end; |