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

update

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