Commit 3cc2769a authored by 罗林杰's avatar 罗林杰

修改分页

parent 3028bd87
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
:page-size.sync="pageSize" :page-size.sync="pageSize"
:layout="layout" :layout="layout"
:page-sizes="rows" :page-sizes="rows"
:total="total" :total="Number(total)"
v-bind="$attrs" v-bind="$attrs"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
...@@ -21,8 +21,7 @@ export default { ...@@ -21,8 +21,7 @@ export default {
name: 'Pagination', name: 'Pagination',
props: { props: {
total: { total: {
required: true, required: true
type: Number
}, },
page: { page: {
type: Number, type: Number,
...@@ -33,10 +32,7 @@ export default { ...@@ -33,10 +32,7 @@ export default {
default: 20 default: 20
}, },
rows: { rows: {
type: Array, type: Array
default() {
return [10, 20, 50, 100]
}
}, },
layout: { layout: {
type: String, type: String,
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<el-row style="margin-top: 20px;"> <el-row style="margin-top: 20px;">
<el-col :span="24"> <el-col :span="24">
<div class="statistics"> <div class="statistics">
<p>待盘: {{ this.pendingCount }}</p> <p>合计: {{ this.count }}</p>
</div> </div>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
...@@ -41,26 +41,26 @@ ...@@ -41,26 +41,26 @@
title="盘点详情" title="盘点详情"
:close-on-click-modal="true" :close-on-click-modal="true"
:visible.sync="infoOpen" :visible.sync="infoOpen"
width="1700px" width="300px"
append-to-body append-to-body
@close="infoWinCancel" @close="infoWinCancel"
> >
<el-table :row-style="rowStyle" border :data="detailList" max-height="450"> <el-table :row-style="rowStyle" border :data="detailList" max-height="450">
<el-table-column type="index" label="序号" fixed="left" width="75" align="center" /> <el-table-column type="index" label="序号" fixed="left" width="50" align="center" />
<el-table-column label="管理编号" width="140" prop="insCode" :show-overflow-tooltip="true"> <el-table-column label="管理编号" width="120" prop="insCode" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.insCode || '-' }} {{ scope.row.insCode || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="仪器名称" prop="insName" width="140" :show-overflow-tooltip="true"> <el-table-column label="仪器名称" prop="insName" width="120" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.insName || '-' }} {{ scope.row.insName || '-' }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="detailTotal>0" v-show="total>0"
:total="detailTotal" :total="total"
:page.sync="detailQueryParams.page" :page.sync="detailQueryParams.page"
:limit.sync="detailQueryParams.rows" :limit.sync="detailQueryParams.rows"
layout="total, prev, pager, next" layout="total, prev, pager, next"
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
// 管理字典 // 管理字典
insManageList: {}, insManageList: {},
completedCount:0, completedCount:0,
pendingCount:0, count:0,
// 类型字典 // 类型字典
insTypeList: {}, insTypeList: {},
// 日期范围 // 日期范围
...@@ -112,7 +112,6 @@ export default { ...@@ -112,7 +112,6 @@ export default {
pdCode: undefined, pdCode: undefined,
userName: undefined userName: undefined
}, },
detailTotal: 0,
detailQueryParams: { detailQueryParams: {
page: 1, page: 1,
rows: 10, rows: 10,
...@@ -156,7 +155,7 @@ export default { ...@@ -156,7 +155,7 @@ export default {
this.detailQueryParams.pdId = id this.detailQueryParams.pdId = id
getInventoryPdDetail(this.detailQueryParams).then(response => { getInventoryPdDetail(this.detailQueryParams).then(response => {
this.detailList = response.rows this.detailList = response.rows
this.detailTotal = response.total this.total = response.total
this.detailQueryParams.page = response.pageNu this.detailQueryParams.page = response.pageNu
this.detailQueryParams.rows = response.pageSize this.detailQueryParams.rows = response.pageSize
this.countStatus() this.countStatus()
...@@ -172,8 +171,8 @@ export default { ...@@ -172,8 +171,8 @@ export default {
}) })
}, },
countStatus() { countStatus() {
this.completedCount = this.detailList.filter(item => item.pdStatus === '0').length; this.completedCount = this.detailList.filter(item => item.pdStatus === '1').length;
this.pendingCount = this.detailList.filter(item => item.pdStatus === '1').length; this.count = this.total;
}, },
// 根据状态控制当前行的颜色 // 根据状态控制当前行的颜色
changeColor({ row, rowIndex }) { changeColor({ row, rowIndex }) {
......
...@@ -4,17 +4,17 @@ ...@@ -4,17 +4,17 @@
<div style="padding:5px 10px"> <div style="padding:5px 10px">
<el-table v-loading="loading" border :data="insStrumentInfoList"> <el-table v-loading="loading" border :data="insStrumentInfoList">
<el-table-column type="index" label="序号" width="50" align="center" /> <el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column label="编号" width="150" prop="insCode" :show-overflow-tooltip="true"> <el-table-column label="编号" width="130" prop="insCode" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.pdCode || '-' }} {{ scope.row.pdCode || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" width="200" prop="insJdrq" :show-overflow-tooltip="true"> <el-table-column label="创建时间" width="150" prop="insJdrq" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm:ss' ) }}</span> <span>{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm' ) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" class-name="small-padding fixed-width" width="60px"> <el-table-column label="操作" class-name="small-padding fixed-width" width="50px">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="download-btn-box"> <div class="download-btn-box">
<el-button <el-button
...@@ -34,69 +34,9 @@ ...@@ -34,69 +34,9 @@
:total="total" :total="total"
:page.sync="queryParams.page" :page.sync="queryParams.page"
:limit.sync="queryParams.rows" :limit.sync="queryParams.rows"
layout="total, prev, pager, next"
@pagination="getList" @pagination="getList"
/> />
<!-- 设备详情对话框-->
<el-dialog
title="盘点详情"
:close-on-click-modal="true"
:visible.sync="infoOpen"
width="1700px"
append-to-body
@close="infoWinCancel"
>
<el-table v-loading="loading" :row-style="rowStyle" border :data="detailList" max-height="450">
<el-table-column type="index" label="序号" fixed="left" width="75" align="center" />
<el-table-column label="管理编号" width="140" prop="insCode" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.insCode || '-' }}
</template>
</el-table-column>
<el-table-column label="仪器名称" prop="insName" width="140" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.insName || '-' }}
</template>
</el-table-column>
</el-table>
<pagination
v-show="detailTotal>0"
:total="detailTotal"
:page.sync="detailQueryParams.page"
:limit.sync="detailQueryParams.rows"
layout="total, prev, pager, next"
@pagination="getInventoryPdDetail(id)"
/>
</el-dialog>
<el-dialog :visible.sync="inventoryOpen" :close-on-click-modal="true" width="1700px" append-to-body @close="infoWinCancel">
<el-row>
<el-col :span="6">
<el-button class="submitBtn" type="primary">
<span>开始盘点</span>
</el-button>
</el-col>
<el-col :span="18">
<el-button class="submitBtn" type="primary">
<span>结束盘点</span>
</el-button>
</el-col>
</el-row>
<!-- 新增统计数据展示 -->
<el-row style="margin-top: 20px;">
<el-col :span="12">
<div class="statistics">
<p><strong>待盘:</strong> {{ pendingCount }}</p>
</div>
</el-col>
<el-col :span="12">
<div class="statistics">
<p><strong>已盘:</strong> {{ completedCount }}</p>
</div>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button class="submitBtn" type="primary" @click="handleInfo">查看盘点</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment