Merge branch 'dev' of https://e.coding.net/g-cphe0354/yinshoukeguanliduan/management into ymf
This commit is contained in:
commit
2ef2bcf83b
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<el-table-column label="供应商名称" prop="purveyorName"></el-table-column>
|
||||
<el-table-column label="商品数量" prop="totalAmount">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.stockSnap.length }}
|
||||
{{ scope.row.stockSnap && scope.row.stockSnap.length }}
|
||||
</template>
|
||||
</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') }}
|
||||
</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)">
|
||||
|
|
@ -46,7 +46,9 @@
|
|||
</el-table>
|
||||
</div>
|
||||
<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" />
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -82,7 +84,7 @@ export default {
|
|||
async getTableData() {
|
||||
this.tableData.loading = true
|
||||
let arr = []
|
||||
console.log(this.query,'tiaoshi1')
|
||||
console.log(this.query, 'tiaoshi1')
|
||||
if (this.query.createdAt.length) {
|
||||
arr = [this.query.createdAt[0] + ' 00:00:00', this.query.createdAt[1] + ' 23:59:59']
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -297,10 +297,11 @@ export default {
|
|||
methods: {
|
||||
// 切换入库内容
|
||||
tabChange(value, type) {
|
||||
console.log(type);
|
||||
this.inTabValue = value
|
||||
this.shopTypesActive = 0
|
||||
this.queryForm.type = type
|
||||
this.resetHandle()
|
||||
this.queryForm.type = type
|
||||
},
|
||||
// 计算耗材总价
|
||||
consCountTotal() {
|
||||
|
|
|
|||
|
|
@ -295,8 +295,8 @@ export default {
|
|||
tabChange(value, type) {
|
||||
this.inTabValue = value
|
||||
this.shopTypesActive = 0
|
||||
this.queryForm.type = type
|
||||
this.resetHandle()
|
||||
this.queryForm.type = type
|
||||
},
|
||||
// 计算耗材总价
|
||||
consCountTotal() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue