WangHan
2025-04-03 a1b85ef72062ca80db35546e4216dd564f3e0f57
admin-web/src/views/stock/scrap/itemScrapping/detail.vue
@@ -1,5 +1,5 @@
<template>
  <win-md class="stock-detail" :title="setting.title" @close="close" :width="'800px'">
  <win-md class="stock-detail" :title="setting.title" @close="close" :width="'800px'" :loading="loading">
    <el-row :gutter="20">
      <el-col :span="8">
        <span>报废单号:</span>
@@ -36,34 +36,18 @@
      <el-row :gutter="20">
        <el-col :span="8">
          <span>物品分类:</span>
          <span>{{ goodsItem.baseCategoryName }}</span>
          <span>{{ goodsItem.categoryName }}</span>
        </el-col>
        <el-col :span="8">
          <span>物品名称:</span>
          <span>{{ goodsItem.goodsTemplateName }}</span>
          <span>{{ goodsItem.goodsName }}</span>
        </el-col>
      </el-row>
      <el-table :data="goodsItem.models" :stripe="true" style="margin-top: 20px">
        <el-table-column prop="baseGoodsModelsName" label="规格型号" align="center">
          <template slot-scope="scope">
            {{ scope.row.baseGoodsModelsName }}
          </template>
        </el-table-column>
        <el-table-column label="单位" align="center">
          <template slot-scope="scope">
            {{ scope.row.unit }}
          </template>
        </el-table-column>
        <el-table-column prop="counts" label="报废数量" align="center">
          <template slot-scope="scope">
            {{ scope.row.counts }}
          </template>
        </el-table-column>
        <el-table-column prop="scrappedCode" label="报废原因" align="center">
          <template slot-scope="scope">
            {{ getDictName(scope.row.scrappedCode) }}
          </template>
        </el-table-column>
        <el-table-column prop="baseGoodsModelsName" label="规格型号" align="center"></el-table-column>
        <el-table-column label="单位" prop="unit" align="center"></el-table-column>
        <el-table-column prop="counts" label="报废数量" align="center"></el-table-column>
        <el-table-column prop="scrappedName" label="报废原因" align="center"></el-table-column>
      </el-table>
    </div>
    <div id="uploadPreviewImages" style="display: none">
@@ -71,7 +55,7 @@
        <img
          v-if="checkImg(src.name)"
          class="v-img"
          :src="src.url"
          :src="getUrl(src.path)"
          :alt="src.name"
          style="width: 100px; height: 100px"
        />
@@ -80,13 +64,13 @@
  </win-md>
</template>
<script>
import { scrappedDetail } from '@/api/stock/scrap';
import {scrappedDetail} from '@/api/stock/scrap';
import winMd from '@/components/win/win-md';
import * as DateFormatter from '@/utils/DateFormatter';
import { getDownUrl } from '@/utils/base';
import {getDownUrl} from '@/utils/base';
import Viewer from 'viewerjs';
import 'viewerjs/dist/viewer.css';
import { getDicts } from '@/api/system/dict/data';
import {getDicts} from '@/api/system/dict/data';
let viewer = null;
@@ -101,6 +85,7 @@
  },
  data() {
    return {
      loading: true,
      scrapReasonOptions: [],
      fileList: [],
      detail: {
@@ -113,7 +98,7 @@
        states: '',
        createName: '',
        time: '',
        scrappedGoodsInfo: [],
        scrappedGoods: [],
      },
    };
  },
@@ -126,6 +111,7 @@
  created() {
    scrappedDetail({ id: this.setting.id }).then((res) => {
      this.detail = res;
      this.loading = false
      this.fileList = this.detail.uploadFiles ? JSON.parse(this.detail.uploadFiles) : [];
      this.$nextTick(() => {
        this.initPreviewImg();