Commit 7c5900da by 施宇

分页

parent c555a923
{"ignoreds":["node_modules/**/*","**/node_modules/**","**/.git/**",".git/**/*","**/.svn/**",".svn/**/*",".DS_Store","**/.DS_Store"],"folderInfo":{"./":{"mtimeMs":1588039958728.2603,"children":["app.js","app.json","app.wxss","project.config.json","sitemap.json"]},"pages/":{"mtimeMs":1588761186704.5857,"children":[]},"res/":{"mtimeMs":1587987929535.54,"children":[]},"res/css/":{"mtimeMs":1587468648224.7944,"children":["res/css/base.wxss"]},"res/img/":{"mtimeMs":1589272520160.337,"children":["res/img/all-check-left-a.png","res/img/all-check-left.png","res/img/all-check-right-a.png","res/img/all-check-right.png","res/img/ck-icon-a.png","res/img/ck-icon.png","res/img/close-icon.png","res/img/confirm.png","res/img/kc-icon-a.png","res/img/kc-icon.png","res/img/login-img.png","res/img/login-text.png","res/img/nav-arrow-down.png","res/img/question-icon.png","res/img/search-icon.png","res/img/sh-icon-a.png","res/img/sh-icon.png","res/img/sigle-check-left-a.png","res/img/sigle-check-left.png","res/img/sigle-check-right-a.png","res/img/sigle-check-right.png","res/img/sj-icon-a.png","res/img/sj-icon.png","res/img/sz-icon-a.png","res/img/sz-icon.png","res/img/warn-icon.png"]},"utils/":{"mtimeMs":1588729595864.972,"children":["utils/api.js","utils/axios.js","utils/md5.js","utils/printerjobs.js","utils/textEncoding.js","utils/util.js"]},".git/":{"mtimeMs":1589280623339.0547,"children":[]},".wechatide/":{"mtimeMs":1587519550088.0625,"children":[".wechatide/fileCache.cfg"]},"pages/home/":{"mtimeMs":1587536014892.4702,"children":["pages/home/home.js","pages/home/home.json","pages/home/home.wxml","pages/home/home.wxss"]},"pages/login/":{"mtimeMs":1587535974795.0686,"children":["pages/login/login.js","pages/login/login.json","pages/login/login.wxml","pages/login/login.wxss"]},"components/":{"mtimeMs":1587538211879.0247,"children":[]},"components/navC/":{"mtimeMs":1587538221287.4016,"children":["components/navC/navC.js","components/navC/navC.json","components/navC/navC.wxml","components/navC/navC.wxss"]},"pages/receivinggoods/":{"mtimeMs":1587538742321.587,"children":["pages/receivinggoods/receivinggoods.js","pages/receivinggoods/receivinggoods.json","pages/receivinggoods/receivinggoods.wxml","pages/receivinggoods/receivinggoods.wxss"]},"pages/upperShelf/":{"mtimeMs":1587622056930.153,"children":["pages/upperShelf/upperShelf.js","pages/upperShelf/upperShelf.json","pages/upperShelf/upperShelf.wxml","pages/upperShelf/upperShelf.wxss"]},"pages/outbound/":{"mtimeMs":1587626008346.8442,"children":["pages/outbound/outbound.js","pages/outbound/outbound.json","pages/outbound/outbound.wxml","pages/outbound/outbound.wxss"]},"pages/scanDelivery/":{"mtimeMs":1587627596586.3196,"children":["pages/scanDelivery/scanDelivery.js","pages/scanDelivery/scanDelivery.json","pages/scanDelivery/scanDelivery.wxml","pages/scanDelivery/scanDelivery.wxss"]},"pages/picking/":{"mtimeMs":1587631234329.3645,"children":["pages/picking/picking.js","pages/picking/picking.json","pages/picking/picking.wxml","pages/picking/picking.wxss"]},"pages/cardBoard/":{"mtimeMs":1587632724321.1174,"children":["pages/cardBoard/cardBoard.js","pages/cardBoard/cardBoard.json","pages/cardBoard/cardBoard.wxml","pages/cardBoard/cardBoard.wxss"]},"pages/changeWarehouse/":{"mtimeMs":1587635396534.957,"children":["pages/changeWarehouse/changeWarehouse.js","pages/changeWarehouse/changeWarehouse.json","pages/changeWarehouse/changeWarehouse.wxml","pages/changeWarehouse/changeWarehouse.wxss"]},"pages/systemSettings/":{"mtimeMs":1587637181028.4365,"children":["pages/systemSettings/systemSettings.js","pages/systemSettings/systemSettings.json","pages/systemSettings/systemSettings.wxml","pages/systemSettings/systemSettings.wxss"]},"pages/printer/":{"mtimeMs":1587637593187.5686,"children":["pages/printer/printer.js","pages/printer/printer.json","pages/printer/printer.wxml","pages/printer/printer.wxss"]},"pages/inventoryQuery/":{"mtimeMs":1587639536186.8396,"children":["pages/inventoryQuery/inventoryQuery.js","pages/inventoryQuery/inventoryQuery.json","pages/inventoryQuery/inventoryQuery.wxml","pages/inventoryQuery/inventoryQuery.wxss"]},"pages/startPage/":{"mtimeMs":1588045543126.067,"children":["pages/startPage/startPage.js","pages/startPage/startPage.json","pages/startPage/startPage.wxml","pages/startPage/startPage.wxss"]},"pages/mountingPlate/":{"mtimeMs":1588761190467.1958,"children":["pages/mountingPlate/mountingPlate.js","pages/mountingPlate/mountingPlate.json","pages/mountingPlate/mountingPlate.wxml","pages/mountingPlate/mountingPlate.wxss"]}},"cacheVersion":1}
\ No newline at end of file
{"ignoreds":["node_modules/**/*","**/node_modules/**","**/.git/**",".git/**/*","**/.svn/**",".svn/**/*",".DS_Store","**/.DS_Store"],"folderInfo":{"./":{"mtimeMs":1588039958728.2603,"children":["app.js","app.json","app.wxss","project.config.json","sitemap.json"]},"pages/":{"mtimeMs":1588761186704.5857,"children":[]},"res/":{"mtimeMs":1587987929535.54,"children":[]},"res/css/":{"mtimeMs":1587468648224.7944,"children":["res/css/base.wxss"]},"res/img/":{"mtimeMs":1589272520160.337,"children":["res/img/all-check-left-a.png","res/img/all-check-left.png","res/img/all-check-right-a.png","res/img/all-check-right.png","res/img/ck-icon-a.png","res/img/ck-icon.png","res/img/close-icon.png","res/img/confirm.png","res/img/kc-icon-a.png","res/img/kc-icon.png","res/img/login-img.png","res/img/login-text.png","res/img/nav-arrow-down.png","res/img/question-icon.png","res/img/search-icon.png","res/img/sh-icon-a.png","res/img/sh-icon.png","res/img/sigle-check-left-a.png","res/img/sigle-check-left.png","res/img/sigle-check-right-a.png","res/img/sigle-check-right.png","res/img/sj-icon-a.png","res/img/sj-icon.png","res/img/sz-icon-a.png","res/img/sz-icon.png","res/img/warn-icon.png"]},"utils/":{"mtimeMs":1588729595864.972,"children":["utils/api.js","utils/axios.js","utils/md5.js","utils/printerjobs.js","utils/textEncoding.js","utils/util.js"]},".git/":{"mtimeMs":1589353031497.8342,"children":[]},".wechatide/":{"mtimeMs":1587519550088.0625,"children":[".wechatide/fileCache.cfg"]},"pages/home/":{"mtimeMs":1587536014892.4702,"children":["pages/home/home.js","pages/home/home.json","pages/home/home.wxml","pages/home/home.wxss"]},"pages/login/":{"mtimeMs":1587535974795.0686,"children":["pages/login/login.js","pages/login/login.json","pages/login/login.wxml","pages/login/login.wxss"]},"components/":{"mtimeMs":1589359297584.9631,"children":[]},"components/navC/":{"mtimeMs":1587538221287.4016,"children":["components/navC/navC.js","components/navC/navC.json","components/navC/navC.wxml","components/navC/navC.wxss"]},"pages/receivinggoods/":{"mtimeMs":1587538742321.587,"children":["pages/receivinggoods/receivinggoods.js","pages/receivinggoods/receivinggoods.json","pages/receivinggoods/receivinggoods.wxml","pages/receivinggoods/receivinggoods.wxss"]},"pages/upperShelf/":{"mtimeMs":1587622056930.153,"children":["pages/upperShelf/upperShelf.js","pages/upperShelf/upperShelf.json","pages/upperShelf/upperShelf.wxml","pages/upperShelf/upperShelf.wxss"]},"pages/outbound/":{"mtimeMs":1587626008346.8442,"children":["pages/outbound/outbound.js","pages/outbound/outbound.json","pages/outbound/outbound.wxml","pages/outbound/outbound.wxss"]},"pages/scanDelivery/":{"mtimeMs":1587627596586.3196,"children":["pages/scanDelivery/scanDelivery.js","pages/scanDelivery/scanDelivery.json","pages/scanDelivery/scanDelivery.wxml","pages/scanDelivery/scanDelivery.wxss"]},"pages/picking/":{"mtimeMs":1587631234329.3645,"children":["pages/picking/picking.js","pages/picking/picking.json","pages/picking/picking.wxml","pages/picking/picking.wxss"]},"pages/cardBoard/":{"mtimeMs":1587632724321.1174,"children":["pages/cardBoard/cardBoard.js","pages/cardBoard/cardBoard.json","pages/cardBoard/cardBoard.wxml","pages/cardBoard/cardBoard.wxss"]},"pages/changeWarehouse/":{"mtimeMs":1587635396534.957,"children":["pages/changeWarehouse/changeWarehouse.js","pages/changeWarehouse/changeWarehouse.json","pages/changeWarehouse/changeWarehouse.wxml","pages/changeWarehouse/changeWarehouse.wxss"]},"pages/systemSettings/":{"mtimeMs":1587637181028.4365,"children":["pages/systemSettings/systemSettings.js","pages/systemSettings/systemSettings.json","pages/systemSettings/systemSettings.wxml","pages/systemSettings/systemSettings.wxss"]},"pages/printer/":{"mtimeMs":1587637593187.5686,"children":["pages/printer/printer.js","pages/printer/printer.json","pages/printer/printer.wxml","pages/printer/printer.wxss"]},"pages/inventoryQuery/":{"mtimeMs":1587639536186.8396,"children":["pages/inventoryQuery/inventoryQuery.js","pages/inventoryQuery/inventoryQuery.json","pages/inventoryQuery/inventoryQuery.wxml","pages/inventoryQuery/inventoryQuery.wxss"]},"pages/startPage/":{"mtimeMs":1588045543126.067,"children":["pages/startPage/startPage.js","pages/startPage/startPage.json","pages/startPage/startPage.wxml","pages/startPage/startPage.wxss"]},"pages/mountingPlate/":{"mtimeMs":1588761190467.1958,"children":["pages/mountingPlate/mountingPlate.js","pages/mountingPlate/mountingPlate.json","pages/mountingPlate/mountingPlate.wxml","pages/mountingPlate/mountingPlate.wxss"]},"components/page/":{"mtimeMs":1589359297677.0674,"children":["components/page/page.acss","components/page/page.axml","components/page/page.js","components/page/page.json"]}},"cacheVersion":1}
\ No newline at end of file
......@@ -2,11 +2,14 @@
"pages": [
"pages/startPage/startPage",
"pages/receivinggoods/receivinggoods",
"pages/inventoryQuery/inventoryQuery",
"pages/upperShelf/upperShelf",
"pages/receivinggoods/receivinggoods",
"pages/picking/picking",
......
Component({
data: {
prev:"<"
},
properties: {
len: {
type: Number
},
now: {
type: Number
},
},
methods: {
getData(e) {
let { p } = e.currentTarget.dataset;
if (p <= 0 || p > this.data.len) return false
this.triggerEvent('page',p)
}
},
});
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="pages-view" wx:if="{{len>1}}">
<text class="{{now<=1?'disabled':''}}" bindtap="getData" data-p="{{now-1}}">{{prev}}</text>
<block wx:if="{{len<= 6 || (len === 7 && now === 4)}}">
<text wx:for="{{len}}" class="{{item+1 === now?'active':''}}" bindtap="getData" data-p="{{item+1}}">{{ item+1 }}</text>
</block>
<block wx:elif="{{now<= 4 && now< len - 3}}">
<text wx:for="{{len+2}}" class="{{item+1 === now?'active':''}}" bindtap="getData" wx:if="{{item+1< (now + 3)}}" data-p="{{item+1}}">{{ item+1 }}</text>
<text>...</text>
<text bindtap="getData" data-p="{{len}}">{{len}}</text>
</block>
<block wx:elif="{{now > 4 && now >= (len - 3)}}">
<text bindtap="getData" data-p="{{1}}">1</text>
<text>...</text>
<text wx:for="{{len}}" class="{{item+1 === now?'active':''}}" bindtap="getData" wx:if="{{item+1 > (now - 3) && item+1< (now + 4)}}" data-p="{{item+1}}">{{ item+1 }}</text>
</block>
<block wx:else>
<text bindtap="getData" data-p="{{1}}">1</text>
<text>...</text>
<text wx:for="{{now+2}}" class="{{item+1 === now?'active':''}}" bindtap="getData" wx:if="{{item+1 > (now - 3)}}" data-p="{{item+1}}">{{ item+1 }}</text>
<text>...</text>
<text bindtap="getData" data-p="{{len}}">{{len}}</text>
</block>
<text class="{{now>=len?'disabled':''}}" bindtap="getData" data-p="{{now+1}}">></text>
</view>
\ No newline at end of file
.pages-view {
margin: 20px 0 20px;
box-shadow: 5px 5px 5px #e0e6f3, -5px 5px 5px #e0e6f3;
display: inline-block;
}
.pages-view text {
display: inline-block;
padding: 0 15px;
text-align: center;
line-height: 35px;
height: 35px;
color: #999;
background: #fff;
cursor: pointer;
}
.pages-view text.active {
background: #1969F9;
color: #fff;
}
.pages-view text.disabled {
background: #f3eded;
color: #c7c1c1;
}
\ No newline at end of file
......@@ -21,6 +21,16 @@ Page({
hwList:[],
isShow:false,
inputIsScan:true,//input框是否是通过扫描获得数据
len:0,
now:1
},
getPage(e){
let p = e.detail;
console.log(p)
this.setData({
now:p
});
this.getTableData()
},
xhConfirm:function(e){
console.log('点击确认')
......@@ -28,6 +38,7 @@ Page({
let reg = /^(XB|KB)\d{11}$/;
let newVal = value;
if(!reg.test(value)){
console.log(this.data.inputIsScan)
//箱号要判断是手输入的还是扫码枪扫描的
if(this.data.inputIsScan){
//扫码枪扫描的需要解析数据
......@@ -41,14 +52,22 @@ Page({
});
},
emitInput1:function(){
console.log('失去焦点')
focusInput:function(e){
let {value} = e.detail ;
let inputIsScan = this.data.inputIsScan;
if(value){
if(inputIsScan){
this.setData({
inputIsScan:false
})
}
}else{
if(!inputIsScan){
this.setData({
inputIsScan:true
})
}
}
},
hiddenInput:function(){
this.setData({
......@@ -114,13 +133,21 @@ Page({
warehousing_sn:me.data.rcVal,
box_sn:me.data.xVal,
pallet_sn:me.data.kbVal,
location_sn:me.data.hwVal
location_sn:me.data.hwVal,
page:me.data.now,
limit:10
}
getData(apis.inquire_stock, 'post', {...obj}, function(res) {
if (res.errcode === 0) {
let data = res.data;
let total = 0;
if(res.total){
total = Math.ceil(res.total/10)
}
console.log(total)
me.setData({
dataList:data
dataList:data,
len:total
})
} else {
......
{
"usingComponents": { "nav-c": "/components/navC/navC"},
"usingComponents": { "nav-c": "/components/navC/navC","page-c": "/components/page/page"},
"pageOrientation":"landscape",
"navigationBarBackgroundColor":"#094B8D"
}
\ No newline at end of file
......@@ -3,7 +3,7 @@
<view class="inventory-query-wrapper">
<view class="view-top Bflex aic">
<text class="desc noMarginLeft">型号:</text>
<input class="input input-border" bindinput="xhInput" bindblur="emitInput1" bindconfirm="xhConfirm" confirm-type="done"></input>
<input class="input input-border" bindinput="xhInput" bindfocus="focusInput" bindconfirm="xhConfirm" confirm-type="done"></input>
<text class="desc">入仓单号:</text>
<input class="input input-border" bindinput="rcInput" confirm-type="done"></input>
<text class="desc">箱号:</text>
......@@ -89,6 +89,7 @@
</view>
</view>
<page-c len="{{len}}" now="{{now}}" bind:page="getPage"></page-c>
</view>
</view>
</nav-c>
\ No newline at end of file
......@@ -34,15 +34,25 @@ Page({
onLoad: function (options) {
},
emitInput1:function(){
focusInput:function(e){
let {value} = e.detail ;
let inputIsScan = this.data.inputIsScan;
if(value){
if(inputIsScan){
this.setData({
inputIsScan:false
})
}
}else{
if(!inputIsScan){
this.setData({
inputIsScan:true
})
}
}
},
emitInput:function(){
emitInput:function(e){
let {value} = e.detail ;
let inputIsScan = this.data.inputIsScan;
if(value){
if(inputIsScan){
......@@ -149,6 +159,7 @@ Page({
},
kbConfirm:function(e){
console.log(222)
let {value} = e.detail ;
let RegXb = /^(XB)\d{11}$/;
let RegKb = /^(KB)\d{11}$/;
......
......@@ -7,7 +7,7 @@
<text class="desc">货位号:</text>
<input class="input input-border" value="{{hwVal}}" bindconfirm="hwConfirm" focus="{{isHw}}" confirm-type="search"></input>
<text class="desc">卡板号/箱号/型号:</text>
<input class="input input-border" value="{{kbVal}}" bindconfirm="kbConfirm" focus="{{isKb}}" bindinput="emitInput" bindblur="emitInput1" confirm-type="search"></input>
<input class="input input-border" value="{{kbVal}}" bindconfirm="kbConfirm" focus="{{isKb}}" bindinput="emitInput" confirm-type="search" bindfocus="focusInput"></input>
<view class="number">
拣货任务号: <text>{{rwVal}}</text>
</view>
......
......@@ -642,15 +642,25 @@ onUnload:function(){
orderZl:value
})
},
emitInput1:function(){
focusInput:function(e){
let {value} = e.detail ;
let inputIsScan = this.data.inputIsScan;
if(value){
if(inputIsScan){
this.setData({
inputIsScan:false
})
}
}else{
if(!inputIsScan){
this.setData({
inputIsScan:true
})
}
}
},
emitInput:function(value){
emitInput:function(e){
let {value} = e.detail ;
let inputIsScan = this.data.inputIsScan;
if(value){
if(inputIsScan){
......
......@@ -62,7 +62,7 @@
<view class="form-bottom-left ">
<view class="form-bottom-left-view Bflex aic">
<text class="label">条码</text>
<input class="input input-border" bindconfirm="formtmInput" value="{{formData.tm}}" bindinput="emitInput" bindblur="emitInput1" confirm-type="done"></input>
<input class="input input-border" bindconfirm="formtmInput" value="{{formData.tm}}" bindinput="emitInput" confirm-type="done" bindfocus="focusInput"></input>
</view>
<view class="form-bottom-left-view Bflex aic">
<text class="label">型号</text>
......
......@@ -25,7 +25,6 @@ Page({
type:"0",//1 卡板 2//箱子 3 型号
receivingId:"",
inputIsScan:true,//input框是否是通过扫描获得数据
},
/**
......@@ -34,15 +33,25 @@ Page({
onLoad: function (options) {
},
emitInput1:function(){
focusInput:function(e){
let {value} = e.detail ;
let inputIsScan = this.data.inputIsScan;
if(value){
if(inputIsScan){
this.setData({
inputIsScan:false
})
}
}else{
if(!inputIsScan){
this.setData({
inputIsScan:true
})
}
}
},
emitInput:function(value){
emitInput:function(e){
let {value} = e.detail ;
let inputIsScan = this.data.inputIsScan;
if(value){
if(inputIsScan){
......
......@@ -5,7 +5,7 @@
<text class="desc">上架任务号:</text>
<input class="input input-border" bindconfirm="rwConfirm" value="{{rwVal}}" confirm-type="search"></input>
<text class="desc">卡板号/箱号/型号:</text>
<input class="input input-border" bindconfirm="kbConfirm" focus="{{isKb}}" value="{{kbVal}}" bindinput="emitInput" bindblur="emitInput1" confirm-type="search"></input>
<input class="input input-border" bindconfirm="kbConfirm" focus="{{isKb}}" value="{{kbVal}}" bindinput="emitInput" confirm-type="search" bindfocus="focusInput"></input>
<text class="desc">货位号:</text>
<input class="input input-border" bindconfirm="hwConfirm" focus="{{isHw}}" value="{{hwVal}}" confirm-type="search"></input>
<view class="number">
......@@ -17,7 +17,7 @@
</view>
</view>
<view class="table-view">
<view class="data-table borderBox">
<view class="data-table borderBox ">
<view class="head Bflex">
<view class="td-1 td borderBox Iflex jcc aic td-140"><text>上架任务号</text></view>
<view class="td-2 td borderBox Iflex jcc aic"><text>状态</text></view>
......
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