Browse Source

[feat]销售管理:销售订单中物料销售报价样式。将弹出行上的位置改为在列中。

dev
zhangsiqi 9 months ago
parent
commit
29c469f9e3
  1. 57
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSupplierController.java
  2. 6
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSupplierServiceImpl.java
  3. 227
      ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html
  4. 94
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskModifyApply.html
  5. 94
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwgzVerify.html
  6. 18
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwjlVerify.html
  7. 94
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskZozjVerify.html
  8. 2
      ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html
  9. 68
      ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html
  10. 4
      ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html
  11. 8
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskModifyApply.html

57
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.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDictData; 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.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; 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.SysSupplier;
import com.ruoyi.system.domain.exportDto.SysSupplierDto; import com.ruoyi.system.domain.exportDto.SysSupplierDto;
import com.ruoyi.system.service.ISysDictTypeService; import com.ruoyi.system.service.ISysDictTypeService;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysSupplierService; 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.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -29,6 +37,8 @@ import java.io.IOException;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
/** /**
* 供应商资料Controller * 供应商资料Controller
@ -47,6 +57,21 @@ public class SysSupplierController extends BaseController
@Autowired @Autowired
private ISysDictTypeService sysDictTypeService; 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") @RequiresPermissions("system:supplier:view")
@GetMapping() @GetMapping()
public String supplier() public String supplier()
@ -62,9 +87,41 @@ public class SysSupplierController extends BaseController
@ResponseBody @ResponseBody
public TableDataInfo list(SysSupplier sysSupplier) public TableDataInfo list(SysSupplier sysSupplier)
{ {
try {
startPage(); startPage();
List<SysSupplier> list = sysSupplierService.selectSysSupplierList(sysSupplier); List<SysSupplier> list = sysSupplierService.selectSysSupplierList(sysSupplier);
SysUser curUser = ShiroUtils.getSysUser();
String loginName = ShiroUtils.getLoginName();
Long userId = curUser.getUserId();
Set<String> roleKeys = roleService.selectRoleKeys(userId);
List<SysUser> sysUserlist = sysUserService.selectRoleToUserList("cgyRole");
sysUserlist.add(curUser);
if (curUser.getUserName().contains("admin")) {
SysSupplier sysSupplier2 = new SysSupplier();
startPage();
List<SysSupplier> list2 = sysSupplierService.selectSysSupplierList(sysSupplier2);
return getDataTable(list2);
}
//如果主管审批,查看当前自己部门的审核
//如果经理审计需要查询自己部门下所有业务员的提交的订单,以及自身的提交的订单
if (roleKeys.contains("cgyRole")) {
List<SysUser> findUser = sysUserlist.stream().filter(item -> (item.getDeptId().equals(curUser.getDeptId()))).collect(Collectors.toList());
Set<String> user = findUser.stream().map(SysUser::getLoginName).collect(Collectors.toSet());
startPage();
List<SysSupplier> 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<SysSupplier> list2 = sysSupplierService.selectSysSupplierList(sysSupplier);
return getDataTable(list2);
}
return getDataTable(list); return getDataTable(list);
}catch(NullPointerException e){
throw new NullPointerException("当前用户没有申请客户资料");
}
} }
/** /**

6
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSupplierServiceImpl.java

@ -114,4 +114,10 @@ public class SysSupplierServiceImpl implements ISysSupplierService
public Object getId() { public Object getId() {
return redisCache.generateBillNo("GYS"); return redisCache.generateBillNo("GYS");
} }
@Override
public List<SysSupplier> selectSysSupplierListAll() {
SysSupplier sysSupplier = new SysSupplier();
sysSupplier.setAuditStatus("1");
return sysSupplierMapper.selectSysSupplierList(sysSupplier);
}
} }

227
ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html

@ -247,15 +247,26 @@
return $.table.selectDictLabel(processMethodDatas, value); return $.table.selectDictLabel(processMethodDatas, value);
} }
}, },
{ title: '对外售价',field: 'materialSole',editable: true}, { title: '对外售价',field: 'materialSole',
{title: '国内税率',field: 'countTax',align: 'center',editable: true, editable: {
}, type: 'number',
{ title: '美元汇率',field: 'usdTax', align: 'center',editable: true, 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: '物料的数量', {field: 'materialNum',align: 'center',title: '物料的数量',
editable:{ editable:{
type : 'number', type : 'text',
mode: 'inline', mode: 'inline',
title : '物料的数量', title : '物料的数量',
validate : function(value) { validate : function(value) {
@ -274,6 +285,9 @@
editable:{ editable:{
type: 'text', // 使用'text'类型,因为我们需自定义验证小数 type: 'text', // 使用'text'类型,因为我们需自定义验证小数
mode: 'inline', mode: 'inline',
enabled: function() {
return ($("#commonCurrency_add").val() === '1'); // 当货币类型为2时启用
},
title: '物料的不含税单价(RMB)', title: '物料的不含税单价(RMB)',
validate: function(value) { validate: function(value) {
// 验证是否为空 // 验证是否为空
@ -299,7 +313,10 @@
editable: { editable: {
type: 'text', // 使用'text'类型,因为我们需自定义验证小数 type: 'text', // 使用'text'类型,因为我们需自定义验证小数
mode: 'inline', mode: 'inline',
title: '物料的不含税单价(RMB)', enabled: function() {
return ($("#commonCurrency_add").val() === '2'); // 当货币类型为2时启用
},
title: '物料的不含税单价(美元)',
validate: function(value) { validate: function(value) {
// 验证是否为空 // 验证是否为空
if (!value) { if (!value) {
@ -318,64 +335,18 @@
} }
} }
}, },
{ title: '物料的含税单价(美元)', { title: '物料的含税单价(美元)',field: 'materialUsd',align: 'center',},
field: 'materialUsd', { title: '物料的含税总价(美元)',field: 'materialUsdSum', align: 'center',},
align: 'center', { title: '物料的不含税总价(美元)',field: 'materialNoUsdSum',align: 'center',},
}, { title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center',},
{ title: '物料的含税总价(美元)', {title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center',},
field: 'materialUsdSum', {field: 'createBy', align: 'center',title: '录入人',visible: false},
align: 'center', {field: 'createTime',align: 'center',title: '录入时间',visible: false},
}, {field: 'updateBy',align: 'center',title: '更新人',visible: false},
{ title: '物料的不含税总价(美元)', {field: 'updateTime',align: 'center',title: '上次更新时间',visible: false},
field: 'materialNoUsdSum', {field: 'remark',align: 'center',title: '备注',visible: false},
align: 'center', {field: 'auditStatus',align: 'center',title: '审核状态',visible: false,
}, formatter: function(value, row, index) {return $.table.selectDictLabel(auditStatusDatas, value);}
{ 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', {title: '操作', align: 'center',
@ -394,34 +365,34 @@
}else{ }else{
rmb1 = $("#rmbTax_add").val(); rmb1 = $("#rmbTax_add").val();
} }
var rmb = Number(rmb1).toFixed(2) / 100; var rmb = parseFloat(rmb1);
var usd = $("#usdTax_add").val(); var usd = $("#usdTax_add").val();
if (usd =='' || usd== null){ if (usd =='' || usd== null){
usd = 0; usd = 0;
}else{ }else{
usd = Number(usd).toFixed(2); usd = parseFloat(usd);
} }
console.log(commonCurrency1); console.log(commonCurrency1);
if(commonCurrency1 == 1){ if(commonCurrency1 == 1){
row.materialNoRmb = Number(row.materialNoRmb).toFixed(2); row.materialNoRmb = parseFloat(row.materialNoRmb).toFixed(2);
row.materialRmb = Number(row.materialNoRmb * Number(1 + rmb)); row.materialRmb = parseFloat(row.materialNoRmb * parseFloat(1 + rmb)).toFixed(2);
row.materialNoRmbSum = Number(row.materialNum * Number(row.materialNoRmb)).toFixed(2); row.materialNoRmbSum = parseFloat(row.materialNum * parseFloat(row.materialNoRmb)).toFixed(2);
row.materialRmbSum = Number(row.materialRmb * row.materialNum).toFixed(2); row.materialRmbSum = parseFloat(row.materialRmb * row.materialNum).toFixed(2);
row.materialNoUsd = Number(row.materialNoRmb / usd).toFixed(2); row.materialNoUsd = parseFloat(row.materialNoRmb / usd).toFixed(2);
row.materialNoUsdSum = Number(row.materialNum * row.materialNoUsd).toFixed(2); row.materialNoUsdSum = parseFloat(row.materialNum * row.materialNoUsd).toFixed(2);
row.materialUsd = Number(row.materialNoUsd).toFixed(2) row.materialUsd = parseFloat(row.materialNoUsd).toFixed(2);
row.materialUsdSum = Number(row.materialNum * Number(row.materialUsd)).toFixed(2); row.materialUsdSum = parseFloat(row.materialNum * row.materialUsd).toFixed(2);
} }
else if( commonCurrency1 == 2){ else if( commonCurrency1 == 2){
row.materialNoUsd = Number(row.materialNoUsd).toFixed(2); row.materialNoUsd = parseFloat(row.materialNoUsd).toFixed(2);
row.materialUsd = Number(row.materialNoUsd).toFixed(2); row.materialUsd = parseFloat(row.materialNoUsd).toFixed(2);
row.materialUsdSum = Number(row.materialNum * row.materialUsd).toFixed(2); row.materialUsdSum = parseFloat(row.materialNum * row.materialUsd).toFixed(2);
row.materialNoUsdSum = Number(row.materialNoUsd * row.materialNum).toFixed(2); row.materialNoUsdSum = parseFloat(row.materialNoUsd * row.materialNum).toFixed(2);
row.materialNoRmb = Number(row.materialNoUsd * usd).toFixed(2); row.materialNoRmb = parseFloat(row.materialNoUsd * usd).toFixed(2);
row.materialRmb = Number(row.materialNoRmb * (1 + rmb)).toFixed(2); row.materialRmb = parseFloat(row.materialNoRmb * (1 + rmb)).toFixed(2);
row.materialNoRmbSum = Number(row.materialNoRmb * row.materialNum).toFixed(2); row.materialNoRmbSum = parseFloat(row.materialNoRmb * row.materialNum).toFixed(2);
row.materialRmbSum = Number(row.materialRmb * row.materialNum).toFixed(2); row.materialRmbSum = parseFloat(row.materialRmb * row.materialNum).toFixed(2);
} }
getTotalAmount() getTotalAmount()
}, },
@ -534,50 +505,66 @@
autoclose: true autoclose: true
}); });
//计算金额 //计算金额
function getTotalAmount(){ function getTotalAmount() {
// $("#addFinishbomTable").bootstrapTable('refresh'); // 获取表格数据
let getData = $("#bootstrap-sub-table-quoteChild").bootstrapTable('getData', true); const data = $("#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; const sums = {
let usd = 0;let noUsdSum = 0; let usdSum = 0; enterprise: "", // 用于拼接物料名称和数量
for(let i=0;i<getData.length;i++){ enterpriseSum: 0, // 物料总数量
enterprise += getData[i].materialName + ": 数量 :" + getData[i].materialNum +"; "; currencies: {
enterpriseSum += Number(getData[i].materialNum); noRmb: { total: 0, single: 0 }, // 非人民币数量与总金额
noRmb += Number(getData[i].materialNoRmb); rmb: { total: 0, single: 0 }, // 人民币
rmb += Number(getData[i].materialRmb) ; noUsd: { total: 0, single: 0 }, // 非美元
noRmbSum += Number(getData[i].materialNoRmbSum); usd: { total: 0, single: 0 } // 美元
rmbSum += Number(getData[i].materialRmbSum);
noUsd += Number(getData[i].materialNoUsd) ;
usd += Number(getData[i].materialUsd) ;
noUsdSum += Number(getData[i].materialNoUsdSum);
usdSum += Number(getData[i].materialUsdSum);
}
$("#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));
} }
};
// 遍历数据进行计算
for (let i = 0; i < data.length; i++) {
const item = data[i];
// 拼接物料信息
sums.enterprise += "" + item.materialName + ": 数量 : " + item.materialNum;
sums.enterpriseSum += parseFloat(item.materialNum); // 累加物料数量
// 分别累加各货币的单个金额和总金额
['noRmb', 'rmb', 'noUsd', 'usd'].forEach(currency => {
sums.currencies[currency].single += parseFloat(item['material' + [currency] ]);
sums.currencies[currency].total += parseFloat(item['material' + [currency] + 'Sum']);
});
}
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() { $(document).ready(function() {
// 监听货币选项变化 // 监听货币选项变化
$("#commonCurrency_add").on("change", function() { $("#commonCurrency_add").on("change", function() {
var isEditable = $(this).val() === "1"; var isEditable = $(this).val() === "1";
var fieldName = ""; var fieldName = "";
if (isEditable) { // if (isEditable) {
fieldName = "materialNoRmb"; // fieldName = "materialNoRmb";
$("#rmbTax_add").prop("disabled", false); // $("#rmbTax_add").prop("disabled", false);
$("#usdTax_add").prop("disabled", false); // $("#usdTax_add").prop("disabled", false);
} else { // } else {
fieldName = "materialNoUsd"; // fieldName = "materialNoUsd";
$("#rmbTax_add").prop("disabled", true); // $("#rmbTax_add").prop("disabled", true);
$("#usdTax_add").prop("disabled", true); // $("#usdTax_add").prop("disabled", true);
} // }
var materialColumnCells = $('#bootstrap-sub-table-quoteChild tbody tr td [field=" '+ fieldName+' "]'); var materialColumnCells = $('#bootstrap-sub-table-quoteChild tbody tr td [field=" '+ fieldName+' "]');
// 根据是否可编辑,添加或移除xEditable // 根据是否可编辑,添加或移除xEditable

94
ruoyi-admin/src/main/resources/templates/system/customerQuote/taskModifyApply.html

@ -268,12 +268,94 @@
return $.table.selectDictLabel(processMethodDatas, value); return $.table.selectDictLabel(processMethodDatas, value);
} }
}, },
{title: '国内税率',field: 'countTax',align: 'center',editable: true}, { title: '对外售价',field: 'materialSole',
{title: '美元汇率',field: 'usdTax', align: 'center',editable: true}, editable: {
{title: '对外售价',field: 'materialSole',editable: true}, type: 'number',
{title: '物料的数量',field: 'materialNum',align: 'center',editable: true}, mode: 'inline',
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',editable: commonCurrency==1?true:false}, title: '对外售价',
{title: '物料的不含税单价(美元)',field: 'materialNoUsd',align: 'center',editable: commonCurrency==2?true:false}, 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: 'materialRmb',align: 'center'},
{title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center'}, {title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center'},
{title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center'}, {title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center'},

94
ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwgzVerify.html

@ -271,12 +271,94 @@
return $.table.selectDictLabel(processMethodDatas, value); return $.table.selectDictLabel(processMethodDatas, value);
} }
}, },
{title: '国内税率',field: 'countTax',align: 'center',editable: true}, { title: '对外售价',field: 'materialSole',
{title: '美元汇率',field: 'usdTax', align: 'center',editable: true}, editable: {
{title: '对外售价',field: 'materialSole',editable: true}, type: 'number',
{title: '物料的数量',field: 'materialNum',align: 'center',editable: true}, mode: 'inline',
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',editable: commonCurrency==1?true:false}, title: '对外售价',
{title: '物料的不含税单价(美元)',field: 'materialNoUsd',align: 'center',editable: commonCurrency==2?true:false}, 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: 'materialRmb',align: 'center'},
{title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center'}, {title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center'},
{title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center'}, {title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center'},

18
ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwjlVerify.html

@ -406,15 +406,15 @@
let noUsdSum = 0;let usdSum = 0; let noUsdSum = 0;let usdSum = 0;
for(var i=0;i<getData.length;i++){ for(var i=0;i<getData.length;i++){
enterprise += getData[i].materialName + ": 数量 :" + getData[i].materialNum +"; "; enterprise += getData[i].materialName + ": 数量 :" + getData[i].materialNum +"; ";
enterpriseSum += Number(getData[i].materialNum); enterpriseSum += parseFloat(getData[i].materialNum);
noRmb += Number(getData[i].materialNoRmb); noRmb += parseFloat(getData[i].materialNoRmb);
rmb += Number(getData[i].materialRmb) ; rmb += parseFloat(getData[i].materialRmb) ;
noRmbSum += Number(getData[i].materialNoRmbSum); noRmbSum += parseFloat(getData[i].materialNoRmbSum);
rmbSum += Number(getData[i].materialRmbSum); rmbSum += parseFloat(getData[i].materialRmbSum);
noUsd += Number(getData[i].materialNoUsd) ; noUsd += parseFloat(getData[i].materialNoUsd) ;
usd += Number(getData[i].materialUsd) ; usd += parseFloat(getData[i].materialUsd) ;
noUsdSum += Number(getData[i].materialNoUsdSum); noUsdSum += parseFloat(getData[i].materialNoUsdSum);
usdSum += Number(getData[i].materialUsdSum); usdSum += parseFloat(getData[i].materialUsdSum);
} }
$("#enterprise_edit").val(enterprise); $("#enterprise_edit").val(enterprise);
$("#enterpriseSum_edit").val(enterpriseSum); $("#enterpriseSum_edit").val(enterpriseSum);

94
ruoyi-admin/src/main/resources/templates/system/customerQuote/taskZozjVerify.html

@ -267,12 +267,94 @@
return $.table.selectDictLabel(processMethodDatas, value); return $.table.selectDictLabel(processMethodDatas, value);
} }
}, },
{title: '国内税率',field: 'countTax',align: 'center',editable: true}, { title: '对外售价',field: 'materialSole',
{title: '美元汇率',field: 'usdTax', align: 'center',editable: true}, editable: {
{title: '对外售价',field: 'materialSole',editable: true}, type: 'number',
{title: '物料的数量',field: 'materialNum',align: 'center',editable: true}, mode: 'inline',
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center'}, title: '对外售价',
{title: '物料的不含税单价(美元)',field: 'materialNoUsd',align: 'center'}, 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: 'materialRmb',align: 'center'},
{title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center'}, {title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center'},
{title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center'}, {title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center'},

2
ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html

@ -89,6 +89,8 @@
restoreUrl: prefix + "/restore/{id}", restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
modalName: "请购单", modalName: "请购单",
pageSize: 5,
pageList: [5, 10, 25, 50],
columns: [ columns: [
{checkbox: true}, {checkbox: true},
{title: '请购单索引id',field: 'requisitioningId',visible: false}, {title: '请购单索引id',field: 'requisitioningId',visible: false},

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

@ -81,21 +81,21 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">客户名称:</label> <label class="col-sm-3 control-label">客户名称:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input required name="enterpriseName" class="form-control" type="text" readonly> <input name="enterpriseName" class="form-control" type="text" readonly>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">事业部:</label> <label class="col-sm-3 control-label">事业部:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input readonly name="customerPurser" class="form-control" type="text"> <input name="customerPurser" class="form-control" type="text" readonly>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">客户联系人:</label> <label class="col-sm-3 control-label">客户联系人:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="customerContact_add" name="customerContact" class="form-control m-b" required> <select id="customerContact_add" name="customerContact" class="form-control m-b">
</select> </select>
</div> </div>
</div> </div>
@ -108,32 +108,32 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label ">联系人电话:</label> <label class="col-sm-3 control-label ">联系人电话:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input readonly name="contactNumber" class="form-control" type="text" > <input name="contactNumber" class="form-control" type="text" readonly>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">联系人邮箱:</label> <label class="col-sm-3 control-label">联系人邮箱:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input readonly name="contactEmail" class="form-control" type="text" required> <input readonly name="contactEmail" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">客户收货人:</label> <label class="col-sm-3 control-label">客户收货人:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="customerDelivery" id="customerDelivery_add" class="form-control m-b" required> <select name="customerDelivery" id="customerDelivery_add" class="form-control m-b">
</select> </select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">收货人电话:</label> <label class="col-sm-3 control-label">收货人电话:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="deliveryPhone" class="form-control" type="text" required> <input name="deliveryPhone" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">收货地址:</label> <label class="col-sm-3 control-label">收货地址:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="deliveryAddress" class="form-control" type="text" required> <input name="deliveryAddress" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -358,34 +358,52 @@
} }
}, },
{ title: '对外售价',field: 'materialSole',editable: true}, { 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)', { title: '物料的不含税单价(RMB)',
field: 'materialNoRmb', field: 'materialNoRmb',
align: 'center', align: 'center',
editable: function(value, row, index) { editable: {
commonCurrency = $("#commonCurrency_add option:selected").val(); type: 'text',
if (commonCurrency == 1){ mode: 'inline', // 同样设定为行内编辑模式
return true; enabled: function() {
}else{ return ($("#commonCurrency_add").val() === '2'); // 当货币类型为2时启用
return false; },
options: {
placeholder: '请输入USD单价...',
maxlength: 10
} }
} }
}, },
{title: '物料的不含税单价(美元)', {title: '物料的不含税单价(美元)',
field: 'materialNoUsd', field: 'materialNoUsd',
align: 'center', align: 'center',
editable: function(value, row, index) { editable: {
commonCurrency = $("#commonCurrency_add option:selected").val(); type: 'text',
if (commonCurrency == 2){ mode: 'inline', // 同样设定为行内编辑模式
return true; enabled: function() {
}else{ return ($("#commonCurrency_add").val() === '2'); // 当货币类型为2时启用
return false; },
options: {
placeholder: '请输入USD单价...',
maxlength: 10
} }
} }
}, },

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

@ -229,10 +229,12 @@
removeUrl: prefix + "/remove", removeUrl: prefix + "/remove",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
detailUrl: prefix + "/detail/{id}", detailUrl: prefix + "/detail/{id}",
clickToSelect: true, pageSize: 5,
pageList: [5, 10, 25, 50],
modalName: "销售订单", modalName: "销售订单",
fixedColumns:true, fixedColumns:true,
fixedRightNumber:1, fixedRightNumber:1,
height: $(window).height() - 200,
columns: [ columns: [
{checkbox: true}, {checkbox: true},
{title: '订单id',field: 'salesOrderId',visible: false}, {title: '订单id',field: 'salesOrderId',visible: false},

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

@ -87,13 +87,13 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label ">联系人电话:</label> <label class="col-sm-3 control-label ">联系人电话:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input readonly name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text" > <input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text" readonly>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">联系人邮箱:</label> <label class="col-sm-3 control-label">联系人邮箱:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input readonly name="contactEmail" th:field="*{contactEmail}" class="form-control" type="text" required> <input name="contactEmail" th:field="*{contactEmail}" class="form-control" type="text" readonly>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -106,13 +106,13 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">收货人电话:</label> <label class="col-sm-3 control-label is-required">收货人电话:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input readonly name="deliveryPhone" th:field="*{deliveryPhone}" class="form-control" type="text" required> <input name="deliveryPhone" th:field="*{deliveryPhone}" class="form-control" type="text" readonly>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">收货地址:</label> <label class="col-sm-3 control-label">收货地址:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input readonly name="deliveryAddress" th:field="*{deliveryAddress}" class="form-control" type="text"> <input name="deliveryAddress" th:field="*{deliveryAddress}" class="form-control" type="text" readonly>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">

Loading…
Cancel
Save