From 7522313f50b90739b8ab9e953dc1f248d57de4c9 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Tue, 2 Feb 2021 20:33:39 +0800 Subject: [PATCH] no message --- pages/process/order-info/index.wxml | 4 ++-- pages/process/order-list/index.wxml | 2 +- pages/process/order-price/index.js | 17 ++++++++++++++--- pages/process/order-price/index.wxml | 2 +- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/pages/process/order-info/index.wxml b/pages/process/order-info/index.wxml index d3a3318..49c0d9d 100644 --- a/pages/process/order-info/index.wxml +++ b/pages/process/order-info/index.wxml @@ -84,7 +84,7 @@ 过毛重照片 - @@ -97,7 +97,7 @@ 过皮重照片 - diff --git a/pages/process/order-list/index.wxml b/pages/process/order-list/index.wxml index 36bc962..251747b 100644 --- a/pages/process/order-list/index.wxml +++ b/pages/process/order-list/index.wxml @@ -19,7 +19,7 @@ 客户名称:{{item.factoryCustomerName}} - ({{item.factoryCustomerMobile}}) + ({{item.factoryCustomerMobile}}) 毛重:{{item.totalWeight}}KG diff --git a/pages/process/order-price/index.js b/pages/process/order-price/index.js index 4814701..8951f72 100644 --- a/pages/process/order-price/index.js +++ b/pages/process/order-price/index.js @@ -15,7 +15,8 @@ Page({ form: null, deductType: 1, columns: [], - visible: false + visible: false, + nowItem: null }, /** * 生命周期函数--监听页面加载 @@ -57,8 +58,10 @@ Page({ this.setData({ visible: true }) }, onConfirm: function({detail}){ - this.data.form.productId = this.data.paperList[detail.index].categoryId - this.setData({ visible: false, ['form.productCategoryName']: detail.value }) + this.data.nowItem = this.data.paperList[detail.index] + this.data.form.productId = this.data.nowItem.id + var unitPrice = this.data.nowItem.defaultUnitPrice + this.setData({ visible: false, ['form.productCategoryName']: detail.value, ['form.unitPrice']: unitPrice }) }, onHide: function(){ this.setData({ visible: false }) @@ -98,6 +101,14 @@ Page({ util.showToast('请输入单价') return } + if(this.data.nowItem.highestUnitPrice && Number(this.data.form.unitPrice) > Number(this.data.nowItem.highestUnitPrice)){ + util.showToast('输入单价过高,价格范围:' + this.data.nowItem.lowestUnitPrice + '元/KG-'+ this.data.nowItem.highestUnitPrice + '元/KG') + return + } + if(this.data.nowItem.lowestUnitPrice && Number(this.data.form.unitPrice) < Number(this.data.nowItem.lowestUnitPrice)){ + util.showToast('输入单价过低,价格范围:' + this.data.nowItem.lowestUnitPrice + '元/KG-'+ this.data.nowItem.highestUnitPrice + '元/KG') + return + } // if(this.data.deductType == 1 && (util.isEmpty(this.data.form.deductWeight) || Number(this.data.form.deductWeight) <= 0)){ // util.showToast('请输入扣重') // return diff --git a/pages/process/order-price/index.wxml b/pages/process/order-price/index.wxml index ee2bdce..12c4375 100644 --- a/pages/process/order-price/index.wxml +++ b/pages/process/order-price/index.wxml @@ -77,7 +77,7 @@ 过毛重照片 -