Commit a7296fd4 authored by 徐来柯's avatar 徐来柯

update

parent 529b0676
......@@ -71,6 +71,7 @@
}
.bottom_disabled {
cursor: pointer;
pointer-events: none;
width:80px;
height:30px;
line-height: 28px;
......
<template>
<div class="box-container">
<div class="wrap">
<search-form :formList="[1,2,3]" :btnList="[1,2]" @openDialog="openDialog" />
<search-form :formList="[1,2,3]" :btnList="[1,2]" @openDialog="openDialog" @delData="delData" />
<el-table
border
height="675"
......@@ -78,16 +78,15 @@
</el-table>
<div class="conterFool_bottom" >
<div class="bottom_text">
<span>{{TotalCount}}条记录 当前第{{PageIndex}}页 共{{TotalPage}}页 每页{{PageSize}}条记录</span>
<span>{{totalCount}}条记录 当前第{{pageIndex}}页 共{{totalPage}}页 每页{{pageSize}}条记录</span>
</div>
<div class="bottom_btns">
<div class="bottom_firest">首页</div>
<div ref="last" :class="num <= 1 ? 'bottom_disabled' : 'bottom_next'" >上一页</div>
<div ref="next" :class="num === TotalPage ? 'bottom_disabled' : 'bottom_next'">下一页</div>
<div class="bottom_end"> 末页</div>
<div class="bottom_firest" @click="first">首页</div>
<div ref="last" :class="num <= 1 ? 'bottom_disabled' : 'bottom_next'" @click="last" >上一页</div>
<div ref="next" :class="num === totalPage ? 'bottom_disabled' : 'bottom_next'" @click="next" >下一页</div>
<div class="bottom_end" @click="end" > 末页</div>
<span></span>
<input v-model="num" class="text" type="text"/>
<span></span>
......@@ -97,38 +96,108 @@
</div>
<store-dialog :titleText="'物料入库单'" v-if="popShow" @closeDialog="closeDialog" @conserve="conserve" />
<delete-pop ref="delete" :deletetext="deletetext" :type="typeV" v-if="deleteShow"></delete-pop>
</div>
</template>
<script>
import searchForm from './component/SearchForm'
import StoreDialog from './component/StoreDialog'
import searchForm from './component/searchForm'
import storeDialog from './component/storeDialog'
import deletePop from './component/deletePop'
export default {
components: { searchForm, StoreDialog },
components: { searchForm, storeDialog, deletePop },
data () {
return {
tableData: [],
popShow: false,
num:1,
TotalCount:1,
PageIndex:1,
TotalPage:1,
PageSize:50,
checkList: [],
deletetext: '',
deleteShow: false,
typeV: '',
num: 1,
// 首字母已改为小写
totalCount: 1,
pageIndex: 1,
totalPage: 1,
pageSize: 50,
}
},
methods: {
handleSelectionChange () {},
handleSelectionChange (val) {
this.checkList = val
},
// 分页方法
pageFun(num){
if(num == 1){
this.tableData = this.tableData.slice(0,50)
}else{
this.tableData = this.tableData.slice((num-1)*this.pageSize + 1,this.pageSize*num)
}
},
//跳转
jump(){},
jump(){
if(this.pageIndex != this.num){
if(this.num>this.totalPage || this.num < 1){
this.typeV = '3'
this.deleteShow = true
}else{
this.pageIndex = this.num
this.pageFun(this.pageIndex)
}
}
},
// 首页
first () {
this.pageIndex = 1
this.num = this.pageIndex
this.pageFun(this.pageIndex)
console.log('首页')
},
//末页
end(){
this.pageIndex = this.totalPage
this.num = this.pageIndex
this.pageFun(this.pageIndex)
console.log('尾页')
},
//下一页
next(){
if(this.pageIndex<this.totalPage){
this.pageIndex = this.pageIndex + 1
this.num = this.pageIndex
this.pageFun(this.pageIndex)
console.log('下一页')
}
},
//上一页
last(){
if(this.pageIndex>1){
this.pageIndex = this.pageIndex - 1
this.num = this.pageIndex
this.pageFun(this.pageIndex)
console.log('上一页')
}
},
delData () {
if (this.checkList.length === 0) {
this.deleteShow = true
this.typeV = 2
}
},
//关闭提示弹窗
cancel_delete(){
this.deleteShow = false
},
openDialog () {
this.popShow = true
},
closeDialog () {
this.popShow = false
},
conserve () {
alert('保存成功')
conserve (data) {
console.log(data)
this.popShow = false
}
}
}
......
......@@ -37,8 +37,8 @@
</div>
<div class="searchBtns">
<div class="delete" v-if="btnList.includes(2)">
<span class="deText" @click="delData" >删除</span>
<div class="delete" @click="delData" v-if="btnList.includes(2)">
<span class="deText" >删除</span>
<div class="deleteImg"></div>
</div>
<div class="add" @click="openDialog" v-if="btnList.includes(1)" >
......@@ -90,8 +90,18 @@ export default {
// this.queryProduct
},
methods: {
searchData () {},
delData () {},
searchData () {
var searchData = {
selectValue: this.selectValue,
inputValue: this.inputValue,
dateValue: this.dateValue,
scanValue: this.scanValue,
}
console.log(searchData)
},
delData () {
this.$emit('delData')
},
openDialog () {
this.$emit('openDialog')
}
......
......@@ -106,6 +106,9 @@ export default {
// },
close(){
this.count = ''
this.value = ''
this.value1 = ''
this.$emit('closeDialog')
},
numFun(){
......@@ -115,7 +118,12 @@ export default {
}
},
conserve () {
this.$emit('conserve')
var dialogData = {
count: this.count,
value: this.value,
value1 : this.value1,
}
this.$emit('conserve', dialogData)
}
}
}
......
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