guoyuji
2025-02-17 baf2626dfa2916370aa1cec6c8608e8574e6609f
更改客户带出相应联系人、联系电话
3个文件已修改
15 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/sd/Customer.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/CustomerMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -1130,10 +1130,13 @@
const changeCustomer =  () => {
  const changedCustomerId = titleUploadData.value.customerId
  const customer = titleSelectJson.value.customer.filter(item => item.id === changedCustomerId)
  console.log(customer)
  titleUploadData.value.customerName = customer[0].customerName
  titleUploadData.value.project = customer[0].project
  titleUploadData.value.salesmanId = customer[0].salesmanId
  titleUploadData.value.salesman = customer[0].salesman
  titleUploadData.value.contacts = customer[0].contacts
  titleUploadData.value.contactNumber = customer[0].contactNumber
  projects.value = customer[0].projectList
}
north-glass-erp/src/main/java/com/example/erp/entity/sd/Customer.java
@@ -27,6 +27,10 @@
    private Integer salesmanId;
    @TableField(select = false,exist = false)
    private String salesman;
    @TableField(select = false,exist = false)
    private String contacts;
    @TableField(select = false,exist = false)
    private String contactNumber;
    @TableField(select = false,exist = false)
    private List<Map<String,Object>> projectList;
north-glass-erp/src/main/resources/mapper/sd/CustomerMapper.xml
@@ -115,7 +115,9 @@
            a.*,
            b.project,
            b.salesman_id,
            b.salesman
            b.salesman,
            b.contacts,
            b.contact_number
        from
            sd.customer as a
        left join (SELECT
@@ -128,6 +130,8 @@
                               o.project,
                               o.salesman_id,
                               o.salesman,
                               o.contacts,
                               o.contact_number,
                               o.customer_id
                           FROM
                               sd.ORDER AS o
@@ -138,7 +142,7 @@
    </select>
    <select id="getProjectList">
        select * from(select project,salesman_id,salesman,id from sd.`order`
        select * from(select project,salesman_id,salesman,contacts,contact_number,id from sd.`order`
                       where customer_id = #{id}
                      group by project
                       ) as a