Browse Source

修改:销售订单SQL语句修改查询语句,获取PageHelper.startPage(pageNum, pageSize)设置分页。修改:回显是否含税选择,改为th:filed="*{confirmTax}".

dev
zhangsiqi 3 months ago
parent
commit
f69601e7d6
  1. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderChildController.java
  2. 24
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java
  3. 1
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesOrderChildMapper.java
  4. 5
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderChildServiceImpl.java
  5. 48
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderServiceImpl.java
  6. 16
      ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml
  7. 1
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/taskCgjlVerify.html
  8. 16
      ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html
  9. 12
      ruoyi-admin/src/main/resources/templates/system/salesOrder/detail.html
  10. 21
      ruoyi-admin/src/main/resources/templates/system/salesOrder/edit.html
  11. 12
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskModifyApply.html
  12. 17
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwjlVerify.html
  13. 18
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwzgVerify.html
  14. 18
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskZozjVerify.html

2
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderChildController.java

@ -46,7 +46,7 @@ public class SysSalesOrderChildController extends BaseController
public TableDataInfo list(SysSalesOrderChild SysSalesOrderChild) public TableDataInfo list(SysSalesOrderChild SysSalesOrderChild)
{ {
startPage(); startPage();
List<SysSalesOrderChild> list = SysSalesOrderChildService.selectSysSalesOrderChildList(SysSalesOrderChild); List<SysSalesOrderChild> list = SysSalesOrderChildService.selectSysSalesOrderChildListAll(SysSalesOrderChild);
return getDataTable(list); return getDataTable(list);
} }

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

@ -7,6 +7,7 @@ import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.excel.write.metadata.fill.FillConfig; import com.alibaba.excel.write.metadata.fill.FillConfig;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.Page;
import com.ruoyi.ck.utils.Result; import com.ruoyi.ck.utils.Result;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.config.RuoYiConfig; import com.ruoyi.common.config.RuoYiConfig;
@ -17,6 +18,7 @@ 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.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.common.utils.file.FileUtils; import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
@ -46,6 +48,7 @@ import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
@ -123,9 +126,24 @@ public class SysSalesOrderController extends BaseController
@ResponseBody @ResponseBody
public TableDataInfo list(SysSalesOrderVo sysSalesOrderVo) public TableDataInfo list(SysSalesOrderVo sysSalesOrderVo)
{ {
startPage(); startPage();
List<SysSalesOrderVo> list = sysSalesOrderService.selectSysSalesOrderList(sysSalesOrderVo); SysUser curUser = ShiroUtils.getSysUser();
return getDataTable(list); String loginName = ShiroUtils.getLoginName();
Long userId = curUser.getUserId();
Set<String> roleKeys = roleService.selectRoleKeys(userId);
List<SysUser> sysUserlist = sysUserService.selectRoleToUserList("ywyRole");
sysUserlist.add(curUser);
if (roleKeys.contains("ywjlRole")) {
List<SysUser> findUser = sysUserlist.stream().filter(item -> (item.getDeptId().equals(curUser.getDeptId()))).collect(Collectors.toList());
List<String> user = findUser.stream().map(SysUser::getLoginName).collect(Collectors.toList());
// String userStr = String.join(",", user);
sysSalesOrderVo.setApplyUsers(user);
}
if (roleKeys.contains("ywyRole")) {
sysSalesOrderVo.setApplyUser(loginName);
}
List<SysSalesOrderVo> list = sysSalesOrderService.selectSysSalesOrderList(sysSalesOrderVo);
return getDataTable(list);
} }
/** /**

1
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesOrderChildMapper.java

@ -10,6 +10,7 @@ import java.util.List;
public interface SysSalesOrderChildMapper { public interface SysSalesOrderChildMapper {
List<SysSalesOrderChild> selectSysSalesOrderChildList(SysSalesOrderChild sysCustomerQuoteChild); List<SysSalesOrderChild> selectSysSalesOrderChildList(SysSalesOrderChild sysCustomerQuoteChild);
List<SysSalesOrderChild> selectSysSalesOrderChildListAll(SysSalesOrderChild sysCustomerQuoteChild);
int insertSysSalesOrderChild(SysSalesOrderChild sysCustomerQuoteChild); int insertSysSalesOrderChild(SysSalesOrderChild sysCustomerQuoteChild);
SysSalesOrderChild selectSysSalesOrderChildById(Long id); SysSalesOrderChild selectSysSalesOrderChildById(Long id);

5
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderChildServiceImpl.java

@ -16,7 +16,10 @@ public class SysSalesOrderChildServiceImpl implements ISysSalesOrderChildService
public List<SysSalesOrderChild> selectSysSalesOrderChildList (SysSalesOrderChild sysCustomerQuoteChild) { public List<SysSalesOrderChild> selectSysSalesOrderChildList (SysSalesOrderChild sysCustomerQuoteChild) {
return sysCustomerQuoteChildMapper.selectSysSalesOrderChildList(sysCustomerQuoteChild); return sysCustomerQuoteChildMapper.selectSysSalesOrderChildList(sysCustomerQuoteChild);
} }
@Override
public List<SysSalesOrderChild> selectSysSalesOrderChildListAll (SysSalesOrderChild sysCustomerQuoteChild) {
return sysCustomerQuoteChildMapper.selectSysSalesOrderChildListAll(sysCustomerQuoteChild);
}
@Override @Override
public int insertSysSalesOrderChild(SysSalesOrderChild sysCustomerQuoteChild) { public int insertSysSalesOrderChild(SysSalesOrderChild sysCustomerQuoteChild) {
return sysCustomerQuoteChildMapper.insertSysSalesOrderChild(sysCustomerQuoteChild); return sysCustomerQuoteChildMapper.insertSysSalesOrderChild(sysCustomerQuoteChild);

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

@ -1,6 +1,7 @@
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.PageDomain; import com.ruoyi.common.core.page.PageDomain;
import com.ruoyi.common.core.page.TableSupport; import com.ruoyi.common.core.page.TableSupport;
@ -122,31 +123,17 @@ public class SysSalesOrderServiceImpl implements ISysSalesOrderService
@Override @Override
public List<SysSalesOrderVo> selectSysSalesOrderList(SysSalesOrderVo sysSalesOrderVo1) public List<SysSalesOrderVo> selectSysSalesOrderList(SysSalesOrderVo sysSalesOrderVo1)
{ {
//PageHelper 仅对第一List分页有效
PageDomain pageDomain = TableSupport.buildPageRequest(); PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum(); Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize(); Integer pageSize = pageDomain.getPageSize();
SysUser curUser = ShiroUtils.getSysUser(); PageHelper.startPage(pageNum, pageSize);
String loginName = ShiroUtils.getLoginName();
Long userId = curUser.getUserId();
Page<SysSalesOrderVo> returnList = new Page<>();
//PageHelper 仅对第一List分页有效 //PageHelper 仅对第一List分页有效
Page<SysSalesOrderVo> list = (Page<SysSalesOrderVo>)sysSalesOrderMapper.selectSysSalesOrderList(sysSalesOrderVo1); Page<SysSalesOrderVo> list = (Page<SysSalesOrderVo>) sysSalesOrderMapper.selectSysSalesOrderList(sysSalesOrderVo1);
Set<String> roleKeys = roleService.selectRoleKeys(userId); Page<SysSalesOrderVo> returnList = new Page<>();
List<SysUser> sysUserlist = sysUserService.selectRoleToUserList("ywyRole");
sysUserlist.add(curUser);
//如果主管审批,查看当前自己部门的审核 //如果主管审批,查看当前自己部门的审核
//如果经理审计需要查询自己部门下所有业务员的提交的订单,以及自身的提交的订单 //如果经理审计需要查询自己部门下所有业务员的提交的订单,以及自身的提交的订单
if (roleKeys.contains("ywjlRole")) {
List<SysUser> findUser = sysUserlist.stream().filter(item -> (item.getDeptId().equals(curUser.getDeptId()))).collect(Collectors.toList());
List<String> user = findUser.stream().map(SysUser::getLoginName).collect(Collectors.toList());
String userStr = String.join(",", user);
sysSalesOrderVo1.setApplyUsers(user);
list = (Page<SysSalesOrderVo>) sysSalesOrderMapper.selectSysSalesOrderList(sysSalesOrderVo1);
}
if (roleKeys.contains("ywyRole")) {
sysSalesOrderVo1.setApplyUser(curUser.getLoginName());
list = (Page<SysSalesOrderVo>) list.stream().filter(item -> item.getApplyUser().equals(curUser.getLoginName())).collect(Collectors.toList());
}
for(SysSalesOrderVo sysSalesOrderVo : list){ for(SysSalesOrderVo sysSalesOrderVo : list){
SysUser sysUser = userMapper.selectUserByLoginName(sysSalesOrderVo.getCreateBy()); SysUser sysUser = userMapper.selectUserByLoginName(sysSalesOrderVo.getCreateBy());
if (sysUser != null) { if (sysUser != null) {
@ -240,18 +227,19 @@ public class SysSalesOrderServiceImpl implements ISysSalesOrderService
//获取传输的销售订单物料报价信息 //获取传输的销售订单物料报价信息
List<SysSalesOrderChild> sysSalesOrderChildList = sysSalesOrder.getSysSalesOrderChildList(); List<SysSalesOrderChild> sysSalesOrderChildList = sysSalesOrder.getSysSalesOrderChildList();
sysSalesOrderChildService.deleteSysSalesOrderChildByQuoteId(sysSalesOrder.getSalesOrderCode()); sysSalesOrderChildService.deleteSysSalesOrderChildByQuoteId(sysSalesOrder.getSalesOrderCode());
for (int i = 0; i < sysSalesOrderChildList.size(); i++) { for (int i = 0; i < sysSalesOrderChildList.size(); i++) {
SysSalesOrderChild sysSalesOrderChild = sysSalesOrderChildList.get(i); SysSalesOrderChild sysSalesOrderChild = sysSalesOrderChildList.get(i);
sysSalesOrderChild.setQuoteId(sysSalesOrder.getSalesOrderCode()); sysSalesOrderChild.setQuoteId(sysSalesOrder.getSalesOrderCode());
sysSalesOrderChild.setCreateBy(loginName); sysSalesOrderChild.setCreateBy(loginName);
sysSalesOrderChild.setCreateTime(DateUtils.getNowDate()); sysSalesOrderChild.setCreateTime(DateUtils.getNowDate());
sysSalesOrderChild.setUpdateBy(loginName); sysSalesOrderChild.setUpdateBy(loginName);
sysSalesOrderChild.setUpdateTime(DateUtils.getNowDate()); sysSalesOrderChild.setUpdateTime(DateUtils.getNowDate());
sysSalesOrderChildService.insertSysSalesOrderChild(sysSalesOrderChild); sysSalesOrderChildService.insertSysSalesOrderChild(sysSalesOrderChild);
} }
} }
int result = sysSalesOrderMapper.updateSysSalesOrder(sysSalesOrder); return sysSalesOrderMapper.updateSysSalesOrder(sysSalesOrder);
return result;
} }
/** /**
* 删除销售订单对象 * 删除销售订单对象

16
ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml

@ -68,7 +68,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
order by a.id desc order by a.id desc
</select> </select>
<select id="selectSysSalesOrderChildListAll" parameterType="SysSalesOrderChild" resultMap="SysSalesOrderChildResult">
select id, quoteId, materialId, materialCode, materialName, materialType, processMethod, brand, photoUrl,unit, `describe`,
warehouseDept,countTax, usdTax, materialNum,materialSole, materialRmb, materialNoRmb, materialNoUsd, materialUsd, materialUsdSum,
materialNoUsdSum, materialNoRmbSum, materialRmbSum,delivery_time, expiry_day,
out_bound_quantity, un_bound_quantity, create_by, create_time, update_by,
update_time, remark, use_status,audit_status
from sys_sales_order_child
<where>
<if test="quoteId != null and quoteId !='' "> and quoteId = #{quoteId}</if>
<if test="materialId != null "> and materialId = #{materialId}</if>
<if test="materialCode != null and materialCode != ''"> and materialCode like concat('%', #{materialCode}, '%')</if>
<if test="materialName != null and materialName != ''"> and materialName like concat('%', #{materialName}, '%')</if>
</where>
order by create_time desc
</select>
<select id="selectSysSalesOrderChildById" parameterType="Long" resultMap="SysSalesOrderChildResult"> <select id="selectSysSalesOrderChildById" parameterType="Long" resultMap="SysSalesOrderChildResult">
<include refid="selectSysSalesOrderChild"/> <include refid="selectSysSalesOrderChild"/>
where a.id = #{id} where a.id = #{id}

1
ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/taskCgjlVerify.html

@ -314,7 +314,6 @@
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); $('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
} }
var tableData = $("#bootstrap-sub-table-purchaseQuoteChild").bootstrapTable('getData'); var tableData = $("#bootstrap-sub-table-purchaseQuoteChild").bootstrapTable('getData');
$('input[name="purchaseQuoteChildLists"]').val(JSON.stringify(tableData));
var formData = $("#form-purchaseQuote-cgjl-audit").serialize(); var formData = $("#form-purchaseQuote-cgjl-audit").serialize();
$.operate.save(prefix + "/complete/" + taskId,formData); $.operate.save(prefix + "/complete/" + taskId,formData);
} }

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

@ -184,7 +184,7 @@
<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">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}"> <div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<input required type="radio" th:id="${'confirmTax_' + dict.dictCode}" <input required type="radio" th:id="${'confirmTax_' + dict.dictCode}"
name="confirmTax" th:value="${dict.dictValue}" th:checked="${dict.default}"> name="confirmTax" th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> <label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
@ -325,7 +325,7 @@
{checkbox: true}, {checkbox: true},
{field: 'index',align: 'center', title: "序号", {field: 'index',align: 'center', title: "序号",
formatter: function (value, row, index,column) { formatter: function (value, row, index,column) {
return $.table.serialNumber(index) - 1; return $.table.serialNumber(index);
} }
}, },
{title: '物料索引id',field: 'materialId',align: 'center',visible: false}, {title: '物料索引id',field: 'materialId',align: 'center',visible: false},
@ -848,14 +848,14 @@
var iframeWin = window[layero.find('iframe')[0]['name']]; var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections'); var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections');
//判断是否重复 //判断是否重复
var rows = $("#bootstrap-sub-table-order").bootstrapTable('getData').length; var rows = rowData.length;
for(var j=0;i<rows;j++){ var materialData = $("#bootstrap-sub-table-order").bootstrapTable('getData');
var data = $("#bootstrap-sub-table-order").bootstrapTable('getData'); for(var j=0;j<rows;j++){
for (var i = 0;i<data.length;j++){ for (var i = 0;i< materialData.length;i++){
if(data[j].materialNo==rowData[j].materialNo){ if(rowData[j].materialNo == materialData[i].materialCode){
//如果是物料料号的相同,则从rowData清除相同的料号物料 //如果是物料料号的相同,则从rowData清除相同的料号物料
rowData.splice(j,1);
$.modal.alertError("不能选择已添加过的相同料号" + rowData[j].materialNo); $.modal.alertError("不能选择已添加过的相同料号" + rowData[j].materialNo);
rowData.splice(j,1);
return; return;
} }
} }

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

@ -202,8 +202,8 @@
<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">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}"> <div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}">
<input required type="radio" th:id="${'confirmTax_' + dict.dictCode}" <input type="radio" th:id="${'confirmTax_' + dict.dictCode}"
name="confirmTax" th:value="${dict.dictValue}" th:checked="${dict.default}" th:disabled="${dict.default ? 'disabled' : ''}"> name="confirmTax" th:value="${dict.dictValue}" th:field="*{confirmTax}" disabled required />
<label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> <label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div> </div>
</div> </div>
@ -218,8 +218,8 @@
<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">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}"> <div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<input required type="radio" th:id="${'invoice_' + dict.dictCode}" <input type="radio" th:id="${'invoice_' + dict.dictCode}"
name="invoice" th:value="${dict.dictValue}" th:checked="${dict.default}" th:disabled="${dict.default ? 'disabled' : ''}"> name="invoice" th:value="${dict.dictValue}" th:field="*{invoice}" disabled required>
<label th:for="${'invoice_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> <label th:for="${'invoice_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div> </div>
</div> </div>
@ -246,8 +246,8 @@
<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">
<div class="input-group date"> <div class="input-group date">
<input name="deliveryTime" class="form-control" placeholder="yyyy-mm-dd" type="text" disabled/> <input name="deliveryTime" class="form-control" placeholder="yyyy-mm-dd" type="text" th:value="*{deliveryTime}" disabled/>
<span class="input-group-addon" th:value="*{deliveryTime}" disabled><i class="fa fa-calendar"></i></span> <span class="input-group-addon" disabled><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
</div> </div>

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

@ -95,6 +95,12 @@
<input name="enterpriseName" class="form-control" type="text" th:field="*{enterpriseName}" required readonly> <input name="enterpriseName" class="form-control" type="text" th:field="*{enterpriseName}" required readonly>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">客户料号:</label>
<div class="col-sm-8">
<input id="enterpriseMaterialNo" name="enterpriseMaterialNo" th:field="*{enterpriseMaterialNo}" class="form-control" type="text">
</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">
@ -198,12 +204,13 @@
<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">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}"> <div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}">
<input type="radio" th:id="${'confirmTax_' + dict.dictCode}" th:field="*{confirmTax}" <input type="radio" th:id="${'confirmTax_' + dict.dictCode}" th:field="*{confirmTax}"
name="confirmTax" th:value="${dict.dictValue}" required> name="confirmTax" th:value="${dict.dictValue}" required>
<label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> <label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required" id="rmbLabel">国内税率:</label> <label class="col-sm-3 control-label is-required" id="rmbLabel">国内税率:</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -694,14 +701,14 @@
if (rmb1== null){ if (rmb1== null){
rmb1 = 0; rmb1 = 0;
} }
var rows = $("#bootstrap-table-editOrder").bootstrapTable('getData').length; var rows = rowData.length;
for(var j=0;i<rows;j++){ var materialData = $("#bootstrap-table-editOrder").bootstrapTable('getData');
var data = $("#bootstrap-table-editOrder").bootstrapTable('getData'); for(var j=0;j<rows;j++){
for (var i = 0;i<data.length;j++){ for (var i = 0;i< data.length;i++){
if(data[j].materialNo==rowData[j].materialNo){ if(rowData[j].materialNo == materialData[i].materialCode){
//如果是物料料号的相同,则从rowData清除相同的料号物料 //如果是物料料号的相同,则从rowData清除相同的料号物料
rowData.splice(j,1);
$.modal.alertError("不能选择已添加过的相同料号" + rowData[j].materialNo); $.modal.alertError("不能选择已添加过的相同料号" + rowData[j].materialNo);
rowData.splice(j,1);
return; return;
} }
} }

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

@ -66,6 +66,12 @@
<input required name="enterpriseName" class="form-control" type="text" th:field="*{enterpriseName}" readonly> <input required name="enterpriseName" class="form-control" type="text" th:field="*{enterpriseName}" readonly>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">客户料号:</label>
<div class="col-sm-8">
<input id="enterpriseMaterialNo" name="enterpriseMaterialNo" th:field="*{enterpriseMaterialNo}" class="form-control" type="text" readonly>
</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">
@ -164,9 +170,9 @@
<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">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}"> <div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<input type="radio" th:id="${'confirmTax_' + dict.dictCode}" required <input type="radio" th:id="${'confirmTax_' + dict.dictCode}" required
name="confirmTax" th:value="${dict.dictValue}" th:checked="${dict.default}"> name="confirmTax" th:value="${dict.dictValue}" th:field="*{confirmTax}" />
<label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> <label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div> </div>
</div> </div>
@ -182,7 +188,7 @@
<div class="col-sm-8"> <div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}"> <div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<input required type="radio" th:id="${'invoice_' + dict.dictCode}" <input required type="radio" th:id="${'invoice_' + dict.dictCode}"
name="invoice" th:value="${dict.dictValue}" th:checked="${dict.default}"> name="invoice" th:value="${dict.dictValue}" th:field="*{invoice}">
<label th:for="${'invoice_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> <label th:for="${'invoice_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div> </div>
</div> </div>

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

@ -64,6 +64,12 @@
<input name="enterpriseName" class="form-control" type="text" th:field="*{enterpriseName}" required readonly> <input name="enterpriseName" class="form-control" type="text" th:field="*{enterpriseName}" required readonly>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">客户料号:</label>
<div class="col-sm-8">
<input id="enterpriseMaterialNo" name="enterpriseMaterialNo" th:field="*{enterpriseMaterialNo}" class="form-control" type="text" readonly>
</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">
@ -159,10 +165,10 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label is-required">是否含税:</label> <label class="col-sm-6 control-label is-required">是否含税:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}"> <div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<input type="radio" th:id="${'confirmFax_' + dict.dictCode}" name="confirmFax" <input type="radio" th:id="${'confirmTax_' + dict.dictCode}" name="confirmTax"
th:value="${dict.dictValue}" th:checked="${dict.isDefault == 'Y' ? true : false}" disabled required> th:value="${dict.dictValue}" th:field="*{confirmTax}" disabled required>
<label th:for="${'confirmFax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> <label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div> </div>
</div> </div>
</div> </div>
@ -177,7 +183,8 @@
<div class="col-sm-8"> <div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}"> <div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<input type="radio" <input type="radio"
name="invoice" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled required> name="invoice" th:value="${dict.dictValue}" th:checked="${dict.default}"
th:field="${invoice}" disabled required>
<label th:for="${'invoice_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> <label th:for="${'invoice_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div> </div>
</div> </div>

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

@ -64,6 +64,12 @@
<input name="enterpriseName" class="form-control" type="text" th:field="*{enterpriseName}" required readonly> <input name="enterpriseName" class="form-control" type="text" th:field="*{enterpriseName}" required readonly>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">客户料号:</label>
<div class="col-sm-8">
<input id="enterpriseMaterialNo" name="enterpriseMaterialNo" th:field="*{enterpriseMaterialNo}" class="form-control" type="text" readonly>
</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">
@ -157,12 +163,12 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label is-required">是否含税:</label> <label class="col-sm-3 control-label is-required">是否含税:</label>
<div class="col-sm-6"> <div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}"> <div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}">
<input type="radio" th:id="${'confirmFax_' + dict.dictCode}" name="confirmFax" <input type="radio" th:id="${'confirmTax_' + dict.dictCode}" name="confirmTax"
th:value="${dict.dictValue}" th:checked="${dict.isDefault == 'Y' ? true : false}" disabled required> th:value="${dict.dictValue}" th:checked="*{confirmTax}" disabled required>
<label th:for="${'confirmFax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> <label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div> </div>
</div> </div>
</div> </div>
@ -177,7 +183,7 @@
<div class="col-sm-8"> <div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}"> <div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<input type="radio" <input type="radio"
name="invoice" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled required> name="invoice" th:value="${dict.dictValue}" th:field="*{invoice}" disabled required>
<label th:for="${'invoice_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> <label th:for="${'invoice_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div> </div>
</div> </div>

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

@ -64,6 +64,12 @@
<input name="enterpriseName" class="form-control" type="text" th:field="*{enterpriseName}" required readonly> <input name="enterpriseName" class="form-control" type="text" th:field="*{enterpriseName}" required readonly>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">客户料号:</label>
<div class="col-sm-8">
<input id="enterpriseMaterialNo" name="enterpriseMaterialNo" th:field="*{enterpriseMaterialNo}" class="form-control" type="text" readonly>
</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">
@ -159,10 +165,10 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label is-required">是否含税:</label> <label class="col-sm-6 control-label is-required">是否含税:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}"> <div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<input type="radio" th:id="${'confirmFax_' + dict.dictCode}" name="confirmFax" <input type="radio" th:id="${'confirmTax_' + dict.dictCode}" name="confirmTax"
th:value="${dict.dictValue}" th:checked="${dict.isDefault == 'Y' ? true : false}" disabled required> th:value="${dict.dictValue}" th:field="*{confirmTax}" disabled required>
<label th:for="${'confirmFax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> <label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div> </div>
</div> </div>
</div> </div>
@ -177,7 +183,7 @@
<div class="col-sm-8"> <div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}"> <div class="radio-box" th:each="dict : ${@dict.getType('sys_whether')}">
<input type="radio" <input type="radio"
name="invoice" th:value="${dict.dictValue}" th:checked="${dict.default}" disabled required> name="invoice" th:value="${dict.dictValue}" th:field="*{invoice}" disabled required>
<label th:for="${'invoice_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> <label th:for="${'invoice_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div> </div>
</div> </div>
@ -444,7 +450,7 @@
$("input[name='enterpriseName']").val(data.enterpriseName); $("input[name='enterpriseName']").val(data.enterpriseName);
$("input[name='customerPurser']").val(data.customerPurser); $("input[name='customerPurser']").val(data.customerPurser);
$("input[name='taxRate']").val(data.taxRate); $("input[name='taxRate']").val(data.taxRate);
$("input[name='confirmFax']").val(data.confirmTax); $("input[name='confirmTax']").val(data.confirmTax);
$("#commonCurrency_add").val(data.commonCurrency).trigger('change'); $("#commonCurrency_add").val(data.commonCurrency).trigger('change');
commonCurrency = $("#commonCurrency_edit option:selected").val(); commonCurrency = $("#commonCurrency_edit option:selected").val();
console.log("commonCurrency",commonCurrency); console.log("commonCurrency",commonCurrency);

Loading…
Cancel
Save