Browse Source

[feat]销售订单:修改物料合计类型改为Long类型。修改添加客户资料信息。

dev
zhangsiqi 5 months ago
parent
commit
29e5ad4068
  1. 6
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java
  2. 58
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java
  3. 5
      ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html

6
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java

@ -59,7 +59,7 @@ public class SysSalesOrder extends BaseEntity {
/*物料合计*/
private Double materialSum;
/*数量合计*/
private Double enterpriseSum;
private Long enterpriseSum;
/*不含税单价(RMB)*/
private Double noRmbPrice;
/*不含税总价(RMB)*/
@ -305,11 +305,11 @@ public class SysSalesOrder extends BaseEntity {
this.materialSum = materialSum;
}
public Double getEnterpriseSum() {
public Long getEnterpriseSum() {
return enterpriseSum;
}
public void setEnterpriseSum(Double enterpriseSum) {
public void setEnterpriseSum(Long enterpriseSum) {
this.enterpriseSum = enterpriseSum;
}

58
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java

@ -161,36 +161,36 @@ public class SysCustomerServiceImpl implements ISysCustomerService
sysCustomer.setCreateTime(DateUtils.getNowDate());
SysContacts sysContacts = new SysContacts();
//添加联系人
sysContacts.setCustomerName(sysCustomer.getCustomerContact());
sysContacts.setCellPhone(sysCustomer.getContactNumber());
sysContacts.setCustomerPosition(sysCustomer.getCustomerOffice());
sysContacts.setCustomerFax(sysCustomer.getCustomerFax());
sysContacts.setCommonEmail(sysCustomer.getCustomerEmail());
sysContacts.setEnterpriseCode(sysCustomer.getEnterpriseCode());
sysContacts.setEnterpriseName(sysCustomer.getEnterpriseName());
sysContactsService.insertSysContacts(sysContacts);
sysCustomer.setCustomerContactId(sysContacts.getContactid());
// sysContacts.setCustomerName(sysCustomer.getCustomerContact());
// sysContacts.setCellPhone(sysCustomer.getContactNumber());
// sysContacts.setCustomerPosition(sysCustomer.getCustomerOffice());
// sysContacts.setCustomerFax(sysCustomer.getCustomerFax());
// sysContacts.setCommonEmail(sysCustomer.getCustomerEmail());
// sysContacts.setEnterpriseCode(sysCustomer.getEnterpriseCode());
// sysContacts.setEnterpriseName(sysCustomer.getEnterpriseName());
// sysContactsService.insertSysContacts(sysContacts);
// sysCustomer.setCustomerContactId(sysContacts.getContactid());
//添加发货地址
SysShippingAddress sysShippingAddress = new SysShippingAddress();
sysShippingAddress.setCustomerName(sysCustomer.getCustomerContact());
sysShippingAddress.setCustomerPhone(sysCustomer.getDeliveryCustomerPhone());
sysShippingAddress.setCustomerName(sysCustomer.getDeliveryCustomerPerson());
sysShippingAddress.setPostalCode(sysCustomer.getDeliveryCustomerPostal());
sysShippingAddress.setDeliveryAddress(sysCustomer.getDeliveryAddress());
sysShippingAddress.setEnterpriseCode(sysCustomer.getEnterpriseCode());
sysShippingAddress.setEnterpriseName(sysCustomer.getEnterpriseName());
sysShippingAddressService.insertSysShippingAddress(sysShippingAddress);
sysCustomer.setDeliveryAddressId(sysShippingAddress.getDeliveryId());
SysInvoice invoice = new SysInvoice();
invoice.setEnterpriseCode(sysCustomer.getEnterpriseCode());
invoice.setEnterpriseName(sysCustomer.getEnterpriseName());
invoice.setInvoiceCompanyCode(sysCustomer.getInvoiceCode());
invoice.setInvoiceCompanyName(sysCustomer.getInvoicingCompanyName());
invoice.setDepositBank(sysCustomer.getDepositBank());
invoice.setBankAccount(sysCustomer.getBankAccount());
invoice.setCreateBy(loginName);
invoice.setCreateTime(DateUtils.getNowDate());
sysInvoiceService.insertSysInvoice(invoice);
// SysShippingAddress sysShippingAddress = new SysShippingAddress();
// sysShippingAddress.setCustomerName(sysCustomer.getCustomerContact());
// sysShippingAddress.setCustomerPhone(sysCustomer.getDeliveryCustomerPhone());
// sysShippingAddress.setCustomerName(sysCustomer.getDeliveryCustomerPerson());
// sysShippingAddress.setPostalCode(sysCustomer.getDeliveryCustomerPostal());
// sysShippingAddress.setDeliveryAddress(sysCustomer.getDeliveryAddress());
// sysShippingAddress.setEnterpriseCode(sysCustomer.getEnterpriseCode());
// sysShippingAddress.setEnterpriseName(sysCustomer.getEnterpriseName());
// sysShippingAddressService.insertSysShippingAddress(sysShippingAddress);
// sysCustomer.setDeliveryAddressId(sysShippingAddress.getDeliveryId());
// SysInvoice invoice = new SysInvoice();
// invoice.setEnterpriseCode(sysCustomer.getEnterpriseCode());
// invoice.setEnterpriseName(sysCustomer.getEnterpriseName());
// invoice.setInvoiceCompanyCode(sysCustomer.getInvoiceCode());
// invoice.setInvoiceCompanyName(sysCustomer.getInvoicingCompanyName());
// invoice.setDepositBank(sysCustomer.getDepositBank());
// invoice.setBankAccount(sysCustomer.getBankAccount());
// invoice.setCreateBy(loginName);
// invoice.setCreateTime(DateUtils.getNowDate());
// sysInvoiceService.insertSysInvoice(invoice);
int result = sysCustomerMapper.insertSysCustomer(sysCustomer);
sysCustomer.getCustomerId();
return result;

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

@ -234,7 +234,6 @@
pageSize: 10,
sortable: true, // 是否启用排序
sortStable: true, // 设置为 true 将获得稳定的排序
detailView: true,
fixedColumns: true, // 启用冻结列
rightFixedColumns:1,
fixedRightNumber: 1, // 冻结右列个数
@ -323,9 +322,7 @@
{title: '更新人',field:'updateBy'},
{title: '更新时间',field:'updateTime'},
{title: '备注',field:'remark'},
{title: '操作',
align: 'center',
formatter: function (value, row, index) {
{title: '操作',align: 'center',formatter: function (value, row, index) {
var actions = [];
if(row.auditStatus=="1" && row.useStatus=="1" && !row.cancelInstanceId) {
// 作废

Loading…
Cancel
Save