From 9834dbff448908d2008d8c52a2544aad00c099b1 Mon Sep 17 00:00:00 2001 From: haoyahui <2032914783@qq.com> Date: 星期三, 22 十一月 2023 17:34:26 +0800 Subject: [PATCH] 库存盘点, 异常明细,报废管理 --- admin-web/src/views/stock/scrap/itemScrapping/detail.vue | 57 ++++++++++++++++++++------------------------------------- 1 files changed, 20 insertions(+), 37 deletions(-) diff --git a/admin-web/src/views/stock/scrap/itemScrapping/detail.vue b/admin-web/src/views/stock/scrap/itemScrapping/detail.vue index c6b0a1e..ca33631 100644 --- a/admin-web/src/views/stock/scrap/itemScrapping/detail.vue +++ b/admin-web/src/views/stock/scrap/itemScrapping/detail.vue @@ -6,7 +6,7 @@ <span>{{ detail.businessFormCode }}</span> </el-col> <el-col :span="8"> - <span>鎶ュ簾浠撳簱锛�</span> + <span>浠撳簱锛�</span> <span>{{ detail.warehouseName }}</span> </el-col> <el-col :span="8"> @@ -16,33 +16,23 @@ </el-row> <el-row :gutter="20" style="margin-top: 20px"> <el-col :span="8"> - <span>鐘舵�侊細</span> - <span>{{ detail.states == 1 ? '寰呮姤搴�' : '宸叉姤搴�' }}</span> - </el-col> - <el-col :span="8"> <span>鍒涘缓浜猴細</span> - <span>{{ detail.buyerName }}</span> + <span>{{ detail.operatorName }}</span> </el-col> <el-col :span="8"> <span>鎶ュ簾鏃堕棿锛�</span> - <span>{{ detail.incomeTime | formatTime }}</span> - </el-col> - </el-row> - <el-row :gutter="20" style="margin-top: 20px"> - <el-col class="img-row" :span="12"> - <span>鎶ュ簾绫诲瀷锛�</span> - <span>{{ detail.buyType == 1 ? '闆嗛噰' : '鑷噰' }}</span> + <span>{{ detail.dealTime | formatTime }}</span> </el-col> </el-row> <el-row :gutter="20" style="margin-top: 20px"> <el-col class="img-row" :span="24"> - <span>鎶ュ簾鎵嬬画鐓х墖锛�</span> + <span>鎶ュ簾鎵嬬画锛�</span> <div class="img-box" v-for="(item, index) in fileList" :key="index" @click="handlePreview(item)"> <img class="img" :src="getUrl(item.path)" alt="" /> </div> </el-col> </el-row> - <div class="goods-card" v-for="(goodsItem, goodsIndex) in detail.procureGoods" :key="goodsIndex"> + <div class="goods-card" v-for="(goodsItem, goodsIndex) in detail.scrappedGoodsInfo" :key="goodsIndex"> <el-row :gutter="20"> <el-col :span="8"> <span>鐗╁搧鍒嗙被锛�</span> @@ -52,12 +42,8 @@ <span>鐗╁搧鍚嶇О锛�</span> <span>{{ goodsItem.goodsTemplateName }}</span> </el-col> - <el-col :span="8"> - <span>渚涜揣鍟嗭細</span> - <span>{{ goodsItem.supplier }}</span> - </el-col> </el-row> - <el-table :data="goodsItem.models" :stripe="true" style="margin-top: 20px"> + <el-table :data="goodsItem.scrappedGoodsInfo" :stripe="true" style="margin-top: 20px"> <el-table-column prop="baseGoodsModelsName" label="瑙勬牸鍨嬪彿" align="center"> <template slot-scope="scope"> {{ scope.row.baseGoodsModelsName }} @@ -68,19 +54,14 @@ {{ scope.row.unit }} </template> </el-table-column> - <el-table-column prop="price" label="鍗曚环" align="center"> - <template slot-scope="scope"> - {{ scope.row.price }} - </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="counts" label="閲戦" align="center"> + <el-table-column prop="scrappedCode" label="鎶ュ簾鍘熷洜" align="center"> <template slot-scope="scope"> - {{ (scope.row.price * scope.row.counts).toFixed(2) }} + {{ getDictName(scope.row.scrappedCode) }} </template> </el-table-column> </el-table> @@ -99,12 +80,13 @@ </win-md> </template> <script> -import { procureDetail } from '@/api/stock/procure/purchaseOrder'; +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 Viewer from 'viewerjs'; import 'viewerjs/dist/viewer.css'; +import { getDicts } from '@/api/system/dict/data'; let viewer = null; @@ -119,6 +101,7 @@ }, data() { return { + scrapReasonOptions: [], fileList: [], detail: { baseCategoryName: '', @@ -130,8 +113,7 @@ states: '', createName: '', time: '', - procureGoods: [{}, {}], - fileKey: Math.random(), + scrappedGoodsInfo: [], }, }; }, @@ -142,15 +124,22 @@ }, }, created() { - procureDetail({ id: this.setting.id }).then((res) => { + scrappedDetail({ id: this.setting.id }).then((res) => { this.detail = res; this.fileList = this.detail.procureDoc ? JSON.parse(this.detail.procureDoc) : []; this.$nextTick(() => { this.initPreviewImg(); }); }); + getDicts('SCRAP_REASON').then((res) => { + this.scrapReasonOptions = res; + }); }, methods: { + getDictName(code) { + let item = this.scrapReasonOptions.find(v=>v.dict_value==code) + return item ? item.dict_label : '' + }, initPreviewImg() { if (viewer != null) { viewer.destroy(); @@ -172,12 +161,6 @@ index++; } } - // this.fileList.forEach((f, i) => { - // if (file.uid == f.uid) { - // index = i - // } - // }) - // document.querySelector('#uploadPreviewImages').children[0].click() viewer.view(index); }, checkImg(name) { -- Gitblit v1.9.1