wanghairong преди 5 месеца
родител
ревизия
442414ed38
променени са 2 файла, в които са добавени 48 реда и са изтрити 7 реда
  1. 2 1
      src/views/customer/NewCustomerForm.vue
  2. 46 6
      src/views/customer/index.vue

+ 2 - 1
src/views/customer/NewCustomerForm.vue

@@ -266,7 +266,8 @@
             <a-tab-pane key="6" :title="$t('customer.purchaseQuality')">
                 <a-form :model="formData" :label-col-props="{ span: 8 }" :wrapper-col-props="{ span: 16 }">
                     <template v-for="(field, index) in imageUploadFields" :key="field">
-                        <a-form-item :field="field" :label="$t(`customer.${field}`)">
+                        <a-form-item :field="field"
+                            :label="$t(`customer.${field.split('.')[field.split('.').length - 1]}`)">
                             <a-upload action="/" :file-list="formData[field] ? [formData[field]] : []"
                                 :show-file-list="false" @change="(_, file) => handleFileUpload(field, file)"
                                 @progress="(file) => handleFileProgress(field, file)">

+ 46 - 6
src/views/customer/index.vue

@@ -34,9 +34,8 @@
         </div>
 
         <!-- 数据表格 -->
-        <a-table row-key="id" :columns="columns" :data="tableData" :pagination="pagination"
-            :scroll="{ x: '100%', y: '650px' }" :row-selection="{ type: 'checkbox', showCheckedAll: true }"
-            @page-change="onPageChange">
+        <a-table row-key="id" :columns="columns" :data="tableData" :pagination="pagination" :scroll="{ x: 'auto' }"
+            :row-selection="{ type: 'checkbox', showCheckedAll: true }" @page-change="onPageChange">
             <template #state="{ record }">
                 <a-tag :color="getStatusColor(record.state)">
                     {{ $t(`customer.status.${getStatusText(record.state)}`) }}
@@ -86,10 +85,51 @@ const columns = computed(() => [
 ]);
 
 onMounted(() => {
-    fetchCustomerList();
+    // fetchCustomerList();
 });
 
-const tableData = ref([]);
+const tableData = ref([
+    {
+        id: "1", customerCode: "8",
+        customerName: "泰国景和",
+        accountBalance: "TS001",
+        paymentMethod: "预付费",
+        state: "1",
+        validPeriod: "2024-12-54",
+        activeCards: "0/0",
+        updateTime: "2024-09-20 08:05:54"
+    },
+    {
+        id: "2", customerCode: "9",
+        customerName: "泰国景和",
+        accountBalance: "TS001",
+        paymentMethod: "后付费",
+        state: "1",
+        validPeriod: "2024-12-54",
+        activeCards: "0/0",
+        updateTime: "2024-09-20 08:05:54"
+    },
+    {
+        id: "3", customerCode: "10",
+        customerName: "泰国景和",
+        accountBalance: "TS001",
+        paymentMethod: "后付费",
+        state: "1",
+        validPeriod: "2024-12-54",
+        activeCards: "0/0",
+        updateTime: "2024-09-20 08:05:54"
+    },
+    {
+        id: "4", customerCode: "11",
+        customerName: "泰国景和",
+        accountBalance: "TS001",
+        paymentMethod: "后付费",
+        state: "1",
+        validPeriod: "2024-12-54",
+        activeCards: "0/0",
+        updateTime: "2024-09-20 08:05:54"
+    },
+]);
 
 // const pagination = reactive({
 //   // total: 100,
@@ -299,7 +339,7 @@ const getStatusText = (state) => {
 
 <style scoped>
 .customer-management {
-    padding: 20px;
+    padding: 20px !important;
 }
 
 .top-actions {