Browse Source

no message

feature/v1.2
xpz2018 5 years ago
parent
commit
259b4df626
8 changed files with 14 additions and 10 deletions
  1. 3
      app.js
  2. 3
      pages/home/customer-info/index.js
  3. 2
      pages/home/customer-info/index.wxml
  4. 6
      pages/home/customer-list/index.js
  5. 1
      pages/home/employee-info/index.json
  6. 2
      pages/home/employee-info/index.wxml
  7. 6
      pages/setting/paper-detial/index.wxml
  8. 1
      pages/setting/paper/index.js

3
app.js

@ -1,11 +1,10 @@
//app.js
App({
evn: 0, // 0: 开发版本;1:测试版本;2:生产版本
evn: 2, // 0: 开发版本;1:测试版本;2:生产版本
tmplIds: [''],
version: 152,
xAppId: '503258978847953926',
userInfo: null,
//----------------------------------------------globalData--------------------------------------
globalData: {
token: null,

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

@ -29,6 +29,9 @@ Scene({
wx.showLoading({ title: '正在获取', mask: true })
getCustomerInfo(options.id).then(result => {
wx.hideLoading()
if(!util.isEmpty(options.userId)){
result.data.userId = options.userId
}
this.setData({ form: result.data })
}).catch(err => {
wx.hideLoading()

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

@ -7,7 +7,7 @@
<van-field value="{{ form.cardNo }}" label="卡号:" disabled wx:if="{{ form.cardNo }}"/>
<van-field id="name" value="{{ form.name }}" label="客户姓名:" placeholder="请输入客户姓名" bind:input="bindInput"/>
<van-field id="mobile" value="{{ form.mobile }}" type="number" label="手机号码:" placeholder="请输入手机号码" bind:input="bindInput"/>
<van-field value="{{ form.defaultPaymentMethod ? form.defaultPaymentMethod == 2 ? '转账' : '现金' : '请选择付款方式'}}" readonly label="付款方式:" is-link bindtap="chooseMethod" />
<van-field value="{{ form.defaultPaymentMethod == 1 ? '现金' : (form.defaultPaymentMethod == 2 ? '转账' : '' )}}" readonly label="付款方式:" is-link bindtap="chooseMethod" placeholder="请选择付款方式" />
<van-field id="bankName" value="{{ form.bankName }}" label="银行名称:" readonly is-link placeholder="请选择银行" bind:input="bindInput" wx:if="{{form.defaultPaymentMethod == 2}}" bindtap="chooseMethod"/>
<van-field id="bankBranchName" value="{{ form.bankBranchName }}" label="开户行:" placeholder="请输入开户行" bind:input="bindInput" wx:if="{{form.defaultPaymentMethod == 2}}"/>
<van-field id="bankCardNo" value="{{ form.bankCardNo }}" label="银行卡号:" placeholder="请输入银行卡号" bind:input="bindInput" wx:if="{{form.defaultPaymentMethod == 2}}"/>

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

@ -83,7 +83,11 @@ Scene({
this.data.page = e.currentTarget.dataset.page
this.data.index = e.currentTarget.dataset.index
var item = this.data.orderList[e.currentTarget.dataset.page][e.currentTarget.dataset.index]
wx.navigateTo({ url: `/pages/home/customer-info/index?id=${item.id}` })
if(util.isEmpty(item.userId)){
wx.navigateTo({ url: `/pages/home/customer-info/index?id=${item.id}` })
} else {
wx.navigateTo({ url: `/pages/home/customer-info/index?id=${item.id}&userId=${item.userId}` })
}
},
bindCustomer: function(e){
var item = this.data.orderList[e.currentTarget.dataset.page][e.currentTarget.dataset.index]

1
pages/home/employee-info/index.json

@ -4,7 +4,6 @@
"van-cell": "/components/cell/index",
"van-field": "/components/field/index",
"van-loading": "/components/loading/index",
"van-image": "/components/image/index",
"van-icon": "/components/icon/index",
"van-notice-bar": "/components/notice-bar/index",
"van-checker": "/components/checker/index",

2
pages/home/employee-info/index.wxml

@ -6,7 +6,7 @@
<van-field value="{{ form.enterpriseMemberId }}" label="员工编号:" disabled wx:if="{{ form.enterpriseMemberId }}" />
<van-field value="{{ form.enterpriseMemberName || form.applicantName }}" label="员工姓名:" placeholder="请输入员工姓名" bind:input="bindInput" />
<van-field value="{{ form.mobile || form.applicationMobile }}" type="number" label="手机号码:" disabled placeholder="请输入手机号码" />
<van-field value="{{ form.enterpriseRoleNames || '请选择角色'}}" readonly label="员工角色:" is-link bindtap="chooseMethod" />
<van-field value="{{ form.enterpriseRoleNames }}" placeholder="请选择角色" readonly label="员工角色:" is-link bindtap="chooseMethod" />
<van-cell wx:if="{{form.enterpriseMemberId}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">员工状态:</view>

6
pages/setting/paper-detial/index.wxml

@ -5,7 +5,7 @@
<van-notice-bar color="#1989fa" background="#008AFF" left-icon="info-o" text="点击可以修改纸品信息" />
<van-field title-width="360rpx" required value="{{form.categoryName }}" readonly label="品类名称:" is-link
bindtap="chooseMethod" />
bindtap="chooseMethod" placeholder="请选择品类"/>
<van-field title-width="360rpx" id="productName" value="{{ form.productName || form.categoryName }}" label="品类别名:"
placeholder="请输入品类别名" bind:input="bindInput" />
<van-field title-width="360rpx" required id="defaultUnitPrice" value="{{ form.defaultUnitPrice }}" label="收货价格(元/公斤):"
@ -13,8 +13,8 @@
<van-field title-width="360rpx" id="highestUnitPrice" value="{{ form.highestUnitPrice }}" label="最高收货价格(元/公斤):"
placeholder="请输入最高收货价格" type="digit" bind:input="bindInput" />
<view style="margin-top:48rpx;padding:48rpx 32rpx">
<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>

1
pages/setting/paper/index.js

@ -28,7 +28,6 @@ Scene({
this.fetchOrderList()
},
onEvent: function(message){
console.log('onEvent....31')
if (message.what == 201) {
this.onRefreshList()
} else if (message.what == 202) {

Loading…
Cancel
Save