diff --git a/oms_web/oms_vue/src/views/purchaseorder/components/PurchaseOrderDetail.vue b/oms_web/oms_vue/src/views/purchaseorder/components/PurchaseOrderDetail.vue
index dcdbb5ac..9e9b2792 100644
--- a/oms_web/oms_vue/src/views/purchaseorder/components/PurchaseOrderDetail.vue
+++ b/oms_web/oms_vue/src/views/purchaseorder/components/PurchaseOrderDetail.vue
@@ -76,9 +76,6 @@
{{ form.purchaserMobile }}
-
- {{ form.purchaserMobile }}
-
@@ -181,7 +178,7 @@
-
+
@@ -210,6 +207,7 @@ export default {
editingProductIndex: -1,
// 当前编辑的产品类型
currentProductType: null,
+ currentVendorCode: null,
// 产品类型字典
productTypeOptions: [],
// 制造商选项
@@ -273,7 +271,8 @@ export default {
computed: {
totalAmountWithTax() {
const total = this.form.omsPurchaseOrderItemList?.reduce((acc, cur) => acc + (cur.amountTotal || 0), 0);
- return preciseCurrencyRound(total) || 0;
+ this.form.totalAmount=preciseCurrencyRound(total) || 0;
+ return this.form.totalAmount;
},
totalAmountWithoutTax() {
const total = this.form.omsPurchaseOrderItemList?.reduce((acc, cur) => {
@@ -344,6 +343,10 @@ export default {
this.$modal.msgWarning("请先选择产品类型");
return;
}
+ if (!this.currentVendorCode){
+ this.$modal.msgWarning("请先选择制造商");
+ return;
+ }
this.editingProductIndex = index;
this.currentProductType = this.form.omsPurchaseOrderItemList[index].productType;
this.productSelectOpen = true;
@@ -389,9 +392,11 @@ export default {
/** 计算含税小计 */
calculateRowTotal(row) {
if (row.quantity != null && row.price != null) {
- row.amountTotal = Math.round(row.quantity * row.price * 100) / 100;
+ row.amountTotal = preciseCurrencyRound(row.quantity * row.price);
+ row.taxTotal = row.amountTotal - preciseCurrencyRound(row.amountTotal / (1 + row.taxRate));
} else {
row.amountTotal = 0;
+ row.taxTotal = 0;
}
},
/** 获取厂商列表 */
@@ -405,9 +410,11 @@ export default {
if (vendorId) {
this.selectedVendor = this.vendorOptions.find(item => item.vendorId === vendorId) || {};
this.form.warehouseId = this.selectedVendor.warehouseId
+ this.currentVendorCode=this.selectedVendor.vendorCode;
} else {
this.selectedVendor = {};
this.form.warehouseId = null;
+ this.currentVendorCode = null;
}
},
/** 处理采购员选择 */
diff --git a/oms_web/oms_vue/src/views/system/product/selectProduct.vue b/oms_web/oms_vue/src/views/system/product/selectProduct.vue
index 5624edfb..800ed946 100644
--- a/oms_web/oms_vue/src/views/system/product/selectProduct.vue
+++ b/oms_web/oms_vue/src/views/system/product/selectProduct.vue
@@ -60,6 +60,10 @@ export default {
productType: {
type: String,
default: '',
+ },
+ vendorCode: {
+ type: String,
+ default: '',
}
},
data() {
@@ -76,7 +80,8 @@ export default {
pageSize: 10,
productCode: null,
model: null,
- type: this.productType // Pass productType to query params
+ type: this.productType, // Pass productType to query params
+ vendorCode:null
},
};
},
@@ -92,6 +97,12 @@ export default {
if (this.visible) {
this.getList();
}
+ },
+ vendorCode(val) {
+ this.queryParams.vendorCode = val;
+ if (this.visible) {
+ this.getList();
+ }
}
},
methods: {
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/OmsPurchaseOrderServiceImpl.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/OmsPurchaseOrderServiceImpl.java
index 591f7b24..bb09f5b7 100644
--- a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/OmsPurchaseOrderServiceImpl.java
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/OmsPurchaseOrderServiceImpl.java
@@ -343,6 +343,14 @@ public class OmsPurchaseOrderServiceImpl implements IOmsPurchaseOrderService, To
@Override
public boolean multiInstanceApproveCallback(String activityName, ProcessInstance processInstance) {
+ String flowBusinessKey = processInstance.getBusinessKey();
+ String[] split = flowBusinessKey.split("#");
+ String businessKey = split.length > 1 ? split[1] : split[0];
+ Map processVariables = processInstance.getProcessVariables();
+ Integer approveBtn = (Integer) processVariables.get("approveBtn");
+ if ("公司领导".equals(activityName) && approveBtn == 1) {
+ handleCompanyLeaderApproval(businessKey);
+ }
return TodoCommonTemplate.super.multiInstanceApproveCallback(activityName, processInstance);
}
@@ -381,19 +389,6 @@ public class OmsPurchaseOrderServiceImpl implements IOmsPurchaseOrderService, To
// 审批驳回处理
if (approveBtn.equals(0)) {
handleRejectOrder( businessKey);
- } else if (approveBtn.equals(1)) {
-
- // 审批通过处理
- if ("公司领导".equals(taskName)) {
- handleCompanyLeaderApproval(businessKey);
-// //黄雪秋处理 流程状态更改
-// if (ShiroUtils.getUserId().equals(118L)) {
-// handleCompanyLeaderApproval(businessKey);
-// }
-
- }
-
-
}
return TodoCommonTemplate.super.todoApproveCallback(todo);