添加物料加搜索
This commit is contained in:
@@ -47,7 +47,8 @@ export const bindingConfirm = (code, vcode, status, is) => post('api/pda/binding
|
||||
|
||||
/** 盘点管理 */
|
||||
// 1.1查询物料
|
||||
export const queryMaterial = (page, size) => post('api/pda/check/queryMaterial', {
|
||||
export const queryMaterial = (bar, page, size) => post('api/pda/check/queryMaterial', {
|
||||
searchbar: bar,
|
||||
page: page,
|
||||
size: size
|
||||
})
|
||||
|
||||
@@ -2,6 +2,17 @@
|
||||
<section>
|
||||
<nav-bar :inner="true" title="物料查询"></nav-bar>
|
||||
<section class="content mgt15 mgb110" v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0" infinite-scroll-immediate-check="false">
|
||||
<div class="filter-wraper">
|
||||
<div class="bottom-filter-tip relative">
|
||||
<div class="filter-label txtjustify">物料编码</div>
|
||||
<div class="fxcol mgl20">
|
||||
<input type="text" class="filter-input filter-scan-input" v-model="val1">
|
||||
</div>
|
||||
<div class="mgl20">
|
||||
<button class="btn" @click="searchList">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid-wraper">
|
||||
<div class="left_fixed">
|
||||
<table class="layout-t left_layout_t">
|
||||
@@ -45,6 +56,7 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
val1: '',
|
||||
dataList: [],
|
||||
page: 1,
|
||||
size: '10',
|
||||
@@ -54,18 +66,20 @@ export default {
|
||||
pkObj: {}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._queryMaterial()
|
||||
},
|
||||
// created () {
|
||||
// this._queryMaterial()
|
||||
// },
|
||||
methods: {
|
||||
async _queryMaterial () {
|
||||
async searchList () {
|
||||
this.dataList = []
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
this.page = 1
|
||||
this.size = '10'
|
||||
this.busy = false
|
||||
this.desc = ''
|
||||
let res = await queryMaterial(this.page + '', this.size)
|
||||
let res = await queryMaterial(this.val1, this.page + '', this.size)
|
||||
if (res.code === '1') {
|
||||
this.dataList = []
|
||||
this.pkId = ''
|
||||
this.dataList = [...res.result.content]
|
||||
if (res.result.content.length < 10) {
|
||||
this.busy = true
|
||||
@@ -76,10 +90,28 @@ export default {
|
||||
this.desc = res.desc
|
||||
}
|
||||
},
|
||||
// async _queryMaterial () {
|
||||
// this.page = 1
|
||||
// this.busy = false
|
||||
// this.desc = ''
|
||||
// let res = await queryMaterial(this.page + '', this.size)
|
||||
// if (res.code === '1') {
|
||||
// this.dataList = []
|
||||
// this.pkId = ''
|
||||
// this.dataList = [...res.result.content]
|
||||
// if (res.result.content.length < 10) {
|
||||
// this.busy = true
|
||||
// this.desc = '已加载全部数据'
|
||||
// }
|
||||
// } else {
|
||||
// this.Dialog(res.desc)
|
||||
// this.desc = res.desc
|
||||
// }
|
||||
// },
|
||||
async loadMore () {
|
||||
this.busy = true
|
||||
this.page++
|
||||
let res = await queryMaterial(this.page + '', this.size)
|
||||
let res = await queryMaterial(this.val1, this.page + '', this.size)
|
||||
if (res.code === '1') {
|
||||
this.dataList = [...this.dataList, ...res.result.content]
|
||||
if (res.result.content.length < 10) {
|
||||
|
||||
Reference in New Issue
Block a user