调拨,盘点,库存功能
This commit is contained in:
@@ -41,7 +41,10 @@
|
||||
"pages/order/filterList/index2",
|
||||
"pages/siyutong/index",
|
||||
"pages/siyutong/activityDetail/index",
|
||||
"pages/siyutong/activityRanking/index"
|
||||
"pages/siyutong/activityRanking/index",
|
||||
"pages/inventory/detail/index",
|
||||
"pages/inventory/list/index",
|
||||
"pages/inventory/warning/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;}
|
||||
|
||||
Vendored
+8
-5
File diff suppressed because one or more lines are too long
@@ -119,6 +119,14 @@ 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', //盘点提醒
|
||||
|
||||
appGoodsRemind:'app/goods/remind', //库存提醒/预警
|
||||
appGoodsLists:'app/goods/lists', //库存列表
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -762,4 +762,53 @@ 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)
|
||||
})
|
||||
}
|
||||
|
||||
//库存提醒/预警
|
||||
apiQuery.getAppGoodsRemind = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appGoodsRemind, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//库存列表
|
||||
apiQuery.getAppGoodsLists = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appGoodsLists, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
export default apiQuery;
|
||||
@@ -23,7 +23,7 @@ Page({
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
|
||||
|
||||
},
|
||||
|
||||
//获取订单详情
|
||||
|
||||
@@ -3,11 +3,19 @@ const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
imgUrl: _.config.imgUrl,
|
||||
isShowReport:false,//是否显示调拨盘点弹框
|
||||
},
|
||||
onLoad: function (options) {
|
||||
this.getUserInfo()
|
||||
},
|
||||
onShow: function () {
|
||||
this.setData({
|
||||
isShowReport:false,//是否显示调拨盘点弹框
|
||||
remindMsg:[],
|
||||
});
|
||||
this.getAppTransferRemind()
|
||||
this.getAppInventoryRemind()
|
||||
this.getAppGoodsRemind()
|
||||
},
|
||||
//获取用户信息
|
||||
getUserInfo(){
|
||||
@@ -18,6 +26,62 @@ Page({
|
||||
});
|
||||
},
|
||||
|
||||
//调拨提醒
|
||||
getAppTransferRemind(){
|
||||
_.apiQuery.getAppTransferRemind().then(res => {
|
||||
if(res.data.total>0){
|
||||
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({
|
||||
remindMsg,
|
||||
isShowReport:true,
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//盘点提醒
|
||||
getAppInventoryRemind(){
|
||||
_.apiQuery.getAppInventoryRemind().then(res => {
|
||||
if(res.data.total>0){
|
||||
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({
|
||||
remindMsg,
|
||||
isShowReport:true,
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//库存提醒/预警
|
||||
getAppGoodsRemind(){
|
||||
let params = {};
|
||||
params['type'] = 1;
|
||||
_.apiQuery.getAppGoodsRemind(params).then(res => {
|
||||
this.setData({
|
||||
stock:res.data,
|
||||
})
|
||||
wx.stopPullDownRefresh()
|
||||
});
|
||||
},
|
||||
|
||||
//推送链接
|
||||
pushLink(e) {
|
||||
if(e.currentTarget.dataset.url){
|
||||
@@ -25,4 +89,24 @@ Page({
|
||||
}
|
||||
},
|
||||
|
||||
//显示隐藏调拨盘点弹窗
|
||||
optShowReport(e){
|
||||
this.setData({
|
||||
isShowReport:!this.data.isShowReport,
|
||||
})
|
||||
},
|
||||
|
||||
//退出登录
|
||||
logout(){
|
||||
wx.clearStorage()
|
||||
wx.reLaunch({
|
||||
url: '/pages/login/index'
|
||||
})
|
||||
},
|
||||
|
||||
//页面相关事件处理函数--监听用户下拉动作
|
||||
onPullDownRefresh: function () {
|
||||
this.getAppGoodsRemind()
|
||||
},
|
||||
|
||||
})
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"navigationBarTitleText": "调拨",
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#1a1c26",
|
||||
"backgroundColor": "#ffffff",
|
||||
|
||||
+52
-7
@@ -1,15 +1,60 @@
|
||||
<view class="container">
|
||||
<view class='pt160 text-center'>
|
||||
<image class='img-130x130 ulib-r750' mode="aspectFill" src='{{imgUrl}}/login/logo.jpg?v=220223'></image>
|
||||
<view class='mt10 font-32 color-fff'>Hi~,欢迎回到狸车宝!</view>
|
||||
<view class="mt10 font-64 color-fff">{{userInfo.uname}}</view>
|
||||
<view class="inline-block bg-fff mt10 pl15 pr15 font-22 ulib-r750">{{userInfo.biz_name}}</view>
|
||||
<view class='mt20 font-32 color-fff'>{{userInfo.uname}},欢迎回到狸车宝!</view>
|
||||
<!-- <view class="mt10 font-64 color-fff">{{userInfo.uname}}</view> -->
|
||||
<view class="mt20">
|
||||
<view class="inline-block bg-fff mt10 pt10 pb10 pl30 pr30 font-32 ulib-r750">{{userInfo.biz_name}}</view>
|
||||
</view>
|
||||
<view class="mt20">
|
||||
<view class="inline-block pt10 pb10 pl30 pr30 font-24 color-fff ulib-r750" bindtap="logout">
|
||||
<i class="iconfont icon-tuichu mr10"></i>退出
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fixed left-0 bottom-0 right-0 bg-fff pt200 pb20 pl100 pr100">
|
||||
<view class="absolute left-0 right-0 ml30 mr30 pt30 pb30 pl15 pr15 bg-fff box-shadow-000-10-10 fn-flex ulib-r10" style="top:-150rpx;">
|
||||
</view>
|
||||
|
||||
<view class="fixed left-0 bottom-0 right-0 bg-fff pt200 pb20 pl100 pr100">
|
||||
<!-- <button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" bindtap="pushLink" data-url="/pages/allot/list/index"><text class="iconfont icon-zengjia mr10"></text>新增调拨</button> -->
|
||||
</view>
|
||||
<view class="fixed left-0 bottom-0 right-0 pl30 pr30 pb50">
|
||||
<view class="relative ml15 mr15 mb30 pt20 pb20 pl30 pr200 ulib-r750 font-24 color-fff" style="background-image:linear-gradient(45deg, #30cfbd, #2cbf8b);" bindtap="pushLink" data-url="/pages/inventory/warning/index" wx:if="{{stock.show==1}}">
|
||||
<view class="text-left">{{stock.inventory.title}}</view>
|
||||
<view class="absolute right-0 box-middle mr25 mb10">
|
||||
<!-- <text class="text-middle">{{stock.inventory.value}}</text> -->
|
||||
<i class="iconfont icon-gengduo ml5 text-middle"></i>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pt30 pb30 pl15 pr15 bg-fff box-shadow-000-10-10 ulib-r10">
|
||||
<view class="fn-flex">
|
||||
<view class="fn-flex-item ml15 mr15" bindtap="pushLink" data-url="/pages/allot/list/index?tabs_id=1&type=1&title=调拨发车"><image class='img-300x230' mode="aspectFill" src='{{imgUrl}}/allot/tip-1.png'></image></view>
|
||||
<view class="fn-flex-item ml15 mr15" bindtap="pushLink" data-url="/pages/allot/list/index?tabs_id=1&type=2&title=调拨收车"><image class='img-300x230' mode="aspectFill" src='{{imgUrl}}/allot/tip-2.png'></image></view>
|
||||
</view>
|
||||
<!-- <button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" bindtap="pushLink" data-url="/pages/allot/list/index"><text class="iconfont icon-zengjia mr10"></text>新增调拨</button> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 调拨提醒 盘点提醒 -->
|
||||
<lcb-msg isShow="{{isShowReport}}">
|
||||
<view slot="content">
|
||||
<swiper class='wp100' style="height:550rpx;" autoplay circular bindchange="bannerChange">
|
||||
<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>
|
||||
</view>
|
||||
<view class="mt20 pl40 pr40 pb40">
|
||||
<image class='wp100 ulib-r10' src='{{item.img}}' mode='widthFix'></image>
|
||||
</view>
|
||||
<view class="fn-flex pl60 pr60 pb50 text-center font-32 color-666">
|
||||
<button bindtap="optShowReport" class="fn-flex-item mr20 bds-2-36afa2 btn-no-bg wp100 font-28 color-36afa2 ulib-r750">取消</button>
|
||||
<button bindtap="pushLink" data-url="{{item.btn.url}}" class="fn-flex-item ml20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">{{item.btn.title}}</button>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<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>
|
||||
</view>
|
||||
</lcb-msg>
|
||||
@@ -16,6 +16,7 @@ Page({
|
||||
tabs_id:'',//分类 1进行中2已完成
|
||||
tab:[],
|
||||
channel:'',//是否来自渠道
|
||||
city_id:'',//城市ID
|
||||
},
|
||||
onLoad: function (options) {
|
||||
for (let key in options) {
|
||||
@@ -67,6 +68,9 @@ Page({
|
||||
if(this.data.channel != ''){
|
||||
params['channel'] = this.data.channel;
|
||||
}
|
||||
if(this.data.city_id != ''){
|
||||
params['city_id'] = this.data.city_id;
|
||||
}
|
||||
if(this.data.type != ''){
|
||||
params['type'] = this.data.type;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,11 @@
|
||||
|
||||
<block wx:for='{{list}}' wx:key='index'>
|
||||
<view class="inner40 relative ulib-r10 box-shadow-000-10-10 mb30 overflowhidden" bindtap="pushLink" data-url="{{item.url}}">
|
||||
<view class="font-40" wx:if="{{item.biz_name}}">{{item.biz_name}}</view>
|
||||
<view class="relative font-34 fn-clear">
|
||||
<i class="absolute box-center-middle iconfont icon-arrow font-30 color-888"></i>
|
||||
<view class="fn-fl wp45 text-nowrap" style="color:{{item.out_car.color}}">{{item.out_car.title}}</view>
|
||||
<view class="fn-fr wp45 text-nowrap text-right" style="color:{{item.in_car.color}}">{{item.in_car.title}}</view>
|
||||
</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>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="absolute allot-tip pt8 pb8 pl15 pr10 bg-f9394d font-22 color-fff ulib-rt10" bindtap="pushLink" data-url="/pages/allot/list/index">车辆调拨记录<i class="iconfont icon-gengduo"></i></view>
|
||||
<view class="absolute allot-tip pt8 pb8 pl15 pr10 bg-f9394d font-22 color-fff ulib-rt10" bindtap="pushLink" data-url="/pages/allot/list/index?city_id={{city_id}}">车辆调拨记录<i class="iconfont icon-gengduo"></i></view>
|
||||
</view>
|
||||
<!-- 车辆调拨 -->
|
||||
<view class="mb40 bg-ffedeb ulib-rt10" style="height:140rpx;" bindtap="pushLink" data-url="/pages/allot/list/index?channel=1" wx:if="{{allotNum>0}}">
|
||||
@@ -117,7 +117,7 @@
|
||||
</view>
|
||||
<view class="fn-flex pl60 pr60 pb50 text-center font-32 color-666">
|
||||
<button bindtap="optShowReport" class="fn-flex-item mr20 bds-2-36afa2 btn-no-bg wp100 font-28 color-36afa2 ulib-r750">取消</button>
|
||||
<button bindtap="pushLink" data-url="/pages/allot/list/index?channel=1" class="fn-flex-item ml20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">前往操作</button>
|
||||
<button bindtap="pushLink" data-url="/pages/allot/list/index" class="fn-flex-item ml20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">前往操作</button>
|
||||
</view>
|
||||
</view>
|
||||
</lcb-msg>
|
||||
+142
-7
@@ -39,8 +39,37 @@ Page({
|
||||
ecPie:{},
|
||||
isShowNotice:false,//是否显示通知
|
||||
stopNotice:false,//是否不再显示通知
|
||||
isShowReport:false,
|
||||
isShowReport:false,//是否显示调拨盘点弹框
|
||||
isShowProfile:true,//是否显示授权用户信息按钮
|
||||
isShowGoods:false,//是否显示库存预警
|
||||
banneractive: 0,
|
||||
banneractive2: 0,
|
||||
banneractive3: 0,
|
||||
remindTab:[],//调拨盘点入口
|
||||
remindMsg:[],//调拨盘点弹框
|
||||
// inventory:[
|
||||
// {
|
||||
// title:'车库存天数已超过20天,请尽快销售,以免造成损失!',
|
||||
// name:'哪吒V',
|
||||
// num:'AWR20210833232221',
|
||||
// tip:'已库存:66天',
|
||||
// img:'https://img.liche.cn/liche/2021/11/5438e63bb9c4963d/c5b5e20b2ecf285a.png'
|
||||
// },
|
||||
// {
|
||||
// title:'车库存天数已超过20天,请尽快销售,以免造成损失!',
|
||||
// name:'哪吒V',
|
||||
// num:'AWR20210833232221',
|
||||
// tip:'已库存:66天',
|
||||
// img:'https://img.liche.cn/liche/2021/11/5438e63bb9c4963d/c5b5e20b2ecf285a.png'
|
||||
// },
|
||||
// {
|
||||
// title:'车库存天数已超过20天,请尽快销售,以免造成损失!',
|
||||
// name:'哪吒V',
|
||||
// num:'AWR20210833232221',
|
||||
// tip:'已库存:66天',
|
||||
// img:'https://img.liche.cn/liche/2021/11/5438e63bb9c4963d/c5b5e20b2ecf285a.png'
|
||||
// },
|
||||
// ],
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
@@ -69,9 +98,18 @@ Page({
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
this.setData({
|
||||
remindTab:[],
|
||||
remindMsg:[],
|
||||
isShowReport:false,//是否显示调拨盘点弹框
|
||||
isShowGoods:false,
|
||||
});
|
||||
this.getAppUserCal()
|
||||
this.getHoursTip()
|
||||
this.getAppTransferRemind()
|
||||
this.getAppInventoryRemind()
|
||||
this.getAppGoodsRemind()
|
||||
|
||||
},
|
||||
|
||||
//生命周期函数--监听页面卸载
|
||||
@@ -79,6 +117,7 @@ Page({
|
||||
//卸载消息通讯 是否显示授权用户信息
|
||||
_.eventBus.remove('isShowProfile',this);
|
||||
},
|
||||
|
||||
|
||||
//候取时间
|
||||
getHoursTip(){
|
||||
@@ -109,22 +148,85 @@ 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,
|
||||
isShowGoods: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',
|
||||
},
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
isShowReport:false,
|
||||
remindTab,
|
||||
remindMsg,
|
||||
isShowReport:true,
|
||||
isShowNotice:false,
|
||||
isShowGoods:false,
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//库存提醒/预警
|
||||
getAppGoodsRemind(){
|
||||
_.apiQuery.getAppGoodsRemind().then(res => {
|
||||
this.setData({
|
||||
inventory:res.data.inventory,
|
||||
warning:res.data.warning,
|
||||
})
|
||||
if(app.getStorageByKey("showGoodsData")!=new Date().getDate()&&res.data.warning.list&&res.data.warning.list.length>0){
|
||||
this.setData({
|
||||
isShowGoods:true,
|
||||
})
|
||||
app.setStorage('showGoodsData', new Date().getDate())
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//获取用户信息
|
||||
getUserInfo(){
|
||||
_.apiQuery.getUserInfo().then(res => {
|
||||
@@ -276,12 +378,18 @@ Page({
|
||||
}
|
||||
},
|
||||
|
||||
//显示短信弹框
|
||||
//显示隐藏调拨盘点弹窗
|
||||
optShowReport(e){
|
||||
this.setData({
|
||||
isShowReport:!this.data.isShowReport,
|
||||
})
|
||||
},
|
||||
//显示隐藏库存预警弹窗
|
||||
optShowGoods(e){
|
||||
this.setData({
|
||||
isShowGoods:!this.data.isShowGoods,
|
||||
})
|
||||
},
|
||||
|
||||
//开发中
|
||||
development(){
|
||||
@@ -292,12 +400,39 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//调拨盘点轮播点
|
||||
bannerChange: function (e) {
|
||||
this.setData({
|
||||
banneractive:e.detail.current,
|
||||
});
|
||||
},
|
||||
//banner轮播点
|
||||
bannerChange2: function (e) {
|
||||
this.setData({
|
||||
banneractive2:e.detail.current,
|
||||
});
|
||||
},
|
||||
//库存预警轮播点
|
||||
bannerChange3: function (e) {
|
||||
this.setData({
|
||||
banneractive3:e.detail.current,
|
||||
});
|
||||
},
|
||||
|
||||
//页面相关事件处理函数--监听用户下拉动作
|
||||
onPullDownRefresh: function () {
|
||||
this.setData({
|
||||
remindTab:[],
|
||||
remindMsg:[],
|
||||
isShowReport:false,//是否显示调拨盘点弹框
|
||||
isShowGoods:false,
|
||||
});
|
||||
this.getAppUserCal()
|
||||
this.getAppStatisticsHcust()
|
||||
this.getAppStatisticsHorder()
|
||||
this.getAppTransferRemind()
|
||||
this.getAppInventoryRemind()
|
||||
this.getAppGoodsRemind()
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
+81
-23
@@ -15,7 +15,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mb30 pt40 pb40 pl20 pr20 bg-fff box-shadow-000-10-10 ulib-r10 fn-flex text-center font-22 color-666" wx:if="{{userInfo.group_id == 4}}">
|
||||
<view class="mb30 pt40 pb40 pl20 pr20 bg-fff box-shadow-000-10-10 ulib-r10 fn-flex text-center font-22 color-666" wx:if="{{1 == 0}}">
|
||||
<view class="fn-flex-item" bindtap="pushLink" data-url="/pages/storeInfo/index">
|
||||
<image class='img-50x50' mode="aspectFill" src='{{imgUrl}}index/icon-tab-1.png' lazy-load="{{true}}"></image>
|
||||
<view>店铺概况</view>
|
||||
@@ -35,23 +35,39 @@
|
||||
</view>
|
||||
<!--客户代办事项 订单代办事项 -->
|
||||
<view class="bg-fff box-shadow-000-10-10 ulib-r10">
|
||||
<view class="bg-ffedeb ulib-rt10" style="height:140rpx;" bindtap="pushLink" data-url="/pages/allot/list/index" wx:if="{{allotNum>0}}">
|
||||
<view class="pt30 pl30 pr30">
|
||||
<view class="relative pl110 pr110">
|
||||
<image class='block absolute left-0 box-middle img-90x90 ulib-r750 z-index-1' mode="aspectFill" src='{{imgUrl}}index/diaobo-icon.png' lazy-load="{{true}}"></image>
|
||||
<view class="color-f9394d">
|
||||
<view class="font-32">车辆调拨</view>
|
||||
<view class="mt10 font-20">您有新的车辆调拨,需要您进行确认操作</view>
|
||||
</view>
|
||||
<view class="absolute right-0 box-middle">
|
||||
<text class="inline-block text-middle pt5 pb5 pl10 pr10 bg-f9394d font-22 color-fff ulib-r10">{{allotNum}}</text>
|
||||
<text class="ml5 text-middle iconfont icon-gengduo font-32 color-f9394d"></text>
|
||||
</view>
|
||||
<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="{{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>
|
||||
<view class="mt10 font-20">{{item.content}}</view>
|
||||
</view>
|
||||
<view class="absolute right-0 box-middle">
|
||||
<text class="inline-block text-middle pt5 pb5 pl10 pr10 bg-f9394d font-22 color-fff ulib-r10">{{item.allotNum}}</text>
|
||||
<text class="ml5 text-middle iconfont icon-gengduo font-32 color-f9394d"></text>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inner30 pt40">
|
||||
<view class="font-36">客户代办事项</view>
|
||||
|
||||
<view class="relative pt20 pb20 pl30 pr200 ulib-r750 font-24 color-fff" style="background-image:linear-gradient(45deg, {{inventory.color1}}, {{inventory.color2}});" bindtap="pushLink" data-url="/pages/inventory/warning/index">
|
||||
<view class="text-left">{{inventory.title}}</view>
|
||||
<view class="absolute right-0 box-middle mr25 mb10">
|
||||
<text class="text-middle">{{inventory.value}}</text>
|
||||
<i class="iconfont icon-gengduo ml5 text-middle"></i>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mt20 font-36">客户代办事项</view>
|
||||
<view class="fn-flex pt20 pb20 color-fff">
|
||||
<view class="fn-flex-item relative mr15 pt25 pb25 pl110 bg-1c89fd-8058fe ulib-r10" bindtap="pushLink" data-url="/pages/customer/filterList/index?iscall=0&title=未联系潜客" >
|
||||
<i class="absolute left-0 box-middle ml35 iconfont icon-qianke font-60"></i>
|
||||
@@ -166,19 +182,61 @@
|
||||
</view>
|
||||
</lcb-msg>
|
||||
|
||||
<!-- 调拨提醒 -->
|
||||
<!-- 调拨提醒 盘点提醒 -->
|
||||
<lcb-msg isShow="{{isShowReport}}">
|
||||
<view slot="content">
|
||||
<view class="pt40 pl40 pr40">
|
||||
<view class="font-36 text-center">调拨提醒</view>
|
||||
<view class="mt10 font-22 text-center color-999">您有新的车辆调拨,需要您进行确认操作。</view>
|
||||
<swiper class='wp100' style="height:550rpx;" autoplay circular bindchange="bannerChange">
|
||||
<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>
|
||||
</view>
|
||||
<view class="mt20 pl40 pr40 pb40">
|
||||
<image class='wp100 ulib-r10' src='{{item.img}}' mode='widthFix'></image>
|
||||
</view>
|
||||
<view class="fn-flex pl60 pr60 pb50 text-center font-32 color-666">
|
||||
<button bindtap="optShowReport" class="fn-flex-item mr20 bds-2-36afa2 btn-no-bg wp100 font-28 color-36afa2 ulib-r750">取消</button>
|
||||
<button bindtap="pushLink" data-url="{{item.btn.url}}" class="fn-flex-item ml20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">{{item.btn.title}}</button>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<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>
|
||||
<view class="mt20 pl40 pr40 pb40">
|
||||
<image class='wp100 ulib-r10' src='{{imgUrl}}allot/car.gif' mode='widthFix'></image>
|
||||
</view>
|
||||
</lcb-msg>
|
||||
|
||||
<!-- 库存提醒 -->
|
||||
<lcb-msg isShow="{{!isShowReport&&isShowGoods}}">
|
||||
<view slot="content" class="inner40" style="width:550rpx;">
|
||||
<view class="text-center font-36">{{warning.title}}</view>
|
||||
<view class="mt10 text-center font-22 color-f9394d">{{warning.note}}</view>
|
||||
<view class="relative">
|
||||
<swiper class='wp100' style="height:420rpx;" autoplay circular bindchange="bannerChange3">
|
||||
<swiper-item class="relative" wx:for="{{warning.list}}" wx:key="index">
|
||||
<view class="mt40 fn-clear">
|
||||
<view class="fn-fl">
|
||||
<view class="font-36">{{item.title}}</view>
|
||||
<view class="mt10 font-22 color-666">{{item.vin}}</view>
|
||||
</view>
|
||||
<view class="fn-fr pt5 pb5 pl20 pr20 bg-f9394d font-22 color-fff ulib-r750">{{item.days}}</view>
|
||||
</view>
|
||||
<view class="mt10 pb10">
|
||||
<image class='wp100' src='{{item.img}}' mode='widthFix'></image>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="absolute left-0 right-0 bottom-0 pb20 text-center" style='height:30rpx' wx:if="{{warning.list.length > 1}}">
|
||||
<block wx:for-items="{{warning.list}}" wx:for-index="j" wx:key='j'>
|
||||
<view class="inline-block indicator-pin {{banneractive3==j?'active':''}}"></view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fn-flex pl60 pr60 pb50 text-center font-32 color-666">
|
||||
<button bindtap="optShowReport" class="fn-flex-item mr20 bds-2-36afa2 btn-no-bg wp100 font-28 color-36afa2 ulib-r750">取消</button>
|
||||
<button bindtap="pushLink" data-url="/pages/allot/list/index" class="fn-flex-item ml20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">前往操作</button>
|
||||
<view class="fn-flex pl60 pr60 pb20 text-center font-32 color-666">
|
||||
<button bindtap="optShowGoods" class="fn-flex-item mr20 bds-2-36afa2 btn-no-bg wp100 font-28 color-36afa2 ulib-r750">取消</button>
|
||||
<button bindtap="pushLink" data-url="/pages/inventory/warning/index" class="fn-flex-item ml20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">点击查看</button>
|
||||
</view>
|
||||
</view>
|
||||
</lcb-msg>
|
||||
@@ -1,4 +1,10 @@
|
||||
.bg-1c89fd-8058fe{background-image:linear-gradient(45deg, #1c89fd, #8058fe);}
|
||||
.bg-fe606c-ff9026{background-image:linear-gradient(45deg, #fe606c, #ff9026); text-align: center;}
|
||||
.bg-ffedeb{background-color:#ffedeb;}
|
||||
.color-ff4a3a{color:#ff4a3a;}
|
||||
.color-ff4a3a{color:#ff4a3a;}
|
||||
|
||||
.indicator-pin{width:20rpx;height:6rpx;display:inline-block;background-color:#ddd;cursor:pointer;transition:all .3s ease-in-out;-ms-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;margin:0 6rpx;vertical-align:top}
|
||||
.indicator-pin.active{background-color:#36afa2;}
|
||||
|
||||
.indicator-pin2{width:20rpx;height:6rpx;display:inline-block;background-color:#fad6c9;cursor:pointer;transition:all .3s ease-in-out;-ms-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;margin:0 6rpx;vertical-align:top}
|
||||
.indicator-pin2.active{background-color:#f9394d;}
|
||||
@@ -0,0 +1,174 @@
|
||||
import _ from '../../../commons/js/commons'
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
imgUrl:_.config.imgUrl,
|
||||
isShowTransfer:false,//是否显示确认弹窗
|
||||
car_img:[],//请上传运输单
|
||||
id:'',//查看id
|
||||
mileage:'',//里程数
|
||||
note:'',//备注
|
||||
},
|
||||
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:'',
|
||||
note:res.data.note?res.data.note:'',
|
||||
})
|
||||
|
||||
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;
|
||||
if(that.data.note){
|
||||
params['note'] = that.data.note;
|
||||
}
|
||||
_.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,60 @@
|
||||
<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>
|
||||
<view class="mt10 pb10">
|
||||
<image class='wp100' src='{{info.car_cor_img}}' mode='widthFix'></image>
|
||||
</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="relative mt30 pl40 pr40">
|
||||
<textarea class="wp100 inner20 bds-1-eb font-28 ulib-r10" placeholder-class="color-ccc" placeholder="请填写备注" type="text" style="height:120rpx;" model:value='{{note}}' />
|
||||
</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,62 @@
|
||||
<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 pb50">
|
||||
|
||||
<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>
|
||||
<view class="mt10 pb10">
|
||||
<image class='wp100' src='{{item.car_cor_img}}' mode='widthFix'></image>
|
||||
</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;}
|
||||
@@ -0,0 +1,86 @@
|
||||
import _ from '../../../commons/js/commons'
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
list: [],//库存列表
|
||||
pageNo: 1,
|
||||
noData: false,
|
||||
end: false,
|
||||
load: true,
|
||||
loading: false,
|
||||
},
|
||||
onLoad: function (options) {
|
||||
for (let key in options) {
|
||||
this.setData({
|
||||
[key]: options[key]
|
||||
})
|
||||
}
|
||||
|
||||
if(this.data.title){
|
||||
wx.setNavigationBarTitle({
|
||||
title:this.data.title,
|
||||
})
|
||||
}
|
||||
|
||||
this.getAppGoodsLists()
|
||||
},
|
||||
|
||||
//获取库存列表
|
||||
getAppGoodsLists() {
|
||||
this.setData({
|
||||
load: false,
|
||||
loading: true,
|
||||
})
|
||||
let params = {};
|
||||
params['page'] = this.data.pageNo;
|
||||
params['size'] = 10;
|
||||
_.apiQuery.getAppGoodsLists(params).then(res => {
|
||||
this.setData({
|
||||
flag: this.data.flag - 1
|
||||
})
|
||||
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()
|
||||
});
|
||||
},
|
||||
|
||||
//推送链接
|
||||
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,
|
||||
})
|
||||
this.getAppGoodsLists()
|
||||
},
|
||||
|
||||
//页面上拉触底事件的处理函数
|
||||
onReachBottom(){
|
||||
if (this.data.noData || this.data.end||!this.data.load) return;
|
||||
this.getAppGoodsLists()
|
||||
},
|
||||
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "库存列表",
|
||||
"usingComponents": {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<view class="container">
|
||||
|
||||
<view class="mt30 pl30 pr30 pb50">
|
||||
|
||||
<block wx:for='{{list}}' wx:key='index'>
|
||||
<view class="inner40 relative ulib-r10 box-shadow-000-10-10 mb30 overflowhidden">
|
||||
<view class="font-40" wx:if="{{item.title}}">{{item.title}}</view>
|
||||
<view class="mt10 pb10">
|
||||
<image class='wp100' src='{{item.car_cor_img}}' mode='widthFix'></image>
|
||||
</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" style="{{it.color?'color:'+it.color:''}}">{{it.value}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
<lcb-listmore isLoading='{{loading}}' isEnd='{{list.length>5&&end}}' isNoData='{{noData}}'></lcb-listmore>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
Reference in New Issue
Block a user