This commit is contained in:
gyq 2024-07-08 18:23:05 +08:00
parent 0be1523119
commit 1ebd4c6c45
2 changed files with 13 additions and 10 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog title="详情" width="80%" :visible.sync="dialogVisible" @close="dialogVisible = false"> <el-dialog title="详情" width="80%" :visible.sync="dialogVisible" @close="dialogVisible = false">
<div class="head-container"> <div class="head-container">
<span>{{ tableData.detail.subType == '-1' ? '退货出库' : '供应商入库' }}</span> <span>{{ row.type }}</span>
</div> </div>
<div class="head-container"> <div class="head-container">
<el-table :data="tableData.detail.stockSnap" v-loading="tableData.loading" height="400px"> <el-table :data="tableData.detail.stockSnap" v-loading="tableData.loading" height="400px">
@ -10,13 +10,14 @@
<el-table-column label="原库存" prop="stockNumber"></el-table-column> <el-table-column label="原库存" prop="stockNumber"></el-table-column>
<el-table-column label="变动数量" prop="number"> <el-table-column label="变动数量" prop="number">
<template v-slot="scope"> <template v-slot="scope">
<span v-if="tableData.detail.subType==-1">-</span> {{ scope.row.number }} {{ scope.row.unitName }} <span v-if="tableData.detail.subType == -1">-</span> {{ scope.row.number }} {{
scope.row.unitName
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="现有库存" prop="number"> <el-table-column label="现有库存" prop="number">
<template v-slot="scope"> <template v-slot="scope">
{{ returnNowHasNumbr( scope.row)}} {{ returnNowHasNumbr(scope.row) }}
<!-- {{ scope.row.stockNumber*1 + scope.row.number*1 }} {{ scope.row.unitName }} --> <!-- {{ scope.row.stockNumber*1 + scope.row.number*1 }} {{ scope.row.unitName }} -->
</template> </template>
</el-table-column> </el-table-column>
@ -37,6 +38,7 @@ export default {
data() { data() {
return { return {
dayjs, dayjs,
row: '',
dialogVisible: false, dialogVisible: false,
tableData: { tableData: {
loading: false, loading: false,
@ -51,12 +53,13 @@ export default {
}, },
methods: { methods: {
// //
returnNowHasNumbr(row){ returnNowHasNumbr(row) {
return row.stockNumber*1 + row.number*1 +row.unitName return row.stockNumber * 1 + row.number * 1 + row.unitName
}, },
show(id) { show(row) {
this.dialogVisible = true this.dialogVisible = true
this.getTableData(id) this.row = row
this.getTableData(row.id)
}, },
async getTableData(id) { async getTableData(id) {
this.tableData.loading = true this.tableData.loading = true

View File

@ -33,9 +33,9 @@
{{ dayjs(scope.row.stockTime).format('YYYY-MM-DD HH:mm:ss') }} {{ dayjs(scope.row.stockTime).format('YYYY-MM-DD HH:mm:ss') }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="120"> <el-table-column label="操作" width="80">
<template v-slot="scope"> <template v-slot="scope">
<el-button type="text" size="mini" @click="$refs.operatingDetail.show(scope.row.id)"> <el-button type="text" size="mini" @click="$refs.operatingDetail.show(scope.row)">
详情 详情
</el-button> </el-button>
<!-- <el-button type="text" size="mini" @click="$refs.operatingDetail.show(scope.row.id)"> <!-- <el-button type="text" size="mini" @click="$refs.operatingDetail.show(scope.row.id)">