Browse Source

no message

feature/v1.6
xpz2018 4 years ago
parent
commit
bfcbb044c2
5 changed files with 18 additions and 12 deletions
  1. 2
      components/field/index.js
  2. 10
      pages/index/index.js
  3. 4
      pages/process/order-price/index.wxml
  4. 6
      pages/setting/paper-detial/index.js
  5. 8
      pages/setting/paper-detial/index.wxml

2
components/field/index.js

@ -38,7 +38,7 @@ VantComponent({
this.$emit('focus', event.detail)
},
onBlur(event) {
this.focused = false
this.data.focused = false
this.setShowClear()
this.$emit('blur', event.detail)
},

10
pages/index/index.js

@ -27,6 +27,7 @@ Scene({
factoryName: '',
items: [],
mActiveIndex: 0,
popIndex: 0,
factoryId: '',
arrow: false,
visible: false
@ -74,6 +75,7 @@ Scene({
enterprise.children = children
this.data.items.push(enterprise)
}
this.data.popIndex = this.data.mActiveIndex
this.setData({
userInfo: app.userInfo,
items: this.data.items,
@ -123,7 +125,10 @@ Scene({
this.setData({zIndex: detail})
},
showFactoryList: function(){
this.setData({ visible: !this.data.visible })
if(!this.data.arrow){
return
}
this.setData({ visible: !this.data.visible, mActiveIndex: this.data.popIndex })
if (this.data.tabIndex == 0) {
var pageView = this.selectComponent('#' + this.data.tabList[this.data.tabIndex].value)
pageView.onClose()
@ -133,7 +138,7 @@ Scene({
this.setData({ visible: false })
},
onClickNav({ detail }) {
this.setData({ mActiveIndex: detail.index || 0 });
this.setData({ mActiveIndex: detail.index || 0 })
},
changeFactory({ detail }) {
if(app.userInfo.factoryId == detail.id){
@ -143,6 +148,7 @@ Scene({
wx.showLoading({ title: '正在切换', mask: true })
app.userInfo.factoryId = detail.id
storage.put('X-FACTORY-ID' + app.userInfo.userId, detail.id)
this.data.popIndex = this.data.mActiveIndex
const element = app.userInfo.enterpriseInfos[this.data.mActiveIndex]
if(element.isEnterprisePrimary){
app.userInfo.type = 'ADMIN'

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

@ -41,13 +41,13 @@
<view class="text-black">{{form.factoryCustomerName}}</view>
</view>
</van-cell>
<van-cell clickable center is-link bind:click="showPlate">
<van-cell clickable center is-link arrow-direction="down" bind:click="showPlate">
<view slot="title" class="flex flex-justify">
<view class="text-black">车牌号码</view>
<view class="{{form.plateNumber ? 'text-black' : 'text-gray'}}">{{form.plateNumber || '请输入车牌号码'}}</view>
</view>
</van-cell>
<van-cell clickable center is-link bind:click="showCategory">
<van-cell clickable center is-link arrow-direction="down" bind:click="showCategory">
<view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view>

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

@ -74,7 +74,7 @@ Scene({
wx.showLoading({ title: '正在处理', mask: true })
delePaperPrice(this.data.form.id).then(result => {
wx.hideLoading()
util.showBackToast('删除成功!')
util.showBackToast('删除成功')
event.emit('OrderMessage', { what: 201 })
}).catch(err => {
wx.hideLoading()
@ -96,7 +96,7 @@ Scene({
if(util.isEmpty(this.data.form.id)){
savePaperPrice(this.data.form).then(result => {
wx.hideLoading()
util.showBackToast('添加成功!')
util.showBackToast('添加成功')
event.emit('OrderMessage', { what: 201 })
}).catch(err => {
wx.hideLoading()
@ -105,7 +105,7 @@ Scene({
} else {
editPaperPrice(this.data.form).then(result => {
wx.hideLoading()
util.showBackToast('修改成功!')
util.showBackToast('修改成功')
event.emit('OrderMessage', { what: 202, detail: this.data.form })
}).catch(err => {
wx.hideLoading()

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

@ -4,14 +4,14 @@
</cu-custom>
<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
<van-field title-width="360rpx" required value="{{form.categoryName }}" readonly input-align="right" label="品类名称:" is-link arrow-direction="down"
bindtap="chooseMethod" placeholder="请选择品类"/>
<van-field title-width="360rpx" id="productName" value="{{ form.productName || form.categoryName }}" label="品类别名:"
placeholder="请输入品类别名" bind:input="bindInput" />
placeholder="请输入品类别名" input-align="right" clearable bind:input="bindInput" />
<van-field title-width="360rpx" required id="defaultUnitPrice" value="{{ form.defaultUnitPrice }}" label="收货价格(元/公斤):"
placeholder="请输入收货价格" type="digit" bind:input="bindInput" />
placeholder="请输入收货价格" input-align="right" clearable type="digit" bind:input="bindInput" />
<van-field title-width="360rpx" id="highestUnitPrice" value="{{ form.highestUnitPrice }}" label="最高收货价格(元/公斤):"
placeholder="请输入最高收货价格" type="digit" bind:input="bindInput" />
placeholder="请输入最高收货价格" input-align="right" clearable type="digit" bind:input="bindInput" />
<view style="margin-top:48rpx;padding:48rpx 32rpx">
<van-button block type="danger" bind:click="deleteForm" wx:if="{{ form.id}}">删除</van-button>
<view style="height:36rpx" wx:if="{{ form.id}}"></view>

Loading…
Cancel
Save