mirror of
https://github.com/hpd840321/craftlabs-authorization-sdk.git
synced 2026-06-09 10:00:30 +08:00
feat(m1): add industry/address/billing/customerCode fields to customer
This commit is contained in:
@@ -49,6 +49,18 @@
|
||||
<el-form-item label="统一社会信用代码" prop="creditCode">
|
||||
<el-input v-model="form.creditCode" maxlength="32" clearable placeholder="选填" />
|
||||
</el-form-item>
|
||||
<el-form-item label="行业">
|
||||
<el-input v-model="form.industry" maxlength="128" placeholder="选填" />
|
||||
</el-form-item>
|
||||
<el-form-item label="地址">
|
||||
<el-input v-model="form.address" type="textarea" :rows="2" maxlength="512" placeholder="选填" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开票信息">
|
||||
<el-input v-model="form.billingInfo" type="textarea" :rows="2" maxlength="512" placeholder="选填" />
|
||||
</el-form-item>
|
||||
<el-form-item label="客户编码">
|
||||
<el-input v-model="form.customerCode" maxlength="64" placeholder="选填" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user