Browse Source

派车及派车详情页

master
chenxuhui 7 years ago
parent
commit
214f11a9f5
7 changed files with 191 additions and 465 deletions
  1. +1
    -1
      app.json
  2. +2
    -78
      pages/sendCargo/sendCargo.js
  3. +30
    -11
      pages/sendCargo/sendCargo.wxml
  4. +54
    -203
      pages/sendCargo/sendCargo.wxss
  5. +3
    -1
      pages/sendTheDetails/sendTheDetails.json
  6. +9
    -28
      pages/sendTheDetails/sendTheDetails.wxml
  7. +92
    -143
      pages/sendTheDetails/sendTheDetails.wxss

+ 1
- 1
app.json View File

@ -49,6 +49,6 @@
] ]
}, },
"navigateToMiniProgramAppIdList": [ "navigateToMiniProgramAppIdList": [
"wx0b897783b2588147"
"wx246fd8f3a0273f2f"
] ]
} }

+ 2
- 78
pages/sendCargo/sendCargo.js View File

@ -1,82 +1,27 @@
const app = getApp(); const app = getApp();
var baseUrl = app.globalData.baseUrl; var baseUrl = app.globalData.baseUrl;
var network = require("../../utils/net.js"); var network = require("../../utils/net.js");
var timechage = require("../../utils/dateTimeUtil.js"); var timechage = require("../../utils/dateTimeUtil.js");
Page({ Page({
/**
* 页面的初始数据
*/
data: { data: {
currentData: 0,
dates: "请选择日期",
index: 0,
showView: false,
list:[], list:[],
}, },
onLoad: function (options) {
// 生命周期函数--监听页面加载
},
sendTheDetails: function (event) { sendTheDetails: function (event) {
let that = this let that = this
var parm1 = event.currentTarget.dataset; var parm1 = event.currentTarget.dataset;
wx.navigateTo({ wx.navigateTo({
url: '/pages/sendTheDetails/sendTheDetails?ID=' + parm1.id url: '/pages/sendTheDetails/sendTheDetails?ID=' + parm1.id
}) })
console.log(parm1.id)
},
onChangeShowState: function () {
}, },
onChangeShowState: function () {
var that = this;
that.setData({
showView: (!that.data.showView)
})
},
checkboxgroupBindchange: function (e) {
var temp1 = e.detail.value
var temp2 = ''
console.log(temp1)
if (temp1.length != 0) {
for (var i = 0, len = temp1.length; i < len; i++) {
temp2 = temp2 + temp1[i] + ','
}
}
},
bindDateChange: function (e) {
this.setData({
dates: e.detail.value
})
this.arr();
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
showView: (options.showView == "true" ? true : false)
},
onShow: function (e) { onShow: function (e) {
var that = this; var that = this;
var reslut = []; var reslut = [];
var method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Customer/OrderRpc/GetNoDriverOrder'; var method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Customer/OrderRpc/GetNoDriverOrder';
var params = []; var params = [];
network.requestLoading(method, params, function (res) { network.requestLoading(method, params, function (res) {
for (var i = 0; i < res.result.length; i++) { for (var i = 0; i < res.result.length; i++) {
let dmo = { let dmo = {
@ -86,33 +31,12 @@ Page({
Money: res.result[i].Money, Money: res.result[i].Money,
} }
reslut.push(dmo) reslut.push(dmo)
console.log(dmo)
} }
//res就是我们请求接口返回的数据
that.setData({ that.setData({
list: reslut, list: reslut,
}) })
}) })
},
//获取当前滑块的index
bindchange: function (e) {
const that = this;
that.setData({
currentData: e.detail.current
})
},
//点击切换,滑块index赋值
checkCurrent: function (e) {
const that = this;
if (that.data.currentData === e.target.dataset.current) {
return false;
} else {
that.setData({
currentData: e.target.dataset.current
})
}
} }
}) })

+ 30
- 11
pages/sendCargo/sendCargo.wxml View File

@ -1,14 +1,33 @@
<scroll-view scroll-y="true" style="height:550px">
<view class='yonghu' wx:for="{{list}}" wx:key="item" data-Id="{{item.ID}}" data-Date="{{item.Date}}" bindtap='sendTheDetails'>
<view class='view1'>莱西养护:<text class='text1'>{{item.
Customer_Name}}</text></view>
<view class='view2'>¥<text class='text2'>{{item.Money}}</text></view>
<view class='view3'>NO:<text class='text3'>{{item.
ID}}</text></view>
<view class='view4'>出库日期:<text class='text4'>{{item.
LoadTime}}</text></view>
</view>
<scroll-view scroll-x="false" scroll-y="true" class='scroll-views' bindscrolltolower="unCheckedScrollLower">
<view class='backGroundContainer'>
<block wx:for="{{list}}" wx:for-item="item" wx:key="item">
<template is="outStoreOrderTemplate" data="{{item}}" />
</block>
</view>
</scroll-view> </scroll-view>
<template name="outStoreOrderTemplate">
<view class='listItem' catchtap='sendTheDetails' data-Id="{{item.ID}}" data-Date="{{item.Date}}">
<view class='bottomView'>
<view class='goodsNum'>
<text class='goodsIDText'>{{item.
Customer_Name}}</text>
</view>
<view class='goodsMoney'>
<text class='goodsMoneyText'>¥{{item.Money}}</text>
</view>
</view>
<view class='bottomView'>
<view class='goodsNum'>
<text class='goodsNumText'>NO.{{item.
ID}}</text>
</view>
<view class='goodsMoney'>
<text class='goodsMoneyText'>出库日期:{{item.
LoadTime}}</text>
</view>
</view>
</view>
<view class='horizontallineView'></view>
</template>

+ 54
- 203
pages/sendCargo/sendCargo.wxss View File

@ -1,231 +1,82 @@
page{
background: #F4F4F4;
page {
background:#EAF1F8;
height: 100%;
} }
.tab{
float: left;
width: 50%;
text-align: center;
padding: 13rpx 0;
margin-top: 4.5px;
}
.topTabSwiper{
.scroll-views {
height: 100%;
width: 100%; width: 100%;
border-top: 0.5px solid #ccc;
border-bottom: 0.5px solid #ccc;
zoom: 1;
background: #FFFFFF;
}
.topTabSwiper:after{
content: "";
clear: both;
display: block;
}
.tabBorer{
border-bottom: 1px solid #2E8CF5 ;
color: #2E8CF5;
}
.swiper_con{
text-align: center;
width: 100%;
height: 100%;
padding: 80rpx 0;
}
.yonghu{
background: #FFFFFF;
border-bottom: 0.5px solid #ccc;
border-top: 0.5px solid #ccc;
height:80px;
display: flex;
flex-direction: column;
} }
.backGroundContainer{
background: #fff;
.yonghu1{
background: #FFFFFF;
border-bottom: 0.5px solid #ccc;
border-top: 0.5px solid #ccc;
height: 120px;
}
.yonghu2{
background: #FFFFFF;
height: 150px;
} }
.view1{
margin-top: 3%;
margin-left: 17px;
color: #464646;
.listItem{
height: 100rpx;
display: flex;
flex-direction: column;
padding: 20rpx 20rpx;
/* border-bottom: 1rpx solid #ddd; */
} }
.view2{
color: #464646;
margin-top: -6.5%;
float: right;
margin-right: 17px;
.horizontallineView {
height: 1rpx;
background-color: #dbdbdb;
margin-left: 20rpx;
margin-right: 0rpx;
} }
.view3{
margin-top: 5%;
margin-left: 17px;
.orderID{
height: 50%;
width: 100%;
margin-bottom: 3%;
color: #888888;
font-size: 14px;
} }
.view4{
float: right;
margin-right: 17px;
color: #888888;
margin-top: -8.8%;
font-size: 14px;
margin-bottom: 3%;
.bottomView{
height: 50%;
width: 100%;
display: flex;
flex-direction: row;
} }
.view5{
margin-left: 17px;
color: #464646;
.goodsNum{
height: 100%;
width: 50%;
} }
.text5{
line-height: 150rpx;
.goodsMoney{
height: 100%;
width: 50%;
text-align: right;
} }
.view6{
margin-left: 53%;
color: #464646;
margin-top: -13.2%;
.goodsIDText{
font-size: 16px;
} }
.view7{
margin-top: 5%;
margin-left: 17px;
margin-bottom: 3%;
color: #888888;
font-size: 14px;
}
.view8{
margin-left: 53%;
color: #888888;
margin-top: -8%;
.goodsNumText{
font-size: 14px; font-size: 14px;
margin-bottom: 3%;
}
.text1{
margin-left: 10px;
color: #666;
} }
.text3{
margin-left: 10px;
}
/* .section{
=======
.section{
>>>>>>> 67a5a393b46de98ccc6ec6470b3973f1bd81d7ab
background:#FFFFFF;
margin-top: 10px;
margin-bottom: 10px;
width:80%;
text-align: center;
height: 30px;
margin-left: 2%;
border-radius: 10rpx;
font-size: 16px;
.goodsMoneyText{
border: 1rpx solid #ccc;
<<<<<<< HEAD
} */
.tianjia{
width: 15%;
height: 6%;
color: #FFFFFF;
background: #2E8CF5;
margin-left:83.5%;
font-size: 14px; font-size: 14px;
margin-top: -12%;
margin-bottom: 10px;
color: #666;
} }
.section1{
background:#FFFFFF;
margin-top: 10px;
margin-bottom: 10px;
width:80%;
text-align: center;
height: 30px;
margin-left: 10%;
margin-right: 10%;
border-radius: 10rpx;
font-size: 16px;
color: #CCCCCC;
border: 1rpx solid #ccc;
.xinjian{
width: 160rpx;
height: 160rpx;
position: fixed;
bottom: 60rpx;
right: 20rpx;
} }
.picker{
line-height: 30px;
}
.xian{
width: 80%;
height: 1px;
margin-left: 10%;
margin-right: 10%;
background: #888888;
}
.siji{
color: #2E8CF5;
margin-left: 25%;
margin-top: 2%;
}
.hide{
display: none;
}
.show{
display: block;
}
.xuanze{
background: #FFFFFF;
text-align: center;
color: #2E8CF5;
margin-top: 30%;
}
.xuanze1{
width: 80%;
margin-top: 10%;
text-align: center;
color: #2E8CF5;
}
.xuanze1{
line-height:100rpx;
}
.checkbox1{
margin-left: 3%;
width: 1%;
height: 5%;
margin-top: 2.5%;
}
.chose{
width: 100%;
height: 40px;
position: fixed;
bottom: 0rpx;
}

+ 3
- 1
pages/sendTheDetails/sendTheDetails.json View File

@ -1 +1,3 @@
{}
{
"navigationBarTitleText": "派单详情"
}

+ 9
- 28
pages/sendTheDetails/sendTheDetails.wxml View File

@ -1,75 +1,56 @@
<view> <view>
<view class='yonghu' catchtap='sendTheDetails'>
<view class='yonghu1'>
<view class='view1'>订单: <view class='view1'>订单:
<text class='text1'>{{ID1}}</text> <text class='text1'>{{ID1}}</text>
</view> </view>
</view> </view>
<view class='yonghu1' catchtap='sendTheDetails'>
<view class='yonghu1'>
<view class='view1'>发货时间: <view class='view1'>发货时间:
<text class='text1'>{{LoadTime1}}</text> <text class='text1'>{{LoadTime1}}</text>
</view> </view>
</view> </view>
<view class='yonghu1' catchtap='sendTheDetails'>
<view class='yonghu1'>
<view class='view1'>重量: <view class='view1'>重量:
<text class='text1'>{{Number}}</text> <text class='text1'>{{Number}}</text>
</view> </view>
</view> </view>
<view class='yonghu1' catchtap='sendTheDetails'>
<view class='yonghu1'>
<view class='view1'>箱数: <view class='view1'>箱数:
<text class='text1'>{{SecondNumber}}</text> <text class='text1'>{{SecondNumber}}</text>
</view> </view>
</view> </view>
<view class='yonghu1' catchtap='sendTheDetails'>
<view class='yonghu1'>
<view class='view1'>司机: <view class='view1'>司机:
<view class='main-body'> <view class='main-body'>
<block wx:for="{{obj}}" wx:key="item"> <block wx:for="{{obj}}" wx:key="item">
<view class='client'>
<view class='select-drug' bindtap="powerDrawer1" data-statu="open" data-index="{{index}}">
<view class='drug' bindtap='drug'>
{{item.yaopin}}
</view>
</view>
<view class='select-drug' bindtap="powerDrawer1" data-statu="open" data-index="{{index}}">
{{item.yaopin}}
</view> </view>
</block> </block>
<!-- <view class='btn1' catchtap='btn1'> 添加</view> -->
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view animation="{{animationData}}" class="drawer_box" wx:if="{{showModalStatus}}"> <view animation="{{animationData}}" class="drawer_box" wx:if="{{showModalStatus}}">
<!--drawer content-->
<view class='top'> <view class='top'>
<input class="sousuo" placeholder='请搜索' bindinput="phoneNum"></input> <input class="sousuo" placeholder='请搜索' bindinput="phoneNum"></input>
</view> </view>
<view class="drawer_content"> <view class="drawer_content">
<block wx:for="{{name1}}">
<block wx:for="{{name1}}" wx:index="index" wx:key="item">
<view class="top grid" catchtap='a' data-index="{{index}}" range="{{name1}}" data-id="{{name1}}"> <view class="top grid" catchtap='a' data-index="{{index}}" range="{{name1}}" data-id="{{name1}}">
<text class="title col-0">{{name1[index].Name}}</text> <text class="title col-0">{{name1[index].Name}}</text>
</view> </view>
</block> </block>
</view> </view>
<view class="btn_ok" bindtap="powerDrawer" data-statu="close">取消</view> <view class="btn_ok" bindtap="powerDrawer" data-statu="close">取消</view>
</view> </view>
<button class='paiche' bindtap='paiche'>派车</button> <button class='paiche' bindtap='paiche'>派车</button>
<button class='fenxiang' open-type='share'>分享</button>
<button class='fenxiang' open-type='share'>分享</button>

+ 92
- 143
pages/sendTheDetails/sendTheDetails.wxss View File

@ -1,178 +1,127 @@
page{
background: rgb(240, 239, 245)
page {
background: rgb(240, 239, 245);
} }
.yonghu{
background: #FFFFFF;
height: 50px;
/* border-bottom: 0.1px ; */
margin-top: 10px;
border-top: 0.5px solid rgb(240, 239, 245);
}
.yonghu1{
background: #FFFFFF;
height: 50px;
/* border-bottom: 0.1px ; */
border-top: 0.5px solid rgb(240, 239, 245);
}
.yonghu2{
background: #FFFFFF;
.yonghu1 {
background: #fff;
height: 50px; height: 50px;
border-bottom: 0.1px ;
border-top: 1px solid #bebdbd;
border-top: 0.5px solid rgb(240, 239, 245);
} }
.view1{
.view1 {
margin-top: 3%; margin-top: 3%;
margin-left: 17px; margin-left: 17px;
color: #464646; color: #464646;
} }
.text1{
margin-right: 5%;
float: right;
.main-body {
margin-right: 5%;
float: right;
} }
.picker{
float: right;
margin-right: 20%;
}
.text1 {
margin-right: 5%;
float: right;
}
.paiche{
color: #FFFFFF;
background: #2E8CF5;
.paiche {
color: #fff;
background: #f98b29;
margin-top: 20%; margin-top: 20%;
margin-left: 5%; margin-left: 5%;
width: 30%;
width: 40%;
float: left; float: left;
} }
.fenxiang{
color: #FFFFFF;
background: #2E8CF5;
.fenxiang {
color: #fff;
background: #f98b29;
margin-top: 20%; margin-top: 20%;
margin-right: 5%; margin-right: 5%;
width: 30%;
width: 40%;
float: right; float: right;
} }
/*mask*/
.drawer_screen {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 1000;
background: #000;
opacity: 0.5;
overflow: hidden;
}
/*content*/
.drawer_screen {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 1000;
background: #000;
opacity: 0.5;
overflow: hidden;
}
.sousuo {
/* margin-right: 10%;
margin-left: 10%; */
text-align: center;
background: #d6d8da;
height: 40px;
font-size: 28rpx;
}
.drawer_content {
height: 500rpx;
overflow-y: scroll; /*超出父盒子高度可滚动*/
}
.drawer_box {
width: 650rpx;
overflow: hidden;
position: fixed;
top: 50%;
left: 0;
z-index: 1001;
background: #fafafa;
margin: -150px 50rpx 0 50rpx;
border-radius: 3px;
}
/*mask*/
.drawer_screen {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 1000;
background: #000;
opacity: 0.5;
overflow: hidden;
}
/*content*/
.drawer_box {
width: 650rpx;
overflow: hidden;
position: fixed;
top: 50%;
left: 0;
z-index: 1001;
background: #FAFAFA;
margin: -150px 50rpx 0 50rpx;
border-radius: 3px;
}
.drawer_title{
padding:15px;
font: 20px "microsoft yahei";
text-align: center;
}
.drawer_content {
height: 210px;
overflow-y: scroll; /*超出父盒子高度可滚动*/
}
.btn_ok{
padding: 10px;
font: 20px "microsoft yahei";
text-align: center;
border-top: 1px solid #E8E8EA;
color: #2E8CF5;
}
.top{
padding-top:8px;
}
.bottom {
padding-bottom:8px;
}
.title {
height: 30px;
line-height: 30px;
width: 160rpx;
text-align: center;
display: inline-block;
font: 300 28rpx/30px "microsoft yahei";
}
.input_view{
font: 12px "microsoft yahei";
background: #fff;
color:#000;
line-height: 30px;
}
input {
font: 12px "microsoft yahei";
background: #fff;
color:#000 ;
}
radio{
margin-right: 20px;
}
.grid { display: -webkit-box; display: box; }
.col-0 {-webkit-box-flex:0;box-flex:0;}
.col-1 {-webkit-box-flex:1;box-flex:1;}
.fl { float: left;}
.fr { float: right;}
.main-body{
color: #C9C9C9;
margin-top: -1%;
height: 35px;
float: right;
.btn_ok {
padding: 10px;
font: 20px "microsoft yahei";
text-align: center;
border-top: 1px solid #e8e8ea;
color: #2e8cf5;
} }
.top {
height: 20%;
justify-content: center;
align-items: center;
}
.btn1{
margin-left: 9.4%;
background: #ffffff;
height: 44px;
margin-right: 57px;
color: #2E8CF5;
line-height: 2.2rem;
.grid1 {
width: 100%;
border-bottom: 1px solid #c3c3c3;
/* padding-top: 5px;
padding-bottom: 10px; */
padding-top: 16rpx;
padding-bottom: 16rpx;
text-align: center; text-align: center;
} }
.client{
height: 44px;
background: #ffffff;
margin-left: 40px;
margin-right: 58px;
}
.drug{
text-align: center;
line-height: 30px;
.text3 {
font-size: 18px;
color: rgb(48, 48, 48);
} }

Loading…
Cancel
Save