Merge: fix(报销/拨款) 行项目金额改为价税合计,移除总金额输入框
This commit is contained in:
@@ -153,7 +153,15 @@ public class HrmInvoiceOcrServiceImpl implements IHrmInvoiceOcrService {
|
||||
|
||||
HrmInvoiceOcrResultVo.Item item = new HrmInvoiceOcrResultVo.Item();
|
||||
item.setItemName(name);
|
||||
item.setAmount(parseBigDecimal(getStringOrFieldValue(li, "amount")));
|
||||
// 行项目金额取价税合计:税前金额 + 税额
|
||||
BigDecimal preAmt = parseBigDecimal(getStringOrFieldValue(li, "amount"));
|
||||
BigDecimal taxAmt = parseBigDecimal(getStringOrFieldValue(li, "tax_amount"));
|
||||
BigDecimal withTax = null;
|
||||
if (preAmt != null || taxAmt != null) {
|
||||
withTax = (preAmt != null ? preAmt : BigDecimal.ZERO)
|
||||
.add(taxAmt != null ? taxAmt : BigDecimal.ZERO);
|
||||
}
|
||||
item.setAmount(withTax != null ? withTax : preAmt);
|
||||
item.setTaxRate(getStringOrFieldValue(li, "tax_rate"));
|
||||
items.add(item);
|
||||
}
|
||||
|
||||
@@ -36,8 +36,10 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="拨款总金额" prop="amount">
|
||||
<el-input-number v-model="form.amount" :min="0" :step="100" style="width: 100%" />
|
||||
<el-form-item label="拨款总金额">
|
||||
<div class="amount-readonly">
|
||||
{{ form.amount != null && form.amount > 0 ? '¥' + form.amount : '根据发票明细自动汇总' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -300,7 +302,7 @@ export default {
|
||||
},
|
||||
rules: {
|
||||
appropriationType: [{ required: true, message: '请选择/输入拨款类型', trigger: 'change' }],
|
||||
amount: [{ required: true, message: '请填写拨款总金额', trigger: 'blur' }]
|
||||
amount: []
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -675,6 +677,18 @@ export default {
|
||||
b { color: #e6a23c; font-size: 14px; }
|
||||
}
|
||||
|
||||
.amount-readonly {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
padding: 0 12px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #e6a23c;
|
||||
background: #fffbf2;
|
||||
border: 1px solid #faecd8;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.flow-preview {
|
||||
margin-top: 10px;
|
||||
padding: 12px;
|
||||
|
||||
@@ -36,8 +36,10 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报销总金额" prop="totalAmount">
|
||||
<el-input-number v-model="form.totalAmount" :min="0" :step="100" style="width: 100%" />
|
||||
<el-form-item label="报销总金额">
|
||||
<div class="amount-readonly">
|
||||
{{ form.totalAmount != null && form.totalAmount > 0 ? '¥' + form.totalAmount : '根据发票明细自动汇总' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -274,7 +276,7 @@ export default {
|
||||
},
|
||||
rules: {
|
||||
reimburseType: [{ required: true, message: '请选择/输入报销类型', trigger: 'change' }],
|
||||
totalAmount: [{ required: true, message: '请填写报销总金额', trigger: 'blur' }],
|
||||
totalAmount: [],
|
||||
accessoryApplyIds: [{ required: true, message: '请上传报销单据附件', trigger: 'change' }]
|
||||
}
|
||||
}
|
||||
@@ -661,6 +663,18 @@ export default {
|
||||
b { color: #e6a23c; font-size: 14px; }
|
||||
}
|
||||
|
||||
.amount-readonly {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
padding: 0 12px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #e6a23c;
|
||||
background: #fffbf2;
|
||||
border: 1px solid #faecd8;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.flow-preview {
|
||||
margin-top: 10px;
|
||||
padding: 12px;
|
||||
|
||||
Reference in New Issue
Block a user