Browse Source

[feat] 修改增加入库部门后显示错误,添加入库部门字段的相关字典获取,子表信息已显示内容完整。编辑功能新增添加是否有重复物料号检测。

dev
zhangsiqi 4 months ago
parent
commit
572212886e
  1. 1
      ruoyi-admin/src/main/resources/templates/system/salesOrder/detail.html
  2. 29
      ruoyi-admin/src/main/resources/templates/system/salesOrder/edit.html
  3. 1
      ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html
  4. 63
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwjlVerify.html
  5. 4
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwzgVerify.html
  6. 6
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskZozjVerify.html

1
ruoyi-admin/src/main/resources/templates/system/salesOrder/detail.html

@ -319,6 +319,7 @@
var processMethodDatas = [[${@dict.getType('processMethod')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]];
var sysSalesOrder = [[${sysSalesOrder}]]; var sysSalesOrder = [[${sysSalesOrder}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]]; var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
$("#form-salesOrder-edit").validate({focusCleanup: true}); $("#form-salesOrder-edit").validate({focusCleanup: true});
$(function() { $(function() {
var options = { var options = {

29
ruoyi-admin/src/main/resources/templates/system/salesOrder/edit.html

@ -331,6 +331,7 @@
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]];
var sysSalesOrder = [[${sysSalesOrder}]]; var sysSalesOrder = [[${sysSalesOrder}]];
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
$("#form-salesOrder-edit").validate({focusCleanup: true}); $("#form-salesOrder-edit").validate({focusCleanup: true});
$(function() { $(function() {
var options = { var options = {
@ -341,13 +342,15 @@
sidePagination: "client", sidePagination: "client",
uniqueId: "index", uniqueId: "index",
model: "物料报价信息", model: "物料报价信息",
fixedColumns: true, // 启用冻结列
rightFixedColumns:1,
fixedRightNumber: 1, // 冻结右列个数
columns: [ columns: [
{checkbox: true}, {checkbox: true},
{field: 'id',title: '主键id',align: 'center',visible: false}, {field: 'id',title: '主键id',align: 'center',visible: false},
{field: 'index',align: 'center', title: "序号", {field: 'materialIndex',title: '序号',align: 'center',
formatter: function (value, row, index) { formatter: function(value, row, index) {return index+1;
return $.common.serialNumber(value, index); }
}
}, },
{title: '物料索引id',field: 'materialId',align: 'center',visible: false}, {title: '物料索引id',field: 'materialId',align: 'center',visible: false},
{title: '料号',field: 'materialCode',align: 'center'}, {title: '料号',field: 'materialCode',align: 'center'},
@ -375,7 +378,9 @@
} }
}, },
{ title: '入库部门',field: 'warehouseDept',align: 'center', { title: '入库部门',field: 'warehouseDept',align: 'center',
formatter: function(value, row, index) {} formatter: function(value, row, index) {
return $.table.selectDictLabel(warehouseDeptDatas, value);
}
}, },
{ title: '对外售价',field: 'materialSole', { title: '对外售价',field: 'materialSole',
editable: { editable: {
@ -473,7 +478,6 @@
return value + "天数"; return value + "天数";
} }
}, },
}, },
{ title: '录入人',field: 'createBy',align: 'center',visible: false}, { title: '录入人',field: 'createBy',align: 'center',visible: false},
{ title: '录入时间',field: 'createTime',align: 'center',visible: false}, { title: '录入时间',field: 'createTime',align: 'center',visible: false},
@ -488,7 +492,7 @@
{title: '操作', align: 'center', {title: '操作', align: 'center',
formatter: function (value, row, index) { formatter: function (value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.index + '\')"><i class="fa fa-remove"></i>删除</a> '); actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.materialCode + '\')"><i class="fa fa-remove"></i>删除</a> ');
return actions.join(''); return actions.join('');
} }
} }
@ -644,6 +648,14 @@
if (rmb1== null){ if (rmb1== null){
rmb1 = 0; rmb1 = 0;
} }
var rows = $("#bootstrap-table-editOrder").bootstrapTable('getData').length;
for(var i=0;i<rows;i++){
var data = $("#bootstrap-table-editOrder").bootstrapTable('getData')[i];
if(data.materialCode==rowData.materialNo){
$.modal.alertError("不能选择已添加过的相同料号");
return;
}
}
var rmb = parseFloat(rmb1).toFixed(2) / 100; var rmb = parseFloat(rmb1).toFixed(2) / 100;
var usd = $("#usdTax_edit").val()!=null?Number(usd).toFixed(2):0; var usd = $("#usdTax_edit").val()!=null?Number(usd).toFixed(2):0;
$("#bootstrap-table-editOrder").bootstrapTable('insertRow', { $("#bootstrap-table-editOrder").bootstrapTable('insertRow', {
@ -688,9 +700,8 @@
} }
/* 删除指定表格行 */ /* 删除指定表格行 */
function removeRow(indexs){ function removeRow(indexs){
console.log(indexs);
$("#bootstrap-table-editOrder").bootstrapTable('remove', { $("#bootstrap-table-editOrder").bootstrapTable('remove', {
field: 'index', field: 'materialCode',
values: indexs values: indexs
}) })

1
ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html

@ -201,6 +201,7 @@
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var makeStatusDatas = [[${@dict.getType('sys_erp_makeStatus')}]]; var makeStatusDatas = [[${@dict.getType('sys_erp_makeStatus')}]];
var deliveryStatusDatas = [[${@dict.getType('sys_delivery_status')}]]; var deliveryStatusDatas = [[${@dict.getType('sys_delivery_status')}]];
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
var closeStatusDatas = [[${@dict.getType('sys_close_status')}]]; var closeStatusDatas = [[${@dict.getType('sys_close_status')}]];
var confirmTaxDatas = [[${@dict.getType('sys_confirm_tax')}]]; var confirmTaxDatas = [[${@dict.getType('sys_confirm_tax')}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]]; var loginName = [[${@permission.getPrincipalProperty('loginName')}]];

63
ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwjlVerify.html

@ -316,7 +316,7 @@
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]];
var sysSalesOrder = [[${formData}]]; var sysSalesOrderCode = [[${formData.sysSalesOrderCode}]];
$("#form-ywjl-audit").validate({focusCleanup: true}); $("#form-ywjl-audit").validate({focusCleanup: true});
$(function() { $(function() {
var options = { var options = {
@ -464,7 +464,7 @@
// 传递参数查询参数 // 传递参数查询参数
pageSize: params.limit, pageSize: params.limit,
pageNum: params.offset / params.limit + 1, pageNum: params.offset / params.limit + 1,
quoteId: sysSalesOrder.salesOrderCode quoteId: sysSalesOrderCode
}; };
return curParams; return curParams;
} }
@ -486,62 +486,6 @@
} }
}); });
} }
function doSubmit(index, layero,uniqueId){
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0];
console.log("rowData:"+rowData);
var totalNum = $("#bootstrap-select-table").bootstrapTable('getData').length;
var commonCurrency1 = $("#commonCurrency_edit option:selected").val();
var rmbRateInput = parseFloat($("#rmbTax_detail").val()) || 0;
var rmbRate = rmbRateInput / 100;
rmbRate = parseFloat(rmbRate.toFixed(2)); // 确保rmbRate转换为两位小数的浮点数
var usdRate = parseFloat($("#usdTax_edit").val()) || 0;
$("#bootstrap-sub-table-editOrder1").bootstrapTable('insertRow', {
index: 1,
row: {
id:'',
materialId:rowData.id,
materialCode: rowData.materialNo,
materialName: rowData.materialName,
materialType: rowData.materialType,
describe: rowData.describe,
brand: rowData.brand,
photoUrl: rowData.photoUrl,
unit: rowData.unit,
processMethod: rowData.processMethod,
countTax:rmbRateInput,
usdTax: usdRate,
materialSole: rowData.materialSole,
materialNum: 0,
materialNoRmb: 0.0,
materialNoUsd: 0.0,
materialRmb: 0.0,
materialNoRmbSum: 0.0,
materialRmbSum: 0,
materialUsd: 0.0,
materialUsdSum: 0.0,
materialNoUsdSum: 0.0,
remark: "",
}
})
layer.close(index);
}
function insertRow() {
var url = ctx + "erp/material/select";
var options = {
title: '选择料号',
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
/* 删除指定表格行 */
function removeRow(index){
$("#bootstrap-sub-table-editOrder1").bootstrapTable('remove', {
field: 'index',
value: index
})
}
$("input[name='pricingDate']").datetimepicker({ $("input[name='pricingDate']").datetimepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
minView: "month", minView: "month",
@ -564,11 +508,11 @@
}); });
function submitHandler() { function submitHandler() {
var taskId = [[${taskId}]];
if ($.validate.form()) { if ($.validate.form()) {
$("select[name='salesOrderType']").removeAttr("disabled"); $("select[name='salesOrderType']").removeAttr("disabled");
$("#selectEngineer").removeAttr("disabled"); $("#selectEngineer").removeAttr("disabled");
$("#commonCurrency_edit").removeAttr("disabled"); $("#commonCurrency_edit").removeAttr("disabled");
$("#")
if ($('textarea[name="comment"]').val()) { if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); $('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
} }
@ -576,7 +520,6 @@
$("input[name= 'salesOrderChildList']").val(JSON.stringify(tableData)); $("input[name= 'salesOrderChildList']").val(JSON.stringify(tableData));
var formData = $("#form-ywjl-audit").serialize(); var formData = $("#form-ywjl-audit").serialize();
console.log("$(\"#form-ywjl-audit\").serialize()",formData); console.log("$(\"#form-ywjl-audit\").serialize()",formData);
var taskId = [[${taskId}]];
$.operate.save(prefix + "/complete/" + taskId,formData); $.operate.save(prefix + "/complete/" + taskId,formData);
} }
} }

4
ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwzgVerify.html

@ -313,7 +313,7 @@
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]];
var sysSalesOrder = [[${formData}]]; var sysSalesOrderCode = [[${formData.sysSalesOrderCode}]];
$("#form-ywzg-audit").validate({focusCleanup: true}); $("#form-ywzg-audit").validate({focusCleanup: true});
$(function() { $(function() {
var options = { var options = {
@ -460,7 +460,7 @@
// 传递参数查询参数 // 传递参数查询参数
pageSize: params.limit, pageSize: params.limit,
pageNum: params.offset / params.limit + 1, pageNum: params.offset / params.limit + 1,
quoteId: sysSalesOrder.salesOrderCode quoteId: sysSalesOrderCode
}; };
return curParams; return curParams;
} }

6
ruoyi-admin/src/main/resources/templates/system/salesOrder/taskZozjVerify.html

@ -315,7 +315,7 @@
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]];
var sysSalesOrder = [[${formData}]]; var sysSalesOrderCode = [[${formData.sysSalesOrderCode}]];
$(function() { $(function() {
var options = { var options = {
id:'bootstrap-sub-table-editOrder3', id:'bootstrap-sub-table-editOrder3',
@ -397,7 +397,7 @@
delay:250, delay:250,
cache:true, cache:true,
data:{ data:{
enterpriseCode:sysSalesOrder.enterpriseCode, enterpriseCode:sysSalesOrderCode
}, },
success: function (res, params) { success: function (res, params) {
if (res.rows.length > 0) { if (res.rows.length > 0) {
@ -461,7 +461,7 @@
// 传递参数查询参数 // 传递参数查询参数
pageSize: params.limit, pageSize: params.limit,
pageNum: params.offset / params.limit + 1, pageNum: params.offset / params.limit + 1,
quoteId: sysSalesOrder.salesOrderCode quoteId: sysSalesOrderCode
}; };
return curParams; return curParams;
} }

Loading…
Cancel
Save