|
|
|
@ -133,7 +133,7 @@ |
|
|
|
> |
|
|
|
<el-table-column prop="qtyStart" label="开始数量" min-width="100" header-align="center" align="right" :formatter="formatNumberCell" /> |
|
|
|
<el-table-column prop="qtyEnd" label="结束数量" min-width="100" header-align="center" align="right" :formatter="formatNumberCell" /> |
|
|
|
<el-table-column prop="unitPrice" label="单价" min-width="120" header-align="center" align="right" :formatter="formatNumberCell" /> |
|
|
|
<el-table-column prop="unitPrice" label="单价" min-width="120" header-align="center" align="right" :formatter="formatPriceCell" /> |
|
|
|
<el-table-column prop="priceDate" label="价格日期" min-width="130" header-align="center" align="center" /> |
|
|
|
<el-table-column prop="remark" label="备注" min-width="180" header-align="center" align="left" show-overflow-tooltip /> |
|
|
|
</el-table> |
|
|
|
@ -414,7 +414,7 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="单价" min-width="150" header-align="center" align="right"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input-number v-model="scope.row.unitPrice" :step="0.0001" :min="0" :controls="false" style="width: 98%" /> |
|
|
|
<el-input-number v-model="scope.row.unitPrice" :step="0.0001" :precision="4" :min="0" :controls="false" style="width: 98%" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="备注" min-width="220" header-align="center" align="left"> |
|
|
|
@ -1043,6 +1043,10 @@ export default { |
|
|
|
formatNumberCell (row, column, cellValue) { |
|
|
|
return String(this.normalizeNumberValue(cellValue, 0)) |
|
|
|
}, |
|
|
|
formatPriceCell (row, column, cellValue) { |
|
|
|
// 单价固定显示后四位小数 |
|
|
|
return this.normalizeNumberValue(cellValue, 0).toFixed(4) |
|
|
|
}, |
|
|
|
validateTierRows () { |
|
|
|
if (!this.tierForm.priceDate) { |
|
|
|
this.$message.warning('价格日期不能为空') |
|
|
|
@ -1104,7 +1108,8 @@ export default { |
|
|
|
tierPriceList: this.tierForm.tierPriceList.map(item => ({ |
|
|
|
qtyStart: item.qtyStart, |
|
|
|
qtyEnd: item.qtyEnd, |
|
|
|
unitPrice: item.unitPrice, |
|
|
|
// 与界面显示保持一致:单价固定按后四位小数提交(如 0.1 → 0.1000) |
|
|
|
unitPrice: this.normalizeNumberValue(item.unitPrice, 0).toFixed(4), |
|
|
|
remark: item.remark || '' |
|
|
|
})) |
|
|
|
} |
|
|
|
|