diff --git a/src/locales/en-US.js b/src/locales/en-US.js
index da128b1..97b8328 100644
--- a/src/locales/en-US.js
+++ b/src/locales/en-US.js
@@ -31,7 +31,7 @@ export default {
subtitle: 'Besure Digital Intelligent Control Platform',
functionNav: 'Function Navigation',
productionOverview: 'Production Overview',
- productionPlan: 'Production Plans',
+ productionPlan: 'Production Summary',
collapseList: 'Collapse',
viewMore: 'View More ›',
productName: 'Product',
@@ -90,6 +90,31 @@ export default {
saturday: 'Sat',
sunday: 'Sun'
},
+ taskList: {
+ taskType: 'Task Type',
+ orderDate: 'Order Date',
+ deliveryDate: 'Delivery Date',
+ totalNumber: 'Total',
+ planNumber: 'Planned',
+ unPlanNumber: 'Unplanned',
+ storedPlanNumber: 'Stored',
+ urgent: 'Urgent',
+ noData: 'No task data',
+ viewTask: 'View Task: {code}'
+ },
+ planList: {
+ taskCode: 'Task Code',
+ planCode: 'Plan Code',
+ employeeName: 'Reporter',
+ baogongNum: 'Reported',
+ passNum: 'Passed',
+ noPassNum: 'Failed',
+ passRate: 'Pass Rate',
+ baogongTime: 'Report Time',
+ reason: 'Reason',
+ noData: 'No report data',
+ viewDetail: 'View Detail: {code}'
+ },
functionCommon: {
search: 'Search',
cancel: 'Cancel',
diff --git a/src/locales/zh-CN.js b/src/locales/zh-CN.js
index 9ddfd75..3e6fc8a 100644
--- a/src/locales/zh-CN.js
+++ b/src/locales/zh-CN.js
@@ -31,7 +31,7 @@ export default {
subtitle: '必硕数字化智能中控平台',
functionNav: '功能导航',
productionOverview: '生产整体概况',
- productionPlan: '生产计划',
+ productionPlan: '生产概括',
collapseList: '收起列表',
viewMore: '查看更多 ›',
productName: '产品名称',
@@ -90,6 +90,31 @@ export default {
saturday: '周六',
sunday: '周日'
},
+ taskList: {
+ taskType: '任务类型',
+ orderDate: '下单日期',
+ deliveryDate: '交付日期',
+ totalNumber: '总数量',
+ planNumber: '已排产',
+ unPlanNumber: '未排产',
+ storedPlanNumber: '已入库',
+ urgent: '紧急',
+ noData: '暂无任务数据',
+ viewTask: '查看任务: {code}'
+ },
+ planList: {
+ taskCode: '任务编号',
+ planCode: '计划编号',
+ employeeName: '报工人',
+ baogongNum: '报工数',
+ passNum: '合格数',
+ noPassNum: '不合格数',
+ passRate: '合格率',
+ baogongTime: '报工时间',
+ reason: '原因',
+ noData: '暂无报工数据',
+ viewDetail: '查看详情: {code}'
+ },
functionCommon: {
search: '查询',
cancel: '取消',
diff --git a/src/pages.json b/src/pages.json
index eac24ff..09b4e83 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -510,6 +510,12 @@
"style": {
"navigationBarTitleText": "生产计划"
}
+ },
+ {
+ "path": "taskList/index",
+ "style": {
+ "navigationBarTitleText": "任务计划"
+ }
}
]
}
diff --git a/src/pages/index.vue b/src/pages/index.vue
index 81f20f6..f8286aa 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -69,14 +69,14 @@
+ :placeholder="t('dashboard.startDate')" :formatter="datetimeFormatter" closeOnClickOverlay
+ @confirm="onStartDateConfirm" @close="onPickerClose" @cancel="onPickerClose" />
+ :placeholder="t('dashboard.endDate')" :formatter="datetimeFormatter" closeOnClickOverlay
+ @confirm="onEndDateConfirm" @close="onPickerClose" @cancel="onPickerClose" />
@@ -100,21 +100,17 @@
{{ t('dashboard.baogongNum') }}
-
-
-
-
-
+
+
+
{{ t('dashboard.passRate') }}
-
-
-
-
-
+
+
+
@@ -138,12 +134,10 @@
{{ t('dashboard.taskTrend') }}
-
-
-
-
-
+
+
+
@@ -236,7 +230,7 @@ const showRangePicker = ref(false)
const startPickerRef = ref(null)
const endPickerRef = ref(null)
const currentFilter = ref('task')
-const currentRange = ref('month')
+const currentRange = ref('year')
const filterColumns = computed(() => [
[
@@ -310,12 +304,6 @@ const taskChartData = reactive({
]
})
-const chartWidth = computed(() => {
- const count = baogongChartData.categories.length
- if (count <= 7) return '100%'
- return Math.max(count * 50, 300) + 'rpx'
-})
-
function getDateRange(type) {
const now = new Date()
const pad2 = (n) => String(n).padStart(2, '0')
@@ -602,7 +590,11 @@ function handleNavClick(item) {
}
function viewMorePlans() {
- uni.navigateTo({ url: '/pages_function/pages/planList/index' })
+ if (currentFilter.value === 'task') {
+ uni.navigateTo({ url: '/pages_function/pages/taskList/index' })
+ } else {
+ uni.navigateTo({ url: '/pages_function/pages/planList/index' })
+ }
}
function onScroll(e) {
@@ -1050,6 +1042,9 @@ onUnmounted(() => {
padding: 20rpx 12rpx;
margin: 0 6rpx;
text-align: center;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
&:first-child {
margin-left: 0;
@@ -1098,11 +1093,6 @@ onUnmounted(() => {
margin-bottom: 16rpx;
}
-.chart-scroll {
- width: 100%;
- white-space: nowrap;
-}
-
.chart-box {
width: 100%;
height: 450rpx;
diff --git a/src/pages_function/pages/planList/index.vue b/src/pages_function/pages/planList/index.vue
index 7307b8c..64e2974 100644
--- a/src/pages_function/pages/planList/index.vue
+++ b/src/pages_function/pages/planList/index.vue
@@ -1,46 +1,66 @@
-
+
- {{ t('dashboard.productName') }}
- {{ plan.productName }}
+ {{ t('planList.taskCode') }}
+ {{ item.taskCode }}
+
+
+ {{ t('planList.planCode') }}
+ {{ item.planCode }}
+
+
+ {{ t('planList.employeeName') }}
+ {{ item.employeeName }}
- {{ t('dashboard.pipeline') }}
- {{ plan.feedingPipelineName }}
+ {{ t('planList.baogongNum') }}
+ {{ item.baogongNum }}
- {{ t('dashboard.planNumber') }}
- {{ plan.planNumber }}
+ {{ t('planList.passNum') }}
+ {{ item.passNum }}
- {{ t('dashboard.planStart') }}
- {{ plan.planStartTimeText }}
+ {{ t('planList.noPassNum') }}
+ {{ item.noPassNum }}
- {{ t('dashboard.planEnd') }}
- {{ plan.planEndTimeText }}
+ {{ t('planList.passRate') }}
+ {{ item.passRateText }}
+
+
+ {{ t('planList.baogongTime') }}
+ {{ item.baogongTimeText }}
+
+
+ {{ t('planList.reason') }}
+ {{ item.reason }}
-
- {{ t('functionCommon.loadFailed') }}
+
+ {{ t('functionCommon.loading') }}
+
+
+ {{ t('planList.noData') }}
+
+
+ {{ t('functionCommon.noMoreData') }}
@@ -153,25 +186,12 @@ onShow(() => {
color: #1a3a5c;
}
-.plan-status {
- padding: 8rpx 20rpx;
- border-radius: 20rpx;
- font-size: 22rpx;
-}
-
-.status-pending {
- background: rgba(255, 140, 0, 0.15);
- color: #ff8c00;
-}
-
-.status-running {
- background: rgba(24, 188, 55, 0.15);
- color: #18bc37;
-}
-
-.status-finished {
- background: rgba(74, 144, 194, 0.15);
- color: #4a90c2;
+.plan-product-code {
+ font-size: 24rpx;
+ color: #999999;
+ background: #f0f2f5;
+ padding: 4rpx 16rpx;
+ border-radius: 8rpx;
}
.plan-body {
@@ -203,17 +223,39 @@ onShow(() => {
.plan-num {
font-weight: 600;
color: #1a3a5c;
+
+ &.pass {
+ color: #18bc37;
+ }
+
+ &.warn {
+ color: #ff8c00;
+ }
+
+ &.fail {
+ color: #ff3b30;
+ }
+}
+
+.reason-text {
+ max-width: 400rpx;
+ text-align: right;
+ word-break: break-all;
}
-.empty-state {
+.loading-state,
+.empty-state,
+.no-more-state {
display: flex;
align-items: center;
justify-content: center;
- height: 400rpx;
+ height: 200rpx;
+}
- .empty-text {
- font-size: 28rpx;
- color: #999999;
- }
+.loading-text,
+.empty-text,
+.no-more-text {
+ font-size: 28rpx;
+ color: #999999;
}
diff --git a/src/pages_function/pages/taskList/index.vue b/src/pages_function/pages/taskList/index.vue
new file mode 100644
index 0000000..68dc5a1
--- /dev/null
+++ b/src/pages_function/pages/taskList/index.vue
@@ -0,0 +1,273 @@
+
+
+
+
+
+
+
+ {{ t('taskList.taskType') }}
+ {{ task.taskType || '-' }}
+
+
+ {{ t('taskList.orderDate') }}
+ {{ task.orderDateText }}
+
+
+ {{ t('taskList.deliveryDate') }}
+ {{ task.deliveryDateText }}
+
+
+ {{ t('taskList.totalNumber') }}
+ {{ task.totalNumber }}
+
+
+ {{ t('taskList.planNumber') }}
+ {{ task.planNumber }}
+
+
+ {{ t('taskList.unPlanNumber') }}
+ {{ task.unPlanNumber }}
+
+
+ {{ t('taskList.storedPlanNumber') }}
+ {{ task.storedPlanNumber }}
+
+
+ {{ t('taskList.urgent') }}
+
+
+
+
+
+ {{ t('functionCommon.loading') }}
+
+
+ {{ t('taskList.noData') }}
+
+
+ {{ t('functionCommon.noMoreData') }}
+
+
+
+
+
+
+