useColumns.tsx 28 KB

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