diff --git a/src/views/inventorys/stocktaking.vue b/src/views/inventorys/stocktaking.vue
index 955ea2d..57c9fd9 100644
--- a/src/views/inventorys/stocktaking.vue
+++ b/src/views/inventorys/stocktaking.vue
@@ -36,11 +36,15 @@
{{ getStatusText(row.status) }}
+
+
+
+
@@ -353,6 +357,86 @@
+
+
+
+
+
+
+
+
盘点物资列表
+
+
+ {{ getInventoryStatusText(row.status) }}
+
+
+
+
+
![]()
+
+
+ +{{ row.photos.length - 3 }}
+
+
+ -
+
+
+
+
+
+
+
+
+
@@ -387,10 +471,15 @@ export default {
slot: 'status',
key: 'status'
},
+ {
+ title: '进度',
+ slot: 'progress',
+ width: 200
+ },
{
title: '操作',
slot: 'action',
- width: 200
+ width: 280
}
],
@@ -556,7 +645,59 @@ export default {
align: 'center'
}
],
- previewUrl: ''
+ previewUrl: '',
+ planDetailModal: {
+ visible: false,
+ loading: false,
+ data: null,
+ pageIndex: 1,
+ pageSize: 10,
+ total: 0,
+ inventoryList: []
+ },
+ planDetailColumns: [
+ {
+ title: '物资名称',
+ key: 'name',
+ minWidth: 150
+ },
+ {
+ title: '规格型号',
+ key: 'spec',
+ width: 120
+ },
+ {
+ title: '单位',
+ key: 'unit',
+ width: 80
+ },
+ {
+ title: '盘点数量',
+ key: 'checkQuantity',
+ width: 100
+ },
+ {
+ title: '盘点日期',
+ key: 'checkDate',
+ width: 150
+ },
+ {
+ title: '状态',
+ slot: 'status',
+ width: 100
+ },
+ {
+ title: '备注',
+ key: 'remark',
+ minWidth: 150,
+ tooltip: true
+ },
+ {
+ title: '照片',
+ slot: 'photos',
+ width: 150
+ }
+ ]
}
},
mounted() {
@@ -1177,6 +1318,61 @@ export default {
},
closePreview() {
this.previewUrl = '';
+ },
+ getPlanProgress(row) {
+ // 根据状态值判断进度
+ const status = row.status;
+ if (status === 0) { // 未开始
+ return 0;
+ } else if (status === 1) { // 进行中
+ return 50;
+ } else if (status === 2) { // 已完成
+ return 100;
+ }
+ return 0;
+ },
+ viewPlanDetail(row) {
+ this.planDetailModal.visible = true;
+ this.planDetailModal.data = row;
+ this.planDetailModal.pageIndex = 1;
+ this.loadPlanDetailData();
+ },
+ loadPlanDetailData() {
+ this.planDetailModal.loading = true;
+ // 模拟数据
+ setTimeout(() => {
+ const mockData = [];
+ for (let i = 0; i < 20; i++) {
+ mockData.push({
+ id: i + 1,
+ name: `测试物资${i + 1}`,
+ spec: `规格${i + 1}`,
+ unit: '个',
+ checkQuantity: Math.floor(Math.random() * 100),
+ checkDate: '2024-03-15',
+ status: Math.random() > 0.5 ? 1 : 0,
+ remark: `这是第${i + 1}个物资的备注信息`,
+ photos: [
+ 'https://picsum.photos/200/200?random=1',
+ 'https://picsum.photos/200/200?random=2',
+ 'https://picsum.photos/200/200?random=3',
+ 'https://picsum.photos/200/200?random=4'
+ ]
+ });
+ }
+ this.planDetailModal.inventoryList = mockData;
+ this.planDetailModal.total = 100; // 模拟总数
+ this.planDetailModal.loading = false;
+ }, 500);
+ },
+ handlePlanDetailPageChange(page) {
+ this.planDetailModal.pageIndex = page;
+ this.loadPlanDetailData();
+ },
+ handlePlanDetailPageSizeChange(size) {
+ this.planDetailModal.pageSize = size;
+ this.planDetailModal.pageIndex = 1;
+ this.loadPlanDetailData();
}
},
watch: {
@@ -1457,4 +1653,37 @@ export default {
box-shadow: 0 4px 24px rgba(0,0,0,0.3);
background: #fff;
}
+
+.plan-detail-content {
+ padding: 20px;
+
+ .detail-header {
+ display: grid;
+ grid-template-columns: repeat(3, 1fr);
+ gap: 20px;
+ margin-bottom: 30px;
+
+ .detail-item {
+ .label {
+ font-weight: bold;
+ color: #666;
+ margin-right: 10px;
+ }
+
+ .value {
+ color: #333;
+ }
+ }
+ }
+
+ .inventory-list-section {
+ margin-bottom: 30px;
+
+ h3 {
+ margin: 0 0 15px 0;
+ font-size: 16px;
+ color: #17233d;
+ }
+ }
+}