diff --git a/services/delivery-platform-api/src/main/java/cn/craftlabs/platform/api/persistence/customer/PlatformCustomer.java b/services/delivery-platform-api/src/main/java/cn/craftlabs/platform/api/persistence/customer/PlatformCustomer.java
index 7bbfe6b..4479f16 100644
--- a/services/delivery-platform-api/src/main/java/cn/craftlabs/platform/api/persistence/customer/PlatformCustomer.java
+++ b/services/delivery-platform-api/src/main/java/cn/craftlabs/platform/api/persistence/customer/PlatformCustomer.java
@@ -20,6 +20,16 @@ public class PlatformCustomer {
private String status;
+ private String industry;
+
+ private String address;
+
+ @TableField("billing_info")
+ private String billingInfo;
+
+ @TableField("customer_code")
+ private String customerCode;
+
@TableField("created_at")
private OffsetDateTime createdAt;
@@ -58,6 +68,38 @@ public class PlatformCustomer {
this.status = status;
}
+ public String getIndustry() {
+ return industry;
+ }
+
+ public void setIndustry(String industry) {
+ this.industry = industry;
+ }
+
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public String getBillingInfo() {
+ return billingInfo;
+ }
+
+ public void setBillingInfo(String billingInfo) {
+ this.billingInfo = billingInfo;
+ }
+
+ public String getCustomerCode() {
+ return customerCode;
+ }
+
+ public void setCustomerCode(String customerCode) {
+ this.customerCode = customerCode;
+ }
+
public OffsetDateTime getCreatedAt() {
return createdAt;
}
diff --git a/services/delivery-platform-api/src/main/java/cn/craftlabs/platform/api/service/CustomerService.java b/services/delivery-platform-api/src/main/java/cn/craftlabs/platform/api/service/CustomerService.java
index fc86274..86a7326 100644
--- a/services/delivery-platform-api/src/main/java/cn/craftlabs/platform/api/service/CustomerService.java
+++ b/services/delivery-platform-api/src/main/java/cn/craftlabs/platform/api/service/CustomerService.java
@@ -49,6 +49,10 @@ public class CustomerService {
PlatformCustomer c = new PlatformCustomer();
c.setName(request.getName().trim());
c.setCreditCode(blankToNull(request.getCreditCode()));
+ c.setIndustry(blankToNull(request.getIndustry()));
+ c.setAddress(blankToNull(request.getAddress()));
+ c.setBillingInfo(blankToNull(request.getBillingInfo()));
+ c.setCustomerCode(blankToNull(request.getCustomerCode()));
c.setStatus(resolveStatusForCreate(request.getStatus()));
c.setCreatedAt(now);
c.setUpdatedAt(now);
@@ -75,6 +79,18 @@ public class CustomerService {
if (request.getCreditCode() != null) {
c.setCreditCode(blankToNull(request.getCreditCode()));
}
+ if (request.getIndustry() != null) {
+ c.setIndustry(blankToNull(request.getIndustry()));
+ }
+ if (request.getAddress() != null) {
+ c.setAddress(blankToNull(request.getAddress()));
+ }
+ if (request.getBillingInfo() != null) {
+ c.setBillingInfo(blankToNull(request.getBillingInfo()));
+ }
+ if (request.getCustomerCode() != null) {
+ c.setCustomerCode(blankToNull(request.getCustomerCode()));
+ }
if (StringUtils.hasText(request.getStatus())) {
c.setStatus(request.getStatus().trim());
}
@@ -120,6 +136,10 @@ public class CustomerService {
r.setId(c.getId());
r.setName(c.getName());
r.setCreditCode(c.getCreditCode());
+ r.setIndustry(c.getIndustry());
+ r.setAddress(c.getAddress());
+ r.setBillingInfo(c.getBillingInfo());
+ r.setCustomerCode(c.getCustomerCode());
r.setStatus(c.getStatus());
r.setCreatedAt(c.getCreatedAt());
r.setUpdatedAt(c.getUpdatedAt());
diff --git a/services/delivery-platform-api/src/main/java/cn/craftlabs/platform/api/web/dto/CustomerRequest.java b/services/delivery-platform-api/src/main/java/cn/craftlabs/platform/api/web/dto/CustomerRequest.java
index 80413d5..eae1648 100644
--- a/services/delivery-platform-api/src/main/java/cn/craftlabs/platform/api/web/dto/CustomerRequest.java
+++ b/services/delivery-platform-api/src/main/java/cn/craftlabs/platform/api/web/dto/CustomerRequest.java
@@ -15,6 +15,18 @@ public class CustomerRequest {
@Size(max = 32)
private String status;
+ @Size(max = 128)
+ private String industry;
+
+ @Size(max = 512)
+ private String address;
+
+ @Size(max = 512)
+ private String billingInfo;
+
+ @Size(max = 64)
+ private String customerCode;
+
public String getName() {
return name;
}
@@ -38,4 +50,36 @@ public class CustomerRequest {
public void setStatus(String status) {
this.status = status;
}
+
+ public String getIndustry() {
+ return industry;
+ }
+
+ public void setIndustry(String industry) {
+ this.industry = industry;
+ }
+
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public String getBillingInfo() {
+ return billingInfo;
+ }
+
+ public void setBillingInfo(String billingInfo) {
+ this.billingInfo = billingInfo;
+ }
+
+ public String getCustomerCode() {
+ return customerCode;
+ }
+
+ public void setCustomerCode(String customerCode) {
+ this.customerCode = customerCode;
+ }
}
diff --git a/services/delivery-platform-api/src/main/java/cn/craftlabs/platform/api/web/dto/CustomerResponse.java b/services/delivery-platform-api/src/main/java/cn/craftlabs/platform/api/web/dto/CustomerResponse.java
index 088bd33..26ea1a2 100644
--- a/services/delivery-platform-api/src/main/java/cn/craftlabs/platform/api/web/dto/CustomerResponse.java
+++ b/services/delivery-platform-api/src/main/java/cn/craftlabs/platform/api/web/dto/CustomerResponse.java
@@ -8,6 +8,10 @@ public class CustomerResponse {
private String name;
private String creditCode;
private String status;
+ private String industry;
+ private String address;
+ private String billingInfo;
+ private String customerCode;
private OffsetDateTime createdAt;
private OffsetDateTime updatedAt;
@@ -43,6 +47,38 @@ public class CustomerResponse {
this.status = status;
}
+ public String getIndustry() {
+ return industry;
+ }
+
+ public void setIndustry(String industry) {
+ this.industry = industry;
+ }
+
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public String getBillingInfo() {
+ return billingInfo;
+ }
+
+ public void setBillingInfo(String billingInfo) {
+ this.billingInfo = billingInfo;
+ }
+
+ public String getCustomerCode() {
+ return customerCode;
+ }
+
+ public void setCustomerCode(String customerCode) {
+ this.customerCode = customerCode;
+ }
+
public OffsetDateTime getCreatedAt() {
return createdAt;
}
diff --git a/services/delivery-platform-api/src/main/resources/db/migration/V9__m1_enhancements.sql b/services/delivery-platform-api/src/main/resources/db/migration/V9__m1_enhancements.sql
new file mode 100644
index 0000000..52b3f6a
--- /dev/null
+++ b/services/delivery-platform-api/src/main/resources/db/migration/V9__m1_enhancements.sql
@@ -0,0 +1,11 @@
+-- V9__m1_enhancements.sql
+ALTER TABLE platform_customer
+ ADD COLUMN IF NOT EXISTS industry VARCHAR(128),
+ ADD COLUMN IF NOT EXISTS address TEXT,
+ ADD COLUMN IF NOT EXISTS billing_info TEXT,
+ ADD COLUMN IF NOT EXISTS customer_code VARCHAR(64);
+
+ALTER TABLE platform_project
+ ADD COLUMN IF NOT EXISTS planned_start_date DATE,
+ ADD COLUMN IF NOT EXISTS planned_end_date DATE,
+ ADD COLUMN IF NOT EXISTS project_manager VARCHAR(128);
diff --git a/web/delivery-platform-ui/src/views/CustomersView.vue b/web/delivery-platform-ui/src/views/CustomersView.vue
index ba2b863..342065a 100644
--- a/web/delivery-platform-ui/src/views/CustomersView.vue
+++ b/web/delivery-platform-ui/src/views/CustomersView.vue
@@ -49,6 +49,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
取消
@@ -81,6 +93,10 @@ const formRef = ref(null);
const form = reactive({
name: "",
creditCode: "",
+ industry: "",
+ address: "",
+ billingInfo: "",
+ customerCode: "",
});
const rules = {
@@ -129,12 +145,20 @@ function openEdit(row) {
editingId.value = row.id;
form.name = row.name ?? "";
form.creditCode = row.creditCode ?? "";
+ form.industry = row.industry ?? "";
+ form.address = row.address ?? "";
+ form.billingInfo = row.billingInfo ?? "";
+ form.customerCode = row.customerCode ?? "";
dialogVisible.value = true;
}
function resetForm() {
form.name = "";
form.creditCode = "";
+ form.industry = "";
+ form.address = "";
+ form.billingInfo = "";
+ form.customerCode = "";
formRef.value?.resetFields?.();
}
@@ -150,6 +174,10 @@ async function submit() {
const payload = {
name: form.name.trim(),
creditCode: form.creditCode?.trim() || undefined,
+ industry: form.industry?.trim() || undefined,
+ address: form.address?.trim() || undefined,
+ billingInfo: form.billingInfo?.trim() || undefined,
+ customerCode: form.customerCode?.trim() || undefined,
};
try {
if (editingId.value != null) {