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 @@
- +
- +