Browse Source

no message

feature/v2.1
xpz2018 4 years ago
parent
commit
12770b8191
6 changed files with 25 additions and 5 deletions
  1. 4
      pages/home/customer-info/index.wxml
  2. 3
      pages/home/customer-list/index.js
  3. 1
      pages/home/customer-list/index.json
  4. 4
      pages/home/customer-list/index.wxml
  5. 14
      pages/process/order-price/index.js
  6. 4
      pages/process/order-price/index.wxml

4
pages/home/customer-info/index.wxml

@ -28,8 +28,8 @@
<view style="margin-top:16rpx;padding:48rpx 32rpx" wx:else>
<van-button block type="primary" bind:click="registCustomer" wx:if="{{form.id && !form.userId}}">邀请注册纸通宝</van-button>
<view style="height:36rpx" wx:if="{{form.id && !form.userId}}"></view>
<van-button block type="danger" bind:click="deleteForm">删除客户</van-button>
<view style="height:36rpx"></view>
<van-button block type="danger" bind:click="deleteForm" wx:if="{{form.id}}">删除客户</van-button>
<view style="height:36rpx" wx:if="{{form.id}}"></view>
<van-button block type="info" bind:click="submitForm">保存</van-button>
</view>

3
pages/home/customer-list/index.js

@ -102,6 +102,9 @@ Scene({
var item = this.data.orderList[e.currentTarget.dataset.page][e.currentTarget.dataset.index]
wx.navigateTo({ url: `/pages/home/registe/index?id=${item.id}` })
},
addCustomer: function(){
wx.navigateTo({ url: `/pages/home/customer-info/index?` })
},
onUnload: function(){
event.remove('EventMessage', this)
}

1
pages/home/customer-list/index.json

@ -2,6 +2,7 @@
"usingComponents": {
"van-search": "/components/search/index",
"refresh-view": "/components/refresh-view/index",
"van-button": "/components/button/index",
"van-image": "/components/image/index",
"van-divider": "/components/divider/index",
"van-loading": "/components/loading/index",

4
pages/home/customer-list/index.wxml

@ -50,5 +50,7 @@
<van-icon name="close" color="white" size="36px" custom-style="margin-top:48px" catch:tap="onClickHideEmbedded" />
</view>
</van-overlay> -->
<view style="border-radius: 50rpx;position: fixed;bottom:160rpx;right:50rpx">
<van-button round type="info" icon="plus" bind:click="addCustomer" custom-style="width: 100rpx;height: 100rpx;"></van-button>
</view>
<notification id="qn-notification"/>

14
pages/process/order-price/index.js

@ -62,6 +62,20 @@ Scene({
nextStep: function (e) {
this.setData({ step: 2 })
},
selectCustomer: function(){
var that = this
wx.navigateTo({
url: `/pages/home/customer-list/index?type=1`,
events: {
onCallback: (data) => {
if (data.what == 130) {
that.data.form.factoryCustomerId = data.detail.id
that.setData({ ['form.factoryCustomerName']: data.detail.name })
}
}
}
})
},
showPlate: function (e) {
this.keyboard = this.keyboard || this.selectComponent('#wux-keyboard')
this.keyboard.show(this.data.form.plateNumber, 0)

4
pages/process/order-price/index.wxml

@ -4,7 +4,7 @@
</cu-custom>
<view wx:if="{{form && step == 1}}">
<van-cell>
<van-cell clickable center is-link bind:click="selectCustomer">
<view slot="title" class="flex flex-justify">
<view class="text-black">客户姓名</view>
<view class="text-black">{{form.factoryCustomerName}}</view>
@ -35,7 +35,7 @@
<view style="height:30rpx;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>
<van-cell>
<van-cell clickable center is-link bind:click="selectCustomer">
<view slot="title" class="flex flex-justify">
<view class="text-black">客户姓名</view>
<view class="text-black">{{form.factoryCustomerName}}</view>

Loading…
Cancel
Save