From 936bad992ac40c6f676fbbefefeea609dfdbff55 Mon Sep 17 00:00:00 2001 From: 石广澎 <shiguangpeng@163.com> Date: 星期六, 02 十二月 2023 18:41:59 +0800 Subject: [PATCH] feat: 库存盘点详情状态 --- admin-web/src/views/stock/inventorycount/inventorytask/detail.vue | 75 +++++++++++++++++++------------------ 1 files changed, 39 insertions(+), 36 deletions(-) diff --git a/admin-web/src/views/stock/inventorycount/inventorytask/detail.vue b/admin-web/src/views/stock/inventorycount/inventorytask/detail.vue index 1f26174..005f385 100644 --- a/admin-web/src/views/stock/inventorycount/inventorytask/detail.vue +++ b/admin-web/src/views/stock/inventorycount/inventorytask/detail.vue @@ -2,38 +2,35 @@ <win-md :title="setting.title" @close="close" :width="'1200px'"> <el-row :gutter="20" style="margin-bottom: 20px" type="flex" align="middle"> <el-col :span="6">鐩樼偣鍗曞彿锛歿{ formData.businessFormCode }}</el-col> - <el-col :span="6">鐩樼偣浠诲姟锛歿{ formData.businessTaskCode }}</el-col> - <el-col :span="6">鐩樼偣浠撳簱锛歿{ formData.warehouseId }}</el-col> + <el-col :span="6">鐩樼偣浠诲姟锛歿{ formData.businessFormName }}</el-col> + <el-col :span="6">鐩樼偣浠撳簱锛歿{ formData.warehouseName }}</el-col> </el-row> - <el-table v-loading="loading" :data="formData.tableData" height="100%" :stripe="true" class="the-table"> - <el-table-column prop="goodsTemplateName" label="鐗╁搧鍚嶇О"> </el-table-column> - <el-table-column prop="baseGoodsModelsId" label="鍨嬪彿" align="center"> </el-table-column> - <el-table-column prop="classification" label="璐疆鏃ユ湡"> </el-table-column> - <el-table-column prop="unit" label="浣跨敤閮ㄩ棬" align="center"> </el-table-column> - <el-table-column prop="kc" label="浣跨敤浜�" align="center"> </el-table-column> - <el-table-column prop="price" label="鍗曚环" align="center"> </el-table-column> - <el-table-column prop="inventoryResult" label="閲戦" align="center"> </el-table-column> - <el-table-column prop="inventoryCounts" label="搴旂洏鏁伴噺" align="center"></el-table-column> - <el-table-column prop="inventoryCounts" label="瀹炵洏鏁伴噺" align="center"></el-table-column> - <el-table-column prop="inventoryCounts" label="鐘舵��" align="center"></el-table-column> + <el-table v-loading="loading" :data="formData.formInventoryGoodsList" height="500" :stripe="true" class="the-table"> + <el-table-column prop="goodsTemplateName" label="鐗╁搧鍚嶇О"></el-table-column> + <el-table-column prop="baseGoodsModelsName" label="鍨嬪彿" align="center"></el-table-column> + <el-table-column prop="inventoryCount" label="搴旂洏鏁伴噺" align="center"></el-table-column> + <el-table-column prop="realNum" label="瀹炵洏鏁伴噺" align="center"></el-table-column> + <el-table-column prop="status" label="鐘舵��" align="center"> + <template slot-scope="{row}"> + {{ row.status|typeName }} + </template> + </el-table-column> </el-table> - - <div slot="footer" align="center" class="dialog-footer"> - <my-button name="鏆傚瓨" site="form" type="primary" @click="close" /> - <my-button name="瀹屾垚鐩樼偣" site="form" type="success" @click="save" /> - </div> </win-md> </template> <script> import winMd from '@/components/win/win-md'; import myButton from '@/components/myButton/myButton'; +import {inventoryDetail} from '@/api/stock/inventory'; + export default { - components: { winMd, myButton }, + components: {winMd, myButton}, props: { setting: { type: Object, - default: () => {}, + default: () => { + }, }, }, data() { @@ -41,31 +38,37 @@ loading: false, formData: { businessFormCode: '2023080812', - businessTaskCode: '2023骞�9鏈堢洏鐐瑰崟', - warehouseId: '寮�灏佸競浠撳簱', - tableData: [], + businessFormName: '2023骞�9鏈堢洏鐐瑰崟', + warehouseName: '寮�灏佸競浠撳簱', + formInventoryGoodsList: [], }, }; }, - created() { - for (let i = 0; i < 10; i++) { - this.formData.tableData.push({ - goodsTemplateName: '鏂戒箰榛戣壊纰崇矇', - baseGoodsModelsId: '鏂戒箰c2201', - classification: 'A', - unit: '濂�', - kc: 10, - price: 20, - inventoryResult: 200, - inventoryCounts: 0, - }); + filters: { + typeName(type) { + switch (type) { + case 1: + return '姝e父' + case 2: + return '鐩樼泩' + case 3: + return '鐩樹簭' + default: + return '' + } } + }, + created() { + inventoryDetail({id: this.setting.id}).then((res) => { + this.formData = res; + }); }, methods: { close() { this.$emit('close'); }, - save() {}, + save() { + }, }, }; </script> -- Gitblit v1.9.1