refundList.vue 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533
  1. <template>
  2. <div class="app-container">
  3. <div class="filter-container">
  4. <el-select
  5. :placeholder="$t('place.afterSalesType')"
  6. clearable
  7. style="width: 200px;"
  8. class="filter-item"
  9. v-model="listQuery.refundType"
  10. @change="queryRefundReason"
  11. >
  12. <el-option
  13. v-for="afterSaleType in afterSaleTypes"
  14. :key="afterSaleType.value"
  15. :label="$t(afterSaleType.label)"
  16. :value="afterSaleType.value"
  17. >
  18. </el-option>
  19. </el-select>
  20. <el-select
  21. :placeholder="$t('place.afterSalesStatus')"
  22. clearable
  23. style="width: 200px;"
  24. class="filter-item"
  25. v-model="listQuery.status"
  26. >
  27. <el-option
  28. v-for="status in afterSaleStatus"
  29. :key="status.value"
  30. :label="$t(status.label)"
  31. :value="status.value"
  32. >
  33. </el-option>
  34. </el-select>
  35. <el-select
  36. v-model="listQuery.exchangeFlag"
  37. :clearable="true"
  38. class="filter-item"
  39. style="width: 200px;"
  40. :placeholder="$t('exchangeFlag')"
  41. >
  42. <el-option key="1" :label="$t('label.yes')" value="1"></el-option>
  43. <el-option key="0" :label="$t('label.no')" value="0"></el-option>
  44. </el-select>
  45. <el-select
  46. v-model="listQuery.channelCode"
  47. :clearable="true"
  48. filterable
  49. class="filter-item"
  50. style="width: 200px;"
  51. :placeholder="$t('place.channel')"
  52. @change="getStore"
  53. >
  54. <el-option
  55. v-for="item in channel"
  56. :key="item.code"
  57. :label="item.name"
  58. :value="item.code"
  59. >
  60. </el-option>
  61. </el-select>
  62. <el-select
  63. v-model="listQuery.storeId"
  64. :clearable="true"
  65. filterable
  66. class="filter-item"
  67. style="width: 200px;"
  68. :placeholder="$t('place.shopName')"
  69. @change="getChannel"
  70. >
  71. <el-option
  72. v-for="item in store"
  73. :key="item.storeId"
  74. :label="item.storeName"
  75. :value="item.storeId"
  76. >
  77. </el-option>
  78. </el-select>
  79. <el-input
  80. :placeholder="$t('place.refundNumber')"
  81. clearable
  82. style="width: 200px;"
  83. class="filter-item"
  84. v-model="listQuery.refundNo"
  85. />
  86. <el-input
  87. :placeholder="$t('place.onlineRefundNumber')"
  88. clearable
  89. style="width: 200px;"
  90. class="filter-item"
  91. v-model="listQuery.ormRefundId"
  92. />
  93. <el-input
  94. :placeholder="$t('place.shopifyNumber')"
  95. clearable
  96. style="width: 200px;"
  97. class="filter-item"
  98. v-model="listQuery.shopify"
  99. />
  100. <el-input
  101. :placeholder="$t('place.onlineShopNumber')"
  102. clearable
  103. style="width: 200px;"
  104. class="filter-item"
  105. v-model="listQuery.ormorder"
  106. />
  107. <el-select
  108. :placeholder="$t('place.afterSalesInitiator')"
  109. clearable
  110. style="width: 200px;"
  111. class="filter-item"
  112. v-model="listQuery.originatorFlag"
  113. >
  114. <el-option
  115. value="1"
  116. :label="$t('label.customerService')"
  117. key="1"
  118. ></el-option>
  119. <el-option value="2" :label="$t('label.buyer')" key="2"></el-option>
  120. </el-select>
  121. <el-date-picker
  122. class="filter-item"
  123. style="display: inline-flex;"
  124. v-model="createTimePicker"
  125. type="datetimerange"
  126. :range-separator="$t('to')"
  127. :start-placeholder="$t('place.refundCreationStart')"
  128. :end-placeholder="$t('place.refundCreationEnd')"
  129. value-format="yyyy-MM-dd HH:mm:ss"
  130. :default-time="['00:00:00', '23:59:59']"
  131. >
  132. </el-date-picker>
  133. <el-select
  134. :placeholder="$t('place.refundMethod')"
  135. clearable
  136. style="width: 200px;"
  137. class="filter-item"
  138. v-model="listQuery.refundMethod"
  139. >
  140. <el-option
  141. value="system"
  142. :label="$t('label.systemRefund')"
  143. key="system"
  144. ></el-option>
  145. <el-option
  146. value="manual"
  147. :label="$t('label.manualRefund')"
  148. key="manual"
  149. ></el-option>
  150. </el-select>
  151. <el-input
  152. :placeholder="$t('place.refundAccount')"
  153. clearable
  154. style="width: 200px;"
  155. class="filter-item"
  156. v-model="listQuery.refundAccount"
  157. />
  158. <el-select
  159. v-model="refundReasonList"
  160. :clearable="true"
  161. class="filter-item"
  162. style="width: 200px;"
  163. :placeholder="$t('place.refundReason')"
  164. multiple
  165. filterable
  166. @change="queryRefundType"
  167. >
  168. <el-option
  169. v-for="item in this.refundReason"
  170. :key="item.reasonContentChinese"
  171. :label="item.reasonContentChinese"
  172. :value="item.reasonContentChinese"
  173. >
  174. </el-option>
  175. </el-select>
  176. <el-select
  177. v-model="listQuery.sendEmailFlag"
  178. :clearable="true"
  179. class="filter-item"
  180. style="width: 200px;"
  181. placeholder="是否成功发送邮件"
  182. >
  183. <el-option key="1" :label="$t('label.yes')" value="1"></el-option>
  184. <el-option key="0" :label="$t('label.no')" value="0"></el-option>
  185. </el-select>
  186. <el-select
  187. :placeholder="$t('place.signInStatus')"
  188. clearable
  189. style="width: 200px;"
  190. class="filter-item"
  191. v-model="listQuery.signInStatus"
  192. >
  193. <el-option
  194. v-for="re in signInStatus"
  195. :key="re.value"
  196. :label="re.label"
  197. :value="re.value"
  198. >
  199. </el-option>
  200. </el-select>
  201. </div>
  202. <div class="filter-container">
  203. <!--<el-input placeholder="收件人电话" style="width: 200px;"
  204. class="filter-item" v-model="listQuery.receiverMobile"/>-->
  205. <el-button
  206. v-waves
  207. class="filter-item"
  208. type="success"
  209. icon="el-icon-search"
  210. @click="handleFilter"
  211. >{{ $t("view.search") }}</el-button
  212. >
  213. <el-button class="filter-item" @click="exportExcel" type="primary">
  214. {{ $t("exportRep") }}
  215. </el-button>
  216. <!-- <el-button v-waves class="filter-item" type="primary" icon="el-icon-upload"
  217. @click="dialogFormUploadVisible = true">{{ $t("view.importData") }}
  218. </el-button> -->
  219. <el-button v-waves class="filter-item" type="warning" @click="batchCheck"
  220. >{{ $t("view.batchAudit") }}
  221. </el-button>
  222. <!--新创建退款单 -->
  223. <el-button
  224. v-waves
  225. class="filter-item"
  226. type="success"
  227. @click="createNewRefund"
  228. >{{ $t("view.createRefundOrder") }}
  229. </el-button>
  230. </div>
  231. <!--<div class="filter-container">
  232. <el-button v-waves class="filter-item" type="primary" @click="orderExport('orderItem')">退款明细导出</el-button>
  233. </div>-->
  234. <el-table
  235. style="width: 100%;"
  236. v-loading="listLoading"
  237. :key="tableKey"
  238. :data="list"
  239. row-key="id"
  240. stripe
  241. border
  242. fit
  243. highlight-current-row
  244. :cell-style="tableRowStyleName"
  245. tooltip-effect="dark"
  246. @selection-change="handleSelectionChange"
  247. >
  248. <el-table-column
  249. align="center"
  250. type="selection"
  251. :selectable="selectEnable"
  252. >
  253. </el-table-column>
  254. <el-table-column align="center" type="index"> </el-table-column>
  255. <el-table-column
  256. :label="$t('label.refundNumber')"
  257. width="200"
  258. align="center"
  259. prop="refundNo"
  260. >
  261. </el-table-column>
  262. <el-table-column
  263. :label="$t('label.onlineRefundNumber')"
  264. width="250"
  265. align="center"
  266. prop="ormRefundId"
  267. >
  268. </el-table-column>
  269. <el-table-column
  270. :label="$t('label.shopifyNumber')"
  271. width="200"
  272. align="center"
  273. prop="cutUser"
  274. >
  275. </el-table-column>
  276. <el-table-column
  277. :label="$t('label.onlineShopOrder')"
  278. width="150"
  279. align="center"
  280. prop="ormorder"
  281. >
  282. </el-table-column>
  283. <el-table-column
  284. :label="$t('storeName')"
  285. align="center"
  286. min-width="180"
  287. prop="storeName"
  288. ></el-table-column>
  289. <el-table-column
  290. :label="$t('label.afterSalesType')"
  291. width="100"
  292. align="center"
  293. prop="refundType"
  294. >
  295. <template slot-scope="scope">
  296. {{ scope.row.refundType | refundTypeFilter(that) }}
  297. </template>
  298. </el-table-column>
  299. <!-- <el-table-column :label="$t('label.exchangeGoods')" prop="exchangeFlag" width = "100" >
  300. <template slot-scope="scope" >
  301. {{scope.row.exchangeFlag==="1"?'是':'否'}}
  302. </template>
  303. </el-table-column> -->
  304. <el-table-column
  305. :label="$t('label.afterSalesInitiation')"
  306. width="110"
  307. align="center"
  308. >
  309. <template slot-scope="scope">
  310. <div v-if="scope.row.originatorFlag == '1'">
  311. {{ $t("label.customerService") }}
  312. </div>
  313. <div v-if="scope.row.originatorFlag == '2'">
  314. {{ $t("label.buyer") }}
  315. </div>
  316. </template>
  317. </el-table-column>
  318. <el-table-column
  319. :label="$t('label.afterSalesStatus')"
  320. width="120"
  321. align="center"
  322. >
  323. <template slot-scope="scope">
  324. <el-tag effect="dark" type="warning" v-if="scope.row.status == '4'">
  325. {{ scope.row.status | statusFilter(that) }}
  326. </el-tag>
  327. <el-tag effect="dark" type="info" v-else-if="scope.row.status == '7'">
  328. {{ scope.row.status | statusFilter(that) }}
  329. </el-tag>
  330. <el-tag effect="dark" type="success" v-else>
  331. {{ scope.row.status | statusFilter(that) }}
  332. </el-tag>
  333. </template>
  334. </el-table-column>
  335. <el-table-column
  336. label="自动退款"
  337. align="center"
  338. prop="autoRefund"
  339. width="120"
  340. >
  341. <template slot-scope="scope">
  342. {{ scope.row.autoRefund === "1" ? $t("label.yes") : $t("label.no") }}
  343. </template>
  344. </el-table-column>
  345. <el-table-column
  346. label="是否成功发送邮件"
  347. align="center"
  348. prop="sendEmailFlag"
  349. width="140"
  350. >
  351. <template slot-scope="scope">
  352. {{
  353. scope.row.sendEmailFlag === "1" ? $t("label.yes") : $t("label.no")
  354. }}
  355. </template>
  356. </el-table-column>
  357. <el-table-column
  358. :label="$t('label.applicationTime')"
  359. width="160"
  360. align="center"
  361. prop="timeplaced"
  362. >
  363. </el-table-column>
  364. <el-table-column
  365. label="财务审核通过时间"
  366. width="160"
  367. align="center"
  368. prop="financialApprovalTime"
  369. >
  370. </el-table-column>
  371. <el-table-column
  372. :label="$t('label.applicant')"
  373. width="120"
  374. align="center"
  375. prop="userName"
  376. >
  377. </el-table-column>
  378. <el-table-column
  379. :label="$t('label.refundAmount')"
  380. width="100"
  381. align="center"
  382. prop="refundAmount"
  383. >
  384. </el-table-column>
  385. <el-table-column
  386. :label="$t('label.shippingRefund')"
  387. width="100"
  388. align="center"
  389. prop="refundPostageAmount"
  390. >
  391. </el-table-column>
  392. <el-table-column
  393. :label="$t('label.currency')"
  394. width="100"
  395. align="center"
  396. prop="currency"
  397. >
  398. </el-table-column>
  399. <!-- <el-table-column label="退款原因(中文)" width="150" align="center" prop="reasonContentChinese">
  400. </el-table-column> -->
  401. <!-- <el-table-column label="退款原因(English)" width="150" align="center" prop="reasonContentEnglish">
  402. </el-table-column> -->
  403. <!-- <el-table-column label="其他原因说明" width="100" align="center" prop="otherReason">
  404. </el-table-column> -->
  405. <el-table-column
  406. :label="$t('label.serviceNote')"
  407. width="150"
  408. align="center"
  409. prop="notes"
  410. >
  411. </el-table-column>
  412. <el-table-column
  413. :label="$t('label.buyerReasonNote')"
  414. width="150"
  415. align="center"
  416. prop="buyNotes"
  417. >
  418. </el-table-column>
  419. <el-table-column
  420. :label="$t('label.refundMethod')"
  421. width="150"
  422. align="center"
  423. prop="refundMethod"
  424. >
  425. <template slot-scope="scope">
  426. {{ scope.row.refundMethod | refundMethodFilter(that) }}
  427. </template>
  428. </el-table-column>
  429. <el-table-column
  430. :label="$t('label.accountType')"
  431. width="150"
  432. align="center"
  433. prop="refundAccountType"
  434. >
  435. <template slot-scope="scope">
  436. {{ scope.row.refundAccountType | refundAccountTypeFilter(that) }}
  437. </template>
  438. </el-table-column>
  439. <el-table-column
  440. :label="$t('label.refundAccount')"
  441. width="150"
  442. align="center"
  443. prop="refundAccount"
  444. >
  445. </el-table-column>
  446. <el-table-column
  447. :label="$t('label.channelID')"
  448. width="120"
  449. align="center"
  450. prop="channelCode"
  451. >
  452. </el-table-column>
  453. <el-table-column
  454. :label="$t('label.channelName')"
  455. width="140"
  456. align="center"
  457. prop="channelName"
  458. >
  459. </el-table-column>
  460. <el-table-column
  461. :label="$t('label.updateTime')"
  462. width="160"
  463. align="center"
  464. prop="lastupdate"
  465. >
  466. </el-table-column>
  467. <el-table-column
  468. :label="$t('label.updater')"
  469. width="120"
  470. align="center"
  471. prop="lastUserName"
  472. >
  473. </el-table-column>
  474. <el-table-column
  475. :label="$t('label.operation')"
  476. fixed="right"
  477. min-width="360"
  478. align="left"
  479. >
  480. <template slot-scope="scope">
  481. <el-button
  482. type="primary"
  483. size="mini"
  484. @click="handleInfo(scope.row.id, 'view')"
  485. >{{ $t("view.details") }}</el-button
  486. >
  487. <el-button
  488. v-has="'ordersRefund:checkKf'"
  489. v-if="
  490. scope.row.refundType == '3' &&
  491. (scope.row.status == '0' || scope.row.status == '4')
  492. "
  493. type="success"
  494. size="mini"
  495. @click="editInfo(scope.row)"
  496. >{{ $t("view.logistics") }}
  497. </el-button>
  498. <el-button
  499. v-has="'ordersRefund:checkKf'"
  500. v-if="scope.row.status == '0'"
  501. type="success"
  502. size="mini"
  503. @click="handleInfo(scope.row.id, 'cus_check')"
  504. >{{ $t("view.audit") }}
  505. </el-button>
  506. <el-button
  507. v-has="'ordersRefund:checkKf'"
  508. v-if="
  509. scope.row.status == '0' ||
  510. (scope.row.status == '2' && scope.row.channelCode == 'SHOPIFY')
  511. "
  512. type="success"
  513. size="mini"
  514. @click="handleRefund(scope.row.id)"
  515. >{{ $t("view.edit") }}
  516. </el-button>
  517. <el-button
  518. v-has="'ordersRefund:checkKf'"
  519. v-if="scope.row.status == '7'"
  520. type="success"
  521. size="mini"
  522. @click="createRefund(scope.row.id)"
  523. >{{ $t("view.create") }}
  524. </el-button>
  525. <!-- <el-button-->
  526. <!-- v-has="'ordersRefund:checkKf'"-->
  527. <!-- v-if="scope.row.status == '1'"-->
  528. <!-- size="mini"-->
  529. <!-- type="danger"-->
  530. <!-- @click="reject(scope.row.id, scope.row.refundNo)"-->
  531. <!-- >{{ $t("view.reject") }}-->
  532. <!-- </el-button>-->
  533. <el-button
  534. v-has="'ordersRefund:checkKf'"
  535. v-if="scope.row.status == '1'"
  536. size="mini"
  537. type="danger"
  538. @click="reject(scope.row.id, scope.row.refundNo)"
  539. >{{ $t("view.unaudit") }}
  540. </el-button>
  541. <el-button
  542. v-has="'ordersRefund:checkKf'"
  543. v-if="scope.row.status == '1'"
  544. size="mini"
  545. type="warning"
  546. @click="handleAddNote(scope.row)"
  547. >{{ $t("view.modifyRemarks") }}
  548. </el-button>
  549. <el-button
  550. v-has="'ordersRefund:checkKf'"
  551. v-if="scope.row.status == '6'"
  552. size="mini"
  553. type="success"
  554. @click="handleSuccess(scope.row)"
  555. >{{ $t("view.refundSuccess") }}
  556. </el-button>
  557. <!-- <el-button v-has="'ordersRefund:checkKf'" v-if="scope.row.abnormalFlag=='1' " size="mini"-->
  558. <!-- type="success" @click="releaseEx(scope.row)">解除异常-->
  559. <!-- </el-button>-->
  560. <!--
  561. <el-button v-has="'ordersRefund:checkCw'" v-if="scope.row.status=='5' " type="success" size="mini" @click="handleInfo(scope.row.id,'f_check')">财务审核</el-button>
  562. -->
  563. <!-- 在在客服审批通过环节客服也可以操作取消-->
  564. <el-button
  565. v-if="
  566. scope.row.status == '0' ||
  567. scope.row.status == '4' ||
  568. scope.row.status == '1' ||
  569. scope.row.status == '2'
  570. "
  571. type="danger"
  572. size="mini"
  573. @click="cancelInfo(scope.row)"
  574. >{{ $t("view.cancel") }}
  575. </el-button>
  576. <el-button
  577. v-if="scope.row.slFlag == '1'"
  578. size="mini"
  579. type="primary"
  580. @click="handleCargoTrack(scope.row)"
  581. >{{ $t("view.cargoTrack") }}
  582. </el-button>
  583. </template>
  584. </el-table-column>
  585. </el-table>
  586. <!-- 分页 -->
  587. <swPage
  588. v-if="total > 0"
  589. key="2"
  590. :listQuery="listQuery"
  591. :total="total"
  592. pos="btmRight"
  593. @retPage="retPage"
  594. />
  595. <!-- 售后详情-->
  596. <el-drawer
  597. :title="$t('title.afterSalesDetails')"
  598. :visible.sync="refundInfoVisible"
  599. v-if="refundInfoVisible"
  600. :direction="direction"
  601. :size="dialogSize"
  602. >
  603. <refundInfoDialog
  604. @refresh="refresh"
  605. :refundId="currentRefundId"
  606. :action="action"
  607. ></refundInfoDialog>
  608. </el-drawer>
  609. <el-dialog
  610. :title="$t('title.returnLogisticsInfo')"
  611. :visible.sync="dialogShippFormVisible"
  612. v-if="dialogShippFormVisible"
  613. :close-on-click-modal="false"
  614. >
  615. <el-form :model="editShipp">
  616. <el-form-item :label="$t('label.returnWarehouse')" label-width="150px">
  617. <el-select
  618. :placeholder="$t('place.pleaseSelect')"
  619. clearable
  620. style="width: 200px;"
  621. class="filter-item"
  622. v-model="editShipp.warehouseCode"
  623. @change="shippingLabelOption"
  624. >
  625. <el-option
  626. v-for="item in warehouseItems"
  627. :key="item.key"
  628. :label="item.key"
  629. :value="item.value"
  630. ></el-option>
  631. </el-select>
  632. </el-form-item>
  633. <el-form-item
  634. :label="$t('label.useSL')"
  635. label-width="150px"
  636. v-if="editShipp.slUseable == '1'"
  637. >
  638. <el-radio-group v-model="slFlag" @input="changeSL">
  639. <el-radio label="0">{{ $t("view.notUsed") }}</el-radio>
  640. <el-radio label="1">{{ $t("view.use") }}</el-radio>
  641. </el-radio-group>
  642. </el-form-item>
  643. <el-form-item
  644. :label="$t('label.returnLogisticsCompany')"
  645. label-width="150px"
  646. >
  647. <el-input
  648. v-if="slFlag == '0'"
  649. size="mini"
  650. v-model="editShipp.shipmodeId"
  651. :placeholder="$t('place.pleaseFillIn')"
  652. class="normal-input"
  653. ></el-input>
  654. <el-input
  655. v-if="slFlag == '1'"
  656. size="mini"
  657. v-model="editShipp.shipmodeId"
  658. :placeholder="$t('place.pleaseFillIn')"
  659. class="normal-input"
  660. disabled
  661. ></el-input>
  662. </el-form-item>
  663. <el-form-item
  664. :label="$t('label.returnExpressNumber')"
  665. label-width="150px"
  666. >
  667. <el-input
  668. v-if="slFlag == '0'"
  669. size="mini"
  670. v-model="editShipp.shippingNo"
  671. :placeholder="$t('place.pleaseFillIn')"
  672. class="normal-input"
  673. ></el-input>
  674. <el-input
  675. v-if="slFlag == '1'"
  676. size="mini"
  677. v-model="editShipp.shippingNo"
  678. :placeholder="$t('place.pleaseFillIn')"
  679. class="normal-input"
  680. disabled
  681. ></el-input>
  682. </el-form-item>
  683. </el-form>
  684. <div slot="footer" class="dialog-footer">
  685. <el-button @click="dialogShippFormVisible = false">{{
  686. $t("view.cancel")
  687. }}</el-button>
  688. <!-- <el-button-->
  689. <!-- type="primary"-->
  690. <!-- @click="editShippSub(1)"-->
  691. <!-- v-loading="btnLoading"-->
  692. <!-- >{{ $t("view.save") }}</el-button-->
  693. <!-- >-->
  694. <el-button
  695. type="primary"
  696. @click="editShippSub('')"
  697. v-loading="btnLoading"
  698. >{{ $t("view.confirm") }}</el-button
  699. >
  700. </div>
  701. </el-dialog>
  702. <el-dialog
  703. :title="$t('title.nullify')"
  704. :visible.sync="dialogFormCancelVisible"
  705. v-if="dialogFormCancelVisible"
  706. :close-on-click-modal="false"
  707. >
  708. <el-form :model="cancelForm">
  709. <el-form-item :label="$t('label.cancellationNote')" label-width="120px">
  710. <el-input
  711. type="textarea"
  712. :placeholder="$t('place.enterContent')"
  713. v-model="cancelForm.zfnotes"
  714. maxlength="150"
  715. show-word-limit
  716. >
  717. </el-input>
  718. </el-form-item>
  719. </el-form>
  720. <div slot="footer" class="dialog-footer">
  721. <el-button @click="dialogFormCancelVisible = false">{{
  722. $t("view.cancel")
  723. }}</el-button>
  724. <el-button
  725. type="primary"
  726. @click="cancelSubmit"
  727. v-loading="btnLoading"
  728. >{{ $t("view.confirm") }}</el-button
  729. >
  730. </div>
  731. </el-dialog>
  732. <!--售后-->
  733. <el-dialog
  734. :title="$t('orderRefund')"
  735. :fullscreen="true"
  736. v-if="orderRefundVisible"
  737. :visible.sync="orderRefundVisible"
  738. >
  739. <orderRefundDialog :refundId="currentRefundId"></orderRefundDialog>
  740. <el-button type="danger" style="float:right" @click="backTable">{{
  741. $t("back")
  742. }}</el-button>
  743. </el-dialog>
  744. <el-dialog
  745. :title="$t('orderRefund')"
  746. :fullscreen="true"
  747. v-if="orderRefundNewVisible"
  748. :visible.sync="orderRefundNewVisible"
  749. >
  750. <orderRefundNewDialog :refundId="currentRefundId"></orderRefundNewDialog>
  751. <el-button type="danger" style="float:right" @click="backTable">{{
  752. $t("back")
  753. }}</el-button>
  754. </el-dialog>
  755. <el-dialog
  756. :title="$t('title.createRefundOrder')"
  757. :fullscreen="true"
  758. v-if="createRefundVisible"
  759. :visible.sync="createRefundVisible"
  760. >
  761. <createRefundDialog></createRefundDialog>
  762. <el-button type="danger" style="float:right" @click="backTable">{{
  763. $t("back")
  764. }}</el-button>
  765. </el-dialog>
  766. <el-dialog
  767. :title="$t('title.importRefund')"
  768. :visible.sync="dialogFormUploadVisible"
  769. width="38%"
  770. :destroy-on-close="destroyOnClose"
  771. >
  772. <el-form>
  773. <el-form-item :label="$t('label.exportTemplate')">
  774. <el-button class="filter-item" @click="downloadMould" type="primary">
  775. {{ $t("exportTemplate") }}
  776. </el-button>
  777. </el-form-item>
  778. <el-form-item :label="$t('label.importData')">
  779. <el-upload
  780. ref="upload"
  781. :limit="2"
  782. accept=".xlsx"
  783. :headers="headers"
  784. :action="upload.url + '?updateSupport=' + upload.updateSupport"
  785. :disabled="upload.isUploading"
  786. :on-progress="handleFileUploadProgress"
  787. :on-success="handleFileSuccess"
  788. :auto-upload="false"
  789. drag
  790. >
  791. <i class="el-icon-upload"></i>
  792. <div class="el-upload__text">
  793. {{ $t("view.uploadFile") }}<em>{{ $t("view.clickUp") }}</em>
  794. </div>
  795. <div class="el-upload__tip" slot="tip">
  796. {{ $t("view.xlsxFormatOnly") }}
  797. </div>
  798. </el-upload>
  799. </el-form-item>
  800. </el-form>
  801. <div slot="footer" class="dialog-footer">
  802. <el-button @click="dialogFormUploadVisible = false">{{
  803. $t("view.cancel")
  804. }}</el-button>
  805. <el-button type="primary" @click="submitUploadList">{{
  806. $t("view.confirm")
  807. }}</el-button>
  808. </div>
  809. </el-dialog>
  810. <el-dialog
  811. :title="$t('addNote')"
  812. :close-on-click-modal="false"
  813. :destroy-on-close="true"
  814. :visible.sync="addNoteVisible"
  815. width="40%"
  816. v-loading="listLoading"
  817. >
  818. <el-form ref="addNoteForm" :model="addNoteForm" label-width="auto">
  819. <el-form-item :label="$t('label.refundNumber')" prop="orderRefundId">
  820. <el-input
  821. disabled
  822. v-model="addNoteForm.orderRefundId"
  823. placeholder
  824. class="normal-input"
  825. style="width: 400px"
  826. ></el-input>
  827. </el-form-item>
  828. <el-form-item :label="$t('label.serviceNote')" prop="note">
  829. <el-input
  830. type="textarea"
  831. v-model="addNoteForm.note"
  832. :placeholder="$t('setOrderNote')"
  833. class="normal-input"
  834. ></el-input>
  835. </el-form-item>
  836. <el-form-item>
  837. <el-button type="primary" @click="submit">{{ $t("save") }}</el-button>
  838. <el-button type="danger" @click="addNoteVisible = false">{{
  839. $t("back")
  840. }}</el-button>
  841. </el-form-item>
  842. </el-form>
  843. </el-dialog>
  844. <el-dialog
  845. :title="$t('cargoTrack')"
  846. :close-on-click-modal="false"
  847. :destroy-on-close="true"
  848. :visible.sync="cargoTrackVisible"
  849. width="40%"
  850. v-loading="listLoading"
  851. >
  852. <cargoTrackDialog :refundNo="selectedRefundNo"></cargoTrackDialog>
  853. </el-dialog>
  854. </div>
  855. </template>
  856. <script>
  857. import waves from "@/directive/waves";
  858. import swPage from "@/views/common/swPage";
  859. import global from "@/views/oms/global";
  860. import refundInfoDialog from "./refundDetail";
  861. import { getToken } from "@/utils/auth";
  862. import {
  863. fetchList,
  864. updateshipping,
  865. cancel,
  866. warehouseList,
  867. rejectRefund,
  868. addNote,
  869. manualRefundSuccess,
  870. batchReview,
  871. getRefundType,
  872. getRefundReason,
  873. verifyExport
  874. } from "@/api/oms/refund/refund";
  875. import { dcmAdd } from "@/utils/toolUtil";
  876. import { fetchList as orderFetchList } from "@/api/oms/order/order";
  877. import orderRefundDialog from "@/views/oms/refund-old/components/orderRefundDialog";
  878. import orderRefundNewDialog from "@/views/oms/refund-old/components/orderRefundNewDialog";
  879. import createRefundDialog from "@/views/oms/refund-old/components/createRefundDialog";
  880. import cargoTrackDialog from "@/views/oms/refund-old/components/cargoTrackDialog";
  881. import log from "@/router/modules/log";
  882. import { queryChannelStore, queryChannel } from "@/api/oms/inventory/inventory";
  883. const refundMethodOptions = [
  884. { key: "system", display_name: "view.systemRefund" },
  885. { key: "manual", display_name: "view.manualRefund" }
  886. ];
  887. const refundMethodKeyValue = refundMethodOptions.reduce((acc, cur) => {
  888. acc[cur.key] = cur.display_name;
  889. return acc;
  890. }, {});
  891. const refundAccountTypeOptions = [
  892. { key: "PayPal", display_name: "PayPal" },
  893. { key: "bankCard", display_name: "view.bankCard" },
  894. { key: "other", display_name: "view.other" }
  895. ];
  896. const refundAccountTypeKeyValue = refundAccountTypeOptions.reduce(
  897. (acc, cur) => {
  898. acc[cur.key] = cur.display_name;
  899. return acc;
  900. },
  901. {}
  902. );
  903. export default {
  904. name: "refundList",
  905. directives: {
  906. waves
  907. },
  908. components: {
  909. swPage,
  910. refundInfoDialog,
  911. global,
  912. orderRefundDialog,
  913. orderRefundNewDialog,
  914. createRefundDialog,
  915. cargoTrackDialog
  916. },
  917. filters: {
  918. refundAccountTypeFilter(key, that) {
  919. return that.$t(refundAccountTypeKeyValue[key]);
  920. },
  921. refundMethodFilter(key, that) {
  922. return that.$t(refundMethodKeyValue[key]);
  923. },
  924. statusFilter(key, that) {
  925. var value = "";
  926. global.afterSaleStatus.forEach(status => {
  927. if (status.value == key) {
  928. value = that.$t(status.label);
  929. }
  930. });
  931. return value;
  932. },
  933. refundTypeFilter(key, that) {
  934. var value = "";
  935. global.afterSaleType.forEach(refundType => {
  936. if (refundType.value == key) {
  937. value = that.$t(refundType.label);
  938. }
  939. });
  940. return value;
  941. }
  942. },
  943. data() {
  944. return {
  945. that: this,
  946. dialogSize: "40%",
  947. direction: "rtl",
  948. fileList: [],
  949. tableKey: 0,
  950. list: [],
  951. total: 0,
  952. listLoading: false,
  953. destroyOnClose: true,
  954. addNoteForm: {
  955. id: null,
  956. orderRefundId: "",
  957. note: ""
  958. },
  959. addNoteVisible: false,
  960. channel: [],
  961. store: [],
  962. //查询条件
  963. listQuery: {
  964. page: 1,
  965. limit: 10,
  966. storeId: "",
  967. channelCode: "",
  968. refundType: "",
  969. reasonContentChinese: "",
  970. shopify: "",
  971. status: "",
  972. exchangeFlag: "",
  973. ordersNo: "",
  974. ormRefundId: "",
  975. ormorder: "",
  976. originatorFlag: "",
  977. refundNo: "",
  978. timeplacedLaggerThanEqual: null,
  979. timeplacedLessThanEqual: null,
  980. sendEmailFlag: "",
  981. signInStatus: null
  982. },
  983. dialogFormUploadVisible: false,
  984. formLabelWidth: "120px",
  985. createTimePicker: null,
  986. multipleSelection: [],
  987. selectionList: [],
  988. channelCodes: global.channelCodes, //渠道编码
  989. afterSaleStatus: global.afterSaleStatus, //售后状态
  990. afterSaleTypes: global.afterSaleType, //售后类型
  991. applyTypes: global.applyType, //售后来源
  992. signInStatus: global.signInStatusType,
  993. refundReason: [],
  994. refundReasonList: [],
  995. stores: [],
  996. refundInfoVisible: false,
  997. currentRefundId: "",
  998. upload: {
  999. // 是否显示弹出层(导入)
  1000. open: false,
  1001. // 弹出层标题(导入)
  1002. title: "",
  1003. // 是否禁用上传
  1004. isUploading: false,
  1005. // 是否更新已经存在的数据
  1006. updateSupport: 0,
  1007. // 设置上传的请求头部
  1008. // 上传的地址(后台接口)
  1009. url: process.env.VUE_APP_OMS_API + "/ordersRefund/uploadExcel"
  1010. },
  1011. editShipp: {
  1012. id: null,
  1013. shipmodeId: "",
  1014. shippingNo: "",
  1015. warehouseCode: "",
  1016. slUseable: "",
  1017. slFlag: ""
  1018. },
  1019. dialogShippFormVisible: false,
  1020. dialogFormCancelVisible: false,
  1021. cancelForm: {
  1022. refundNo: "",
  1023. zfnotes: ""
  1024. },
  1025. baseURL: process.env.VUE_APP_OMS_API,
  1026. warehouseItems: [],
  1027. btnLoading: false,
  1028. orderRefundVisible: false,
  1029. orderRefundNewVisible: false,
  1030. createRefundVisible: false,
  1031. currentOrdersId: "",
  1032. action: "", // view cus_check t_check
  1033. slFlag: "0",
  1034. staging: {
  1035. shipmodeId: "",
  1036. shippingNo: ""
  1037. },
  1038. cargoTrackVisible: false,
  1039. selectedRefundNo: ""
  1040. };
  1041. },
  1042. created() {
  1043. //获取店铺列表
  1044. this.getStores();
  1045. this.getList();
  1046. this.getChannel();
  1047. this.getStore();
  1048. this.queryRefundReason();
  1049. },
  1050. activated() {
  1051. this.getList();
  1052. },
  1053. computed: {
  1054. // 计算属性的 getter
  1055. headers: function() {
  1056. return {
  1057. "X-Token": getToken()
  1058. };
  1059. }
  1060. },
  1061. methods: {
  1062. handleCargoTrack(e) {
  1063. this.cargoTrackVisible = true;
  1064. this.selectedRefundNo = e.refundNo;
  1065. },
  1066. handleSuccess(e) {
  1067. this.$confirm("确认退款成功吗?", "提示", {
  1068. confirmButtonText: "确定",
  1069. cancelButtonText: "取消",
  1070. type: "warning"
  1071. })
  1072. .then(() => {
  1073. var params = { id: e.id };
  1074. manualRefundSuccess(params).then(res => {
  1075. if (200 == res.code) {
  1076. this.$message({
  1077. type: "success",
  1078. message: "操作成功!"
  1079. });
  1080. this.getList();
  1081. }
  1082. });
  1083. })
  1084. .catch(() => {});
  1085. },
  1086. //获取stores
  1087. getStores() {},
  1088. getList() {
  1089. this.listLoading = true;
  1090. fetchList(this.listQuery).then(res => {
  1091. if (200 == res.code) {
  1092. this.total = res.data.total;
  1093. this.list = res.data.list;
  1094. }
  1095. this.listLoading = false;
  1096. });
  1097. },
  1098. retPage() {
  1099. //分页
  1100. this.getList();
  1101. },
  1102. getChannel() {
  1103. queryChannel({ storeId: this.listQuery.storeId }).then(res => {
  1104. if (200 == res.code) {
  1105. this.channel = res.data;
  1106. }
  1107. });
  1108. },
  1109. getStore() {
  1110. queryChannelStore({ channelCode: this.listQuery.channelCode }).then(
  1111. res => {
  1112. if (200 == res.code) {
  1113. this.store = res.data;
  1114. }
  1115. }
  1116. );
  1117. },
  1118. submitUploadList() {
  1119. this.$refs.upload.submit();
  1120. },
  1121. handleFileUploadProgress(event, file, fileList) {
  1122. this.upload.isUploading = true;
  1123. },
  1124. //文件上传成功返回
  1125. handleFileSuccess(response, file, fileList) {
  1126. if (file.response.code === 200) {
  1127. this.$message({
  1128. message: "导入成功",
  1129. type: "success"
  1130. });
  1131. this.dialogFormUploadVisible = false;
  1132. } else {
  1133. this.$message.error(file.response.msg + ",请重新上传");
  1134. //删除上传列表中,失败的文件
  1135. let index = 0;
  1136. for (const i in fileList) {
  1137. if (fileList[i] == file) {
  1138. index = i;
  1139. break;
  1140. }
  1141. }
  1142. //移出当前文件对象
  1143. fileList.splice(index, 1);
  1144. }
  1145. this.upload.open = false;
  1146. this.upload.isUploading = false;
  1147. },
  1148. //导出模板
  1149. downloadMould() {
  1150. var url = this.baseURL + "ordersRefund/downloadMould";
  1151. window.location.href = url;
  1152. },
  1153. handleFilter() {
  1154. this.listQuery.page = 1;
  1155. if (this.createTimePicker == null) {
  1156. this.listQuery.timeplacedLaggerThanEqual = "";
  1157. this.listQuery.timeplacedLessThanEqual = "";
  1158. } else {
  1159. this.listQuery.timeplacedLaggerThanEqual = this.createTimePicker[0];
  1160. this.listQuery.timeplacedLessThanEqual = this.createTimePicker[1];
  1161. }
  1162. this.getList();
  1163. },
  1164. exportExcel() {
  1165. this.listQuery.page = 1;
  1166. this.listLoading = true;
  1167. if (this.createTimePicker == null) {
  1168. this.listQuery.timeplacedLaggerThanEqual = "";
  1169. this.listQuery.timeplacedLessThanEqual = "";
  1170. } else {
  1171. this.listQuery.timeplacedLaggerThanEqual = this.createTimePicker[0];
  1172. this.listQuery.timeplacedLessThanEqual = this.createTimePicker[1];
  1173. }
  1174. verifyExport(this.listQuery)
  1175. .then(res => {
  1176. if (200 == res.code) {
  1177. var url =
  1178. this.baseURL +
  1179. "ordersRefund/export?storeId=" +
  1180. this.listQuery.storeId +
  1181. "&refundType=" +
  1182. this.listQuery.refundType +
  1183. "&status=" +
  1184. this.listQuery.status +
  1185. "&ormRefundId=" +
  1186. this.listQuery.ormRefundId +
  1187. "&ormorder=" +
  1188. this.listQuery.ormorder +
  1189. "&refundNo=" +
  1190. this.listQuery.refundNo +
  1191. "&channelCode=" +
  1192. this.listQuery.channelCode +
  1193. "&shopify=" +
  1194. encodeURIComponent(this.listQuery.shopify) +
  1195. "&timeplacedLaggerThanEqual=" +
  1196. this.listQuery.timeplacedLaggerThanEqual +
  1197. "&timeplacedLessThanEqual=" +
  1198. this.listQuery.timeplacedLessThanEqual;
  1199. window.location.href = url;
  1200. }
  1201. this.listLoading = false;
  1202. })
  1203. .catch(err => {
  1204. console.log(err);
  1205. this.listLoading = false;
  1206. });
  1207. },
  1208. //查看退款单详情
  1209. /**
  1210. *
  1211. * @param refundId 退款单号
  1212. * @param action 动作: view 查看 , cus_check 客服审核 f_check 财务审核
  1213. */
  1214. handleInfo(refundId, action) {
  1215. //进入退款单详情查看
  1216. this.currentRefundId = refundId;
  1217. this.action = action;
  1218. this.refundInfoVisible = true;
  1219. },
  1220. editInfo(row) {
  1221. //进入退款单详情查看
  1222. this.editShipp.id = row.id;
  1223. this.editShipp.shipmodeId = row.shipmodeId;
  1224. this.editShipp.shippingNo = row.shippingNo;
  1225. this.editShipp.warehouseCode = row.warehouseCode;
  1226. this.editShipp.slUseable = row.slUseable;
  1227. this.staging.shipmodeId = row.shipmodeId;
  1228. this.staging.shippingNo = row.shippingNo;
  1229. warehouseList().then(res => {
  1230. if (200 == res.code) {
  1231. this.warehouseItems = res.data;
  1232. this.shippingLabelOption();
  1233. this.dialogShippFormVisible = true;
  1234. }
  1235. });
  1236. },
  1237. editShippSub(flag) {
  1238. if (!this.editShipp.warehouseCode) {
  1239. this.$message.error("请选择收退仓库!");
  1240. return false;
  1241. }
  1242. if (!this.editShipp.shipmodeId) {
  1243. this.$message.error("请填写退货物流公司!");
  1244. return false;
  1245. }
  1246. if (!this.editShipp.shippingNo) {
  1247. this.$message.error("请填写退货快递单号!");
  1248. return false;
  1249. }
  1250. this.btnLoading = true;
  1251. this.editShipp.slFlag = this.slFlag;
  1252. updateshipping(this.editShipp).then(
  1253. res => {
  1254. if (200 == res.code) {
  1255. this.$message({
  1256. message: this.$t("optSuccess"),
  1257. type: "success"
  1258. });
  1259. this.editShipp = {
  1260. id: null,
  1261. shipmodeId: "",
  1262. shippingNo: "",
  1263. warehouseCode: "",
  1264. flag: flag
  1265. };
  1266. this.btnLoading = false;
  1267. this.dialogShippFormVisible = false;
  1268. this.getList();
  1269. }
  1270. },
  1271. error => {
  1272. this.btnLoading = false;
  1273. }
  1274. );
  1275. },
  1276. cancelInfo(row) {
  1277. this.cancelForm = {
  1278. refundNo: "",
  1279. zfnotes: ""
  1280. };
  1281. this.cancelForm.refundNo = row.refundNo;
  1282. this.dialogFormCancelVisible = true;
  1283. },
  1284. cancelSubmit() {
  1285. this.$confirm("确认作废/撤销, 是否继续?", "提示", {
  1286. confirmButtonText: "确定",
  1287. cancelButtonText: "取消",
  1288. type: "warning"
  1289. })
  1290. .then(() => {
  1291. this.btnLoading = true;
  1292. cancel(this.cancelForm).then(
  1293. res => {
  1294. if (200 == res.code) {
  1295. this.$message({
  1296. type: "success",
  1297. message: "作废成功!"
  1298. });
  1299. this.cancelForm = {
  1300. refundNo: "",
  1301. zfnotes: ""
  1302. };
  1303. this.btnLoading = false;
  1304. this.dialogFormCancelVisible = false;
  1305. this.getList();
  1306. }
  1307. },
  1308. error => {
  1309. this.btnLoading = false;
  1310. }
  1311. );
  1312. })
  1313. .catch(() => {
  1314. this.$message({
  1315. type: "info",
  1316. message: this.$t("view.canceled")
  1317. });
  1318. });
  1319. },
  1320. refresh() {
  1321. this.getList();
  1322. },
  1323. //编辑退款申请
  1324. handleRefund(currentRefundId) {
  1325. this.currentRefundId = currentRefundId;
  1326. // this.currentOrdersId = ordersId;
  1327. this.orderRefundVisible = true;
  1328. },
  1329. //新建退款信息
  1330. createRefund(currentRefundId) {
  1331. this.currentRefundId = currentRefundId;
  1332. // this.currentOrdersId = ordersId;
  1333. this.orderRefundNewVisible = true;
  1334. },
  1335. //创建退款单(新逻辑)
  1336. createNewRefund() {
  1337. this.createRefundVisible = true;
  1338. },
  1339. reject(id, refundNo) {
  1340. rejectRefund(id, refundNo).then(res => {
  1341. if (res.code == 200) {
  1342. if (res.msg == "success") {
  1343. this.$message({
  1344. type: "success",
  1345. message: this.$t("view.rejectionSuccess")
  1346. });
  1347. } else {
  1348. this.$message({
  1349. message: res.msg,
  1350. type: "warning"
  1351. });
  1352. }
  1353. this.getList();
  1354. }
  1355. });
  1356. },
  1357. backTable() {
  1358. this.orderRefundVisible = false;
  1359. this.orderRefundNewVisible = false;
  1360. this.createRefundVisible = false;
  1361. this.getList();
  1362. },
  1363. handleAddNote(order) {
  1364. this.addNoteVisible = true;
  1365. this.addNoteForm.orderRefundId = order.refundNo;
  1366. this.addNoteForm.note = order.notes;
  1367. this.addNoteForm.id = order.id;
  1368. },
  1369. submit() {
  1370. this.listLoading = true;
  1371. addNote(this.addNoteForm).then(res => {
  1372. if (200 == res.code) {
  1373. this.$message({
  1374. message: this.$t("optSuccess"),
  1375. type: "success"
  1376. });
  1377. this.getList();
  1378. this.listLoading = false;
  1379. this.addNoteVisible = false;
  1380. }
  1381. });
  1382. },
  1383. // 展示红色背景
  1384. tableRowStyleName({ row }) {
  1385. if (row.totalCount) {
  1386. return "color: red !important;";
  1387. }
  1388. },
  1389. selectEnable(row, index) {
  1390. if (row.refundType === "2" && row.status === "0") {
  1391. return 1;
  1392. } else if (row.refundType === "3" && row.status === "0") {
  1393. return 1;
  1394. } else {
  1395. return 0;
  1396. }
  1397. },
  1398. //获取多选选中数据
  1399. handleSelectionChange(val) {
  1400. // val拿到的是选中行的全部数据,而this.multipleSelection是把val以对象装在数组中
  1401. this.multipleSelection = val;
  1402. // 每次都清空存储的数据,并装入新数据
  1403. this.selectionList = [];
  1404. for (const val of this.multipleSelection) {
  1405. this.selectionList.push(val);
  1406. }
  1407. },
  1408. batchCheck() {
  1409. this.$confirm("确定批量审核?", "提示", {
  1410. confirmButtonText: "确定",
  1411. cancelButtonText: "取消",
  1412. type: "warning"
  1413. })
  1414. .then(() => {
  1415. this.listLoading = true;
  1416. batchReview(this.selectionList)
  1417. .then(res => {
  1418. if (200 == res.code) {
  1419. this.$message({
  1420. message: this.$t("optSuccess"),
  1421. type: "success"
  1422. });
  1423. }
  1424. this.getList();
  1425. this.listLoading = false;
  1426. })
  1427. .catch(err => {
  1428. this.getList();
  1429. this.listLoading = false;
  1430. });
  1431. })
  1432. .catch(() => {
  1433. this.btnLoading = false;
  1434. this.btndisabled = true;
  1435. this.$message({
  1436. type: "info",
  1437. message: "已取消操作"
  1438. });
  1439. });
  1440. },
  1441. queryRefundType(value) {
  1442. console.log(value);
  1443. this.listQuery.reasonContentChinese = value.join(",");
  1444. },
  1445. queryRefundReason() {
  1446. getRefundReason({ reasonType: this.listQuery.refundType }).then(res => {
  1447. if (200 == res.code) {
  1448. this.refundReason = res.data;
  1449. }
  1450. });
  1451. },
  1452. // releaseEx(row){
  1453. // console.log(row)
  1454. // releaseExceptions(row.id).then(res => {
  1455. // if(200 == res.code){
  1456. // this.$message({
  1457. // message: "操作成功",
  1458. // type: "success"
  1459. // });
  1460. // this.getList();
  1461. // }
  1462. // })
  1463. // },
  1464. shippingLabelOption() {
  1465. this.changeSL();
  1466. },
  1467. changeSL() {
  1468. if (this.slFlag == "1") {
  1469. this.editShipp.shipmodeId = "/";
  1470. this.editShipp.shippingNo = "/";
  1471. } else {
  1472. this.editShipp.shipmodeId = this.staging.shipmodeId;
  1473. this.editShipp.shippingNo = this.staging.shippingNo;
  1474. }
  1475. }
  1476. }
  1477. };
  1478. </script>
  1479. <style scoped>
  1480. .cell > span {
  1481. white-space: nowrap !important;
  1482. }
  1483. .el-button + .el-button {
  1484. margin-left: 10px;
  1485. margin-top: 10px;
  1486. }
  1487. </style>