refundCwList.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880
  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. >
  11. <el-option
  12. v-for="afterSaleType in afterSaleTypes"
  13. :key="afterSaleType.value"
  14. :label="$t(afterSaleType.label)"
  15. :value="afterSaleType.value"
  16. >
  17. </el-option>
  18. </el-select>
  19. <el-select
  20. :placeholder="$t('label.returnWarehouse')"
  21. style="width: 200px;"
  22. class="filter-item"
  23. clearable
  24. filterable
  25. v-model="listQuery.warehouseCode"
  26. >
  27. <el-option
  28. v-for="item in warehouse"
  29. :key="item.returnWarehouseCode"
  30. :label="item.returnWarehouseName"
  31. :value="item.returnWarehouseCode"
  32. />
  33. </el-select>
  34. <el-select
  35. v-model="listQuery.exchangeFlag"
  36. :clearable="true"
  37. class="filter-item"
  38. style="width: 200px;"
  39. :placeholder="$t('exchangeFlag')"
  40. >
  41. <el-option key="1" :label="$t('label.yes')" value="1"></el-option>
  42. <el-option key="0" :label="$t('label.no')" value="0"></el-option>
  43. </el-select>
  44. <el-select
  45. v-model="listQuery.channelCode"
  46. :clearable="true"
  47. filterable
  48. class="filter-item"
  49. style="width: 200px;"
  50. :placeholder="$t('place.channel')"
  51. @change="getStore"
  52. >
  53. <el-option
  54. v-for="item in channel"
  55. :key="item.code"
  56. :label="item.name"
  57. :value="item.code"
  58. >
  59. </el-option>
  60. </el-select>
  61. <el-select
  62. v-model="listQuery.storeId"
  63. :clearable="true"
  64. filterable
  65. class="filter-item"
  66. style="width: 200px;"
  67. :placeholder="$t('place.shopName')"
  68. @change="getChannel"
  69. >
  70. <el-option
  71. v-for="item in store"
  72. :key="item.storeId"
  73. :label="item.storeName"
  74. :value="item.storeId"
  75. >
  76. </el-option>
  77. </el-select>
  78. <el-input
  79. :placeholder="$t('place.refundNumber')"
  80. clearable
  81. style="width: 200px;"
  82. class="filter-item"
  83. v-model="listQuery.refundNo"
  84. />
  85. <el-input
  86. :placeholder="$t('place.onlineRefundNumber')"
  87. clearable
  88. style="width: 200px;"
  89. class="filter-item"
  90. v-model="listQuery.ormRefundId"
  91. />
  92. <el-input
  93. :placeholder="$t('place.shopifyNumber')"
  94. clearable
  95. style="width: 200px;"
  96. class="filter-item"
  97. v-model="listQuery.shopify"
  98. />
  99. <el-input
  100. :placeholder="$t('place.onlineShopNumber')"
  101. clearable
  102. style="width: 200px;"
  103. class="filter-item"
  104. v-model="listQuery.ormorder"
  105. />
  106. <el-date-picker
  107. class="filter-item"
  108. style="display: inline-flex;"
  109. v-model="createTimePicker"
  110. type="datetimerange"
  111. :range-separator="$t('to')"
  112. :start-placeholder="$t('place.refundCreationStart')"
  113. :end-placeholder="$t('place.refundCreationEnd')"
  114. value-format="yyyy-MM-dd HH:mm:ss"
  115. :default-time="['00:00:00', '23:59:59']"
  116. >
  117. </el-date-picker>
  118. <el-select
  119. :placeholder="$t('place.inboundStatus')"
  120. clearable
  121. style="width: 200px;"
  122. class="filter-item"
  123. v-model="listQuery.inboundStatus"
  124. >
  125. <el-option value="success" :label="$t('label.normalReturn')" />
  126. <el-option value="returning" :label="$t('label.inReturnTransit')" />
  127. <el-option value="shipLost" :label="$t('label.shipmentLost')" />
  128. <el-option value="returnLost" :label="$t('label.returnLost')" />
  129. </el-select>
  130. <!--<el-input placeholder="收件人电话" style="width: 200px;"
  131. class="filter-item" v-model="listQuery.receiverMobile"/>-->
  132. <el-button
  133. v-waves
  134. class="filter-item"
  135. type="primary"
  136. icon="el-icon-search"
  137. @click="handleFilter"
  138. >{{ $t("view.search") }}</el-button
  139. >
  140. </div>
  141. <!--<div class="filter-container">
  142. <el-button v-waves class="filter-item" type="primary" @click="orderExport('orderItem')">退款明细导出</el-button>
  143. </div>-->
  144. <!-- 展示红色背景-->
  145. <el-table
  146. style="width: 100%;"
  147. v-loading="listLoading"
  148. :key="tableKey"
  149. :data="list"
  150. row-key="id"
  151. stripe
  152. border
  153. fit
  154. highlight-current-row
  155. :cell-style="tableRowStyleName"
  156. @sort-change="sortMethod"
  157. >
  158. <el-table-column align="center" type="index"> </el-table-column>
  159. <el-table-column
  160. :label="$t('label.refundNumber')"
  161. width="200"
  162. align="center"
  163. prop="refundNo"
  164. >
  165. </el-table-column>
  166. <el-table-column
  167. :label="$t('label.onlineRefundNumber')"
  168. width="250"
  169. align="center"
  170. prop="ormRefundId"
  171. >
  172. </el-table-column>
  173. <el-table-column
  174. :label="$t('label.shopifyNumber')"
  175. width="200"
  176. align="center"
  177. prop="cutUser"
  178. >
  179. </el-table-column>
  180. <el-table-column
  181. :label="$t('storeName')"
  182. align="center"
  183. min-width="180"
  184. prop="storeName"
  185. ></el-table-column>
  186. <el-table-column
  187. :label="$t('label.onlineShopOrder')"
  188. width="150"
  189. align="center"
  190. prop="ormorder"
  191. >
  192. </el-table-column>
  193. <el-table-column
  194. :label="$t('label.onlineShopStatus')"
  195. width="150"
  196. align="center"
  197. prop="channelStatus"
  198. >
  199. <template slot-scope="scope">
  200. {{ scope.row.channelStatus | channelStatusFilter(that) }}
  201. </template>
  202. </el-table-column>
  203. <el-table-column
  204. :label="$t('label.afterSalesType')"
  205. width="100"
  206. align="center"
  207. prop="refundType"
  208. >
  209. <template slot-scope="scope">
  210. {{ scope.row.refundType | refundTypeFilter(that) }}
  211. </template>
  212. </el-table-column>
  213. <!-- <el-table-column :label="$t('label.exchangeGoods')" prop="exchangeFlag" width = "100" >
  214. <template slot-scope="scope" >
  215. {{ scope.row.exchangeFlag === "1" ? $t('label.yes') : $t('label.no') }}
  216. </template>
  217. </el-table-column> -->
  218. <el-table-column
  219. :label="$t('label.afterSalesInitiation')"
  220. width="110"
  221. align="center"
  222. >
  223. <template slot-scope="scope">
  224. <div v-if="scope.row.originatorFlag == '1'">
  225. {{ $t("label.customerService") }}
  226. </div>
  227. <div v-if="scope.row.originatorFlag == '2'">
  228. {{ $t("label.buyer") }}
  229. </div>
  230. </template>
  231. </el-table-column>
  232. <el-table-column
  233. :label="$t('label.afterSalesStatus')"
  234. width="120"
  235. align="center"
  236. >
  237. <template slot-scope="scope">
  238. <el-tag effect="dark" type="warning" v-if="scope.row.status == '4'">
  239. {{ scope.row.status | statusFilte(that) }}
  240. </el-tag>
  241. <el-tag effect="dark" type="info" v-else-if="scope.row.status == '7'">
  242. {{ scope.row.status | statusFilter(that) }}
  243. </el-tag>
  244. <el-tag effect="dark" type="success" v-else>
  245. {{ scope.row.status | statusFilter(that) }}
  246. </el-tag>
  247. </template>
  248. </el-table-column>
  249. <el-table-column
  250. :label="$t('label.applicationTime')"
  251. width="160"
  252. align="center"
  253. prop="timeplaced"
  254. >
  255. </el-table-column>
  256. <el-table-column
  257. :label="$t('label.applicant')"
  258. width="120"
  259. align="center"
  260. prop="userName"
  261. >
  262. </el-table-column>
  263. <el-table-column
  264. :label="$t('label.returnWarehouse')"
  265. width="120"
  266. align="center"
  267. prop="warehouseName"
  268. >
  269. </el-table-column>
  270. <el-table-column
  271. :label="$t('label.refundAmount')"
  272. width="100"
  273. align="center"
  274. prop="refundAmount"
  275. >
  276. </el-table-column>
  277. <el-table-column
  278. :label="$t('label.shippingRefund')"
  279. width="100"
  280. align="center"
  281. prop="refundPostageAmount"
  282. >
  283. </el-table-column>
  284. <el-table-column
  285. :label="$t('label.serviceNote')"
  286. width="150"
  287. align="center"
  288. prop="notes"
  289. >
  290. </el-table-column>
  291. <el-table-column
  292. :label="$t('label.buyerReasonNote')"
  293. width="150"
  294. align="center"
  295. prop="buyNotes"
  296. >
  297. </el-table-column>
  298. <el-table-column
  299. label="自动退款失败原因"
  300. width="150"
  301. align="center"
  302. :show-overflow-tooltip="true"
  303. prop="autoRefundFailureReason"
  304. >
  305. </el-table-column>
  306. <el-table-column
  307. :label="$t('label.channelID')"
  308. width="120"
  309. align="center"
  310. prop="channelCode"
  311. >
  312. </el-table-column>
  313. <el-table-column
  314. :label="$t('label.channelName')"
  315. width="140"
  316. align="center"
  317. prop="channelName"
  318. >
  319. </el-table-column>
  320. <el-table-column
  321. :label="$t('label.updateTime')"
  322. width="160"
  323. align="center"
  324. prop="lastupdate"
  325. :sortable="'custom'"
  326. >
  327. </el-table-column>
  328. <el-table-column
  329. :label="$t('label.updater')"
  330. width="120"
  331. align="center"
  332. prop="lastUserName"
  333. >
  334. </el-table-column>
  335. <el-table-column
  336. :label="$t('label.operation')"
  337. fixed="right"
  338. width="300"
  339. align="left"
  340. >
  341. <template slot-scope="scope">
  342. <!-- <el-button type="primary" size="mini" @click="handleInfo(scope.row.id,'view')">详情</el-button>-->
  343. <el-button
  344. v-has="'ordersRefund:checkKf'"
  345. v-if="
  346. scope.row.refundType == '3' &&
  347. (scope.row.status == '0' || scope.row.status == '4')
  348. "
  349. type="success"
  350. size="mini"
  351. @click="editInfo(scope.row)"
  352. >{{ $t("view.logistics") }}</el-button
  353. >
  354. <!--
  355. <el-button v-has="'ordersRefund:checkKf'" v-if="scope.row.status=='0' " type="success" size="mini" @click="handleInfo(scope.row.id,'cus_check')">审核</el-button>
  356. -->
  357. <!--
  358. <el-button v-has="'ordersRefund:checkKf'" v-if="scope.row.status=='0' " type="success" size="mini" @click="handleRefund(scope.row.id,scope.row.ordersId)">编辑</el-button>
  359. -->
  360. <el-button
  361. v-has="'ordersRefund:checkCw'"
  362. v-if="scope.row.status == '5'"
  363. type="success"
  364. size="mini"
  365. @click="handleInfo(scope.row.id, 'f_check')"
  366. >{{ $t("view.financialReview") }}</el-button
  367. >
  368. <!-- <el-button v-has="'ordersRefund:checkCw'" v-if="scope.row.status=='5' " size="mini" type="success" @click="handleSuccess(scope.row)">退款成功
  369. </el-button>-->
  370. <el-button
  371. v-if="scope.row.status == '0' || scope.row.status == '4'"
  372. type="danger"
  373. size="mini"
  374. @click="cancelInfo(scope.row)"
  375. >{{ $t("view.cancel") }}</el-button
  376. >
  377. </template>
  378. </el-table-column>
  379. </el-table>
  380. <!-- 分页 -->
  381. <swPage
  382. v-if="total > 0"
  383. key="2"
  384. :listQuery="listQuery"
  385. :total="total"
  386. pos="btmRight"
  387. @retPage="retPage"
  388. />
  389. <el-drawer
  390. :title="$t('title.afterSalesDetails')"
  391. :visible.sync="refundInfoVisible"
  392. v-if="refundInfoVisible"
  393. :direction="direction"
  394. size="90%"
  395. >
  396. <refundInfoDialog
  397. @refresh="refresh"
  398. :refundId="currentRefundId"
  399. :action="action"
  400. ></refundInfoDialog>
  401. </el-drawer>
  402. <el-dialog
  403. :title="$t('title.returnLogisticsInfo')"
  404. :visible.sync="dialogShippFormVisible"
  405. v-if="dialogShippFormVisible"
  406. :close-on-click-modal="false"
  407. >
  408. <el-form :model="editShipp">
  409. <el-form-item :label="$t('label.returnWarehouse')" label-width="150px">
  410. <el-select
  411. :placeholder="$t('place.pleaseSelect')"
  412. clearable
  413. style="width: 200px;"
  414. class="filter-item"
  415. v-model="editShipp.warehouseCode"
  416. >
  417. <el-option
  418. v-for="item in warehouseItems"
  419. :key="item.key"
  420. :label="item.key"
  421. :value="item.value"
  422. ></el-option>
  423. </el-select>
  424. </el-form-item>
  425. <el-form-item
  426. :label="$t('label.returnLogisticsCompany')"
  427. label-width="150px"
  428. >
  429. <el-input
  430. size="mini"
  431. v-model="editShipp.shipmodeId"
  432. :placeholder="$t('place.pleaseFillIn')"
  433. class="normal-input"
  434. ></el-input>
  435. </el-form-item>
  436. <el-form-item
  437. :label="$t('label.returnExpressNumber')"
  438. label-width="150px"
  439. >
  440. <el-input
  441. size="mini"
  442. v-model="editShipp.shippingNo"
  443. :placeholder="$t('place.pleaseFillIn')"
  444. class="normal-input"
  445. ></el-input>
  446. </el-form-item>
  447. </el-form>
  448. <div slot="footer" class="dialog-footer">
  449. <el-button @click="dialogShippFormVisible = false">{{
  450. $t("view.cancel")
  451. }}</el-button>
  452. <!-- <el-button-->
  453. <!-- type="primary"-->
  454. <!-- @click="editShippSub(1)"-->
  455. <!-- v-loading="btnLoading"-->
  456. <!-- >暂存</el-button-->
  457. <!-- >-->
  458. <el-button
  459. type="primary"
  460. @click="editShippSub(1)"
  461. v-loading="btnLoading"
  462. >{{ $t("view.save") }}</el-button
  463. >
  464. <el-button
  465. type="primary"
  466. @click="editShippSub('')"
  467. v-loading="btnLoading"
  468. >{{ $t("view.confirm") }}</el-button
  469. >
  470. </div>
  471. </el-dialog>
  472. <el-dialog
  473. :title="$t('title.nullify')"
  474. :visible.sync="dialogFormCancelVisible"
  475. v-if="dialogFormCancelVisible"
  476. :close-on-click-modal="false"
  477. >
  478. <el-form :model="cancelForm">
  479. <el-form-item :label="$t('label.cancellationNote')" label-width="120px">
  480. <el-input
  481. type="textarea"
  482. :placeholder="$t('place.enterContent')"
  483. v-model="cancelForm.zfnotes"
  484. maxlength="150"
  485. show-word-limit
  486. >
  487. </el-input>
  488. </el-form-item>
  489. </el-form>
  490. <div slot="footer" class="dialog-footer">
  491. <el-button @click="dialogFormCancelVisible = false">{{
  492. $t("view.cancel")
  493. }}</el-button>
  494. <el-button
  495. type="primary"
  496. @click="cancelSubmit"
  497. v-loading="btnLoading"
  498. >{{ $t("view.confirm") }}</el-button
  499. >
  500. </div>
  501. </el-dialog>
  502. <!--售后-->
  503. <el-dialog
  504. :title="$t('orderRefund')"
  505. :fullscreen="true"
  506. v-if="orderRefundVisible"
  507. :visible.sync="orderRefundVisible"
  508. >
  509. <orderRefundDialog
  510. :refundId="currentRefundId"
  511. :ordersId="currentOrdersId"
  512. ></orderRefundDialog>
  513. <el-button type="danger" style="float:right" @click="backTable">{{
  514. $t("back")
  515. }}</el-button>
  516. </el-dialog>
  517. </div>
  518. </template>
  519. <script>
  520. import waves from "@/directive/waves";
  521. import swPage from "@/views/common/swPage";
  522. import global from "@/views/oms/global";
  523. import refundInfoDialog from "./refundDetail";
  524. import { getToken } from "@/utils/auth";
  525. import {
  526. fetchList,
  527. updateshipping,
  528. cancel,
  529. warehouseList,
  530. queryTWarehouseNameALL,
  531. manualRefundSuccess
  532. } from "@/api/oms/refund/refund";
  533. import { dcmAdd } from "@/utils/toolUtil";
  534. import orderRefundDialog from "@/views/oms/refund/components/orderRefundDialog";
  535. import { queryChannelStore, queryChannel } from "@/api/oms/inventory/inventory";
  536. export default {
  537. name: "refundList",
  538. directives: {
  539. waves
  540. },
  541. components: {
  542. swPage,
  543. refundInfoDialog,
  544. global,
  545. orderRefundDialog
  546. },
  547. filters: {
  548. statusFilter(key, that) {
  549. var value = "";
  550. global.afterSaleStatus.forEach(status => {
  551. if (status.value == key) {
  552. value = that.$t(status.label);
  553. }
  554. });
  555. return value;
  556. },
  557. refundTypeFilter(key, that) {
  558. var value = "";
  559. global.afterSaleType.forEach(refundType => {
  560. if (refundType.value == key) {
  561. value = that.$t(refundType.label);
  562. }
  563. });
  564. return value;
  565. },
  566. channelStatusFilter(key, that) {
  567. var value = "";
  568. global.channelStatus.forEach(status => {
  569. if (status.value == key) {
  570. value = that.$t(status.label);
  571. }
  572. });
  573. return value;
  574. }
  575. },
  576. data() {
  577. return {
  578. that: this,
  579. direction: "rtl",
  580. fileList: [],
  581. tableKey: 0,
  582. list: [],
  583. total: 0,
  584. listLoading: false,
  585. store: [],
  586. channel: [],
  587. //查询条件
  588. listQuery: {
  589. page: 1,
  590. limit: 20,
  591. storeId: "",
  592. channelCode: "",
  593. refundType: "",
  594. shopify: "",
  595. status: "5",
  596. cutUser: "",
  597. ormRefundId: "",
  598. ormorder: "",
  599. refundNo: "",
  600. timeplacedLaggerThanEqual: "",
  601. timeplacedLessThanEqual: "",
  602. warehouseCode: "",
  603. sort: "",
  604. inboundStatus: null
  605. },
  606. warehouse: [],
  607. returnStatusList: global.returnStatus,
  608. createTimePicker: null,
  609. channelCodes: global.channelCodes, //渠道编码
  610. afterSaleStatus: global.afterSaleStatus, //售后状态
  611. afterSaleTypes: global.afterSaleType, //售后类型
  612. applyTypes: global.applyType, //售后来源
  613. stores: [],
  614. refundInfoVisible: false,
  615. currentRefundId: "",
  616. editShipp: {
  617. id: null,
  618. shipmodeId: "",
  619. shippingNo: "",
  620. warehouseCode: ""
  621. },
  622. dialogShippFormVisible: false,
  623. dialogFormCancelVisible: false,
  624. cancelForm: {
  625. refundNo: "",
  626. zfnotes: ""
  627. },
  628. warehouseItems: [],
  629. btnLoading: false,
  630. orderRefundVisible: false,
  631. currentOrdersId: "",
  632. action: "" // view cus_check t_check
  633. };
  634. },
  635. created() {
  636. //获取店铺列表
  637. this.getList();
  638. this.getChannel();
  639. this.getStore();
  640. this.queryWarehouseName();
  641. },
  642. activated() {
  643. this.getList();
  644. },
  645. computed: {
  646. // 计算属性的 getter
  647. headers: function() {
  648. return {
  649. "X-Token": getToken()
  650. };
  651. }
  652. },
  653. methods: {
  654. handleSuccess(e) {
  655. this.$confirm("确认退款成功吗?", "提示", {
  656. confirmButtonText: "确定",
  657. cancelButtonText: "取消",
  658. type: "warning"
  659. })
  660. .then(() => {
  661. var params = { id: e.id };
  662. manualRefundSuccess(params).then(res => {
  663. if (200 == res.code) {
  664. this.$message({
  665. type: "success",
  666. message: "操作成功!"
  667. });
  668. this.getList();
  669. }
  670. });
  671. })
  672. .catch(() => {});
  673. },
  674. queryWarehouseName() {
  675. queryTWarehouseNameALL().then(response => {
  676. this.warehouse = response.data;
  677. });
  678. },
  679. getList() {
  680. this.listLoading = true;
  681. fetchList(this.listQuery).then(res => {
  682. if (200 == res.code) {
  683. this.total = res.data.total;
  684. this.list = res.data.list;
  685. }
  686. this.listLoading = false;
  687. });
  688. },
  689. getChannel() {
  690. queryChannel({ storeId: this.listQuery.storeId }).then(res => {
  691. if (200 == res.code) {
  692. this.channel = res.data;
  693. }
  694. });
  695. },
  696. getStore() {
  697. queryChannelStore({ channelCode: this.listQuery.channelCode }).then(
  698. res => {
  699. if (200 == res.code) {
  700. this.store = res.data;
  701. }
  702. }
  703. );
  704. },
  705. // 展示红色背景
  706. tableRowStyleName({ row }) {
  707. if (row.totalCount) {
  708. return "color: red !important;";
  709. }
  710. },
  711. retPage() {
  712. //分页
  713. this.getList();
  714. },
  715. handleFilter() {
  716. this.listQuery.page = 1;
  717. if (this.createTimePicker == null) {
  718. this.listQuery.timeplacedLaggerThanEqual = "";
  719. this.listQuery.timeplacedLessThanEqual = "";
  720. } else {
  721. this.listQuery.timeplacedLaggerThanEqual = this.createTimePicker[0];
  722. this.listQuery.timeplacedLessThanEqual = this.createTimePicker[1];
  723. }
  724. this.getList();
  725. },
  726. //查看退款单详情
  727. handleInfo(refundId, action) {
  728. //进入退款单详情查看
  729. this.action = action;
  730. this.currentRefundId = refundId;
  731. this.refundInfoVisible = true;
  732. },
  733. editInfo(row) {
  734. //进入退款单详情查看
  735. this.editShipp.id = row.id;
  736. this.editShipp.shipmodeId = row.shipmodeId;
  737. this.editShipp.shippingNo = row.shippingNo;
  738. this.editShipp.warehouseCode = row.warehouseCode;
  739. warehouseList().then(res => {
  740. if (200 == res.code) {
  741. this.warehouseItems = res.data;
  742. this.dialogShippFormVisible = true;
  743. }
  744. });
  745. },
  746. editShippSub(flag) {
  747. if (!this.editShipp.warehouseCode) {
  748. this.$message.error("请选择收退仓库!");
  749. return false;
  750. }
  751. if (!this.editShipp.shipmodeId) {
  752. this.$message.error("请填写退货物流公司!");
  753. return false;
  754. }
  755. if (!this.editShipp.shippingNo) {
  756. this.$message.error("请填写退货快递单号!");
  757. return false;
  758. }
  759. this.btnLoading = true;
  760. updateshipping(this.editShipp).then(
  761. res => {
  762. if (200 == res.code) {
  763. this.$message({
  764. message: this.$t("optSuccess"),
  765. type: "success"
  766. });
  767. this.editShipp = {
  768. id: null,
  769. shipmodeId: "",
  770. shippingNo: "",
  771. warehouseCode: "",
  772. flag: flag
  773. };
  774. this.btnLoading = false;
  775. this.dialogShippFormVisible = false;
  776. this.getList();
  777. }
  778. },
  779. error => {
  780. this.btnLoading = false;
  781. }
  782. );
  783. },
  784. cancelInfo(row) {
  785. this.cancelForm = {
  786. refundNo: "",
  787. zfnotes: ""
  788. };
  789. this.cancelForm.refundNo = row.refundNo;
  790. this.dialogFormCancelVisible = true;
  791. },
  792. cancelSubmit() {
  793. this.$confirm("确认作废/撤销, 是否继续?", "提示", {
  794. confirmButtonText: "确定",
  795. cancelButtonText: "取消",
  796. type: "warning"
  797. })
  798. .then(() => {
  799. this.btnLoading = true;
  800. cancel(this.cancelForm).then(
  801. res => {
  802. if (200 == res.code) {
  803. this.$message({
  804. type: "success",
  805. message: "作废成功!"
  806. });
  807. this.cancelForm = {
  808. refundNo: "",
  809. zfnotes: ""
  810. };
  811. this.btnLoading = false;
  812. this.dialogFormCancelVisible = false;
  813. this.getList();
  814. }
  815. },
  816. error => {
  817. this.btnLoading = false;
  818. }
  819. );
  820. })
  821. .catch(() => {
  822. this.$message({
  823. type: "info",
  824. message: "已取消操作"
  825. });
  826. });
  827. },
  828. refresh() {
  829. // 财务审核后关闭组件
  830. this.refundInfoVisible = false;
  831. this.getList();
  832. },
  833. handleRefund(currentRefundId, ordersId) {
  834. this.currentRefundId = currentRefundId;
  835. this.currentOrdersId = ordersId;
  836. this.orderRefundVisible = true;
  837. },
  838. backTable() {
  839. this.orderRefundVisible = false;
  840. this.getList();
  841. },
  842. sortMethod(column) {
  843. if (column.order === "ascending") {
  844. this.listQuery.sort = "asc";
  845. } else if (column.order === "descending") {
  846. this.listQuery.sort = "desc";
  847. } else {
  848. this.listQuery.sort = "";
  849. }
  850. this.getList();
  851. }
  852. }
  853. };
  854. </script>
  855. <style scoped lang="scss">
  856. .cell > span {
  857. white-space: nowrap !important;
  858. }
  859. //::v-deep .el-icon-d-caret:hover
  860. //{color: #ffc400 !important;}
  861. </style>