useColumns.tsx 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904
  1. import { useCountryInfoStore } from '/@/stores/countryInfo';
  2. import { useResponse } from '/@/utils/useResponse';
  3. import * as api from '/@/views/shop-information/api';
  4. const countryInfoStore = useCountryInfoStore();
  5. export const companySelect: Ref<any[]> = ref([]);
  6. // const ret = await useResponse({}, api.getCompanySelect);
  7. // companySelect.value = ret.data;
  8. async function main() {
  9. const result = await api.getCompanySelect();
  10. companySelect.value = result.data;
  11. }
  12. main();
  13. export const platformColumns = [
  14. { type: 'seq', title: '序 号', width: 60, align: 'center', fixed: 'left' },
  15. {
  16. field: 'operatorName', title: '运 营', minWidth: 'auto', align: 'center', fixed: 'left',
  17. slots: {
  18. default({ row }: any) {
  19. return <span class={ 'font-medium' }>{ row.operatorName ? row.operatorName : '--' }</span>;
  20. }
  21. }
  22. },
  23. {
  24. field: 'platformNumber', title: '平台编号', minWidth: 'auto', align: 'center', slots: { default: 'platformNumber' }
  25. },
  26. {
  27. field: 'platformName', title: '平台名称', minWidth: 'auto', align: 'center', slots: {
  28. default({ row }: any) {
  29. return <span class={ 'font-medium' }
  30. style={ { color: '#303133' } }>{ row.platformName ? row.platformName : '--' }</span>;
  31. }
  32. }
  33. },
  34. {
  35. field: 'country', title: '国 家', minWidth: 'auto', align: 'center',
  36. slots: {
  37. default({ row }: any) {
  38. const country = countryInfoStore.countries.find(c => c.name === row.country);
  39. const color = country ? country.color : '#3875F6';
  40. return <el-tag effect="plain" round
  41. style={ { color: color, borderColor: color } }>{ row.country ? row.country : '--' }</el-tag>;
  42. }
  43. }
  44. },
  45. {
  46. field: 'brandName', title: '品牌名称', minWidth: 'auto', align: 'center',
  47. slots: {
  48. default({ row }: any) {
  49. return <span class={ 'font-medium' }>{ row.brandName ? row.brandName : '--' }</span>;
  50. }
  51. }
  52. },
  53. {
  54. field: 'currencyCode', title: '货币代码', minWidth: 'auto', align: 'center',
  55. slots: {
  56. default({ row }: any) {
  57. return <span class={ 'font-medium' }>{ row.currencyCode ? row.currencyCode : '--' }</span>;
  58. }
  59. }
  60. },
  61. {
  62. field: 'status', title: '状 态', minWidth: 'auto', align: 'center',
  63. slots: {
  64. default({ row }: any) {
  65. return <span class={ 'font-medium' }>{ row.status ? row.status : '--' }</span>;
  66. }
  67. }
  68. },
  69. {
  70. field: 'platform', title: '平 台', minWidth: 'auto', align: 'center',
  71. slots: {
  72. default({ row }: any) {
  73. return <span class={ 'font-medium' }>{ row.platform ? row.platform : '--' }</span>;
  74. }
  75. }
  76. },
  77. {
  78. field: 'line', title: '线 路', minWidth: 'auto', align: 'center',
  79. slots: {
  80. default({ row }: any) {
  81. return <span class={ 'font-medium' }>{ row.line ? row.line : '--' }</span>;
  82. }
  83. }
  84. },
  85. {
  86. field: 'ipaddress', title: 'IP地址', minWidth: 'auto', align: 'center',
  87. slots: {
  88. default({ row }: any) {
  89. return <span class={ 'font-medium' }>{ row.ipaddress ? row.ipaddress : '--' }</span>;
  90. }
  91. }
  92. },
  93. {
  94. field: 'company', title: '公司名称', minWidth: 'auto', align: 'center',
  95. slots: {
  96. default({ row }: any) {
  97. return <span class={ 'font-medium' }>{ row.company ? row.company : '--' }</span>;
  98. }
  99. }
  100. },
  101. {
  102. field: 'companyEnglishName', title: '公司英文名称', minWidth: 'auto', align: 'center',
  103. slots: {
  104. default({ row }: any) {
  105. return <span class={ 'font-medium' }>{ row.companyEnglishName ? row.companyEnglishName : '--' }</span>;
  106. }
  107. }
  108. },
  109. {
  110. field: 'address', title: '公司地址', minWidth: 'auto', align: 'center',
  111. slots: {
  112. default({ row }: any) {
  113. return <span class={ 'font-medium' }>{ row.address ? row.address : '--' }</span>;
  114. }
  115. }
  116. },
  117. {
  118. field: 'juridicalPerson', title: '法人', minWidth: 'auto', align: 'center',
  119. slots: {
  120. default({ row }: any) {
  121. return <span class={ 'font-medium' }>{ row.juridicalPerson ? row.juridicalPerson : '--' }</span>;
  122. }
  123. }
  124. },
  125. {
  126. field: 'juridicalPersonCreditCard', title: '法人信用卡', minWidth: 'auto', align: 'center',
  127. slots: {
  128. default({ row }: any) {
  129. return <span
  130. class={ 'font-medium' }>{ row.juridicalPersonCreditCard ? row.juridicalPersonCreditCard : '--' }</span>;
  131. }
  132. }
  133. },
  134. {
  135. field: 'juridicalPersonCreditCardAddress', title: '法人信用卡地址', minWidth: 'auto', align: 'center',
  136. slots: {
  137. default({ row }: any) {
  138. return <span
  139. class={ 'font-medium' }>{ row.juridicalPersonCreditCardAddress ? row.juridicalPersonCreditCardAddress : '--' }</span>;
  140. }
  141. }
  142. },
  143. {
  144. field: 'receivablesAccount', title: '收款账户', minWidth: 'auto', align: 'center',
  145. slots: {
  146. default({ row }: any) {
  147. return <span class={ 'font-medium' }>{ row.receivablesAccount ? row.receivablesAccount : '--' }</span>;
  148. }
  149. }
  150. },
  151. {
  152. field: 'receivablesAccountCompany', title: '收款账户公司', minWidth: 'auto', align: 'center',
  153. slots: {
  154. default({ row }: any) {
  155. return <span
  156. class={ 'font-medium' }>{ row.receivablesAccountCompany ? row.receivablesAccountCompany : '--' }</span>;
  157. }
  158. }
  159. },
  160. {
  161. field: 'vatNumber', title: 'VAT税号', minWidth: 200, align: 'center',
  162. slots: {
  163. default({ row }: any) {
  164. return <span class={ 'font-medium' }>{ row.vatNumber ? row.vatNumber : '--' }</span>;
  165. }
  166. }
  167. },
  168. {
  169. field: 'vatCompany', title: 'VAT公司', minWidth: 'auto', align: 'center',
  170. slots: {
  171. default({ row }: any) {
  172. return <span class={ 'font-medium' }>{ row.vatCompany ? row.vatCompany : '--' }</span>;
  173. }
  174. }
  175. },
  176. {
  177. field: 'shopPhoneEmail', title: '店铺电话与邮箱', minWidth: 'auto', align: 'center',
  178. slots: {
  179. default({ row }: any) {
  180. return <span class={ 'font-medium' }>{ row.shopPhoneEmail ? row.shopPhoneEmail : '--' }</span>;
  181. }
  182. }
  183. }
  184. ];
  185. export const shopCurrentColumns = [
  186. { type: 'seq', title: '序 号', width: 60, align: 'center', fixed: 'left' },
  187. {
  188. field: 'operatorName', title: '运 营', minWidth: 'auto', align: 'center', fixed: 'left',
  189. slots: {
  190. default({ row }: any) {
  191. return <span class={ 'font-medium' }>{ row.operatorName ? row.operatorName : '--' }</span>;
  192. }
  193. }
  194. },
  195. {
  196. field: 'platformNumber', title: '平台编号', minWidth: 'auto', align: 'center',
  197. slots: {
  198. default({ row }: any) {
  199. return <span class={ 'font-medium' }>{ row.platformNumber ? row.platformNumber : '--' }</span>;
  200. }
  201. }
  202. },
  203. {
  204. field: 'platformName', title: '平台名称', minWidth: 'auto', align: 'center',
  205. slots: {
  206. default({ row }: any) {
  207. return <span class={ 'font-medium' }>{ row.platformName ? row.platformName : '--' }</span>;
  208. }
  209. }
  210. },
  211. {
  212. field: 'country', title: '国 家', minWidth: 'auto', align: 'center',
  213. slots: {
  214. default({ row }: any) {
  215. const country = countryInfoStore.countries.find(c => c.name === row.country);
  216. const color = country ? country.color : '#3875F6';
  217. return <el-tag effect="plain" round
  218. style={ { color: color, borderColor: color } }>{ row.country ? row.country : '--' }</el-tag>;
  219. }
  220. }
  221. },
  222. {
  223. field: 'brandName', title: '品牌名称', minWidth: 'auto', align: 'center',
  224. slots: {
  225. default({ row }: any) {
  226. return <span class={ 'font-medium' }>{ row.brandName ? row.brandName : '--' }</span>;
  227. }
  228. }
  229. },
  230. {
  231. field: 'currencyCode', title: '货币代码', minWidth: 'auto', align: 'center',
  232. slots: {
  233. default({ row }: any) {
  234. return <span class={ 'font-medium' }>{ row.currencyCode ? row.currencyCode : '--' }</span>;
  235. }
  236. }
  237. },
  238. {
  239. field: 'status', title: '状 态', minWidth: 'auto', align: 'center',
  240. slots: {
  241. default({ row }: any) {
  242. return (
  243. <el-tag
  244. class="font-medium"
  245. type={ row.status === 1 ? 'success' : 'danger' } // 动态绑定 type
  246. >
  247. { row.status === 1 ? '启用' : '暂停' }
  248. </el-tag>
  249. );
  250. }
  251. }
  252. },
  253. {
  254. field: 'platform', title: '平 台', minWidth: 'auto', align: 'center',
  255. slots: {
  256. default({ row }: any) {
  257. return <span class={ 'font-medium' }>{ row.platform ? row.platform : '--' }</span>;
  258. }
  259. }
  260. },
  261. {
  262. field: 'line', title: '线 路', minWidth: 'auto', align: 'center',
  263. slots: {
  264. default({ row }: any) {
  265. return <span class={ 'font-medium' }>{ row.line ? row.line : '--' }</span>;
  266. }
  267. }
  268. },
  269. {
  270. field: 'ipaddress', title: 'IP地址', minWidth: 'auto', align: 'center',
  271. slots: {
  272. default({ row }: any) {
  273. return <span class={ 'font-medium' }>{ row.ipaddress ? row.ipaddress : '--' }</span>;
  274. }
  275. }
  276. },
  277. {
  278. field: 'belongsCompany', title: '关联公司', minWidth: 'auto', align: 'center',
  279. slots: {
  280. default({ row }: any) {
  281. const company = companySelect.value.find(c => c.id === row.belongsCompany);
  282. return <span class="font-medium">{ company ? company.company : '--' }</span>;
  283. }
  284. }
  285. },
  286. {
  287. field: 'company', title: '公司名称', minWidth: 'auto', align: 'center',
  288. slots: {
  289. default({ row }: any) {
  290. return <span class={ 'font-medium' }>{ row.company ? row.company : '--' }</span>;
  291. }
  292. }
  293. },
  294. {
  295. field: 'companyEnglishName', title: '公司英文名称', minWidth: 'auto', align: 'center',
  296. slots: {
  297. default({ row }: any) {
  298. return <span class={ 'font-medium' }>{ row.companyEnglishName ? row.companyEnglishName : '--' }</span>;
  299. }
  300. }
  301. },
  302. {
  303. field: 'address', title: '公司地址', minWidth: 'auto', align: 'center',
  304. slots: {
  305. default({ row }: any) {
  306. return <span class={ 'font-medium' }>{ row.address ? row.address : '--' }</span>;
  307. }
  308. }
  309. },
  310. {
  311. field: 'juridicalPerson', title: '法 人', minWidth: 'auto', align: 'center',
  312. slots: {
  313. default({ row }: any) {
  314. return <span class={ 'font-medium' }>{ row.juridicalPerson ? row.juridicalPerson : '--' }</span>;
  315. }
  316. }
  317. },
  318. {
  319. field: 'juridicalPersonCreditCard', title: '法人信用卡', minWidth: 'auto', align: 'center',
  320. slots: {
  321. default({ row }: any) {
  322. return <span
  323. class={ 'font-medium' }>{ row.juridicalPersonCreditCard ? row.juridicalPersonCreditCard : '--' }</span>;
  324. }
  325. }
  326. },
  327. {
  328. field: 'juridicalPersonCreditCardAddress', title: '法人信用卡地址', minWidth: 'auto', align: 'center',
  329. slots: {
  330. default({ row }: any) {
  331. return <span
  332. class={ 'font-medium' }>{ row.juridicalPersonCreditCardAddress ? row.juridicalPersonCreditCardAddress : '--' }</span>;
  333. }
  334. }
  335. },
  336. {
  337. field: 'receivablesAccount', title: '收款账户', minWidth: 'auto', align: 'center',
  338. slots: {
  339. default({ row }: any) {
  340. return <span class={ 'font-medium' }>{ row.receivablesAccount ? row.receivablesAccount : '--' }</span>;
  341. }
  342. }
  343. },
  344. {
  345. field: 'receivablesAccountCompany', title: '收款账户公司', minWidth: 'auto', align: 'center',
  346. slots: {
  347. default({ row }: any) {
  348. return <span
  349. class={ 'font-medium' }>{ row.receivablesAccountCompany ? row.receivablesAccountCompany : '--' }</span>;
  350. }
  351. }
  352. },
  353. {
  354. field: 'vatNumber', title: 'VAT税号', minWidth: 'auto', align: 'center',
  355. slots: {
  356. default({ row }: any) {
  357. return <span class={ 'font-medium' }>{ row.vatNumber ? row.vatNumber : '--' }</span>;
  358. }
  359. }
  360. },
  361. {
  362. field: 'vatCompany', title: 'VAT公司', minWidth: 'auto', align: 'center',
  363. slots: {
  364. default({ row }: any) {
  365. return <span class={ 'font-medium' }>{ row.vatCompany ? row.vatCompany : '--' }</span>;
  366. }
  367. }
  368. },
  369. {
  370. field: 'shopPhoneAndName', title: '主账户电话', minWidth: 'auto', align: 'center',
  371. slots: {
  372. default({ row }: any) {
  373. return <span class={ 'font-medium' }>{ row.shopPhoneAndName !== null ? row.shopPhoneAndName : '--' }</span>;
  374. }
  375. }
  376. },
  377. {
  378. field: 'shopEmail', title: '主账户邮箱', minWidth: 'auto', align: 'center',
  379. slots: {
  380. default({ row }: any) {
  381. return <span class={ 'font-medium' }>{ row.shopEmail ? row.shopEmail : '--' }</span>;
  382. }
  383. }
  384. },
  385. {
  386. field: 'subShopPhoneAndName', title: '子账户电话', minWidth: 'auto', align: 'center',
  387. slots: {
  388. default({ row }: any) {
  389. return <span class={ 'font-medium' }>{ row.subShopPhoneAndName ? row.subShopPhoneAndName : '--' }</span>;
  390. }
  391. }
  392. },
  393. {
  394. field: 'subShopEmail', title: '子账户邮箱', minWidth: 'auto', align: 'center',
  395. slots: {
  396. default({ row }: any) {
  397. return <span class={ 'font-medium' }>{ row.subShopEmail ? row.subShopEmail : '--' }</span>;
  398. }
  399. }
  400. }
  401. ];
  402. export const historyColumns: any = [
  403. { type: 'seq', title: '序 号', width: 60, align: 'center', fixed: 'left' },
  404. {
  405. field: 'operatorName', title: '运 营', minWidth: 'auto', align: 'center', fixed: 'left',
  406. slots: {
  407. default({ row }: any) {
  408. return <span class={ 'font-medium' }>{ row.operatorName ? row.operatorName : '--' }</span>;
  409. }
  410. }
  411. },
  412. {
  413. field: 'platformNumber', title: '平台编号', minWidth: 'auto', align: 'center',
  414. slots: {
  415. default({ row }: any) {
  416. return <span class={ 'font-medium' }>{ row.platformNumber ? row.platformNumber : '--' }</span>;
  417. }
  418. }
  419. },
  420. {
  421. field: 'platformName', title: '平台名称', minWidth: 'auto', align: 'center',
  422. slots: {
  423. default({ row }: any) {
  424. return <span class={ 'font-medium' }>{ row.platformName ? row.platformName : '--' }</span>;
  425. }
  426. }
  427. },
  428. {
  429. field: 'country', title: '国 家', minWidth: 'auto', align: 'center',
  430. slots: {
  431. default({ row }: any) {
  432. const country = countryInfoStore.countries.find(c => c.name === row.country);
  433. const color = country ? country.color : '#3875F6';
  434. return <el-tag effect="plain" round
  435. style={ { color: color, borderColor: color } }>{ row.country ? row.country : '--' }</el-tag>;
  436. }
  437. }
  438. },
  439. {
  440. field: 'brandName', title: '品牌名称', minWidth: 'auto', align: 'center',
  441. slots: {
  442. default({ row }: any) {
  443. return <span class={ 'font-medium' }>{ row.brandName ? row.brandName : '--' }</span>;
  444. }
  445. }
  446. },
  447. {
  448. field: 'currencyCode', title: '货币代码', minWidth: 'auto', align: 'center',
  449. slots: {
  450. default({ row }: any) {
  451. return <span class={ 'font-medium' }>{ row.currencyCode ? row.currencyCode : '--' }</span>;
  452. }
  453. }
  454. },
  455. {
  456. field: 'status', title: '状 态', minWidth: 'auto', align: 'center',
  457. slots: {
  458. default({ row }: any) {
  459. return (
  460. <el-tag
  461. class="font-medium"
  462. type={ row.status === 1 ? 'success' : 'danger' } // 动态绑定 type
  463. >
  464. { row.status === 1 ? '启用' : '暂停' }
  465. </el-tag>
  466. );
  467. }
  468. }
  469. },
  470. {
  471. field: 'platform', title: '平 台', minWidth: 'auto', align: 'center',
  472. slots: {
  473. default({ row }: any) {
  474. return <span class={ 'font-medium' }>{ row.platform ? row.platform : '--' }</span>;
  475. }
  476. }
  477. },
  478. {
  479. field: 'line', title: '线 路', minWidth: 'auto', align: 'center',
  480. slots: {
  481. default({ row }: any) {
  482. return <span class={ 'font-medium' }>{ row.line ? row.line : '--' }</span>;
  483. }
  484. }
  485. },
  486. {
  487. field: 'ipaddress', title: 'IP地址', minWidth: 'auto', align: 'center',
  488. slots: {
  489. default({ row }: any) {
  490. return <span class={ 'font-medium' }>{ row.ipaddress ? row.ipaddress : '--' }</span>;
  491. }
  492. }
  493. },
  494. {
  495. field: 'company', title: '公司名称', minWidth: 'auto', align: 'center',
  496. slots: {
  497. default({ row }: any) {
  498. return <span class={ 'font-medium' }>{ row.company ? row.company : '--' }</span>;
  499. }
  500. }
  501. },
  502. {
  503. field: 'companyEnglishName', title: '公司英文名称', minWidth: 'auto', align: 'center',
  504. slots: {
  505. default({ row }: any) {
  506. return <span class={ 'font-medium' }>{ row.companyEnglishName ? row.companyEnglishName : '--' }</span>;
  507. }
  508. }
  509. },
  510. {
  511. field: 'address', title: '公司地址', minWidth: 'auto', align: 'center',
  512. slots: {
  513. default({ row }: any) {
  514. return <span class={ 'font-medium' }>{ row.address ? row.address : '--' }</span>;
  515. }
  516. }
  517. },
  518. {
  519. field: 'juridicalPerson', title: '法 人', minWidth: 'auto', align: 'center',
  520. slots: {
  521. default({ row }: any) {
  522. return <span class={ 'font-medium' }>{ row.juridicalPerson ? row.juridicalPerson : '--' }</span>;
  523. }
  524. }
  525. },
  526. {
  527. field: 'juridicalPersonCreditCard', title: '法人信用卡', minWidth: 'auto', align: 'center',
  528. slots: {
  529. default({ row }: any) {
  530. return <span
  531. class={ 'font-medium' }>{ row.juridicalPersonCreditCard ? row.juridicalPersonCreditCard : '--' }</span>;
  532. }
  533. }
  534. },
  535. {
  536. field: 'juridicalPersonCreditCardAddress', title: '法人信用卡地址', minWidth: 'auto', align: 'center',
  537. slots: {
  538. default({ row }: any) {
  539. return <span
  540. class={ 'font-medium' }>{ row.juridicalPersonCreditCardAddress ? row.juridicalPersonCreditCardAddress : '--' }</span>;
  541. }
  542. }
  543. },
  544. {
  545. field: 'receivablesAccount', title: '收款账户', minWidth: 'auto', align: 'center',
  546. slots: {
  547. default({ row }: any) {
  548. return <span class={ 'font-medium' }>{ row.receivablesAccount ? row.receivablesAccount : '--' }</span>;
  549. }
  550. }
  551. },
  552. {
  553. field: 'receivablesAccountCompany', title: '收款账户公司', minWidth: 'auto', align: 'center',
  554. slots: {
  555. default({ row }: any) {
  556. return <span
  557. class={ 'font-medium' }>{ row.receivablesAccountCompany ? row.receivablesAccountCompany : '--' }</span>;
  558. }
  559. }
  560. },
  561. {
  562. field: 'vatNumber', title: 'VAT税号', minWidth: 'auto', align: 'center',
  563. slots: {
  564. default({ row }: any) {
  565. return <span class={ 'font-medium' }>{ row.vatNumber ? row.vatNumber : '--' }</span>;
  566. }
  567. }
  568. },
  569. {
  570. field: 'vatCompany', title: 'VAT公司', minWidth: 'auto', align: 'center',
  571. slots: {
  572. default({ row }: any) {
  573. return <span class={ 'font-medium' }>{ row.vatCompany ? row.vatCompany : '--' }</span>;
  574. }
  575. }
  576. },
  577. {
  578. field: 'create_datetime', title: '创建时间', minWidth: 'auto', align: 'center',
  579. slots: {
  580. default({ row }: any) {
  581. return <span class={ 'font-medium' }>{ row.create_datetime ? row.create_datetime : '--' }</span>;
  582. }
  583. }
  584. },
  585. {
  586. field: 'approveNum', title: '审批单号', minWidth: 'auto', align: 'center',
  587. slots: {
  588. default({ row }: any) {
  589. return <span class={ 'font-medium' }>{ row.approveNum ? row.approveNum : '--' }</span>;
  590. }
  591. }
  592. },
  593. {
  594. field: 'shopPhoneAndName', title: '主账户电话', minWidth: 'auto', align: 'center',
  595. slots: {
  596. default({ row }: any) {
  597. return <span class={ 'font-medium' }>{ row.shopPhoneAndName !== null ? row.shopPhoneAndName : '--' }</span>;
  598. }
  599. }
  600. },
  601. {
  602. field: 'shopEmail', title: '主账户邮箱', minWidth: 'auto', align: 'center',
  603. slots: {
  604. default({ row }: any) {
  605. return <span class={ 'font-medium' }>{ row.shopEmail ? row.shopEmail : '--' }</span>;
  606. }
  607. }
  608. },
  609. {
  610. field: 'subShopPhoneAndName', title: '子账户电话', minWidth: 'auto', align: 'center',
  611. slots: {
  612. default({ row }: any) {
  613. return <span class={ 'font-medium' }>{ row.subShopPhoneAndName ? row.subShopPhoneAndName : '--' }</span>;
  614. }
  615. }
  616. },
  617. {
  618. field: 'subShopEmail', title: '子账户邮箱', minWidth: 'auto', align: 'center',
  619. slots: {
  620. default({ row }: any) {
  621. return <span class={ 'font-medium' }>{ row.subShopEmail ? row.subShopEmail : '--' }</span>;
  622. }
  623. }
  624. }
  625. ];
  626. export const computerColumns: any = [
  627. { type: 'seq', title: '序 号', width: 60, align: 'center', fixed: 'left' },
  628. {
  629. field: 'operatorName', title: '使用人', minWidth: 'auto', align: 'center',
  630. slots: {
  631. default({ row }: any) {
  632. return <span class={ 'font-medium' }>{ row.operatorName ? row.operatorName : '--' }</span>;
  633. }
  634. }
  635. },
  636. {
  637. field: 'computerNumber', title: '电脑编号', minWidth: 'auto', align: 'center',
  638. slots: {
  639. default({ row }: any) {
  640. return <span class={ 'font-medium' }>{ row.computerNumber ? row.computerNumber : '--' }</span>;
  641. }
  642. }
  643. },
  644. {
  645. field: 'computerType', title: '计算机类型', minWidth: 'auto', align: 'center',
  646. slots: {
  647. default({ row }: any) {
  648. return <span class={ 'font-medium' }>{ row.computerType ? row.computerType : '--' }</span>;
  649. }
  650. }
  651. },
  652. {
  653. field: 'station', title: '位 置', minWidth: 'auto', align: 'center',
  654. slots: {
  655. default({ row }: any) {
  656. return <span class={ 'font-medium' }>{ row.station ? row.station : '--' }</span>;
  657. }
  658. }
  659. },
  660. {
  661. field: 'ipaddress', title: 'IP地址', minWidth: 'auto', align: 'center',
  662. slots: {
  663. default({ row }: any) {
  664. return <span class={ 'font-medium' }>{ row.ipaddress ? row.ipaddress : '--' }</span>;
  665. }
  666. }
  667. },
  668. {
  669. field: 'macaddress', title: 'MAC地址', minWidth: 'auto', align: 'center',
  670. slots: {
  671. default({ row }: any) {
  672. return <span class={ 'font-medium' }>{ row.macaddress ? row.macaddress : '--' }</span>;
  673. }
  674. }
  675. }
  676. ];
  677. export const shopInfoColumns = [
  678. { type: 'seq', title: '序 号', width: 60, align: 'center', fixed: 'left' },
  679. {
  680. field: 'operatorName', title: '运 营', minWidth: 'auto', align: 'center', fixed: 'left',
  681. slots: {
  682. default({ row }: any) {
  683. return <span class={ 'font-medium' }>{ row.operatorName ? row.operatorName : '--' }</span>;
  684. }
  685. }
  686. },
  687. {
  688. field: 'platformNumber', title: '平台编号', minWidth: 'auto', align: 'center',
  689. slots: {
  690. default({ row }: any) {
  691. return <span class={ 'font-medium' }>{ row.platformNumber ? row.platformNumber : '--' }</span>;
  692. }
  693. }
  694. },
  695. {
  696. field: 'platformName', title: '平台名称', minWidth: 'auto', align: 'center',
  697. slots: {
  698. default({ row }: any) {
  699. return <span class={ 'font-medium' }>{ row.platformName ? row.platformName : '--' }</span>;
  700. }
  701. }
  702. },
  703. {
  704. field: 'country', title: '国 家', minWidth: 'auto', align: 'center',
  705. slots: {
  706. default({ row }: any) {
  707. const country = countryInfoStore.countries.find(c => c.name === row.country);
  708. const color = country ? country.color : '#3875F6';
  709. return <el-tag effect="plain" round
  710. style={ { color: color, borderColor: color } }>{ row.country ? row.country : '--' }</el-tag>;
  711. }
  712. }
  713. },
  714. {
  715. field: 'brandName', title: '品牌名称', minWidth: 'auto', align: 'center',
  716. slots: {
  717. default({ row }: any) {
  718. return <span class={ 'font-medium' }>{ row.brandName ? row.brandName : '--' }</span>;
  719. }
  720. }
  721. },
  722. {
  723. field: 'currencyCode', title: '货币代码', minWidth: 'auto', align: 'center',
  724. slots: {
  725. default({ row }: any) {
  726. return <span class={ 'font-medium' }>{ row.currencyCode ? row.currencyCode : '--' }</span>;
  727. }
  728. }
  729. },
  730. {
  731. field: 'status', title: '状 态', minWidth: 'auto', align: 'center',
  732. slots: {
  733. default({ row }: any) {
  734. return (
  735. <el-tag
  736. class="font-medium"
  737. type={ row.status === 1 ? 'success' : 'danger' } // 动态绑定 type
  738. >
  739. { row.status === 1 ? '启用' : '暂停' }
  740. </el-tag>
  741. );
  742. }
  743. }
  744. },
  745. {
  746. field: 'platform', title: '平 台', minWidth: 'auto', align: 'center',
  747. slots: {
  748. default({ row }: any) {
  749. return <span class={ 'font-medium' }>{ row.platform ? row.platform : '--' }</span>;
  750. }
  751. }
  752. },
  753. {
  754. field: 'line', title: '线 路', minWidth: 'auto', align: 'center',
  755. slots: {
  756. default({ row }: any) {
  757. return <span class={ 'font-medium' }>{ row.line ? row.line : '--' }</span>;
  758. }
  759. }
  760. },
  761. {
  762. field: 'ipaddress', title: 'IP地址', minWidth: 'auto', align: 'center',
  763. slots: {
  764. default({ row }: any) {
  765. return <span class={ 'font-medium' }>{ row.ipaddress ? row.ipaddress : '--' }</span>;
  766. }
  767. }
  768. },
  769. {
  770. field: 'belongsCompany', title: '关联公司', minWidth: 'auto', align: 'center',
  771. slots: {
  772. default({ row }: any) {
  773. const company = companySelect.value.find(c => c.id === row.belongsCompany);
  774. return <span class="font-medium">{ company ? company.company : '--' }</span>;
  775. }
  776. }
  777. },
  778. {
  779. field: 'company', title: '公司名称', minWidth: 'auto', align: 'center',
  780. slots: {
  781. default({ row }: any) {
  782. return <span class={ 'font-medium' }>{ row.company ? row.company : '--' }</span>;
  783. }
  784. }
  785. },
  786. {
  787. field: 'companyEnglishName', title: '公司英文名称', minWidth: 'auto', align: 'center',
  788. slots: {
  789. default({ row }: any) {
  790. return <span class={ 'font-medium' }>{ row.companyEnglishName ? row.companyEnglishName : '--' }</span>;
  791. }
  792. }
  793. },
  794. {
  795. field: 'address', title: '公司地址', minWidth: 'auto', align: 'center',
  796. slots: {
  797. default({ row }: any) {
  798. return <span class={ 'font-medium' }>{ row.address ? row.address : '--' }</span>;
  799. }
  800. }
  801. },
  802. {
  803. field: 'juridicalPerson', title: '法 人', minWidth: 'auto', align: 'center',
  804. slots: {
  805. default({ row }: any) {
  806. return <span class={ 'font-medium' }>{ row.juridicalPerson ? row.juridicalPerson : '--' }</span>;
  807. }
  808. }
  809. },
  810. {
  811. field: 'juridicalPersonCreditCard', title: '法人信用卡', minWidth: 'auto', align: 'center',
  812. slots: {
  813. default({ row }: any) {
  814. return <span
  815. class={ 'font-medium' }>{ row.juridicalPersonCreditCard ? row.juridicalPersonCreditCard : '--' }</span>;
  816. }
  817. }
  818. },
  819. {
  820. field: 'juridicalPersonCreditCardAddress', title: '法人信用卡地址', minWidth: 'auto', align: 'center',
  821. slots: {
  822. default({ row }: any) {
  823. return <span
  824. class={ 'font-medium' }>{ row.juridicalPersonCreditCardAddress ? row.juridicalPersonCreditCardAddress : '--' }</span>;
  825. }
  826. }
  827. },
  828. {
  829. field: 'receivablesAccount', title: '收款账户', minWidth: 'auto', align: 'center',
  830. slots: {
  831. default({ row }: any) {
  832. return <span class={ 'font-medium' }>{ row.receivablesAccount ? row.receivablesAccount : '--' }</span>;
  833. }
  834. }
  835. },
  836. {
  837. field: 'receivablesAccountCompany', title: '收款账户公司', minWidth: 'auto', align: 'center',
  838. slots: {
  839. default({ row }: any) {
  840. return <span
  841. class={ 'font-medium' }>{ row.receivablesAccountCompany ? row.receivablesAccountCompany : '--' }</span>;
  842. }
  843. }
  844. },
  845. {
  846. field: 'vatNumber', title: 'VAT税号', minWidth: 'auto', align: 'center',
  847. slots: {
  848. default({ row }: any) {
  849. return <span class={ 'font-medium' }>{ row.vatNumber ? row.vatNumber : '--' }</span>;
  850. }
  851. }
  852. },
  853. {
  854. field: 'vatCompany', title: 'VAT公司', minWidth: 'auto', align: 'center',
  855. slots: {
  856. default({ row }: any) {
  857. return <span class={ 'font-medium' }>{ row.vatCompany ? row.vatCompany : '--' }</span>;
  858. }
  859. }
  860. },
  861. {
  862. field: 'shopPhoneAndName', title: '主账户电话', minWidth: 'auto', align: 'center',
  863. slots: {
  864. default({ row }: any) {
  865. return <span class={ 'font-medium' }>{ row.shopPhoneAndName !== null ? row.shopPhoneAndName : '--' }</span>;
  866. }
  867. }
  868. },
  869. {
  870. field: 'shopEmail', title: '主账户邮箱', minWidth: 'auto', align: 'center',
  871. slots: {
  872. default({ row }: any) {
  873. return <span class={ 'font-medium' }>{ row.shopEmail ? row.shopEmail : '--' }</span>;
  874. }
  875. }
  876. },
  877. {
  878. field: 'subShopPhoneAndName', title: '子账户电话', minWidth: 'auto', align: 'center',
  879. slots: {
  880. default({ row }: any) {
  881. return <span class={ 'font-medium' }>{ row.subShopPhoneAndName ? row.subShopPhoneAndName : '--' }</span>;
  882. }
  883. }
  884. },
  885. {
  886. field: 'subShopEmail', title: '子账户邮箱', minWidth: 'auto', align: 'center',
  887. slots: {
  888. default({ row }: any) {
  889. return <span class={ 'font-medium' }>{ row.subShopEmail ? row.subShopEmail : '--' }</span>;
  890. }
  891. }
  892. }
  893. ]