Commit 5ac79384 authored by 曹云霄's avatar 曹云霄

优化子工单费用信息,借用信息计算

parent b6508b0e
......@@ -33,10 +33,11 @@ class ChildBillDetailCostViewController: BaseTableViewController {
// MARK: - 设置数据源
fileprivate func setupDataAction() {
let useQty = costModel.getQty - costModel.backQty
logisticsLabel.text = costModel.materiel.name
priceLabel.text = String(format: "%.2f", costModel.unitPrice)
countLabel.text = String(format: "%.2f", costModel.useQty)
totalPriceLabel.text = String(format: "%.2f", costModel.unitPrice * costModel.useQty)
countLabel.text = String(format: "%.2f", useQty)
totalPriceLabel.text = String(format: "%.2f", costModel.unitPrice * useQty)
extractCountLabel.text = String(format: "%.2f", costModel.getQty)
returnCountLabel.text = String(format: "%.2f", costModel.backQty)
}
......
......@@ -29,8 +29,7 @@ class CostOrBorrowTableViewCell: UITableViewCell {
if model.sourceType == CHILDORDERCOST_TYPE.BORROW.rawValue {
detailLabel.text = model.outputbillno
}else {
detailLabel.text = String(format: "%.2f", model.unitPrice * model.useQty)
detailLabel.text = String(format: "%.2f", model.unitPrice * (model.getQty - model.backQty))
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment