盘点
This commit is contained in:
@@ -37,7 +37,9 @@
|
||||
"pages/storeInfo/index",
|
||||
"pages/siyutong/index",
|
||||
"pages/siyutong/activityDetail/index",
|
||||
"pages/siyutong/activityRanking/index"
|
||||
"pages/siyutong/activityRanking/index",
|
||||
"pages/inventory/detail/index",
|
||||
"pages/inventory/list/index"
|
||||
],
|
||||
"echarts": [
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
.img-135x135{width:135rpx;height:135rpx;box-sizing:border-box;}
|
||||
.img-140x140{width:140rpx;height:140rpx;box-sizing:border-box;}
|
||||
.img-160x160{width:160rpx;height:160rpx;box-sizing:border-box;}
|
||||
.img-190x175{width:190rpx;height:175rpx;box-sizing:border-box;}
|
||||
.img-200x180{width:200rpx;height:180rpx;box-sizing:border-box;}
|
||||
.img-208x170{width:208rpx;height:170rpx;box-sizing:border-box;}
|
||||
.img-220x200{width:220rpx;height:200rpx;box-sizing:border-box;}
|
||||
|
||||
@@ -119,6 +119,12 @@ api = {
|
||||
appSytactivityDetail:'app/sytactivity/detail', //活动详情
|
||||
appSytactivityLog:'app/sytactivity/log', //实时战报
|
||||
appSytactivityRanking:'app/sytactivity/ranking', //活动排名
|
||||
|
||||
appInventoryTabs:'app/inventory/tabs', //盘点记录_tab
|
||||
appInventoryLists:'app/inventory/lists', //盘点记录
|
||||
appInventory:'app/inventory', //盘点详情 /盘点上传图片
|
||||
appInventoryRemind:'app/inventory/remind', //盘点提醒
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -762,4 +762,39 @@ apiQuery.getAppSytactivityRanking = function (params) {
|
||||
})
|
||||
}
|
||||
|
||||
//盘点记录_tab
|
||||
apiQuery.getAppInventoryTabs = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appInventoryTabs, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//盘点列表
|
||||
apiQuery.getAppInventoryLists = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appInventoryLists, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//盘点详情
|
||||
apiQuery.getAppInventory = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appInventory, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//确认盘点
|
||||
apiQuery.postAppInventory = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(true, Config.api.appInventory, 2, params, "POST", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//盘点提醒
|
||||
apiQuery.getAppInventoryRemind = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appInventoryRemind, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
export default apiQuery;
|
||||
+68
-39
@@ -43,42 +43,8 @@ Page({
|
||||
isShowProfile:true,//是否显示授权用户信息按钮
|
||||
banneractive: 0,
|
||||
banneractive2: 0,
|
||||
remind:[
|
||||
{
|
||||
title:'调拨提醒',
|
||||
content:'您有新的车辆调拨,需要您进行确认操作。',
|
||||
img:'https://qs.haodian.cn/wechat_app/lichebao/allot/car.gif?v=220224',
|
||||
btn:{
|
||||
title:'前往操作',
|
||||
url:'/pages/allot/list/index',
|
||||
},
|
||||
},
|
||||
{
|
||||
title:'盘点提醒',
|
||||
content:'您有新的车辆盘点,需要您进行确认操作。',
|
||||
img:'https://qs.haodian.cn/wechat_app/lichebao/inventory/animation.gif',
|
||||
btn:{
|
||||
title:'前往操作',
|
||||
url:'/pages/inventory/list/index',
|
||||
},
|
||||
},
|
||||
],
|
||||
remind2:[
|
||||
{
|
||||
title:'车辆调拨',
|
||||
content:'您有新的车辆调拨,需要您进行确认操作。',
|
||||
img:'https://qs.haodian.cn/wechat_app/lichebao/allot/car.gif?v=220224',
|
||||
url:'/pages/allot/list/index',
|
||||
allotNum:'1',
|
||||
},
|
||||
{
|
||||
title:'车辆盘点',
|
||||
content:'您有新的车辆调拨,需要您进行确认操作。',
|
||||
img:'https://qs.haodian.cn/wechat_app/lichebao/inventory/icon.png',
|
||||
url:'/pages/inventory/list/index',
|
||||
allotNum:'2',
|
||||
},
|
||||
],
|
||||
remindTab:[],
|
||||
remindMsg:[],
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
@@ -107,9 +73,14 @@ Page({
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
this.setData({
|
||||
remindTab:[],
|
||||
remindMsg:[],
|
||||
});
|
||||
this.getAppUserCal()
|
||||
this.getHoursTip()
|
||||
this.getAppTransferRemind()
|
||||
this.getAppInventoryRemind()
|
||||
},
|
||||
|
||||
//生命周期函数--监听页面卸载
|
||||
@@ -148,11 +119,64 @@ Page({
|
||||
//调拨提醒
|
||||
getAppTransferRemind(){
|
||||
_.apiQuery.getAppTransferRemind().then(res => {
|
||||
this.setData({
|
||||
allotNum: res.data.total,
|
||||
})
|
||||
if(res.data.total>0){
|
||||
let remindTab = this.data.remindTab
|
||||
remindTab.push({
|
||||
title:'车辆调拨',
|
||||
content:'您有新的车辆调拨,需要您进行确认操作。',
|
||||
img:'https://qs.haodian.cn/wechat_app/lichebao/allot/car.gif?v=220224',
|
||||
url:'/pages/allot/list/index',
|
||||
allotNum:res.data.total,
|
||||
})
|
||||
let remindMsg = this.data.remindMsg
|
||||
remindMsg.push({
|
||||
title:'调拨提醒',
|
||||
content:'您有新的车辆调拨,需要您进行确认操作。',
|
||||
img:'https://qs.haodian.cn/wechat_app/lichebao/allot/car.gif?v=220224',
|
||||
btn:{
|
||||
title:'前往操作',
|
||||
url:'/pages/allot/list/index',
|
||||
},
|
||||
})
|
||||
this.setData({
|
||||
remindTab,
|
||||
remindMsg,
|
||||
isShowReport:true,
|
||||
isShowNotice:false,
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
isShowReport:false,
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//盘点提醒
|
||||
getAppInventoryRemind(){
|
||||
_.apiQuery.getAppInventoryRemind().then(res => {
|
||||
if(res.data.total>0){
|
||||
let remindTab = this.data.remindTab
|
||||
remindTab.push({
|
||||
title:'车辆盘点',
|
||||
content:'您有新的车辆调拨,需要您进行确认操作。',
|
||||
img:'https://qs.haodian.cn/wechat_app/lichebao/inventory/icon.png',
|
||||
url:'/pages/inventory/list/index',
|
||||
allotNum:res.data.total,
|
||||
})
|
||||
let remindMsg = this.data.remindMsg
|
||||
remindMsg.push({
|
||||
title:'盘点提醒',
|
||||
content:'您有新的车辆盘点,需要您进行确认操作。',
|
||||
img:'https://qs.haodian.cn/wechat_app/lichebao/inventory/animation.gif',
|
||||
btn:{
|
||||
title:'前往操作',
|
||||
url:'/pages/inventory/list/index',
|
||||
},
|
||||
})
|
||||
this.setData({
|
||||
remindTab,
|
||||
remindMsg,
|
||||
isShowReport:true,
|
||||
isShowNotice:false,
|
||||
})
|
||||
@@ -346,10 +370,15 @@ Page({
|
||||
|
||||
//页面相关事件处理函数--监听用户下拉动作
|
||||
onPullDownRefresh: function () {
|
||||
this.setData({
|
||||
remindTab:[],
|
||||
remindMsg:[],
|
||||
});
|
||||
this.getAppUserCal()
|
||||
this.getAppStatisticsHcust()
|
||||
this.getAppStatisticsHorder()
|
||||
this.getAppTransferRemind()
|
||||
this.getAppInventoryRemind()
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
</view>
|
||||
<!--客户代办事项 订单代办事项 -->
|
||||
<view class="bg-fff box-shadow-000-10-10 ulib-r10">
|
||||
<view class="bg-ffedeb ulib-rt10" style="height:140rpx;" wx:if="{{allotNum>-1}}">
|
||||
<view class="bg-ffedeb ulib-rt10" style="height:140rpx;" wx:if="{{remindTab.length > 0}}">
|
||||
<view class="relative pt30 pl30 pr30">
|
||||
<swiper class='wp100' style="height:90rpx;" autoplay circular bindchange="bannerChange2">
|
||||
<swiper-item class="wp100 relative pl110 pr110" wx:for="{{remind2}}" wx:key="index" bindtap="pushLink" data-url="{{item.url}}">
|
||||
<swiper-item class="wp100 relative pl110 pr110" wx:for="{{remindTab}}" wx:key="index" bindtap="pushLink" data-url="{{item.url}}">
|
||||
<image class='block absolute left-0 box-middle img-90x90 ulib-r750 z-index-1' mode="aspectFill" src='{{item.img}}' lazy-load="{{true}}"></image>
|
||||
<view class="color-f9394d">
|
||||
<view class="font-32">{{item.title}}</view>
|
||||
@@ -50,8 +50,8 @@
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="absolute left-0 right-0 text-center" style='bottom:-20rpx;height:20rpx' wx:if="{{remind2.length > 1}}">
|
||||
<block wx:for-items="{{remind2}}" wx:for-index="j" wx:key='j'>
|
||||
<view class="absolute left-0 right-0 text-center" style='bottom:-20rpx;height:20rpx' wx:if="{{remindTab.length > 1}}">
|
||||
<block wx:for-items="{{remindTab}}" wx:for-index="j" wx:key='j'>
|
||||
<view class="inline-block indicator-pin2 {{banneractive2==j?'active':''}}"></view>
|
||||
</block>
|
||||
</view>
|
||||
@@ -177,7 +177,7 @@
|
||||
<lcb-msg isShow="{{isShowReport}}">
|
||||
<view slot="content">
|
||||
<swiper class='wp100' style="height:550rpx;" autoplay circular bindchange="bannerChange">
|
||||
<swiper-item class="relative" wx:for="{{remind}}" wx:key="index">
|
||||
<swiper-item class="relative" wx:for="{{remindMsg}}" wx:key="index">
|
||||
<view class="pt40 pl40 pr40">
|
||||
<view class="font-36 text-center">{{item.title}}</view>
|
||||
<view class="mt10 font-22 text-center color-999">{{item.content}}</view>
|
||||
@@ -191,8 +191,8 @@
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="absolute left-0 right-0 bottom-0 pb20 text-center" style='height:30rpx' wx:if="{{remind.length > 1}}">
|
||||
<block wx:for-items="{{remind}}" wx:for-index="j" wx:key='j'>
|
||||
<view class="absolute left-0 right-0 bottom-0 pb20 text-center" style='height:30rpx' wx:if="{{remindMsg.length > 1}}">
|
||||
<block wx:for-items="{{remindMsg}}" wx:for-index="j" wx:key='j'>
|
||||
<view class="inline-block indicator-pin {{banneractive==j?'active':''}}"></view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
import _ from '../../../commons/js/commons'
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
imgUrl:_.config.imgUrl,
|
||||
isShowTransfer:false,//是否显示确认弹窗
|
||||
car_img:[],//请上传运输单
|
||||
id:'',//查看id
|
||||
mileage:'',//里程数
|
||||
},
|
||||
onLoad: function (options) {
|
||||
for (let key in options) {
|
||||
this.setData({
|
||||
[key]: options[key]
|
||||
})
|
||||
}
|
||||
|
||||
this.getAppInventory()
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
//获取订单详情
|
||||
getAppInventory(){
|
||||
let params = {};
|
||||
if(this.data.id != ''){
|
||||
params['id'] = this.data.id;
|
||||
}
|
||||
_.apiQuery.getAppInventory(params).then(res=>{
|
||||
this.setData({
|
||||
info:res.data,
|
||||
car_img:res.data.car_img,
|
||||
mileage:res.data.mileage?res.data.mileage:'',
|
||||
})
|
||||
|
||||
wx.stopPullDownRefresh()
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
//选择图片
|
||||
chooseImg(e) {
|
||||
let that = this
|
||||
wx.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
||||
success(res1) {
|
||||
wx.showLoading({
|
||||
title: '图片上传中',
|
||||
})
|
||||
wx.uploadFile({
|
||||
url: _.config.api.upImg,
|
||||
filePath: res1.tempFilePaths[0],
|
||||
name: 'img',
|
||||
formData: {
|
||||
'app': 'liche'
|
||||
},
|
||||
success(res) {
|
||||
setTimeout(function () {
|
||||
wx.hideLoading()
|
||||
}, 500);
|
||||
let imgdata = JSON.parse(res.data)
|
||||
that.setData({
|
||||
['car_img['+e.currentTarget.dataset.index+'].src']:imgdata.data.full_url,
|
||||
['car_img['+e.currentTarget.dataset.index+'].value']:imgdata.data.url,
|
||||
})
|
||||
},
|
||||
fail(res) {
|
||||
wx.hideLoading()
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: res => {
|
||||
wx.showToast({
|
||||
title: '文件选择失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//显示报备异常弹框
|
||||
optShowReport(e){
|
||||
this.setData({
|
||||
isShowReport:!this.data.isShowReport,
|
||||
photos:[],
|
||||
note:'',
|
||||
optid:e.currentTarget.dataset.id?e.currentTarget.dataset.id:'',
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
//推送链接
|
||||
pushLink(e){
|
||||
if(e.currentTarget.dataset.url){
|
||||
_.$router.openUrlScheme(e.currentTarget.dataset.url)
|
||||
}
|
||||
},
|
||||
|
||||
//确认盘点信息
|
||||
postAppInventory() {
|
||||
let that = this
|
||||
if (that.data.mileage == ''){
|
||||
wx.showToast({
|
||||
title: '请填定里程数',
|
||||
icon: 'none'
|
||||
})
|
||||
}else{
|
||||
that.setData({
|
||||
submitFlag: true,
|
||||
})
|
||||
|
||||
let params = {};
|
||||
params['id'] = that.data.id;
|
||||
params['car_img'] = that.data.car_img;
|
||||
params['mileage'] = that.data.mileage;
|
||||
_.apiQuery.postAppInventory(params).then(res => {
|
||||
|
||||
let pages = getCurrentPages();
|
||||
let prevPage = null; //上一个页面
|
||||
if (pages.length >= 2) {
|
||||
prevPage = pages[pages.length - 2]; //上一个页面
|
||||
if(prevPage.route == 'pages/inventory/list/index'){
|
||||
prevPage.onPullDownRefresh()
|
||||
}
|
||||
}
|
||||
|
||||
that.onPullDownRefresh()
|
||||
|
||||
that.setData({
|
||||
submitFlag: false,
|
||||
})
|
||||
wx.showModal({
|
||||
title: '操作成功',
|
||||
content: '',
|
||||
confirmText: "返回",
|
||||
confirmColor: "#36afa2",
|
||||
showCancel:false,
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
wx.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}).catch(res=>{
|
||||
that.setData({
|
||||
submitFlag: false,
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
//页面相关事件处理函数--监听用户下拉动作
|
||||
onPullDownRefresh(){
|
||||
this.getAppInventory()
|
||||
},
|
||||
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "盘点详情",
|
||||
"usingComponents": {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<view class="container">
|
||||
<view class="inner30 {{info.status==1?'pb200':'pb100'}}">
|
||||
<view class="relative bg-fff ulib-r10 box-shadow-000-10-10">
|
||||
<view class="inner40">
|
||||
<view class="font-40">{{info.biz_name}}</view>
|
||||
<block wx:for="{{info.other_data}}" wx:key='i'>
|
||||
<view class="mt25 fn-clear font-28 color-666">
|
||||
<view class="fn-fl">{{item.title}}</view>
|
||||
<view class="fn-fr wp60 text-right" wx:if="{{item.list}}">
|
||||
<block wx:for="{{item.list}}" wx:for-item="it" wx:key='i'>
|
||||
<text class="inline-block ml5 mr5 pl10 pr10 bg-999 font-22 color-fff ulib-r750">{{it}}</text>
|
||||
</block>
|
||||
</view>
|
||||
<view class="fn-fr wp60 text-nowrap text-right" wx:elif="{{item.value}}">{{item.value}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="pb40">
|
||||
<view class="pl40 pr40 font-32">盘点信息</view>
|
||||
<view class="mt20 pl30">
|
||||
<block wx:for="{{car_img}}" wx:key='index'>
|
||||
<view class="inline-block ml10 mr10 text-center ulib-r10 overflowhidden" bindtap="chooseImg" data-index="{{index}}" wx:if="{{item.value}}">
|
||||
<view class="bg-f8 img-190x175 relative ulib-r10">
|
||||
<i class="absolute top-0 right-0 bg-000-op50 iconfont icon-shuaxin inner10 font-26 color-fff ulib-rtr10 ulib-rbl10 z-index-1"></i>
|
||||
<view class="absolute left-0 right-0 box-middle color-ccc">
|
||||
<image class='img-190x175 ulib-r10' src='{{item.src}}' mode='aspectFill'></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt10 font-24 color-666">{{item.title}}</view>
|
||||
</view>
|
||||
|
||||
<view class="inline-block ml10 mr10 text-center ulib-r10 overflowhidden" bindtap="chooseImg" data-index="{{index}}" wx:else>
|
||||
<view class="bg-f8 img-190x175 relative ulib-r10">
|
||||
<view class="absolute left-0 right-0 box-middle color-ccc">
|
||||
<i class="iconfont icon-paizhao font-48"></i>
|
||||
<view class="mt5 font-22">上传{{item.title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt10 font-24 color-666">{{item.title}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="relative mt30 pl40 pr100">
|
||||
<input class="wp100 pl20 pr20 bds-1-eb font-28 ulib-r10" placeholder-class="color-ccc" placeholder="请填写里程数" type="digit" style="height:70rpx;" model:value='{{mileage}}'/>
|
||||
<view class="absolute box-middle right-0 pr40 font-26 color-666">km</view>
|
||||
</view>
|
||||
<view class="mt40 pl40 pr40">
|
||||
<button disabled="{{submitFlag}}" bindtap="postAppInventory" class="btn-36afa2 wp100 pt10 pb10 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt30 font-24 color-999"><i class="mr5 iconfont icon-tishi"></i>请盘点以上对应信息。</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1 @@
|
||||
/* pages/allot/detail/index.wxss */
|
||||
@@ -0,0 +1,161 @@
|
||||
import _ from '../../../commons/js/commons'
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
list: [],//客户列表
|
||||
pageNo: 1,
|
||||
noData: false,
|
||||
end: false,
|
||||
load: true,
|
||||
loading: false,
|
||||
flag:1,
|
||||
s_date:'',
|
||||
e_date:'',
|
||||
|
||||
tabs_id:'',//分类 1进行中2已完成
|
||||
tab:[],
|
||||
channel:'',//是否来自渠道
|
||||
},
|
||||
onLoad: function (options) {
|
||||
for (let key in options) {
|
||||
this.setData({
|
||||
[key]: options[key]
|
||||
})
|
||||
}
|
||||
|
||||
if(this.data.title){
|
||||
wx.setNavigationBarTitle({
|
||||
title:this.data.title,
|
||||
})
|
||||
}
|
||||
|
||||
this.getAppInventoryTabs()
|
||||
},
|
||||
|
||||
//tab
|
||||
getAppInventoryTabs() {
|
||||
_.apiQuery.getAppInventoryTabs().then(res => {
|
||||
this.setData({
|
||||
tab:res.data,
|
||||
tabs_id:this.data.tabs_id==''?res.data[0].id:this.data.tabs_id,
|
||||
})
|
||||
|
||||
this.getAppInventoryLists()
|
||||
|
||||
wx.stopPullDownRefresh()
|
||||
});
|
||||
},
|
||||
|
||||
//切换tab
|
||||
changeTab(e){
|
||||
this.setData({
|
||||
tabs_id: this.data.tab[e.currentTarget.dataset.index].id,
|
||||
})
|
||||
this.searchSubmit()
|
||||
},
|
||||
|
||||
//获取客户列表
|
||||
getAppInventoryLists() {
|
||||
this.setData({
|
||||
load: false,
|
||||
loading: true,
|
||||
})
|
||||
let params = {};
|
||||
params['page'] = this.data.pageNo;
|
||||
params['size'] = 10;
|
||||
if(this.data.channel != ''){
|
||||
params['channel'] = this.data.channel;
|
||||
}
|
||||
if(this.data.tabs_id != ''){
|
||||
params['tabs_id'] = this.data.tabs_id;
|
||||
}
|
||||
if(this.data.s_date != ''){
|
||||
params['s_date'] = this.data.s_date;
|
||||
}
|
||||
if(this.data.e_date != ''){
|
||||
params['e_date'] = this.data.e_date;
|
||||
}
|
||||
_.apiQuery.getAppInventoryLists(params).then(res => {
|
||||
this.setData({
|
||||
flag: this.data.flag - 1
|
||||
})
|
||||
if (!this.data.flag) {
|
||||
this.setData({
|
||||
pageNo: this.data.pageNo + 1,
|
||||
list: this.data.list.concat(res.data.list),
|
||||
load: true,
|
||||
loading: false,
|
||||
})
|
||||
if (res.data.total == 0) {
|
||||
this.setData({
|
||||
noData: true
|
||||
})
|
||||
} else if (this.data.list.length == res.data.total) {
|
||||
this.setData({
|
||||
end: true
|
||||
})
|
||||
}
|
||||
}
|
||||
wx.stopPullDownRefresh()
|
||||
});
|
||||
},
|
||||
|
||||
//提交搜索
|
||||
searchSubmit(){
|
||||
this.setData({
|
||||
list: [],
|
||||
pageNo: 1,
|
||||
noData: false,
|
||||
end: false,
|
||||
load: true,
|
||||
loading: false,
|
||||
flag: this.data.flag + 1
|
||||
})
|
||||
this.getAppInventoryLists()
|
||||
},
|
||||
|
||||
//建卡时间
|
||||
startDate(e){
|
||||
this.setData({
|
||||
s_date: e.detail.value,
|
||||
})
|
||||
},
|
||||
|
||||
//建卡时间
|
||||
endDate(e){
|
||||
this.setData({
|
||||
e_date: e.detail.value,
|
||||
})
|
||||
},
|
||||
|
||||
//推送链接
|
||||
pushLink(e){
|
||||
if(e.currentTarget.dataset.url){
|
||||
_.$router.openUrlScheme(e.currentTarget.dataset.url)
|
||||
}
|
||||
},
|
||||
|
||||
//页面相关事件处理函数--监听用户下拉动作
|
||||
onPullDownRefresh(){
|
||||
this.setData({
|
||||
list: [],
|
||||
pageNo: 1,
|
||||
noData: false,
|
||||
end: false,
|
||||
load: true,
|
||||
loading: false,
|
||||
flag: this.data.flag + 1
|
||||
})
|
||||
this.getAppInventoryLists()
|
||||
},
|
||||
|
||||
//页面上拉触底事件的处理函数
|
||||
onReachBottom(){
|
||||
if (this.data.noData || this.data.end||!this.data.load) return;
|
||||
this.setData({
|
||||
flag: this.data.flag + 1
|
||||
})
|
||||
this.getAppInventoryLists()
|
||||
},
|
||||
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "盘点列表",
|
||||
"usingComponents": {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<view class="container">
|
||||
|
||||
<view>
|
||||
<view style="padding-top:110rpx"></view>
|
||||
<view class="fixed top-0 left-0 right-0 bg-fff z-index-1">
|
||||
<view class="fn-flex mt5 pl100 pr100 font-32 color-666 text-center" wx:if="{{tab.length<5}}">
|
||||
<block wx:for='{{tab}}' wx:key='list'>
|
||||
<view class="fn-flex-item pl20 pr20 tabmenu2 {{tabs_id == item.id?'active color-36afa2':''}}" data-index="{{index}}" bindtap="changeTab">
|
||||
<view class="relative">{{item.name}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<scroll-view class="mt5 font-32 color-666 text-center space-nowrap" scroll-x="true" wx:else>
|
||||
<view class="pl20 inline-block"></view>
|
||||
<block wx:for='{{tab}}' wx:key='list'>
|
||||
<view class="pl20 pr20 tabmenu2 {{tabs_id == item.id?'active color-36afa2':''}}" data-index="{{index}}" bindtap="changeTab" >
|
||||
<view class="relative">{{item.name}}</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="pl40 inline-block"></view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="pl30 relative text-center font-22">
|
||||
<view class="inline-block text-middle pt10 pb10 bg-f6 ulib-r750" style="width:240rpx;">
|
||||
<picker mode="date" value="{{s_date}}" bindchange="startDate">
|
||||
<text class="color-ccc" wx:if="{{s_date == ''}}">请选择</text>
|
||||
<text wx:else>{{s_date}}</text>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="inline-block text-middle pt10 pb10 pl10 pr10">-</view>
|
||||
<view class="wp33 inline-block text-middle pt10 pb10 bg-f6 ulib-r750" style="width:240rpx;">
|
||||
<picker mode="date" value="{{e_date}}" bindchange="endDate">
|
||||
<text class="color-ccc" wx:if="{{e_date == ''}}">请选择</text>
|
||||
<text wx:else>{{e_date}}</text>
|
||||
</picker>
|
||||
</view>
|
||||
<view bindtap="searchSubmit" class="inline-block text-middle ml10 pt10 pb10 bg-333 color-fff ulib-r750" style="width:140rpx;">搜索</view>
|
||||
</view>
|
||||
|
||||
<view class="mt30 pl30 pr30">
|
||||
|
||||
<block wx:for='{{list}}' wx:key='index'>
|
||||
<view class="inner40 relative ulib-r10 box-shadow-000-10-10 mb30 overflowhidden" bindtap="pushLink" data-url="/pages/inventory/detail/index?id={{item.id}}">
|
||||
<view class="font-40" wx:if="{{item.biz_name}}">{{item.biz_name}}</view>
|
||||
<block wx:for="{{item.other_data}}" wx:for-index='key' wx:for-item='it' wx:key='i'>
|
||||
<view class="mt25 fn-clear font-28">
|
||||
<view class="fn-fl color-333">{{it.title}}</view>
|
||||
<view class="fn-fr wp60 text-nowrap text-right color-666">{{it.value}}</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="mt20 pt5 pb5 pl20 pr20 bg-f6 font-22 color-666 ulib-rlb750 ulib-rr750" wx:if="{{item.c_time}}">{{item.c_time}}</view>
|
||||
</view>
|
||||
</block>
|
||||
<lcb-listmore isLoading='{{loading}}' isEnd='{{end}}' isNoData='{{noData}}'></lcb-listmore>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -0,0 +1,3 @@
|
||||
.tabmenu2{display:inline-block;line-height:72rpx;}
|
||||
.tabmenu2.active view.relative{display:inline-block;}
|
||||
.tabmenu2.active view.relative::before{display:inline-block;position:absolute;bottom:0;left:50%;transform:translate(-50%,0);width:64rpx;height:6rpx;content:"";background-color:#36afa2;}
|
||||
Reference in New Issue
Block a user