diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseOrderChild.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseOrderChild.java
index 75e12141..42f52729 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseOrderChild.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseOrderChild.java
@@ -64,6 +64,9 @@ public class PurchaseOrderChild extends BaseEntity
@Excel(name = "物料加工方法")
private String materialProcessMethod;
+
+ @Excel(name = "入库部门")
+ private String warehouseDept;
/** 物料不含税单价 */
@Excel(name = "物料不含税单价")
private BigDecimal materialNoRmb;
@@ -165,6 +168,14 @@ public class PurchaseOrderChild extends BaseEntity
this.purchaseQuoteChildList = purchaseQuoteChildList;
}
+ public String getWarehouseDept() {
+ return warehouseDept;
+ }
+
+ public void setWarehouseDept(String warehouseDept) {
+ this.warehouseDept = warehouseDept;
+ }
+
public void setPurchaseOrderChildId(Long purchaseOrderChildId)
{
this.purchaseOrderChildId = purchaseOrderChildId;
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchasePlanChild.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchasePlanChild.java
index 0050c4a5..b7b0fc45 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchasePlanChild.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchasePlanChild.java
@@ -60,6 +60,8 @@ public class PurchasePlanChild extends BaseEntity
@Excel(name = "物料的描述")
private String describe;
+ @Excel(name = "物料单位")
+ private String unit;
@Excel(name = "物料入库部门")
private String warehouseDept;
@@ -203,7 +205,16 @@ public class PurchasePlanChild extends BaseEntity
{
return describe;
}
- public void setMaterialNum(Long materialNum)
+
+ public String getUnit() {
+ return unit;
+ }
+
+ public void setUnit(String unit) {
+ this.unit = unit;
+ }
+
+ public void setMaterialNum(Long materialNum)
{
this.materialNum = materialNum;
}
diff --git a/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderChildMapper.xml b/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderChildMapper.xml
index ec24b568..0e2c0946 100644
--- a/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderChildMapper.xml
+++ b/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderChildMapper.xml
@@ -17,6 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
@@ -50,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select purchase_order_child_id, purchase_order_code, purchase_plan_code,purchase_plan_correlation_code,
supplier_code, supplier_name,
material_code, material_name,material_type, material_describe,material_brand,
- material_photoUrl, material_process_method,material_unit,
+ material_photoUrl, material_process_method,material_unit,warehouseDept,
material_no_rmb, material_rmb, material_num,
material_amount, material_sum, material_no_rmb_sum, material_rmb_sum,
material_real_num, material_real_no_rmb, material_real_rmb, material_real_no_rmb_sum,
@@ -95,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
material_photo_url,
material_process_method,
material_unit,
+ warehouseDept,
material_no_rmb,
material_rmb,
material_num,
@@ -131,6 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{materialPhotourl},
#{materialProcessMethod},
#{materialUnit},
+ #{warehouseDept},
#{materialNoRmb},
#{materialRmb},
#{materialNum},
@@ -170,6 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
material_photo_url = #{materialPhotourl}
material_process_method = #{materialProcessMethod},
material_unit = #{materialUnit},
+ warehouse_dept = #{warehouseDept},
material_no_rmb = #{materialNoRmb},
material_rmb = #{materialRmb},
material_num = #{materialNum},
@@ -237,12 +241,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml b/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml
index 2f59dc3c..4a53433e 100644
--- a/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml
+++ b/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
+
@@ -11,9 +11,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
+
@@ -35,8 +37,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select purchase_plan_child_id, purchase_plan_code, material_id,
- material_code, material_name, material_type, process_method, brand,
- photoUrl, `describe`, material_num, material_sole, material_rmb,supplier_code,supplier_name,
+ material_code, material_name, material_type, process_method, brand,unit,
+ photoUrl, `describe`, warehouseDept,material_num, material_sole, material_rmb,supplier_code,supplier_name,
material_noRmb, create_by, create_time, update_by, update_time, remark,
use_status, audit_status, del_flag from purchase_plan_child
@@ -52,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and material_type = #{materialType}
and process_method = #{processMethod}
and brand = #{brand}
+ and warehouseDept = #{warehouseDept}
and use_status = #{useStatus}
and audit_status = #{auditStatus}
@@ -82,6 +85,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
brand,
photoUrl,
`describe`,
+ unit,
+ warehouse_dept,
material_num,
material_sole,
material_rmb,
@@ -105,6 +110,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{brand},
#{photoUrl},
#{describe},
+ #{unit},
+ #{warehouseDept},
#{materialNum},
#{materialSole},
#{materialRmb},
@@ -132,6 +139,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
brand = #{brand},
photoUrl = #{photoUrl},
`describe` = #{describe},
+ unit = #{unit},
+ warehouse_dept = #{warehouseDept},
material_num = #{materialNum},
material_sole = #{materialSole},
material_rmb = #{materialRmb},
@@ -212,6 +221,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
planChild.process_method,
planChild.brand,
planChild.photoUrl,
+ planChild.unit,
+ planChild.warehouseDept,
sum(planChild.material_num) as material_num,
GROUP_CONCAT(DISTINCT plan.correlation_code ORDER BY plan.correlation_code) AS correlation_codes,
GROUP_CONCAT(DISTINCT plan.purchase_plan_code ORDER BY plan.purchase_plan_code) AS purchase_plan_codes
diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/addPurchaseOrder.html b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/addPurchaseOrder.html
index dcdfd541..f010beaf 100644
--- a/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/addPurchaseOrder.html
+++ b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/addPurchaseOrder.html
@@ -85,6 +85,7 @@
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
+ var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
$("#form-plan-purchaseOrder-add").validate({focusCleanup: true});
var purchasePlanChildList = [[${purchasePlanChildList}]];
@@ -136,6 +137,7 @@
brand: material.brand,
processMethod: material.processMethod,
unit: material.unit,
+ warehouseDept:material.warehouseDept,
materialNum: material.materialNum,
};
var materialData = [materialObj]; // Bootstrap Table需要一个数组作为数据源
@@ -311,29 +313,28 @@
columns: [
{checkbox: false},
{title: '料号', field: 'materialCode'},
- {
- title: '图片', field: 'photoUrl', formatter: function (value, row, index) {
+ {title: '图片', field: 'photoUrl', formatter: function (value, row, index) {
return $.table.imageView(value);
}
},
{title: '物料名称', field: 'materialName'},
- {
- title: '物料类型', field: 'materialType', align: 'center', formatter: function (value, row, index) {
+ {title: '物料类型', field: 'materialType', align: 'center', formatter: function (value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{title: '物料描述', field: 'describe'},
{title: '品牌', field: 'brand'},
- {
- title: '加工类型', field: 'processMethod', align: 'center', formatter: function (value, row, index) {
+ {title: '加工类型', field: 'processMethod', align: 'center', formatter: function (value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
- {
- title: '单位', field: 'unit', align: 'center', formatter: function (value, row, index) {
+ {title: '单位', field: 'unit', align: 'center', formatter: function (value, row, index) {
return $.table.selectDictLabel(sysUnitClassDatas, value);
}
},
+ {title: '入库部门', field: 'warehouseDept', align: 'center', formatter: function (value, row, index) {
+ return $.table.selectDictLabel(warehouseDeptDatas, value);
+ }},
{title: '计划采购数', field: 'materialNum'},
],
});
@@ -372,6 +373,8 @@
materialDescribe: materialObj.describe,
materialProcessMethod:materialObj.processMethod,
materialUnit:materialObj.unit,
+ materialPhotoUrl: materialObj.photoUrl,
+ warehouseDept: materialObj.warehouseDept,
materialNum: materialObj.materialNum,
supplierCode: supplierCode,
supplierName: supplierName,
diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/purchasePlan.html b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/purchasePlan.html
index 192af288..33c03ab2 100644
--- a/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/purchasePlan.html
+++ b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/purchasePlan.html
@@ -131,9 +131,7 @@
method: 'post',
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
- queryParams : {
- purchasePlanCode: row.purchasePlanCode
- },
+ queryParams : {purchasePlanCode: row.purchasePlanCode},
columns: [
{field: 'purchasePlanId',title: '主键id',visible: false},
{field: 'materialCode',title: '料号',},
@@ -152,24 +150,23 @@
{field: 'unit',title: '单位',
formatter: function(value, row, index) {return $.table.selectDictLabel(sysUnitClassDatas, value);}
},
- {field: 'planNum',title: '计划采购数',
- formatter: function(value, row, index) {return $.table.selectDictLabel(sysUnitClassDatas, value);}
- },
+ {field: 'warehouseDept',title: '入库部门',visible: false},
+ {field: 'materialNum',title: '计划采购数',},
]
});
};
var purchasePlanCodes = "";
function addPurchaseOrder(){
var selections = $("#bootstrap-table").bootstrapTable("getSelections");
- if(selections.length == 0){
+ if(selections.length === 0){
$.modal.alertWarning("请选择采购计划单");
return;
}else{
if(selections.length > 1 ){
//·拼接采购计划单号
- for(var i=0;i