Browse Source

no message

feature/v2.1
xpz2018 4 years ago
parent
commit
83cede5e3a
2 changed files with 4 additions and 3 deletions
  1. 2
      components/vehicle-keyboard/index.js
  2. 5
      pages/process/order-price/index.js

2
components/vehicle-keyboard/index.js

@ -74,7 +74,7 @@ Component({
if(this.data.activeIndex == -1){ if(this.data.activeIndex == -1){
return return
} }
this.setData({disabled: false, plateNumber: ["", "", "", "", "", "", ""], mode: 1, activeIndex: 0})
this.setData({disabled: true, plateNumber: ["", "", "", "", "", "", ""], mode: 1, activeIndex: 0})
}, },
tapDelete: function(e){ tapDelete: function(e){
let activeIndex = this.data.activeIndex let activeIndex = this.data.activeIndex

5
pages/process/order-price/index.js

@ -50,7 +50,7 @@ Scene({
plateList.push(result.data.records[index].plateNumber) plateList.push(result.data.records[index].plateNumber)
} }
if(plateList.length > 0){ if(plateList.length > 0){
this.setData({ ['form.plateNumber']: plateList[plateList.length - 1], plateList })
this.setData({ ['form.plateNumber']: plateList[0], plateList })
} }
}) })
}).catch(err => { }).catch(err => {
@ -174,7 +174,8 @@ Scene({
data.isWithoutTare = Number(this.data.form.isWithoutTare) data.isWithoutTare = Number(this.data.form.isWithoutTare)
pricingOrder(data).then(result => { pricingOrder(data).then(result => {
wx.hideLoading() wx.hideLoading()
if(this.data.plateList.indexOf(data.plateNumber) < 0 && this.data.plateList.length <= 5){
if(!util.isEmpty(data.plateNumber) && data.plateNumber.length >= 7
&& this.data.plateList.indexOf(data.plateNumber) < 0 && this.data.plateList.length <= 5){
var params = {factoryCustomerId: this.data.form.factoryCustomerId, plateNumber: data.plateNumber} var params = {factoryCustomerId: this.data.form.factoryCustomerId, plateNumber: data.plateNumber}
savePlateNumber(params).then(result => {}) savePlateNumber(params).then(result => {})
} }

Loading…
Cancel
Save