|
@@ -453,7 +453,7 @@
|
|
}
|
|
}
|
|
form.value.details.forEach(item => {
|
|
form.value.details.forEach(item => {
|
|
if (item.amount < item.arriveAmount) {
|
|
if (item.amount < item.arriveAmount) {
|
|
- proxy.$modal.msgError("当前的" + item.taskTypeName + "收款申请总金额超过当前合同金额,不可提交,请联系财务人员。");
|
|
|
|
|
|
+ proxy.$modal.msgError("当前的" + item.taskTypeName + "收款申请总金额超过当前服务金额,不可提交,请联系财务人员。");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -461,6 +461,7 @@
|
|
const countAmount= res.data.map((item) => item.arriveAmount).reduce((total, number) => {
|
|
const countAmount= res.data.map((item) => item.arriveAmount).reduce((total, number) => {
|
|
return total + number;
|
|
return total + number;
|
|
});
|
|
});
|
|
|
|
+ console.log("res.data",res.data);
|
|
const amount = countAmount + form.value.arriveAmount;
|
|
const amount = countAmount + form.value.arriveAmount;
|
|
if (amount > form.value.contractAmount) {
|
|
if (amount > form.value.contractAmount) {
|
|
proxy.$modal.msgError("当前的合同提过的收款申请总金额超过当前合同金额,不可提交,请联系财务人员。");
|
|
proxy.$modal.msgError("当前的合同提过的收款申请总金额超过当前合同金额,不可提交,请联系财务人员。");
|
|
@@ -468,7 +469,7 @@
|
|
}
|
|
}
|
|
form.value.details.forEach(item => {
|
|
form.value.details.forEach(item => {
|
|
if (item.amount < match.add(item.arriveAmount, item.arrived)) {
|
|
if (item.amount < match.add(item.arriveAmount, item.arrived)) {
|
|
- proxy.$modal.msgError("当前的" + item.taskTypeName + "收款申请总金额超过当前合同金额,不可提交,请联系财务人员。");
|
|
|
|
|
|
+ proxy.$modal.msgError("当前的" + item.taskTypeName + "收款申请总金额超过当前服务金额,不可提交,请联系财务人员。");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -476,24 +477,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- // if (form.value.arriveAmount > form.value.contractAmount) {
|
|
|
|
- // proxy.$modal.msgError("实际收款金额不能大于合同收款金额");
|
|
|
|
- // return;
|
|
|
|
- // }
|
|
|
|
- // proxy.$refs["orderRef"].validate((valid) => {
|
|
|
|
- // if (valid && detailValid()) {
|
|
|
|
- // const formValue = form.value;
|
|
|
|
- // saveCollection(formValue).then((res) => {
|
|
|
|
- // if (res.code === 200) {
|
|
|
|
- // archiveInput.value.collectionStatus = 1;
|
|
|
|
- // setCollectionStatus(archiveInput.value);
|
|
|
|
- // proxy.$message.success("保存成功");
|
|
|
|
- // }
|
|
|
|
- // cancel();
|
|
|
|
- // getList.value();
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
- // });
|
|
|
|
|
|
+ if (form.value.arriveAmount > form.value.contractAmount) {
|
|
|
|
+ proxy.$modal.msgError("实际收款金额不能大于合同收款金额");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ proxy.$refs["orderRef"].validate((valid) => {
|
|
|
|
+ if (valid && detailValid()) {
|
|
|
|
+ const formValue = form.value;
|
|
|
|
+ saveCollection(formValue).then((res) => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ archiveInput.value.collectionStatus = 1;
|
|
|
|
+ setCollectionStatus(archiveInput.value);
|
|
|
|
+ proxy.$message.success("保存成功");
|
|
|
|
+ }
|
|
|
|
+ cancel();
|
|
|
|
+ getList.value();
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
function detailValid() {
|
|
function detailValid() {
|