Commit 58b194c2 by LJM

bug

parent b52ca95f
......@@ -213,7 +213,6 @@
clearInput() {
this.resetChange();
this.searchParams.all_search_keyword = '';
this.searchParams.stock_out_sn = '';
this.input_flag = false;
this.getData();
},
......
......@@ -12,7 +12,12 @@
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请输入查询" placeholder-style="color:#919399" focus v-model="searchParams.search_val" @input="handleInput" />
<template v-if="index == 0">
<input class="uni-input" placeholder="请输入查询" placeholder-style="color:#919399" focus v-model="searchParams.search_val" @input="handleInput" />
</template>
<template v-else-if="index == 1">
<input class="uni-input" placeholder="请输入旧标签查询" placeholder-style="color:#919399" focus v-model="searchParams.search_val" @input="handleInput" maxlength="8" />
</template>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view>
......@@ -122,102 +127,102 @@
</template>
<script>
import { API } from '@/util/api.js';
import debounce from 'lodash/debounce';
import { API } from '@/util/api.js';
import debounce from 'lodash/debounce';
export default {
data() {
return {
index: 0,
array: ['全量搜索'],
input_flag: false,
page: 1,
limit: 50,
list: [],
hasMoreData: true, //是否分页加载
searchParams: {
search_val: ''
export default {
data() {
return {
index: 0,
array: ['全量搜索', '旧标签'],
input_flag: false,
page: 1,
limit: 50,
list: [],
hasMoreData: true, //是否分页加载
searchParams: {
search_val: ''
}
};
},
onNavigationBarButtonTap(e) {
if (e.index == 0) {
uni.reLaunch({
url: '/pages/index/index'
});
}
};
},
onNavigationBarButtonTap(e) {
if (e.index == 0) {
uni.reLaunch({
url: '/pages/index/index'
});
}
},
onReachBottom() {
if (!this.hasMoreData) {
return;
}
this.page++;
this.getData();
},
onShow() {
this.getData();
},
methods: {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
},
/**
* 清空数据
*/
clearInput() {
this.resetChange();
this.searchParams.search_val = '';
this.input_flag = false;
onReachBottom() {
if (!this.hasMoreData) {
return;
}
this.page++;
this.getData();
},
/**
* 全量搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
this.resetChange();
var val = event.target.value;
if (val) {
this.input_flag = true;
this.searchParams.search_val = val;
} else {
this.input_flag = false;
this.searchParams.search_val = '';
}
onShow() {
this.getData();
}, 500),
/**
* 获取列表数据
*/
getData() {
this.request(API.quickTransferLog, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
if (res.data.list.length > 0) {
this.hasMoreData = true;
this.list = this.list.concat(res.data.list);
} else {
this.hasMoreData = false;
}
},
methods: {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
},
/**
* 清空数据
*/
clearInput() {
this.resetChange();
this.searchParams.search_val = '';
this.input_flag = false;
this.getData();
},
/**
* 全量搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
this.resetChange();
var val = event.target.value;
if (val) {
this.input_flag = true;
this.searchParams.search_val = val;
} else {
uni.showToast({
title: res.msg,
icon: 'none'
});
this.input_flag = false;
this.searchParams.search_val = '';
}
});
},
/**
* 重置
*/
resetChange() {
this.list = [];
this.page = 1;
this.getData();
}, 500),
/**
* 获取列表数据
*/
getData() {
this.request(API.quickTransferLog, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
if (res.data.list.length > 0) {
this.hasMoreData = true;
this.list = this.list.concat(res.data.list);
} else {
this.hasMoreData = false;
}
} else {
uni.showToast({
title: res.msg,
icon: 'none'
});
}
});
},
/**
* 重置
*/
resetChange() {
this.list = [];
this.page = 1;
}
}
}
};
};
</script>
<style scoped lang="scss">
@import '@/assets/css/stockRecheck/record.scss';
</style>
@import '@/assets/css/stockRecheck/record.scss';
</style>
\ No newline at end of file
const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
const API_BASE = 'http://wms.liexindev.net'; //WMS系统
const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统
// const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
// const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
// const API_BASE = 'http://wms.liexindev.net'; //WMS系统
// const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统
// const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
// const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
// const API_BASE = 'https://wms.ichunt.net'; //WMS系统
// const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
const API_BASE = 'https://wms.ichunt.net'; //WMS系统
const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
const API = {
......
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 sign in to comment