Merge branch 'gyq' of e.coding.net:g-cphe0354/yinshoukeguanliduan/management into dev

This commit is contained in:
gyq 2024-07-08 18:24:04 +08:00
commit d96cef1970
2 changed files with 13 additions and 10 deletions

View File

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

View File

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