import { useCountryInfoStore } from '/@/stores/countryInfo'; import { useResponse } from '/@/utils/useResponse'; import * as api from '/@/views/shop-information/api'; const countryInfoStore = useCountryInfoStore(); export const companySelect: Ref = ref([]); // const ret = await useResponse({}, api.getCompanySelect); // companySelect.value = ret.data; async function main() { const result = await api.getCompanySelect(); companySelect.value = result.data; } 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 { row.operatorName ? row.operatorName : '--' }; } } }, { field: 'platformNumber', title: '平台编号', minWidth: 'auto', align: 'center', slots: { default: 'platformNumber' } }, { field: 'platformName', title: '平台名称', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.platformName ? row.platformName : '--' }; } } }, { 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 { row.country ? row.country : '--' }; } } }, { field: 'brandName', title: '品牌名称', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.brandName ? row.brandName : '--' }; } } }, { field: 'currencyCode', title: '货币代码', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.currencyCode ? row.currencyCode : '--' }; } } }, { field: 'status', title: '状 态', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.status ? row.status : '--' }; } } }, { field: 'platform', title: '平 台', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.platform ? row.platform : '--' }; } } }, { field: 'line', title: '线 路', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.line ? row.line : '--' }; } } }, { field: 'ipaddress', title: 'IP地址', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.ipaddress ? row.ipaddress : '--' }; } } }, { field: 'company', title: '公司名称', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.company ? row.company : '--' }; } } }, { field: 'companyEnglishName', title: '公司英文名称', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.companyEnglishName ? row.companyEnglishName : '--' }; } } }, { field: 'address', title: '公司地址', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.address ? row.address : '--' }; } } }, { field: 'juridicalPerson', title: '法人', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.juridicalPerson ? row.juridicalPerson : '--' }; } } }, { field: 'juridicalPersonCreditCard', title: '法人信用卡', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.juridicalPersonCreditCard ? row.juridicalPersonCreditCard : '--' }; } } }, { field: 'juridicalPersonCreditCardAddress', title: '法人信用卡地址', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.juridicalPersonCreditCardAddress ? row.juridicalPersonCreditCardAddress : '--' }; } } }, { field: 'receivablesAccount', title: '收款账户', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.receivablesAccount ? row.receivablesAccount : '--' }; } } }, { field: 'receivablesAccountCompany', title: '收款账户公司', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.receivablesAccountCompany ? row.receivablesAccountCompany : '--' }; } } }, { field: 'vatNumber', title: 'VAT税号', minWidth: 200, align: 'center', slots: { default({ row }: any) { return { row.vatNumber ? row.vatNumber : '--' }; } } }, { field: 'vatCompany', title: 'VAT公司', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.vatCompany ? row.vatCompany : '--' }; } } }, { field: 'shopPhoneEmail', title: '店铺电话与邮箱', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.shopPhoneEmail ? row.shopPhoneEmail : '--' }; } } } ]; export const shopCurrentColumns = [ { type: 'seq', title: '序 号', width: 60, align: 'center', fixed: 'left' }, { field: 'operatorName', title: '运 营', minWidth: 'auto', align: 'center', fixed: 'left', slots: { default({ row }: any) { return { row.operatorName ? row.operatorName : '--' }; } } }, { field: 'platformNumber', title: '平台编号', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.platformNumber ? row.platformNumber : '--' }; } } }, { field: 'platformName', title: '平台名称', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.platformName ? row.platformName : '--' }; } } }, { 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 { row.country ? row.country : '--' }; } } }, { field: 'brandName', title: '品牌名称', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.brandName ? row.brandName : '--' }; } } }, { field: 'currencyCode', title: '货币代码', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.currencyCode ? row.currencyCode : '--' }; } } }, { field: 'status', title: '状 态', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return ( { row.status === 1 ? '启用' : '暂停' } ); } } }, { field: 'platform', title: '平 台', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.platform ? row.platform : '--' }; } } }, { field: 'line', title: '线 路', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.line ? row.line : '--' }; } } }, { field: 'ipaddress', title: 'IP地址', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.ipaddress ? row.ipaddress : '--' }; } } }, { field: 'belongsCompany', title: '关联公司', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { const company = companySelect.value.find(c => c.id === row.belongsCompany); return { company ? company.company : '--' }; } } }, { field: 'company', title: '公司名称', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.company ? row.company : '--' }; } } }, { field: 'companyEnglishName', title: '公司英文名称', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.companyEnglishName ? row.companyEnglishName : '--' }; } } }, { field: 'address', title: '公司地址', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.address ? row.address : '--' }; } } }, { field: 'juridicalPerson', title: '法 人', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.juridicalPerson ? row.juridicalPerson : '--' }; } } }, { field: 'juridicalPersonCreditCard', title: '法人信用卡', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.juridicalPersonCreditCard ? row.juridicalPersonCreditCard : '--' }; } } }, { field: 'juridicalPersonCreditCardAddress', title: '法人信用卡地址', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.juridicalPersonCreditCardAddress ? row.juridicalPersonCreditCardAddress : '--' }; } } }, { field: 'receivablesAccount', title: '收款账户', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.receivablesAccount ? row.receivablesAccount : '--' }; } } }, { field: 'receivablesAccountCompany', title: '收款账户公司', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.receivablesAccountCompany ? row.receivablesAccountCompany : '--' }; } } }, { field: 'vatNumber', title: 'VAT税号', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.vatNumber ? row.vatNumber : '--' }; } } }, { field: 'vatCompany', title: 'VAT公司', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.vatCompany ? row.vatCompany : '--' }; } } }, { field: 'shopPhoneAndName', title: '主账户电话', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.shopPhoneAndName !== null ? row.shopPhoneAndName : '--' }; } } }, { field: 'shopEmail', title: '主账户邮箱', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.shopEmail ? row.shopEmail : '--' }; } } }, { field: 'subShopPhoneAndName', title: '子账户电话', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.subShopPhoneAndName ? row.subShopPhoneAndName : '--' }; } } }, { field: 'subShopEmail', title: '子账户邮箱', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.subShopEmail ? row.subShopEmail : '--' }; } } } ]; export const historyColumns: any = [ { type: 'seq', title: '序 号', width: 60, align: 'center', fixed: 'left' }, { field: 'operatorName', title: '运 营', minWidth: 'auto', align: 'center', fixed: 'left', slots: { default({ row }: any) { return { row.operatorName ? row.operatorName : '--' }; } } }, { field: 'platformNumber', title: '平台编号', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.platformNumber ? row.platformNumber : '--' }; } } }, { field: 'platformName', title: '平台名称', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.platformName ? row.platformName : '--' }; } } }, { 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 { row.country ? row.country : '--' }; } } }, { field: 'brandName', title: '品牌名称', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.brandName ? row.brandName : '--' }; } } }, { field: 'currencyCode', title: '货币代码', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.currencyCode ? row.currencyCode : '--' }; } } }, { field: 'status', title: '状 态', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return ( { row.status === 1 ? '启用' : '暂停' } ); } } }, { field: 'platform', title: '平 台', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.platform ? row.platform : '--' }; } } }, { field: 'line', title: '线 路', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.line ? row.line : '--' }; } } }, { field: 'ipaddress', title: 'IP地址', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.ipaddress ? row.ipaddress : '--' }; } } }, { field: 'company', title: '公司名称', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.company ? row.company : '--' }; } } }, { field: 'companyEnglishName', title: '公司英文名称', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.companyEnglishName ? row.companyEnglishName : '--' }; } } }, { field: 'address', title: '公司地址', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.address ? row.address : '--' }; } } }, { field: 'juridicalPerson', title: '法 人', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.juridicalPerson ? row.juridicalPerson : '--' }; } } }, { field: 'juridicalPersonCreditCard', title: '法人信用卡', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.juridicalPersonCreditCard ? row.juridicalPersonCreditCard : '--' }; } } }, { field: 'juridicalPersonCreditCardAddress', title: '法人信用卡地址', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.juridicalPersonCreditCardAddress ? row.juridicalPersonCreditCardAddress : '--' }; } } }, { field: 'receivablesAccount', title: '收款账户', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.receivablesAccount ? row.receivablesAccount : '--' }; } } }, { field: 'receivablesAccountCompany', title: '收款账户公司', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.receivablesAccountCompany ? row.receivablesAccountCompany : '--' }; } } }, { field: 'vatNumber', title: 'VAT税号', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.vatNumber ? row.vatNumber : '--' }; } } }, { field: 'vatCompany', title: 'VAT公司', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.vatCompany ? row.vatCompany : '--' }; } } }, { field: 'create_datetime', title: '创建时间', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.create_datetime ? row.create_datetime : '--' }; } } }, { field: 'approveNum', title: '审批单号', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.approveNum ? row.approveNum : '--' }; } } }, { field: 'shopPhoneAndName', title: '主账户电话', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.shopPhoneAndName !== null ? row.shopPhoneAndName : '--' }; } } }, { field: 'shopEmail', title: '主账户邮箱', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.shopEmail ? row.shopEmail : '--' }; } } }, { field: 'subShopPhoneAndName', title: '子账户电话', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.subShopPhoneAndName ? row.subShopPhoneAndName : '--' }; } } }, { field: 'subShopEmail', title: '子账户邮箱', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.subShopEmail ? row.subShopEmail : '--' }; } } } ]; export const computerColumns: any = [ { type: 'seq', title: '序 号', width: 60, align: 'center', fixed: 'left' }, { field: 'operatorName', title: '使用人', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.operatorName ? row.operatorName : '--' }; } } }, { field: 'computerNumber', title: '电脑编号', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.computerNumber ? row.computerNumber : '--' }; } } }, { field: 'computerType', title: '计算机类型', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.computerType ? row.computerType : '--' }; } } }, { field: 'station', title: '位 置', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.station ? row.station : '--' }; } } }, { field: 'ipaddress', title: 'IP地址', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.ipaddress ? row.ipaddress : '--' }; } } }, { field: 'macaddress', title: 'MAC地址', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.macaddress ? row.macaddress : '--' }; } } } ]; export const shopInfoColumns = [ { type: 'seq', title: '序 号', width: 60, align: 'center', fixed: 'left' }, { field: 'operatorName', title: '运 营', minWidth: 'auto', align: 'center', fixed: 'left', slots: { default({ row }: any) { return { row.operatorName ? row.operatorName : '--' }; } } }, { field: 'platformNumber', title: '平台编号', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.platformNumber ? row.platformNumber : '--' }; } } }, { field: 'platformName', title: '平台名称', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.platformName ? row.platformName : '--' }; } } }, { 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 { row.country ? row.country : '--' }; } } }, { field: 'brandName', title: '品牌名称', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.brandName ? row.brandName : '--' }; } } }, { field: 'currencyCode', title: '货币代码', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.currencyCode ? row.currencyCode : '--' }; } } }, { field: 'status', title: '状 态', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return ( { row.status === 1 ? '启用' : '暂停' } ); } } }, { field: 'platform', title: '平 台', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.platform ? row.platform : '--' }; } } }, { field: 'line', title: '线 路', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.line ? row.line : '--' }; } } }, { field: 'ipaddress', title: 'IP地址', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.ipaddress ? row.ipaddress : '--' }; } } }, { field: 'belongsCompany', title: '关联公司', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { const company = companySelect.value.find(c => c.id === row.belongsCompany); return { company ? company.company : '--' }; } } }, { field: 'company', title: '公司名称', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.company ? row.company : '--' }; } } }, { field: 'companyEnglishName', title: '公司英文名称', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.companyEnglishName ? row.companyEnglishName : '--' }; } } }, { field: 'address', title: '公司地址', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.address ? row.address : '--' }; } } }, { field: 'juridicalPerson', title: '法 人', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.juridicalPerson ? row.juridicalPerson : '--' }; } } }, { field: 'juridicalPersonCreditCard', title: '法人信用卡', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.juridicalPersonCreditCard ? row.juridicalPersonCreditCard : '--' }; } } }, { field: 'juridicalPersonCreditCardAddress', title: '法人信用卡地址', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.juridicalPersonCreditCardAddress ? row.juridicalPersonCreditCardAddress : '--' }; } } }, { field: 'receivablesAccount', title: '收款账户', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.receivablesAccount ? row.receivablesAccount : '--' }; } } }, { field: 'receivablesAccountCompany', title: '收款账户公司', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.receivablesAccountCompany ? row.receivablesAccountCompany : '--' }; } } }, { field: 'vatNumber', title: 'VAT税号', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.vatNumber ? row.vatNumber : '--' }; } } }, { field: 'vatCompany', title: 'VAT公司', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.vatCompany ? row.vatCompany : '--' }; } } }, { field: 'shopPhoneAndName', title: '主账户电话', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.shopPhoneAndName !== null ? row.shopPhoneAndName : '--' }; } } }, { field: 'shopEmail', title: '主账户邮箱', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.shopEmail ? row.shopEmail : '--' }; } } }, { field: 'subShopPhoneAndName', title: '子账户电话', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.subShopPhoneAndName ? row.subShopPhoneAndName : '--' }; } } }, { field: 'subShopEmail', title: '子账户邮箱', minWidth: 'auto', align: 'center', slots: { default({ row }: any) { return { row.subShopEmail ? row.subShopEmail : '--' }; } } } ]