diff --git a/pages/process/index/index.wxml b/pages/process/index/index.wxml index a1f7e37..f3b8c22 100644 --- a/pages/process/index/index.wxml +++ b/pages/process/index/index.wxml @@ -1,6 +1,5 @@ - diff --git a/pages/process/order-info/index.wxml b/pages/process/order-info/index.wxml index f31a09d..30aa242 100644 --- a/pages/process/order-info/index.wxml +++ b/pages/process/order-info/index.wxml @@ -34,7 +34,7 @@ - 已取消 + 已关闭 diff --git a/pages/storage/order-create/index.js b/pages/storage/order-create/index.js index 577d964..8225c6e 100644 --- a/pages/storage/order-create/index.js +++ b/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 diff --git a/pages/storage/order-create/index.wxml b/pages/storage/order-create/index.wxml index 2373b7b..e892bfb 100644 --- a/pages/storage/order-create/index.wxml +++ b/pages/storage/order-create/index.wxml @@ -59,6 +59,20 @@ placeholder="请输司机姓名" value="{{form.driverName || ''}}" bindinput="bindInput" /> + + + 出货单价(元/公斤) + + + + + + 预估金额 + + + diff --git a/pages/storage/order-info/index.wxml b/pages/storage/order-info/index.wxml index af67b3a..e81a72b 100644 --- a/pages/storage/order-info/index.wxml +++ b/pages/storage/order-info/index.wxml @@ -38,6 +38,18 @@ {{orderInfo.driverName}} + + + 出货单价 + {{orderInfo.unitPrice || '--'}} + + + + + 预估金额 + {{orderInfo.estimatedAmount || '--'}} + + 代卖订单详情 diff --git a/pages/storage/order-settlement/index.wxml b/pages/storage/order-settlement/index.wxml index dd5a3bf..9fd4539 100644 --- a/pages/storage/order-settlement/index.wxml +++ b/pages/storage/order-settlement/index.wxml @@ -107,6 +107,18 @@ {{ orderInfo.driverName || ''}} + + + 出货单价 + {{orderInfo.unitPrice || '--'}} + + + + + 预估金额 + {{orderInfo.estimatedAmount || '--'}} + +