Browse Source

[feat] 物料入库部门修正字段名称为warehouseDept

dev
zhangsiqi 4 months ago
parent
commit
f0d57c1b00
  1. 4
      ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderChildMapper.xml
  2. 4
      ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml
  3. 2
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/addPurchaseStorage.html
  4. 20
      ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/addPurchaseOrder.html

4
ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderChildMapper.xml

@ -170,7 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialPhotourl != null">material_photo_url = #{materialPhotourl}</if> <if test="materialPhotourl != null">material_photo_url = #{materialPhotourl}</if>
<if test="materialProcessMethod != null">material_process_method = #{materialProcessMethod},</if> <if test="materialProcessMethod != null">material_process_method = #{materialProcessMethod},</if>
<if test="materialUnit != null">material_unit = #{materialUnit},</if> <if test="materialUnit != null">material_unit = #{materialUnit},</if>
<if test="warehouseDept != null">warehousezDept = #{warehouseDept},</if> <if test="warehouseDept != null">warehouseDept = #{warehouseDept},</if>
<if test="materialNoRmb != null">material_no_rmb = #{materialNoRmb},</if> <if test="materialNoRmb != null">material_no_rmb = #{materialNoRmb},</if>
<if test="materialRmb != null">material_rmb = #{materialRmb},</if> <if test="materialRmb != null">material_rmb = #{materialRmb},</if>
<if test="materialNum != null">material_num = #{materialNum},</if> <if test="materialNum != null">material_num = #{materialNum},</if>
@ -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.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, 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 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 where p.purchase_order_code = #{purchaseOrderCode} and GROUP BY supplier_code,material_code
</select> </select>
</mapper> </mapper>

4
ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml

@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="photoUrl != null">photoUrl,</if> <if test="photoUrl != null">photoUrl,</if>
<if test="describe != null">`describe`,</if> <if test="describe != null">`describe`,</if>
<if test="unit != null">unit,</if> <if test="unit != null">unit,</if>
<if test="warehouseDept != null">warehouse_dept,</if> <if test="warehouseDept != null">warehouseDept,</if>
<if test="materialNum != null">material_num,</if> <if test="materialNum != null">material_num,</if>
<if test="materialSole != null">material_sole,</if> <if test="materialSole != null">material_sole,</if>
<if test="materialRmb != null">material_rmb,</if> <if test="materialRmb != null">material_rmb,</if>
@ -140,7 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="photoUrl != null">photoUrl = #{photoUrl},</if> <if test="photoUrl != null">photoUrl = #{photoUrl},</if>
<if test="describe != null">`describe` = #{describe},</if> <if test="describe != null">`describe` = #{describe},</if>
<if test="unit != null">unit = #{unit},</if> <if test="unit != null">unit = #{unit},</if>
<if test="warehouseDept != null">warehouse_dept = #{warehouseDept},</if> <if test="warehouseDept != null">warehouseDept = #{warehouseDept},</if>
<if test="materialNum != null">material_num = #{materialNum},</if> <if test="materialNum != null">material_num = #{materialNum},</if>
<if test="materialSole != null">material_sole = #{materialSole},</if> <if test="materialSole != null">material_sole = #{materialSole},</if>
<if test="materialRmb != null">material_rmb = #{materialRmb},</if> <if test="materialRmb != null">material_rmb = #{materialRmb},</if>

2
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/addPurchaseStorage.html

@ -53,7 +53,7 @@
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var useStatusDatas = [[${@dict.getType('useStatus')}]]; var useStatusDatas = [[${@dict.getType('useStatus')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]];
var materialUnitDatas = [[${@dict.getType('sysUnitClassDatas')}]]; var materialUnitDatas = [[${@dict.getType('sys_unit_class')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]]; var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
var purchaseOrderCode = [[${purchaseOrder.purchaseOrderCode}]]; var purchaseOrderCode = [[${purchaseOrder.purchaseOrderCode}]];

20
ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/addPurchaseOrder.html

@ -148,17 +148,17 @@
var materialData = [materialObj]; // Bootstrap Table需要一个数组作为数据源 var materialData = [materialObj]; // Bootstrap Table需要一个数组作为数据源
materialList.push(material); materialList.push(material);
tables(materialTable, materialData); tables(materialTable, materialData);
var $supplierInfo = $('<div class="supplier-card" style="height: 20px;" id="supplierInfo-' + tableId + '"></div>');
// 创建表格的容器 // 创建表格的容器
//如果物料下的供应商为空,则不需要添加供应商信息,并在容器中添加一个提示信息:暂无供应商信息,请先添加供应商信息。 //如果物料下的供应商为空,则不需要添加供应商信息,并在容器中添加一个提示信息:暂无供应商信息,请先添加供应商信息。
const uniqueSuppliers = []; const uniqueSuppliers = [];
if (material.purchaseSupplierList.size == 0) { if (material.purchaseSupplierList.length <= 0) {
var $noSupplierDiv = $('<div class="no-supplier">暂无供应商信息,请先添加供应商信息。</div>'); var $noSupplierDiv = $('<div class="no-supplier">暂无供应商信息,请先添加供应商信息。</div>');
$tableWrapper.append($noSupplierDiv); $tableWrapper.append($noSupplierDiv);
} }
else{ else{
material.purchaseSupplierList.forEach(supplier => { material.purchaseSupplierList.forEach(supplier => {
const key = `${supplier.supplierCode}_${supplier.materialCode}`; const key = `${supplier.supplierCode}_${supplier.materialCode}`;
$supplierInfo = $('<div class="supplier-card" id="supplierInfo-' + tableId + '"></div>');
if (!uniqueSuppliers.map(s => `${s.supplierCode}_${s.materialCode}`).includes(key)) { if (!uniqueSuppliers.map(s => `${s.supplierCode}_${s.materialCode}`).includes(key)) {
uniqueSuppliers.push(supplier); uniqueSuppliers.push(supplier);
}else{ }else{
@ -264,15 +264,6 @@
var purchaseNum = parseFloat($(supplierCard).find('.supplierMaterialNum').val()) || 0; var purchaseNum = parseFloat($(supplierCard).find('.supplierMaterialNum').val()) || 0;
var noRmbPrice = parseFloat($(supplierCard).find('.supplierMaterialNoRmb').text().trim()); var noRmbPrice = parseFloat($(supplierCard).find('.supplierMaterialNoRmb').text().trim());
var rmbPrice = parseFloat($(supplierCard).find('.supplierMaterialRmb').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; totalMaterialSum += purchaseNum;
if (rmbPrice) { if (rmbPrice) {
@ -331,7 +322,7 @@
showColumns: false, showColumns: false,
showToggle: false, showToggle: false,
data: data, data: data,
height: 25, height: 10,
columns: [ columns: [
{checkbox: false}, {checkbox: false},
{title: '料号', field: 'materialCode'}, {title: '料号', field: 'materialCode'},
@ -350,10 +341,7 @@
return $.table.selectDictLabel(processMethodDatas, value); return $.table.selectDictLabel(processMethodDatas, value);
} }
}, },
{title: '单位', field: 'unit', align: 'center', formatter: function (value, row, index) { {title: '单位', field: 'unit', align: 'center', },
return $.table.selectDictLabel(sysUnitClassDatas, value);
}
},
{title: '入库部门', field: 'warehouseDept', align: 'center', formatter: function (value, row, index) { {title: '入库部门', field: 'warehouseDept', align: 'center', formatter: function (value, row, index) {
return $.table.selectDictLabel(warehouseDeptDatas, value); return $.table.selectDictLabel(warehouseDeptDatas, value);
}}, }},

Loading…
Cancel
Save