Bladeren bron

下载和搜索功能添加以及公司管理功能添加

liujintao 2 maanden geleden
bovenliggende
commit
acee73512d

+ 1 - 0
src/auto-imports.d.ts

@@ -7,6 +7,7 @@
 export {}
 declare global {
   const EffectScope: typeof import('vue')['EffectScope']
+  const ElMessage: typeof import('element-plus/es')['ElMessage']
   const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
   const computed: typeof import('vue')['computed']
   const createApp: typeof import('vue')['createApp']

+ 1 - 1
src/utils/service.ts

@@ -96,7 +96,7 @@ function createService() {
 						return dataAxios;
 					case 4000:
 						errorCreate(`${dataAxios.msg}: ${response.config.url}`);
-						break;
+						return dataAxios;
 					default:
 						// 不是正确的 code
 						errorCreate(`${dataAxios.msg}: ${response.config.url}`);

+ 31 - 0
src/utils/useDownload.ts

@@ -0,0 +1,31 @@
+/**
+ * 通用下载方法
+ * @param apiMethod - 调用的 API 方法,返回一个 Promise。
+ * @param  queryParams - 请求参数。
+ * @param fileName - 下载文件的名称。
+ * @param successMessage - 成功时的消息提示函数。
+ * @param  errorMessage - 失败时的消息提示函数。
+ */
+
+export async function uesDownloadFile({
+	apiMethod,
+	queryParams = {},
+	fileName = '下载文件.xlsx',
+	successMessage = () => ElMessage.success('文件下载成功!'),
+	errorMessage = () => ElMessage.error('文件下载失败,请重试!'),
+}) {
+	try {
+		const response = await apiMethod(queryParams);
+		const url = window.URL.createObjectURL(new Blob([response.data]));
+		const link = document.createElement('a');
+		link.href = url;
+		link.setAttribute('download', fileName);
+		document.body.appendChild(link);
+		link.click();
+		document.body.removeChild(link); // 清理 DOM
+		successMessage();
+	} catch (error) {
+		errorMessage();
+		console.error('下载文件出错:', error);
+	}
+}

+ 1 - 1
src/utils/usePagination.ts

@@ -7,7 +7,7 @@ export function usePagination(getData: Function) {
     data: [],
     total: 0,
     page: 1,
-    limit: 15,
+    limit: 10,
     loading: false
   })
   /**

+ 76 - 20
src/views/company-information/components/CompanyCreate.vue

@@ -22,23 +22,35 @@ interface ContactItem {
 }
 
 interface RuleForm {
-  name: string;
+  company: string;
   address: string;
-  enName: string;
+  companyEnglishName: string;
   juridicalPerson: string;
   vatNumber: string;
   vatCompany: string;
+  ipaddress: string;
+  juridicalPersonCreditCard: string;
+  juridicalPersonCreditCardAddress: string;
+  shopPhone: string;
+  shopEmail: string;
+  receivablesAccount:string;
   contacts: ContactItem[];
 }
 
 const ruleFormRef = ref<FormInstance>();
 const form = reactive<RuleForm>({
-  name: '',
+  company: '',
   address: '',
-  enName: '',
+  companyEnglishName: '',
   juridicalPerson: '',
   vatNumber: '',
   vatCompany: '',
+  ipaddress:'',
+  juridicalPersonCreditCard:'',
+  juridicalPersonCreditCardAddress:'',
+  shopPhone:'',
+  shopEmail:'',
+  receivablesAccount:'',
   contacts: [
     {
       phone: '',
@@ -48,16 +60,28 @@ const form = reactive<RuleForm>({
 });
 
 const rules = reactive<FormRules<RuleForm>>({
-  name: [ { required: true, message: '请输入公司名称', trigger: 'blur' } ],
-  enName: [ { required: true, message: '请输入公司英文名称', trigger: 'blur' } ],
+  company: [ { required: true, message: '请输入公司名称', trigger: 'blur' } ],
+  companyEnglishName: [ { required: true, message: '请输入公司英文名称', trigger: 'blur' } ],
   address: [ { required: true, message: '请输入公司地址', trigger: 'blur' } ],
   juridicalPerson: [ { required: true, message: '请输入公司法人', trigger: 'blur' } ],
-  vatNumber: [ { required: true, message: '请输入VAT税号', trigger: 'blur' } ],
-  vatCompany: [ { required: true, message: '请输入VAT税号公司', trigger: 'blur' } ],
+
+  juridicalPersonCreditCard: [ { required: true, message: '请输入法人信用卡号', trigger: 'blur' } ],
+  juridicalPersonCreditCardAddress: [ { required: true, message: '请输入法人信用卡地址', trigger: 'blur' } ],
+  ipaddress: [ { required: true, message: '请输入IP地址', trigger: 'blur' } ],
+
+  receivablesAccount: [ { required: false, message: '请输入收款账户', trigger: 'blur' } ],
+
+  shopEmail:[
+    { required: true, message: '请输入主账号邮箱', trigger: 'blur' },
+    { type: 'email', message: '请输入有效的邮箱地址', trigger: 'blur' }
+  ],
+  shopPhone: [ { required: true, message: '请输入主账号电话', trigger: 'blur' } ],
+  vatNumber: [ { required: false, message: '请输入VAT税号', trigger: 'blur' } ],
+  vatCompany: [ { required: false, message: '请输入VAT税号公司', trigger: 'blur' } ],
   contacts: {
-    phone: [ { required: true, message: '请输入电话号码', trigger: 'blur' } ],
+    phone: [ { required: false, message: '请输入电话号码', trigger: 'blur' } ],
     email: [
-      { required: true, message: '请输入邮箱地址', trigger: 'blur' },
+      { required: false, message: '请输入邮箱地址', trigger: 'blur' },
       { type: 'email', message: '请输入有效的邮箱地址', trigger: 'blur' }
     ]
   }
@@ -79,15 +103,24 @@ const removeContact = (item: ContactItem) => {
 
 async function create() {
   const body = {
-    company: form.name,
-    companyEnglishName: form.enName,
+    company: form.company,
+    companyEnglishName: form.companyEnglishName,
     address: form.address,
     juridicalPerson: form.juridicalPerson,
     vatNumber: form.vatNumber,
     vatCompany: form.vatCompany,
-    companyPhoneEmail: form.contacts
+    companyPhoneEmail: form.contacts,
+    juridicalPersonCreditCard: form.juridicalPersonCreditCard,
+    juridicalPersonCreditCardAddress: form.juridicalPersonCreditCardAddress,
+    ipaddress: form.ipaddress,
+    shopEmail: form.shopEmail,
+    receivablesAccount: form.receivablesAccount,
+    shopPhone: form.shopPhone
   };
-  await useResponse(body, api.createCompany, createLoading);
+  const res =await useResponse(body, api.createCompany, createLoading);
+  if (res.code === 2000) {
+    ElMessage.success('创建成功');
+  }
 }
 
 const submitForm = async (formEl: FormInstance | undefined) => {
@@ -119,18 +152,30 @@ const resetForm = (formEl: FormInstance | undefined) => {
         label-width="auto"
         status-icon
     >
-      <el-form-item label="公司名称" prop="name">
-        <el-input v-model="form.name" placeholder="请输入公司名称"></el-input>
+      <el-form-item label="公司名称" prop="company">
+        <el-input v-model="form.company" placeholder="请输入公司名称"></el-input>
       </el-form-item>
-      <el-form-item label="英文名称" prop="enName">
-        <el-input v-model="form.enName" placeholder="请输入公司英文名称"></el-input>
+      <el-form-item label="公司英文名称" prop="companyEnglishName">
+        <el-input v-model="form.companyEnglishName" placeholder="请输入公司英文名称"></el-input>
       </el-form-item>
-      <el-form-item label="公司地址" prop="address">
+      <el-form-item label="公司注册地址" prop="address">
         <el-input v-model="form.address" placeholder="请输入公司地址"></el-input>
       </el-form-item>
       <el-form-item label="公司法人" prop="juridicalPerson">
         <el-input v-model="form.juridicalPerson" placeholder="请输入公司法人"></el-input>
       </el-form-item>
+
+      <el-form-item label="法人信用卡号" prop="juridicalPersonCreditCard">
+        <el-input v-model="form.juridicalPersonCreditCard" placeholder="请输入法人信用卡号"></el-input>
+      </el-form-item>
+      <el-form-item label="法人信用卡地址" prop="juridicalPersonCreditCardAddress">
+        <el-input v-model="form.juridicalPersonCreditCardAddress" placeholder="请输入法人信用卡地址"></el-input>
+      </el-form-item>
+      <el-form-item label="IP地址" prop="ipaddress" style="margin-bottom: 14px;">
+        <el-input v-model="form.ipaddress" placeholder="请输入IP地址"></el-input>
+        <div style="font-size: 12px; color: #999; margin: 2px 0 -4px 0;">如果有多个IP地址,请用","相隔</div>
+      </el-form-item>
+
       <el-form-item label="VAT税号" prop="vatNumber">
         <el-input v-model="form.vatNumber" placeholder="请输入VAT税号"></el-input>
       </el-form-item>
@@ -138,10 +183,21 @@ const resetForm = (formEl: FormInstance | undefined) => {
         <el-input v-model="form.vatCompany" placeholder="请输入VAT税号公司"></el-input>
       </el-form-item>
 
+      <el-form-item label="收款账户" prop="receivablesAccount">
+        <el-input v-model="form.receivablesAccount" placeholder="请输入收款账户"></el-input>
+      </el-form-item>
+
+      <el-form-item label="主账号邮箱" prop="shopEmail">
+        <el-input v-model="form.shopEmail" placeholder="请输入主账号邮箱"></el-input>
+      </el-form-item>
+      <el-form-item label="主账号电话" prop="shopPhone">
+        <el-input v-model="form.shopPhone" placeholder="请输入主账号电话"></el-input>
+      </el-form-item>
+
       <el-form-item
           v-for="(contact, index) in form.contacts"
           :key="index"
-          :label="'联系方式' + (index + 1)"
+          :label="'子账号联系方式' + (index + 1)"
       >
         <div class="flex gap-2.5 items-start">
           <el-form-item

+ 260 - 143
src/views/company-information/components/CompanyDetail.vue

@@ -13,7 +13,7 @@ import * as api from '../api';
 import router from '/@/router';
 import { useResponse } from '/@/utils/useResponse';
 import EditDrawer from '../components/EditDrawer.vue';
-
+import { getFilterOptions } from '/@/views/shop-information/api'
 
 const route = useRoute();
 const companyId = route.query.id;
@@ -22,188 +22,241 @@ const overviewLoading = ref();
 const { tableOptions, handlePageChange } = usePagination(fetchCompanyDetail);
 const platformTableData = ref([]);
 const gridOptions: any = reactive({
-  border: false,
-  round: true,
-  stripe: true,
-  currentRowHighLight: true,
-  height: 870,
-  toolbarConfig: {
-    custom: true
-  },
-  rowConfig: {
-    isHover: true
-  },
-  columnConfig: {
-    resizable: true
-  },
-  pagerConfig: {
-    total: tableOptions.value.total,
-    page: tableOptions.value.page,
-    limit: tableOptions.value.limit
-  },
-  loading: false,
-  loadingConfig: {
-    icon: 'vxe-icon-indicator roll',
-    text: '正在拼命加载中...'
-  },
-  columns: companyColumns,
-  data: platformTableData
+	border: false,
+	round: true,
+	stripe: true,
+	currentRowHighLight: true,
+	height: 680,
+	toolbarConfig: {
+		custom: true,
+    slots: {
+      buttons: 'toolbar_buttons',
+    }
+	},
+	rowConfig: {
+		isHover: true,
+	},
+	columnConfig: {
+		resizable: true,
+	},
+	pagerConfig: {
+		total: tableOptions.value.total,
+		page: tableOptions.value.page,
+		limit: tableOptions.value.limit,
+	},
+	loading: false,
+	loadingConfig: {
+		icon: 'vxe-icon-indicator roll',
+		text: '正在拼命加载中...',
+	},
+	columns: companyColumns,
+	data: platformTableData,
 });
 
 const isOpen = ref(false);
 
+const platformNumber = ref('');
+const platform = ref('');
+const country = ref('');
+const status = ref('');
+
+const countryOption = ref([]);
+const platformOption = ref([]);
+const statusOption = ref([
+  {
+    value: 1,
+    label: '启用',
+  },
+  {
+    value: 0,
+    label: '暂停',
+  },
+]);
+
 onBeforeMount(() => {
-  fetchCompanyOverview();
-  fetchCompanyDetail();
+	fetchCompanyOverview();
+	fetchCompanyDetail();
+  fetchFilterOptions();
 });
 
+async function fetchFilterOptions() {
+  const res = await useResponse({}, getFilterOptions);
+  countryOption.value = res.data.country;
+  platformOption.value = res.data.platform;
+}
+
 async function fetchCompanyDetail() {
-  const query = {
-    id: companyId,
-    page: gridOptions.pagerConfig.page,
-    limit: gridOptions.pagerConfig.limit
-  };
-  await useTableData(api.getTableData, query, gridOptions);
+	const query = {
+		id: companyId,
+    platform: platform.value,
+    status: status.value,
+    country:country.value.toString(),
+    platformNumber:platformNumber.value,
+		page: gridOptions.pagerConfig.page,
+		limit: gridOptions.pagerConfig.limit,
+
+	};
+	await useTableData(api.getTableData, query, gridOptions);
 }
 
 async function fetchCompanyOverview() {
-  const res = await useResponse({ companyId }, api.getCompanyOverview, overviewLoading);
-  companyOverview.value = res.data;
+	const res = await useResponse({ companyId }, api.getCompanyOverview, overviewLoading);
+	companyOverview.value = res.data;
 }
 
 function handleNavigate(item: any) {
-  router.push({
-    path: '/shop/detail',
-    query: { platformNumber: item.platformNumber }
-  });
+	router.push({
+		path: '/shop/detail',
+		query: { platformNumber: item.platformNumber },
+	});
 }
 
 function drawerOpen() {
-  isOpen.value = true;
+	isOpen.value = true;
 }
 
 function handleRefresh() {
-  fetchCompanyOverview();
+	fetchCompanyOverview();
 }
 
 const contactGroups = computed(() => {
-  const contacts = companyOverview.value?.companyPhoneEmail || [];
-  if (!Array.isArray(contacts)) {
-    console.error('companyPhoneEmail is not an array:', contacts);
-    return [];
-  }
+	const contacts = companyOverview.value?.companyPhoneEmail || [];
+	if (!Array.isArray(contacts)) {
+		console.error('companyPhoneEmail is not an array:', contacts);
+		return [];
+	}
 
-  const groups = [];
+	const groups = [];
 
-  if (contacts.length > 0) {
-    groups.push(contacts.slice(0, 2));
-  }
+	if (contacts.length > 0) {
+		groups.push(contacts.slice(0, 2));
+	}
 
-  for (let i = 2; i < contacts.length; i += 3) {
-    groups.push(contacts.slice(i, i + 3));
-  }
+	for (let i = 2; i < contacts.length; i += 3) {
+		groups.push(contacts.slice(i, i + 3));
+	}
 
-  return groups;
+	return groups;
 });
+
+
+function handleQuery() {
+  gridOptions.pagerConfig.page = 1;
+  fetchCompanyDetail()
+}
+
 </script>
 
 <template>
-  <div class="p-2.5">
-    <el-card v-loading="overviewLoading" body-class="flex items-center gap-10" shadow="hover" style="border: none">
-      <el-image :src="`/src/assets/platformImg/${ companyId }.png`" class="mr-7 rounded-2xl" fit="contain"
-                style="height: 120px; width: 120px;">
-        <template #error>
-          <div class="mr-3.5 flex items-center justify-center text-5xl"
-               style="height: 100%; width: 100%; background-color: #f5f5f5">
-            <el-icon>
-              <icon-picture/>
-            </el-icon>
-          </div>
-        </template>
-      </el-image>
+	<div class="p-2.5">
+		<el-card v-loading="overviewLoading" body-class="flex items-center gap-10" shadow="hover" style="border: none">
+			<el-image :src="`/src/assets/platformImg/${companyId}.png`" class="mr-7 rounded-2xl" fit="contain" style="height: 120px; width: 120px">
+				<template #error>
+					<div class="mr-3.5 flex items-center justify-center text-5xl" style="height: 100%; width: 100%; background-color: #f5f5f5">
+						<el-icon>
+							<icon-picture />
+						</el-icon>
+					</div>
+				</template>
+			</el-image>
+			<div class="text-lg whitespace-nowrap">
+				<div class="font-semibold relative">
+					公司名称:
+					<span class="font-medium italic ml-1.5" style="color: #64748b">
+						{{ companyOverview?.company ? companyOverview?.company : '--' }}
+					</span>
+				</div>
+				<div class="font-semibold">
+					公司英文名:
+					<span class="font-medium italic ml-1.5" style="color: #64748b">
+            <el-tooltip effect="dark" :content="companyOverview?.companyEnglishName || '--'" placement="top">
+							<span class="truncate">
+									{{ companyOverview?.companyEnglishName ? companyOverview?.companyEnglishName : '--' }}
+							</span>
+						</el-tooltip>
+					</span>
+				</div>
+				<div class="font-semibold">
+					公司注册地址:
+					<span class="font-medium italic ml-1.5 truncate" style="color: #64748b">
+						<el-tooltip effect="dark" :content="companyOverview?.address || '--'" placement="top">
+							<span class="truncate">
+								{{ companyOverview?.address ? companyOverview?.address : '--' }}
+							</span>
+						</el-tooltip>
+					</span>
+				</div>
+			</div>
+			<div class="text-lg whitespace-nowrap">
+				<div class="font-semibold">
+					公司法人:
+					<span class="font-medium italic ml-1.5" style="color: #64748b">
+						{{ companyOverview?.juridicalPerson ? companyOverview?.juridicalPerson : '--' }}
+					</span>
+				</div>
+				<div class="font-semibold">
+					法人信用卡号:
+					<span class="font-medium italic ml-1.5" style="color: #64748b">
+						{{ companyOverview?.juridicalPersonCreditCard ? companyOverview?.juridicalPersonCreditCard : '--' }}
+					</span>
+				</div>
+				<div class="font-semibold">
+					法人信用卡地址:
+					<span class="font-medium italic ml-1.5" style="color: #64748b">
+             <el-tooltip effect="dark" :content="companyOverview?.juridicalPersonCreditCardAddress || '--'" placement="top">
+							<span class="truncate">
+										{{ companyOverview?.juridicalPersonCreditCardAddress ? companyOverview?.juridicalPersonCreditCardAddress : '--' }}
+							</span>
+						</el-tooltip>
+					</span>
+				</div>
+			</div>
+
       <div class="text-lg whitespace-nowrap">
-        <div class="font-semibold relative">
-          <el-button class="absolute" link style="left: -24px;" type="warning"
-                     @click="drawerOpen"><el-icon style="font-size: 20px !important"><Edit /></el-icon></el-button>
-          公司名称:
-          <span class="font-medium italic ml-1.5" style="color: #64748b;"> 
-            {{ companyOverview?.company ? companyOverview?.company : '--' }} 
-          </span>
-        </div>
         <div class="font-semibold">
-          公司英文名:
+          主账号邮箱:
           <span class="font-medium italic ml-1.5" style="color: #64748b">
-            {{ companyOverview?.companyEnglishName ? companyOverview?.companyEnglishName : '--' }} 
-          </span>
+						{{ companyOverview?.shopEmail ? companyOverview?.shopEmail : '--' }}
+					</span>
         </div>
         <div class="font-semibold">
-          公司地址:
+          主账户电话:
           <span class="font-medium italic ml-1.5" style="color: #64748b">
-            {{ companyOverview?.address ? companyOverview?.address : '--' }}
-          </span>
-        </div>
-      </div>
-      <div class="text-lg whitespace-nowrap">
-        <div class="font-semibold">
-          公司法人:
-          <span class="font-medium italic ml-1.5" style="color: #64748b"> 
-            {{ companyOverview?.juridicalPerson ? companyOverview?.juridicalPerson : '--' }} 
-          </span>
+						{{ companyOverview?.shopPhone ? companyOverview?.shopPhone : '--' }}
+					</span>
         </div>
         <div class="font-semibold">
-          VAT税号:
-          <span class="font-medium italic ml-1.5" style="color: #64748b"> 
-            {{ companyOverview?.vatNumber ? companyOverview?.vatNumber : '--' }} 
-          </span>
-        </div>
-        <div class="font-semibold">
-          VAT税号公司:
-          <span class="font-medium italic ml-1.5" style="color: #64748b"> 
-            {{ companyOverview?.vatCompany ? companyOverview?.vatCompany : '--' }} 
-          </span>
-        </div>
-      </div>
-      <div v-if="contactGroups.length > 0" class="flex flex-wrap whitespace-nowrap">
-        <div v-for="(group, groupIndex) in contactGroups" :key="groupIndex">
-          <div class="text-lg font-semibold">
-            <template v-if="groupIndex === 0">
-              公司联系方式:
-            </template>
-            <div v-for="(item, itemIndex) in group" :key="itemIndex"
-                 class="font-medium italic mr-3" style="color: #64748b">
-              {{ item.phone }} - {{ item.email }}
-            </div>
-          </div>
-        </div>
-      </div>
-      <div v-else class="text-lg font-semibold">
-        暂无联系方式
-      </div>
-    </el-card>
-
-    <el-card body-style="padding-top: 10px" class="mt-2.5" shadow="hover" style="border: none">
-      <vxe-grid v-bind="gridOptions">
-        <template #platformNumber="{ row }">
-          <el-button link style="font-weight: 700" type="primary" @click="handleNavigate(row)">
-            <el-icon>
-              <Link/>
+          <el-button class="absolute" link style="right: 10px; top: 20px" type="warning" @click="drawerOpen">
+            <el-icon style="font-size: 25px !important">
+              <Edit />
             </el-icon>
-            {{ row.platformNumber ? row.platformNumber : '--' }}
           </el-button>
-        </template>
-        <template #pager>
-          <vxe-pager
-              v-model:currentPage="gridOptions.pagerConfig.page"
-              v-model:pageSize="gridOptions.pagerConfig.limit"
-              :total="gridOptions.pagerConfig.total"
-              @page-change="handlePageChange"
-          >
-          </vxe-pager>
-        </template>
-      </vxe-grid>
-    </el-card>
+          IP地址:
+          <span class="font-medium italic ml-1.5" style="color: #64748b">
+             <el-tooltip effect="dark" :content="companyOverview?.ipaddress || '--'" placement="top">
+							<span class="truncate">
+										{{ companyOverview?.ipaddress ? companyOverview?.ipaddress : '--' }}
+							</span>
+						</el-tooltip>
+					</span>
+        </div>
+      </div>
+
+<!--			<div v-if="contactGroups.length > 0" class="flex flex-wrap whitespace-nowrap">-->
+<!--				<div v-for="(group, groupIndex) in contactGroups" :key="groupIndex">-->
+<!--					<div class="text-lg font-semibold">-->
+<!--						<template v-if="groupIndex === 0"> 公司子账号联系方式: </template>-->
+<!--						<div v-for="(item, itemIndex) in group" :key="itemIndex" class="font-medium italic mr-3" style="color: #64748b">-->
+<!--							{{ item.phone }} - {{ item.email }}-->
+<!--						</div>-->
+<!--					</div>-->
+<!--				</div>-->
+<!--			</div>-->
+<!--			<div v-else class="text-lg font-semibold">暂无联系方式</div>-->
 
-    <EditDrawer
+		</el-card>
+
+		<EditDrawer
         v-if="isOpen"
         v-model="isOpen"
         :company="companyOverview.company"
@@ -211,9 +264,73 @@ const contactGroups = computed(() => {
         :formSelect
         @refresh="handleRefresh"
     />
-  </div>
+
+		<el-card body-style="padding-top: 10px" class="mt-2.5" shadow="hover" style="border: none">
+			<vxe-grid v-bind="gridOptions">
+        <template #toolbar_buttons>
+          <el-row :gutter="20" class="w-full whitespace-nowrap">
+            <el-col :span="4">
+              <div class="flex items-center gap-1.5">
+                <span class="font-medium">平 台</span>
+                <el-select v-model="platform" clearable @change="handleQuery">
+                  <el-option v-for="item in platformOption" :label="item" :value="item" />
+                </el-select>
+              </div>
+            </el-col>
+            <el-col :span="4">
+              <div class="flex items-center gap-1.5">
+                <span class="font-medium">店铺编号</span>
+                <el-input v-model="platformNumber" clearable placeholder="请输入店铺编号" @change="handleQuery" />
+              </div>
+            </el-col>
+            <el-col :span="4">
+              <div class="flex items-center gap-1.5">
+                <span class="font-medium">状 态</span>
+                <el-select v-model="status" clearable @change="handleQuery">
+                  <el-option  v-for="item in statusOption" :key="item.value" :label="item.label" :value="item.value" />
+                </el-select>
+              </div>
+            </el-col>
+            <el-col :span="4">
+              <div class="flex items-center gap-1.5">
+                <span class="font-medium">国 家</span>
+                <el-select v-model="country" clearable collapse-tags collapse-tags-tooltip multiple
+                           @blur="handleQuery">
+                  <el-option v-for="item in countryOption" :label="item" :value="item" />
+                </el-select>
+              </div>
+            </el-col>
+          </el-row>
+        </template>
+				<template #platformNumber="{ row }">
+					<el-button link style="font-weight: 700" type="primary" @click="handleNavigate(row)">
+						<el-icon>
+							<Link />
+						</el-icon>
+						{{ row.platformNumber ? row.platformNumber : '--' }}
+					</el-button>
+				</template>
+				<template #pager>
+					<vxe-pager
+						v-model:currentPage="gridOptions.pagerConfig.page"
+						v-model:pageSize="gridOptions.pagerConfig.limit"
+						:total="gridOptions.pagerConfig.total"
+						@page-change="handlePageChange"
+					>
+					</vxe-pager>
+				</template>
+			</vxe-grid>
+		</el-card>
+	</div>
 </template>
 
 <style scoped>
-
+.truncate {
+	display: inline-block;
+	white-space: nowrap;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	max-width: 250px; /* 添加固定宽度 */
+	vertical-align: middle; /* 添加垂直对齐 */
+}
 </style>

+ 78 - 40
src/views/company-information/components/EditDrawer.vue

@@ -32,22 +32,34 @@ interface ContactItem {
 
 interface RuleForm {
   company: string;
-  companyEnglishName: string;
   address: string;
+  companyEnglishName: string;
   juridicalPerson: string;
   vatNumber: string;
   vatCompany: string;
+  ipaddress: string;
+  juridicalPersonCreditCard: string;
+  juridicalPersonCreditCardAddress: string;
+  shopPhone: string;
+  shopEmail: string;
+  receivablesAccount:string;
   contacts: ContactItem[];
 }
 
 const ruleFormRef = ref<FormInstance>();
 const ruleForm = reactive<RuleForm>({
   company: '',
-  companyEnglishName: '',
   address: '',
+  companyEnglishName: '',
   juridicalPerson: '',
   vatNumber: '',
   vatCompany: '',
+  ipaddress:'',
+  juridicalPersonCreditCard:'',
+  juridicalPersonCreditCardAddress:'',
+  shopPhone:'',
+  shopEmail:'',
+  receivablesAccount:'',
   contacts: [
     {
       phone: '',
@@ -57,28 +69,30 @@ const ruleForm = reactive<RuleForm>({
 });
 
 const rules = reactive<FormRules<RuleForm>>({
-  company: [
-    { required: true, message: 'Please input platform name', trigger: 'blur' }
-  ],
-  companyEnglishName: [
-    { required: true, message: 'Please input platform name', trigger: 'blur' }
-  ],
-  address: [
-    { required: true, message: 'Please input country name', trigger: 'blur' }
-  ],
-  juridicalPerson: [
-    { required: true, message: 'Please input platform name', trigger: 'blur' }
-  ],
-  vatNumber: [
-    { required: true, message: 'Please select line', trigger: 'change' }
-  ],
-  vatCompany: [
-    { required: true, message: 'Please select line', trigger: 'change' }
+  company: [ { required: true, message: '请输入公司名称', trigger: 'blur' } ],
+  companyEnglishName: [ { required: true, message: '请输入公司英文名称', trigger: 'blur' } ],
+  address: [ { required: true, message: '请输入公司地址', trigger: 'blur' } ],
+  juridicalPerson: [ { required: true, message: '请输入公司法人', trigger: 'blur' } ],
+
+  juridicalPersonCreditCard: [ { required: true, message: '请输入法人信用卡号', trigger: 'blur' } ],
+  juridicalPersonCreditCardAddress: [ { required: true, message: '请输入法人信用卡地址', trigger: 'blur' } ],
+  ipaddress: [{ required: true, message: '请输入IP地址', trigger: 'blur' }],
+
+  receivablesAccount: [ { required: false, message: '请输入收款账户', trigger: 'blur' } ],
+
+  shopEmail:[
+    { required: true, message: '请输入主账号邮箱', trigger: 'blur' },
+    { type: 'email', message: '请输入有效的邮箱地址', trigger: 'blur' }
   ],
+
+  shopPhone: [ { required: true, message: '请输入主账号电话', trigger: 'blur' } ],
+
+  vatNumber: [ { required: false, message: '请输入VAT税号', trigger: 'blur' } ],
+  vatCompany: [ { required: false, message: '请输入VAT税号公司', trigger: 'blur' } ],
   contacts: {
-    phone: [ { required: true, message: '请输入电话号码', trigger: 'blur' } ],
+    phone: [ { required: false, message: '请输入电话号码', trigger: 'blur' } ],
     email: [
-      { required: true, message: '请输入邮箱地址', trigger: 'blur' },
+      { required: false, message: '请输入邮箱地址', trigger: 'blur' },
       { type: 'email', message: '请输入有效的邮箱地址', trigger: 'blur' }
     ]
   }
@@ -109,10 +123,12 @@ const submitForm = async (formEl: FormInstance | undefined) => {
           phone: contact.phone
         }))
       };
-      await useResponse({ id: companyOverview.id, partial: 1, formData }, api.updateShopDetail, loading);
+      const res = await useResponse({ id: companyOverview.id, partial: 1, formData }, api.updateShopDetail, loading);
       isOpen.value = false;
-      ElMessage.success('编辑成功');
-      emit('refresh');
+      if (res.code === 2000){
+        ElMessage.success('编辑成功');
+        emit('refresh');
+      }
     } else {
       console.log('error submit!', fields);
     }
@@ -136,7 +152,6 @@ function replaceCol() {
   if (companyOverview.companyPhoneEmail) {
     result.contacts = cloneDeep(companyOverview.companyPhoneEmail);  // 深拷贝
   }
-
   Object.assign(ruleForm, result);
 }
 </script>
@@ -150,29 +165,52 @@ function replaceCol() {
         class="mx-2.5 mt-2.5"
         label-width="auto"
         status-icon>
-      <el-form-item label="公司名称" prop="platformNumber">
-        <el-input v-model="ruleForm.company"/>
+      <el-form-item label="公司名称" prop="company">
+        <el-input v-model="ruleForm.company" placeholder="请输入公司名称"></el-input>
+      </el-form-item>
+      <el-form-item label="公司英文名称" prop="companyEnglishName">
+        <el-input v-model="ruleForm.companyEnglishName" placeholder="请输入公司英文名称"></el-input>
+      </el-form-item>
+      <el-form-item label="公司注册地址" prop="address">
+        <el-input v-model="ruleForm.address" placeholder="请输入公司地址"></el-input>
+      </el-form-item>
+      <el-form-item label="公司法人" prop="juridicalPerson">
+        <el-input v-model="ruleForm.juridicalPerson" placeholder="请输入公司法人"></el-input>
+      </el-form-item>
+
+      <el-form-item label="法人信用卡号" prop="juridicalPersonCreditCard">
+        <el-input v-model="ruleForm.juridicalPersonCreditCard" placeholder="请输入法人信用卡号"></el-input>
+      </el-form-item>
+      <el-form-item label="法人信用卡地址" prop="juridicalPersonCreditCardAddress">
+        <el-input v-model="ruleForm.juridicalPersonCreditCardAddress" placeholder="请输入法人信用卡地址"></el-input>
+      </el-form-item>
+      <el-form-item label="IP地址" prop="ipaddress" style="margin-bottom: 14px;">
+        <el-input v-model="ruleForm.ipaddress" placeholder="请输入IP地址"></el-input>
+        <div style="font-size: 12px; color: #999; margin: 2px 0 -4px 0;">如果有多个IP地址,请用","相隔</div>
       </el-form-item>
-      <el-form-item label="公司英文名" prop="platformName">
-        <el-input v-model="ruleForm.companyEnglishName"/>
+
+      <el-form-item label="VAT税号" prop="vatNumber">
+        <el-input v-model="ruleForm.vatNumber" placeholder="请输入VAT税号"></el-input>
       </el-form-item>
-      <el-form-item label="公司地址" prop="country">
-        <el-input v-model="ruleForm.address"/>
+      <el-form-item label="VAT税号公司" prop="vatCompany">
+        <el-input v-model="ruleForm.vatCompany" placeholder="请输入VAT税号公司"></el-input>
       </el-form-item>
-      <el-form-item label="公司法人" prop="brandName">
-        <el-input v-model="ruleForm.juridicalPerson"/>
+
+      <el-form-item label="收款账户" prop="receivablesAccount">
+        <el-input v-model="ruleForm.receivablesAccount" placeholder="请输入收款账户"></el-input>
       </el-form-item>
-      <el-form-item label="VAT税号" prop="status">
-        <el-input v-model="ruleForm.vatNumber"/>
+
+      <el-form-item label="主账号邮箱" prop="shopEmail">
+        <el-input v-model="ruleForm.shopEmail" placeholder="请输入主账号邮箱"></el-input>
       </el-form-item>
-      <el-form-item label="VAT税号公司" prop="platform">
-        <el-input v-model="ruleForm.vatCompany"/>
+      <el-form-item label="主账号电话" prop="shopPhone">
+        <el-input v-model="ruleForm.shopPhone" placeholder="请输入主账号电话"></el-input>
       </el-form-item>
 
       <el-form-item
           v-for="(contact, index) in ruleForm.contacts"
           :key="index"
-          :label="'联系方式' + (index + 1)"
+          :label="'子账号联系方式' + (index + 1)"
       >
         <div class="flex gap-2.5 items-start">
           <el-form-item
@@ -198,9 +236,9 @@ function replaceCol() {
         </div>
       </el-form-item>
       <el-form-item>
-        <div class="flex flex-1 justify-center">
+        <div class="flex flex-1 justify-end">
           <el-button :icon="Plus" type="warning" @click="addContact">新增联系方式</el-button>
-          <el-button :loading="loading" type="primary" @click="submitForm(ruleFormRef)">确 定</el-button>
+          <el-button :loading="loading" type="primary" @click="submitForm(ruleFormRef)">保 存</el-button>
           <el-button @click="resetForm(ruleFormRef)">重 置</el-button>
         </div>
       </el-form-item>

+ 9 - 0
src/views/shop-information/api.ts

@@ -103,3 +103,12 @@ export function getFilterOptions(query: any) {
     params: query,
   });
 }
+
+export function exportData(query: any) {
+  return request({
+    url:  apiPrefix+ 'export_data/',
+    method: 'GET',
+    params: query,
+    responseType: 'blob'
+  });
+}

+ 59 - 44
src/views/shop-information/components/DataTable.vue

@@ -10,9 +10,9 @@ import { shopInfoColumns } from '/@/views/shop-information/useColumns';
 import * as api from '../api';
 import { useTableData } from '/@/utils/useTableData';
 import { useResponse } from '/@/utils/useResponse';
-import { Link } from '@element-plus/icons-vue';
+import { Link,Download,Refresh} from '@element-plus/icons-vue';
 import router from '/@/router';
-
+import { uesDownloadFile } from '/@/utils/useDownload';
 
 const { tableOptions, handlePageChange } = usePagination(fetchList);
 
@@ -23,12 +23,14 @@ const gridOptions: any = reactive({
   round: true,
   stripe: true,
   currentRowHighLight: true,
-  height: 1000,
+  height: 750,
   toolbarConfig: {
     size: 'large',
     custom: true,
+    // zoom: true,
     slots: {
-      buttons: 'toolbar_buttons'
+      buttons: 'toolbar_buttons',
+      tools: 'toolbar_tools',
     }
   },
   rowConfig: {
@@ -57,18 +59,12 @@ const operatorName = ref('');
 const country = ref('');
 const company = ref('');
 
-const splitOperator = ref('');
-const splitCountry = ref('');
-
-const tempOperator = ref('');
-const tempCountry = ref('');
-
 const countryOption = ref([]);
 const platformOption = ref([]);
 const operatorOption = ref([]);
 
 onBeforeMount(() => {
-  gridOptions.pagerConfig.limit = 20;
+  gridOptions.pagerConfig.limit = 10;
   fetchFilterOptions();
 });
 
@@ -76,6 +72,31 @@ onMounted(() => {
   fetchList();
 });
 
+function handleRefresh() {
+  fetchList();
+}
+
+async function handleDownload() {
+  gridOptions.loading = true;
+  try {
+    await uesDownloadFile({
+      apiMethod: api.exportData,
+      queryParams: {
+        platformNumber: platformNumber.value,
+        platform: platform.value,
+        operatorName: operatorName.value.toString(),
+        country: country.value.toString(),
+        company: company.value
+      },
+      fileName: '店铺信息汇总.xlsx',
+      successMessage: () => ElMessage.success('数据导出成功!'),
+      errorMessage: () => ElMessage.error('数据导出失败,请重试!'),
+    });
+  } finally {
+    gridOptions.loading = false;
+  }
+}
+
 async function fetchFilterOptions() {
   const res = await useResponse({}, api.getFilterOptions);
   countryOption.value = res.data.country;
@@ -90,38 +111,18 @@ async function fetchList() {
   const query = {
     platformNumber: platformNumber.value,
     platform: platform.value,
-    operatorName: splitOperator.value,
-    country: splitCountry.value,
+    operatorName: operatorName.value.toString(),
+    country: country.value.toString(),
     company: company.value
   };
 
-  tempOperator.value = query.operatorName;
-  tempCountry.value = query.country;
-
-  await useTableData(api.getInfoTableData, query, gridOptions);
+  await useTableData(api.getTableData, query, gridOptions);
   await gridRef.value.loadColumn(shopInfoColumns);
   gridOptions.showHeader = Boolean(gridOptions.data?.length);
 }
 
-async function processParameter() {
-  if (operatorName.value) {
-    splitOperator.value = operatorName.value ? operatorName.value + ',' : '';
-    splitOperator.value = splitOperator.value.slice(0, -1);
-  }
-  if (country.value) {
-    splitCountry.value = country.value ? country.value + ',' : '';
-    splitCountry.value = splitCountry.value.slice(0, -1);
-  }
-}
-
-function parameterChange() {
-  if (operatorName.value.toString() != tempOperator.value || country.value.toString() != tempCountry.value) {
-    gridOptions.pagerConfig.page = 1;
-    fetchList();
-  }
-}
 
-function handleInputQuery() {
+function handleQuery() {
   gridOptions.pagerConfig.page = 1;
   fetchList()
 }
@@ -142,8 +143,7 @@ function handleNavigate(item: any) {
           <div class="flex items-center gap-1.5">
             <span class="font-medium">运 营</span>
             <el-select v-model="operatorName" clearable collapse-tags collapse-tags-tooltip filterable multiple
-                       @blur="parameterChange"
-                       @change="processParameter">
+                       @blur="handleQuery">
               <el-option v-for="item in operatorOption" :label="item" :value="item" />
             </el-select>
           </div>
@@ -152,8 +152,7 @@ function handleNavigate(item: any) {
           <div class="flex items-center gap-1.5">
             <span class="font-medium">国 家</span>
             <el-select v-model="country" clearable collapse-tags collapse-tags-tooltip multiple
-                       @blur="parameterChange"
-                       @change="processParameter">
+                       @blur="handleQuery">
               <el-option v-for="item in countryOption" :label="item" :value="item" />
             </el-select>
           </div>
@@ -161,7 +160,7 @@ function handleNavigate(item: any) {
         <el-col :span="4">
           <div class="flex items-center gap-1.5">
             <span class="font-medium">平 台</span>
-            <el-select v-model="platform" clearable @change="handleInputQuery">
+            <el-select v-model="platform" clearable @change="handleQuery">
               <el-option v-for="item in platformOption" :label="item" :value="item" />
             </el-select>
           </div>
@@ -169,17 +168,29 @@ function handleNavigate(item: any) {
         <el-col :span="4">
           <div class="flex items-center gap-1.5">
             <span class="font-medium">店铺编号</span>
-            <el-input v-model="platformNumber" clearable placeholder="请输入店铺编号" @change="handleInputQuery" />
+            <el-input v-model="platformNumber" clearable placeholder="请输入店铺编号" @change="handleQuery" />
           </div>
         </el-col>
-        <el-col :span="5">
+        <el-col :span="4">
           <div class="flex items-center gap-1.5">
             <span class="font-medium">公 司</span>
-            <el-input v-model="company" clearable placeholder="请输入公司名称" @change="handleInputQuery" />
+            <el-input v-model="company" clearable placeholder="请输入公司名称" @change="handleQuery" />
           </div>
         </el-col>
       </el-row>
     </template>
+    <template #toolbar_tools >
+      <el-button circle class="toolbar-btn" @click="handleDownload">
+        <el-icon>
+          <Download />
+        </el-icon>
+      </el-button>
+      <el-button circle class="toolbar-btn" @click="handleRefresh" style="margin-right: 12px">
+        <el-icon>
+          <Refresh />
+        </el-icon>
+      </el-button>
+    </template>
     <template #platformNumber="{ row }">
       <el-button link style="font-weight: 700" type="primary" @click="handleNavigate(row)">
         <el-icon>
@@ -201,5 +212,9 @@ function handleNavigate(item: any) {
 </template>
 
 <style scoped>
-
+.toolbar-btn {
+  width: 34px;
+  height: 34px;
+  font-size: 18px
+}
 </style>

+ 121 - 16
src/views/shop-information/components/PlatformDetail.vue

@@ -7,23 +7,33 @@
 
 import { useResponse } from '/@/utils/useResponse';
 import * as api from '../api';
-import { Link, Picture as IconPicture } from '@element-plus/icons-vue';
-import { platformColumns } from '../useColumns';
+import {Download, Link, Picture as IconPicture, Refresh} from '@element-plus/icons-vue';
+import {shopInfoColumns} from '../useColumns';
 import router from '/@/router';
 import { useTableData } from '/@/utils/useTableData';
 import { usePagination } from '/@/utils/usePagination';
 import { useTableHeight } from '/@/utils/useTableHeight';
+import {uesDownloadFile} from "/@/utils/useDownload";
 
-
+const gridRef = ref();
 const cardContainer: Ref<HTMLElement | null> = useTemplateRef('cardContainer');
 const { tableHeight } = useTableHeight(cardContainer);
 
 const route = useRoute();
 const platform = route.query.platform;
+const company = ref('');
+const country = ref('');
+const operatorName = ref('');
+const platformNumber = ref('');
+
+const countryOption = ref([]);
+const operatorOption = ref([]);
+
 const platformOverview: any = ref([]);
 const overviewLoading = ref();
-const { tableOptions, handlePageChange } = usePagination(fetchPlatformDetail);
-const platformTableData = ref([]);
+
+const { tableOptions, handlePageChange } = usePagination(fetchList);
+
 const gridOptions: any = reactive({
   border: false,
   round: true,
@@ -31,7 +41,11 @@ const gridOptions: any = reactive({
   currentRowHighLight: true,
   height: '100%',
   toolbarConfig: {
-    custom: true
+    custom: true,
+    slots: {
+      buttons: 'toolbar_buttons',
+      tools: 'toolbar_tools',
+    }
   },
   rowConfig: {
     isHover: true
@@ -49,22 +63,40 @@ const gridOptions: any = reactive({
     icon: 'vxe-icon-indicator roll',
     text: '正在拼命加载中...'
   },
-  columns: platformColumns,
-  data: platformTableData
+  columns: '',
+  data: ''
 });
 
 onBeforeMount(() => {
   fetchPlatformDetailOverview();
-  fetchPlatformDetail();
+  fetchFilterOptions()
 });
 
-async function fetchPlatformDetail() {
+onMounted(() => {
+  fetchList();
+});
+
+async function fetchFilterOptions() {
+  const res = await useResponse({}, api.getFilterOptions);
+  countryOption.value = res.data.country;
+  operatorOption.value = res.data.operatorName;
+}
+
+async function fetchList() {
+  gridOptions.data = [];
+  gridOptions.columns = [];
+
   const query = {
-    platform,
-    page: gridOptions.pagerConfig.page,
-    limit: gridOptions.pagerConfig.limit
+    platformNumber: platformNumber.value,
+    platform: platform,
+    operatorName: operatorName.value.toString(),
+    country: country.value.toString(),
+    company: company.value
   };
+
   await useTableData(api.getTableData, query, gridOptions);
+  await gridRef.value.loadColumn(shopInfoColumns);
+  gridOptions.showHeader = Boolean(gridOptions.data?.length);
 }
 
 async function fetchPlatformDetailOverview() {
@@ -72,6 +104,33 @@ async function fetchPlatformDetailOverview() {
   platformOverview.value = res.data;
 }
 
+
+async function handleDownload() {
+  gridOptions.loading = true;
+  try {
+    await uesDownloadFile({
+      apiMethod: api.exportData,
+      queryParams: {
+        platformNumber: platformNumber.value,
+        platform: platform,
+        operatorName: operatorName.value.toString(),
+        country: country.value.toString(),
+        company: company.value
+      },
+      fileName: '平台详情.xlsx',
+      successMessage: () => ElMessage.success('数据导出成功!'),
+      errorMessage: () => ElMessage.error('数据导出失败,请重试!'),
+    });
+  } finally {
+    gridOptions.loading = false;
+  }
+}
+
+function handleQuery() {
+  gridOptions.pagerConfig.page = 1;
+  fetchList()
+}
+
 function handleNavigate(item: any) {
   router.push({
     path: '/shop/detail',
@@ -128,7 +187,48 @@ function handleNavigate(item: any) {
     <!-- table-card -->
     <el-card class="mt-2.5 flex-1" shadow="hover" style="border: none">
       <div :style="{ height: tableHeight + 'px' }">
-        <vxe-grid v-bind="gridOptions">
+        <vxe-grid ref="gridRef" v-bind="gridOptions">
+          <template #toolbar_buttons>
+            <el-row :gutter="20" class="w-full whitespace-nowrap">
+              <el-col :span="4">
+                <div class="flex items-center gap-1.5">
+                  <span class="font-medium">运 营</span>
+                  <el-select v-model="operatorName" clearable collapse-tags collapse-tags-tooltip filterable multiple
+                             @blur="handleQuery">
+                    <el-option v-for="item in operatorOption" :label="item" :value="item" />
+                  </el-select>
+                </div>
+              </el-col>
+              <el-col :span="4">
+                <div class="flex items-center gap-1.5">
+                  <span class="font-medium">国 家</span>
+                  <el-select v-model="country" clearable collapse-tags collapse-tags-tooltip multiple
+                             @blur="handleQuery">
+                    <el-option v-for="item in countryOption" :label="item" :value="item" />
+                  </el-select>
+                </div>
+              </el-col>
+              <el-col :span="4">
+                <div class="flex items-center gap-1.5">
+                  <span class="font-medium">店铺编号</span>
+                  <el-input v-model="platformNumber" clearable placeholder="请输入店铺编号" @change="handleQuery" />
+                </div>
+              </el-col>
+              <el-col :span="4">
+                <div class="flex items-center gap-1.5">
+                  <span class="font-medium">公 司</span>
+                  <el-input v-model="company" clearable placeholder="请输入公司名称" @change="handleQuery" />
+                </div>
+              </el-col>
+            </el-row>
+          </template>
+          <template #toolbar_tools >
+            <el-button circle class="toolbar-btn" @click="handleDownload" style="margin-right: 12px">
+              <el-icon>
+                <Download />
+              </el-icon>
+              </el-button>
+          </template>
           <template #platformNumber="{ row }">
             <el-button link style="font-weight: 700" type="primary" @click="handleNavigate(row)">
               <el-icon>
@@ -148,9 +248,14 @@ function handleNavigate(item: any) {
           </template>
         </vxe-grid>
       </div>
-
     </el-card>
   </div>
 </template>
 
-<style scoped></style>
+<style scoped>
+.toolbar-btn {
+  width: 34px;
+  height: 34px;
+  font-size: 18px
+}
+</style>

+ 189 - 181
src/views/shop-information/useColumns.tsx

@@ -16,185 +16,185 @@ async function main() {
 
 main();
 
-export const platformColumns = [
-  { type: 'seq', title: '序 号', width: 60, align: 'center', fixed: 'left' },
-  {
-    field: 'operatorName', title: '运 营', minWidth: 'auto', align: 'center', fixed: 'left',
-    slots: {
-      default({ row }: any) {
-        return <span class={ 'font-medium' }>{ row.operatorName ? row.operatorName : '--' }</span>;
-      }
-    }
-  },
-  {
-    field: 'platformNumber', title: '店铺编号', minWidth: 'auto', align: 'center', slots: { default: 'platformNumber' }
-  },
-  {
-    field: 'platformName', title: '店铺名称', minWidth: 'auto', align: 'center', slots: {
-      default({ row }: any) {
-        return <span class={ 'font-medium' }
-                     style={ { color: '#303133' } }>{ row.platformName ? row.platformName : '--' }</span>;
-      }
-    }
-  },
-  {
-    field: 'country', title: '国 家', minWidth: 'auto', align: 'center',
-    slots: {
-      default({ row }: any) {
-        const country = countryInfoStore.countries.find(c => c.name === row.country);
-        const color = country ? country.color : '#3875F6';
-        return <el-tag effect="plain" round
-                       style={ { color: color, borderColor: color } }>{ row.country ? row.country : '--' }</el-tag>;
-      }
-    }
-  },
-  {
-    field: 'brandName', title: '品牌名称', minWidth: 'auto', align: 'center',
-    slots: {
-      default({ row }: any) {
-        return <span class={ 'font-medium' }>{ row.brandName ? row.brandName : '--' }</span>;
-      }
-    }
-  },
-  {
-    field: 'currencyCode', title: '货币代码', minWidth: 'auto', align: 'center',
-    slots: {
-      default({ row }: any) {
-        return <span class={ 'font-medium' }>{ row.currencyCode ? row.currencyCode : '--' }</span>;
-      }
-    }
-  },
-  {
-    field: 'status', title: '状 态', minWidth: 'auto', align: 'center',
-    slots: {
-      default({ row }: any) {
-        return (
-            <el-tag
-                class="font-medium"
-                type={ row.status === 1 ? 'success' : 'danger' }   // 动态绑定 type
-            >
-              { row.status === 1 ? '启用' : '暂停' }
-            </el-tag>
-        );
-      }
-    }
-  },
-  {
-    field: 'platform', title: '平 台', minWidth: 'auto', align: 'center',
-    slots: {
-      default({ row }: any) {
-        return <span class={ 'font-medium' }>{ row.platform ? row.platform : '--' }</span>;
-      }
-    }
-  },
-  {
-    field: 'line', title: '线 路', minWidth: 'auto', align: 'center',
-    slots: {
-      default({ row }: any) {
-        return <span class={ 'font-medium' }>{ row.line ? row.line : '--' }</span>;
-      }
-    }
-  },
-  {
-    field: 'ipaddress', title: 'IP地址', minWidth: 'auto', align: 'center',
-    slots: {
-      default({ row }: any) {
-        return <span class={ 'font-medium' }>{ row.ipaddress ? row.ipaddress : '--' }</span>;
-      }
-    }
-  },
-  {
-    field: 'company', title: '公司名称', minWidth: 'auto', align: 'center',
-    slots: {
-      default({ row }: any) {
-        return <span class={ 'font-medium' }>{ row.company ? row.company : '--' }</span>;
-      }
-    }
-  },
-  {
-    field: 'companyEnglishName', title: '公司英文名称', minWidth: 'auto', align: 'center',
-    slots: {
-      default({ row }: any) {
-        return <span class={ 'font-medium' }>{ row.companyEnglishName ? row.companyEnglishName : '--' }</span>;
-      }
-    }
-  },
-  {
-    field: 'address', title: '公司地址', minWidth: 'auto', align: 'center',
-    slots: {
-      default({ row }: any) {
-        return <span class={ 'font-medium' }>{ row.address ? row.address : '--' }</span>;
-      }
-    }
-  },
-  {
-    field: 'juridicalPerson', title: '法人', minWidth: 'auto', align: 'center',
-    slots: {
-      default({ row }: any) {
-        return <span class={ 'font-medium' }>{ row.juridicalPerson ? row.juridicalPerson : '--' }</span>;
-      }
-    }
-  },
-  {
-    field: 'juridicalPersonCreditCard', title: '法人信用卡', minWidth: 'auto', align: 'center',
-    slots: {
-      default({ row }: any) {
-        return <span
-            class={ 'font-medium' }>{ row.juridicalPersonCreditCard ? row.juridicalPersonCreditCard : '--' }</span>;
-      }
-    }
-  },
-  {
-    field: 'juridicalPersonCreditCardAddress', title: '法人信用卡地址', minWidth: 'auto', align: 'center',
-    slots: {
-      default({ row }: any) {
-        return <span
-            class={ 'font-medium' }>{ row.juridicalPersonCreditCardAddress ? row.juridicalPersonCreditCardAddress : '--' }</span>;
-      }
-    }
-  },
-  {
-    field: 'receivablesAccount', title: '收款账户', minWidth: 'auto', align: 'center',
-    slots: {
-      default({ row }: any) {
-        return <span class={ 'font-medium' }>{ row.receivablesAccount ? row.receivablesAccount : '--' }</span>;
-      }
-    }
-  },
-  {
-    field: 'receivablesAccountCompany', title: '收款账户公司', minWidth: 'auto', align: 'center',
-    slots: {
-      default({ row }: any) {
-        return <span
-            class={ 'font-medium' }>{ row.receivablesAccountCompany ? row.receivablesAccountCompany : '--' }</span>;
-      }
-    }
-  },
-  {
-    field: 'vatNumber', title: 'VAT税号', minWidth: 200, align: 'center',
-    slots: {
-      default({ row }: any) {
-        return <span class={ 'font-medium' }>{ row.vatNumber ? row.vatNumber : '--' }</span>;
-      }
-    }
-  },
-  {
-    field: 'vatCompany', title: 'VAT公司', minWidth: 'auto', align: 'center',
-    slots: {
-      default({ row }: any) {
-        return <span class={ 'font-medium' }>{ row.vatCompany ? row.vatCompany : '--' }</span>;
-      }
-    }
-  },
-  {
-    field: 'shopPhoneEmail', title: '店铺电话与邮箱', minWidth: 'auto', align: 'center',
-    slots: {
-      default({ row }: any) {
-        return <span class={ 'font-medium' }>{ row.shopPhoneEmail ? row.shopPhoneEmail : '--' }</span>;
-      }
-    }
-  }
-];
+// export const platformColumns = [
+//   { type: 'seq', title: '序 号', width: 60, align: 'center', fixed: 'left' },
+//   {
+//     field: 'operatorName', title: '运 营', minWidth: 'auto', align: 'center', fixed: 'left',
+//     slots: {
+//       default({ row }: any) {
+//         return <span class={ 'font-medium' }>{ row.operatorName ? row.operatorName : '--' }</span>;
+//       }
+//     }
+//   },
+//   {
+//     field: 'platformNumber', title: '店铺编号', minWidth: 'auto', align: 'center', fixed: 'left', slots: { default: 'platformNumber' }
+//   },
+//   {
+//     field: 'platformName', title: '店铺名称', minWidth: 'auto', align: 'center', fixed: 'left', slots: {
+//       default({ row }: any) {
+//         return <span class={ 'font-medium' }
+//                      style={ { color: '#303133' } }>{ row.platformName ? row.platformName : '--' }</span>;
+//       }
+//     }
+//   },
+//   {
+//     field: 'country', title: '国 家', minWidth: 'auto', align: 'center',
+//     slots: {
+//       default({ row }: any) {
+//         const country = countryInfoStore.countries.find(c => c.name === row.country);
+//         const color = country ? country.color : '#3875F6';
+//         return <el-tag effect="plain" round
+//                        style={ { color: color, borderColor: color } }>{ row.country ? row.country : '--' }</el-tag>;
+//       }
+//     }
+//   },
+//   {
+//     field: 'brandName', title: '品牌名称', minWidth: 'auto', align: 'center',
+//     slots: {
+//       default({ row }: any) {
+//         return <span class={ 'font-medium' }>{ row.brandName ? row.brandName : '--' }</span>;
+//       }
+//     }
+//   },
+//   {
+//     field: 'currencyCode', title: '货币代码', minWidth: 'auto', align: 'center',
+//     slots: {
+//       default({ row }: any) {
+//         return <span class={ 'font-medium' }>{ row.currencyCode ? row.currencyCode : '--' }</span>;
+//       }
+//     }
+//   },
+//   {
+//     field: 'status', title: '状 态', minWidth: 'auto', align: 'center',
+//     slots: {
+//       default({ row }: any) {
+//         return (
+//             <el-tag
+//                 class="font-medium"
+//                 type={ row.status === 1 ? 'success' : 'danger' }   // 动态绑定 type
+//             >
+//               { row.status === 1 ? '启用' : '暂停' }
+//             </el-tag>
+//         );
+//       }
+//     }
+//   },
+//   {
+//     field: 'platform', title: '平 台', minWidth: 'auto', align: 'center',
+//     slots: {
+//       default({ row }: any) {
+//         return <span class={ 'font-medium' }>{ row.platform ? row.platform : '--' }</span>;
+//       }
+//     }
+//   },
+//   {
+//     field: 'line', title: '线 路', minWidth: 'auto', align: 'center',
+//     slots: {
+//       default({ row }: any) {
+//         return <span class={ 'font-medium' }>{ row.line ? row.line : '--' }</span>;
+//       }
+//     }
+//   },
+//   {
+//     field: 'ipaddress', title: 'IP地址', minWidth: 'auto', align: 'center',
+//     slots: {
+//       default({ row }: any) {
+//         return <span class={ 'font-medium' }>{ row.ipaddress ? row.ipaddress : '--' }</span>;
+//       }
+//     }
+//   },
+//   {
+//     field: 'company', title: '公司名称', minWidth: 'auto', align: 'center',
+//     slots: {
+//       default({ row }: any) {
+//         return <span class={ 'font-medium' }>{ row.company ? row.company : '--' }</span>;
+//       }
+//     }
+//   },
+//   {
+//     field: 'companyEnglishName', title: '公司英文名称', minWidth: 'auto', align: 'center',
+//     slots: {
+//       default({ row }: any) {
+//         return <span class={ 'font-medium' }>{ row.companyEnglishName ? row.companyEnglishName : '--' }</span>;
+//       }
+//     }
+//   },
+//   {
+//     field: 'address', title: '公司地址', minWidth: 'auto', align: 'center',
+//     slots: {
+//       default({ row }: any) {
+//         return <span class={ 'font-medium' }>{ row.address ? row.address : '--' }</span>;
+//       }
+//     }
+//   },
+//   {
+//     field: 'juridicalPerson', title: '法人', minWidth: 'auto', align: 'center',
+//     slots: {
+//       default({ row }: any) {
+//         return <span class={ 'font-medium' }>{ row.juridicalPerson ? row.juridicalPerson : '--' }</span>;
+//       }
+//     }
+//   },
+//   {
+//     field: 'juridicalPersonCreditCard', title: '法人信用卡', minWidth: 'auto', align: 'center',
+//     slots: {
+//       default({ row }: any) {
+//         return <span
+//             class={ 'font-medium' }>{ row.juridicalPersonCreditCard ? row.juridicalPersonCreditCard : '--' }</span>;
+//       }
+//     }
+//   },
+//   {
+//     field: 'juridicalPersonCreditCardAddress', title: '法人信用卡地址', minWidth: 'auto', align: 'center',
+//     slots: {
+//       default({ row }: any) {
+//         return <span
+//             class={ 'font-medium' }>{ row.juridicalPersonCreditCardAddress ? row.juridicalPersonCreditCardAddress : '--' }</span>;
+//       }
+//     }
+//   },
+//   {
+//     field: 'receivablesAccount', title: '收款账户', minWidth: 'auto', align: 'center',
+//     slots: {
+//       default({ row }: any) {
+//         return <span class={ 'font-medium' }>{ row.receivablesAccount ? row.receivablesAccount : '--' }</span>;
+//       }
+//     }
+//   },
+//   {
+//     field: 'receivablesAccountCompany', title: '收款账户公司', minWidth: 'auto', align: 'center',
+//     slots: {
+//       default({ row }: any) {
+//         return <span
+//             class={ 'font-medium' }>{ row.receivablesAccountCompany ? row.receivablesAccountCompany : '--' }</span>;
+//       }
+//     }
+//   },
+//   {
+//     field: 'vatNumber', title: 'VAT税号', minWidth: 200, align: 'center',
+//     slots: {
+//       default({ row }: any) {
+//         return <span class={ 'font-medium' }>{ row.vatNumber ? row.vatNumber : '--' }</span>;
+//       }
+//     }
+//   },
+//   {
+//     field: 'vatCompany', title: 'VAT公司', minWidth: 'auto', align: 'center',
+//     slots: {
+//       default({ row }: any) {
+//         return <span class={ 'font-medium' }>{ row.vatCompany ? row.vatCompany : '--' }</span>;
+//       }
+//     }
+//   },
+//   {
+//     field: 'shopPhoneEmail', title: '店铺电话与邮箱', minWidth: 'auto', align: 'center',
+//     slots: {
+//       default({ row }: any) {
+//         return <span class={ 'font-medium' }>{ row.shopPhoneEmail ? row.shopPhoneEmail : '--' }</span>;
+//       }
+//     }
+//   }
+// ];
 
 export const shopCurrentColumns = [
   { type: 'seq', title: '序 号', width: 60, align: 'center', fixed: 'left' },
@@ -702,11 +702,11 @@ export const shopInfoColumns = [
     }
   },
   {
-    field: 'platformNumber', title: '店铺编号', minWidth: 'auto', align: 'center',
+    field: 'platformNumber', title: '店铺编号', minWidth: 'auto', align: 'center',fixed: 'left',
     slots: { default: 'platformNumber' }
   },
   {
-    field: 'platformName', title: '店铺名称', minWidth: 'auto', align: 'center',
+    field: 'platformName', title: '店铺名称', minWidth: 'auto', align: 'center', fixed: 'left',
     slots: {
       default({ row }: any) {
         return <span class={ 'font-medium' }>{ row.platformName ? row.platformName : '--' }</span>;
@@ -910,6 +910,14 @@ export const shopInfoColumns = [
         return <span class={ 'font-medium' }>{ row.subShopEmail ? row.subShopEmail : '--' }</span>;
       }
     }
+  },
+  {
+    field: 'create_datetime', title: '创建时间', minWidth: 'auto', align: 'center',
+    slots: {
+      default({ row }: any) {
+        return <span class={ 'font-medium' }>{ row.create_datetime ? row.create_datetime : '--' }</span>;
+      }
+    }
   }
 ]