Browse Source

no message

feature/v2.3
xpz2018 4 years ago
parent
commit
c3d5b4b35a
8 changed files with 86 additions and 1 deletions
  1. 10
      pages/process/payment/index.js
  2. 1
      pages/process/payment/index.json
  3. 7
      pages/process/payment/index.wxml
  4. 2
      pages/setting/paper-detial/index.wxml
  5. 31
      pages/setting/paper-select/index.js
  6. 12
      pages/setting/paper-select/index.json
  7. 23
      pages/setting/paper-select/index.wxml
  8. 1
      pages/setting/paper-select/index.wxss

10
pages/process/payment/index.js

@ -114,6 +114,9 @@ Scene({
if(settleType){
this.data.settleType = String(settleType)
}
if(this.data.orderStatus == 42 && this.data.settleType == '3'){
this.data.settleType = '1'
}
this.data.orderStatus = orderList[0].status
this.setData({
height: app.globalData.fragmentHeight,
@ -163,9 +166,16 @@ Scene({
var form_data = 'params.' + e.currentTarget.id
this.setData({ [form_data]: e.detail })
},
fileChange: function({detail}){
this.data.imageList = []
for (let index = 0; index < detail.fileList.length; index++) {
this.data.imageList.push(detail.fileList[index].url)
}
},
agentPayment: function(settleType){
wx.showLoading({ title: '正在处理', mask: true })
this.data.requesting = true
this.data.params.settleType = Number(settleType)
paymentOrder(this.data.params).then(result => {
wx.hideLoading()

1
pages/process/payment/index.json

@ -10,6 +10,7 @@
"van-dialog": "/components/dialog/index",
"submit-layout": "/components/submit-layout/index",
"vip-dialog": "/pages/message/vip-dialog/index",
"van-uploader": "/components/uploader/index",
"notification": "/pages/message/notification/index"
}
}

7
pages/process/payment/index.wxml

@ -66,6 +66,13 @@
</view>
</view>
</van-cell>
<view class="bg-white" style="padding: 24rpx 32rpx 20rpx 32rpx" wx:if="{{settleType != '3' || orderStatus == 42}}">
<view class="flex flex-justify" style="padding-bottom: 24rpx">
<view class="flex flex-center text-black">支付凭证</view>
<text class="text-gray">6张以内,每张图片大小限制5M</text>
</view>
<van-uploader file-list="{{ imageList }}" multiple max-count="6" max-size="{{1024 * 1024 * 5}}" bind:file-change="fileChange" />
</view>
<view style="height:16rpx" wx:if="{{orderList}}"></view>
<submit-layout wx:if="{{orderList}}">

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

@ -8,7 +8,7 @@
bindtap="chooseMethod" placeholder="请选择品类"/>
<van-field title-width="360rpx" id="productName" value="{{ form.productName || form.categoryName }}" label="品类别名:"
placeholder="请输入品类别名(选填)" input-align="right" clearable bind:input="bindInput" />
<van-field title-width="360rpx" required id="defaultUnitPrice" value="{{ form.defaultUnitPrice }}" label="收货价格(元/公斤):"
<van-field title-width="360rpx" required id="defaultUnitPrice" value="{{ form.defaultUnitPrice }}" label="指导收货价格(元/公斤):"
placeholder="请输入收货价格" input-align="right" clearable type="digit" bind:input="bindInput" />
<van-field title-width="360rpx" id="highestUnitPrice" value="{{ form.highestUnitPrice }}" label="最高收货价格(元/公斤):"
placeholder="请输入最高收货价格(选填)" input-align="right" clearable type="digit" bind:input="bindInput" />

31
pages/setting/paper-select/index.js

@ -0,0 +1,31 @@
Component({
options: {
addGlobalClass: true,
multipleSlots: true
},
properties: {
visible: { type: Boolean, value: false },
cIndex: { type: Number, value: -1 },
paperList: { type: Array, value: [] }
},
data: {
activeIndex: 0,
cIndex: -1
},
methods: {
onClickNav: function({detail}){
console.log(detail)
},
onConfirm: function(e){
this.data.cIndex = e.currentTarget.dataset.index
var item = this.data.paperList[this.data.cIndex]
wx.nextTick(() => {
this.setData({ visible: false })
this.triggerEvent('select', {index: this.data.cIndex, item })
})
},
onHide: function(){
this.setData({ visible: false })
}
}
})

12
pages/setting/paper-select/index.json

@ -0,0 +1,12 @@
{
"component": true,
"usingComponents": {
"van-popup": "/components/popup/index",
"van-icon": "/components/icon/index",
"van-grid": "/components/grid/index",
"van-grid-item": "/components/grid-item/index",
"van-button": "/components/button/index",
"van-sidebar": "/components/sidebar/index",
"van-sidebar-item": "/components/sidebar-item/index"
}
}

23
pages/setting/paper-select/index.wxml

@ -0,0 +1,23 @@
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<view class="van-picker__toolbar van-hairline--top-bottom toolbar-class">
<view class="van-picker__cancel" hover-stay-time="70"></view>
<view class="van-picker__title van-ellipsis">选择纸品</view>
<view class="van-picker__confirm flex flex-cener" hover-class="van-picker__confirm--hover" hover-stay-time="70" bindtap="onHide">
<van-icon name="cross" size="24" color="#999999" />
</view>
</view>
<view class="flex" style="height:480rpx;">
<scroll-view scroll-y class="van-tree-select__nav" style="height:100%;flex: 1">
<van-sidebar active-key="{{ activeIndex }}" bind:change="onClickNav" custom-class="van-tree-select__nav__inner">
<van-sidebar-item wx:for="{{ items }}" wx:key="index" title="{{ item.text }}" />
</van-sidebar>
</scroll-view>
<scroll-view scroll-y="true" style="height:100%;flex: 2;padding: 12rpx 0rpx">
<van-grid column-num="3" border="{{fasle}}">
<van-grid-item use-slot wx:for="{{ paperList }}" wx:key="index" content-style="padding:12rpx">
<van-button plain type="{{index == cIndex ? 'info' : 'default'}}" custom-style="height:88rpx;width:208rpx;padding: 0rpx" data-index="{{index}}" bind:click="onConfirm">{{item.categoryName}}</van-button>
</van-grid-item>
</van-grid>
</scroll-view>
</view>
</van-popup>

1
pages/setting/paper-select/index.wxss

@ -0,0 +1 @@
.van-tree-select__nav__inner{width:100%!important;height:100%}
Loading…
Cancel
Save