companyRel.vue 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436
  1. <template>
  2. <div class="app-container zap-main">
  3. <el-row v-if="activeName === '0'" class="zap-table-search">
  4. <right-toolbar style="margin-top: 4px;" :showSearch.sync="showSearch" @queryTable="getList">收起</right-toolbar>
  5. <span class="zap-table-search__title">所选条件:</span>
  6. <div style="float: right;margin-right:1%">
  7. <el-button type="cyan" icon="el-icon-search" @click="handleQuery">搜索</el-button>
  8. <el-button icon="el-icon-refresh" @click="resetQuery" style="float: ;">重置</el-button>
  9. <column-setting
  10. class="zap-column-setting"
  11. :checkList="checkList"
  12. :tableList="tableList"
  13. :selfDom="selfDom"
  14. :tableId="tableId"
  15. ></column-setting>
  16. </div>
  17. <hr style="margin-top: 16px;" />
  18. <el-form
  19. :model="queryParams"
  20. ref="queryForm"
  21. :inline="true"
  22. v-show="showSearch"
  23. label-width="auto"
  24. >
  25. <el-form-item label="企业名称" prop="companyName" size="large">
  26. <el-input
  27. maxlength="30"
  28. v-model="queryParams.companyName"
  29. placeholder="请输入企业名称"
  30. clearable
  31. @keyup.enter.native="handleQuery"
  32. />
  33. </el-form-item>
  34. <el-form-item label="社会统一代码" prop="scySocialCode" size="large">
  35. <el-input
  36. maxlength="30"
  37. v-model="queryParams.scySocialCode"
  38. placeholder="请输入社会统一代码"
  39. clearable
  40. @keyup.enter.native="handleQuery"
  41. />
  42. </el-form-item>
  43. <el-form-item label="链属状态" prop="scrStatus" size="large">
  44. <el-select v-model="queryParams.scrStatus" placeholder="链属状态" clearable>
  45. <el-option
  46. v-for="dict in scrStatusOptions"
  47. :key="dict.dictValue"
  48. :label="dict.dictLabel"
  49. :value="dict.dictValue"
  50. ></el-option>
  51. </el-select>
  52. </el-form-item>
  53. <el-form-item label="认证状态" prop="scpStatus" size="large">
  54. <el-select v-model="queryParams.scpStatus" placeholder="认证状态" clearable>
  55. <el-option
  56. v-for="dict in scpStatusOptions"
  57. :key="dict.dictValue"
  58. :label="dict.dictLabel"
  59. :value="dict.dictValue"
  60. ></el-option>
  61. </el-select>
  62. </el-form-item>
  63. <el-form-item label="链属关系" prop="scrType" size="large">
  64. <el-select v-model="queryParams.scrType" placeholder="链属关系" clearable>
  65. <el-option
  66. v-for="dict in scrTypeOptions"
  67. :key="dict.dictValue"
  68. :label="dict.dictLabel"
  69. :value="dict.dictValue"
  70. ></el-option>
  71. </el-select>
  72. </el-form-item>
  73. </el-form>
  74. </el-row>
  75. <!-- 未认证列表 -->
  76. <el-row v-else-if="activeName === '1'" class="zap-table-search">
  77. <right-toolbar
  78. style="margin-top: 4px;"
  79. :showSearch.sync="showSearch"
  80. @queryTable="getSpare"
  81. >收起</right-toolbar>
  82. <span class="zap-table-search__title">所选条件:</span>
  83. <div style="float: right;margin-right:1%">
  84. <el-button type="cyan" icon="el-icon-search" @click="handleSpareQuery">搜索</el-button>
  85. <el-button icon="el-icon-refresh" @click="resetSpareQuery" style="float: ;">重置</el-button>
  86. </div>
  87. <hr style="margin-top: 16px;" />
  88. <el-form
  89. :model="spareParams"
  90. ref="querySpareForm"
  91. :inline="true"
  92. v-show="showSearch"
  93. label-width="auto"
  94. >
  95. <el-form-item label="企业名称" prop="companyName" size="large">
  96. <el-input
  97. maxlength="30"
  98. v-model="spareParams.companyName"
  99. placeholder="请输入企业名称"
  100. clearable
  101. @keyup.enter.native="handleSpareQuery"
  102. />
  103. </el-form-item>
  104. <el-form-item label="社会统一代码" prop="scySocialCode" size="large">
  105. <el-input
  106. maxlength="30"
  107. v-model="spareParams.scySocialCode"
  108. placeholder="请输入社会统一代码"
  109. clearable
  110. @keyup.enter.native="handleSpareQuery"
  111. />
  112. </el-form-item>
  113. <el-form-item label="链属关系" prop="scrType" size="large">
  114. <el-select v-model="spareParams.scrType" placeholder="请选择链属关系" clearable>
  115. <el-option
  116. v-for="dict in scrTypeOptions"
  117. :key="dict.dictValue"
  118. :label="dict.dictLabel"
  119. :value="dict.dictValue"
  120. ></el-option>
  121. </el-select>
  122. </el-form-item>
  123. </el-form>
  124. </el-row>
  125. <el-row class="zap-margin-top">
  126. <div class="zap-credit__tabs zap-credit__content">
  127. <div class="zap-credit__buttons">
  128. <el-button
  129. type="primary"
  130. icon="el-icon-plus"
  131. @click="handleAdd"
  132. v-hasPermi="['service:rel:add']"
  133. >新增</el-button>
  134. <el-button
  135. type="success"
  136. icon="el-icon-upload2"
  137. @click="handleImport"
  138. v-hasPermi="['service:relImport:importData']"
  139. >导入</el-button>
  140. </div>
  141. <el-tabs v-model="activeName">
  142. <el-tab-pane label="我的链属">
  143. <el-table class="zap-margin-top" v-loading="loading" :data="companyRelList" stripe>
  144. <el-table-column label="序号" type="index" width="50" align="center">
  145. <template slot-scope="scope">
  146. <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
  147. </template>
  148. </el-table-column>
  149. <el-table-column
  150. label="社会统一代码"
  151. align="center"
  152. prop="companyCode"
  153. v-if="uncheckList.companyCode"
  154. show-overflow-tooltip
  155. >
  156. <template slot-scope="scope">
  157. <span v-if="scope.row.launch">{{scope.row.receiveScySocialCode}}</span>
  158. <span v-if="scope.row.receive">{{scope.row.launchScySocialCode}}</span>
  159. <span v-if="scope.row.spare">{{scope.row.scpSocialCode}}</span>
  160. </template>
  161. </el-table-column>
  162. <el-table-column
  163. label="企业名称"
  164. align="center"
  165. prop="companyName"
  166. v-if="uncheckList.companyName"
  167. show-overflow-tooltip
  168. >
  169. <template slot-scope="scope">
  170. <span v-if="scope.row.launch">{{scope.row.receiveScyName}}</span>
  171. <span v-if="scope.row.receive">{{scope.row.launchScyName}}</span>
  172. <span v-if="scope.row.spare">{{scope.row.scpName}}</span>
  173. </template>
  174. </el-table-column>
  175. <el-table-column
  176. label="链属关系"
  177. align="center"
  178. prop="companyType"
  179. v-if="uncheckList.companyType"
  180. >
  181. <template slot-scope="scope">
  182. <span
  183. v-if="scope.row.launch"
  184. >{{companyTypeFormat(scope.row.launchScrReceiveType)}}</span>
  185. <span
  186. v-if="scope.row.receive"
  187. >{{companyTypeFormat(scope.row.launchScrLaunchType)}}</span>
  188. <span v-if="scope.row.spare">{{companyTypeFormat(scope.row.scpType)}}</span>
  189. </template>
  190. </el-table-column>
  191. <!-- <el-table-column
  192. label="联系人"
  193. align="center"
  194. prop="scpContarct"
  195. v-if="uncheckList.scpContarct"
  196. ></el-table-column>
  197. <el-table-column
  198. label="联系电话"
  199. align="center"
  200. prop="scpContarctPhone"
  201. v-if="uncheckList.scpContarctPhone"
  202. ></el-table-column>
  203. <el-table-column
  204. label="邮箱"
  205. align="center"
  206. prop="scpContarctEmail"
  207. v-if="uncheckList.scpContarctEmail"
  208. show-overflow-tooltip
  209. ></el-table-column> -->
  210. <el-table-column
  211. label="链属状态"
  212. align="center"
  213. prop="launchScrStatus"
  214. v-if="uncheckList.launchScrStatus"
  215. :formatter="launchScrStatusFormat"
  216. ></el-table-column>
  217. <el-table-column
  218. label="认证状态"
  219. align="center"
  220. prop="scpStatus"
  221. v-if="uncheckList.scpStatus"
  222. :formatter="scpStatusFormat"
  223. ></el-table-column>
  224. <el-table-column
  225. label="操作"
  226. align="center"
  227. class-name="small-padding fixed-width"
  228. width="150"
  229. >
  230. <template slot-scope="scope">
  231. <el-button
  232. v-if="!scope.row.spare"
  233. size="mini"
  234. type="text"
  235. @click="handleCompanyQuery(scope.row)"
  236. v-hasPermi="['service:rel:query']"
  237. >详情</el-button>
  238. <el-button
  239. v-if="scope.row.scpInvite == '1' && scope.row.launch && scope.row.launchScrStatus == '02'"
  240. size="mini"
  241. type="text"
  242. @click="handleRelInvite(scope.row)"
  243. v-hasPermi="['service:rel:again']"
  244. >重邀</el-button>
  245. <el-button
  246. v-if="handleRel && scope.row.launchScrStatus == '01'"
  247. size="mini"
  248. type="text"
  249. @click="handleDelete(scope.row)"
  250. v-hasPermi="['service:rel:delete']"
  251. >解绑</el-button>
  252. <el-button
  253. v-if="scope.row.spare && scope.row.scpStatus == '00'"
  254. size="mini"
  255. type="text"
  256. @click="handleSpareDelete(scope.row)"
  257. v-hasPermi="['service:spare:removeSpare']"
  258. >解绑</el-button>
  259. <el-button
  260. v-if="scope.row.scpInvite == '1' && scope.row.scpStatus == '00'
  261. && scope.row.scpContarct && scope.row.scpContarctPhone"
  262. size="mini"
  263. type="text"
  264. @click="handleInvite(scope.row)"
  265. v-hasPermi="['service:spare:invite']"
  266. >重邀</el-button>
  267. <el-button
  268. v-if="handleRel && scope.row.launchScrStatus =='00' && scope.row.receive"
  269. size="mini"
  270. type="text"
  271. @click="handleSuccess(scope.row)"
  272. v-hasPermi="['service:rel:update']"
  273. >确认链属</el-button>
  274. <el-button
  275. v-if="handleRel && scope.row.launchScrStatus =='00' && scope.row.receive"
  276. size="mini"
  277. type="text"
  278. @click="handleRefuse(scope.row)"
  279. v-hasPermi="['service:rel:update']"
  280. >拒绝</el-button>
  281. </template>
  282. </el-table-column>
  283. </el-table>
  284. <pagination
  285. v-show="total > 0"
  286. :total="total"
  287. :page.sync="queryParams.pageNum"
  288. :limit.sync="queryParams.pageSize"
  289. @pagination="getList"
  290. />
  291. </el-tab-pane>
  292. <el-tab-pane label="链属未认证">
  293. <!-- 未认证企业信息列表 -->
  294. <el-table v-loading="loading" :data="spareOwnlist" stripe>
  295. <el-table-column label="序号" type="index" width="50" align="center">
  296. <template slot-scope="scope">
  297. <span>{{(spareParams.pageNum - 1) * spareParams.pageSize + scope.$index + 1}}</span>
  298. </template>
  299. </el-table-column>
  300. <el-table-column
  301. label="企业名称"
  302. align="center"
  303. prop="scpName"
  304. show-overflow-tooltip
  305. />
  306. <el-table-column
  307. label="社会统一代码"
  308. align="center"
  309. prop="scpSocialCode"
  310. show-overflow-tooltip
  311. />
  312. <el-table-column
  313. label="链属关系"
  314. align="center"
  315. prop="scpType"
  316. :formatter="scpTypeFormat"
  317. />
  318. <!-- <el-table-column label="联系人" align="center" width="83" prop="scpContarct" /> -->
  319. <!-- <el-table-column
  320. label="联系电话"
  321. align="center"
  322. width="109"
  323. prop="scpContarctPhone"
  324. show-overflow-tooltip
  325. />
  326. <el-table-column
  327. label="邮箱"
  328. align="center"
  329. width="187"
  330. prop="scpContarctEmail"
  331. show-overflow-tooltip
  332. /> -->
  333. <el-table-column
  334. label="状态"
  335. align="center"
  336. prop="scpStatus"
  337. :formatter="scpStatusFormat"
  338. />
  339. <el-table-column
  340. label="操作"
  341. align="center"
  342. class-name="small-padding fixed-width"
  343. >
  344. <template slot-scope="scope">
  345. <el-button
  346. v-if="scope.row.scpInvite == '1' && scope.row.scpContarct && scope.row.scpContarctPhone"
  347. size="mini"
  348. type="text"
  349. @click="handleInvite(scope.row)"
  350. v-hasPermi="['service:spare:invite']"
  351. >重邀</el-button>
  352. <el-button
  353. size="mini"
  354. type="text"
  355. @click="handleSpareDelete(scope.row)"
  356. v-hasPermi="['service:spare:removeSpare']"
  357. >解绑</el-button>
  358. </template>
  359. </el-table-column>
  360. </el-table>
  361. <pagination
  362. v-show="spareTitol > 0"
  363. :total="spareTitol"
  364. :page.sync="spareParams.pageNum"
  365. :limit.sync="spareParams.pageSize"
  366. @pagination="getSpare"
  367. />
  368. </el-tab-pane>
  369. <!-- 添加链属框 -->
  370. <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
  371. <el-form ref="form" :model="form" :rules="rules" label-width="auto" :inline="true">
  372. <el-form-item label="企业编号" prop="scyId" style="display:none" size="large">
  373. <el-input v-model="form.scyId" disabled />
  374. </el-form-item>
  375. <el-form-item label="链属关系" prop="scrReceiveType" size="large">
  376. <el-select v-model="form.scrReceiveType" placeholder="请选择链属关系" clearable>
  377. <el-option
  378. v-for="dict in scrTypeOptions"
  379. :key="dict.dictValue"
  380. :label="dict.dictLabel"
  381. :value="dict.dictValue"
  382. ></el-option>
  383. </el-select>
  384. </el-form-item>
  385. <el-form-item label="企业名称" prop="scyName" size="large">
  386. <el-select
  387. v-model="form.scyName"
  388. filterable
  389. allow-create
  390. clearable
  391. @clear="clearRemote"
  392. @change="choice"
  393. remote
  394. reserve-keyword
  395. placeholder="请输入关键词"
  396. :remote-method="remoteMethod"
  397. >
  398. <el-option
  399. v-for="item in companyList"
  400. :key="item.value"
  401. :label="item.label"
  402. :value="item.label"
  403. ></el-option>
  404. </el-select>
  405. </el-form-item>
  406. <el-form-item label="企业统一代码" prop="scySocialCode" size="large">
  407. <el-input
  408. v-model="form.scySocialCode"
  409. placeholder="请输入企业统一代码"
  410. maxlength="18"
  411. show-word-limit
  412. />
  413. </el-form-item>
  414. <el-form-item label="联系人" prop="scrContarct" size="large">
  415. <el-input
  416. v-model="form.scrContarct"
  417. placeholder="请输入联系人"
  418. maxlength="10"
  419. show-word-limit
  420. />
  421. </el-form-item>
  422. <el-form-item label="联系人手机号" prop="scrContarctPhone" size="large">
  423. <el-input
  424. v-model="form.scrContarctPhone"
  425. placeholder="请输入联系人手机号"
  426. maxlength="11"
  427. show-word-limit
  428. />
  429. </el-form-item>
  430. <el-form-item label="邮箱" prop="scrContarctEmail" size="large">
  431. <el-input
  432. v-model="form.scrContarctEmail"
  433. placeholder="请输入邮箱"
  434. maxlength="60"
  435. show-word-limit
  436. />
  437. </el-form-item>
  438. </el-form>
  439. <el-row style="height: 109px;" type="flex" align="middle" justify="center">
  440. <el-button type="primary" plain @click="cancel">取 消</el-button>
  441. <el-button type="primary" @click="submitForm">确 定</el-button>
  442. </el-row>
  443. </el-dialog>
  444. <!-- 企业详情对话框 -->
  445. <el-dialog :title="titleDetail" :visible.sync="openDetail" width="800px" append-to-body>
  446. <el-form ref="formDetail" :model="formDetail" label-width="140px" :inline="true">
  447. <el-form-item label="企业名称" prop="scyName">
  448. <el-input
  449. v-model="formDetail.scyName"
  450. placeholder="请输入企业名称"
  451. disabled
  452. style="width:560px"
  453. maxlength="20"
  454. show-word-limit
  455. />
  456. </el-form-item>
  457. <el-form-item label="企业统一代码" prop="scySocialCode">
  458. <el-input
  459. v-model="formDetail.scySocialCode"
  460. placeholder="请输入企业统一代码"
  461. disabled
  462. maxlength="18"
  463. show-word-limit
  464. />
  465. </el-form-item>
  466. <el-form-item label="联系人" prop="scyLegal">
  467. <el-input
  468. v-model="formDetail.scyLegal"
  469. placeholder="请输入联系人"
  470. disabled
  471. maxlength="5"
  472. show-word-limit
  473. />
  474. </el-form-item>
  475. <el-form-item label="联系人手机号" prop="scyPhone">
  476. <el-input
  477. v-model="formDetail.scyPhone"
  478. placeholder="请输入联系人手机号"
  479. disabled
  480. maxlength="11"
  481. show-word-limit
  482. />
  483. </el-form-item>
  484. </el-form>
  485. <div slot="footer" class="dialog-footer">
  486. <el-button @click="cancelDetail">取 消</el-button>
  487. </div>
  488. </el-dialog>
  489. <!-- 导入窗口 -->
  490. <el-dialog
  491. class="zap-upload-invoice"
  492. :visible.sync="upload.open"
  493. width="600px"
  494. :show-close="false"
  495. append-to-body
  496. >
  497. <el-row
  498. slot="title"
  499. class="zap-upload-invoice__title"
  500. type="flex"
  501. align="middle"
  502. justify="space-between"
  503. >
  504. <span class="title">{{upload.title}}</span>
  505. <i class="el-icon-close" @click="upload.open = false"></i>
  506. </el-row>
  507. <el-row class="zap-upload-invoice__top">
  508. <span class="zap-upload-invoice__top-text">提示:仅允许导入“xls”或“xlsx”格式文件!</span>
  509. </el-row>
  510. <el-row type="flex" align="middle" justify="center">
  511. <el-upload
  512. class="zap-upload-invoice__form"
  513. ref="upload"
  514. :limit="1"
  515. accept=".xlsx, .xls"
  516. :headers="upload.headers"
  517. :action="upload.url + '?updateSupport=' + upload.updateSupport"
  518. :disabled="upload.isUploading"
  519. :on-progress="handleFileUploadProgress"
  520. :on-success="handleFileSuccess"
  521. :auto-upload="false"
  522. drag
  523. >
  524. <div class="zap-upload-invoce__inner">
  525. <i class="el-icon-upload" style="font-size: 64px;color: #21b24b"></i>
  526. <div class="zap-upload-invoice__text">
  527. 将文件拖到此处,或
  528. <span>点击上传</span>
  529. </div>
  530. <div class="zap-upload-invoice__tip">按住Ctrl可同时多选,单个文件不能超过2mb</div>
  531. <div class="zap-upload-invoice__tip">严禁上传包含色情、暴力、反动等相关违法信息的文件。</div>
  532. </div>
  533. <div class="el-upload__tip" slot="tip">
  534. <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
  535. </div>
  536. </el-upload>
  537. </el-row>
  538. <el-row style="height: 109px;" type="flex" align="middle" justify="center">
  539. <el-button type="primary" @click="submitFileForm">确 定</el-button>
  540. <el-button @click="upload.open = false">取 消</el-button>
  541. </el-row>
  542. </el-dialog>
  543. </el-tabs>
  544. </div>
  545. </el-row>
  546. </div>
  547. </template>
  548. <script>
  549. import {
  550. listRel,
  551. sparelist,
  552. listCompany,
  553. addRel,
  554. updateRel,
  555. listAllCompany,
  556. againRel,
  557. delRel,
  558. removeSpare,
  559. listCompanyQuery,
  560. getUser,
  561. againInvite,
  562. getListRel
  563. } from "@/api/service/rel/companyRel";
  564. import { uploadFileNew } from "@/api/common/file";
  565. import { getToken } from "@/utils/auth";
  566. import { columnQuery, columnfilter } from "@/api/common/columnSetting";
  567. import ColumnSetting from "../../../components/Table/columnSetting.vue";
  568. import Cookies from "js-cookie";
  569. export default {
  570. name: "companyRel",
  571. components: {
  572. ColumnSetting
  573. },
  574. data() {
  575. return {
  576. activeName: "",
  577. //操作员企业Id
  578. loginId: "",
  579. userId: "",
  580. scyTypeNow: "",
  581. handleRel: false,
  582. // 遮罩层
  583. loading: true,
  584. // 选中数组
  585. ids: [],
  586. // 非单个禁用
  587. single: true,
  588. rel: true,
  589. spare: false,
  590. // 非多个禁用
  591. multiple: true,
  592. // 显示搜索条件
  593. showSearch: true,
  594. // 总条数
  595. total: 0,
  596. spareTitol: 0,
  597. // 公司数据
  598. companyList: [],
  599. //链属表格数据
  600. companyRelList: [],
  601. //链属未认证列表数据
  602. spareOwnlist: [],
  603. // 状态数据字典
  604. scrStatusOptions: [],
  605. scrTypeOptions: [],
  606. scpStatusOptions: [],
  607. listCom: [],
  608. comlist: [],
  609. // 弹出层标题
  610. title: "",
  611. templateTitle: "",
  612. titleDetail: "",
  613. // 是否显示弹出层
  614. open: false,
  615. templateOpen: false,
  616. openDetail: false,
  617. idShow: true,
  618. // 导入参数
  619. upload: {
  620. // 是否显示弹出层(导入)
  621. open: false,
  622. // 弹出层标题(导入)
  623. title: "",
  624. // 是否禁用上传
  625. isUploading: false,
  626. // 是否更新已经存在的用户数据
  627. updateSupport: 0,
  628. // 设置上传的请求头部
  629. headers: { Authorization: "Bearer " + getToken() },
  630. // 上传的地址
  631. url: process.env.VUE_APP_BASE_API + "/sc-service/relImport/importData"
  632. },
  633. // 链属查询参数
  634. queryParams: {
  635. pageNum: 1,
  636. pageSize: 10,
  637. companyName: null,
  638. scySocialCode: null,
  639. scrStatus: null,
  640. scrType: null,
  641. scpStatus: null
  642. },
  643. //未认证列表查询参数
  644. spareParams: {
  645. pageNum: 1,
  646. pageSize: 10,
  647. scySocialCode: null,
  648. companyName: null,
  649. scrType: null
  650. },
  651. //企业列表查询参数
  652. companyQueryParams: {
  653. pageNum: 1,
  654. pageSize: 10,
  655. scyName: null
  656. },
  657. //筛选按钮的数据列表,与table表头的数据一致 --显示隐藏列用
  658. tableList: [
  659. {
  660. label: "companyCode",
  661. value: "社会统一代码"
  662. },
  663. {
  664. label: "companyName",
  665. value: "企业名称"
  666. },
  667. {
  668. label: "companyType",
  669. value: "链属关系"
  670. },
  671. // {
  672. // label: "scpContarct",
  673. // value: "联系人"
  674. // },
  675. // {
  676. // label: "scpContarctPhone",
  677. // value: "联系电话"
  678. // },
  679. // {
  680. // label: "scpContarctEmail",
  681. // value: "邮箱"
  682. // },
  683. {
  684. label: "launchScrStatus",
  685. value: "链属状态"
  686. },
  687. {
  688. label: "scpStatus",
  689. value: "认证状态"
  690. }
  691. ],
  692. checkList: [], //筛选列选中的数据列表--显示隐藏列用
  693. uncheckList: {}, //控制筛选列显示隐藏--显示隐藏列用
  694. selfDom: this,
  695. tableId: "/sc-service/rel/list",
  696. // 表单参数
  697. form: {
  698. scyId: null,
  699. scrReceiveType: null,
  700. scyName: null,
  701. scySocialCode: null,
  702. scrContarct: null,
  703. scrContarctPhone: null,
  704. scrContarctEmail: null
  705. },
  706. templateForm: {
  707. scyId: null
  708. },
  709. formDetail: {
  710. scyName: null,
  711. scySocialCode: null,
  712. scyLegal: null,
  713. scyPhone: null
  714. },
  715. companyId: null,
  716. // 表单校验
  717. rules: {
  718. scyName: [
  719. {
  720. required: true,
  721. message: "企业名称不能为空",
  722. trigger: ["blur", "change"]
  723. },
  724. {
  725. pattern: /^[0-9A-Z\u4E00-\u9FFF《》()()-]+$/,
  726. message: "企业名称不能带有特殊字符",
  727. trigger: ["blur", "change"]
  728. }
  729. ],
  730. scrReceiveType: [
  731. {
  732. required: true,
  733. message: "链属关系不能为空",
  734. trigger: ["blur", "change"]
  735. }
  736. ],
  737. scrContarct: [
  738. {
  739. pattern: /^[A-Za-z\u4e00-\u9fa5]+$/,
  740. message: "联系人不能带有特殊字符",
  741. trigger: ["blur", "change"]
  742. }
  743. ],
  744. scrContarctPhone: [
  745. {
  746. pattern: /^((\d{3}-\d{7,8}|\d{4}-\d{7,8})|(1[3465789]\d{9}))$/,
  747. message: "手机号格式不正确",
  748. trigger: ["blur", "change"]
  749. }
  750. ],
  751. scySocialCode: [
  752. { required: true, message: "企业统一代码不能为空", trigger: "blur" },
  753. {
  754. pattern: /^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$/,
  755. message: "企业统一代码格式不正确",
  756. trigger: ["blur", "change"]
  757. }
  758. ],
  759. scrContarctEmail: [
  760. {
  761. pattern: /^([a-z0-9A-Z]+[-|_|\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\.)+[a-zA-Z]{2,}$/,
  762. message: "邮箱格式不正确",
  763. trigger: ["blur", "change"]
  764. }
  765. ]
  766. },
  767. templateRules: {
  768. scyId: [
  769. { required: true, message: "核心企业不能为空", trigger: "blur" }
  770. ]
  771. }
  772. };
  773. },
  774. created() {
  775. this.getDicts("sys_scr_status").then(response => {
  776. this.scrStatusOptions = response.data;
  777. });
  778. this.getDicts("sys_scr_type").then(response => {
  779. this.scrTypeOptions = response.data;
  780. });
  781. this.getDicts("sys_scp_status").then(response => {
  782. this.scpStatusOptions = response.data;
  783. });
  784. this.getUser();
  785. this.getSpare();
  786. this.getCompanyList();
  787. },
  788. mounted() {
  789. this.columnQuery();
  790. },
  791. methods: {
  792. //获取当前客户是否之前设置过列展示隐藏
  793. columnQuery() {
  794. //获取页面路径
  795. var psfPagePath = window.location.pathname;
  796. //用请求后台的url作为唯一标识
  797. var psfTableName = this.tableId;
  798. var columnForm = {};
  799. columnForm.psfPagePath = psfPagePath;
  800. columnForm.psfTableName = psfTableName;
  801. columnQuery(columnForm).then(response => {
  802. if (response.data && response.data.psfShowData) {
  803. this.checkList = response.data.psfShowData;
  804. }
  805. this.filter();
  806. });
  807. },
  808. //控制隐藏显示的函数
  809. filter(checkList) {
  810. if (!!checkList) {
  811. this.checkList = checkList;
  812. }
  813. columnfilter(this.selfDom);
  814. },
  815. // 菜单状态字典翻译
  816. companyTypeFormat(companyType) {
  817. return this.selectDictLabel(this.scrTypeOptions, companyType);
  818. },
  819. scpTypeFormat(row, column) {
  820. return this.selectDictLabel(this.scrTypeOptions, row.scpType);
  821. },
  822. scpStatusFormat(row, column) {
  823. return this.selectDictLabel(this.scpStatusOptions, row.scpStatus);
  824. },
  825. launchScrStatusFormat(row, column) {
  826. return this.selectDictLabel(this.scrStatusOptions, row.launchScrStatus);
  827. },
  828. //平台导出模板
  829. submitTemplateForm() {
  830. this.$refs["templateForm"].validate(valid => {
  831. let fd = new FormData();
  832. for (var key in self.form) {
  833. fd.append(key, self.form[key]);
  834. }
  835. if (valid) {
  836. this.download(
  837. "/sc-service/relImport/importTemplate",
  838. {
  839. ...this.templateForm
  840. },
  841. `链属模板_${new Date().getTime()}.xls`
  842. );
  843. this.cancelTemplateForm();
  844. }
  845. });
  846. },
  847. //取消导出模板选择企业
  848. cancelTemplateForm() {
  849. this.templateOpen = false;
  850. this.templateForm = {};
  851. },
  852. /** 导入按钮操作 */
  853. handleImport() {
  854. this.upload.title = "链属导入";
  855. this.upload.open = true;
  856. },
  857. /** 下载模板操作 */
  858. importTemplate() {
  859. this.download(
  860. "/sc-service/relImport/importTemplate",
  861. {
  862. ...this.queryParams
  863. },
  864. `链属模板_${new Date().getTime()}.xls`
  865. );
  866. },
  867. /* 平台下载模板操作 */
  868. importAdminTemplate() {
  869. this.templateTitle = "核心企业";
  870. this.templateOpen = true;
  871. },
  872. // 文件上传中处理
  873. handleFileUploadProgress(event, file, fileList) {
  874. this.upload.isUploading = true;
  875. },
  876. // 文件上传成功处理
  877. handleFileSuccess(response, file, fileList) {
  878. this.upload.open = false;
  879. this.upload.isUploading = false;
  880. this.$refs.upload.clearFiles();
  881. this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
  882. this.getUser();
  883. this.getSpare();
  884. this.getCompanyList();
  885. },
  886. // 提交上传文件
  887. submitFileForm() {
  888. this.$refs.upload.submit();
  889. },
  890. /** 查询链属列表 */
  891. getList() {
  892. this.loading = true;
  893. if (this.companyId == "000000") {
  894. getListRel(this.queryParams).then(response => {
  895. let list = response.data.records;
  896. this.loginId = response.msg;
  897. for (let i = 0; i < list.length; i++) {
  898. if (list[i].launchCompanyId == response.msg) {
  899. list[i].receive = false;
  900. list[i].launch = true;
  901. list[i].spare = false;
  902. } else if (list[i].launchReceiveScrCompanyId == response.msg) {
  903. list[i].launch = false;
  904. list[i].receive = true;
  905. list[i].spare = false;
  906. } else if (list[i].scpCompanyId == response.msg) {
  907. list[i].launch = false;
  908. list[i].receive = false;
  909. list[i].spare = true;
  910. }
  911. }
  912. this.companyRelList = list;
  913. console.log(12312313123);
  914. console.log(this.companyRelList);
  915. this.total = response.data.total;
  916. this.loading = false;
  917. });
  918. } else {
  919. listRel(this.queryParams).then(response => {
  920. let list = response.data.records;
  921. this.loginId = response.msg;
  922. for (let i = 0; i < list.length; i++) {
  923. if (list[i].launchCompanyId == response.msg) {
  924. list[i].receive = false;
  925. list[i].launch = true;
  926. list[i].spare = false;
  927. } else if (list[i].launchReceiveScrCompanyId == response.msg) {
  928. list[i].launch = false;
  929. list[i].receive = true;
  930. list[i].spare = false;
  931. } else if (list[i].scpCompanyId == response.msg) {
  932. list[i].launch = false;
  933. list[i].receive = false;
  934. list[i].spare = true;
  935. }
  936. }
  937. this.companyRelList = list;
  938. console.log(12312313123);
  939. console.log(this.companyRelList);
  940. this.total = response.data.total;
  941. this.loading = false;
  942. });
  943. }
  944. },
  945. // 未认证列表
  946. getSpare() {
  947. this.loading = true;
  948. sparelist(this.spareParams).then(response => {
  949. this.spareOwnlist = response.data.records;
  950. this.spareTitol = response.data.total;
  951. this.loading = false;
  952. });
  953. },
  954. //查询所有企业
  955. getCompanyList() {
  956. this.loading = true;
  957. listAllCompany().then(response => {
  958. this.comlist = response.data;
  959. this.listCom = this.comlist.map(item => {
  960. return { value: item.scyId, label: item.scyName };
  961. });
  962. });
  963. },
  964. clearRemote() {
  965. let query = "";
  966. this.form.scyId = "";
  967. this.form.scyName = "";
  968. this.form.scySocialCode = "";
  969. this.idShow = true;
  970. this.remoteMethod(query);
  971. },
  972. //选择企业
  973. remoteMethod(query) {
  974. if (query) {
  975. this.loading = true;
  976. setTimeout(() => {
  977. this.loading = false;
  978. this.companyList = this.listCom.filter(item => {
  979. return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1;
  980. });
  981. }, 200);
  982. } else {
  983. this.companyList = [];
  984. }
  985. },
  986. //选择企业后反显
  987. choice(item) {
  988. if (item) {
  989. let scyId;
  990. for (var company of this.companyList) {
  991. if (company.label == item) {
  992. scyId = company.value;
  993. break;
  994. }
  995. }
  996. if (scyId) {
  997. listCompanyQuery(scyId).then(response => {
  998. if (response.data.length > 0) {
  999. this.$set(this.form, "scyName", response.data[0].scyName);
  1000. this.$set(
  1001. this.form,
  1002. "scySocialCode",
  1003. response.data[0].scySocialCode
  1004. );
  1005. }
  1006. });
  1007. }
  1008. }
  1009. },
  1010. // 取消按钮
  1011. cancel() {
  1012. this.open = false;
  1013. this.clearRemote();
  1014. this.reset();
  1015. },
  1016. cancelDetail() {
  1017. this.openDetail = false;
  1018. this.reset();
  1019. },
  1020. // 表单重置
  1021. reset() {
  1022. this.clearRemote();
  1023. this.resetForm("form");
  1024. this.resetForm("formDetail");
  1025. },
  1026. /** 搜索按钮操作 */
  1027. handleQuery() {
  1028. this.queryParams.pageNum = 1;
  1029. this.getUser();
  1030. },
  1031. /** 未认证搜索按钮操作 */
  1032. handleSpareQuery() {
  1033. this.spareParams.pageNum = 1;
  1034. this.getSpare();
  1035. },
  1036. /** 重置按钮操作 */
  1037. resetQuery() {
  1038. this.resetForm("queryForm");
  1039. this.handleQuery();
  1040. },
  1041. /** 未认证重置按钮操作 */
  1042. resetSpareQuery() {
  1043. this.resetForm("querySpareForm");
  1044. this.handleSpareQuery();
  1045. },
  1046. /** 新增按钮操作 */
  1047. handleAdd() {
  1048. this.reset();
  1049. this.open = true;
  1050. this.title = "新增链属";
  1051. },
  1052. //查询企业详情
  1053. handleCompanyQuery(row) {
  1054. this.resetForm("queryForm");
  1055. this.resetForm("querySpareForm");
  1056. if (row.receive == true) {
  1057. const scyId = row.launchCompanyId;
  1058. listCompanyQuery(scyId).then(response => {
  1059. if (response.data[0].scyStatus == "00") {
  1060. Cookies.set(
  1061. "/rel/detailComPany/" + scyId + "/",
  1062. this.$route.fullPath
  1063. );
  1064. this.$router.push("/rel/detailComPany/" + scyId + "/");
  1065. } else {
  1066. this.formDetail = response.data[0];
  1067. this.openDetail = true;
  1068. this.titleDetail = "详情企业信息";
  1069. }
  1070. });
  1071. } else if (row.launch == true) {
  1072. const scyId = row.launchReceiveScrCompanyId;
  1073. listCompanyQuery(scyId).then(response => {
  1074. if (response.data[0].scyStatus == "00") {
  1075. Cookies.set(
  1076. "/rel/detailComPany/" + scyId + "/",
  1077. this.$route.fullPath
  1078. );
  1079. this.$router.push("/rel/detailComPany/" + scyId + "/");
  1080. } else {
  1081. this.formDetail = response.data[0];
  1082. this.openDetail = true;
  1083. this.titleDetail = "详情企业信息";
  1084. }
  1085. });
  1086. }
  1087. },
  1088. /** 提交按钮 */
  1089. submitForm() {
  1090. var self = this;
  1091. this.$refs["form"].validate(valid => {
  1092. let fd = new FormData();
  1093. for (var key in self.form) {
  1094. fd.append(key, self.form[key]);
  1095. }
  1096. if (valid) {
  1097. const loading = this.$loading({
  1098. lock: true,
  1099. text: "Loading",
  1100. spinner: "el-icon-loading",
  1101. background: "rgba(0, 0, 0, 0.7)"
  1102. });
  1103. // for (var company of this.companyList) {
  1104. // if (company.value == self.form.scyId) {
  1105. // self.form.scyName = company.label;
  1106. // break;
  1107. // }
  1108. // }
  1109. console.log(self.form, "提交表单");
  1110. debugger;
  1111. addRel(self.form)
  1112. .then(response => {
  1113. this.msgSuccess("新增成功");
  1114. loading.close();
  1115. this.open = false;
  1116. this.getUser();
  1117. this.getSpare();
  1118. this.getCompanyList();
  1119. })
  1120. .catch(response => {
  1121. loading.close();
  1122. });
  1123. }
  1124. });
  1125. },
  1126. /* 同意链属 */
  1127. handleSuccess(row) {
  1128. const launchScrId = row.launchScrId || this.ids;
  1129. if (row.launchCompanyId == this.loginId) {
  1130. const scyName = row.receiveScyName;
  1131. this.$confirm('确认与"' + scyName + '"的链属关系?', "确认链属", {
  1132. confirmButtonText: "确定",
  1133. cancelButtonText: "取消",
  1134. type: "success"
  1135. })
  1136. .then(function() {
  1137. const state = "01";
  1138. return updateRel(launchScrId, state);
  1139. })
  1140. .then(() => {
  1141. this.msgSuccess("链属成功");
  1142. this.getUser();
  1143. this.getSpare();
  1144. this.getCompanyList();
  1145. })
  1146. .catch(() => {
  1147. this.$message({
  1148. type: "warning",
  1149. message: "已取消链属"
  1150. });
  1151. });
  1152. } else if (row.launchReceiveScrCompanyId == this.loginId) {
  1153. const scyName = row.launchScyName;
  1154. this.$confirm('确认与"' + scyName + '"的链属关系?', "确认链属", {
  1155. confirmButtonText: "确定",
  1156. cancelButtonText: "取消",
  1157. type: "success"
  1158. })
  1159. .then(function() {
  1160. const state = "01";
  1161. return updateRel(launchScrId, state);
  1162. })
  1163. .then(() => {
  1164. this.msgSuccess("链属成功");
  1165. this.getUser();
  1166. this.getSpare();
  1167. this.getCompanyList();
  1168. })
  1169. .catch(() => {
  1170. this.$message({
  1171. type: "warning",
  1172. message: "已取消链属"
  1173. });
  1174. });
  1175. }
  1176. },
  1177. //重邀拒绝链属
  1178. handleRelInvite(row) {
  1179. const launchScrId = row.launchScrId || this.ids;
  1180. if (row.launchCompanyId == this.loginId) {
  1181. const scyName = row.receiveScyName;
  1182. this.$confirm('邀请与"' + scyName + '"的链属关系?', "邀请", {
  1183. confirmButtonText: "确定",
  1184. cancelButtonText: "取消",
  1185. type: "info"
  1186. })
  1187. .then(function() {
  1188. const state = "00";
  1189. return againRel(launchScrId, state);
  1190. })
  1191. .then(() => {
  1192. this.msgSuccess("邀请成功");
  1193. this.getUser();
  1194. this.getSpare();
  1195. this.getCompanyList();
  1196. })
  1197. .catch(() => {
  1198. this.$message({
  1199. type: "warning",
  1200. message: "已取消邀请"
  1201. });
  1202. });
  1203. } else if (row.launchReceiveScrCompanyId == this.loginId) {
  1204. const scyName = row.launchScyName;
  1205. this.$confirm('邀请与"' + scyName + '"的链属关系?', "邀请", {
  1206. confirmButtonText: "确定",
  1207. cancelButtonText: "取消",
  1208. type: "info"
  1209. })
  1210. .then(function() {
  1211. const state = "01";
  1212. return updateRel(launchScrId, state);
  1213. })
  1214. .then(() => {
  1215. this.msgSuccess("邀请成功");
  1216. this.getUser();
  1217. this.getSpare();
  1218. this.getCompanyList();
  1219. })
  1220. .catch(() => {
  1221. this.$message({
  1222. type: "warning",
  1223. message: "已取消邀请"
  1224. });
  1225. });
  1226. }
  1227. },
  1228. /* 拒绝链属 */
  1229. handleRefuse(row) {
  1230. const launchScrId = row.launchScrId || this.ids;
  1231. if (row.launchCompanyId == this.loginId) {
  1232. const scyName = row.receiveScyName;
  1233. this.$confirm('拒绝与"' + scyName + '"的链属关系?', "警告", {
  1234. confirmButtonText: "确定",
  1235. cancelButtonText: "取消",
  1236. type: "warning"
  1237. })
  1238. .then(function() {
  1239. const state = "02";
  1240. return updateRel(launchScrId, state);
  1241. })
  1242. .then(() => {
  1243. this.msgSuccess("拒绝成功");
  1244. this.getUser();
  1245. this.getSpare();
  1246. this.getCompanyList();
  1247. })
  1248. .catch(() => {
  1249. this.$message({
  1250. type: "warning",
  1251. message: "已拒绝链属"
  1252. });
  1253. });
  1254. } else if (row.launchReceiveScrCompanyId == this.loginId) {
  1255. const scyName = row.launchScyName;
  1256. this.$confirm('拒绝与"' + scyName + '"的链属关系?', "警告", {
  1257. confirmButtonText: "确定",
  1258. cancelButtonText: "取消",
  1259. type: "warning"
  1260. })
  1261. .then(function() {
  1262. const state = "02";
  1263. return updateRel(launchScrId, state);
  1264. })
  1265. .then(() => {
  1266. this.msgSuccess("拒绝成功");
  1267. this.getUser();
  1268. this.getSpare();
  1269. this.getCompanyList();
  1270. })
  1271. .catch(() => {
  1272. this.$message({
  1273. type: "warning",
  1274. message: "已拒绝链属"
  1275. });
  1276. });
  1277. }
  1278. },
  1279. /** 解绑按钮操作 */
  1280. handleDelete(row) {
  1281. const launchScrId = row.launchScrId || this.ids;
  1282. if (row.launchCompanyId == this.loginId) {
  1283. const scyName = row.receiveScyName;
  1284. this.$confirm('是否确认解绑与"' + scyName + '"的链属关系?', "警告", {
  1285. confirmButtonText: "确定",
  1286. cancelButtonText: "取消",
  1287. type: "warning"
  1288. })
  1289. .then(function() {
  1290. return delRel(launchScrId);
  1291. })
  1292. .then(() => {
  1293. this.msgSuccess("解绑成功");
  1294. this.getUser();
  1295. this.getSpare();
  1296. this.getCompanyList();
  1297. })
  1298. .catch(() => {
  1299. this.$message({
  1300. type: "warning",
  1301. message: "已取消解绑"
  1302. });
  1303. });
  1304. } else if (row.launchReceiveScrCompanyId == this.loginId) {
  1305. const scyName = row.launchScyName;
  1306. this.$confirm('是否确认解绑与"' + scyName + '"的链属关系?', "警告", {
  1307. confirmButtonText: "确定",
  1308. cancelButtonText: "取消",
  1309. type: "warning"
  1310. })
  1311. .then(function() {
  1312. return delRel(launchScrId);
  1313. })
  1314. .then(() => {
  1315. this.msgSuccess("解绑成功");
  1316. this.getUser();
  1317. this.getSpare();
  1318. this.getCompanyList();
  1319. })
  1320. .catch(() => {
  1321. this.$message({
  1322. type: "warning",
  1323. message: "已取消解绑"
  1324. });
  1325. });
  1326. }
  1327. },
  1328. /* 解绑链属企业信息数据 */
  1329. handleSpareDelete(row) {
  1330. const scpId = row.scpId || this.ids;
  1331. const scpName = row.scpName;
  1332. this.$confirm('是否确认解绑"' + scpName + '"的信息?', "警告", {
  1333. confirmButtonText: "确定",
  1334. cancelButtonText: "取消",
  1335. type: "warning"
  1336. })
  1337. .then(function() {
  1338. return removeSpare(scpId);
  1339. })
  1340. .then(() => {
  1341. this.msgSuccess("解绑成功");
  1342. this.getUser();
  1343. this.getSpare();
  1344. this.getCompanyList();
  1345. })
  1346. .catch(() => {
  1347. this.$message({
  1348. type: "warning",
  1349. message: "已取消解绑"
  1350. });
  1351. });
  1352. },
  1353. //重邀操作
  1354. handleInvite(row) {
  1355. const loading = this.$loading({
  1356. lock: true,
  1357. text: "Loading",
  1358. spinner: "el-icon-loading",
  1359. background: "rgba(0, 0, 0, 0.7)"
  1360. });
  1361. againInvite(row)
  1362. .then(response => {})
  1363. .then(() => {
  1364. this.msgSuccess("重邀成功");
  1365. this.getUser();
  1366. this.getSpare();
  1367. this.getCompanyList();
  1368. loading.close();
  1369. })
  1370. .catch(e => {
  1371. loading.close();
  1372. });
  1373. },
  1374. //获取操作员Id
  1375. getUser() {
  1376. getUser().then(response => {
  1377. this.userId = response.data.userId;
  1378. this.scyTypeNow = response.data.scyType;
  1379. this.companyId = response.data.companyId;
  1380. if (this.scyTypeNow == "01") {
  1381. this.handleRel = true;
  1382. } else {
  1383. this.handleRel = false;
  1384. }
  1385. this.getList();
  1386. });
  1387. }
  1388. }
  1389. };
  1390. </script>
  1391. </style><style lang="scss" scoped>
  1392. ::v-deep .el-tabs__item {
  1393. width: 105px;
  1394. height: 55px;
  1395. padding: 0;
  1396. line-height: 55px;
  1397. text-align: center;
  1398. font-size: 16px;
  1399. }
  1400. .zap-credit__content {
  1401. position: relative;
  1402. padding: 0 13px 25px;
  1403. background-color: #ffffff;
  1404. }
  1405. .zap-credit__tabs {
  1406. position: relative;
  1407. }
  1408. .zap-credit__buttons {
  1409. position: absolute;
  1410. top: 0;
  1411. right: 13px;
  1412. display: flex;
  1413. align-items: center;
  1414. height: 55px;
  1415. z-index: 99;
  1416. }
  1417. </style>