| | |
| | | <el-radio-button :value="'waiting'">待开始({{ orderProgressMeta.waitingCount }})</el-radio-button> |
| | | <el-radio-button :value="'inProgress'">进行中({{ orderProgressMeta.inProgressCount }})</el-radio-button> |
| | | <el-radio-button :value="'completed'">已完成({{ orderProgressMeta.completedCount }})</el-radio-button> |
| | | <el-radio-button :value="'paused'">已暂停({{ orderProgressMeta.pausedCount }})</el-radio-button> |
| | | <el-radio-button :value="'end'">已结束({{ orderProgressMeta.endCount }})</el-radio-button> |
| | | </el-radio-group> |
| | | </div> |
| | | <div class="order-table-wrap"> |
| | |
| | | <div v-if="visiblePanels.todo" class="cockpit-panel todo-panel"> |
| | | <div class="panel-title-row"> |
| | | <div class="panel-title">待办事项</div> |
| | | <span class="panel-more">更多</span> |
| | | <span class="panel-more" @click="openTodoDialog">更多</span> |
| | | </div> |
| | | <ul class="todo-list" v-if="todoList.length > 0"> |
| | | <li v-for="item in todoList" :key="item.id" class="todo-item"> |
| | |
| | | <div v-if="visiblePanels.realtime" class="cockpit-panel realtime-panel"> |
| | | <div class="panel-title-row"> |
| | | <div class="panel-title">生产实时看板</div> |
| | | <span class="panel-more">更多</span> |
| | | </div> |
| | | <div class="realtime-grid"> |
| | | <div class="realtime-item" v-for="item in realtimeBoard" :key="item.key"> |
| | |
| | | <el-button type="primary" @click="handleProcessDialogConfirm">确认</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <el-dialog v-model="todoDialogVisible" title="全部待办事项" width="900px" append-to-body destroy-on-close> |
| | | <div v-loading="todoDialogLoading" class="todo-dialog-body"> |
| | | <el-table :data="todoDialogList" stripe max-height="520"> |
| | | <el-table-column prop="approveId" label="待办编号" min-width="160" /> |
| | | <el-table-column prop="approveDeptName" label="部门/模板" min-width="160" /> |
| | | <el-table-column prop="approveReason" label="事由" min-width="240" show-overflow-tooltip /> |
| | | <el-table-column prop="approveUserName" label="发起人" min-width="120" /> |
| | | <el-table-column prop="approveTime" label="时间" min-width="170" /> |
| | | </el-table> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | waitingCount: 0, |
| | | inProgressCount: 0, |
| | | completedCount: 0, |
| | | pausedCount: 0, |
| | | endCount: 0, |
| | | }); |
| | | |
| | | const todayPlanList = ref([]); |
| | | const todayPlanTotal = ref(0); |
| | | const todoDialogVisible = ref(false); |
| | | const todoDialogLoading = ref(false); |
| | | const todoDialogList = ref([]); |
| | | |
| | | const sum = ref(0); |
| | | const yny = ref(0); |
| | |
| | | |
| | | const productionOrders = ref([]); |
| | | |
| | | const orderFilterOptions = ["all", "waiting", "inProgress", "completed", "paused"]; |
| | | const orderFilterOptions = ["all", "waiting", "inProgress", "completed", "end"]; |
| | | const orderFilterAliasMap = { |
| | | 1: "waiting", |
| | | 2: "inProgress", |
| | | 3: "completed", |
| | | 4: "paused", |
| | | 5: "end", |
| | | }; |
| | | const orderFilter = ref("all"); |
| | | const filteredOrders = computed(() => productionOrders.value); |
| | |
| | | 1: "待开始", |
| | | 2: "进行中", |
| | | 3: "已完成", |
| | | 4: "已暂停", |
| | | 5: "已结束", |
| | | }; |
| | | return mapping[status] || "未知"; |
| | | }; |
| | |
| | | waitingCount: resolveProgressCount(data.waitingCount, statusValue, "waiting", total), |
| | | inProgressCount: resolveProgressCount(data.inProgressCount, statusValue, "inProgress", total), |
| | | completedCount: resolveProgressCount(data.completedCount, statusValue, "completed", total), |
| | | pausedCount: resolveProgressCount(data.pausedCount, statusValue, "paused", total), |
| | | endCount: resolveProgressCount(data.endCount, statusValue, "end", total), |
| | | }; |
| | | productionOrders.value = (data.records || []).map(mapOrderProgressRecord); |
| | | } catch { |
| | |
| | | waitingCount: 0, |
| | | inProgressCount: 0, |
| | | completedCount: 0, |
| | | pausedCount: 0, |
| | | endCount: 0, |
| | | }; |
| | | productionOrders.value = []; |
| | | } |
| | |
| | | const refreshTodayProductionPlan = async () => { |
| | | try { |
| | | const res = await todayProductionPlan({ |
| | | limit: 4, |
| | | limit: 1000, |
| | | planDate: nowDate.value, |
| | | }); |
| | | const data = res?.data || {}; |
| | |
| | | const todoInfoS = async () => { |
| | | const res = await homeTodos(); |
| | | todoList.value = res.data || []; |
| | | }; |
| | | |
| | | const openTodoDialog = async () => { |
| | | todoDialogVisible.value = true; |
| | | todoDialogLoading.value = true; |
| | | try { |
| | | const res = await homeTodos(); |
| | | todoDialogList.value = res.data || []; |
| | | } catch { |
| | | todoDialogList.value = []; |
| | | } finally { |
| | | todoDialogLoading.value = false; |
| | | } |
| | | }; |
| | | |
| | | const statisticsReceivable = async () => { |
| | |
| | | font-size: 14px; |
| | | color: #2563eb; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .todo-dialog-body { |
| | | min-height: 220px; |
| | | } |
| | | |
| | | .plan-panel { |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .plan-list { |
| | | margin: 10px 0 0; |
| | | padding: 0 4px 0 0; |
| | | list-style: none; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 8px; |
| | | max-height: 300px; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .plan-list::-webkit-scrollbar { |
| | | width: 6px; |
| | | } |
| | | |
| | | .plan-list::-webkit-scrollbar-thumb { |
| | | border-radius: 999px; |
| | | background: rgba(37, 99, 235, 0.28); |
| | | } |
| | | |
| | | .todo-list { |
| | |
| | | transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; |
| | | } |
| | | |
| | | .plan-panel { |
| | | min-height: 236px; |
| | | } |
| | | |
| | | .quality-panel { |
| | | min-height: 0; |
| | | } |
| | | |
| | | .receipt-panel { |
| | | min-height: 340px; |
| | | } |
| | | |
| | | .plan-list { |
| | | margin: 10px 0 0; |
| | | padding: 0; |
| | | list-style: none; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .plan-item { |