This commit is contained in:
老叶
2021-12-28 10:41:02 +08:00
parent 0a0b048678
commit 20be8974c0
19 changed files with 317 additions and 26 deletions
+2 -1
View File
@@ -32,7 +32,8 @@
"pages/allot/detail/index",
"pages/allot/list/index",
"pages/audioPlay/index",
"pages/recommend/index"
"pages/recommend/index",
"pages/allot/index"
],
"echarts": [
{
+1
View File
@@ -20,6 +20,7 @@
.font-54{font-size:54rpx;}
.font-56{font-size:56rpx;}
.font-60{font-size:60rpx;}
.font-64{font-size:64rpx;}
.font-66{font-size:66rpx;}
.font-72{font-size:72rpx;}
.font-75{font-size:75rpx;}
+3 -1
View File
@@ -12,6 +12,7 @@
.img-100x100{width:100rpx;height:100rpx;box-sizing:border-box;}
.img-120x120{width:120rpx;height:120rpx;box-sizing:border-box;}
.img-125x75{width:125rpx;height:75rpx;box-sizing:border-box;}
.img-130x130{width:130rpx;height:130rpx;box-sizing:border-box;}
.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;}
@@ -19,9 +20,10 @@
.img-208x170{width:208rpx;height:170rpx;box-sizing:border-box;}
.img-220x200{width:220rpx;height:200rpx;box-sizing:border-box;}
.img-250x150{width:250rpx;height:150rpx;box-sizing:border-box;}
.img-300x200{width:300rpx;height:200rpx;box-sizing:border-box;}
.img-250x250{width:250rpx;height:250rpx;box-sizing:border-box;}
.img-250x445{width:250rpx;height:445rpx;box-sizing:border-box;}
.img-300x200{width:300rpx;height:200rpx;box-sizing:border-box;}
.img-300x230{width:300rpx;height:230rpx;box-sizing:border-box;}
.img-750x250{width:750rpx;height:250rpx;box-sizing:border-box;}
.img-750x422{width:100%;height:422rpx;box-sizing:border-box;}
+1
View File
@@ -30,6 +30,7 @@
.pt160{padding-top:160rpx;}
.pt180{padding-top:180rpx;}
.pt200{padding-top:200rpx;}
.pt300{padding-top:300rpx;}
.pt400{padding-top:400rpx;}
.pl0{padding-left:0;}
.pl5{padding-left:5rpx;}
File diff suppressed because one or more lines are too long
+2
View File
@@ -100,6 +100,8 @@ api = {
appBrokerageOrders:'app/brokerage/orders', //转介绍列表
appBrokerage:'app/brokerage', //获取佣金设置 /更新佣金设置 /创建佣金设置
appTransferTabs:'app/transfer/tabs', //调拨记录_tab
appTransferTransport:'app/transfer/transport', //上传运输单
}
+14
View File
@@ -643,4 +643,18 @@ apiQuery.getAppBrokerageOrders = function (params) {
}
//调拨记录_tab
apiQuery.getAppTransferTabs = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(false, Config.api.appTransferTabs, 2, params, "GET", resolve, reject)
})
}
//上传运输单
apiQuery.postAppTransferTransport = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(true, Config.api.appTransferTransport, 2, params, "POST", resolve, reject)
})
}
export default apiQuery;
+91 -1
View File
@@ -3,9 +3,10 @@ const app = getApp()
Page({
data: {
imgUrl:_.config.imgUrl,
photos:[],
photos:[],//异常报备
note:'',
isShowReport:false,
transport:[],//请上传运输单
},
onLoad: function (options) {
for (let key in options) {
@@ -28,6 +29,7 @@ Page({
_.apiQuery.getAppTransfer(params).then(res=>{
this.setData({
info:res.data,
transport:res.data.transport.imgs,
})
wx.stopPullDownRefresh()
@@ -237,6 +239,94 @@ Page({
}
},
/*上传运输单*/
transportUpload(e) {
let that = this
wx.chooseImage({
count: 10 - that.data.transport.length, //
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success(res1) {
wx.showLoading({
title: '图片上传中',
})
let transport=that.data.transport
for (let i = 0; i < res1.tempFilePaths.length; i++) {
//上传图片
wx.uploadFile({
url:_.config.api.upImg,
filePath:res1.tempFilePaths[i],
name: 'img',
formData: {
'app': 'liche'
},
success: (resp) => {
resp.data = JSON.parse(resp.data);
if (resp.data.code == 200) {
let imgdata = resp.data
let list = []
list.push({
value:imgdata.data.url,
src:imgdata.data.full_url,
})
transport=transport.concat(list)
if(i+1==res1.tempFilePaths.length){
setTimeout(function () {
let params = {};
params['id'] = that.data.info.id;
params['type'] = 0;
let imgs = []
transport.forEach(item => {
imgs.push(item.value)
})
params['imgs'] = imgs;
_.apiQuery.postAppTransferTransport(params).then(res => {
wx.hideLoading();
that.setData({
transport,
})
})
}, 500);
}
}
},
})
}
},
fail: res => {
wx.showToast({
title: '文件选择失败',
icon: 'none',
duration: 2000
})
}
})
},
// 编辑页面删除图片
delTransport(e){
let transport = this.data.transport
transport.splice(e.currentTarget.dataset.index, 1)
let params = {};
params['id'] = this.data.info.id;
let imgs = []
transport.forEach(item => {
imgs.push(item.value)
})
params['imgs'] = imgs;
_.apiQuery.postAppTransferTransport(params).then(res => {
this.setData({
transport,
})
})
},
//页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh(){
this.getAppTransfer()
+4 -1
View File
@@ -1,3 +1,6 @@
{
"usingComponents": {}
"navigationBarTitleText": "调拨详情",
"usingComponents": {
}
}
+52 -13
View File
@@ -37,6 +37,27 @@
</view>
</view>
</view>
<view class="pt0 inner40">
<view class="font-32">请上传运输单</view>
<view class="mt20">
<scroll-view class="space-nowrap" scroll-x="true">
<block wx:for='{{transport}}' wx:for-item='transport' wx:for-index="index" wx:key='transport'>
<view class="inline-block img-200x180 mr20 relative">
<i class="absolute top-0 right-0 bg-000-op50 iconfont icon-guanbi1 inner10 font-26 color-fff ulib-rtr10 ulib-rbl10 z-index-1" bindtap="delTransport" data-index="{{index}}" ></i>
<image class='img-200x180 ulib-r10' src='{{transport.src}}' mode='aspectFill'></image>
</view>
</block>
<block wx:if="{{transport.length<10}}">
<view class="inline-block text-center bg-f8 img-200x180 mr20 relative ulib-r10 overflowhidden" bindtap="transportUpload">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-paizhao font-48"></i>
<view class="mt5 font-22">拍照上传</view>
</view>
</view>
</block>
</scroll-view>
</view>
</view>
</view>
<view class="mt30 font-24 color-999"><i class="mr5 iconfont icon-tishi"></i>请仔细检查车辆外观与随车物品是否正常,如有异常点击下方报备异常。</view>
</view>
@@ -59,7 +80,7 @@
<view class="font-36 text-center">报备异常</view>
</view>
<view class="mt30 pl30 pr40">
<scroll-view class="space-nowrap" style="width:540rpx;" scroll-x="true">
<scroll-view class="space-nowrap text-center" style="width:540rpx;" scroll-x="true">
<block wx:for='{{photos}}' wx:for-item='photos' wx:for-index="index" wx:key='photo'>
<view class="inline-block img-200x180 ml10 mr10 relative">
<i class="absolute top-0 right-0 bg-000-op50 iconfont icon-guanbi1 inner10 font-26 color-fff ulib-rtr10 ulib-rbl10 z-index-1" bindtap="delPic" data-index="{{index}}" ></i>
@@ -67,27 +88,45 @@
</view>
</block>
<block wx:if="{{photos.length==0}}">
<view class="inline-block img-200x180 ml10 mr10 relative" bindtap="chooseImg">
<image class='img-200x180 ulib-r10' src='{{imgUrl}}allot/add-pic.jpg' mode='aspectFill'></image>
<view class="inline-block bg-f8 img-200x180 ml10 mr10 relative ulib-r10 overflowhidden" bindtap="chooseImg">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-paizhao font-48"></i>
<view class="mt5 font-22">拍照上传</view>
</view>
</view>
<view class="inline-block img-200x180 ml10 mr10 relative" bindtap="chooseImg">
<image class='img-200x180 ulib-r10' src='{{imgUrl}}allot/add-pic.jpg' mode='aspectFill'></image>
<view class="inline-block bg-f8 img-200x180 ml10 mr10 relative ulib-r10 overflowhidden" bindtap="chooseImg">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-paizhao font-48"></i>
<view class="mt5 font-22">拍照上传</view>
</view>
</view>
<view class="inline-block img-200x180 ml10 mr10 relative" bindtap="chooseImg">
<image class='img-200x180 ulib-r10' src='{{imgUrl}}allot/add-pic.jpg' mode='aspectFill'></image>
<view class="inline-block bg-f8 img-200x180 ml10 mr10 relative ulib-r10 overflowhidden" bindtap="chooseImg">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-paizhao font-48"></i>
<view class="mt5 font-22">拍照上传</view>
</view>
</view>
</block>
<block wx:elif="{{photos.length==1}}">
<view class="inline-block img-200x180 ml10 mr10 relative" bindtap="chooseImg">
<image class='img-200x180 ulib-r10' src='{{imgUrl}}allot/add-pic.jpg' mode='aspectFill'></image>
<view class="inline-block bg-f8 img-200x180 ml10 mr10 relative ulib-r10 overflowhidden" bindtap="chooseImg">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-paizhao font-48"></i>
<view class="mt5 font-22">拍照上传</view>
</view>
</view>
<view class="inline-block img-200x180 ml10 mr10 relative" bindtap="chooseImg">
<image class='img-200x180 ulib-r10' src='{{imgUrl}}allot/add-pic.jpg' mode='aspectFill'></image>
<view class="inline-block bg-f8 img-200x180 ml10 mr10 relative ulib-r10 overflowhidden" bindtap="chooseImg">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-paizhao font-48"></i>
<view class="mt5 font-22">拍照上传</view>
</view>
</view>
</block>
<block wx:elif="{{photos.length<10}}">
<view class="inline-block img-200x180 ml10 mr10 relative" bindtap="chooseImg">
<image class='img-200x180 ulib-r10' src='{{imgUrl}}allot/add-pic.jpg' mode='aspectFill'></image>
<view class="inline-block bg-f8 img-200x180 ml10 mr10 relative ulib-r10 overflowhidden" bindtap="chooseImg">
<view class="absolute left-0 right-0 box-middle color-ccc">
<i class="iconfont icon-paizhao font-48"></i>
<view class="mt5 font-22">拍照上传</view>
</view>
</view>
</block>
</scroll-view>
+28
View File
@@ -0,0 +1,28 @@
import _ from '../../commons/js/commons'
const app = getApp()
Page({
data: {
imgUrl: _.config.imgUrl,
},
onLoad: function (options) {
this.getUserInfo()
},
onShow: function () {
},
//获取用户信息
getUserInfo(){
_.apiQuery.getUserInfo().then(res => {
this.setData({
userInfo: res
})
});
},
//推送链接
pushLink(e) {
if(e.currentTarget.dataset.url){
_.$router.openUrlScheme(e.currentTarget.dataset.url)
}
},
})
+9
View File
@@ -0,0 +1,9 @@
{
"navigationBarTitleText": "调拨",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#1a1c26",
"backgroundColor": "#ffffff",
"backgroundColorTop": "#1a1c26",
"usingComponents": {
}
}
+15
View File
@@ -0,0 +1,15 @@
<view class="container">
<view class='pt160 text-center'>
<image class='img-130x130 ulib-r750' mode="aspectFill" src='{{imgUrl}}/login/logo.jpg'></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>
<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 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>
+7
View File
@@ -0,0 +1,7 @@
page{
background-repeat:no-repeat;
background-position:center top;
background-size:100% auto;
background-color:#1a1c26;
background-image:url('http://qs.haodian.cn/wechat_app/lichebao/allot/theme.jpg');
}
+40 -1
View File
@@ -11,6 +11,10 @@ Page({
flag:1,
s_date:'',
e_date:'',
type:'',//调拨类型 1调拨发车2调拨收车
tabs_id:'',//分类 1进行中2已完成
tab:[],
},
onLoad: function (options) {
for (let key in options) {
@@ -18,7 +22,36 @@ Page({
[key]: options[key]
})
}
this.getAppTransferLists()
if(this.data.title){
wx.setNavigationBarTitle({
title:this.data.title,
})
}
this.getAppTransferTabs()
},
//客户-tab
getAppTransferTabs() {
_.apiQuery.getAppTransferTabs().then(res => {
this.setData({
tab:res.data,
tabs_id:this.data.tabs_id==''?res.data[0].id:this.data.tabs_id,
})
this.getAppTransferLists()
wx.stopPullDownRefresh()
});
},
//切换tab
changeTab(e){
this.setData({
tabs_id: this.data.tab[e.currentTarget.dataset.index].id,
})
this.searchSubmit()
},
//获取客户列表
@@ -30,6 +63,12 @@ Page({
let params = {};
params['page'] = this.data.pageNo;
params['size'] = 10;
if(this.data.type != ''){
params['type'] = this.data.type;
}
if(this.data.tabs_id != ''){
params['tabs_id'] = this.data.tabs_id;
}
if(this.data.s_date != ''){
params['s_date'] = this.data.s_date;
}
+4 -1
View File
@@ -1,3 +1,6 @@
{
"usingComponents": {}
"navigationBarTitleText": "调拨列表",
"usingComponents": {
}
}
+24 -1
View File
@@ -1,5 +1,28 @@
<view class="container">
<view class="pt30 pl30 relative text-center font-22">
<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>
+3 -1
View File
@@ -1 +1,3 @@
/* pages/allot/list/index.wxss */
.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;}
+10 -2
View File
@@ -20,7 +20,11 @@ Page({
onShow: function () {
let ukey = app.getStorageByKey("ukey");
if (!!ukey&&!!app.getStorageByKey("userInfo")){
if(app.getStorageByKey("userInfo").group_id==4){
if(app.getStorageByKey("userInfo").biz_type==4){
wx.navigateTo({
url: '/pages/allot/index',
})
}else if(app.getStorageByKey("userInfo").group_id==4){
wx.navigateTo({
url: '/pages/channel/index',
})
@@ -110,7 +114,11 @@ Page({
})
setTimeout(function () {
_.apiQuery.getUserInfo().then(res => {
if(res.group_id==4){
if(res.biz_type==4){
wx.navigateTo({
url: '/pages/allot/index',
})
}else if(res.group_id==4){
wx.navigateTo({
url: '/pages/channel/index',
})