Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev
liuxiaoxu 6 months ago
parent
commit
c79ff2ad2f
  1. 7
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseEvectionFormController.java
  2. 63
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSupplierController.java
  3. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEvectionFormService.java
  4. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseRequisitioningOrderService.java
  5. 4
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSupplierService.java
  6. 9
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEvectionFormServiceImpl.java
  7. 6
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseRequisitioningOrderServiceImpl.java
  8. 6
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSupplierServiceImpl.java
  9. 2
      ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialMapper.xml
  10. 4
      ruoyi-admin/src/main/resources/templates/erp/material/add.html
  11. 1
      ruoyi-admin/src/main/resources/templates/erp/material/material.html
  12. 4
      ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/add.html
  13. 2
      ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/baseEvectionForm.html
  14. 15
      ruoyi-admin/src/main/resources/templates/system/baseExpense/edit.html
  15. 225
      ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html
  16. 82
      ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html
  17. 94
      ruoyi-admin/src/main/resources/templates/system/customerQuote/detail.html
  18. 94
      ruoyi-admin/src/main/resources/templates/system/customerQuote/edit.html
  19. 94
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskModifyApply.html
  20. 94
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwgzVerify.html
  21. 18
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwjlVerify.html
  22. 94
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskZozjVerify.html
  23. 2
      ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html
  24. 68
      ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html
  25. 94
      ruoyi-admin/src/main/resources/templates/system/salesOrder/edit.html
  26. 4
      ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html
  27. 8
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskModifyApply.html

7
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)); return toAjax(baseEvectionFormService.restoreBaseEvectionFormById(id));
} }
@RequestMapping("/getId")
@ResponseBody
public AjaxResult getId()
{
return AjaxResult.success(baseEvectionFormService.getId());
}
} }

63
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)
{ {
startPage(); try {
List<SysSupplier> list = sysSupplierService.selectSysSupplierList(sysSupplier); startPage();
return getDataTable(list); 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);
}catch(NullPointerException e){
throw new NullPointerException("当前用户没有申请客户资料");
}
} }
/** /**

2
ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseEvectionFormService.java

@ -72,4 +72,6 @@ public interface IBaseEvectionFormService
* @return * @return
*/ */
int restoreBaseEvectionFormById(Long evectionId); int restoreBaseEvectionFormById(Long evectionId);
Object getId();
} }

2
ruoyi-admin/src/main/java/com/ruoyi/system/service/IBaseRequisitioningOrderService.java

@ -77,4 +77,6 @@ public interface IBaseRequisitioningOrderService
List<BaseRequisitioningOrder> selectBaseRequisitioningOrderByIds(String ids); List<BaseRequisitioningOrder> selectBaseRequisitioningOrderByIds(String ids);
Object getId();
} }

4
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSupplierService.java

@ -1,6 +1,7 @@
package com.ruoyi.system.service; package com.ruoyi.system.service;
import com.ruoyi.system.domain.SysSupplier; import com.ruoyi.system.domain.SysSupplier;
import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
@ -10,6 +11,7 @@ import java.util.List;
* @author ruoyi * @author ruoyi
* @date 2022-11-02 * @date 2022-11-02
*/ */
@Service("supplier")
public interface ISysSupplierService public interface ISysSupplierService
{ {
/** /**
@ -68,4 +70,6 @@ public interface ISysSupplierService
public List<SysSupplier> selectSysSupperWithMaterial(); public List<SysSupplier> selectSysSupperWithMaterial();
Object getId(); Object getId();
public List<SysSupplier> selectSysSupplierListAll();
} }

9
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseEvectionFormServiceImpl.java

@ -1,6 +1,8 @@
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import java.util.List; import java.util.List;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -22,6 +24,9 @@ public class BaseEvectionFormServiceImpl implements IBaseEvectionFormService
@Autowired @Autowired
private BaseEvectionFormMapper baseEvectionFormMapper; private BaseEvectionFormMapper baseEvectionFormMapper;
@Autowired
private RedisCache redisCache;
/** /**
* 查询出差单 * 查询出差单
* *
@ -123,4 +128,8 @@ public class BaseEvectionFormServiceImpl implements IBaseEvectionFormService
{ {
return baseEvectionFormMapper.restoreBaseEvectionFormById(evectionId); return baseEvectionFormMapper.restoreBaseEvectionFormById(evectionId);
} }
@Override
public Object getId() {
return redisCache.getCacheObject("CC");
}
} }

6
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.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.ruoyi.common.core.redis.RedisCache; 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.common.utils.ShiroUtils;
import com.ruoyi.system.domain.BaseRequisitioningOrderChild; import com.ruoyi.system.domain.BaseRequisitioningOrderChild;
import com.ruoyi.system.mapper.BaseRequisitioningOrderChildMapper; import com.ruoyi.system.mapper.BaseRequisitioningOrderChildMapper;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BaseRequisitioningOrderMapper; import com.ruoyi.system.mapper.BaseRequisitioningOrderMapper;
@ -206,4 +204,8 @@ public class BaseRequisitioningOrderServiceImpl implements IBaseRequisitioningOr
public List<BaseRequisitioningOrder> selectBaseRequisitioningOrderByIds(String ids){ public List<BaseRequisitioningOrder> selectBaseRequisitioningOrderByIds(String ids){
return baseRequisitioningOrderMapper.selectBaseRequisitioningOrderByIds(Convert.toStrArray(ids)); return baseRequisitioningOrderMapper.selectBaseRequisitioningOrderByIds(Convert.toStrArray(ids));
} }
@Override
public Object getId(){
return redisCache.generateBillNo("QG");
}
} }

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);
}
} }

2
ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialMapper.xml

@ -87,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> <where>
<if test="createBy != null and createBy != ''"> and erp.create_by = #{createBy}</if> <if test="createBy != null and createBy != ''"> and erp.create_by = #{createBy}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and erp.create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if> <if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and erp.create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test="params.materialNo != null and params.materialNo != ''"> and erp.material_no like concat('%', #{params.materialNo}, '%')</if> <if test="params.materialNo != null and params.materialNo != ''"> and erp.material_no like concat( #{params.materialNo}, '%')</if>
<if test="materialNo != null and materialNo != ''"> and erp.material_no like concat(#{materialNo}, '%')</if> <if test="materialNo != null and materialNo != ''"> and erp.material_no like concat(#{materialNo}, '%')</if>
<if test="bomNo != null and bomNo != ''"> and erp.bomNo = #{bomNo}</if> <if test="bomNo != null and bomNo != ''"> and erp.bomNo = #{bomNo}</if>
<if test="materialName != null and materialName != ''"> and erp.material_name like concat('%', #{materialName}, '%')</if> <if test="materialName != null and materialName != ''"> and erp.material_name like concat('%', #{materialName}, '%')</if>

4
ruoyi-admin/src/main/resources/templates/erp/material/add.html

@ -80,9 +80,9 @@
</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 name="warehouseDept" class="form-control m-b" th:with="type=${@dict.getType('warehouseDept')}" required> <select name="warehouseDept" class="form-control m-b" th:with="type=${@dict.getType('warehouseDept')}">
<option value=""></option> <option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>

1
ruoyi-admin/src/main/resources/templates/erp/material/material.html

@ -198,7 +198,6 @@
formatter: function(value, row, index) {return $.table.selectDictLabel(useStatusDatas, value);} formatter: function(value, row, index) {return $.table.selectDictLabel(useStatusDatas, value);}
}, },
{title: '工程员',field: 'businessMembers',visible: false}, {title: '工程员',field: 'businessMembers',visible: false},
{title: '工程员',field: 'createUserName',visible: false},
{title: '料号',field: 'materialNo',}, {title: '料号',field: 'materialNo',},
{title: '关联bom号',field: 'bomNo',}, {title: '关联bom号',field: 'bomNo',},
{title: '图片',field: 'photoUrl', {title: '图片',field: 'photoUrl',

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

@ -80,7 +80,7 @@
</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="travelMode" class="form-control" type="text"> <input name="travelMode" class="form-control" type="text">
@ -130,7 +130,7 @@
<div class="col-sm-8"> <div class="col-sm-8">
<input name="remark" class="form-control" type="text"> <input name="remark" class="form-control" type="text">
</div> </div>
</div> --> </div>
</form> </form>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />

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

@ -77,6 +77,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: 'evectionId',visible: false}, {title: '出差单索引id',field: 'evectionId',visible: false},

15
ruoyi-admin/src/main/resources/templates/system/baseExpense/edit.html

@ -107,7 +107,7 @@
$(function() { $(function() {
var options = { var options = {
id:'bootstrap-sub-table-expense', id:'bootstrap-sub-table-expense',
url:prefix + "/getChildList", url: ctx + "system/expenseChild/list",
queryParams: function(params) { queryParams: function(params) {
return { return {
quoteId: $("#expenseCode").val() quoteId: $("#expenseCode").val()
@ -116,6 +116,7 @@
pagination: false, pagination: false,
sidePagination: "client", sidePagination: "client",
model: "报销单数据", model: "报销单数据",
editable: true,
columns: [ columns: [
{checkbox: true}, {checkbox: true},
{title: '主键',field: 'index',visible: false, {title: '主键',field: 'index',visible: false,
@ -135,12 +136,12 @@
return getCostSmallType(value,row,index) return getCostSmallType(value,row,index)
} }
}, },
{title: '用途',field: 'purpose',editable:{type:'text',options:{maxlength:100}}}, {title: '用途',field: 'purpose',editable:{type:'text',mode:'inline'}},
{title: '金额',field: 'amounts',editable: {type:'text',options:{maxlength:100}}}, {title: '金额',field: 'amounts',editable: {type:'text',mode:'inline'}},
{title: '报销时间',field: 'expenseTime',editable:{type:'date'}}, {title: '报销时间',field: 'expenseTime',editable:{type:'date',mode:'inline',}},
{title: '出差单号',field: 'evectionCode',}, {title: '出差单号',field: 'evectionCode',editable: {type:'text',mode:'inline'}},
{title: '采购单号',field: 'purcahseCode',}, {title: '采购单号',field: 'purcahseCode',editable: {type:'text',mode:'inline',}},
{title: '委外单号',field: 'outsourceCode',}, {title: '委外单号',field: 'outsourceCode',editable: {type:'text',mode:'inline',}},
{title: '操作', align: 'center', {title: '操作', align: 'center',
formatter: function (value, row, index) { formatter: function (value, row, index) {
var actions = []; var actions = [];

225
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); for (let i = 0; i < data.length; i++) {
usdSum += Number(getData[i].materialUsdSum); 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']);
});
} }
$("#enterprise_add").val(enterprise); updateFormValues(sums);
$("#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));
} }
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

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

@ -117,73 +117,28 @@
restoreUrl: prefix + "/restore/{id}", restoreUrl: prefix + "/restore/{id}",
detailUrl: prefix + "/detail/{id}", detailUrl: prefix + "/detail/{id}",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
pageSize: 5,
pageList: [5, 10, 25, 50],
modalName: "客户报价表", modalName: "客户报价表",
fixedColumns:true, fixedColumns:true,
fixedRightNumber:1, fixedRightNumber:1,
columns: [ columns: [
{checkbox: true}, {checkbox: true},
{ {field: 'id',title: '主键ID',visible: false},
field: 'id', {field: 'instanceId',title: '流程实例ID',visible: false},
title: '主键ID' {field: 'submitInstanceId',title: '流程提交实例ID',visible: false },
}, {field: 'cancelInstanceId',title: '流程作废实例ID', visible: false},
{ {field: 'restoreInstanceId',title: '流程恢复实例ID',visible: false},
field: 'instanceId', {field: 'instanceTypeName',title: '流程实例类型',visible: false},
title: '流程实例ID', {field: 'applyUser',title: '申请人ID', visible: false},
visible: false {field: 'applyUserName', title: '<span style="color: red;">申请人</span>',
}, formatter: function(value, row, index) {return '<span style="color: red;">' + (value ? value : "-") + '</span>'; }
{
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: '<span style="color: red;">申请人</span>',
formatter: function(value, row, index) {
return '<span style="color: red;">' + (value ? value : "-") + '</span>';
}
},
{
field: 'applyTime',
title: '申请时间'
},
{
field: 'taskId',
title: '当前任务ID',
visible: false
}, },
{ {field: 'applyTime',title: '申请时间'},
field: 'todoUserId', {field: 'taskId', title: '当前任务ID',visible: false},
title: '待办用户ID', {field: 'todoUserId',title: '待办用户ID',visible: false},
visible: false {field: 'taskName',title: '当前任务名称',align: 'center',
}, formatter: function(value, row, index) { return '<span class="badge badge-primary">' + value + '</span>'; }
{
field: 'taskName',
title: '当前任务名称',
align: 'center',
formatter: function(value, row, index) {
return '<span class="badge badge-primary">' + value + '</span>';
}
}, },
{ title: '审核状态',field: 'auditStatus', { title: '审核状态',field: 'auditStatus',
formatter: function (value, row, index) { return $.table.selectDictLabel(auditStatusDatas, value);} formatter: function (value, row, index) { return $.table.selectDictLabel(auditStatusDatas, value);}
@ -198,9 +153,8 @@
{title: '物料合计',field: 'enterprise'}, {title: '物料合计',field: 'enterprise'},
{title: '数量合计',field: 'enterpriseSum'}, {title: '数量合计',field: 'enterpriseSum'},
{title: '报价币种',field: 'commonCurrency', {title: '报价币种',field: 'commonCurrency',
formatter: function (value, row, index) { formatter: function (value, row, index) {return $.table.selectDictLabel(currencyDatas, value);}
return $.table.selectDictLabel(currencyDatas, value); },
}},
{title: '国内汇率',field: 'rmbTax'}, {title: '国内汇率',field: 'rmbTax'},
{title: '美元汇率',field: 'usdTax'}, {title: '美元汇率',field: 'usdTax'},
{title: '不含税总价(RMB)',field: 'noRmbSum'}, {title: '不含税总价(RMB)',field: 'noRmbSum'},

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

@ -214,12 +214,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'},

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

@ -232,12 +232,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/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
} }
} }
}, },

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

@ -137,15 +137,15 @@
</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 name="deliveryPhone" th:field="*{deliveryPhone}" class="form-control" type="text" disabled/> <input name="deliveryPhone" th:field="*{deliveryPhone}" class="form-control" type="text" disabled/>
</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 name="deliveryAddress" th:field="*{deliveryAddress}" class="form-control" type="text" required disabled> <input name="deliveryAddress" th:field="*{deliveryAddress}" class="form-control" type="text" disabled>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -374,31 +374,81 @@
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: {
{ title: '美元汇率',field: 'usdTax', align: 'center',editable: true}, type: 'text',
{field: 'materialNum',align: 'center',title: '物料的数量',editable: true}, mode: 'inline', // 设定为行内编辑模式
{ title: '物料的不含税单价(RMB)', options: {
field: 'materialNoRmb', placeholder: '请输入对外售价...',
align: 'center', maxlength: 10
editable: function(value, row, index) { }
var commonCurrency3 = $("#commonCurrency_edit option:selected").val(); }
if (commonCurrency3 == 1){ },
return true; {title: '国内税率',field: 'countTax',align: 'center',
}else{ editable: {
return false; 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: '物料的不含税单价(美元)', {title: '物料的不含税单价(美元)',
field: 'materialNoUsd', field: 'materialNoUsd',
align: 'center', align: 'center',
editable: function(value, row, index) { editable: {
var commonCurrency2= $("#commonCurrency_edit option:selected").val(); type: 'text',
if (commonCurrency2 == 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