| | |
| | | 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 |
| | | } |
| | | |
| | |
| | | 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; |
| | |
| | | a.*, |
| | | b.project, |
| | | b.salesman_id, |
| | | b.salesman |
| | | b.salesman, |
| | | b.contacts, |
| | | b.contact_number |
| | | from |
| | | sd.customer as a |
| | | left join (SELECT |
| | |
| | | o.project, |
| | | o.salesman_id, |
| | | o.salesman, |
| | | o.contacts, |
| | | o.contact_number, |
| | | o.customer_id |
| | | FROM |
| | | sd.ORDER AS o |
| | |
| | | |
| | | </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 |