Sfoglia il codice sorgente

fix:盘点计划详情中添加盘点工作和报损报溢列表

mlchen 6 giorni fa
parent
commit
959143cb95
1 ha cambiato i file con 174 aggiunte e 1 eliminazioni
  1. 174 1
      src/views/warehouseManagement/stocktaking/plan/details.vue

+ 174 - 1
src/views/warehouseManagement/stocktaking/plan/details.vue

@@ -163,7 +163,143 @@
           </el-table>
         </div>
       </div>
+      <div class="content-detail mt20">
+        <HeaderTitle title="盘点工单详情" size="16px"></HeaderTitle>
+        <div class="mt20">
+          <el-table
+            :data="infoData.planOrderVOS || []"
+            tooltip-effect="dark"
+            :max-height="500"
+            border
+          >
+            <el-table-column label="序号" type="index" width="50">
+            </el-table-column>
+            <el-table-column
+              label="盘点单号"
+              prop="code"
+              min-width="200"
+              :show-overflow-tooltip="true"
+            >
+              <template slot-scope="{ row }">
+                <el-link type="primary" @click="goOrderDetail(row)">
+                  {{ row.code }}
+                </el-link>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="状态"
+              prop="status"
+              :show-overflow-tooltip="true"
+            >
+              <template slot-scope="{ row }">
+                {{ statusLabel(orderStatusList, row.status) }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="计划单号"
+              prop="planCode"
+              min-width="200"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计划名称"
+              prop="planName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="盘点仓库"
+              prop="warehouseName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="盘点部门"
+              prop="executeGroupName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="盘点人员"
+              prop="executorName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计划开始时间"
+              prop="startTime"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计划结束时间"
+              prop="endTime"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+          </el-table>
+        </div>
+      </div>
+      <div class="content-detail mt20">
+        <HeaderTitle title="报损报溢详情" size="16px"></HeaderTitle>
+        <div class="mt20">
+          <el-table
+            :data="infoData.planProfitLossVOS || []"
+            tooltip-effect="dark"
+            :max-height="500"
+            border
+          >
+            <el-table-column label="序号" type="index" width="50">
+            </el-table-column>
+            <el-table-column
+              label="单号"
+              prop="code"
+              :show-overflow-tooltip="true"
+            >
+              <template slot-scope="{ row }">
+                <el-link type="primary" @click="openReportDetail(row)">
+                  {{ row.code }}
+                </el-link>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="名称"
+              prop="name"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="仓库"
+              prop="warehouseName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="报损报溢部门"
+              prop="executeGroupName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="报损报溢人"
+              prop="executorName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="报损时间"
+              prop="createTime"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="状态"
+              prop="status"
+              :show-overflow-tooltip="true"
+            >
+              <template slot-scope="{ row }">
+                {{ statusLabel(reportStatusList, row.status) }}
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
     </div>
+    <AddReportDialog
+      ref="reportDialogRef"
+      :dialogTile="reportDialogTitle"
+      :id="reportDialogId"
+      :isBindPlan="true"
+    />
   </div>
 </template>
 
@@ -174,8 +310,9 @@
   import { useDictLabelFilter } from '@/utils/dict';
   import StatusStep from '@/components/StatusStep/index.vue';
   import { getInventoryPlanDetailById } from '@/api/inventory';
+  import AddReportDialog from '../reportLoss/components/addReportDialog.vue';
   export default {
-    components: { StatusStep, PageHeader },
+    components: { StatusStep, PageHeader, AddReportDialog },
     data() {
       return {
         allocationType,
@@ -185,6 +322,21 @@
           { code: '2', label: '已完成', class: 'primary-text' },
           { code: '3', label: '已撤回', class: 'primary-text' }
         ],
+        // 盘点工单状态:0-待处理,1-执行中,2-已完成
+        orderStatusList: [
+          { value: 0, label: '待处理' },
+          { value: 1, label: '执行中' },
+          { value: 2, label: '已完成' }
+        ],
+        // 报损报溢状态:0-待审核,1-审核中,2-已审核
+        reportStatusList: [
+          { value: 0, label: '待审核' },
+          { value: 1, label: '审核中' },
+          { value: 2, label: '已审核' }
+        ],
+        // 报损报溢详情弹窗
+        reportDialogTitle: '',
+        reportDialogId: '',
         infoData: {},
         // 流程实例
         id: undefined, // 流程实例的编号
@@ -229,6 +381,27 @@
       }
     },
     methods: {
+      // 盘点工单详情:跳转盘点工单详情页(与盘点工单菜单同一入口)
+      goOrderDetail(row) {
+        this.$router.push({
+          path: '/warehouseManagement/stocktaking/work/details',
+          query: {
+            id: row.id,
+            // 用计划主键(BaseVO id 为字符串,避免 Long 雪花 ID 在 JS 端丢精度)
+            planId: this.infoData.id || this.$route.query.id
+          }
+        });
+      },
+      // 报损报溢详情:打开与报损报溢菜单同一个详情弹窗
+      openReportDetail(row) {
+        this.reportDialogTitle = '报损报溢详情';
+        this.reportDialogId = row.id;
+        this.$refs.reportDialogRef.dialogVisible = true;
+      },
+      statusLabel(statusList, status) {
+        const item = statusList.filter((option) => option.value == status)[0];
+        return item ? item.label : '';
+      },
       async _getDetail() {
         console.log(this.$route.query.id);
         getInventoryPlanDetailById(this.$route.query.id).then((data) => {