diff --git a/app.js b/app.js
index 5d658a1..88152d1 100644
--- a/app.js
+++ b/app.js
@@ -1,6 +1,6 @@
//app.js
App({
- evn: 1, // 0: 开发版本;1:测试版本;2:生产版本
+ evn: 0, // 0: 开发版本;1:测试版本;2:生产版本
tmplIds: ['AFoM5TOfsgERsfcetNSB0UlmEixnLF1ySXr54Bqno2M', 'lOQ8Gvyy_dTk68bYGpRVnVA0M7DsYYrV81Gd39GUPBA'],
version: '1.5.2',
xAppId: '503258978847953926',
diff --git a/pages/storage/order-create/index.js b/pages/storage/order-create/index.js
index c890c95..fb24b46 100644
--- a/pages/storage/order-create/index.js
+++ b/pages/storage/order-create/index.js
@@ -122,10 +122,11 @@ Scene({
onConfirm: function({detail}){
this.data.nowItem = this.data.paperList[detail.index]
this.data.form.productId = this.data.nowItem.id
- this.data.form.unitPrice = this.data.nowItem.defaultUnitPrice
+ var 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)
+ if(!util.isEmpty(unitPrice) && Number(unitPrice) > 0){
+ this.data.form.unitPrice = math.times(unitPrice, 1000)
+ amount = math.times(unitPrice, this.data.poundInfo.netWeight)
}
this.setData({ visible: false, ['form.productName']: detail.value, ['form.unitPrice']: this.data.form.unitPrice, ['form.estimatedAmount']: amount })
},
@@ -137,7 +138,7 @@ Scene({
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)
+ amount = math.divide(math.times(this.data.form.unitPrice, this.data.poundInfo.netWeight), 1000)
}
this.setData({ visible: false, ['form.estimatedAmount']: amount })
}
diff --git a/pages/storage/order-create/index.wxml b/pages/storage/order-create/index.wxml
index 6408147..f75084a 100644
--- a/pages/storage/order-create/index.wxml
+++ b/pages/storage/order-create/index.wxml
@@ -47,7 +47,7 @@
-
+
diff --git a/pages/storage/order-info/index.wxml b/pages/storage/order-info/index.wxml
index dcb4bcf..91a9d87 100644
--- a/pages/storage/order-info/index.wxml
+++ b/pages/storage/order-info/index.wxml
@@ -46,7 +46,7 @@
- 出货单价
+ 出货单价(元/吨)
{{orderInfo.unitPrice || '--'}}
diff --git a/pages/storage/order-settlement/index.js b/pages/storage/order-settlement/index.js
index 978aa6d..d8745bb 100644
--- a/pages/storage/order-settlement/index.js
+++ b/pages/storage/order-settlement/index.js
@@ -103,8 +103,12 @@ Scene({
onConfirm: function({detail}){
this.data.nowItem = this.data.paperList[detail.index]
this.data.form.categoryId = this.data.nowItem.id
- var price = math.times(this.data.nowItem.defaultUnitPrice, 1000)
- this.setData({ visible: false, ['form.categoryName']: detail.value, ['form.settleUnitPrice']: price })
+ if(!util.isEmpty(this.data.nowItem.defaultUnitPrice) && Number(this.data.nowItem.defaultUnitPrice) > 0){
+ var price = math.times(this.data.nowItem.defaultUnitPrice, 1000)
+ this.setData({ visible: false, ['form.categoryName']: detail.value, ['form.settleUnitPrice']: price })
+ } else {
+ this.setData({ visible: false, ['form.categoryName']: detail.value })
+ }
},
bindInput: function (e) {
this.data.form[e.target.id] = Number(e.detail)
diff --git a/pages/storage/order-settlement/index.wxml b/pages/storage/order-settlement/index.wxml
index b8e5ffa..642fe06 100644
--- a/pages/storage/order-settlement/index.wxml
+++ b/pages/storage/order-settlement/index.wxml
@@ -85,7 +85,7 @@
- 出货单价
+ 出货单价(元/吨)
{{orderInfo.unitPrice || '--'}}