Compare commits

...

6 Commits

Author SHA1 Message Date
zhangsiqi 348b4066eb Merge remote-tracking branch 'origin/dev' into dev 4 weeks ago
zhangsiqi 3e3b780a9b 修改:物料节点的研发总监审核通过后。新增库存物料信息添加方法addStockMaterial 4 weeks ago
zhangsiqi 7f8fec8a00 修改:采购报价mapper.xml新增,获取每个供应商分组最新增通过的报价信息。 4 weeks ago
zhangsiqi 607d2c263e 修改:收款凭证导出模版信息,添批量固定数量的收款凭证明细。最大数量为6,计算合计,超出最大的收款凭证记录数新增sheer表。 4 weeks ago
zhangsiqi 1d4ce029e2 修改:仓库库存查询,修改库存信息中仓库名字段修改为仓库名下拉列表。下列列表选择完成后需要把对弈仓库名中的仓库ID 4 weeks ago
zhangsiqi c0900d1381 修改:删除文件 1 month ago
  1. 0
      receipt_voucher.xlsx
  2. 8
      ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialController.java
  3. 2
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpMaterialService.java
  4. 34
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpMaterialServiceImpl.java
  5. 53
      ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinancialReceivablesController.java
  6. 5
      ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialReceivables.java
  7. 22
      ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialReceivablesRecords.java
  8. 1
      ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialReceivablesService.java
  9. 5
      ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialReceivablesServiceImpl.java
  10. BIN
      ruoyi-admin/src/main/resources/attachments/FinancialReceiptVoucherTemplate.xlsx
  11. 21
      ruoyi-admin/src/main/resources/mapper/financial/FinancialReceivablesMapper.xml
  12. 23
      ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteChildMapper.xml
  13. 2
      ruoyi-admin/src/main/resources/templates/financial/receivables/add.html
  14. 40
      ruoyi-admin/src/main/resources/templates/financial/receivables/addDebit.html
  15. 4
      ruoyi-admin/src/main/resources/templates/financial/receivables/addReceivablesVoucher.html
  16. 8
      ruoyi-admin/src/main/resources/templates/financial/receivables/addReceivablesVoucherNoSales.html
  17. 4
      ruoyi-admin/src/main/resources/templates/financial/receivables/edit.html
  18. 20
      ruoyi-admin/src/main/resources/templates/financial/receivables/receivables.html
  19. 73
      ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/addPurchaseOrder.html
  20. 25
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/taskModifyApply.html
  21. 137
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/add.html
  22. 113
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/detail.html
  23. 140
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/edit.html
  24. 2
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/add.html
  25. 8
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryHistory.html
  26. 21
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryInquiry.html
  27. 110
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/add.html

0
receipt_voucher.xlsx

8
ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialController.java

@ -18,6 +18,8 @@ import com.ruoyi.system.service.ISysErpMaterialSysTechnicalTeamService;
import com.ruoyi.system.service.ISysTechnicalTeamService; import com.ruoyi.system.service.ISysTechnicalTeamService;
import com.ruoyi.system.service.ISysRoleService; import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.warehouse.controller.WarehouseInventoryInquiryController;
import com.ruoyi.warehouse.service.IWarehouseInventoryInquiryService;
import org.activiti.engine.RuntimeService; import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService; import org.activiti.engine.TaskService;
import org.activiti.engine.runtime.ProcessInstance; import org.activiti.engine.runtime.ProcessInstance;
@ -71,6 +73,9 @@ public class ErpMaterialController extends BaseController
@Autowired @Autowired
private ISysUserService sysUserService; private ISysUserService sysUserService;
@Autowired
private IWarehouseInventoryInquiryService warehouseInventoryInquiryService;
@RequiresPermissions("erp:material:view") @RequiresPermissions("erp:material:view")
@GetMapping() @GetMapping()
public String material(ModelMap mmap) public String material(ModelMap mmap)
@ -202,8 +207,11 @@ public class ErpMaterialController extends BaseController
erpMaterialVo.setAuditStatus("1"); erpMaterialVo.setAuditStatus("1");
// 提交 // 提交
if("submit".equals(instanceType)){ if("submit".equals(instanceType)){
//物料审核通过后,填写通过后库存物料信息初始化,填写对应的信息
// 使用状态-是 // 使用状态-是
erpMaterialVo.setUseStatus("1"); erpMaterialVo.setUseStatus("1");
//审核通过后添加库存物料信息
erpMaterialService.addStockMaterial(erpMaterialVo);
} }
// 作废 // 作废
else if("cancel".equals(instanceType)){ else if("cancel".equals(instanceType)){

2
ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpMaterialService.java

@ -125,4 +125,6 @@ public interface IErpMaterialService
* @return * @return
*/ */
public ProcessInstance submitApply(ErpMaterial erpMaterial); public ProcessInstance submitApply(ErpMaterial erpMaterial);
Integer addStockMaterial(ErpMaterialVo erpMaterialVo);
} }

34
ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpMaterialServiceImpl.java

@ -20,6 +20,10 @@ import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysAttachFileService; import com.ruoyi.system.service.ISysAttachFileService;
import com.ruoyi.system.service.ISysAttachService; import com.ruoyi.system.service.ISysAttachService;
import com.ruoyi.system.service.ISysRoleService; import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.warehouse.domain.WarehouseInventoryInquiry;
import com.ruoyi.warehouse.mapper.WarehouseInventoryInquiryMapper;
import com.ruoyi.warehouse.mapper.WarehouseStorageOrderDetailMapper;
import com.ruoyi.warehouse.mapper.WarehouseStorageOrderMapper;
import org.activiti.engine.TaskService; import org.activiti.engine.TaskService;
import org.activiti.engine.impl.persistence.entity.TaskEntityImpl; import org.activiti.engine.impl.persistence.entity.TaskEntityImpl;
import org.activiti.engine.runtime.ProcessInstance; import org.activiti.engine.runtime.ProcessInstance;
@ -43,6 +47,8 @@ public class ErpMaterialServiceImpl implements IErpMaterialService
{ {
@Autowired @Autowired
private ErpMaterialMapper erpMaterialMapper; private ErpMaterialMapper erpMaterialMapper;
@Autowired
private WarehouseInventoryInquiryMapper inventoryInquiryMapper;
@Autowired @Autowired
private ISysAttachService attachService; private ISysAttachService attachService;
@ -430,4 +436,32 @@ public class ErpMaterialServiceImpl implements IErpMaterialService
variables.put("authority",1); variables.put("authority",1);
} }
} }
/*审核通过添加库存物料信息*/
@Override
@Transactional(rollbackFor = Exception.class)
public Integer addStockMaterial(ErpMaterialVo erpMaterialVo) {
WarehouseInventoryInquiry warehouseInventoryInquiry = new WarehouseInventoryInquiry();
warehouseInventoryInquiry.setMaterialNo(erpMaterialVo.getMaterialNo());
warehouseInventoryInquiry.setMaterialName(erpMaterialVo.getMaterialName());
warehouseInventoryInquiry.setMaterialDescribe(erpMaterialVo.getDescribe());
warehouseInventoryInquiry.setMaterialBrand(erpMaterialVo.getBrand());
warehouseInventoryInquiry.setMaterialProcessMethod(erpMaterialVo.getProcessMethod());
warehouseInventoryInquiry.setMaterialUnit(erpMaterialVo.getUnit());
warehouseInventoryInquiry.setMaterialPhotourl(erpMaterialVo.getPhotoUrl());
warehouseInventoryInquiry.setMaterialType(erpMaterialVo.getMaterialType());
warehouseInventoryInquiry.setMaterialUseStatus(erpMaterialVo.getUseStatus());
warehouseInventoryInquiry.setWarehouseDept(erpMaterialVo.getWarehouseDept());
if(erpMaterialVo.getDescribe().contains(",")){
warehouseInventoryInquiry.setMaterialSpecification(erpMaterialVo.getDescribe().split(" ")[0]);
warehouseInventoryInquiry.setMaterialModel(erpMaterialVo.getDescribe().split(",")[1]);
}
String user = ShiroUtils.getLoginName();
warehouseInventoryInquiry.setCreateBy(user);
warehouseInventoryInquiry.setCreateTime(DateUtils.getNowDate());
warehouseInventoryInquiry.setUpdateBy(user);
warehouseInventoryInquiry.setUpdateTime(DateUtils.getNowDate());
return inventoryInquiryMapper.insertWarehouseInventoryInquiry(warehouseInventoryInquiry);
}
} }

53
ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinancialReceivablesController.java

@ -20,6 +20,7 @@ import com.ruoyi.common.utils.file.FileDownloadUtils;
import com.ruoyi.financial.domain.FinancialReceivablesRecords; import com.ruoyi.financial.domain.FinancialReceivablesRecords;
import com.ruoyi.financial.domain.VO.ExportFinancialReceivablesVo; import com.ruoyi.financial.domain.VO.ExportFinancialReceivablesVo;
import com.ruoyi.financial.service.IFinancialReceivablesRecordsService; import com.ruoyi.financial.service.IFinancialReceivablesRecordsService;
import com.ruoyi.framework.web.service.DictService;
import org.apache.avalon.framework.service.ServiceException; import org.apache.avalon.framework.service.ServiceException;
import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.ss.util.CellRangeAddress;
@ -64,6 +65,8 @@ public class FinancialReceivablesController extends BaseController
@Autowired @Autowired
private IFinancialReceivablesRecordsService receivablesRecordsService; private IFinancialReceivablesRecordsService receivablesRecordsService;
@Autowired
private DictService dictService;
@RequiresPermissions("financial:receivables:view") @RequiresPermissions("financial:receivables:view")
@GetMapping() @GetMapping()
public String receivables() public String receivables()
@ -164,16 +167,6 @@ public class FinancialReceivablesController extends BaseController
List<FinancialReceivablesRecords> financialReceivablesRecordsList = receivablesRecordsService.selectFinancialReceivablesRecordsListByCode(financialReceivables.getFinancialReceivablesCode()); List<FinancialReceivablesRecords> financialReceivablesRecordsList = receivablesRecordsService.selectFinancialReceivablesRecordsListByCode(financialReceivables.getFinancialReceivablesCode());
// //
// Map<String, Object> map = financialReceivablesService.exportTemplate(financialReceivablesRecordsList); // Map<String, Object> map = financialReceivablesService.exportTemplate(financialReceivablesRecordsList);
Map<String, Object> map1 = new HashMap<>();
map1.put("debitAccount",financialReceivables.getDebitAccount());
String date = DateUtils.getDate();
String[] dateArray = date.split("-");
map1.put("year", dateArray[0]);
map1.put("month", dateArray[1]);
map1.put("day", dateArray[2]);
map1.put("openBank",financialReceivables.getOpenBank());
map1.put("debitAccount",financialReceivables.getDebitAccount());
map1.put("loginName", ShiroUtils.getLoginName());
// 模版位置 // 模版位置
String name = "FinancialReceiptVoucherTemplate.xlsx"; String name = "FinancialReceiptVoucherTemplate.xlsx";
@ -192,14 +185,23 @@ public class FinancialReceivablesController extends BaseController
final int maxRowsPerPage = 6; final int maxRowsPerPage = 6;
// 计算需要多少页 // 计算需要多少页
int totalPages = (int) Math.ceil((double) financialReceivablesRecordsList.size() / maxRowsPerPage); int totalPages = (int) Math.ceil((double) financialReceivablesRecordsList.size() / maxRowsPerPage);
for (int i = 0; i < totalPages; i++) { for (int i = 0; i < totalPages - 1; i++) {
List<FinancialReceivablesRecords> financialReceivablesRecordsListPage = List<FinancialReceivablesRecords> financialReceivablesRecordsListPage =
receivablesRecordsService.selectFinancialReceivablesRecordsListByCodePage(financialReceivables.getFinancialReceivablesCode(), i + 1, maxRowsPerPage); receivablesRecordsService.selectFinancialReceivablesRecordsListByCodePage(financialReceivables.getFinancialReceivablesCode(), i + 1, maxRowsPerPage);
Map<String, Object> map = financialReceivablesService.exportTemplate(financialReceivablesRecordsList); Map<String, Object> map = financialReceivablesService.exportTemplate(financialReceivablesRecordsListPage);
Map<String, Object> map1 = new HashMap<>();
map1.put("debitAccount",dictService.getLabel("receivables_debit_entry", financialReceivables.getDebitAccount()));
String date = DateUtils.getDate();
String[] dateArray = date.split("-");
map1.put("year", dateArray[0]);
map1.put("month", dateArray[1]);
map1.put("day", dateArray[2]);
map1.put("debitBank", dictService.getLabel("receivables_bank", financialReceivables.getOpenBank()));
map1.put("loginName", ShiroUtils.getLoginName());
// 创建一个WriteSheet对象,并指定模板中的Sheet编号 // 创建一个WriteSheet对象,并指定模板中的Sheet编号
WriteSheet writeSheet = EasyExcel.writerSheet("sheet" + (i + 1)).build(); WriteSheet writeSheet = EasyExcel.writerSheet("sheet" + (i + 1)).build();
FillConfig fillConfig = FillConfig.builder().forceNewRow(false).build(); FillConfig fillConfig = FillConfig.builder().forceNewRow(false).build();
excelWriter.fill(map1, writeSheet); excelWriter.fill(map1,fillConfig, writeSheet);
excelWriter.fill(map.get("list"), fillConfig, writeSheet); excelWriter.fill(map.get("list"), fillConfig, writeSheet);
excelWriter.fill(map.get("amount"), writeSheet); excelWriter.fill(map.get("amount"), writeSheet);
} }
@ -319,7 +321,28 @@ public class FinancialReceivablesController extends BaseController
return getDataTable(financialReceivablesRecords); return getDataTable(financialReceivablesRecords);
} }
/**
* 应收款账单借方详情
* @param financialReceivablesId
* @param mmap
* @return
*/
@GetMapping("/addDebit/{financialReceivablesId}")
public String addDebit(@PathVariable("financialReceivablesId") Long financialReceivablesId, ModelMap mmap)
{
FinancialReceivables financialReceivables = financialReceivablesService.selectFinancialReceivablesById(financialReceivablesId);
mmap.put("debit", financialReceivables);
return prefix + "/addDebit";
}
/**
* 应收款账单借方详情
* @return
*/
@PostMapping("/addDebitEntiry")
@ResponseBody
public AjaxResult addDebitEntiry(FinancialReceivables financialReceivables)
{
return AjaxResult.success( financialReceivablesService.updateReceivableDebit(financialReceivables));
}
} }

5
ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialReceivables.java

@ -41,7 +41,8 @@ public class FinancialReceivables extends BaseEntity
/*借方科目*/ /*借方科目*/
@Excel(name = "借方科目", readConverterExp="0=银行存款,1=现金") @Excel(name = "借方科目", readConverterExp="0=银行存款,1=现金")
private String debitAccount; private String debitAccount;
@Excel(name = "借方开户银行" ,readConverterExp="0=中行基本户,建行一般户")
private String debitBank;
/** 贷方科目 */ /** 贷方科目 */
@Excel(name = "贷方科目") @Excel(name = "贷方科目")
private String creditAccount; private String creditAccount;
@ -51,7 +52,7 @@ public class FinancialReceivables extends BaseEntity
private String creditDetail; private String creditDetail;
/** 开户银行 */ /** 开户银行 */
@Excel(name = "开户银行",readConverterExp="0=中行基本户,建行一般户") @Excel(name = "开户银行")
private String openBank; private String openBank;
/** 开户账号 */ /** 开户账号 */

22
ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialReceivablesRecords.java

@ -30,6 +30,12 @@ public class FinancialReceivablesRecords extends BaseEntity
/** 关联销售订单号 */ /** 关联销售订单号 */
private String salesOrderCode; private String salesOrderCode;
/*借方科目*/
@Excel(name = "借方科目")
private String debitAccount;
@Excel(name = "借方科目开户银行")
private String debitBank;
/** 收款日期 */ /** 收款日期 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "收款日期", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "收款日期", width = 30, dateFormat = "yyyy-MM-dd")
@ -144,6 +150,22 @@ public class FinancialReceivablesRecords extends BaseEntity
return receivablesRemark; return receivablesRemark;
} }
public String getDebitAccount() {
return debitAccount;
}
public void setDebitAccount(String debitAccount) {
this.debitAccount = debitAccount;
}
public String getDebitBank() {
return debitBank;
}
public void setDebitBank(String debitBank) {
this.debitBank = debitBank;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

1
ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialReceivablesService.java

@ -101,4 +101,5 @@ public interface IFinancialReceivablesService
Map<String, Object> exportTemplate(List<FinancialReceivablesRecords> financialReceivablesRecordsList) throws IOException; Map<String, Object> exportTemplate(List<FinancialReceivablesRecords> financialReceivablesRecordsList) throws IOException;
Integer updateReceivableDebit(FinancialReceivables financialReceivables);
} }

5
ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialReceivablesServiceImpl.java

@ -397,4 +397,9 @@ public class FinancialReceivablesServiceImpl implements IFinancialReceivablesSer
//金额对象 //金额对象
return exportFinancialReceivablesVo; return exportFinancialReceivablesVo;
} }
@Override
public Integer updateReceivableDebit(FinancialReceivables financialReceivables){
return financialReceivablesMapper.updateFinancialReceivables(financialReceivables);
}
} }

BIN
ruoyi-admin/src/main/resources/attachments/FinancialReceiptVoucherTemplate.xlsx

Binary file not shown.

21
ruoyi-admin/src/main/resources/mapper/financial/FinancialReceivablesMapper.xml

@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="receivablesClosingStatus" column="receivables_closing_status" /> <result property="receivablesClosingStatus" column="receivables_closing_status" />
<result property="salesOrderCode" column="sales_order_code" /> <result property="salesOrderCode" column="sales_order_code" />
<result property="debitAccount" column="debit_account" /> <result property="debitAccount" column="debit_account" />
<result property="debitBank" column="debit_bank" />
<result property="creditAccount" column="credit_account" /> <result property="creditAccount" column="credit_account" />
<result property="creditDetail" column="credit_detail" /> <result property="creditDetail" column="credit_detail" />
<result property="openBank" column="open_bank" /> <result property="openBank" column="open_bank" />
@ -37,7 +38,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectFinancialReceivablesVo"> <sql id="selectFinancialReceivablesVo">
select financial_receivables_id, financial_receivables_code, receivables_closing_status, sales_order_code, credit_account, credit_detail, open_bank, open_account, customer_id, customer_name, contract_number, currency_type, price_excluding_tax, price_includes_tax, payment_condition, received_includes_tax, not_received_includes_tax, business_members, financial_deliver_status, receivables_date, receivables_price, receivables_abstract, operating_time, receivables_remark, create_time, create_by, update_by, update_time from financial_receivables select financial_receivables_id, financial_receivables_code, receivables_closing_status,
sales_order_code,debit_account, debit_bank, credit_account, credit_detail, open_bank,
open_account,customer_id, customer_name, contract_number, currency_type,price_excluding_tax,
price_includes_tax, payment_condition,received_includes_tax, not_received_includes_tax,
business_members,financial_deliver_status, receivables_date, receivables_price,receivables_abstract,
operating_time, receivables_remark,create_time, create_by, update_by, update_time
from financial_receivables
</sql> </sql>
<select id="selectFinancialReceivablesList" parameterType="FinancialReceivables" resultMap="FinancialReceivablesResult"> <select id="selectFinancialReceivablesList" parameterType="FinancialReceivables" resultMap="FinancialReceivablesResult">
@ -46,6 +53,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="financialReceivablesCode != null and financialReceivablesCode != ''"> and financial_receivables_code = #{financialReceivablesCode}</if> <if test="financialReceivablesCode != null and financialReceivablesCode != ''"> and financial_receivables_code = #{financialReceivablesCode}</if>
<if test="receivablesClosingStatus != null and receivablesClosingStatus != ''"> and receivables_closing_status = #{receivablesClosingStatus}</if> <if test="receivablesClosingStatus != null and receivablesClosingStatus != ''"> and receivables_closing_status = #{receivablesClosingStatus}</if>
<if test="salesOrderCode != null and salesOrderCode != ''"> and sales_order_code = #{salesOrderCode}</if> <if test="salesOrderCode != null and salesOrderCode != ''"> and sales_order_code = #{salesOrderCode}</if>
<if test="debitAccount != null and debitAccount != ''"> and debit_account = #{debitAccount}</if>
<if test="debitBank != null and debitBank != ''"> and debit_bank = #{debitBank}</if>
<if test="creditAccount != null and creditAccount != ''"> and credit_account = #{creditAccount}</if> <if test="creditAccount != null and creditAccount != ''"> and credit_account = #{creditAccount}</if>
<if test="creditDetail != null and creditDetail != ''"> and credit_detail = #{creditDetail}</if> <if test="creditDetail != null and creditDetail != ''"> and credit_detail = #{creditDetail}</if>
<if test="openBank != null and openBank != ''"> and open_bank = #{openBank}</if> <if test="openBank != null and openBank != ''"> and open_bank = #{openBank}</if>
@ -71,7 +80,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="financialReceivablesCode != null">financial_receivables_code,</if> <if test="financialReceivablesCode != null">financial_receivables_code,</if>
<if test="receivablesClosingStatus != null">receivables_closing_status,</if> <if test="receivablesClosingStatus != null">receivables_closing_status,</if>
<if test="salesOrderCode != null">sales_order_code,</if> <if test="salesOrderCode != null">sales_order_code,</if>
<if test="creditAccount != null">debit_account,</if> <if test="debitAccount != null">debit_account,</if>
<if test="debitBank != null">debit_bank,</if>
<if test="creditAccount != null">credit_account,</if> <if test="creditAccount != null">credit_account,</if>
<if test="creditDetail != null">credit_detail,</if> <if test="creditDetail != null">credit_detail,</if>
<if test="openBank != null">open_bank,</if> <if test="openBank != null">open_bank,</if>
@ -101,7 +111,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="financialReceivablesCode != null">#{financialReceivablesCode},</if> <if test="financialReceivablesCode != null">#{financialReceivablesCode},</if>
<if test="receivablesClosingStatus != null">#{receivablesClosingStatus},</if> <if test="receivablesClosingStatus != null">#{receivablesClosingStatus},</if>
<if test="salesOrderCode != null">#{salesOrderCode},</if> <if test="salesOrderCode != null">#{salesOrderCode},</if>
<if test="creditAccount != null">#{debitAccount},</if> <if test="debitAccount != null">#{debitAccount},</if>
<if test="debitBank != null">#{debitBank},</if>
<if test="creditAccount != null">#{creditAccount},</if> <if test="creditAccount != null">#{creditAccount},</if>
<if test="creditDetail != null">#{creditDetail},</if> <if test="creditDetail != null">#{creditDetail},</if>
<if test="openBank != null">#{openBank},</if> <if test="openBank != null">#{openBank},</if>
@ -135,7 +146,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="financialReceivablesCode != null">financial_receivables_code = #{financialReceivablesCode},</if> <if test="financialReceivablesCode != null">financial_receivables_code = #{financialReceivablesCode},</if>
<if test="receivablesClosingStatus != null">receivables_closing_status = #{receivablesClosingStatus},</if> <if test="receivablesClosingStatus != null">receivables_closing_status = #{receivablesClosingStatus},</if>
<if test="salesOrderCode != null">sales_order_code = #{salesOrderCode},</if> <if test="salesOrderCode != null">sales_order_code = #{salesOrderCode},</if>
<if test="creditAccount != null">debit_account = #{debitAccount},</if> <if test="debitAccount != null">debit_account = #{debitAccount},</if>
<if test="debitBank != null">debit_bank = #{debitBank},</if>
<if test="creditAccount != null">credit_account = #{creditAccount},</if> <if test="creditAccount != null">credit_account = #{creditAccount},</if>
<if test="creditDetail != null">credit_detail = #{creditDetail},</if> <if test="creditDetail != null">credit_detail = #{creditDetail},</if>
<if test="openBank != null">open_bank = #{openBank},</if> <if test="openBank != null">open_bank = #{openBank},</if>
@ -190,5 +202,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="findMaxRoundCode" resultType="String"> <select id="findMaxRoundCode" resultType="String">
SELECT MAX(SUBSTRING(financial_receivables_code, 7)) FROM financial_receivables WHERE financial_receivables_code LIKE CONCAT(#{prefix}, '%') SELECT MAX(SUBSTRING(financial_receivables_code, 7)) FROM financial_receivables WHERE financial_receivables_code LIKE CONCAT(#{prefix}, '%')
</select> </select>
</mapper> </mapper>

23
ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteChildMapper.xml

@ -190,4 +190,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
quoteChild.material_code = #{material} and quoteChild.del_flag = '0'; quoteChild.material_code = #{material} and quoteChild.del_flag = '0';
</select> </select>
<select id="findLatestAuditPassedGroups" parameterType="String" resultMap="PurchaseQuoteChildResult">
<!-- 子查询找出每个供应商分组的最大审计日期 -->
WITH max_audit_dates AS (
SELECT
purchase_quote_code,
MAX(audit_date) AS max_audit_date
FROM purchase_quote
WHERE audit_status = '1' AND use_status = '1'
GROUP BY purchase_quote_code
)
<!-- 主查询获取每个供应商分组最大审计日期的记录 -->
SELECT pc.*,pq.*
FROM purchase_quote_child AS pc
LEFT JOIN
purchase_quote AS pq ON pq.purchase_quote_code = pc.purchase_quote_code
LEFT JOIN
max_audit_dates AS mad ON pq.purchase_quote_code = mad.purchase_quote_code AND pq.audit_date = mad.max_audit_date
WHERE
pq.audit_status = '1' AND pq.use_status = '1' AND
pc.material_code = #{material} AND pc.del_flag = '0'
</select>
</mapper> </mapper>

2
ruoyi-admin/src/main/resources/templates/financial/receivables/add.html

@ -169,7 +169,7 @@
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-receivables-add').serialize()); $.operate.save(prefix + "/edit", $('#form-receivables-add').serialize());
} }
} }

40
ruoyi-admin/src/main/resources/templates/financial/receivables/addDebit.html

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增借方明细')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-receivables-addDebit" th:object="${debit}">
<input name="financialReceivablesId" th:field="*{financialReceivablesId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">借方科目:</label>
<div class="col-sm-8">
<select name="debitAccount" class="form-control" th:with="dict=${@dict.getType('receivables_debit_entry')}">
<option th:each="dict : ${dict}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">借方开户银行类型:</label>
<div class="col-sm-8">
<select name="debitBank" class="form-control" th:with="dict=${@dict.getType('receivables_bank')}">
<option th:each="dict : ${dict}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "financial/receivables"
$("#form-receivables-addDebit").validate({focusCleanup: true});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/addDebitEntiry", $('#form-receivables-addDebit').serialize());
}
}
</script>
</body>
</html>

4
ruoyi-admin/src/main/resources/templates/financial/receivables/addReceivablesVoucher.html

@ -53,9 +53,9 @@
<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="openBank" th:field="*{openBank}" class="form-control" th:with="type=${@dict.getType('receivables_bank')}"> <select name="debitBank" th:field="*{debitBank}" class="form-control" th:with="type=${@dict.getType('receivables_bank')}">
<option value=""></option> <option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{openBank}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{debitBank}"></option>
</select> </select>
<!-- <input name="openBank" th:field="*{openBank}" class="form-control" type="text" readonly>--> <!-- <input name="openBank" th:field="*{openBank}" class="form-control" type="text" readonly>-->
</div> </div>

8
ruoyi-admin/src/main/resources/templates/financial/receivables/addReceivablesVoucherNoSales.html

@ -18,7 +18,7 @@
<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="debitAccount" th:field="*{debitAccount}" class="form-control" th:with="type=${@dict.getType('receivables_debit_entry')}"> <select name="debitAccount" th:field="*{debitAccount}" class="form-control" th:with="type=${@dict.getType('receivables_debit_entry')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{debitAccount}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{debitAccount}"></option>
</select> </select>
<!-- <input name="openBank" th:field="*{openBank}" class="form-control" type="text" readonly>--> <!-- <input name="openBank" th:field="*{openBank}" class="form-control" type="text" readonly>-->
@ -27,7 +27,7 @@
<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="receivablesClosingStatus" class="form-control m-b" th:with="type=${@dict.getType('receivables_closing_status')}" readonly disabled> <select name="receivablesClosingStatus" class="form-control m-b" th:with="type=${@dict.getType('receivables_closing_status')}" readonly disabled />
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{receivablesClosingStatus}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{receivablesClosingStatus}"></option>
</select> </select>
</div> </div>
@ -47,8 +47,8 @@
<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="openBank" th:field="*{openBank}" class="form-control" th:with="type=${@dict.getType('receivables_bank')}"> <select name="debitBank" th:field="*{debitBank}" class="form-control" th:with="type=${@dict.getType('receivables_bank')}" disabled />
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{openBank}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{debitBank}"></option>
</select> </select>
<!-- <input name="openBank" th:field="*{openBank}" class="form-control" type="text" readonly>--> <!-- <input name="openBank" th:field="*{openBank}" class="form-control" type="text" readonly>-->
</div> </div>

4
ruoyi-admin/src/main/resources/templates/financial/receivables/edit.html

@ -164,9 +164,7 @@
<th:block th:include="include :: datetimepicker-js" /> <th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "financial/receivables"; var prefix = ctx + "financial/receivables";
$("#form-receivables-edit").validate({ $("#form-receivables-edit").validate({focusCleanup: true});
focusCleanup: true
});
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {

20
ruoyi-admin/src/main/resources/templates/financial/receivables/receivables.html

@ -121,6 +121,11 @@
restoreUrl: prefix + "/restore/{id}", restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
modalName: "财务应收账款", modalName: "财务应收账款",
fixedColumns: true, // 是否启用冻结列(左侧)
fixedNumber: 1, // 列冻结的个数(左侧)
rightFixedColumns: true, // 是否启用冻结列(右侧)
fixedRightNumber: 1,
height: $(window).height() - 100,
columns: [ columns: [
{checkbox: true}, {checkbox: true},
{title: '财务应收账款id', field: 'financialReceivablesId', visible: false}, {title: '财务应收账款id', field: 'financialReceivablesId', visible: false},
@ -144,13 +149,21 @@
{title: '录入时间', field: 'createTime',}, {title: '录入时间', field: 'createTime',},
{title: '更新人', field: 'updateBy',}, {title: '更新人', field: 'updateBy',},
{title: '上次更新时间', field: 'updateTime',}, {title: '上次更新时间', field: 'updateTime',},
{title:'借方科目', field: 'debitAccount',hidden:true},
{title:'借方开户银行', field: 'debitBank',hidden:true},
{title: '操作', align: 'center', {title: '操作', align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + addReceivablesVoucherFlag + '" href="javascript:void(0)" onclick="addReceivablesVoucher(\'' + row.financialReceivablesId + '\')"><i class="fa fa-edit"></i>创建收款凭证</a> '); if (row.debitAccount =="" || row.debitBank =="") {
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="addDebit(\'' + row.financialReceivablesId + '\')"><i class="fa fa-edit"></i>添加借方明细</a> ')
}else{
actions.push('<a class="btn btn-success btn-xs ' + addReceivablesVoucherFlag + '" href="javascript:void(0)" onclick="addReceivablesVoucher(\'' + row.financialReceivablesId + '\')"><i class="fa fa-edit"></i>创建收款凭证</a> ');
}
if (row.receivablesClosingStatus !== '2') { if (row.receivablesClosingStatus !== '2') {
actions.push('<a class="btn btn-success btn-xs ' + closingFlag + '" href="javascript:void(0)" onclick="confirmAndClose(\'' + row.financialReceivablesId + '\')"><i class="fa fa-edit"></i>结案</a> '); actions.push('<a class="btn btn-success btn-xs ' + closingFlag + '" href="javascript:void(0)" onclick="confirmAndClose(\'' + row.financialReceivablesId + '\')"><i class="fa fa-edit"></i>结案</a> ');
} }
actions.push('<a class="btn btn-success btn-xs ' + receivablesVoucherDetailFlag + '" href="javascript:void(0)" onclick="receivablesVoucherDetail(\'' + row.financialReceivablesId + '\')"><i class="fa fa-edit"></i>详情</a> '); actions.push('<a class="btn btn-success btn-xs ' + receivablesVoucherDetailFlag + '" href="javascript:void(0)" onclick="receivablesVoucherDetail(\'' + row.financialReceivablesId + '\')"><i class="fa fa-edit"></i>详情</a> ');
return actions.join(''); return actions.join('');
} }
@ -165,7 +178,10 @@
var url=ctx+'financial/receivables/addFinancialReceivables'; var url=ctx+'financial/receivables/addFinancialReceivables';
$.modal.open("添加应收账款",url); $.modal.open("添加应收账款",url);
} }
function addDebit(financialReceivablesId){
var url=ctx+'financial/receivables/addDebit/' + financialReceivablesId;
$.modal.open("添加借方明细",url);
}
//创建收款凭证 //创建收款凭证
function addReceivablesVoucher(financialReceivablesId){ function addReceivablesVoucher(financialReceivablesId){
var url = ctx+'financial/receivables/addReceivablesVoucher/'+financialReceivablesId; var url = ctx+'financial/receivables/addReceivablesVoucher/'+financialReceivablesId;

73
ruoyi-admin/src/main/resources/templates/purchase/purchasePlan/addPurchaseOrder.html

@ -489,6 +489,79 @@
} }
} }
//获取仓库相关信息Select2
//根据仓库ID查询仓库名称
$(function() {
// 初始化时默认加载仓库ID列表
loadWarehouseCodes();
// 监听仓库ID下拉框的变化
$("input[name='deliveryTime']").datepicker({
language: 'zh-CN',
todayHighlight: true,
format: "yyyy-mm-dd",
autoClose: true,
});
});
$('#stockNo').on('change', function() {
var selectedWarehouseCode = $(this).val(); // 获取选中的仓库ID
if (selectedWarehouseCode) {
// 发起Ajax请求获取仓库名称
$.ajax({
type: 'GET',
url: ctx +'stock/stockInfo/getStockNameByWarehouseCode/' + selectedWarehouseCode,
dataType: 'json', // 假设返回的数据格式是JSON
success: function(data) {
console.log(data);
// 将获取到的仓库名称填充到输入框
if(data.data == null){
// 如果返回的数据有问题,可以给出提示或处理
$.modal.alertWarning('未能获取到仓库名称!');
}
$('input[name="stockName"]').val(data.data.stockName);
$('input[name="stockAddress"]').val(data.data.stockAddr);
$('input[name="stockContact"]').val(data.data.stockManager);
$('input[name="stockPhone"]').val(data.data.stockManagerPhone);
},
error: function(jqXHR, textStatus, errorThrown) {
console.error('Error:', textStatus, errorThrown);
$.modal.alertWarning('查询仓库名称时发生错误!');
}
});
} else {
// 如果没有选择仓库ID,清空仓库名称输入框
$('input[name="warehouseName"]').val('');
}
});
// 加载仓库Id列表函数
function loadWarehouseCodes() {
var url = ctx + 'stock/stockInfo/getAllWarehouseCode';
$.ajax({
type: 'GET', // 请求类型
url: url, // 后端接口URL
dataType: 'json', // 预期服务器返回的数据类型
success: function(data) {
if (data && Array.isArray(data)) {
var selectElement = $('#stockNo'); // 获取仓库编号下拉框元素
// 清空下拉框现有选项
selectElement.empty();
// 添加默认选项(如果需要)编辑时不需要添加默认选项
// selectElement.append('<option value="">所有</option>');
// 遍历返回的数据,添加为下拉框的选项
$.each(data, function(index, item) {
// 仓库ID
selectElement.append('<option value="' + item.stockNO + '">' + item.stockNO + '</option>');
});
// $('#warehouseCode').val(stockNO);
} else {
$.modal.errMsg("数据为空");
}
}
});
}
</script> </script>
</body> </body>
</html> </html>

25
ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/taskModifyApply.html

@ -230,8 +230,29 @@
}, },
{title:'最新报价',field: 'materialSole',align: 'center',}, {title:'最新报价',field: 'materialSole',align: 'center',},
{title: '物料的数量', field: 'materialNum',align: 'center',editable: true,visible: false}, {title: '物料的数量', field: 'materialNum',align: 'center',editable: true,visible: false},
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',editable: true,}, {title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',
{title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',editable: true,}, editable:{
type: 'text',
validate: function(v) {
if (!v) return '输入不能为空';
if (isNaN(v)) return '输入错误';
if (v < 0) return '单价可以为0';
//正则金额保留两位小数
if (!/^\d+(\.\d{1,2})?$/.test(v)) return '金额保留两位小数';
}
}
},
{title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',editable:{
type: 'text',
validate: function(v) {
if (!v) return '输入不能为空';
if (isNaN(v)) return '输入错误';
if (v < 0) return '单价可以为0';
//正则金额保留两位小数
if (!/^\d+(\.\d{1,2})?$/.test(v)) return '金额保留两位小数';
}
}
},
{title: '录入人',field: 'createBy',align: 'center',visible: false}, {title: '录入人',field: 'createBy',align: 'center',visible: false},
{title: '录入时间',field: 'createTime',align: 'center',visible: false }, {title: '录入时间',field: 'createTime',align: 'center',visible: false },
{title: '更新人',field: 'updateBy',align: 'center',visible: false}, {title: '更新人',field: 'updateBy',align: 'center',visible: false},

137
ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/add.html

@ -10,21 +10,24 @@
<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="inventoryCheckName" class="form-control" type="text"> <input name="inventoryCheckName" 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 name="warehouseCode" class="form-control" type="text"> <select id="stockName" name="warehouseName" class="form-control">
<option value="">请选择仓库名称</option>
</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="warehouseName" class="form-control" type="text"> <input id="stockNO" name="warehouseCode" 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">
@ -64,10 +67,9 @@
<!--用于可以修改列表字段的插件--> <!--用于可以修改列表字段的插件-->
<th:block th:include="include :: bootstrap-table-editable-js" /> <th:block th:include="include :: bootstrap-table-editable-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var prefix = ctx + "warehouse/inventoryCheck" var prefix = ctx + "warehouse/inventoryCheck"
$("#form-inventoryCheck-add").validate({ $("#form-inventoryCheck-add").validate({focusCleanup: true});
focusCleanup: true
});
$("input[name='inventoryCheckDate']").datetimepicker({ $("input[name='inventoryCheckDate']").datetimepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
@ -143,58 +145,19 @@
showRefresh:false, showRefresh:false,
showSearch:false, showSearch:false,
singleSelect:true, singleSelect:true,
columns: [{ columns: [
checkbox: false {checkbox: false},
}, {title: '库存盘点详情ID', field: 'inventoryCheckDetailId', visible: false},
{ {title: '料号', field: 'materialNo',},
title: '库存盘点详情ID', {title: '物料名称', field: 'materialName',},
field: 'inventoryCheckDetailId', {title: '物料单位', field: 'materialUnit',},
visible: false {title: '物料描述', field: 'materialDescribe',},
}, {title: '盘点数量', field: 'inventoryCheckNum', editable:true},
{ {title: '当时库存账上数量', field: 'inventoryAccountNum', editable:true},
title: '料号', {title: '存放地址', field: 'warehouseStoreAddress', editable:true},
field: 'materialNo', {title: '批号', field: 'batchNumber', editable:true},
}, {title: '说明', field: 'remark', editable:true},
{ {title: '操作', align: 'center',
title: '物料名称',
field: 'materialName',
},
{
title: '物料单位',
field: 'materialUnit',
},
{
title: '物料描述',
field: 'materialDescribe',
},
{
title: '盘点数量',
field: 'inventoryCheckNum',
editable:true
},
{
title: '当时库存账上数量',
field: 'inventoryAccountNum',
editable:true
},
{
title: '存放地址',
field: 'warehouseStoreAddress',
editable:true
},
{
title: '批号',
field: 'batchNumber',
editable:true
},
{
title: '说明',
field: 'remark',
editable:true
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.receivablesRecordsId + '\')"><i class="fa fa-remove"></i>删除</a> '); actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.receivablesRecordsId + '\')"><i class="fa fa-remove"></i>删除</a> ');
@ -204,9 +167,10 @@
] ]
}; };
$.table.init(options); $.table.init(options);
loadWarehouseCodes();
$("input[name='inventoryCheckName']").value(loginName);
}) })
function doSubmit(index, layero,uniqueId){ function doSubmit(index, layero,uniqueId){
console.log(uniqueId); console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']]; var iframeWin = window[layero.find('iframe')[0]['name']];
@ -231,13 +195,54 @@
// 逻辑删除前端的一行数据 // 逻辑删除前端的一行数据
function removeRow(materialNo){ function removeRow(materialNo){
$("#bootstrap-table").bootstrapTable('remove', { $("#bootstrap-table").bootstrapTable('remove', {field: 'materialNo', values: materialNo})
field: 'materialNo',
values: materialNo
})
} }
function loadWarehouseCodes() {
var url = ctx + 'stock/stockInfo/getAllWarehouseCode';
$("#stockName").select2({
ajax: {
theme: "bootstrap",
allowClear: true,
placeholder: "请选择一个料号",
type: 'GET', // 请求类型
url: url, // 后端接口URL
dataType: 'json', // 预期服务器返回的数据类型
data: function(params) {
return {
q: params.term, // 搜索关键词
page: params.page || 1 ,// 当前页码
// 其他参数
pageSize: 30
};
},
processResults: function(data, params) {
params.page = params.page || 1;
var options = [];
for (var i = 0; i < data.length; i++) {
var option = {
id: data[i].stockName,
text: data[i].stockName,
title: data[i].stockNO
};
options.push(option);
}
var moreDataAvaliable = (params.page * 30) < data.total_count;
return {
// 实现下拉实现填入stockName
results: options,
pagination: {
more: moreDataAvaliable // 是否还有更多数据
}
};
}
}
});
}
$('#stockName').on('select2:select', function(e) {
var data = e.params.data;
$("input[name='warehouseCode']").val(data.title);
});
</script> </script>
</body> </body>
</html> </html>

113
ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/detail.html

@ -21,15 +21,17 @@
</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="warehouseCode" th:field="*{warehouseCode}" class="form-control" type="text" disabled> <select id="stockName" name="warehouseName" class="form-control" th:field="*{warehouseName}" disabled />
<option value="">请选择仓库名称</option>
</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="warehouseName" th:field="*{warehouseName}" class="form-control" type="text" disabled> <input name="warehouseCode" th:field="*{warehouseCode}" class="form-control" type="text" disabled/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -147,53 +149,22 @@
showRefresh:false, showRefresh:false,
showSearch:false, showSearch:false,
singleSelect:true, singleSelect:true,
columns: [{ columns: [
checkbox: false {checkbox: false},
}, {title: '库存盘点详情ID', field: 'inventoryCheckDetailId', visible: false},
{ {title: '料号', field: 'materialNo',},
title: '库存盘点详情ID', {title: '物料名称', field: 'materialName',},
field: 'inventoryCheckDetailId', {title: '物料单位', field: 'materialUnit',},
visible: false {title: '物料描述', field: 'materialDescribe',},
}, {title: '盘点数量', field: 'inventoryCheckNum',},
{ {title: '当时库存账上数量', field: 'inventoryAccountNum',},
title: '料号', {title: '存放地址', field: 'warehouseStoreAddress',},
field: 'materialNo', {title: '批号', field: 'batchNumber',},
}, {title: '说明', field: 'remark',},
{
title: '物料名称',
field: 'materialName',
},
{
title: '物料单位',
field: 'materialUnit',
},
{
title: '物料描述',
field: 'materialDescribe',
},
{
title: '盘点数量',
field: 'inventoryCheckNum',
},
{
title: '当时库存账上数量',
field: 'inventoryAccountNum',
},
{
title: '存放地址',
field: 'warehouseStoreAddress',
},
{
title: '批号',
field: 'batchNumber',
},
{
title: '说明',
field: 'remark',
},
] ]
}; };
$.table.init(options); $.table.init(options);
loadWarehouseCodes();
}) })
function queryParams(params) { function queryParams(params) {
@ -235,7 +206,51 @@
values: materialNo values: materialNo
}) })
} }
function loadWarehouseCodes() {
var url = ctx + 'stock/stockInfo/getAllWarehouseCode';
$("#stockName").select2({
ajax: {
theme: "bootstrap",
allowClear: true,
placeholder: "请选择一个料号",
type: 'GET', // 请求类型
url: url, // 后端接口URL
dataType: 'json', // 预期服务器返回的数据类型
data: function(params) {
return {
q: params.term, // 搜索关键词
page: params.page || 1 ,// 当前页码
// 其他参数
pageSize: 30
};
},
processResults: function(data, params) {
params.page = params.page || 1;
var options = [];
for (var i = 0; i < data.length; i++) {
var option = {
id: data[i].stockName,
text: data[i].stockName,
title: data[i].stockNO
};
options.push(option);
}
var moreDataAvaliable = (params.page * 30) < data.total_count;
return {
// 实现下拉实现填入stockName
results: options,
pagination: {
more: moreDataAvaliable // 是否还有更多数据
}
};
}
}
});
}
$('#stockName').on('select2:select', function(e) {
var data = e.params.data;
$("input[name='warehouseCode']").val(data.title);
});
</script> </script>
</body> </body>

140
ruoyi-admin/src/main/resources/templates/warehouse/inventoryCheck/edit.html

@ -3,6 +3,7 @@
<head> <head>
<th:block th:include="include :: header('修改仓库库存盘点')" /> <th:block th:include="include :: header('修改仓库库存盘点')" />
<th:block th:include="include :: datetimepicker-css" /> <th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: select2-css" />
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -21,15 +22,17 @@
</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="warehouseCode" th:field="*{warehouseCode}" class="form-control" type="text"> <select id="stockName" name="warehouseName" class="form-control" th:field="*{warehouseName}" />
<option value="">请选择仓库名称</option>
</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="warehouseName" th:field="*{warehouseName}" class="form-control" type="text"> <input name="warehouseCode" th:field="*{warehouseCode}" class="form-control" type="text" />
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -70,21 +73,17 @@
<th:block th:include="include :: datetimepicker-js" /> <th:block th:include="include :: datetimepicker-js" />
<!--用于可以修改列表字段的插件--> <!--用于可以修改列表字段的插件-->
<th:block th:include="include :: bootstrap-table-editable-js" /> <th:block th:include="include :: bootstrap-table-editable-js" />
<th:block th:include="include :: select2-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var prefix = ctx + "warehouse/inventoryCheck"; var prefix = ctx + "warehouse/inventoryCheck";
var warehouseInventoryCheck = [[${warehouseInventoryCheck}]]; var warehouseInventoryCheck = [[${warehouseInventoryCheck}]];
$("#form-inventoryCheck-edit").validate({focusCleanup: true});
$("#form-inventoryCheck-edit").validate({
focusCleanup: true
});
$("input[name='inventoryCheckDate']").datetimepicker({ $("input[name='inventoryCheckDate']").datetimepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
minView: "month", minView: "month",
autoclose: true autoclose: true
}); });
// 新增提交 // 新增提交
function submitHandler() { function submitHandler() {
// 获取表单数据 // 获取表单数据
@ -129,9 +128,6 @@
$.operate.saveJson(prefix + "/edit", jsonData); $.operate.saveJson(prefix + "/edit", jsonData);
} }
//添加物料信息 //添加物料信息
function insertRow() { function insertRow() {
var url = ctx + 'warehouse/inventoryCheck/materialSelect'; var url = ctx + 'warehouse/inventoryCheck/materialSelect';
@ -155,58 +151,19 @@
showRefresh:false, showRefresh:false,
showSearch:false, showSearch:false,
singleSelect:true, singleSelect:true,
columns: [{ columns: [
checkbox: false {checkbox: false},
}, {title: '库存盘点详情ID', field: 'inventoryCheckDetailId', visible: false},
{ {title: '料号', field: 'materialNo',},
title: '库存盘点详情ID', {title: '物料名称', field: 'materialName',},
field: 'inventoryCheckDetailId', {title: '物料单位', field: 'materialUnit',},
visible: false {title: '物料描述', field: 'materialDescribe',},
}, {title: '盘点数量', field: 'inventoryCheckNum', editable:true},
{ {title: '当时库存账上数量', field: 'inventoryAccountNum', editable:true},
title: '料号', {title: '存放地址', field: 'warehouseStoreAddress', editable:true},
field: 'materialNo', {title: '批号', field: 'batchNumber', editable:true},
}, {title: '说明', field: 'remark', editable:true},
{ {title: '操作', align: 'center',
title: '物料名称',
field: 'materialName',
},
{
title: '物料单位',
field: 'materialUnit',
},
{
title: '物料描述',
field: 'materialDescribe',
},
{
title: '盘点数量',
field: 'inventoryCheckNum',
editable:true
},
{
title: '当时库存账上数量',
field: 'inventoryAccountNum',
editable:true
},
{
title: '存放地址',
field: 'warehouseStoreAddress',
editable:true
},
{
title: '批号',
field: 'batchNumber',
editable:true
},
{
title: '说明',
field: 'remark',
editable:true
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.receivablesRecordsId + '\')"><i class="fa fa-remove"></i>删除</a> '); actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.receivablesRecordsId + '\')"><i class="fa fa-remove"></i>删除</a> ');
@ -216,6 +173,7 @@
] ]
}; };
$.table.init(options); $.table.init(options);
loadWarehouseCodes();
}) })
function queryParams(params) { function queryParams(params) {
@ -226,8 +184,6 @@
console.log(curParams); console.log(curParams);
return curParams; return curParams;
} }
function doSubmit(index, layero,uniqueId){ function doSubmit(index, layero,uniqueId){
console.log(uniqueId); console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']]; var iframeWin = window[layero.find('iframe')[0]['name']];
@ -249,7 +205,6 @@
}) })
layer.close(index); layer.close(index);
} }
// 逻辑删除前端的一行数据 // 逻辑删除前端的一行数据
function removeRow(materialNo){ function removeRow(materialNo){
$("#bootstrap-table").bootstrapTable('remove', { $("#bootstrap-table").bootstrapTable('remove', {
@ -257,7 +212,52 @@
values: materialNo values: materialNo
}) })
} }
// 加载仓库Id列表函数
function loadWarehouseCodes() {
var url = ctx + 'stock/stockInfo/getAllWarehouseCode';
$("#stockName").select2({
ajax: {
theme: "bootstrap",
allowClear: true,
placeholder: "请选择一个料号",
type: 'GET', // 请求类型
url: url, // 后端接口URL
dataType: 'json', // 预期服务器返回的数据类型
data: function(params) {
return {
q: params.term, // 搜索关键词
page: params.page || 1 ,// 当前页码
// 其他参数
pageSize: 30
};
},
processResults: function(data, params) {
params.page = params.page || 1;
var options = [];
for (var i = 0; i < data.length; i++) {
var option = {
id: data[i].stockName,
text: data[i].stockName,
title: data[i].stockNO
};
options.push(option);
}
var moreDataAvaliable = (params.page * 30) < data.total_count;
return {
// 实现下拉实现填入stockName
results: options,
pagination: {
more: moreDataAvaliable // 是否还有更多数据
}
};
}
}
});
}
$('#stockName').on('select2:select', function(e) {
var data = e.params.data;
$("input[name='warehouseCode']").val(data.title);
});
</script> </script>
</body> </body>

2
ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/add.html

@ -124,12 +124,12 @@
$("#form-inventoryInquiry-add").validate({ $("#form-inventoryInquiry-add").validate({
focusCleanup: true focusCleanup: true
}); });
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-inventoryInquiry-add').serialize()); $.operate.save(prefix + "/add", $('#form-inventoryInquiry-add').serialize());
} }
} }
</script> </script>
</body> </body>
</html> </html>

8
ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryHistory.html

@ -33,7 +33,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 name="materialType" th:field="*{materialType}" class="form-control" type="text" disabled> <select id="selectMaterialType" name="materialType"
class="form-control m-b select2-multiple"
th:with="childList=${@category.getChildByCode('materialType')}" required disabled>
<optgroup th:each="child: ${childList}" th:label="${child.name}">
<option th:each="childSon: ${child.children}" th:value="${childSon.code}" th:text="${#strings.concat(child.name,'-',childSon.name)}" th:field="*{materialType}"></option>
</optgroup>
</select>
</div> </div>
</div> </div>
</form> </form>

21
ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryInquiry.html

@ -69,6 +69,13 @@
updateUrl: prefix + "/edit/{id}", updateUrl: prefix + "/edit/{id}",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
modalName: "仓库库存查询", modalName: "仓库库存查询",
height: $(window).height() - 200,
modalWidth: 1200,
fixedColumns:true,
fixedNumber: 1,
fixedRightNumber: 1,
search: false,
showExport: true,
columns: [ columns: [
{checkbox: true}, {checkbox: true},
{title: '库存查询id', field: 'inventoryInquiryId', visible: false}, {title: '库存查询id', field: 'inventoryInquiryId', visible: false},
@ -114,13 +121,13 @@
{title: '录入人', field: 'createBy',}, {title: '录入人', field: 'createBy',},
{title: '更新人', field: 'updateBy',}, {title: '更新人', field: 'updateBy',},
{title: '上次更新时间', field: 'updateTime',}, {title: '上次更新时间', field: 'updateTime',},
{title: '操作', align: 'center', // {title: '操作', align: 'center',
formatter: function(value, row, index) { // formatter: function(value, row, index) {
var actions = []; // var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.inventoryInquiryId + '\')"><i class="fa fa-edit"></i>编辑</a> '); // actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.inventoryInquiryId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
return actions.join(''); // return actions.join('');
} // }
} // }
] ]
}; };
$.table.init(options); $.table.init(options);

110
ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/add.html

@ -3,6 +3,7 @@
<head> <head>
<th:block th:include="include :: header('新增仓库库存报损')" /> <th:block th:include="include :: header('新增仓库库存报损')" />
<th:block th:include="include :: datetimepicker-css" /> <th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: select2-css" />
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -16,9 +17,18 @@
<!-- </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 is-required">申请部门</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="makeNo" class="form-control" type="text"> <input name="applyDept" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">申请时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="applyTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -30,22 +40,13 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group" id="makeNoInput">
<label class="col-sm-3 control-label">申请部门</label> <label class="col-sm-3 control-label is-required">关联生产单号</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="applyDept" class="form-control" type="text"> <input name="makeNo" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <!-- <div class="form-group">
<label class="col-sm-3 control-label">申请时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="applyTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<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="materialNo" class="form-control" type="text"> <input name="materialNo" class="form-control" type="text">
@ -68,17 +69,17 @@
<div class="col-sm-8"> <div class="col-sm-8">
<input name="numTotal" class="form-control" type="text"> <input name="numTotal" class="form-control" type="text">
</div> </div>
</div> </div> -->
<div class="form-group"> <div class="form-group is-required">
<label class="col-sm-3 control-label">仓库ID:</label> <label class="col-sm-3 control-label">仓库ID:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="warehouseCode" class="form-control" type="text"> <select id="stockNoSelct" name="warehouseCode" class="form-control" required></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 is-required">仓库名称:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="warehouseName" class="form-control" type="text"> <input name="warehouseName" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -97,23 +98,84 @@
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" /> <th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: select2-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "warehouse/inventoryReportDamage" var prefix = ctx + "warehouse/inventoryReportDamage"
$("#form-inventoryReportDamage-add").validate({ $("#form-inventoryReportDamage-add").validate({focusCleanup: true});
focusCleanup: true
});
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-inventoryReportDamage-add').serialize()); $.operate.save(prefix + "/add", $('#form-inventoryReportDamage-add').serialize());
} }
} }
$(function () {
loadWarehouseCodes();
changeWhetherMakeNo();
});
//单选改变是否关联生产单号显示关联生产单号输入框
$("input[name='whetherMakeNo']").change(function () {
changeWhetherMakeNo();
});
//根据是否关联生产单号显示关联生产单号输入框
function changeWhetherMakeNo() {
$("#makeNoInput").display = function () {
var whetherMakeNo = $("input[name='whetherMakeNo']:checked").val();
if (whetherMakeNo == 1) {
$("#makeNoInput").show();
} else {
$("#makeNoInput").hide();
}
};
}
$("input[name='applyTime']").datetimepicker({ $("input[name='applyTime']").datetimepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
minView: "month", minView: "month",
autoclose: true autoclose: true
}); });
function loadWarehouseCodes() {
var url = ctx + 'stock/stockInfo/getAllWarehouseCode';
$("#stockNoSelct").select2({
ajax: {
theme: "bootstrap",
allowClear: true,
placeholder: "请选择",
type: 'GET', // 请求类型
url: url, // 后端接口URL
dataType: 'json', // 预期服务器返回的数据类型
delay:250,
timeout: 10000, // 设置超时时间为10秒
cache:true,
data: function(params) {
return {
q: params.term, // 搜索关键词
// 当前页码
page: params.page || 1 , pageSize: 30
};
},
processResults: function(data, params) {
params.page = params.page || 1;
var options = [];
for (var i = 0; i < data.length; i++) {
var option = {id: data[i].stockName, text: data[i].stockName,};
options.push(option);
}
var moreDataAvaliable = (params.page * 30) < data.total_count;
return {
// 实现下拉实现填入stockName
results: options,
pagination: {more: moreDataAvaliable,},
};
},
escapeMarkup: function (markup) { return markup; },
minimumInputLength: 1
}
});
}
$('#stockNoSelct').on('select2:select', function(e) {
var data = e.params.data;
$("input[name='warehouseCode']").val(data.stockNO);
$("input[name='warehouseStoreAddress']").val(data.stockAddress);
});
</script> </script>
</body> </body>
</html> </html>
Loading…
Cancel
Save