草稿保存

master
Harry Yang 2023-01-05 17:51:45 +08:00
parent 998278fd7e
commit db3a7ce557
2 changed files with 21 additions and 24 deletions

View File

@ -457,10 +457,8 @@ public class ProcessController {
purchaseAmount.setBudgetCostId(amountForm.budgetCostId);
purchaseAmount.setAmountCurrent(amountForm.amountCurrent);
if (form.getStatus() == ProcessStatus.to_be_audit) {
// 提交时该次数量条目生效,撤回的时候 取消该状态
purchaseAmount.setSubmit(true);
}
// 提交时该次数量条目生效,撤回的时候 取消该状态
purchaseAmount.setSubmit(form.getStatus() == ProcessStatus.to_be_audit);
entityManager.persist(purchaseAmount);
@ -570,13 +568,7 @@ public class ProcessController {
purchaseAmount.setAmount(amountForm.amount);
purchaseAmount.setBudgetCostId(amountForm.budgetCostId);
purchaseAmount.setAmountCurrent(amountForm.amountCurrent);
// TODO 提交模式才计算 剩余
if (form.getStatus() == ProcessStatus.to_be_audit) {
// 当前的必须填写
Assert.notNull(amountForm.amountCurrent, "合同明细填写不完整");
purchaseAmount.setSubmit(true);
}
purchaseAmount.setSubmit(form.getStatus() == ProcessStatus.to_be_audit);
if (amountForm.amountId != null) {
// 更新了某个ID的数据就不删除了

View File

@ -431,19 +431,24 @@
'Content-Type': 'application/json',
},
body: JSON.stringify(form),
}).then(res => res.json())
.then(data => {
this.page = {
data: data.content,
size: data.size,
current: data.number + 1,
total: data.totalElements
}
})
.catch(err => {
this.$message.error('查询失败');
})
.finally(() => loading.close())
}).then(checkStatus).then(parseJSON).then(data => {
this.page = {
data: data.content,
size: data.size,
current: data.number + 1,
total: data.totalElements
}
}).catch(({ response }) => {
if (response) {
parseJSON(response)
.then(json => {
this.$message.error(json.message || "查询失败")
})
}
else {
this.$message.error("查询失败")
}
}).finally(() => loading.close())
},
handlePageChange(val) {