作废修改

product
bawei 1 year ago
parent 951b8d123c
commit feccf510ba

@ -123,7 +123,8 @@ public class PoundlistEntity {
@TableField("SALES_PRICE")
private BigDecimal salesPrice;
@TableField("INPUT_DATE")
// @TableField("INPUT_DATE")
@TableField(value = "INPUT_DATE", updateStrategy=FieldStrategy.IGNORED)
private Date inputDate;
// @TableField("OUTPUT_DATE")
@ -134,7 +135,8 @@ public class PoundlistEntity {
@TableField(value = "PAY_DATE", updateStrategy=FieldStrategy.IGNORED)
private Date payDate;
@TableField("PAYMENT_DATE")
// @TableField("PAYMENT_DATE")
@TableField(value = "PAYMENT_DATE", updateStrategy=FieldStrategy.IGNORED)
private Date paymentDate;
@TableField("POUND_DATE")
@ -197,10 +199,12 @@ public class PoundlistEntity {
@TableField("IS_EXPENSE")
private String isExpense;
@TableField("PURCHASEORDER_ID")
// @TableField("PURCHASEORDER_ID")
@TableField(value = "PURCHASEORDER_ID", updateStrategy=FieldStrategy.IGNORED)
private String purchaseorderId;
@TableField("SALESORDER_ID")
// @TableField("SALESORDER_ID")
@TableField(value = "SALESORDER_ID", updateStrategy=FieldStrategy.IGNORED)
private String salesorderId;
// @TableField("COLLECTION_AMOUNTS")

@ -1208,9 +1208,9 @@ public class PurchaseorderController {
* @param id
* @return
*/
@DeleteMapping("/purchaseorderitemcancel/{id}")
@DeleteMapping("/purchaseorderitemcancel/{id}+{num}")
@Transactional
public ActionResult purchaseorderitemcancel(@PathVariable("id") String id) {
public ActionResult purchaseorderitemcancel(@PathVariable("id") String id,@PathVariable("num") Integer num) {
PurchaseorderitemEntity entity = purchaseorderitemService.getInfo(id);
if (entity != null) {
String mark="";
@ -1286,17 +1286,37 @@ public class PurchaseorderController {
List<String> poundlistIdList = purchaseorder_item0Service.listObjs(purchaseorder_item0QueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
List<PoundlistEntity> poundlistList = poundlistService.listByIds(poundlistIdList);
//1为删除
if (num==1){
for (PoundlistEntity poundlistEntity: poundlistList) {
// poundlistEntity.setIsPaymentdoc("0");
// poundlistEntity.setIsPay("0");
// poundlistEntity.setPayDate(null);
poundlistService.delete(poundlistEntity);
}
//2为修改
}else if (num==2){
for (PoundlistEntity poundlistEntity: poundlistList) {
//四大日期为null
poundlistEntity.setInputDate(null);
poundlistEntity.setOutputDate(null);
poundlistEntity.setPayDate(null);
poundlistEntity.setPaymentDate(null);
//四大日期状态值为0
poundlistEntity.setIsInvoicing("0");
poundlistEntity.setIsExpense("0");
poundlistEntity.setIsPay("0");
poundlistEntity.setIsCollection("0");
//三个状态
poundlistEntity.setPurchaseStatus("99");
poundlistEntity.setSalesStatus("99");
poundlistEntity.setIsExamine("0");
//采购销售
poundlistEntity.setSalesorderId(null);
poundlistEntity.setPurchaseorderId(null);
}
poundlistService.updateBatchById(poundlistList);
}
purchaseorder_item0Service.remove(purchaseorder_item0QueryWrapper);
}
purchaseorderitemService.delete(entity);
}
return ActionResult.success("作废成功");
}

@ -933,8 +933,16 @@
type: "warning",
})
.then(() => {
this.$confirm(`是否作废订单下的所有磅单?`, '提示', {
distinguishCancelAndClose: true,
confirmButtonText: '作废磅单',
cancelButtonText: '不作废磅单',
type: 'warning'
}).then(() => {
var num = 1;
request({
url: `/api/purchaseorder/Purchaseorder/purchaseorderitemcancel/${row.id}`,
url: `/api/purchaseorder/Purchaseorder/purchaseorderitemcancel/${row.id}+${num}`,
method: "DELETE",
}).then((res) => {
this.$message({
@ -946,6 +954,30 @@
},
});
});
}).catch(action => {
if (action === 'cancel') {
var num = 2;
request({
url: `/api/purchaseorder/Purchaseorder/purchaseorderitemcancel/${row.id}+${num}`,
method: "DELETE",
}).then((res) => {
this.$message({
type: "success",
message: res.msg,
duration: 5000,
onClose: () => {
this.initData();
},
});
});
}else {
this.$message({
type: 'warning',
message: '已取消作废'
});
}
})
})
.catch(() => {});
},

Loading…
Cancel
Save