Browse Source

no message

feature/v1.6
xpz2018 4 years ago
parent
commit
6b77a434ad
6 changed files with 53 additions and 3 deletions
  1. 1
      pages/process/index/index.wxml
  2. 2
      pages/process/order-info/index.wxml
  3. 15
      pages/storage/order-create/index.js
  4. 14
      pages/storage/order-create/index.wxml
  5. 12
      pages/storage/order-info/index.wxml
  6. 12
      pages/storage/order-settlement/index.wxml

1
pages/process/index/index.wxml

@ -1,6 +1,5 @@
<!--pages/process/index.wxml-->
<wxs module="formate" src="../../formate.wxs"></wxs>
<scroll-view scroll-y style="height: {{height}}rpx;">
<view class="bg-white flex flex-justify" style="height:80rpx;padding: 0rpx 32rpx">

2
pages/process/order-info/index.wxml

@ -34,7 +34,7 @@
</view>
<view class="flex flex-center info_status" style="justify-content: flex-start;" wx:elif="{{form.status == 6}}">
<image style="height:42rpx;width:42rpx" src="/assets/image/icon_close.png"></image>
<view class="text-white text-sg" style="margin-left:12rpx">已取消</view>
<view class="text-white text-sg" style="margin-left:12rpx">已关闭</view>
</view>
<van-cell>
<view slot="title" class="flex flex-justify">

15
pages/storage/order-create/index.js

@ -2,6 +2,7 @@
import Scene from '../../index/scene'
import { getPoundInfo, getPaperList, createOutOrder } from "../../../api/saas"
const util = require('../../../utils/util')
const math = require('../../../utils/math')
const event = require('../../../utils/event')
const app = getApp()
@ -121,13 +122,25 @@ Scene({
onConfirm: function({detail}){
this.data.nowItem = this.data.paperList[detail.index]
this.data.form.productId = this.data.nowItem.id
this.setData({ visible: false, ['form.productName']: detail.value })
this.data.form.unitPrice = this.data.nowItem.defaultUnitPrice
var amount = ''
if(!util.isEmpty(this.data.form.unitPrice) && Number(this.data.form.unitPrice) > 0){
amount = math.times(this.data.form.unitPrice, this.data.poundInfo.netWeight)
}
this.setData({ visible: false, ['form.productName']: detail.value, ['form.unitPrice']: this.data.form.unitPrice, ['form.estimatedAmount']: amount })
},
onChange: function({detail}) {
this.setData({ activeNames: detail })
},
bindInput: function (e) {
this.data.form[e.currentTarget.id] = e.detail.value
if(e.currentTarget.id == 'unitPrice'){
var amount = ''
if(!util.isEmpty(this.data.form.unitPrice) && Number(this.data.form.unitPrice) > 0){
amount = math.times(this.data.form.unitPrice, this.data.poundInfo.netWeight)
}
this.setData({ visible: false, ['form.productName']: detail.value, ['form.estimatedAmount']: amount })
}
},
onInputChange: function(e){
this.data.form[e.currentTarget.id] = e.detail

14
pages/storage/order-create/index.wxml

@ -59,6 +59,20 @@
placeholder="请输司机姓名" value="{{form.driverName || ''}}" bindinput="bindInput" />
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">出货单价(元/公斤)</view>
<input id="unitPrice" type="number" placeholder-style="color:#aaa" style="text-align: right" maxlength="8"
placeholder="请输入出货单价" value="{{form.unitPrice || ''}}" bindinput="bindInput" />
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">预估金额</view>
<input id="estimatedAmount" type="number" placeholder-style="color:#aaa" style="text-align: right" maxlength="8"
placeholder="请输入预估金额" value="{{form.estimatedAmount || ''}}" bindinput="bindInput" />
</view>
</van-cell>
</view>
<view class="margin-top"></view>
<van-collapse value="{{ activeNames }}" bind:change="onChange" wx:if="{{poundInfo}}">

12
pages/storage/order-info/index.wxml

@ -38,6 +38,18 @@
<view class="text-gray">{{orderInfo.driverName}}</view>
</view>
</van-cell>
<van-cell center wx:if="{{orderInfo.unitPrice}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">出货单价</view>
<view class="text-gray">{{orderInfo.unitPrice || '--'}}</view>
</view>
</van-cell>
<van-cell center wx:if="{{orderInfo.estimatedAmount}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">预估金额</view>
<view class="text-gray">{{orderInfo.estimatedAmount || '--'}}</view>
</view>
</van-cell>
<van-cell clickable is-link wx:if="{{orderInfo.agencySellOrderItemId}}" url="/pages/agent/order-detail/index?itemId={{orderInfo.agencySellOrderItemId}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">代卖订单详情</view>

12
pages/storage/order-settlement/index.wxml

@ -107,6 +107,18 @@
<view class="text-gray">{{ orderInfo.driverName || ''}}</view>
</view>
</van-cell>
<van-cell center wx:if="{{orderInfo.unitPrice}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">出货单价</view>
<view class="text-gray">{{orderInfo.unitPrice || '--'}}</view>
</view>
</van-cell>
<van-cell center wx:if="{{orderInfo.estimatedAmount}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">预估金额</view>
<view class="text-gray">{{orderInfo.estimatedAmount || '--'}}</view>
</view>
</van-cell>
<van-field label="备注" type="textarea" input-align="right" readonly autosize border="{{ false }}" />
</van-collapse-item>
<view class="margin-top"></view>

Loading…
Cancel
Save