添加物料加搜索
This commit is contained in:
@@ -47,7 +47,8 @@ export const bindingConfirm = (code, vcode, status, is) => post('api/pda/binding
|
|||||||
|
|
||||||
/** 盘点管理 */
|
/** 盘点管理 */
|
||||||
// 1.1查询物料
|
// 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,
|
page: page,
|
||||||
size: size
|
size: size
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,6 +2,17 @@
|
|||||||
<section>
|
<section>
|
||||||
<nav-bar :inner="true" title="物料查询"></nav-bar>
|
<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">
|
<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="grid-wraper">
|
||||||
<div class="left_fixed">
|
<div class="left_fixed">
|
||||||
<table class="layout-t left_layout_t">
|
<table class="layout-t left_layout_t">
|
||||||
@@ -45,6 +56,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
val1: '',
|
||||||
dataList: [],
|
dataList: [],
|
||||||
page: 1,
|
page: 1,
|
||||||
size: '10',
|
size: '10',
|
||||||
@@ -54,18 +66,20 @@ export default {
|
|||||||
pkObj: {}
|
pkObj: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
// created () {
|
||||||
this._queryMaterial()
|
// this._queryMaterial()
|
||||||
},
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
async _queryMaterial () {
|
async searchList () {
|
||||||
|
this.dataList = []
|
||||||
|
this.pkId = ''
|
||||||
|
this.pkObj = {}
|
||||||
this.page = 1
|
this.page = 1
|
||||||
|
this.size = '10'
|
||||||
this.busy = false
|
this.busy = false
|
||||||
this.desc = ''
|
this.desc = ''
|
||||||
let res = await queryMaterial(this.page + '', this.size)
|
let res = await queryMaterial(this.val1, this.page + '', this.size)
|
||||||
if (res.code === '1') {
|
if (res.code === '1') {
|
||||||
this.dataList = []
|
|
||||||
this.pkId = ''
|
|
||||||
this.dataList = [...res.result.content]
|
this.dataList = [...res.result.content]
|
||||||
if (res.result.content.length < 10) {
|
if (res.result.content.length < 10) {
|
||||||
this.busy = true
|
this.busy = true
|
||||||
@@ -76,10 +90,28 @@ export default {
|
|||||||
this.desc = res.desc
|
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 () {
|
async loadMore () {
|
||||||
this.busy = true
|
this.busy = true
|
||||||
this.page++
|
this.page++
|
||||||
let res = await queryMaterial(this.page + '', this.size)
|
let res = await queryMaterial(this.val1, this.page + '', this.size)
|
||||||
if (res.code === '1') {
|
if (res.code === '1') {
|
||||||
this.dataList = [...this.dataList, ...res.result.content]
|
this.dataList = [...this.dataList, ...res.result.content]
|
||||||
if (res.result.content.length < 10) {
|
if (res.result.content.length < 10) {
|
||||||
|
|||||||
Reference in New Issue
Block a user