|
|
@ -68,8 +68,8 @@ Page({ |
|
|
} |
|
|
} |
|
|
if(!util.isEmpty(element.unitPrice)){ |
|
|
if(!util.isEmpty(element.unitPrice)){ |
|
|
var unitPrice = math.times(element.unitPrice, 1000) |
|
|
var unitPrice = math.times(element.unitPrice, 1000) |
|
|
if(element.uPrice && Number(element.uPrice) > 0){ |
|
|
|
|
|
unitPrice = math.times(math.plus(element.unitPrice, element.uPrice), 1000) |
|
|
|
|
|
|
|
|
if(element.publicSubsidies && Number(element.publicSubsidies) > 0){ |
|
|
|
|
|
unitPrice = math.times(math.plus(element.unitPrice, element.publicSubsidies), 1000) |
|
|
} |
|
|
} |
|
|
this.data.cateList.push({value: element.categoryId, text: element.categoryName + '(预估单价:' + unitPrice + '元/吨)'}) |
|
|
this.data.cateList.push({value: element.categoryId, text: element.categoryName + '(预估单价:' + unitPrice + '元/吨)'}) |
|
|
} |
|
|
} |
|
|
@ -210,16 +210,16 @@ Page({ |
|
|
const element = this.data.factoryDetail.paperCategoryList[index] |
|
|
const element = this.data.factoryDetail.paperCategoryList[index] |
|
|
if(element.categoryId == detail.value){ |
|
|
if(element.categoryId == detail.value){ |
|
|
this.data.form.unitPrice = element.unitPrice |
|
|
this.data.form.unitPrice = element.unitPrice |
|
|
if(element.uPrice && Number(element.uPrice) > 0){ |
|
|
|
|
|
this.data.form.uPrice = element.uPrice |
|
|
|
|
|
this.data.form.unitPrice = math.plus(element.unitPrice, element.uPrice) |
|
|
|
|
|
|
|
|
if(element.publicSubsidies && Number(element.publicSubsidies) > 0){ |
|
|
|
|
|
this.data.form.publicSubsidies = element.publicSubsidies |
|
|
|
|
|
this.data.form.unitPrice = math.plus(element.unitPrice, element.publicSubsidies) |
|
|
} |
|
|
} |
|
|
this.data.cateName = element.categoryName |
|
|
this.data.cateName = element.categoryName |
|
|
break |
|
|
break |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
this.data.form.paperCategoryId = detail.value |
|
|
this.data.form.paperCategoryId = detail.value |
|
|
this.setData({ ['form.unitPrice']: this.data.form.unitPrice, ['form.uPrice']: this.data.form.uPrice, cateName: this.data.cateName }) |
|
|
|
|
|
|
|
|
this.setData({ ['form.unitPrice']: this.data.form.unitPrice, ['form.publicSubsidies']: this.data.form.publicSubsidies, cateName: this.data.cateName }) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onEvent: function (message) { |
|
|
onEvent: function (message) { |
|
|
|