Browse Source

no message

feature/v1.6
xpz2018 4 years ago
parent
commit
d8e92c8866
4 changed files with 39 additions and 52 deletions
  1. 2
      components/vehicle-keyboard/index.js
  2. 8
      pages/agent/appointment/index.js
  3. 79
      pages/agent/appointment/index.wxml
  4. 2
      pages/login/index.js

2
components/vehicle-keyboard/index.js

@ -37,6 +37,8 @@ Component({
if(number && number.length == 7){ if(number && number.length == 7){
this.data.plateNumber = number.split('') this.data.plateNumber = number.split('')
index = this.data.plateNumber.length - 1 index = this.data.plateNumber.length - 1
} else {
this.data.plateNumber = ["", "", "", "", "", "", ""]
} }
this.data.type = type this.data.type = type
this.updateNumber() this.updateNumber()

8
pages/agent/appointment/index.js

@ -112,6 +112,12 @@ Scene({
this.data.timeList.push(util.formatDate(day, 'Y-M-D')) this.data.timeList.push(util.formatDate(day, 'Y-M-D'))
} }
}, },
onInput: function(e){
if(!util.isEmpty(e.currentTarget.id)){
var form_data = 'form.' + e.currentTarget.id
this.setData({ [form_data]: e.detail })
}
},
bindInput: function (e) { bindInput: function (e) {
if(!util.isEmpty(e.currentTarget.id)){ if(!util.isEmpty(e.currentTarget.id)){
var form_data = 'form.' + e.currentTarget.id var form_data = 'form.' + e.currentTarget.id
@ -272,7 +278,7 @@ Scene({
this.setData({ show: false }) this.setData({ show: false })
wx.navigateBack() wx.navigateBack()
}, },
onInput: function(){
onCodeing: function(){
if(util.isEmpty(this.data.code)){ if(util.isEmpty(this.data.code)){
util.showToast('请输入邀请码') util.showToast('请输入邀请码')
this.setData({ show: true }) this.setData({ show: true })

79
pages/agent/appointment/index.wxml

@ -18,7 +18,7 @@
<view style="height:24rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view> <view style="height:24rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view>
<view class="text-black text-sg text-bold" style="margin-left: 12rpx">纸品信息</view> <view class="text-black text-sg text-bold" style="margin-left: 12rpx">纸品信息</view>
</view> </view>
<van-cell clickable center is-link bind:click="chooseCustomer">
<van-cell clickable center bind:click="chooseCustomer">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black">纸厂名称</view> <view class="flex flex-center text-black">纸厂名称</view>
<view class="{{factoryDetail.name ? 'text-black' : 'text-gray'}}">{{factoryDetail.name}}</view> <view class="{{factoryDetail.name ? 'text-black' : 'text-gray'}}">{{factoryDetail.name}}</view>
@ -30,45 +30,26 @@
<view class="{{cateName ? 'text-black' : 'text-gray'}}">{{cateName || '请选择品类'}}</view> <view class="{{cateName ? 'text-black' : 'text-gray'}}">{{cateName || '请选择品类'}}</view>
</view> </view>
</van-cell> </van-cell>
<view class="cu-list menu no-card sm-border">
<!-- <view class="cu-item text-sg" style="text-align: right;border-top: 2rpx solid #f3f3f3">
<view class="title">纸厂名称:</view>
<input value="{{factoryDetail.name}}" style="flex: 1"></input>
</view>
<view id="cateName" class="cu-item" bindtap="showPicker">
<view class="flex flex-justify content cu-item arrow">
<view class="text-sg" style="min-width:170rpx">纸品品类:</view>
<view class="flex" style="text-align:left" wx:if="{{cateName}}">
<view class="text-sg text-blue">{{cateName}}</view>
</view>
<view class="flex" style="text-align:left" wx:else>
<view class="text-sg text-input">请选择纸品</view>
</view>
</view>
<text class="cuIcon-right text-gray" wx:if="{{!flag}}" style="font-size:32rpx;padding-top:2rpx"></text>
</view> -->
<view class="cu-item">
<view class="text-sg" style="min-width:170rpx">预估单价(元/吨):</view>
<view class="text-sg text-black">
<van-cell clickable center bind:click="chooseCustomer">
<view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black">预估单价(元/吨)</view>
<view class="text-sg text-black">
<text>{{formate.formatePrice(form.unitPrice)}}</text> <text>{{formate.formatePrice(form.unitPrice)}}</text>
<text class="text-sm" wx:if="{{form.publicSubsidies}}">(已含补贴{{formate.formatePrice(form.publicSubsidies)}}元/吨)</text> <text class="text-sm" wx:if="{{form.publicSubsidies}}">(已含补贴{{formate.formatePrice(form.publicSubsidies)}}元/吨)</text>
</view> </view>
</view>
</van-cell>
<van-field id="totalEstimatedWeight" type="digit" placeholder="请输入预估重量" clearable input-align="right" bind:change="onInput">
<view slot="label" class="flex text-black" style="width:200rpx">
<text>预估重量(吨)</text>
</view> </view>
<view class="cu-item text-sg" style="text-align: right">
<view class="title">预估重量(吨):</view>
<input id="totalEstimatedWeight" type="digit" placeholder-style="color:#aaa" placeholder="请输入预估重量"
value="{{form.totalEstimatedWeight}}" bindinput="bindInput" style="flex: 1"></input>
</view>
<view id="deliveryTime" class="cu-item" style="border-bottom: 0rpx solid #ddd" bindtap="showPicker">
<view class="flex flex-justify content cu-item arrow">
<view class="text-sg" style="min-width:170rpx">货到时间:</view>
<view class="flex" style="text-align:left">
<view class="text-sg {{form.deliveryTime?'text-blue':'input-grey'}}">{{form.deliveryTime||'请选择货到时间'}}</view>
</view>
</view>
<text class="cuIcon-right text-gray" wx:if="{{!flag}}" style="font-size:32rpx;padding-top:2rpx"></text>
</van-field>
<van-cell id="deliveryTime" clickable center is-link arrow-direction="down" bind:click="showPicker">
<view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black">货到时间</view>
<view class="{{form.deliveryTime ? 'text-black' : 'text-gray'}}">{{form.deliveryTime||'请选择货到时间'}}</view>
</view> </view>
</view>
</van-cell>
<view class="flex flex-center bg-white" style="margin-top: 16rpx;justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3"> <view class="flex flex-center bg-white" style="margin-top: 16rpx;justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3">
<view style="height:24rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view> <view style="height:24rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view>
@ -79,23 +60,21 @@
<van-button plain round size="small" data-index="{{index}}" custom-style="padding: 0;min-width: 160rpx;" bind:click="tagChange">{{item.plateNumber}}</van-button> <van-button plain round size="small" data-index="{{index}}" custom-style="padding: 0;min-width: 160rpx;" bind:click="tagChange">{{item.plateNumber}}</van-button>
</view> </view>
</view> </view>
<view class="bg-white" style="padding: 0rpx 30rpx">
<view class="flex flex-justify" wx:for="{{vehicleList}}" wx:key="index" style="height: 100rpx;border-bottom:1rpx solid #f3f3f3;">
<view class="flex flex-center text-black text-sg">
<text class="text-sm" style="width: 14px;line-height: 14px;text-align: center;border-radius: 50%;border: 1px solid #999">{{index + 1}}</text>
<text style="margin-left: 8rpx">货车车牌:</text>
</view>
<view class="text-sg flex flex-center {{item.plateNumber?'text-black':'input-grey'}}" style="flex: 1;height:64rpx;justify-content: flex-start"
data-index="{{index}}" bindtap="showKeyboard">{{item.plateNumber||'点击输入车牌号码'}}</view>
<text class="cuIcon-close text-gray" style="font-size:44rpx;" data-index="{{index}}" wx:if="{{vehicleList.length > 1}}" bindtap="deleteCate"></text>
<van-cell clickable center wx:for="{{vehicleList}}" wx:key="index" data-index="{{index}}" bind:click="showKeyboard">
<view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black text-sg">
<text class="text-sm" style="width: 14px;line-height: 14px;text-align: center;border-radius: 50%;border: 1px solid #999">{{index + 1}}</text>
<text style="margin-left: 8rpx">货车车牌:</text>
</view>
<view class="{{item.plateNumber ? 'text-black' : 'text-gray'}}" style="flex:1">{{item.plateNumber || '点击输入车牌号码'}}</view>
<text class="cuIcon-close text-gray" style="font-size:44rpx;" data-index="{{index}}" wx:if="{{vehicleList.length > 1}}" catchtap="deleteCate"></text>
</view> </view>
<view class="flex flex-center" style="height:90rpx;line-height:90rpx" bindtap="addCate">
<text class="cuIcon-roundadd text-blue" style="font-size: 16px;"></text>
<text class="text-blue text-sg" style="margin-left:8rpx">添加车辆</text>
</view>
</van-cell>
<view class="bg-white flex flex-center" style="height:90rpx;line-height:90rpx" bindtap="addCate">
<text class="cuIcon-roundadd text-blue" style="font-size: 16px;"></text>
<text class="text-blue text-sg" style="margin-left:8rpx">添加车辆</text>
</view> </view>
<view class="flex flex-center bg-white" style="margin-top: 16rpx;justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3"> <view class="flex flex-center bg-white" style="margin-top: 16rpx;justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3">
<view style="height:24rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view> <view style="height:24rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view>
<view class="text-black text-sg text-bold" style="margin-left: 12rpx">其他信息</view> <view class="text-black text-sg text-bold" style="margin-left: 12rpx">其他信息</view>
@ -115,7 +94,7 @@
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29"> <van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<van-picker show-toolbar title="{{toolbar}}" columns="{{ columns }}" bind:cancel="onHide" bind:confirm="onConfirm" /> <van-picker show-toolbar title="{{toolbar}}" columns="{{ columns }}" bind:cancel="onHide" bind:confirm="onConfirm" />
</van-popup> </van-popup>
<van-dialog use-slot title="邀请码" show="{{ show }}" transition="fade" bind:cancel="onClose" bind:confirm="onInput">
<van-dialog use-slot title="邀请码" show="{{ show }}" transition="fade" bind:cancel="onClose" bind:confirm="onCodeing">
<input class="dialog-input" placeholder-style="color:#aaa;" maxlength="8" placeholder="填写业务人员邀请码(必填)" bindinput="bindInput" /> <input class="dialog-input" placeholder-style="color:#aaa;" maxlength="8" placeholder="填写业务人员邀请码(必填)" bindinput="bindInput" />
</van-dialog> </van-dialog>
<van-dialog id="van-dialog" /> <van-dialog id="van-dialog" />

2
pages/login/index.js

@ -180,6 +180,7 @@ Page({
if(applicationStatus == -1){ if(applicationStatus == -1){
this.setData({ loging: false}) this.setData({ loging: false})
Dialog.alert({ title: '温馨提示', message: '还没有您所属的打包站信息,请联系相关客服人员' }).then(() => { Dialog.alert({ title: '温馨提示', message: '还没有您所属的打包站信息,请联系相关客服人员' }).then(() => {
wx.redirectTo({ url: '/pages/agent/appointment/index' })
}) })
return return
} }
@ -196,7 +197,6 @@ Page({
}) })
} }
}).catch(err => { }).catch(err => {
console.log(err)
if(err.code == 400){ if(err.code == 400){
util.showToast('获取用户信息失败,请注册登录') util.showToast('获取用户信息失败,请注册登录')
this.setData({ loging: false, regist: true}) this.setData({ loging: false, regist: true})

Loading…
Cancel
Save