From 94de1745b4b69eeeb1ac8c5d3508ce87258afc25 Mon Sep 17 00:00:00 2001 From: haoyahui <2032914783@qq.com> Date: 星期四, 16 十一月 2023 09:22:06 +0800 Subject: [PATCH] 库存管理 --- admin-web/src/views/stock/transfer/transferApplication/detail.vue | 190 +++++++++++++++++++++++------------------------ 1 files changed, 92 insertions(+), 98 deletions(-) diff --git a/admin-web/src/views/stock/transfer/transferApplication/detail.vue b/admin-web/src/views/stock/transfer/transferApplication/detail.vue index f126f45..1716dfe 100644 --- a/admin-web/src/views/stock/transfer/transferApplication/detail.vue +++ b/admin-web/src/views/stock/transfer/transferApplication/detail.vue @@ -1,124 +1,118 @@ <template> - <el-dialog - title="璇︽儏" - width="60%" - :modal="true" - :visible.sync="visible" - :top="'15vh'" - :close-on-click-modal="false" - :append-to-body="true" - :destroy-on-close="true" - @close="close" - class="stock-detail" - > - <el-row :gutter="20"> - <el-col :span="8"> - <span>璋冩嫧鍗曞彿锛�</span> - <span>{{ detail.businessFormCode }}</span> - </el-col> - <el-col :span="8"> - <span>璋冩嫧浠撳簱锛�</span> - <span>{{ detail.warehouseName }}</span> - </el-col> - <el-col :span="8"> - <span>鎵�灞炴満鏋勶細</span> - <span>{{ detail.agencyId }}</span> - </el-col> - </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> - </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="24"> - <span>璋冩嫧鎵嬬画鐓х墖锛�</span> - <div class="img-box"></div> - </el-col> - </el-row> - <div class="goods-card" v-for="(goodsItem, goodsIndex) in detail.procureGoods" :key="goodsIndex"> + <win-md class="stock-detail" :title="setting.title" @close="close" :width="'800px'"> + <div v-loading="loading"> <el-row :gutter="20"> <el-col :span="8"> - <span>鐗╁搧鍒嗙被锛�</span> - <span>{{ goodsItem.baseCategoryId }}</span> + <span>璋冩嫧鍗曞彿锛�</span> + <span>{{ detail.businessFormCode }}</span> </el-col> <el-col :span="8"> - <span>鐗╁搧鍚嶇О锛�</span> - <span>{{ goodsItem.goodsTemplateName }}</span> + <span>璋冩嫧鏈烘瀯锛�</span> + <span>{{ detail.outAgencyName }}</span> </el-col> <el-col :span="8"> - <span>渚涜揣鍟嗭細</span> - <span>{{ goodsItem.supplier }}</span> + <span>鎺ユ敹鏈烘瀯锛�</span> + <span>{{ detail.inAgencyName }}</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="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> + <el-row :gutter="20" style="margin-top: 20px"> + <el-col :span="8"> + <span>鐢宠璋冩嫧鏃堕棿锛�</span> + <span>{{ detail.createTime | formatTime }}</span> + </el-col> + <el-col :span="8"> + <span>鐘舵�侊細</span> + <span>{{ getStatesLabel(detail.states) }}</span> + </el-col> + <el-col :span="8"> + <span>璋冩嫧鏃堕棿锛�</span> + <span>{{ detail.outputTime | formatTime }}</span> + </el-col> + </el-row> + <el-row v-if="fileList && fileList.length" :gutter="20" style="margin-top: 20px"> + <el-col class="img-row" :span="24"> + <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.formTransferGoods" :key="goodsIndex"> + <el-row :gutter="20"> + <el-col :span="12"> + <span>鐗╁搧鍒嗙被锛�</span> + <span>{{ goodsItem.categoryName }}</span> + </el-col> + <el-col :span="12"> + <span>鐗╁搧鍚嶇О锛�</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="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> + </div> </div> - </el-dialog> + </win-md> </template> <script> -import { procureDetail } from '@/api/stock/procure/purchaseOrder'; +import { transferDetail } from '@/api/stock/transfer'; import * as DateFormatter from '@/utils/DateFormatter'; +import winMd from '@/components/win/win-md'; +import transfer from '../../../mixins/transfer'; export default { + mixins: [transfer], + components: { winMd }, + props: { + setting: { + type: Object, + default: () => {}, + }, + }, data() { return { - visible: false, - detail: { - businessFormCode: '', - goodsTemplateName: '', - agencyId: '', - states: '', - createName: '', - time: '', - procureGoods: [{}, {}], - }, + loading: false, + detail: {}, + fileList:[] }; }, - filters:{ + filters: { formatTime(time) { - if(!time) return - return DateFormatter.LongToDateTime(time) - } + if (!time) return '-'; + return DateFormatter.LongToDateTime(time); + }, + }, + created() { + this.loading = true; + transferDetail({ id: this.setting.id }).then((res) => { + this.detail = res; + this.fileList = this.detail.procureDoc ? JSON.parse(this.detail.procureDoc) : []; + this.loading = false; + }); }, methods: { - open(id) { - this.visible = true; - procureDetail({ id }).then((res) => { - this.detail = res; - }); - }, close() { - this.visible = false; + this.$emit('close'); }, }, }; -- Gitblit v1.9.1