| | |
| | | <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> |
| | |
| | | <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"> |
| | |
| | | <img |
| | | v-if="checkImg(src.name)" |
| | | class="v-img" |
| | | :src="src.url" |
| | | :src="getUrl(src.path)" |
| | | :alt="src.name" |
| | | style="width: 100px; height: 100px" |
| | | /> |
| | |
| | | </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; |
| | | |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | loading: true, |
| | | scrapReasonOptions: [], |
| | | fileList: [], |
| | | detail: { |
| | |
| | | states: '', |
| | | createName: '', |
| | | time: '', |
| | | scrappedGoodsInfo: [], |
| | | scrappedGoods: [], |
| | | }, |
| | | }; |
| | | }, |
| | |
| | | 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(); |