Browse Source

[fix]销售审核修改

dev
zhangsiqi 7 months ago
parent
commit
c74fa3a583
  1. 30
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java
  2. 4
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesOrderMapper.java
  3. 12
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderServiceImpl.java
  4. 9
      ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderMapper.xml
  5. 136
      ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html
  6. 86
      ruoyi-admin/src/main/resources/templates/system/salesOrder/detail.html
  7. 86
      ruoyi-admin/src/main/resources/templates/system/salesOrder/edit.html
  8. 20
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskModifyApply.html
  9. 86
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwjlVerify.html
  10. 86
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwzgVerify.html
  11. 86
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskZozjVerify.html

30
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java

@ -10,6 +10,7 @@ import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
@ -25,9 +26,7 @@ import com.ruoyi.system.domain.SysSalesOrder;
import com.ruoyi.system.domain.SysSalesOrderVo;
import com.ruoyi.system.domain.exportDto.SysSalesFinishDto;
import com.ruoyi.system.domain.exportDto.SysSalesOrderDto;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysSalesFinishService;
import com.ruoyi.system.service.ISysSalesOrderService;
import com.ruoyi.system.service.*;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.runtime.ProcessInstance;
@ -80,6 +79,9 @@ public class SysSalesOrderController extends BaseController
@Autowired
private IProcessService processService;
@Autowired
private ISysUserService sysUserService;
@RequiresPermissions("system:salesOrder:view")
@GetMapping()
public String salesOrder(ModelMap mmap)
@ -98,13 +100,33 @@ public class SysSalesOrderController extends BaseController
{
SysUser curUser = ShiroUtils.getSysUser();
Long userId = curUser.getUserId();
List<SysSalesOrderVo> list1 = new ArrayList<>();
Set<String> roleKeys = roleService.selectRoleKeys(userId);
SysUser sysUser = new SysUser();
List<SysUser> sysUserList = sysUserService.selectUserList(sysUser);
// 业务员角色只能看到自己创建的数据
if(roleKeys.contains("ywyRole")){
sysSalesOrderVo.setCreateBy(curUser.getLoginName());
sysSalesOrderVo.setApplyUser(curUser.getLoginName());startPage();
List<SysSalesOrderVo> list = sysSalesOrderService.selectSysSalesOrderList(sysSalesOrderVo);
return getDataTable(list);
}
if (roleKeys.contains("ywjlRole")){
startPage();
List<SysSalesOrderVo> list = sysSalesOrderService.selectSysSalesOrderList(sysSalesOrderVo);
list.stream().filter(item -> !Objects.equals(item.getCreateBy(), "admin")
&& !Objects.equals(item.getCreateBy(), "yfzj") && Objects.equals(item.getCreateBy(), "ywzg"));
return getDataTable(list);
}
if (roleKeys.contains("ywgzRole")){
startPage();
List<SysSalesOrderVo> list = sysSalesOrderService.selectSysSalesOrderList(sysSalesOrderVo);
list.stream().filter(item -> !Objects.equals(item.getCreateBy(), "admin") && !Objects.equals(item.getCreateBy(), "yfzj")
&& Objects.equals(item.getCreateBy(), "ywjl"));
return getDataTable(list);
}
startPage();
List<SysSalesOrderVo> list = sysSalesOrderService.selectSysSalesOrderList(sysSalesOrderVo);
return getDataTable(list);
}

4
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesOrderMapper.java

@ -25,10 +25,10 @@ public interface SysSalesOrderMapper
/**
* 查询销售订单列表
*
* @param sysSalesOrder 销售订单
* @param sysSalesOrderVo 销售订单
* @return 销售订单集合
*/
public List<SysSalesOrderVo> selectSysSalesOrderList(SysSalesOrder sysSalesOrder);
public List<SysSalesOrderVo> selectSysSalesOrderList(SysSalesOrderVo sysSalesOrderVo);
/**
* 新增销售订单

12
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderServiceImpl.java

@ -172,7 +172,6 @@ public class SysSalesOrderServiceImpl implements ISysSalesOrderService
sysSalesOrder.setCreateBy(loginName);
sysSalesOrder.setCreateTime(DateUtils.getNowDate());
sysSalesOrder.setApplyUser(loginName);
sysSalesOrder.setApplyTime(DateUtils.getNowDate());
int result = sysSalesOrderMapper.insertSysSalesOrder(sysSalesOrder);
sysSalesOrder.getSalesOrderId();
int s = sysSalesOrder.getSysSalesOrderChildList().size();
@ -198,8 +197,15 @@ public class SysSalesOrderServiceImpl implements ISysSalesOrderService
@Override
public int updateSysSalesOrder(SysSalesOrder sysSalesOrder)
{
SysUser user = userMapper.selectUserByLoginName(sysSalesOrder.getApplyUser());
String loginName = ShiroUtils.getLoginName();
sysSalesOrder.setUpdateBy(loginName);
sysSalesOrder.setUpdateTime(DateUtils.getNowDate());
// 存在提交完就流程结束的情况
List<SysSalesOrderChild> sysSalesOrderChildList = sysSalesOrder.getSysSalesOrderChildList();
if (sysSalesOrderChildList.isEmpty()){
return 0;
}else{
for (SysSalesOrderChild sysSalesOrderChild:sysSalesOrderChildList) {
if (sysSalesOrderChild.getId() != null && sysSalesOrderChild.getId() != 0){
sysSalesOrderChildService.updateSysSalesOrderChild(sysSalesOrderChild);
@ -208,6 +214,7 @@ public class SysSalesOrderServiceImpl implements ISysSalesOrderService
sysSalesOrderChildService.insertSysSalesOrderChild(sysSalesOrderChild);
}
}
}
int result = sysSalesOrderMapper.updateSysSalesOrder(sysSalesOrder);
return result;
}
@ -256,6 +263,7 @@ public class SysSalesOrderServiceImpl implements ISysSalesOrderService
String processInstanceId = processInstance.getProcessInstanceId();
// 作废实例id
sysSalesOrder.setCancelInstanceId(processInstanceId);
sysSalesOrder.setInstanceId(processInstanceId);
// 存在提交完就流程结束的情况
boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId);
if(processIsFinish){
@ -284,6 +292,7 @@ public class SysSalesOrderServiceImpl implements ISysSalesOrderService
String processInstanceId = processInstance.getProcessInstanceId();
// 恢复实例id
sysSalesOrder.setRestoreInstanceId(processInstanceId);
sysSalesOrder.setInstanceId(processInstanceId);
// 存在提交完就流程结束的情况
boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId);
if(processIsFinish){
@ -317,6 +326,7 @@ public class SysSalesOrderServiceImpl implements ISysSalesOrderService
String processInstanceId = processInstance.getProcessInstanceId();
// 提交实例id
sysSalesOrder.setSubmitInstanceId(processInstanceId);
sysSalesOrder.setInstanceId(processInstanceId);
// 存在提交完就流程结束的情况
boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId);
if(processIsFinish){

9
ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderMapper.xml

@ -107,6 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) as p
on s.instance_type = p.dict_value
<where>
<if test="createBy != null and createBy !=''"> and s.create_by = #{createBy}</if>
<if test="salesOrderCode != null and salesOrderCode != ''"> and s.sales_order_code like concat('%', #{salesOrderCode}, '%')</if>
<if test="salesOrderNumber != null and salesOrderNumber != ''"> and s.sales_order_number like concat('%', #{salesOrderNumber}, '%')</if>
<if test="enterpriseCode != null and enterpriseCode != ''"> and s.enterprise_code like concat('%', #{enterpriseCode}, '%')</if>
@ -125,6 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyTime != null and applyTime != ''"> and s.apply_time = #{applyTime}</if>
<if test="applyTitle != null and applyTitle != ''"> and s.apply_title = #{applyTitle}</if>
</where>
order by s.apply_time desc
</select>
<select id="selectSysSalesOrderById" parameterType="Long" resultMap="SysSalesOrderResult">
@ -195,7 +197,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyUser != null">apply_user,</if>
<if test="applyTime != null">apply_time,</if>
<if test="applyTitle != null">apply_title,</if>
<if test="createTime!= null and createTime != ''">create_time,</if>
<if test="createTime!= null">create_time,</if>
first_add_time,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@ -255,7 +257,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyUser != null">#{applyUser},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="applyTitle != null">#{applyTitle},</if>
<if test="createTime!= null and createTime != ''">#{createTime},</if>
<if test="createTime!= null">#{createTime},</if>
now()
</trim>
</insert>
@ -320,7 +322,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyUser != null">apply_user = #{applyUser},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="applyTitle != null">apply_title = #{applyTitle},</if>
update_time = now()
<if test="updateTime != null">update_time = #{updateTime},</if>
update_info_time = now()
</trim>
where sales_order_id = #{salesOrderId}
</update>

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

@ -494,6 +494,41 @@
},
};
$.table.init(options);
//获取单号
$.ajax({
url: prefix + "/getId",
type: "post",
dateType: "json",
success: function (resp) {
if (resp.code === 0) {
$("input[name='salesOrderCode']").val(resp.data);
} else {
$.modal.msgError("失败啦");
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
$.ajax({
url: ctx + 'system/user/list',
type: 'post',
data:{
userName: '业务'
},
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("#businessMembers_add").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
$("#businessMembers_add").val(userName).trigger("change");
} else {
$.modal.msgError(res.msg);
}
}
});
});
//获取客户信息
$(function(){
@ -621,43 +656,7 @@
$("input[name='deliveryPhone']").val(data1.customerPhone);
$("input[name='deliveryAddress']").val(data1.deliveryAddress);
});
//获取单号
$.ajax({
url: prefix + "/getId",
type: "post",
dateType: "json",
success: function (resp) {
if (resp.code === 0) {
$("input[name='salesOrderCode']").val(resp.data);
} else {
$.modal.msgError("失败啦");
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
/*业务员列表*/
$.ajax({
url: ctx + 'system/user/list',
type: 'post',
data:{
userName: '业务'
},
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("#businessMembers_add").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
$("#businessMembers_add").val(userName).trigger("change");
} else {
$.modal.msgError(res.msg);
}
}
});
//获取单号
$("#form-salesOrder-add").validate({
focusCleanup: true
@ -727,40 +726,41 @@
function getTotalAmount(){
// $("#addFinishbomTable").bootstrapTable('refresh');
let getData = $("#bootstrap-sub-table-order").bootstrapTable('getData');
let enterprise = Number(0);let enterpriseSum = Number(0).toFixed(0); let noRmb = Number(0).toFixed(0);
let rmb = Number(0).toFixed(2);let noRmbSum =Number(0).toFixed(2);let rmbSum = Number(0).toFixed(2);let noUsd = Number(0).toFixed(2);
let usd = Number(0).toFixed(2);let noUsdSum = Number(0).toFixed(2); let usdSum = Number(0).toFixed(2);
$("#enterprise_add").val(0);
$("#enterpriseSum_add").val(0);
$("#noRmb_add").val(0);
$("#rmb_add").val(0);
$("#noRmbSum_add").val(0);
$("#rmbTax_add").val(0);
$("#noUsd_add").val(0);
$("#usd_add").val(0);
$("#noUsdSum_add").val(0);
let enterprise = 0;let enterpriseSum = 0; let noRmb = 0;
let rmb = 0;let noRmbSum =0;let rmbSum = 0;
let noUsd = 0;let usd = 0;let noUsdSum =0; let usdSum = 0;
$("input[name='materialSum']").val(0);
$("input[name='enterpriseSum']").val(0);
$("input[name='noRmbPrice']").val(0);
$("input[name='noRmbSum']").val(0);
$("input[name='rmbPrice']").val(0);
$("input[name='rmbTaxSum']").val(0);
$("input[name='noUsdPrice']").val(0);
$("input[name='noUsdSum']").val(0);
$("input[name='usdPrice']").val(0);
$("input[name='usdTaxSum']").val(0);
for(let i=0;i<getData.length;i++){
enterprise += 1;
enterpriseSum = Number(enterprise + getData[i].materialNum).toFixed(0);
noRmb = Number(noRmb + getData[i].materialNoRmb).toFixed(2);
rmb = Number(rmb + getData[i].materialRmb).toFixed(2) ;
noRmbSum = Number(noRmbSum + getData[i].materialNoRmbSum).toFixed(2);
rmbSum = Number(rmbSum + getData[i].materialRmbSum).toFixed(2);
noUsd = Number(noUsd + getData[i].materialNoUsd).toFixed(2) ;
usd = Number(usd + getData[i].materialUsd).toFixed(2) ;
noUsdSum = Number(noUsdSum + getData[i].materialNoUsdSum).toFixed(2);
usdSum = Number(usdSum + getData[i].materialUsdSum).toFixed(2);
}
$("#enterprise_add").val(enterprise);
$("#enterpriseSum_add").val(enterpriseSum);
$("#noRmb_add").val(noRmb);
$("#rmb_add").val(rmb);
$("#noRmbSum_add").val(noRmbSum);
$("#rmbTax_add").val(rmbSum);
$("#noUsd_add").val(noUsd);
$("#usd_add").val(usd);
$("#noUsdSum_add").val(noUsdSum);
$("#usdSum_add").val(usdSum);
enterpriseSum = parseInt(enterprise + getData[i].materialNum);
noRmb = parseFloat(noRmb + getData[i].materialNoRmb).toFixed(2);
rmb = parseFloat(rmb + getData[i].materialRmb).toFixed(2) ;
noRmbSum = parseFloat(noRmbSum + getData[i].materialNoRmbSum).toFixed(2);
rmbSum = parseFloat(rmbSum + getData[i].materialRmbSum).toFixed(2);
noUsd = parseFloat(noUsd + getData[i].materialNoUsd).toFixed(2) ;
usd = parseFloat(usd + getData[i].materialUsd).toFixed(2) ;
noUsdSum = parseFloat(noUsdSum + getData[i].materialNoUsdSum).toFixed(2);
usdSum = parseFloat(usdSum + getData[i].materialUsdSum).toFixed(2);
}
$("input[name='materialSum']").val(enterprise);
$("input[name='enterpriseSum']").val(enterpriseSum);
$("input[name='noRmbPrice']").val(noRmb);
$("input[name='noRmbSum']").val(noRmbSum);
$("input[name='rmbPrice']").val(rmb);
$("input[name='rmbTaxSum']").val(rmbSum);
$("input[name='noUsdPrice']").val(noUsd);
$("input[name='noUsdSum']").val(noUsdSum);
$("input[name='usdPrice']").val(usd);
$("input[name='usdTaxSum']").val(usdSum);
}
$("input[name='pricingDate']").datetimepicker({
format: "yyyy-mm-dd",

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

@ -681,42 +681,64 @@
}
//计算
function getTotalAmount(){
let getData = $("#bootstrap-sub-table-editOrder").bootstrapTable('getData');
// $("#addFinishbomTable").bootstrapTable('refresh');
let getData = $("#bootstrap-sub-table-order").bootstrapTable('getData');
let enterprise = 0;let enterpriseSum = 0; let noRmb = 0;
let rmb = 0;let noRmbSum = 0;let rmbSum = 0;let noUsd = 0;
let usd = 0;let noUsdSum = 0; let usdSum = 0;
$("#enterprise_edit").val(0);
$("#enterpriseSum_edit").val(0);
$("#noRmb_edit").val(0);
$("#rmb_edit").val(0);
$("#noRmbSum_edit").val(0);
$("#rmbTax_edit").val(0);
$("#noUsd_edit").val(0);
$("#usd_edit").val(0);
$("#noUsdSum_edit").val(0);
let rmb = 0;let noRmbSum =0;let rmbSum = 0;
let noUsd = 0;let usd = 0;let noUsdSum =0; let usdSum = 0;
$("input[name='materialSum']").val(0);
$("input[name='enterpriseSum']").val(0);
$("input[name='noRmbPrice']").val(0);
$("input[name='noRmbSum']").val(0);
$("input[name='rmbPrice']").val(0);
$("input[name='rmbTaxSum']").val(0);
$("input[name='noUsdPrice']").val(0);
$("input[name='noUsdSum']").val(0);
$("input[name='usdPrice']").val(0);
$("input[name='usdTaxSum']").val(0);
for(let i=0;i<getData.length;i++){
enterprise += 1;
enterpriseSum = Number(enterprise + getData[i].materialNum).toFixed(0);
noRmb = Number(noRmb + getData[i].materialNoRmb).toFixed(2);
rmb = Number(rmb + getData[i].materialRmb).toFixed(2) ;
noRmbSum = Number(noRmbSum + getData[i].materialNoRmbSum).toFixed(2);
rmbSum = Number(rmbSum + getData[i].materialRmbSum).toFixed(2);
noUsd = Number(noUsd + getData[i].materialNoUsd).toFixed(2) ;
usd = Number(usd + getData[i].materialUsd).toFixed(2) ;
noUsdSum = Number(noUsdSum + getData[i].materialNoUsdSum).toFixed(2);
usdSum = Number(usdSum + getData[i].materialUsdSum).toFixed(2);
}
$("#enterprise_edit").val(enterprise);
$("#enterpriseSum_edit").val(Number(enterpriseSum).toFixed(2));
$("#noRmb_edit").val(Number(noRmb).toFixed(2));
$("#rmb_edit").val(Number(rmb).toFixed(2));
$("#noRmbSum_edit").val(Number(noRmbSum).toFixed(2));
$("#rmbTax_edit").val(Number(rmbSum).toFixed(2));
$("#noUsd_edit").val(Number(noUsd).toFixed(2));
$("#usd_edit").val(Number(usd).toFixed(2));
$("#noUsdSum_edit").val(Number(noUsdSum).toFixed(2));
$("#usdSum_edit").val(Number(usdSum).toFixed(2));
enterpriseSum = parseInt(enterprise + getData[i].materialNum);
noRmb = parseFloat(noRmb + getData[i].materialNoRmb).toFixed(2);
rmb = parseFloat(rmb + getData[i].materialRmb).toFixed(2) ;
noRmbSum = parseFloat(noRmbSum + getData[i].materialNoRmbSum).toFixed(2);
rmbSum = parseFloat(rmbSum + getData[i].materialRmbSum).toFixed(2);
noUsd = parseFloat(noUsd + getData[i].materialNoUsd).toFixed(2) ;
usd = parseFloat(usd + getData[i].materialUsd).toFixed(2) ;
noUsdSum = parseFloat(noUsdSum + getData[i].materialNoUsdSum).toFixed(2);
usdSum = parseFloat(usdSum + getData[i].materialUsdSum).toFixed(2);
}
$("input[name='materialSum']").val(enterprise);
$("input[name='enterpriseSum']").val(enterpriseSum);
$("input[name='noRmbPrice']").val(noRmb);
$("input[name='noRmbSum']").val(noRmbSum);
$("input[name='rmbPrice']").val(rmb);
$("input[name='rmbTaxSum']").val(rmbSum);
$("input[name='noUsdPrice']").val(noUsd);
$("input[name='noUsdSum']").val(noUsdSum);
$("input[name='usdPrice']").val(usd);
$("input[name='usdTaxSum']").val(usdSum);
}
$("input[name='pricingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='deliveryTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='orderReceivingTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='modificationTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
// 结算金额
</script>
</body>

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

@ -678,42 +678,64 @@
}
//计算
function getTotalAmount(){
let getData = $("#bootstrap-sub-table-editOrder").bootstrapTable('getData');
// $("#addFinishbomTable").bootstrapTable('refresh');
let getData = $("#bootstrap-sub-table-order").bootstrapTable('getData');
let enterprise = 0;let enterpriseSum = 0; let noRmb = 0;
let rmb = 0;let noRmbSum = 0;let rmbSum = 0;let noUsd = 0;
let usd = 0;let noUsdSum = 0; let usdSum = 0;
$("#enterprise_edit").val(0);
$("#enterpriseSum_edit").val(0);
$("#noRmb_edit").val(0);
$("#rmb_edit").val(0);
$("#noRmbSum_edit").val(0);
$("#rmbTax_edit").val(0);
$("#noUsd_edit").val(0);
$("#usd_edit").val(0);
$("#noUsdSum_edit").val(0);
let rmb = 0;let noRmbSum =0;let rmbSum = 0;
let noUsd = 0;let usd = 0;let noUsdSum =0; let usdSum = 0;
$("input[name='materialSum']").val(0);
$("input[name='enterpriseSum']").val(0);
$("input[name='noRmbPrice']").val(0);
$("input[name='noRmbSum']").val(0);
$("input[name='rmbPrice']").val(0);
$("input[name='rmbTaxSum']").val(0);
$("input[name='noUsdPrice']").val(0);
$("input[name='noUsdSum']").val(0);
$("input[name='usdPrice']").val(0);
$("input[name='usdTaxSum']").val(0);
for(let i=0;i<getData.length;i++){
enterprise += 1;
enterpriseSum = Number(enterprise + getData[i].materialNum).toFixed(0);
noRmb = Number(noRmb + getData[i].materialNoRmb).toFixed(2);
rmb = Number(rmb + getData[i].materialRmb).toFixed(2) ;
noRmbSum = Number(noRmbSum + getData[i].materialNoRmbSum).toFixed(2);
rmbSum = Number(rmbSum + getData[i].materialRmbSum).toFixed(2);
noUsd = Number(noUsd + getData[i].materialNoUsd).toFixed(2) ;
usd = Number(usd + getData[i].materialUsd).toFixed(2) ;
noUsdSum = Number(noUsdSum + getData[i].materialNoUsdSum).toFixed(2);
usdSum = Number(usdSum + getData[i].materialUsdSum).toFixed(2);
}
$("#enterprise_edit").val(enterprise);
$("#enterpriseSum_edit").val(Number(enterpriseSum).toFixed(2));
$("#noRmb_edit").val(Number(noRmb).toFixed(2));
$("#rmb_edit").val(Number(rmb).toFixed(2));
$("#noRmbSum_edit").val(Number(noRmbSum).toFixed(2));
$("#rmbTax_edit").val(Number(rmbSum).toFixed(2));
$("#noUsd_edit").val(Number(noUsd).toFixed(2));
$("#usd_edit").val(Number(usd).toFixed(2));
$("#noUsdSum_edit").val(Number(noUsdSum).toFixed(2));
$("#usdSum_edit").val(Number(usdSum).toFixed(2));
enterpriseSum = parseInt(enterprise + getData[i].materialNum);
noRmb = parseFloat(noRmb + getData[i].materialNoRmb).toFixed(2);
rmb = parseFloat(rmb + getData[i].materialRmb).toFixed(2) ;
noRmbSum = parseFloat(noRmbSum + getData[i].materialNoRmbSum).toFixed(2);
rmbSum = parseFloat(rmbSum + getData[i].materialRmbSum).toFixed(2);
noUsd = parseFloat(noUsd + getData[i].materialNoUsd).toFixed(2) ;
usd = parseFloat(usd + getData[i].materialUsd).toFixed(2) ;
noUsdSum = parseFloat(noUsdSum + getData[i].materialNoUsdSum).toFixed(2);
usdSum = parseFloat(usdSum + getData[i].materialUsdSum).toFixed(2);
}
$("input[name='materialSum']").val(enterprise);
$("input[name='enterpriseSum']").val(enterpriseSum);
$("input[name='noRmbPrice']").val(noRmb);
$("input[name='noRmbSum']").val(noRmbSum);
$("input[name='rmbPrice']").val(rmb);
$("input[name='rmbTaxSum']").val(rmbSum);
$("input[name='noUsdPrice']").val(noUsd);
$("input[name='noUsdSum']").val(noUsdSum);
$("input[name='usdPrice']").val(usd);
$("input[name='usdTaxSum']").val(usdSum);
}
$("input[name='pricingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='deliveryTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='orderReceivingTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='modificationTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
// 结算金额
</script>
</body>

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

@ -241,20 +241,20 @@
<div class="container">
<h4 class="form-header h4">计算</h4>
<div class="col-xs-12 form-row">
<label class=" col-sm-2">物料合计:</label><input class="col-sm-2" name="materialSum" id="enterprise_edit" type="text" readonly/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-2" name="enterpriseSum" id="enterpriseSum_edit" type="number" readonly/>
<label class=" col-sm-2">物料合计:</label><input class="col-sm-2" name="materialSum" th:field="*{materialSum}" id="enterprise_edit" type="text" readonly/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-2" name="enterpriseSum" th:field="*{enterpriseSum}" id="enterpriseSum_edit" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价:</label><input placeholder="RMB" class="col-sm-3" name="noRmbPrice" id="noRmb_edit" type="number" readonly/>
<label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-3" name="noRmbSum" id="noRmbSum_edit" type="number" readonly/>
<label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-3" name="rmbPrice" id="rmb_edit" type="number" readonly/>
<label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-3" name="rmbTaxSum" id="_edit" type="number" readonly/>
<label class="col-sm-2"> 不含税单价:</label><input placeholder="RMB" class="col-sm-3" name="noRmbPrice" th:field="*{noRmbPrice}" id="noRmb_edit" type="number" readonly/>
<label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-3" name="noRmbSum" th:field="*{noRmbTaxSum}" id="noRmbSum_edit" type="number" readonly/>
<label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-3" name="rmbPrice" th:field="*{rmbPrice}" id="rmb_edit" type="number" readonly/>
<label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-3" name="rmbTaxSum" th:field="*{rmbTaxSum}" id="_edit" type="number" readonly/>
</div>
<div class="col-xs-12">
<label class="col-sm-2">不含税单价:</label><input placeholder="美元" class="col-sm-3" name="noUsdPrice" id="noUsd_edit" type="number" readonly/>
<label class="col-sm-2">不含税总价:</label><input placeholder="美元" class="col-sm-3" name="noUsdSum" id="noUsdSum_edit" type="number"readonly/>
<label class="col-sm-2">含税单价:</label><input placeholder="美元" class="col-sm-3" name="usdPrice" id="usd_edit" type="number" readonly/>
<label class="col-sm-2">含税总价:</label><input placeholder="美元" class="col-sm-3" name="usdTaxSum" id="usdSum_edit" type="number"readonly/>
<label class="col-sm-2">不含税单价:</label><input placeholder="美元" class="col-sm-3" name="noUsdPrice" th:field="*{noUsdPrice}" id="noUsd_edit" type="number" readonly/>
<label class="col-sm-2">不含税总价:</label><input placeholder="美元" class="col-sm-3" name="noUsdSum" th:field="*{noUsdTaxSum}" id="noUsdSum_edit" type="number"readonly/>
<label class="col-sm-2">含税单价:</label><input placeholder="美元" class="col-sm-3" name="usdPrice" th:field="*{usdPrice}" id="usd_edit" type="number" readonly/>
<label class="col-sm-2">含税总价:</label><input placeholder="美元" class="col-sm-3" name="usdTaxSum" th:field="*{usdTaxSum}" id="usdSum_edit" type="number"readonly/>
</div>
</div>
</form>

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

@ -647,42 +647,64 @@
});
//计算
function getTotalAmount(){
let getData = $("#bootstrap-sub-table-editOrder").bootstrapTable('getData');
// $("#addFinishbomTable").bootstrapTable('refresh');
let getData = $("#bootstrap-sub-table-order").bootstrapTable('getData');
let enterprise = 0;let enterpriseSum = 0; let noRmb = 0;
let rmb = 0;let noRmbSum = 0;let rmbSum = 0;let noUsd = 0;
let usd = 0;let noUsdSum = 0; let usdSum = 0;
$("#enterprise_edit").val(0);
$("#enterpriseSum_edit").val(0);
$("#noRmb_edit").val(0);
$("#rmb_edit").val(0);
$("#noRmbSum_edit").val(0);
$("#rmbTax_edit").val(0);
$("#noUsd_edit").val(0);
$("#usd_edit").val(0);
$("#noUsdSum_edit").val(0);
let rmb = 0;let noRmbSum =0;let rmbSum = 0;
let noUsd = 0;let usd = 0;let noUsdSum =0; let usdSum = 0;
$("input[name='materialSum']").val(0);
$("input[name='enterpriseSum']").val(0);
$("input[name='noRmbPrice']").val(0);
$("input[name='noRmbSum']").val(0);
$("input[name='rmbPrice']").val(0);
$("input[name='rmbTaxSum']").val(0);
$("input[name='noUsdPrice']").val(0);
$("input[name='noUsdSum']").val(0);
$("input[name='usdPrice']").val(0);
$("input[name='usdTaxSum']").val(0);
for(let i=0;i<getData.length;i++){
enterprise += 1;
enterpriseSum = Number(enterprise + getData[i].materialNum).toFixed(0);
noRmb = Number(noRmb + getData[i].materialNoRmb).toFixed(2);
rmb = Number(rmb + getData[i].materialRmb).toFixed(2) ;
noRmbSum = Number(noRmbSum + getData[i].materialNoRmbSum).toFixed(2);
rmbSum = Number(rmbSum + getData[i].materialRmbSum).toFixed(2);
noUsd = Number(noUsd + getData[i].materialNoUsd).toFixed(2) ;
usd = Number(usd + getData[i].materialUsd).toFixed(2) ;
noUsdSum = Number(noUsdSum + getData[i].materialNoUsdSum).toFixed(2);
usdSum = Number(usdSum + getData[i].materialUsdSum).toFixed(2);
}
$("#enterprise_edit").val(enterprise);
$("#enterpriseSum_edit").val(Number(enterpriseSum).toFixed(2));
$("#noRmb_edit").val(Number(noRmb).toFixed(2));
$("#rmb_edit").val(Number(rmb).toFixed(2));
$("#noRmbSum_edit").val(Number(noRmbSum).toFixed(2));
$("#rmbTax_edit").val(Number(rmbSum).toFixed(2));
$("#noUsd_edit").val(Number(noUsd).toFixed(2));
$("#usd_edit").val(Number(usd).toFixed(2));
$("#noUsdSum_edit").val(Number(noUsdSum).toFixed(2));
$("#usdSum_edit").val(Number(usdSum).toFixed(2));
enterpriseSum = parseInt(enterprise + getData[i].materialNum);
noRmb = parseFloat(noRmb + getData[i].materialNoRmb).toFixed(2);
rmb = parseFloat(rmb + getData[i].materialRmb).toFixed(2) ;
noRmbSum = parseFloat(noRmbSum + getData[i].materialNoRmbSum).toFixed(2);
rmbSum = parseFloat(rmbSum + getData[i].materialRmbSum).toFixed(2);
noUsd = parseFloat(noUsd + getData[i].materialNoUsd).toFixed(2) ;
usd = parseFloat(usd + getData[i].materialUsd).toFixed(2) ;
noUsdSum = parseFloat(noUsdSum + getData[i].materialNoUsdSum).toFixed(2);
usdSum = parseFloat(usdSum + getData[i].materialUsdSum).toFixed(2);
}
$("input[name='materialSum']").val(enterprise);
$("input[name='enterpriseSum']").val(enterpriseSum);
$("input[name='noRmbPrice']").val(noRmb);
$("input[name='noRmbSum']").val(noRmbSum);
$("input[name='rmbPrice']").val(rmb);
$("input[name='rmbTaxSum']").val(rmbSum);
$("input[name='noUsdPrice']").val(noUsd);
$("input[name='noUsdSum']").val(noUsdSum);
$("input[name='usdPrice']").val(usd);
$("input[name='usdTaxSum']").val(usdSum);
}
$("input[name='pricingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='deliveryTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='orderReceivingTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='modificationTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
function submitHandler() {
if ($.validate.form()) {
var formData = $("#form-ywjl-audit").serializeArray();

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

@ -668,42 +668,64 @@
}
//计算
function getTotalAmount(){
let getData = $("#bootstrap-sub-table-editOrder").bootstrapTable('getData');
// $("#addFinishbomTable").bootstrapTable('refresh');
let getData = $("#bootstrap-sub-table-order").bootstrapTable('getData');
let enterprise = 0;let enterpriseSum = 0; let noRmb = 0;
let rmb = 0;let noRmbSum = 0;let rmbSum = 0;let noUsd = 0;
let usd = 0;let noUsdSum = 0; let usdSum = 0;
$("#enterprise_edit").val(0);
$("#enterpriseSum_edit").val(0);
$("#noRmb_edit").val(0);
$("#rmb_edit").val(0);
$("#noRmbSum_edit").val(0);
$("#rmbTax_edit").val(0);
$("#noUsd_edit").val(0);
$("#usd_edit").val(0);
$("#noUsdSum_edit").val(0);
let rmb = 0;let noRmbSum =0;let rmbSum = 0;
let noUsd = 0;let usd = 0;let noUsdSum =0; let usdSum = 0;
$("input[name='materialSum']").val(0);
$("input[name='enterpriseSum']").val(0);
$("input[name='noRmbPrice']").val(0);
$("input[name='noRmbSum']").val(0);
$("input[name='rmbPrice']").val(0);
$("input[name='rmbTaxSum']").val(0);
$("input[name='noUsdPrice']").val(0);
$("input[name='noUsdSum']").val(0);
$("input[name='usdPrice']").val(0);
$("input[name='usdTaxSum']").val(0);
for(let i=0;i<getData.length;i++){
enterprise += 1;
enterpriseSum = Number(enterprise + getData[i].materialNum).toFixed(0);
noRmb = Number(noRmb + getData[i].materialNoRmb).toFixed(2);
rmb = Number(rmb + getData[i].materialRmb).toFixed(2) ;
noRmbSum = Number(noRmbSum + getData[i].materialNoRmbSum).toFixed(2);
rmbSum = Number(rmbSum + getData[i].materialRmbSum).toFixed(2);
noUsd = Number(noUsd + getData[i].materialNoUsd).toFixed(2) ;
usd = Number(usd + getData[i].materialUsd).toFixed(2) ;
noUsdSum = Number(noUsdSum + getData[i].materialNoUsdSum).toFixed(2);
usdSum = Number(usdSum + getData[i].materialUsdSum).toFixed(2);
}
$("#enterprise_edit").val(enterprise);
$("#enterpriseSum_edit").val(Number(enterpriseSum).toFixed(2));
$("#noRmb_edit").val(Number(noRmb).toFixed(2));
$("#rmb_edit").val(Number(rmb).toFixed(2));
$("#noRmbSum_edit").val(Number(noRmbSum).toFixed(2));
$("#rmbTax_edit").val(Number(rmbSum).toFixed(2));
$("#noUsd_edit").val(Number(noUsd).toFixed(2));
$("#usd_edit").val(Number(usd).toFixed(2));
$("#noUsdSum_edit").val(Number(noUsdSum).toFixed(2));
$("#usdSum_edit").val(Number(usdSum).toFixed(2));
enterpriseSum = parseInt(enterprise + getData[i].materialNum);
noRmb = parseFloat(noRmb + getData[i].materialNoRmb).toFixed(2);
rmb = parseFloat(rmb + getData[i].materialRmb).toFixed(2) ;
noRmbSum = parseFloat(noRmbSum + getData[i].materialNoRmbSum).toFixed(2);
rmbSum = parseFloat(rmbSum + getData[i].materialRmbSum).toFixed(2);
noUsd = parseFloat(noUsd + getData[i].materialNoUsd).toFixed(2) ;
usd = parseFloat(usd + getData[i].materialUsd).toFixed(2) ;
noUsdSum = parseFloat(noUsdSum + getData[i].materialNoUsdSum).toFixed(2);
usdSum = parseFloat(usdSum + getData[i].materialUsdSum).toFixed(2);
}
$("input[name='materialSum']").val(enterprise);
$("input[name='enterpriseSum']").val(enterpriseSum);
$("input[name='noRmbPrice']").val(noRmb);
$("input[name='noRmbSum']").val(noRmbSum);
$("input[name='rmbPrice']").val(rmb);
$("input[name='rmbTaxSum']").val(rmbSum);
$("input[name='noUsdPrice']").val(noUsd);
$("input[name='noUsdSum']").val(noUsdSum);
$("input[name='usdPrice']").val(usd);
$("input[name='usdTaxSum']").val(usdSum);
}
$("input[name='pricingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='deliveryTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='orderReceivingTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='modificationTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
function submitHandler() {
if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) {

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

@ -659,42 +659,64 @@
});
//计算
function getTotalAmount(){
let getData = $("#bootstrap-sub-table-editOrder").bootstrapTable('getData');
// $("#addFinishbomTable").bootstrapTable('refresh');
let getData = $("#bootstrap-sub-table-order").bootstrapTable('getData');
let enterprise = 0;let enterpriseSum = 0; let noRmb = 0;
let rmb = 0;let noRmbSum = 0;let rmbSum = 0;let noUsd = 0;
let usd = 0;let noUsdSum = 0; let usdSum = 0;
$("#enterprise_edit").val(0);
$("#enterpriseSum_edit").val(0);
$("#noRmb_edit").val(0);
$("#rmb_edit").val(0);
$("#noRmbSum_edit").val(0);
$("#rmbTax_edit").val(0);
$("#noUsd_edit").val(0);
$("#usd_edit").val(0);
$("#noUsdSum_edit").val(0);
let rmb = 0;let noRmbSum =0;let rmbSum = 0;
let noUsd = 0;let usd = 0;let noUsdSum =0; let usdSum = 0;
$("input[name='materialSum']").val(0);
$("input[name='enterpriseSum']").val(0);
$("input[name='noRmbPrice']").val(0);
$("input[name='noRmbSum']").val(0);
$("input[name='rmbPrice']").val(0);
$("input[name='rmbTaxSum']").val(0);
$("input[name='noUsdPrice']").val(0);
$("input[name='noUsdSum']").val(0);
$("input[name='usdPrice']").val(0);
$("input[name='usdTaxSum']").val(0);
for(let i=0;i<getData.length;i++){
enterprise += 1;
enterpriseSum = Number(enterprise + getData[i].materialNum).toFixed(0);
noRmb = Number(noRmb + getData[i].materialNoRmb).toFixed(2);
rmb = Number(rmb + getData[i].materialRmb).toFixed(2) ;
noRmbSum = Number(noRmbSum + getData[i].materialNoRmbSum).toFixed(2);
rmbSum = Number(rmbSum + getData[i].materialRmbSum).toFixed(2);
noUsd = Number(noUsd + getData[i].materialNoUsd).toFixed(2) ;
usd = Number(usd + getData[i].materialUsd).toFixed(2) ;
noUsdSum = Number(noUsdSum + getData[i].materialNoUsdSum).toFixed(2);
usdSum = Number(usdSum + getData[i].materialUsdSum).toFixed(2);
}
$("#enterprise_edit").val(enterprise);
$("#enterpriseSum_edit").val(Number(enterpriseSum).toFixed(2));
$("#noRmb_edit").val(Number(noRmb).toFixed(2));
$("#rmb_edit").val(Number(rmb).toFixed(2));
$("#noRmbSum_edit").val(Number(noRmbSum).toFixed(2));
$("#rmbTax_edit").val(Number(rmbSum).toFixed(2));
$("#noUsd_edit").val(Number(noUsd).toFixed(2));
$("#usd_edit").val(Number(usd).toFixed(2));
$("#noUsdSum_edit").val(Number(noUsdSum).toFixed(2));
$("#usdSum_edit").val(Number(usdSum).toFixed(2));
enterpriseSum = parseInt(enterprise + getData[i].materialNum);
noRmb = parseFloat(noRmb + getData[i].materialNoRmb).toFixed(2);
rmb = parseFloat(rmb + getData[i].materialRmb).toFixed(2) ;
noRmbSum = parseFloat(noRmbSum + getData[i].materialNoRmbSum).toFixed(2);
rmbSum = parseFloat(rmbSum + getData[i].materialRmbSum).toFixed(2);
noUsd = parseFloat(noUsd + getData[i].materialNoUsd).toFixed(2) ;
usd = parseFloat(usd + getData[i].materialUsd).toFixed(2) ;
noUsdSum = parseFloat(noUsdSum + getData[i].materialNoUsdSum).toFixed(2);
usdSum = parseFloat(usdSum + getData[i].materialUsdSum).toFixed(2);
}
$("input[name='materialSum']").val(enterprise);
$("input[name='enterpriseSum']").val(enterpriseSum);
$("input[name='noRmbPrice']").val(noRmb);
$("input[name='noRmbSum']").val(noRmbSum);
$("input[name='rmbPrice']").val(rmb);
$("input[name='rmbTaxSum']").val(rmbSum);
$("input[name='noUsdPrice']").val(noUsd);
$("input[name='noUsdSum']").val(noUsdSum);
$("input[name='usdPrice']").val(usd);
$("input[name='usdTaxSum']").val(usdSum);
}
$("input[name='pricingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='deliveryTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='orderReceivingTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='modificationTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
function submitHandler() {
if ($.validate.form()) {
var formData = $("#form-zozj-audit").serializeArray();

Loading…
Cancel
Save