不垫资回款预收

product
bawei 1 year ago
parent 0af1b52d69
commit c1e8c5c09e

@ -1253,4 +1253,34 @@ public class PurchaseorderController {
}
return ActionResult.success("作废成功");
}
/**
*
*
* @param id
* @return
*/
@GetMapping("noadvance/{id}")
public ActionResult noAdvance(@PathVariable("id") String id) {
PurchaseorderitemEntity entity = purchaseorderitemService.getInfo(id);
QueryWrapper<Purchaseorder_item0Entity> purchaseorder_item0QueryWrapper=new QueryWrapper<>();
purchaseorder_item0QueryWrapper.lambda().eq(Purchaseorder_item0Entity::getPurchaseorderId,entity.getId());
purchaseorder_item0QueryWrapper.lambda().eq(Purchaseorder_item0Entity::getAdvance,0);
purchaseorder_item0QueryWrapper.lambda().select(Purchaseorder_item0Entity::getPoundlistId);
List<String> poundlistIdList = purchaseorder_item0Service.listObjs(purchaseorder_item0QueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
List<PoundlistEntity> poundlistList = poundlistService.listByIds(poundlistIdList);
if (poundlistList.size()>0){
for (PoundlistEntity poundlistEntity: poundlistList) {
poundlistEntity.setIsCollection("1");
poundlistEntity.setPaymentDate(new Date());
}
poundlistService.updateBatchById(poundlistList);
return ActionResult.success("不垫资回款预收成功");
}else {
return ActionResult.success("没有不垫资回款预收");
}
}
}

@ -204,6 +204,15 @@
v-has="'btn_toSaleHandle'"
>转销售
</el-button>
<el-button
type="text"
icon="el-icon-document-copy"
@click="noAdvance()"
v-has="'btn_noadvance'"
>不垫资预收
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
@ -1045,6 +1054,34 @@ export default {
}
});
},
noAdvance() {
if (
!this.multipleSelectionItem.length ||
this.multipleSelectionItem.length != 1
) {
this.$message({
type: "error",
message: "请选择一条数据",
duration: 2500,
});
return;
}
request({
url:
"/api/purchaseorder/Purchaseorder/noadvance/" + this.multipleSelectionItem[0].id,
method: "get",
}).then((res) => {
this.$message({
type: "success",
message: res.msg,
duration: 2500,
onClose: () => {
this.initData();
},
});
});
},
guidangHandle() {
if (
!this.multipleSelectionItem.length ||

Loading…
Cancel
Save