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 materialSum;
/*数量合计*/ /*数量合计*/
private Double enterpriseSum; private Long enterpriseSum;
/*不含税单价(RMB)*/ /*不含税单价(RMB)*/
private Double noRmbPrice; private Double noRmbPrice;
/*不含税总价(RMB)*/ /*不含税总价(RMB)*/
@ -305,11 +305,11 @@ public class SysSalesOrder extends BaseEntity {
this.materialSum = materialSum; this.materialSum = materialSum;
} }
public Double getEnterpriseSum() { public Long getEnterpriseSum() {
return enterpriseSum; return enterpriseSum;
} }
public void setEnterpriseSum(Double enterpriseSum) { public void setEnterpriseSum(Long enterpriseSum) {
this.enterpriseSum = 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()); sysCustomer.setCreateTime(DateUtils.getNowDate());
SysContacts sysContacts = new SysContacts(); SysContacts sysContacts = new SysContacts();
//添加联系人 //添加联系人
sysContacts.setCustomerName(sysCustomer.getCustomerContact()); // sysContacts.setCustomerName(sysCustomer.getCustomerContact());
sysContacts.setCellPhone(sysCustomer.getContactNumber()); // sysContacts.setCellPhone(sysCustomer.getContactNumber());
sysContacts.setCustomerPosition(sysCustomer.getCustomerOffice()); // sysContacts.setCustomerPosition(sysCustomer.getCustomerOffice());
sysContacts.setCustomerFax(sysCustomer.getCustomerFax()); // sysContacts.setCustomerFax(sysCustomer.getCustomerFax());
sysContacts.setCommonEmail(sysCustomer.getCustomerEmail()); // sysContacts.setCommonEmail(sysCustomer.getCustomerEmail());
sysContacts.setEnterpriseCode(sysCustomer.getEnterpriseCode()); // sysContacts.setEnterpriseCode(sysCustomer.getEnterpriseCode());
sysContacts.setEnterpriseName(sysCustomer.getEnterpriseName()); // sysContacts.setEnterpriseName(sysCustomer.getEnterpriseName());
sysContactsService.insertSysContacts(sysContacts); // sysContactsService.insertSysContacts(sysContacts);
sysCustomer.setCustomerContactId(sysContacts.getContactid()); // sysCustomer.setCustomerContactId(sysContacts.getContactid());
//添加发货地址 //添加发货地址
SysShippingAddress sysShippingAddress = new SysShippingAddress(); // SysShippingAddress sysShippingAddress = new SysShippingAddress();
sysShippingAddress.setCustomerName(sysCustomer.getCustomerContact()); // sysShippingAddress.setCustomerName(sysCustomer.getCustomerContact());
sysShippingAddress.setCustomerPhone(sysCustomer.getDeliveryCustomerPhone()); // sysShippingAddress.setCustomerPhone(sysCustomer.getDeliveryCustomerPhone());
sysShippingAddress.setCustomerName(sysCustomer.getDeliveryCustomerPerson()); // sysShippingAddress.setCustomerName(sysCustomer.getDeliveryCustomerPerson());
sysShippingAddress.setPostalCode(sysCustomer.getDeliveryCustomerPostal()); // sysShippingAddress.setPostalCode(sysCustomer.getDeliveryCustomerPostal());
sysShippingAddress.setDeliveryAddress(sysCustomer.getDeliveryAddress()); // sysShippingAddress.setDeliveryAddress(sysCustomer.getDeliveryAddress());
sysShippingAddress.setEnterpriseCode(sysCustomer.getEnterpriseCode()); // sysShippingAddress.setEnterpriseCode(sysCustomer.getEnterpriseCode());
sysShippingAddress.setEnterpriseName(sysCustomer.getEnterpriseName()); // sysShippingAddress.setEnterpriseName(sysCustomer.getEnterpriseName());
sysShippingAddressService.insertSysShippingAddress(sysShippingAddress); // sysShippingAddressService.insertSysShippingAddress(sysShippingAddress);
sysCustomer.setDeliveryAddressId(sysShippingAddress.getDeliveryId()); // sysCustomer.setDeliveryAddressId(sysShippingAddress.getDeliveryId());
SysInvoice invoice = new SysInvoice(); // SysInvoice invoice = new SysInvoice();
invoice.setEnterpriseCode(sysCustomer.getEnterpriseCode()); // invoice.setEnterpriseCode(sysCustomer.getEnterpriseCode());
invoice.setEnterpriseName(sysCustomer.getEnterpriseName()); // invoice.setEnterpriseName(sysCustomer.getEnterpriseName());
invoice.setInvoiceCompanyCode(sysCustomer.getInvoiceCode()); // invoice.setInvoiceCompanyCode(sysCustomer.getInvoiceCode());
invoice.setInvoiceCompanyName(sysCustomer.getInvoicingCompanyName()); // invoice.setInvoiceCompanyName(sysCustomer.getInvoicingCompanyName());
invoice.setDepositBank(sysCustomer.getDepositBank()); // invoice.setDepositBank(sysCustomer.getDepositBank());
invoice.setBankAccount(sysCustomer.getBankAccount()); // invoice.setBankAccount(sysCustomer.getBankAccount());
invoice.setCreateBy(loginName); // invoice.setCreateBy(loginName);
invoice.setCreateTime(DateUtils.getNowDate()); // invoice.setCreateTime(DateUtils.getNowDate());
sysInvoiceService.insertSysInvoice(invoice); // sysInvoiceService.insertSysInvoice(invoice);
int result = sysCustomerMapper.insertSysCustomer(sysCustomer); int result = sysCustomerMapper.insertSysCustomer(sysCustomer);
sysCustomer.getCustomerId(); sysCustomer.getCustomerId();
return result; return result;

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

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

Loading…
Cancel
Save