Browse Source

no message

feature/v2.1
xpz2018 4 years ago
parent
commit
37f71dbff2
7 changed files with 15 additions and 11 deletions
  1. 2
      pages/process/order-check/index.js
  2. 2
      pages/process/order-price/index.js
  3. 2
      pages/process/outside-add/index.js
  4. 2
      pages/process/outside-check-item/index.js
  5. 4
      pages/setting/paper-detial/index.js
  6. 10
      pages/storage/order-create/index.js
  7. 4
      pages/storage/order-settlement/index.js

2
pages/process/order-check/index.js

@ -62,7 +62,7 @@ Scene({
this.data.nowItem = this.data.paperList[this.data.cIndex]
this.data.form.productId = this.data.nowItem.id
this.data.form.unitPrice = this.data.nowItem.defaultUnitPrice
this.data.form.productName = detail.value
this.data.form.productName = this.data.nowItem.name
this.statAmount()
},
onHide: function(){

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

@ -69,7 +69,7 @@ Scene({
this.data.nowItem = this.data.paperList[this.data.cIndex]
this.data.form.productId = this.data.nowItem.id
var unitPrice = this.data.nowItem.defaultUnitPrice
this.setData({ visible: false, ['form.productName']: this.data.nowItem.categoryName, ['form.unitPrice']: unitPrice, cIndex: this.data.cIndex })
this.setData({ visible: false, ['form.productName']: this.data.nowItem.name, ['form.unitPrice']: unitPrice, cIndex: this.data.cIndex })
},
loop: function(){
return false

2
pages/process/outside-add/index.js

@ -117,7 +117,7 @@ Scene({
return
}
}
var product = {productId: nowItem.id, productCategoryName: nowItem.categoryName, unitPrice: nowItem.defaultUnitPrice}
var product = {productId: nowItem.id, productCategoryName: nowItem.name, unitPrice: nowItem.defaultUnitPrice}
product.highestUnitPrice = nowItem.highestUnitPrice
product.lowestUnitPrice = nowItem.lowestUnitPrice
this.setData({ visible2: false, ['form.productCategoryInfos[' + this.data.cateIndex + ']']: product })

2
pages/process/outside-check-item/index.js

@ -36,7 +36,7 @@ Component({
this.data.item.settleUnitPrice = nowItem.defaultUnitPrice
this.data.item.highestUnitPrice = nowItem.highestUnitPrice
this.data.item.lowestUnitPrice = nowItem.lowestUnitPrice
this.data.item.productCategoryName = nowItem.categoryName
this.data.item.productCategoryName = nowItem.name
this.statAmount()
wx.nextTick(() => {
this.triggerEvent('change', {index: this.data.index, item: this.data.item });

4
pages/setting/paper-detial/index.js

@ -50,8 +50,8 @@ Scene({
this.data.cIndex = e.currentTarget.dataset.index
var nowItem = this.data.paperList[this.data.cIndex]
this.data.form.categoryId = nowItem.categoryId
this.data.form.categoryName = nowItem.categoryName
this.setData({ visible: false, ['form.productName']: nowItem.categoryName, ['form.categoryName']: nowItem.categoryName, cIndex: this.data.cIndex })
this.data.form.categoryName = nowItem.name
this.setData({ visible: false, ['form.productName']: nowItem.name, ['form.categoryName']: nowItem.categoryName, cIndex: this.data.cIndex })
},
onHide: function(){
this.setData({ visible: false })

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

@ -17,6 +17,7 @@ Scene({
activeNames: ['1'],
paperList: [],
visible: false,
cIndex: -1
},
/**
* 生命周期函数--监听页面加载
@ -109,8 +110,9 @@ Scene({
onHide: function() {
this.setData({ visible: false })
},
onConfirm: function({detail}){
this.data.nowItem = this.data.paperList[detail.index]
onConfirm: function(e){
this.data.cIndex = e.currentTarget.dataset.index
this.data.nowItem = this.data.paperList[this.data.cIndex]
this.data.form.productId = this.data.nowItem.id
var unitPrice = this.data.nowItem.defaultUnitPrice
var amount = ''
@ -118,7 +120,9 @@ Scene({
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 })
this.setData({ visible: false,
['form.productName']: this.data.nowItem.name,
['form.unitPrice']: this.data.form.unitPrice, ['form.estimatedAmount']: amount, cIndex: this.data.cIndex })
},
onChange: function({detail}) {
this.setData({ activeNames: detail })

4
pages/storage/order-settlement/index.js

@ -96,9 +96,9 @@ Scene({
this.data.form.categoryId = this.data.nowItem.id
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']: this.data.nowItem.categoryName, ['form.settleUnitPrice']: price, cIndex: this.data.cIndex })
this.setData({ visible: false, ['form.categoryName']: this.data.nowItem.name, ['form.settleUnitPrice']: price, cIndex: this.data.cIndex })
} else {
this.setData({ visible: false, ['form.categoryName']: this.data.nowItem.categoryName, cIndex: this.data.cIndex })
this.setData({ visible: false, ['form.categoryName']: this.data.nowItem.name, cIndex: this.data.cIndex })
}
},
bindInput: function (e) {

Loading…
Cancel
Save