This commit is contained in:
YeMingfei666 2024-07-09 09:59:35 +08:00
commit 2ef2bcf83b
4 changed files with 21 additions and 15 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,
@ -54,9 +56,10 @@ export default {
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

@ -19,7 +19,7 @@
<el-table-column label="供应商名称" prop="purveyorName"></el-table-column> <el-table-column label="供应商名称" prop="purveyorName"></el-table-column>
<el-table-column label="商品数量" prop="totalAmount"> <el-table-column label="商品数量" prop="totalAmount">
<template v-slot="scope"> <template v-slot="scope">
{{ scope.row.stockSnap.length }} {{ scope.row.stockSnap && scope.row.stockSnap.length }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column> <el-table-column label="备注" prop="remark"></el-table-column>
@ -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)">
@ -46,7 +46,9 @@
</el-table> </el-table>
</div> </div>
<el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size" <el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
@current-change="paginationChange" @size-change="e => { tableData.size = e; tableData.page = 0; getTableData() }" layout="total, sizes, prev, pager, next, jumper"></el-pagination> @current-change="paginationChange"
@size-change="e => { tableData.size = e; tableData.page = 0; getTableData() }"
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
<operatingDetail ref="operatingDetail" /> <operatingDetail ref="operatingDetail" />
</div> </div>
</template> </template>

View File

@ -297,10 +297,11 @@ export default {
methods: { methods: {
// //
tabChange(value, type) { tabChange(value, type) {
console.log(type);
this.inTabValue = value this.inTabValue = value
this.shopTypesActive = 0 this.shopTypesActive = 0
this.queryForm.type = type
this.resetHandle() this.resetHandle()
this.queryForm.type = type
}, },
// //
consCountTotal() { consCountTotal() {

View File

@ -295,8 +295,8 @@ export default {
tabChange(value, type) { tabChange(value, type) {
this.inTabValue = value this.inTabValue = value
this.shopTypesActive = 0 this.shopTypesActive = 0
this.queryForm.type = type
this.resetHandle() this.resetHandle()
this.queryForm.type = type
}, },
// //
consCountTotal() { consCountTotal() {