Browse Source

[feat]

销售管理 客户资料 其他联系人
修改联系人mapper,新增按客户代码查询列表的方法;
修改联系人service接口,新增按客户代码查询列表的方法;
销售管理 客户资料 其他收货地址
修改其他收货地址mapper,新增按客户代码查询列表的方法;
修改其他收货地址service接口,新增按客户代码查询列表的方法;
销售管理 客户资料 客户基本信息
修改客户信息详情页面,新增关联联系人列表显示表格;
修改客户信息详情页面,新增关联其他收货地址列表显示表格;
修改客户信息详情页面,新增关联其他开票信息列表显示表格;
修改客户信息详情后端接口,查询该客户信息时同时查询其他联系人、其他收货地址、其他开票信息附加到页面;
dev
王晓迪 4 months ago
parent
commit
8be8900dd6
  1. 9
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java
  2. 7
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysContactsMapper.java
  3. 8
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysInvoiceMapper.java
  4. 8
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysContactsService.java
  5. 8
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysInvoiceService.java
  6. 5
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysContactsServiceImpl.java
  7. 5
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysInvoiceServiceImpl.java
  8. 7
      ruoyi-admin/src/main/resources/mapper/system/SysContactsMapper.xml
  9. 7
      ruoyi-admin/src/main/resources/mapper/system/SysInvoiceMapper.xml
  10. 193
      ruoyi-admin/src/main/resources/templates/system/customer/detail.html

9
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java

@ -62,6 +62,8 @@ public class SysCustomerController extends BaseController
@Autowired
private ISysContactsService sysContactsService;
@Autowired
private ISysInvoiceService sysInvoiceService;
@Autowired
private ISysShippingAddressService sysShippingAddressService ;
@Autowired
private ISysDictTypeService sysDictTypeService;
@ -210,6 +212,13 @@ public class SysCustomerController extends BaseController
public String detail(@PathVariable("id")Long id, ModelMap mmap)
{
SysCustomer sysCustomer = sysCustomerService.selectSysCustomerById(id);
String enterpriseCode = sysCustomer.getEnterpriseCode();
List<SysContacts> sysContacts = sysContactsService.selectSysContactsByCode(enterpriseCode);
List<SysInvoice> sysInvoices = sysInvoiceService.selectSysInvoiceByCode(enterpriseCode);
List<SysShippingAddress> shippingAddresses = sysShippingAddressService.selectSysShippingAddressByenterpriseCode(enterpriseCode);
mmap.put("contactsList",sysContacts);
mmap.put("invoicesList",sysInvoices);
mmap.put("shippingAddressList",shippingAddresses);
mmap.put("sysCustomer", sysCustomer);
return prefix + "/detail";
}

7
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysContactsMapper.java

@ -28,6 +28,13 @@ public interface SysContactsMapper
*/
List<SysContacts> selectSysContactsList(SysContacts sysContacts);
/**
* 查询联系人明细列表
*
* @param enterpriseCode 客户编号
* @return 联系人明细集合
*/
List<SysContacts> selectSysContactsByCode(String enterpriseCode);
/**
* 新增联系人明细
*

8
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysInvoiceMapper.java

@ -26,7 +26,13 @@ public interface SysInvoiceMapper
* @return 其他开票信息集合
*/
public List<SysInvoice> selectSysInvoiceList(SysInvoice sysInvoice);
/**
* 查询其他开票信息列表
*
* @param enterpriseCode 客户代码
* @return 其他开票信息集合
*/
public List<SysInvoice> selectSysInvoiceByCode(String enterpriseCode);
/**
* 新增其他开票信息
*

8
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysContactsService.java

@ -27,6 +27,14 @@ public interface ISysContactsService
*/
public List<SysContacts> selectSysContactsList(SysContacts sysContacts);
/**
* 查询联系人明细列表
*
* @param enterpriseCode 客户编号
* @return 联系人明细集合
*/
List<SysContacts> selectSysContactsByCode(String enterpriseCode);
/**
* 新增联系人明细
*

8
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysInvoiceService.java

@ -27,6 +27,14 @@ public interface ISysInvoiceService
*/
public List<SysInvoice> selectSysInvoiceList(SysInvoice sysInvoice);
/**
* 查询其他开票信息列表
*
* @param enterpriseCode 客户代码
* @return 其他开票信息集合
*/
public List<SysInvoice> selectSysInvoiceByCode(String enterpriseCode);
/**
* 新增其他开票信息
*

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

@ -48,6 +48,11 @@ public class SysContactsServiceImpl implements ISysContactsService
return sysContactsMapper.selectSysContactsList(sysContacts);
}
@Override
public List<SysContacts> selectSysContactsByCode(String enterpriseCode) {
return sysContactsMapper.selectSysContactsByCode(enterpriseCode);
}
/**
* 新增联系人明细
*

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

@ -51,6 +51,11 @@ public class SysInvoiceServiceImpl implements ISysInvoiceService
return sysInvoiceMapper.selectSysInvoiceList(sysInvoice);
}
@Override
public List<SysInvoice> selectSysInvoiceByCode(String enterpriseCode) {
return sysInvoiceMapper.selectSysInvoiceByCode(enterpriseCode);
}
/**
* 新增其他开票信息
*

7
ruoyi-admin/src/main/resources/mapper/system/SysContactsMapper.xml

@ -45,7 +45,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectSysContactsVo"/>
where contactid = #{contactid}
</select>
<select id="selectSysContactsByCode" parameterType="String" resultMap="SysContactsResult">
<include refid="selectSysContactsVo"/>
where enterprise_code = #{enterpriseCode}
</select>
<insert id="insertSysContacts" parameterType="SysContacts" useGeneratedKeys="true" keyProperty="contactid">
insert into sys_contacts
<trim prefix="(" suffix=")" suffixOverrides=",">

7
ruoyi-admin/src/main/resources/mapper/system/SysInvoiceMapper.xml

@ -38,7 +38,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectSysInvoiceVo"/>
where id = #{id}
</select>
<select id="selectSysInvoiceByCode" parameterType="String" resultMap="SysInvoiceResult">
<include refid="selectSysInvoiceVo"/>
where enterprise_code = #{enterpriseCode}
</select>
<insert id="insertSysInvoice" parameterType="SysInvoice" useGeneratedKeys="true" keyProperty="id">
insert into sys_invoice
<trim prefix="(" suffix=")" suffixOverrides=",">

193
ruoyi-admin/src/main/resources/templates/system/customer/detail.html

@ -264,6 +264,24 @@
<table id="oper-table"></table>
</div>
</div>
<div class="container">
<label class=" control-label">其他联系人</label>
<div class="col-sm-12 select-table table-striped">
<table id="contacts-table"></table>
</div>
</div>
<div class="container">
<label class=" control-label">其他送货地址</label>
<div class="col-sm-12 select-table table-striped">
<table id="shippingaddress-table"></table>
</div>
</div>
<div class="container">
<label class=" control-label">其他开票信息</label>
<div class="col-sm-12 select-table table-striped">
<table id="invoice-table"></table>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
@ -447,6 +465,181 @@
}
]
});
// 其他联系人信息
$('#contacts-table').bootstrapTable({
data: [[${contactsList}]],
// pagination: true,
// pageNumber: 1,
// pageSize: 10,
// pageList: [10, 25, 50, 100],
maxHeight: 50,
modalName: "联系人明细",
columns: [
{
field: 'contactid',
title: '联系人id',
visible: false,
},
{
field: 'enterpriseCode',
title: '客户/企业代码',
visible: false,
},
{
field: 'enterpriseName',
title: '客户/企业名称',
visible: false,
},
{
field: 'customerName',
title: '姓名'
},
{
field: 'customerPosition',
title: '职务'
},
{
field: 'customerBirthday',
title: '生日'
},
{
field: 'officeTelephone',
title: '办公电话'
},
{
field: 'homePhone',
title: '家中电话'
},
{
field: 'cellPhone',
title: '手机号'
},
{
field: 'customerFax',
title: '传真'
},
{
field: 'standbyTelephoneOne',
title: '备用电话1'
},
{
field: 'standbyTelephoneTwo',
title: '备用电话2'
},
{
field: 'commonEmail',
title: '常用Email'
},
{
field: 'alternateEmail',
title: '备用Email'
},
{
field: 'customerRemarks',
title: '备注'
},
{
field: 'firstAddTime',
title: '录入时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
return value;
}
}
},
{
field: 'updateInfoTime',
title: '上次修改时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
var vArr = value.split(',')
return vArr[0];
}
}
},
]
});
// 其他收货地址
$('#shippingaddress-table').bootstrapTable({
data: [[${shippingAddressList}]],
// pagination: true,
// pageNumber: 1,
// pageSize: 10,
// pageList: [10, 25, 50, 100],
maxHeight: 50,
modalName: "收货地址明细",
columns: [
{title: '送货id',field: 'deliveryId',visible:false},
{title: '客户/企业代码',field: 'enterpriseCode',visible:false},
{title: '客户/企业名称',field: 'enterpriseName',visible:false},
{title: '联系人电话',field: 'customerPhone'},
{title: '联系人',field: 'customerName'},
{title: '送货地址',field: 'deliveryAddress'},
{title: '联系人2',field: 'customerNameTwo'},
{title: '详细描述',field: 'detailedDescription'},
{title: '厂区',field: 'plantArea'},
{title: '邮编',field: 'postalCode'},
{title: '传真',field: 'customerFax'},
{title: '录入时间',field: 'firstAddTime',
formatter: function (value, row, index) {if (value == null) {return " ";}else {return value;}}
},
{title: '上次修改时间',field: 'updateInfoTime',
formatter: function (value, row, index) {if (value == null) {return " ";} else {var vArr = value.split(','); return vArr[0];}}
},
]
});
// 其他开票信息
$('#invoice-table').bootstrapTable({
data: [[${invoicesList}]],
// pagination: true,
// pageNumber: 1,
// pageSize: 10,
// pageList: [10, 25, 50, 100],
maxHeight: 50,
modalName: "开票信息",
columns: [
{
title: '开票索引编号',
field: 'id',
visible: false
},
{
title: '开票ID',
field: 'invoiceId',
},
{
title: '企业代码',
field: 'enterpriseCode',
},
{
title: '企业名称',
field: 'enterpriseName',
},
{
title: '开票公司名称',
field: 'invoiceCompanyName',
},
{
title: '开票公司税号',
field: 'invoiceCompanyCode',
},
{
title: '公司开户行',
field: 'depositBank',
},
{
title: '公司开户账号',
field: 'bankAccount',
},
]
});
</script>
</body>
</html>
Loading…
Cancel
Save