This commit is contained in:
parent
c1eda32f29
commit
66f8f95cda
|
|
@ -1,96 +1,118 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-form :model="query" inline>
|
<el-form :model="query" inline>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="query.conName" placeholder="耗材信息名称" />
|
<el-input v-model="query.conName" placeholder="耗材信息名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="getTableData">查询</el-button>
|
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||||
<el-button>重置</el-button>
|
<el-button @click="resetHandle">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-table ref="table" :data="clickseetableData.data" v-loading="clickseetableData.loading" row-key="id"
|
<el-table
|
||||||
height="66vh">
|
ref="table"
|
||||||
<el-table-column label="耗材名称" prop="conName" />
|
:data="clickseetableData.data"
|
||||||
<el-table-column label="变动库存" prop="amount">
|
v-loading="clickseetableData.loading"
|
||||||
<template v-slot="scope">
|
row-key="id"
|
||||||
<span :class="{ red: scope.row.bizType == '-' }">{{ scope.row.bizType }}{{ scope.row.amount
|
height="66vh"
|
||||||
}}</span>
|
>
|
||||||
</template>
|
<el-table-column label="耗材名称" prop="conName" />
|
||||||
</el-table-column>
|
<el-table-column label="变动库存" prop="amount">
|
||||||
<el-table-column label="现有库存" prop="balance" />
|
<template v-slot="scope">
|
||||||
<!-- <el-table-column label="业务编码" prop="bizCode" /> -->
|
<span :class="{ red: scope.row.bizType == '-' }"
|
||||||
<el-table-column label="业务说明" prop="bizName" />
|
>{{ scope.row.bizType }}{{ scope.row.amount }}</span
|
||||||
<el-table-column label="商品名称" prop="productName" />
|
>
|
||||||
<!-- <el-table-column label="正负号标识" prop="bizType" /> -->
|
</template>
|
||||||
<!-- <el-table-column label="耗材id" prop="consId" /> -->
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" prop="createTime"></el-table-column>
|
<el-table-column label="现有库存" prop="balance" />
|
||||||
<!-- <el-table-column label="更新时间" prop="updateTime">
|
<!-- <el-table-column label="业务编码" prop="bizCode" /> -->
|
||||||
|
<el-table-column label="业务说明" prop="bizName" />
|
||||||
|
<el-table-column label="商品名称" prop="productName" />
|
||||||
|
<!-- <el-table-column label="正负号标识" prop="bizType" /> -->
|
||||||
|
<!-- <el-table-column label="耗材id" prop="consId" /> -->
|
||||||
|
<el-table-column label="创建时间" prop="createTime"></el-table-column>
|
||||||
|
<!-- <el-table-column label="更新时间" prop="updateTime">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
{{ dayjs(scope.row.createdAt).format('YYYY-MM-DD HH:mm:ss') }}
|
{{ dayjs(scope.row.createdAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
|
||||||
<div class="head-container">
|
|
||||||
<el-pagination :total="clickseetableData.total" :current-page="clickseetableData.page + 1"
|
|
||||||
:page-size="clickseetableData.size" layout="total, sizes, prev, pager, next, jumper"
|
|
||||||
@current-change="paginationChangetype"
|
|
||||||
@size-change="e => { clickseetableData.size = e; clickseetableData.page = 0; getTableData() }" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="head-container">
|
||||||
|
<el-pagination
|
||||||
|
:total="clickseetableData.total"
|
||||||
|
:current-page="clickseetableData.page + 1"
|
||||||
|
:page-size="clickseetableData.size"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@current-change="paginationChangetype"
|
||||||
|
@size-change="
|
||||||
|
e => {
|
||||||
|
clickseetableData.size = e;
|
||||||
|
clickseetableData.page = 0;
|
||||||
|
getTableData();
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { gettbConsInfoFlow } from '@/api/consumable'
|
import { gettbConsInfoFlow } from "@/api/consumable";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
query: {
|
query: {
|
||||||
conName: ''
|
conName: ""
|
||||||
},
|
},
|
||||||
clickseetableData: {
|
clickseetableData: {
|
||||||
data: [],
|
data: [],
|
||||||
page: 0,
|
page: 0,
|
||||||
size: 30,
|
size: 30,
|
||||||
loading: false,
|
loading: false,
|
||||||
total: 0
|
total: 0
|
||||||
},
|
}
|
||||||
}
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getTableData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
resetHandle() {
|
||||||
|
this.clickseetableData.page = 0;
|
||||||
|
this.clickseetableData.size = 30;
|
||||||
|
this.query.conName = "";
|
||||||
|
this.getTableData();
|
||||||
},
|
},
|
||||||
mounted() {
|
pageSizeChange(e) {
|
||||||
this.getTableData()
|
this.clickseetableData.size = e;
|
||||||
|
this.getTableData();
|
||||||
},
|
},
|
||||||
methods: {
|
paginationChangetype(e) {
|
||||||
pageSizeChange(e) {
|
this.clickseetableData.page = e - 1;
|
||||||
this.clickseetableData.size = e
|
this.getTableData();
|
||||||
this.getTableData()
|
},
|
||||||
},
|
// 查看查询耗材流水信息
|
||||||
paginationChangetype(e) {
|
async getTableData() {
|
||||||
this.clickseetableData.page = e - 1
|
try {
|
||||||
this.getTableData()
|
this.clickseetableData.loading = true;
|
||||||
},
|
const res = await gettbConsInfoFlow({
|
||||||
// 查看查询耗材流水信息
|
page: this.clickseetableData.page,
|
||||||
async getTableData() {
|
size: this.clickseetableData.size,
|
||||||
try {
|
consId: "",
|
||||||
this.clickseetableData.loading = true
|
conName: this.query.conName,
|
||||||
const res = await gettbConsInfoFlow({
|
shopId: localStorage.getItem("shopId")
|
||||||
page: this.clickseetableData.page,
|
});
|
||||||
size: this.clickseetableData.size,
|
this.clickseetableData.loading = false;
|
||||||
consId: '',
|
this.clickseetableData.data = res.content;
|
||||||
conName: this.query.conName,
|
this.clickseetableData.total = res.totalElements;
|
||||||
shopId: localStorage.getItem('shopId')
|
} catch (error) {
|
||||||
})
|
console.log(error);
|
||||||
this.clickseetableData.loading = false
|
}
|
||||||
this.clickseetableData.data = res.content
|
|
||||||
this.clickseetableData.total = res.totalElements
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
};
|
||||||
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue