rev:合同台账修改
This commit is contained in:
@@ -423,7 +423,7 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
|
|||||||
// 未到货重量
|
// 未到货重量
|
||||||
erp.put("qty_zt", erp.getString("qty_zt"));
|
erp.put("qty_zt", erp.getString("qty_zt"));
|
||||||
// 处理状态: 合同未到货重量 = 0则为【完成】; 合同未到货重量 = 合同重量则为【生成】;否则为【采购中】
|
// 处理状态: 合同未到货重量 = 0则为【完成】; 合同未到货重量 = 合同重量则为【生成】;否则为【采购中】
|
||||||
if (erp.getString("qty_zt").equals("0")) {
|
if (erp.getDoubleValue("qty_zt") == 0) {
|
||||||
erp.put("proc_status","完成");
|
erp.put("proc_status","完成");
|
||||||
} else if (erp.getDoubleValue("qty_zt") == erp.getDoubleValue("qty_ht")) {
|
} else if (erp.getDoubleValue("qty_zt") == erp.getDoubleValue("qty_ht")) {
|
||||||
erp.put("proc_status","生成");
|
erp.put("proc_status","生成");
|
||||||
@@ -454,6 +454,14 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
|
|||||||
// 合计金额:合计重量 * 含税单价
|
// 合计金额:合计重量 * 含税单价
|
||||||
erp.put("allqty", allqty);
|
erp.put("allqty", allqty);
|
||||||
erp.put("all_valmoney", NumberUtil.mul(allqty, erp.getDoubleValue("norigtaxprice")));
|
erp.put("all_valmoney", NumberUtil.mul(allqty, erp.getDoubleValue("norigtaxprice")));
|
||||||
|
// 备注:取随机一条采购订单备注
|
||||||
|
JSONObject jsonProc = procList.stream()
|
||||||
|
.filter(row -> row.getString("contract_no").equals(erp.getString("vbillcode"))
|
||||||
|
&& row.getString("item_id").equals(erp.getString("item_id"))
|
||||||
|
)
|
||||||
|
.findFirst().orElse(null);
|
||||||
|
erp.put("remark", ObjectUtil.isNotEmpty(jsonProc) ? jsonProc.getString("remark") : "");
|
||||||
|
|
||||||
resultList.add(erp);
|
resultList.add(erp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -553,9 +561,17 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
|
|||||||
@Override
|
@Override
|
||||||
public void saveRemark(JSONObject whereJson) {
|
public void saveRemark(JSONObject whereJson) {
|
||||||
WQLObject tab = WQLObject.getWQLObject("PCS_IF_PurchaseOrderProc");
|
WQLObject tab = WQLObject.getWQLObject("PCS_IF_PurchaseOrderProc");
|
||||||
JSONObject jsonObject = tab.query("id = '" + whereJson.getString("id") + "'").uniqueResult(0);
|
// 查询是否有采购订单
|
||||||
jsonObject.put("remark", whereJson.getString("remark"));
|
JSONArray resultJSONArray = tab.query("contract_no = '" + whereJson.getString("contract_no") + "' and item_id = '" + whereJson.getString("item_id") + "'")
|
||||||
tab.update(jsonObject);
|
.getResultJSONArray(0);
|
||||||
|
if (ObjectUtil.isEmpty(resultJSONArray)) {
|
||||||
|
throw new BadRequestException("当前合同没有采购订单不可备注!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据合同号 和 物料ID 查询修改对应的数据
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("remark", whereJson.getString("remark1"));
|
||||||
|
tab.update(param,"contract_no = '"+whereJson.getString("contract_no")+"' and item_id = '"+whereJson.getString("item_id")+"'");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -628,7 +644,7 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
|
|||||||
// 未到货重量
|
// 未到货重量
|
||||||
erp.put("qty_zt", erp.getString("qty_zt"));
|
erp.put("qty_zt", erp.getString("qty_zt"));
|
||||||
// 处理状态: 合同未到货重量 = 0则为【完成】; 合同未到货重量 = 合同重量则为【生成】;否则为【采购中】
|
// 处理状态: 合同未到货重量 = 0则为【完成】; 合同未到货重量 = 合同重量则为【生成】;否则为【采购中】
|
||||||
if (erp.getString("qty_zt").equals("0")) {
|
if (erp.getDoubleValue("qty_zt") == 0) {
|
||||||
erp.put("proc_status","完成");
|
erp.put("proc_status","完成");
|
||||||
} else if (erp.getDoubleValue("qty_zt") == erp.getDoubleValue("qty_ht")) {
|
} else if (erp.getDoubleValue("qty_zt") == erp.getDoubleValue("qty_ht")) {
|
||||||
erp.put("proc_status","生成");
|
erp.put("proc_status","生成");
|
||||||
@@ -659,6 +675,13 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
|
|||||||
// 合计金额:合计重量 * 含税单价
|
// 合计金额:合计重量 * 含税单价
|
||||||
erp.put("allqty", allqty);
|
erp.put("allqty", allqty);
|
||||||
erp.put("all_valmoney", NumberUtil.mul(allqty, erp.getDoubleValue("norigtaxprice")));
|
erp.put("all_valmoney", NumberUtil.mul(allqty, erp.getDoubleValue("norigtaxprice")));
|
||||||
|
// 备注:取随机一条采购订单备注
|
||||||
|
JSONObject jsonProc = procList.stream()
|
||||||
|
.filter(row -> row.getString("contract_no").equals(erp.getString("vbillcode"))
|
||||||
|
&& row.getString("item_id").equals(erp.getString("item_id"))
|
||||||
|
)
|
||||||
|
.findFirst().orElse(null);
|
||||||
|
erp.put("remark", ObjectUtil.isNotEmpty(jsonProc) ? jsonProc.getString("remark") : "");
|
||||||
resultList.add(erp);
|
resultList.add(erp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -695,6 +718,7 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
|
|||||||
dtl_map.put("账龄", jo.getString("honour_days"));
|
dtl_map.put("账龄", jo.getString("honour_days"));
|
||||||
dtl_map.put("合计重量", NumberUtil.round(jo.getDoubleValue("allqty"), 3));
|
dtl_map.put("合计重量", NumberUtil.round(jo.getDoubleValue("allqty"), 3));
|
||||||
dtl_map.put("合计金额", NumberUtil.round(jo.getDoubleValue("all_valmoney"), 3));
|
dtl_map.put("合计金额", NumberUtil.round(jo.getDoubleValue("all_valmoney"), 3));
|
||||||
|
dtl_map.put("内容", jo.getString("remark"));
|
||||||
list.add(dtl_map);
|
list.add(dtl_map);
|
||||||
}
|
}
|
||||||
FileUtil.downloadExcel(list, response);
|
FileUtil.downloadExcel(list, response);
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ export default {
|
|||||||
this.receiveDialog = true
|
this.receiveDialog = true
|
||||||
},
|
},
|
||||||
openRemarkDaing(row) {
|
openRemarkDaing(row) {
|
||||||
this.openParam = row.id
|
this.openParam = row
|
||||||
this.remarkDaing = true
|
this.remarkDaing = true
|
||||||
},
|
},
|
||||||
downdtl() {
|
downdtl() {
|
||||||
|
|||||||
@@ -14,16 +14,16 @@
|
|||||||
<el-form
|
<el-form
|
||||||
ref="form"
|
ref="form"
|
||||||
:inline="true"
|
:inline="true"
|
||||||
:model="form"
|
:model="form1"
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
size="mini"
|
size="mini"
|
||||||
label-width="85px"
|
label-width="85px"
|
||||||
label-suffix=":"
|
label-suffix=":"
|
||||||
>
|
>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark1">
|
||||||
<label slot="label">备 注:</label>
|
<label slot="label">备 注:</label>
|
||||||
<el-input
|
<el-input
|
||||||
v-model.trim="form.remark"
|
v-model.trim="form1.remark1"
|
||||||
style="width: 380px;"
|
style="width: 380px;"
|
||||||
rows="2"
|
rows="2"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
@@ -54,14 +54,14 @@ export default {
|
|||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
openParam: {
|
openParam: {
|
||||||
type: String
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fullscreenLoading: false,
|
fullscreenLoading: false,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
form: {}
|
form1: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -73,15 +73,15 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
close() {
|
close() {
|
||||||
this.form = {}
|
this.form1 = {}
|
||||||
this.$emit('update:dialogShow', false)
|
this.$emit('update:dialogShow', false)
|
||||||
this.$emit('tableChanged', this.rows)
|
this.$emit('tableChanged', this.rows)
|
||||||
},
|
},
|
||||||
open() {
|
open() {
|
||||||
this.form.id = this.openParam
|
this.form1 = this.openParam
|
||||||
},
|
},
|
||||||
saveRemark() {
|
saveRemark() {
|
||||||
crudOrderproc.saveRemark(this.form).then(res => {
|
crudOrderproc.saveRemark(this.form1).then(res => {
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
this.close()
|
this.close()
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
|
|||||||
Reference in New Issue
Block a user