From f0d57c1b0009de4c9f46536e049f2f7fb127368c Mon Sep 17 00:00:00 2001
From: zhangsiqi <2825463979@qq.com>
Date: Fri, 5 Jul 2024 15:19:23 +0800
Subject: [PATCH] =?UTF-8?q?[feat]=20=E7=89=A9=E6=96=99=E5=85=A5=E5=BA=93?=
=?UTF-8?q?=E9=83=A8=E9=97=A8=E4=BF=AE=E6=AD=A3=E5=AD=97=E6=AE=B5=E5=90=8D?=
=?UTF-8?q?=E7=A7=B0=E4=B8=BAwarehouseDept?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../purchase/PurchaseOrderChildMapper.xml | 4 ++--
.../purchase/PurchasePlanChildMapper.xml | 4 ++--
.../purchaseOrder/addPurchaseStorage.html | 2 +-
.../purchasePlan/addPurchaseOrder.html | 20 ++++---------------
4 files changed, 9 insertions(+), 21 deletions(-)
diff --git a/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderChildMapper.xml b/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderChildMapper.xml
index 4394e42c..90a23b4e 100644
--- a/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderChildMapper.xml
+++ b/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderChildMapper.xml
@@ -170,7 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
material_photo_url = #{materialPhotourl}
material_process_method = #{materialProcessMethod},
material_unit = #{materialUnit},
- warehousezDept = #{warehouseDept},
+ warehouseDept = #{warehouseDept},
material_no_rmb = #{materialNoRmb},
material_rmb = #{materialRmb},
material_num = #{materialNum},
@@ -243,7 +243,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
p.material_real_num,p.material_real_no_rmb,p.material_real_rmb,p.material_real_no_rmb_sum,p.material_real_rmb_sum,
p.delivery_time,p.eceipt_status,p.payment_status,p.tax_rate,p.create_by,p.create_time,p.update_by,p.update_time,p.del_flag,
w.has_storage_num,sum(w.notify_arrive_num) as notify_has_arrived_num
- from purchase_order_child as p left join warehouse_storage as w on p.purchase_order_code = w.purchase_order_code and p.material_code = w.material_code
+ from purchase_order_child as p left join warehouse_storage_detail as w on p.purchase_order_code = w.purchase_order_code and p.material_code = w.material_code
where p.purchase_order_code = #{purchaseOrderCode} and GROUP BY supplier_code,material_code
\ 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 da194649..656f4fe1 100644
--- a/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml
+++ b/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml
@@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
photoUrl,
`describe`,
unit,
- warehouse_dept,
+ warehouseDept,
material_num,
material_sole,
material_rmb,
@@ -140,7 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
photoUrl = #{photoUrl},
`describe` = #{describe},
unit = #{unit},
- warehouse_dept = #{warehouseDept},
+ warehouseDept = #{warehouseDept},
material_num = #{materialNum},
material_sole = #{materialSole},
material_rmb = #{materialRmb},
diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/addPurchaseStorage.html b/ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/addPurchaseStorage.html
index 2a3f8bdb..3170f30e 100644
--- a/ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/addPurchaseStorage.html
+++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/addPurchaseStorage.html
@@ -53,7 +53,7 @@
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var useStatusDatas = [[${@dict.getType('useStatus')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
- var materialUnitDatas = [[${@dict.getType('sysUnitClassDatas')}]];
+ var materialUnitDatas = [[${@dict.getType('sys_unit_class')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
var purchaseOrderCode = [[${purchaseOrder.purchaseOrderCode}]];
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 b633214c..41c3bae3 100644
--- a/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/addPurchaseOrder.html
+++ b/ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/addPurchaseOrder.html
@@ -148,17 +148,17 @@
var materialData = [materialObj]; // Bootstrap Table需要一个数组作为数据源
materialList.push(material);
tables(materialTable, materialData);
+ var $supplierInfo = $('
');
// 创建表格的容器
//如果物料下的供应商为空,则不需要添加供应商信息,并在容器中添加一个提示信息:暂无供应商信息,请先添加供应商信息。
const uniqueSuppliers = [];
- if (material.purchaseSupplierList.size == 0) {
+ if (material.purchaseSupplierList.length <= 0) {
var $noSupplierDiv = $('暂无供应商信息,请先添加供应商信息。
');
$tableWrapper.append($noSupplierDiv);
}
else{
material.purchaseSupplierList.forEach(supplier => {
const key = `${supplier.supplierCode}_${supplier.materialCode}`;
- $supplierInfo = $('');
if (!uniqueSuppliers.map(s => `${s.supplierCode}_${s.materialCode}`).includes(key)) {
uniqueSuppliers.push(supplier);
}else{
@@ -264,15 +264,6 @@
var purchaseNum = parseFloat($(supplierCard).find('.supplierMaterialNum').val()) || 0;
var noRmbPrice = parseFloat($(supplierCard).find('.supplierMaterialNoRmb').text().trim());
var rmbPrice = parseFloat($(supplierCard).find('.supplierMaterialRmb').text().trim());
- if (purchaseNum > 0) {
- // 如果采购数量大于0,则显示供应商采购总价
- $(supplierCard).find('.supplierPurchaseTotal').removeClass('hidden');
- $(supplierCard).find('.supplierPurchaseTotalRmb').removeClass('hidden');
- } else {
- // 否则隐藏供应商采购总价
- $(supplierCard).find('.supplierPurchaseTotal').addClass('hidden');
- $(supplierCard).find('.supplierPurchaseTotalRmb').addClass('hidden');
- }
//物料的供应商合计
totalMaterialSum += purchaseNum;
if (rmbPrice) {
@@ -331,7 +322,7 @@
showColumns: false,
showToggle: false,
data: data,
- height: 25,
+ height: 10,
columns: [
{checkbox: false},
{title: '料号', field: 'materialCode'},
@@ -350,10 +341,7 @@
return $.table.selectDictLabel(processMethodDatas, value);
}
},
- {title: '单位', field: 'unit', align: 'center', formatter: function (value, row, index) {
- return $.table.selectDictLabel(sysUnitClassDatas, value);
- }
- },
+ {title: '单位', field: 'unit', align: 'center', },
{title: '入库部门', field: 'warehouseDept', align: 'center', formatter: function (value, row, index) {
return $.table.selectDictLabel(warehouseDeptDatas, value);
}},