From 29c469f9e3ec279624181c50fcc800b7222a1af7 Mon Sep 17 00:00:00 2001 From: zhangsiqi <2825463979@qq.com> Date: Fri, 24 May 2024 18:50:01 +0800 Subject: [PATCH 1/8] =?UTF-8?q?[feat]=E9=94=80=E5=94=AE=E7=AE=A1=E7=90=86:?= =?UTF-8?q?=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E4=B8=AD=E7=89=A9=E6=96=99?= =?UTF-8?q?=E9=94=80=E5=94=AE=E6=8A=A5=E4=BB=B7=E6=A0=B7=E5=BC=8F=E3=80=82?= =?UTF-8?q?=E5=B0=86=E5=BC=B9=E5=87=BA=E8=A1=8C=E4=B8=8A=E7=9A=84=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E6=94=B9=E4=B8=BA=E5=9C=A8=E5=88=97=E4=B8=AD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/SysSupplierController.java | 63 ++++- .../service/impl/SysSupplierServiceImpl.java | 6 + .../templates/system/customerQuote/add.html | 225 +++++++++--------- .../system/customerQuote/taskModifyApply.html | 94 +++++++- .../system/customerQuote/taskYwgzVerify.html | 94 +++++++- .../system/customerQuote/taskYwjlVerify.html | 18 +- .../system/customerQuote/taskZozjVerify.html | 94 +++++++- .../system/requisitioning/requisitioning.html | 2 + .../templates/system/salesOrder/add.html | 68 ++++-- .../system/salesOrder/salesOrder.html | 4 +- .../system/salesOrder/taskModifyApply.html | 8 +- 11 files changed, 497 insertions(+), 179 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSupplierController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSupplierController.java index 0bd8e730..d544f2b7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSupplierController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSupplierController.java @@ -11,12 +11,20 @@ import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.entity.SysDictData; +import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.ShiroUtils; +import com.ruoyi.process.general.service.IProcessService; +import com.ruoyi.system.domain.SysSalesOrderVo; import com.ruoyi.system.domain.SysSupplier; import com.ruoyi.system.domain.exportDto.SysSupplierDto; import com.ruoyi.system.service.ISysDictTypeService; +import com.ruoyi.system.service.ISysRoleService; import com.ruoyi.system.service.ISysSupplierService; +import com.ruoyi.system.service.ISysUserService; +import org.activiti.engine.RuntimeService; +import org.activiti.engine.TaskService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -29,6 +37,8 @@ import java.io.IOException; import java.net.URLEncoder; import java.util.List; import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; /** * 供应商资料Controller @@ -47,6 +57,21 @@ public class SysSupplierController extends BaseController @Autowired private ISysDictTypeService sysDictTypeService; + @Autowired + private ISysRoleService roleService; + + @Autowired + private TaskService taskService; + + @Autowired + private RuntimeService runtimeService; + + @Autowired + private IProcessService processService; + + @Autowired + private ISysUserService sysUserService; + @RequiresPermissions("system:supplier:view") @GetMapping() public String supplier() @@ -62,9 +87,41 @@ public class SysSupplierController extends BaseController @ResponseBody public TableDataInfo list(SysSupplier sysSupplier) { - startPage(); - List list = sysSupplierService.selectSysSupplierList(sysSupplier); - return getDataTable(list); + try { + startPage(); + List list = sysSupplierService.selectSysSupplierList(sysSupplier); + SysUser curUser = ShiroUtils.getSysUser(); + String loginName = ShiroUtils.getLoginName(); + Long userId = curUser.getUserId(); + Set roleKeys = roleService.selectRoleKeys(userId); + List sysUserlist = sysUserService.selectRoleToUserList("cgyRole"); + sysUserlist.add(curUser); + if (curUser.getUserName().contains("admin")) { + SysSupplier sysSupplier2 = new SysSupplier(); + startPage(); + List list2 = sysSupplierService.selectSysSupplierList(sysSupplier2); + return getDataTable(list2); + } + //如果主管审批,查看当前自己部门的审核 + //如果经理审计需要查询自己部门下所有业务员的提交的订单,以及自身的提交的订单 + if (roleKeys.contains("cgyRole")) { + List findUser = sysUserlist.stream().filter(item -> (item.getDeptId().equals(curUser.getDeptId()))).collect(Collectors.toList()); + Set user = findUser.stream().map(SysUser::getLoginName).collect(Collectors.toSet()); + startPage(); + List list2 = list.stream().filter(item -> user.contains(item.getCreateBy())).collect(Collectors.toList()); + return getDataTable(list2); + } + // 业务员角色只能看到自己创建的数据 + if (roleKeys.contains("cgjlRole")) { + sysSupplier.setCreateBy(curUser.getLoginName()); + startPage(); + List list2 = sysSupplierService.selectSysSupplierList(sysSupplier); + return getDataTable(list2); + } + return getDataTable(list); + }catch(NullPointerException e){ + throw new NullPointerException("当前用户没有申请客户资料"); + } } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSupplierServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSupplierServiceImpl.java index 2410c106..55af200e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSupplierServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSupplierServiceImpl.java @@ -114,4 +114,10 @@ public class SysSupplierServiceImpl implements ISysSupplierService public Object getId() { return redisCache.generateBillNo("GYS"); } + @Override + public List selectSysSupplierListAll() { + SysSupplier sysSupplier = new SysSupplier(); + sysSupplier.setAuditStatus("1"); + return sysSupplierMapper.selectSysSupplierList(sysSupplier); + } } diff --git a/ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html b/ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html index e674ceb9..ec8cf2d2 100644 --- a/ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html @@ -247,15 +247,26 @@ return $.table.selectDictLabel(processMethodDatas, value); } }, - { title: '对外售价',field: 'materialSole',editable: true}, - {title: '国内税率',field: 'countTax',align: 'center',editable: true, - }, - { title: '美元汇率',field: 'usdTax', align: 'center',editable: true, - + { title: '对外售价',field: 'materialSole', + editable: { + type: 'number', + mode: 'inline', + title: '对外售价', + validate: function (value) { + if (!value) { + return '对外售价不能为空'; + } + if (isNaN(value)) { + return '对外售价必须为数字'; + } + } + } }, + {title: '国内税率',field: 'countTax',align: 'center',}, + { title: '美元汇率',field: 'usdTax', align: 'center',}, {field: 'materialNum',align: 'center',title: '物料的数量', editable:{ - type : 'number', + type : 'text', mode: 'inline', title : '物料的数量', validate : function(value) { @@ -274,6 +285,9 @@ editable:{ type: 'text', // 使用'text'类型,因为我们需自定义验证小数 mode: 'inline', + enabled: function() { + return ($("#commonCurrency_add").val() === '1'); // 当货币类型为2时启用 + }, title: '物料的不含税单价(RMB)', validate: function(value) { // 验证是否为空 @@ -299,7 +313,10 @@ editable: { type: 'text', // 使用'text'类型,因为我们需自定义验证小数 mode: 'inline', - title: '物料的不含税单价(RMB)', + enabled: function() { + return ($("#commonCurrency_add").val() === '2'); // 当货币类型为2时启用 + }, + title: '物料的不含税单价(美元)', validate: function(value) { // 验证是否为空 if (!value) { @@ -318,64 +335,18 @@ } } }, - { title: '物料的含税单价(美元)', - field: 'materialUsd', - align: 'center', - }, - { title: '物料的含税总价(美元)', - field: 'materialUsdSum', - align: 'center', - }, - { title: '物料的不含税总价(美元)', - field: 'materialNoUsdSum', - align: 'center', - }, - { title: '物料的含税总价(RMB)', - field: 'materialNoRmbSum', - align: 'center', - }, - {title: '物料的不含税总价(RMB)', - field: 'materialRmbSum', - align: 'center', - }, - { - field: 'createBy', - align: 'center', - title: '录入人', - visible: false - }, - { - field: 'createTime', - align: 'center', - title: '录入时间', - visible: false - }, - { - field: 'updateBy', - align: 'center', - title: '更新人', - visible: false - }, - { - field: 'updateTime', - align: 'center', - title: '上次更新时间', - visible: false - }, - { - field: 'remark', - align: 'center', - title: '备注', - visible: false - }, - { - field: 'auditStatus', - align: 'center', - title: '审核状态', - visible: false, - formatter: function(value, row, index) { - return $.table.selectDictLabel(auditStatusDatas, value); - } + { title: '物料的含税单价(美元)',field: 'materialUsd',align: 'center',}, + { title: '物料的含税总价(美元)',field: 'materialUsdSum', align: 'center',}, + { title: '物料的不含税总价(美元)',field: 'materialNoUsdSum',align: 'center',}, + { title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center',}, + {title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center',}, + {field: 'createBy', align: 'center',title: '录入人',visible: false}, + {field: 'createTime',align: 'center',title: '录入时间',visible: false}, + {field: 'updateBy',align: 'center',title: '更新人',visible: false}, + {field: 'updateTime',align: 'center',title: '上次更新时间',visible: false}, + {field: 'remark',align: 'center',title: '备注',visible: false}, + {field: 'auditStatus',align: 'center',title: '审核状态',visible: false, + formatter: function(value, row, index) {return $.table.selectDictLabel(auditStatusDatas, value);} }, {title: '操作', align: 'center', @@ -394,34 +365,34 @@ }else{ rmb1 = $("#rmbTax_add").val(); } - var rmb = Number(rmb1).toFixed(2) / 100; + var rmb = parseFloat(rmb1); var usd = $("#usdTax_add").val(); if (usd =='' || usd== null){ usd = 0; }else{ - usd = Number(usd).toFixed(2); + usd = parseFloat(usd); } console.log(commonCurrency1); if(commonCurrency1 == 1){ - row.materialNoRmb = Number(row.materialNoRmb).toFixed(2); - row.materialRmb = Number(row.materialNoRmb * Number(1 + rmb)); - row.materialNoRmbSum = Number(row.materialNum * Number(row.materialNoRmb)).toFixed(2); - row.materialRmbSum = Number(row.materialRmb * row.materialNum).toFixed(2); - row.materialNoUsd = Number(row.materialNoRmb / usd).toFixed(2); - row.materialNoUsdSum = Number(row.materialNum * row.materialNoUsd).toFixed(2); - row.materialUsd = Number(row.materialNoUsd).toFixed(2) - row.materialUsdSum = Number(row.materialNum * Number(row.materialUsd)).toFixed(2); + row.materialNoRmb = parseFloat(row.materialNoRmb).toFixed(2); + row.materialRmb = parseFloat(row.materialNoRmb * parseFloat(1 + rmb)).toFixed(2); + row.materialNoRmbSum = parseFloat(row.materialNum * parseFloat(row.materialNoRmb)).toFixed(2); + row.materialRmbSum = parseFloat(row.materialRmb * row.materialNum).toFixed(2); + row.materialNoUsd = parseFloat(row.materialNoRmb / usd).toFixed(2); + row.materialNoUsdSum = parseFloat(row.materialNum * row.materialNoUsd).toFixed(2); + row.materialUsd = parseFloat(row.materialNoUsd).toFixed(2); + row.materialUsdSum = parseFloat(row.materialNum * row.materialUsd).toFixed(2); } else if( commonCurrency1 == 2){ - row.materialNoUsd = Number(row.materialNoUsd).toFixed(2); - row.materialUsd = Number(row.materialNoUsd).toFixed(2); - row.materialUsdSum = Number(row.materialNum * row.materialUsd).toFixed(2); - row.materialNoUsdSum = Number(row.materialNoUsd * row.materialNum).toFixed(2); - row.materialNoRmb = Number(row.materialNoUsd * usd).toFixed(2); - row.materialRmb = Number(row.materialNoRmb * (1 + rmb)).toFixed(2); - row.materialNoRmbSum = Number(row.materialNoRmb * row.materialNum).toFixed(2); - row.materialRmbSum = Number(row.materialRmb * row.materialNum).toFixed(2); + row.materialNoUsd = parseFloat(row.materialNoUsd).toFixed(2); + row.materialUsd = parseFloat(row.materialNoUsd).toFixed(2); + row.materialUsdSum = parseFloat(row.materialNum * row.materialUsd).toFixed(2); + row.materialNoUsdSum = parseFloat(row.materialNoUsd * row.materialNum).toFixed(2); + row.materialNoRmb = parseFloat(row.materialNoUsd * usd).toFixed(2); + row.materialRmb = parseFloat(row.materialNoRmb * (1 + rmb)).toFixed(2); + row.materialNoRmbSum = parseFloat(row.materialNoRmb * row.materialNum).toFixed(2); + row.materialRmbSum = parseFloat(row.materialRmb * row.materialNum).toFixed(2); } getTotalAmount() }, @@ -534,50 +505,66 @@ autoclose: true }); //计算金额 - function getTotalAmount(){ - // $("#addFinishbomTable").bootstrapTable('refresh'); - let getData = $("#bootstrap-sub-table-quoteChild").bootstrapTable('getData', true); - var enterprise = "";let enterpriseSum = 0; let noRmb = 0; - let rmb = 0;let noRmbSum = 0;let rmbSum = 0;let noUsd = 0; - let usd = 0;let noUsdSum = 0; let usdSum = 0; - for(let i=0;i { + sums.currencies[currency].single += parseFloat(item['material' + [currency] ]); + sums.currencies[currency].total += parseFloat(item['material' + [currency] + 'Sum']); + }); } - $("#enterprise_add").val(enterprise); - $("#enterpriseSum_add").val(Number(enterpriseSum).toFixed(2)); - $("#noRmb_add").val(Number(noRmb).toFixed(2)); - $("#rmb_add").val(Number(rmb).toFixed(2)); - $("#noRmbSum_add").val(Number(noRmbSum).toFixed(2)); - $("#rmbSum_add").val(Number(rmbSum).toFixed(2)); - $("#noUsd_add").val(Number(noUsd).toFixed(2)); - $("#usd_add").val(Number(usd).toFixed(2)); - $("#noUsdSum_add").val(Number(noUsdSum).toFixed(2)); - $("#usdSum_add").val(Number(usdSum).toFixed(2)); + updateFormValues(sums); } + function updateFormValues(sums) { + // 物料合计与数量合计没有在sums中直接给出,这里假设它们需要单独处理或已存在于页面其他部分 + $("#enterprise_add").val(sums.enterprise); + $("#enterpriseSum_add").val(sums.enterpriseSum); + + // 更新不含税单价和总价 + $("#noRmb_add").val(sums.currencies.noRmb.single); + $("#noRmbSum_add").val(sums.currencies.noRmb.total); + $("#rmb_add").val(sums.currencies.rmb.single); + $("#rmbSum_add").val(sums.currencies.rmb.total); + + $("#noUsd_add").val(sums.currencies.noUsd.single); + $("#noUsdSum_add").val(sums.currencies.noUsd.total); + + $("#usd_add").val(sums.currencies.usd.single); + $("#usdSum_add").val(sums.currencies.usd.total); + } $(document).ready(function() { // 监听货币选项变化 $("#commonCurrency_add").on("change", function() { var isEditable = $(this).val() === "1"; var fieldName = ""; - if (isEditable) { - fieldName = "materialNoRmb"; - $("#rmbTax_add").prop("disabled", false); - $("#usdTax_add").prop("disabled", false); - } else { - fieldName = "materialNoUsd"; - $("#rmbTax_add").prop("disabled", true); - $("#usdTax_add").prop("disabled", true); - } + // if (isEditable) { + // fieldName = "materialNoRmb"; + // $("#rmbTax_add").prop("disabled", false); + // $("#usdTax_add").prop("disabled", false); + // } else { + // fieldName = "materialNoUsd"; + // $("#rmbTax_add").prop("disabled", true); + // $("#usdTax_add").prop("disabled", true); + // } var materialColumnCells = $('#bootstrap-sub-table-quoteChild tbody tr td [field=" '+ fieldName+' "]'); // 根据是否可编辑,添加或移除xEditable diff --git a/ruoyi-admin/src/main/resources/templates/system/customerQuote/taskModifyApply.html b/ruoyi-admin/src/main/resources/templates/system/customerQuote/taskModifyApply.html index f358f6be..71235598 100644 --- a/ruoyi-admin/src/main/resources/templates/system/customerQuote/taskModifyApply.html +++ b/ruoyi-admin/src/main/resources/templates/system/customerQuote/taskModifyApply.html @@ -268,12 +268,94 @@ return $.table.selectDictLabel(processMethodDatas, value); } }, - {title: '国内税率',field: 'countTax',align: 'center',editable: true}, - {title: '美元汇率',field: 'usdTax', align: 'center',editable: true}, - {title: '对外售价',field: 'materialSole',editable: true}, - {title: '物料的数量',field: 'materialNum',align: 'center',editable: true}, - {title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',editable: commonCurrency==1?true:false}, - {title: '物料的不含税单价(美元)',field: 'materialNoUsd',align: 'center',editable: commonCurrency==2?true:false}, + { title: '对外售价',field: 'materialSole', + editable: { + type: 'number', + mode: 'inline', + title: '对外售价', + validate: function (value) { + if (!value) { + return '对外售价不能为空'; + } + if (isNaN(value)) { + return '对外售价必须为数字'; + } + } + } + }, + {title: '国内税率',field: 'countTax',align: 'center',}, + { title: '美元汇率',field: 'usdTax', align: 'center',}, + {field: 'materialNum',align: 'center',title: '物料的数量', + editable:{ + type : 'text', + mode: 'inline', + title : '物料的数量', + validate : function(value) { + if (!value) { + return '用量不能为空'; + } + if (isNaN(value)) { + return '用量必须为数字'; + } + } + }, + }, + { title: '物料的不含税单价(RMB)', + field: 'materialNoRmb', + align: 'center', + editable:{ + type: 'text', // 使用'text'类型,因为我们需自定义验证小数 + mode: 'inline', + enabled: function() { + return ($("#commonCurrency_add").val() === '1'); // 当货币类型为2时启用 + }, + title: '物料的不含税单价(RMB)', + validate: function(value) { + // 验证是否为空 + if (!value) { + return '金额不能为空'; + } + // 尝试转换为浮点数并检查是否成功 + var num = parseFloat(value); + if (isNaN(num)) { + return '请输入有效的数字'; + } + // 检查小数点后是否有超过两位的数字 + var decimalPart = num.toString().split('.')[1]; // 获取小数部分 + if (decimalPart && decimalPart.length > 2) { + return '请输入精确到小数点后两位的数字'; + } + } + } + }, + {title: '物料的不含税单价(美元)', + field: 'materialNoUsd', + align: 'center', + editable: { + type: 'text', // 使用'text'类型,因为我们需自定义验证小数 + mode: 'inline', + enabled: function() { + return ($("#commonCurrency_add").val() === '2'); // 当货币类型为2时启用 + }, + title: '物料的不含税单价(美元)', + validate: function(value) { + // 验证是否为空 + if (!value) { + return '金额不能为空'; + } + // 尝试转换为浮点数并检查是否成功 + var num = parseFloat(value); + if (isNaN(num)) { + return '请输入有效的数字'; + } + // 检查小数点后是否有超过两位的数字 + var decimalPart = num.toString().split('.')[1]; // 获取小数部分 + if (decimalPart && decimalPart.length > 2) { + return '请输入精确到小数点后两位的数字'; + } + } + } + }, {title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center'}, {title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center'}, {title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center'}, diff --git a/ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwgzVerify.html b/ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwgzVerify.html index e8e09160..ee69b6f6 100644 --- a/ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwgzVerify.html +++ b/ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwgzVerify.html @@ -271,12 +271,94 @@ return $.table.selectDictLabel(processMethodDatas, value); } }, - {title: '国内税率',field: 'countTax',align: 'center',editable: true}, - {title: '美元汇率',field: 'usdTax', align: 'center',editable: true}, - {title: '对外售价',field: 'materialSole',editable: true}, - {title: '物料的数量',field: 'materialNum',align: 'center',editable: true}, - {title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',editable: commonCurrency==1?true:false}, - {title: '物料的不含税单价(美元)',field: 'materialNoUsd',align: 'center',editable: commonCurrency==2?true:false}, + { title: '对外售价',field: 'materialSole', + editable: { + type: 'number', + mode: 'inline', + title: '对外售价', + validate: function (value) { + if (!value) { + return '对外售价不能为空'; + } + if (isNaN(value)) { + return '对外售价必须为数字'; + } + } + } + }, + {title: '国内税率',field: 'countTax',align: 'center',}, + { title: '美元汇率',field: 'usdTax', align: 'center',}, + {title: '物料的数量',field: 'materialNum',align: 'center', + editable:{ + type : 'text', + mode: 'inline', + title : '物料的数量', + validate : function(value) { + if (!value) { + return '用量不能为空'; + } + if (isNaN(value)) { + return '用量必须为数字'; + } + } + }, + }, + { title: '物料的不含税单价(RMB)', + field: 'materialNoRmb', + align: 'center', + editable:{ + type: 'text', // 使用'text'类型,因为我们需自定义验证小数 + mode: 'inline', + enabled: function() { + return ($("#commonCurrency_add").val() === '1'); // 当货币类型为2时启用 + }, + title: '物料的不含税单价(RMB)', + validate: function(value) { + // 验证是否为空 + if (!value) { + return '金额不能为空'; + } + // 尝试转换为浮点数并检查是否成功 + var num = parseFloat(value); + if (isNaN(num)) { + return '请输入有效的数字'; + } + // 检查小数点后是否有超过两位的数字 + var decimalPart = num.toString().split('.')[1]; // 获取小数部分 + if (decimalPart && decimalPart.length > 2) { + return '请输入精确到小数点后两位的数字'; + } + } + } + }, + {title: '物料的不含税单价(美元)', + field: 'materialNoUsd', + align: 'center', + editable: { + type: 'text', // 使用'text'类型,因为我们需自定义验证小数 + mode: 'inline', + enabled: function() { + return ($("#commonCurrency_add").val() === '2'); // 当货币类型为2时启用 + }, + title: '物料的不含税单价(美元)', + validate: function(value) { + // 验证是否为空 + if (!value) { + return '金额不能为空'; + } + // 尝试转换为浮点数并检查是否成功 + var num = parseFloat(value); + if (isNaN(num)) { + return '请输入有效的数字'; + } + // 检查小数点后是否有超过两位的数字 + var decimalPart = num.toString().split('.')[1]; // 获取小数部分 + if (decimalPart && decimalPart.length > 2) { + return '请输入精确到小数点后两位的数字'; + } + } + } + }, {title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center'}, {title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center'}, {title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center'}, diff --git a/ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwjlVerify.html b/ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwjlVerify.html index dd485931..1c7175e2 100644 --- a/ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwjlVerify.html +++ b/ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwjlVerify.html @@ -406,15 +406,15 @@ let noUsdSum = 0;let usdSum = 0; for(var i=0;i 2) { + return '请输入精确到小数点后两位的数字'; + } + } + } + }, + {title: '物料的不含税单价(美元)', + field: 'materialNoUsd', + align: 'center', + editable: { + type: 'text', // 使用'text'类型,因为我们需自定义验证小数 + mode: 'inline', + enabled: function() { + return ($("#commonCurrency_add").val() === '2'); // 当货币类型为2时启用 + }, + title: '物料的不含税单价(美元)', + validate: function(value) { + // 验证是否为空 + if (!value) { + return '金额不能为空'; + } + // 尝试转换为浮点数并检查是否成功 + var num = parseFloat(value); + if (isNaN(num)) { + return '请输入有效的数字'; + } + // 检查小数点后是否有超过两位的数字 + var decimalPart = num.toString().split('.')[1]; // 获取小数部分 + if (decimalPart && decimalPart.length > 2) { + return '请输入精确到小数点后两位的数字'; + } + } + } + }, {title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center'}, {title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center'}, {title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center'}, diff --git a/ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html b/ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html index 955babcd..ed1d2e25 100644 --- a/ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html +++ b/ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html @@ -89,6 +89,8 @@ restoreUrl: prefix + "/restore/{id}", exportUrl: prefix + "/export", modalName: "请购单", + pageSize: 5, + pageList: [5, 10, 25, 50], columns: [ {checkbox: true}, {title: '请购单索引id',field: 'requisitioningId',visible: false}, diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html index 22c3ac5b..f25081cb 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html @@ -81,21 +81,21 @@
- +
- +
- +
- +
-
@@ -108,32 +108,32 @@
- +
- +
-
- +
- +
@@ -358,34 +358,52 @@ } }, { title: '对外售价',field: 'materialSole',editable: true}, - {title: '国内税率',field: 'countTax',align: 'center',editable: true, + {title: '国内税率',field: 'countTax',align: 'center', + editable: { + type: 'text', + mode: 'inline', // 同样设定为行内编辑模式 + } }, - { title: '美元汇率',field: 'usdTax', align: 'center',editable: true, + { title: '美元汇率',field: 'usdTax', align: 'center', + editable: { + type: 'text', + mode: 'inline', // 同样设定为行内编辑模式 + } }, - {field: 'materialNum',align: 'center',title: '物料的数量',editable: true, + {field: 'materialNum',align: 'center',title: '物料的数量', + editable: { + type: 'text', + mode: 'inline', // 同样设定为行内编辑模式 + } }, { title: '物料的不含税单价(RMB)', field: 'materialNoRmb', align: 'center', - editable: function(value, row, index) { - commonCurrency = $("#commonCurrency_add option:selected").val(); - if (commonCurrency == 1){ - return true; - }else{ - return false; + editable: { + type: 'text', + mode: 'inline', // 同样设定为行内编辑模式 + enabled: function() { + return ($("#commonCurrency_add").val() === '2'); // 当货币类型为2时启用 + }, + options: { + placeholder: '请输入USD单价...', + maxlength: 10 } } }, {title: '物料的不含税单价(美元)', field: 'materialNoUsd', align: 'center', - editable: function(value, row, index) { - commonCurrency = $("#commonCurrency_add option:selected").val(); - if (commonCurrency == 2){ - return true; - }else{ - return false; + editable: { + type: 'text', + mode: 'inline', // 同样设定为行内编辑模式 + enabled: function() { + return ($("#commonCurrency_add").val() === '2'); // 当货币类型为2时启用 + }, + options: { + placeholder: '请输入USD单价...', + maxlength: 10 } } }, diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html index 523d9f93..282d34f1 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html @@ -229,10 +229,12 @@ removeUrl: prefix + "/remove", exportUrl: prefix + "/export", detailUrl: prefix + "/detail/{id}", - clickToSelect: true, + pageSize: 5, + pageList: [5, 10, 25, 50], modalName: "销售订单", fixedColumns:true, fixedRightNumber:1, + height: $(window).height() - 200, columns: [ {checkbox: true}, {title: '订单id',field: 'salesOrderId',visible: false}, diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskModifyApply.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskModifyApply.html index e2177754..daba4cda 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskModifyApply.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/taskModifyApply.html @@ -87,13 +87,13 @@
- +
- +
@@ -106,13 +106,13 @@
- +
- +
From ccf37699b9a740438a3c7a2b7573f1cb0455b2bd Mon Sep 17 00:00:00 2001 From: zhangsiqi <2825463979@qq.com> Date: Fri, 24 May 2024 18:51:06 +0800 Subject: [PATCH 2/8] =?UTF-8?q?[feat]=E5=B7=A5=E7=A8=8B=E7=AE=A1=E7=90=86:?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E7=89=A9=E6=96=99=E6=96=99=E5=8F=B7=E5=89=8D?= =?UTF-8?q?=E5=87=A0=E4=BD=8D=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialMapper.xml b/ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialMapper.xml index 4ef8bdf7..7753afbf 100644 --- a/ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialMapper.xml @@ -87,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and erp.create_by = #{createBy} and erp.create_time between #{params.beginCreateTime} and #{params.endCreateTime} - and erp.material_no like concat('%', #{params.materialNo}, '%') + and erp.material_no like concat( #{params.materialNo}, '%') and erp.material_no like concat(#{materialNo}, '%') and erp.bomNo = #{bomNo} and erp.material_name like concat('%', #{materialName}, '%') From 9fbb256ef84a13d3730b09e790e881f6b20fa004 Mon Sep 17 00:00:00 2001 From: zhangsiqi <2825463979@qq.com> Date: Fri, 24 May 2024 18:54:00 +0800 Subject: [PATCH 3/8] =?UTF-8?q?[feat]=E9=94=80=E5=94=AE=E7=AE=A1=E7=90=86:?= =?UTF-8?q?=E5=88=9B=E7=AB=8B=E6=8A=A5=E4=BB=B7=E9=9C=80=E8=A6=81=E4=BE=9B?= =?UTF-8?q?=E5=BA=94=E5=95=86=E6=9F=A5=E8=AF=A2=E5=88=B0=E7=9A=84=E9=83=A8?= =?UTF-8?q?=E5=88=86=E4=B8=8B=E6=8B=89=E6=A1=86=E6=9F=A5=E8=AF=A2,server?= =?UTF-8?q?=E5=B1=82=E7=BA=A7=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/system/service/ISysSupplierService.java | 6 +++++- .../templates/system/baseExpense/edit.html | 15 ++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSupplierService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSupplierService.java index 2fe3295c..d3c388e5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSupplierService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSupplierService.java @@ -1,6 +1,7 @@ package com.ruoyi.system.service; import com.ruoyi.system.domain.SysSupplier; +import org.springframework.stereotype.Service; import java.util.List; @@ -10,7 +11,8 @@ import java.util.List; * @author ruoyi * @date 2022-11-02 */ -public interface ISysSupplierService +@Service("supplier") +public interface ISysSupplierService { /** * 查询供应商资料 @@ -68,4 +70,6 @@ public interface ISysSupplierService public List selectSysSupperWithMaterial(); Object getId(); + + public List selectSysSupplierListAll(); } diff --git a/ruoyi-admin/src/main/resources/templates/system/baseExpense/edit.html b/ruoyi-admin/src/main/resources/templates/system/baseExpense/edit.html index 7ca6b9a3..f3843aca 100644 --- a/ruoyi-admin/src/main/resources/templates/system/baseExpense/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/baseExpense/edit.html @@ -107,7 +107,7 @@ $(function() { var options = { id:'bootstrap-sub-table-expense', - url:prefix + "/getChildList", + url: ctx + "system/expenseChild/list", queryParams: function(params) { return { quoteId: $("#expenseCode").val() @@ -116,6 +116,7 @@ pagination: false, sidePagination: "client", model: "报销单数据", + editable: true, columns: [ {checkbox: true}, {title: '主键',field: 'index',visible: false, @@ -135,12 +136,12 @@ return getCostSmallType(value,row,index) } }, - {title: '用途',field: 'purpose',editable:{type:'text',options:{maxlength:100}}}, - {title: '金额',field: 'amounts',editable: {type:'text',options:{maxlength:100}}}, - {title: '报销时间',field: 'expenseTime',editable:{type:'date'}}, - {title: '出差单号',field: 'evectionCode',}, - {title: '采购单号',field: 'purcahseCode',}, - {title: '委外单号',field: 'outsourceCode',}, + {title: '用途',field: 'purpose',editable:{type:'text',mode:'inline'}}, + {title: '金额',field: 'amounts',editable: {type:'text',mode:'inline'}}, + {title: '报销时间',field: 'expenseTime',editable:{type:'date',mode:'inline',}}, + {title: '出差单号',field: 'evectionCode',editable: {type:'text',mode:'inline'}}, + {title: '采购单号',field: 'purcahseCode',editable: {type:'text',mode:'inline',}}, + {title: '委外单号',field: 'outsourceCode',editable: {type:'text',mode:'inline',}}, {title: '操作', align: 'center', formatter: function (value, row, index) { var actions = []; From b367bd06ae260ccee29c8feb476122489e488af3 Mon Sep 17 00:00:00 2001 From: zhangsiqi <2825463979@qq.com> Date: Fri, 24 May 2024 18:55:04 +0800 Subject: [PATCH 4/8] =?UTF-8?q?[feat]=E7=89=A9=E6=96=99=E4=BF=A1=E6=81=AF:?= =?UTF-8?q?=E7=89=A9=E6=96=99=E6=B8=85=E9=99=A4=E5=A4=9A=E4=BD=99=E7=9A=84?= =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E5=91=98=E4=BF=A1=E6=81=AF=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E5=86=8D=E6=98=BE=E7=A4=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/templates/erp/material/material.html | 1 - 1 file changed, 1 deletion(-) diff --git a/ruoyi-admin/src/main/resources/templates/erp/material/material.html b/ruoyi-admin/src/main/resources/templates/erp/material/material.html index cc5928c8..0a7661c1 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/material/material.html +++ b/ruoyi-admin/src/main/resources/templates/erp/material/material.html @@ -198,7 +198,6 @@ formatter: function(value, row, index) {return $.table.selectDictLabel(useStatusDatas, value);} }, {title: '工程员',field: 'businessMembers',visible: false}, - {title: '工程员',field: 'createUserName',visible: false}, {title: '料号',field: 'materialNo',}, {title: '关联bom号',field: 'bomNo',}, {title: '图片',field: 'photoUrl', From 807a85150e3b7e983d0050aa866302334152bfd6 Mon Sep 17 00:00:00 2001 From: zhangsiqi <2825463979@qq.com> Date: Fri, 24 May 2024 19:03:41 +0800 Subject: [PATCH 5/8] =?UTF-8?q?[feat]=E7=89=A9=E6=96=99=E4=BF=A1=E6=81=AF:?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E9=83=A8=E9=97=A8=E5=AD=97=E6=AE=B5=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=AD=89=E6=94=B9=E4=B8=BA=E9=80=89=E5=A1=AB=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/templates/erp/material/add.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/erp/material/add.html b/ruoyi-admin/src/main/resources/templates/erp/material/add.html index 6770a290..d02886c4 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/material/add.html +++ b/ruoyi-admin/src/main/resources/templates/erp/material/add.html @@ -80,9 +80,9 @@
- +
- From 14a15733c4266400e7896db930d3eb614974ff58 Mon Sep 17 00:00:00 2001 From: zhangsiqi <2825463979@qq.com> Date: Fri, 24 May 2024 19:06:48 +0800 Subject: [PATCH 6/8] =?UTF-8?q?[feat]=E5=9F=BA=E7=A1=80=E4=BF=A1=E6=81=AF:?= =?UTF-8?q?=E5=87=BA=E5=B7=AE=E5=8D=95=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=BE=9B?= =?UTF-8?q?=E5=BA=94=E5=95=86=E4=B8=8B=E6=8B=89=E6=A1=86=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90?= =?UTF-8?q?=E5=B7=AE=E5=8D=95=E7=BC=96=E5=8F=B7=E6=96=B9=E6=B3=95=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/controller/BaseEvectionFormController.java | 7 ++++++- .../ruoyi/system/service/IBaseEvectionFormService.java | 2 ++ .../system/service/impl/BaseEvectionFormServiceImpl.java | 9 +++++++++ .../resources/templates/system/baseEvectionForm/add.html | 4 ++-- .../system/baseEvectionForm/baseEvectionForm.html | 2 ++ 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEvectionFormController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEvectionFormController.java index 84d15fb4..cd62d1a8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEvectionFormController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEvectionFormController.java @@ -147,5 +147,10 @@ public class BaseEvectionFormController extends BaseController return toAjax(baseEvectionFormService.restoreBaseEvectionFormById(id)); } - + @RequestMapping("/getId") + @ResponseBody + public AjaxResult getId() + { + return AjaxResult.success(baseEvectionFormService.getId()); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEvectionFormService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEvectionFormService.java index 2bf7e793..e3c050d2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEvectionFormService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEvectionFormService.java @@ -72,4 +72,6 @@ public interface IBaseEvectionFormService * @return */ int restoreBaseEvectionFormById(Long evectionId); + + Object getId(); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEvectionFormServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEvectionFormServiceImpl.java index fa4862aa..d485c505 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEvectionFormServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEvectionFormServiceImpl.java @@ -1,6 +1,8 @@ package com.ruoyi.system.service.impl; import java.util.List; + +import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -22,6 +24,9 @@ public class BaseEvectionFormServiceImpl implements IBaseEvectionFormService @Autowired private BaseEvectionFormMapper baseEvectionFormMapper; + @Autowired + private RedisCache redisCache; + /** * 查询出差单 * @@ -123,4 +128,8 @@ public class BaseEvectionFormServiceImpl implements IBaseEvectionFormService { return baseEvectionFormMapper.restoreBaseEvectionFormById(evectionId); } + @Override + public Object getId() { + return redisCache.getCacheObject("CC"); + } } diff --git a/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/add.html b/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/add.html index 528da7db..1e0ff6e0 100644 --- a/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/add.html @@ -80,7 +80,7 @@
- +
diff --git a/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/baseEvectionForm.html b/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/baseEvectionForm.html index ba1f3fd0..9cccc171 100644 --- a/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/baseEvectionForm.html +++ b/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/baseEvectionForm.html @@ -77,6 +77,8 @@ restoreUrl: prefix + "/restore/{id}", exportUrl: prefix + "/export", modalName: "出差单", + pageSize: 5, + pageList: [5, 10, 25, 50], columns: [ {checkbox: true}, {title: '出差单索引id',field: 'evectionId',visible: false}, From 2c1fce1aeac4eb35ce340ee7ffaa75682a2b4368 Mon Sep 17 00:00:00 2001 From: zhangsiqi <2825463979@qq.com> Date: Fri, 24 May 2024 19:12:38 +0800 Subject: [PATCH 7/8] =?UTF-8?q?[feat]=E5=9F=BA=E7=A1=80=E4=BF=A1=E6=81=AF:?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AF=B7=E8=B4=AD=E5=8D=95=E7=94=9F=E6=88=90?= =?UTF-8?q?=E8=AF=B7=E8=B4=AD=E5=8D=95=E7=BC=96=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/service/IBaseRequisitioningOrderService.java | 2 ++ .../service/impl/BaseRequisitioningOrderServiceImpl.java | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseRequisitioningOrderService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseRequisitioningOrderService.java index 8d367dd1..c4196d79 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseRequisitioningOrderService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseRequisitioningOrderService.java @@ -77,4 +77,6 @@ public interface IBaseRequisitioningOrderService List selectBaseRequisitioningOrderByIds(String ids); + + Object getId(); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseRequisitioningOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseRequisitioningOrderServiceImpl.java index 1fa7bc2d..7c2f659f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseRequisitioningOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseRequisitioningOrderServiceImpl.java @@ -2,7 +2,6 @@ package com.ruoyi.system.service.impl; import java.math.BigDecimal; import java.math.RoundingMode; -import java.util.ArrayList; import java.util.List; import com.ruoyi.common.core.redis.RedisCache; @@ -10,7 +9,6 @@ import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.system.domain.BaseRequisitioningOrderChild; import com.ruoyi.system.mapper.BaseRequisitioningOrderChildMapper; -import io.swagger.models.auth.In; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.mapper.BaseRequisitioningOrderMapper; @@ -206,4 +204,8 @@ public class BaseRequisitioningOrderServiceImpl implements IBaseRequisitioningOr public List selectBaseRequisitioningOrderByIds(String ids){ return baseRequisitioningOrderMapper.selectBaseRequisitioningOrderByIds(Convert.toStrArray(ids)); } + @Override + public Object getId(){ + return redisCache.generateBillNo("QG"); + } } From 76a3523e5c8153c7d4ca9f6fd0766eae145a6fc9 Mon Sep 17 00:00:00 2001 From: zhangsiqi <2825463979@qq.com> Date: Fri, 24 May 2024 19:13:12 +0800 Subject: [PATCH 8/8] =?UTF-8?q?[feat]=E5=9F=BA=E7=A1=80=E4=BF=A1=E6=81=AF:?= =?UTF-8?q?=E9=94=80=E5=94=AE=E6=8A=A5=E4=BB=B7=E8=A1=8C=E5=86=85=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/customerQuote/customerQuote.html | 82 ++++------------ .../system/customerQuote/detail.html | 94 +++++++++++++++++-- .../templates/system/customerQuote/edit.html | 94 +++++++++++++++++-- .../templates/system/salesOrder/edit.html | 94 ++++++++++++++----- 4 files changed, 266 insertions(+), 98 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html b/ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html index 85f45870..dc5aa37c 100644 --- a/ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html +++ b/ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html @@ -117,73 +117,28 @@ restoreUrl: prefix + "/restore/{id}", detailUrl: prefix + "/detail/{id}", exportUrl: prefix + "/export", + pageSize: 5, + pageList: [5, 10, 25, 50], modalName: "客户报价表", fixedColumns:true, fixedRightNumber:1, columns: [ {checkbox: true}, - { - field: 'id', - title: '主键ID' - }, - { - field: 'instanceId', - title: '流程实例ID', - visible: false - }, - { - field: 'submitInstanceId', - title: '流程提交实例ID', - visible: false - }, - { - field: 'cancelInstanceId', - title: '流程作废实例ID', - visible: false - }, - { - field: 'restoreInstanceId', - title: '流程恢复实例ID', - visible: false - }, - { - field: 'instanceTypeName', - title: '流程实例类型', - visible: false - }, - { - field: 'applyUser', - title: '申请人ID', - visible: false - }, - { - field: 'applyUserName', - title: '申请人', - formatter: function(value, row, index) { - return '' + (value ? value : "-") + ''; - } - }, - { - field: 'applyTime', - title: '申请时间' - }, - { - field: 'taskId', - title: '当前任务ID', - visible: false + {field: 'id',title: '主键ID',visible: false}, + {field: 'instanceId',title: '流程实例ID',visible: false}, + {field: 'submitInstanceId',title: '流程提交实例ID',visible: false }, + {field: 'cancelInstanceId',title: '流程作废实例ID', visible: false}, + {field: 'restoreInstanceId',title: '流程恢复实例ID',visible: false}, + {field: 'instanceTypeName',title: '流程实例类型',visible: false}, + {field: 'applyUser',title: '申请人ID', visible: false}, + {field: 'applyUserName', title: '申请人', + formatter: function(value, row, index) {return '' + (value ? value : "-") + ''; } }, - { - field: 'todoUserId', - title: '待办用户ID', - visible: false - }, - { - field: 'taskName', - title: '当前任务名称', - align: 'center', - formatter: function(value, row, index) { - return '' + value + ''; - } + {field: 'applyTime',title: '申请时间'}, + {field: 'taskId', title: '当前任务ID',visible: false}, + {field: 'todoUserId',title: '待办用户ID',visible: false}, + {field: 'taskName',title: '当前任务名称',align: 'center', + formatter: function(value, row, index) { return '' + value + ''; } }, { title: '审核状态',field: 'auditStatus', formatter: function (value, row, index) { return $.table.selectDictLabel(auditStatusDatas, value);} @@ -198,9 +153,8 @@ {title: '物料合计',field: 'enterprise'}, {title: '数量合计',field: 'enterpriseSum'}, {title: '报价币种',field: 'commonCurrency', - formatter: function (value, row, index) { - return $.table.selectDictLabel(currencyDatas, value); - }}, + formatter: function (value, row, index) {return $.table.selectDictLabel(currencyDatas, value);} + }, {title: '国内汇率',field: 'rmbTax'}, {title: '美元汇率',field: 'usdTax'}, {title: '不含税总价(RMB)',field: 'noRmbSum'}, diff --git a/ruoyi-admin/src/main/resources/templates/system/customerQuote/detail.html b/ruoyi-admin/src/main/resources/templates/system/customerQuote/detail.html index 46aee8aa..4a5e27d6 100644 --- a/ruoyi-admin/src/main/resources/templates/system/customerQuote/detail.html +++ b/ruoyi-admin/src/main/resources/templates/system/customerQuote/detail.html @@ -214,12 +214,94 @@ return $.table.selectDictLabel(processMethodDatas, value); } }, - {title: '国内税率',field: 'countTax',align: 'center',editable: true}, - {title: '美元汇率',field: 'usdTax', align: 'center',editable: true}, - {title: '对外售价',field: 'materialSole',editable: true}, - {title: '物料的数量',field: 'materialNum',align: 'center',editable: true}, - {title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center'}, - {title: '物料的不含税单价(美元)',field: 'materialNoUsd',align: 'center'}, + { title: '对外售价',field: 'materialSole', + editable: { + type: 'number', + mode: 'inline', + title: '对外售价', + validate: function (value) { + if (!value) { + return '对外售价不能为空'; + } + if (isNaN(value)) { + return '对外售价必须为数字'; + } + } + } + }, + {title: '国内税率',field: 'countTax',align: 'center',}, + { title: '美元汇率',field: 'usdTax', align: 'center',}, + {field: 'materialNum',align: 'center',title: '物料的数量', + editable:{ + type : 'text', + mode: 'inline', + title : '物料的数量', + validate : function(value) { + if (!value) { + return '用量不能为空'; + } + if (isNaN(value)) { + return '用量必须为数字'; + } + } + }, + }, + { title: '物料的不含税单价(RMB)', + field: 'materialNoRmb', + align: 'center', + editable:{ + type: 'text', // 使用'text'类型,因为我们需自定义验证小数 + mode: 'inline', + enabled: function() { + return ($("#commonCurrency_add").val() === '1'); // 当货币类型为2时启用 + }, + title: '物料的不含税单价(RMB)', + validate: function(value) { + // 验证是否为空 + if (!value) { + return '金额不能为空'; + } + // 尝试转换为浮点数并检查是否成功 + var num = parseFloat(value); + if (isNaN(num)) { + return '请输入有效的数字'; + } + // 检查小数点后是否有超过两位的数字 + var decimalPart = num.toString().split('.')[1]; // 获取小数部分 + if (decimalPart && decimalPart.length > 2) { + return '请输入精确到小数点后两位的数字'; + } + } + } + }, + {title: '物料的不含税单价(美元)', + field: 'materialNoUsd', + align: 'center', + editable: { + type: 'text', // 使用'text'类型,因为我们需自定义验证小数 + mode: 'inline', + enabled: function() { + return ($("#commonCurrency_add").val() === '2'); // 当货币类型为2时启用 + }, + title: '物料的不含税单价(美元)', + validate: function(value) { + // 验证是否为空 + if (!value) { + return '金额不能为空'; + } + // 尝试转换为浮点数并检查是否成功 + var num = parseFloat(value); + if (isNaN(num)) { + return '请输入有效的数字'; + } + // 检查小数点后是否有超过两位的数字 + var decimalPart = num.toString().split('.')[1]; // 获取小数部分 + if (decimalPart && decimalPart.length > 2) { + return '请输入精确到小数点后两位的数字'; + } + } + } + }, {title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center'}, {title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center'}, {title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center'}, diff --git a/ruoyi-admin/src/main/resources/templates/system/customerQuote/edit.html b/ruoyi-admin/src/main/resources/templates/system/customerQuote/edit.html index 8036ae31..828a715e 100644 --- a/ruoyi-admin/src/main/resources/templates/system/customerQuote/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/customerQuote/edit.html @@ -232,12 +232,94 @@ return $.table.selectDictLabel(processMethodDatas, value); } }, - {title: '国内税率',field: 'countTax',align: 'center',editable: true}, - {title: '美元汇率',field: 'usdTax', align: 'center',editable: true}, - {title: '对外售价',field: 'materialSole',editable: true}, - {title: '物料的数量',field: 'materialNum',align: 'center',editable: true}, - {title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',editable: commonCurrency==1?true:false}, - {title: '物料的不含税单价(美元)',field: 'materialNoUsd',align: 'center',editable: commonCurrency==2?true:false}, + { title: '对外售价',field: 'materialSole', + editable: { + type: 'number', + mode: 'inline', + title: '对外售价', + validate: function (value) { + if (!value) { + return '对外售价不能为空'; + } + if (isNaN(value)) { + return '对外售价必须为数字'; + } + } + } + }, + {title: '国内税率',field: 'countTax',align: 'center',}, + { title: '美元汇率',field: 'usdTax', align: 'center',}, + {field: 'materialNum',align: 'center',title: '物料的数量', + editable:{ + type : 'text', + mode: 'inline', + title : '物料的数量', + validate : function(value) { + if (!value) { + return '用量不能为空'; + } + if (isNaN(value)) { + return '用量必须为数字'; + } + } + }, + }, + { title: '物料的不含税单价(RMB)', + field: 'materialNoRmb', + align: 'center', + editable:{ + type: 'text', // 使用'text'类型,因为我们需自定义验证小数 + mode: 'inline', + enabled: function() { + return ($("#commonCurrency_add").val() === '1'); // 当货币类型为2时启用 + }, + title: '物料的不含税单价(RMB)', + validate: function(value) { + // 验证是否为空 + if (!value) { + return '金额不能为空'; + } + // 尝试转换为浮点数并检查是否成功 + var num = parseFloat(value); + if (isNaN(num)) { + return '请输入有效的数字'; + } + // 检查小数点后是否有超过两位的数字 + var decimalPart = num.toString().split('.')[1]; // 获取小数部分 + if (decimalPart && decimalPart.length > 2) { + return '请输入精确到小数点后两位的数字'; + } + } + } + }, + {title: '物料的不含税单价(美元)', + field: 'materialNoUsd', + align: 'center', + editable: { + type: 'text', // 使用'text'类型,因为我们需自定义验证小数 + mode: 'inline', + enabled: function() { + return ($("#commonCurrency_add").val() === '2'); // 当货币类型为2时启用 + }, + title: '物料的不含税单价(美元)', + validate: function(value) { + // 验证是否为空 + if (!value) { + return '金额不能为空'; + } + // 尝试转换为浮点数并检查是否成功 + var num = parseFloat(value); + if (isNaN(num)) { + return '请输入有效的数字'; + } + // 检查小数点后是否有超过两位的数字 + var decimalPart = num.toString().split('.')[1]; // 获取小数部分 + if (decimalPart && decimalPart.length > 2) { + return '请输入精确到小数点后两位的数字'; + } + } + } + }, {title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center'}, {title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center'}, {title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center'}, diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/edit.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/edit.html index eb9567d1..c2825079 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/edit.html @@ -137,15 +137,15 @@
- +
- +
- +
@@ -374,31 +374,81 @@ return $.table.selectDictLabel(processMethodDatas, value); } }, - { title: '对外售价',field: 'materialSole',editable: true}, - {title: '国内税率',field: 'countTax',align: 'center',editable: true}, - { title: '美元汇率',field: 'usdTax', align: 'center',editable: true}, - {field: 'materialNum',align: 'center',title: '物料的数量',editable: true}, - { title: '物料的不含税单价(RMB)', - field: 'materialNoRmb', - align: 'center', - editable: function(value, row, index) { - var commonCurrency3 = $("#commonCurrency_edit option:selected").val(); - if (commonCurrency3 == 1){ - return true; - }else{ - return false; + { title: '对外售价',field: 'materialSole', + editable: { + type: 'text', + mode: 'inline', // 设定为行内编辑模式 + options: { + placeholder: '请输入对外售价...', + maxlength: 10 + } + } + }, + {title: '国内税率',field: 'countTax',align: 'center', + editable: { + type: 'text', + mode: 'inline', // 设定为行内编辑模式 + enabled: function() { + return ($("#commonCurrency_add").val() === '1'); // 当货币类型为1时启用 + }, + options: { + placeholder: '请输入税率...', + maxlength: 10 + } + } + }, + { title: '美元汇率',field: 'usdTax', align: 'center', + editable: { + type: 'text', + mode: 'inline', // 设定为行内编辑模式 + enabled: function() { + return ($("#commonCurrency_add").val() === '1'); // 当货币类型为1时启用 + }, + options: { + placeholder: '请输入美元汇率...', + maxlength: 10 } } + + }, + {field: 'materialNum',align: 'center',title: '物料的数量', + editable: { + type: 'text', + mode: 'inline', // 设定为行内编辑模式 + enabled: function() { + return ($("#commonCurrency_add").val() === '1'); // 当货币类型为1时启用 + }, + options: { + placeholder: '请输入物料的数量...', + maxlength: 10 + } + } + }, + { title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center', + editable: { + type: 'text', + mode: 'inline', // 设定为行内编辑模式 + enabled: function() { + return ($("#commonCurrency_add").val() === '1'); // 当货币类型为1时启用 + }, + options: { + placeholder: '请输入RMB单价...', + maxlength: 10 + } + }, }, {title: '物料的不含税单价(美元)', field: 'materialNoUsd', align: 'center', - editable: function(value, row, index) { - var commonCurrency2= $("#commonCurrency_edit option:selected").val(); - if (commonCurrency2 == 2){ - return true; - }else{ - return false; + editable: { + type: 'text', + mode: 'inline', // 同样设定为行内编辑模式 + enabled: function() { + return ($("#commonCurrency_add").val() === '2'); // 当货币类型为2时启用 + }, + options: { + placeholder: '请输入USD单价...', + maxlength: 10 } } },