refundDetail.vue 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206
  1. <template>
  2. <div class="detail">
  3. <!-- 收退货仓库信息-->
  4. <el-card class="box-card" v-if="refundInfo.refundType == '3'">
  5. <el-select
  6. @change="handelChangeReturnWarehouse"
  7. v-model="selectedWarehouseCode"
  8. style="width: 60%"
  9. placeholder="The warehouse to receive return goods"
  10. :disabled="action != 'cus_check'"
  11. >
  12. <el-option
  13. v-for="warehouse in wareHouses"
  14. :key="warehouse.returnWarehouseCode"
  15. :label="warehouse.returnWarehouseName"
  16. :value="warehouse.returnWarehouseCode"
  17. >
  18. </el-option>
  19. </el-select>
  20. <el-divider></el-divider>
  21. <div>
  22. AddressInfo: {{ returnWarehouseAddress
  23. }}<i
  24. style="color:blue;"
  25. class="el-icon-document-copy"
  26. :title="$t('title.copy')"
  27. :copy-value="returnWarehouseAddress"
  28. v-on:click="copy"
  29. ></i>
  30. </div>
  31. </el-card>
  32. <el-card
  33. class="box-card"
  34. v-if="refundInfo.status == 0"
  35. v-loading="btnLoading"
  36. >
  37. <!-- TODO 暂时关闭SL -->
  38. <el-form
  39. v-if="
  40. refundInfo.refundType == '3' &&
  41. this.isShopifyLabel == true &&
  42. addressInfo.receiverCountryName == 'US'
  43. "
  44. label-width="120px"
  45. >
  46. <el-form-item label="ShippingLabel">
  47. <el-radio-group v-model="slUseAble">
  48. <el-radio label="0">{{ $t("view.notEnabled") }}</el-radio>
  49. <el-radio label="1">{{ $t("view.enabled") }}</el-radio>
  50. </el-radio-group>
  51. <el-tag
  52. type="danger"
  53. v-if="this.slUseAble === '1' && this.shippingLabelMessage"
  54. >{{ this.shippingLabelMessage }}</el-tag
  55. >
  56. </el-form-item>
  57. </el-form>
  58. <!-- 审核-->
  59. <el-input
  60. type="textarea"
  61. :placeholder="$t('place.customerServiceRemarks')"
  62. v-model="checkData.notes"
  63. maxlength="150"
  64. :disabled="action != 'cus_check'"
  65. show-word-limit
  66. ></el-input>
  67. <!-- <el-select
  68. :placeholder="$t('place.rejectionReason')"
  69. clearable
  70. style="width: 530px;margin-top:20px;"
  71. class="filter-item"
  72. :disabled="action != 'cus_check'"
  73. v-model="checkData.rejectReason"
  74. >
  75. <el-option
  76. v-for="item in refundReasons"
  77. :key="item.id"
  78. :label="item.reasonContentChinese"
  79. :value="item.id"
  80. >
  81. </el-option>
  82. </el-select> -->
  83. <div
  84. style="float:right;margin-top:20px;margin-bottom:20px;"
  85. :style="hideStyleBtn"
  86. v-if="action == 'cus_check'"
  87. >
  88. <el-button type="primary" size="mini" @click="handleKfCheck(1)">{{
  89. $t("view.approved")
  90. }}</el-button>
  91. <el-button type="primary" size="mini" @click="handleKfCheck(2)">{{
  92. $t("view.rejected")
  93. }}</el-button>
  94. </div>
  95. </el-card>
  96. <el-card
  97. class="box-card"
  98. v-if="refundInfo.status == 5"
  99. v-loading="btnLoading"
  100. >
  101. <!-- 审核-->
  102. <el-form
  103. v-if="action == 'f_check'"
  104. ref="cwForm"
  105. :model="refundInfo"
  106. label-width="80px"
  107. >
  108. <el-form-item :label="$t('label.refundMethod')">
  109. <el-radio-group v-model="refundInfo.refundMethod">
  110. <el-radio label="system">{{ $t("view.systemRefund") }}</el-radio>
  111. <el-radio label="manual">{{ $t("view.manualRefund") }}</el-radio>
  112. </el-radio-group>
  113. </el-form-item>
  114. <el-form-item
  115. v-if="refundInfo.refundMethod == 'manual'"
  116. :label="$t('label.accountType')"
  117. >
  118. <el-radio-group v-model="refundInfo.refundAccountType">
  119. <el-radio label="PayPal">PayPal</el-radio>
  120. <el-radio label="bankCard">银行卡</el-radio>
  121. <el-radio label="Gift Card">Gift Card</el-radio>
  122. </el-radio-group>
  123. </el-form-item>
  124. <el-form-item
  125. v-if="
  126. refundInfo.refundMethod == 'manual' &&
  127. refundInfo.refundAccountType == 'PayPal'
  128. "
  129. :label="$t('label.refundAccount')"
  130. >
  131. <el-input
  132. v-model="refundInfo.refundAccount"
  133. :placeholder="$t('place.pleaseEnterRefundAccount')"
  134. >
  135. </el-input>
  136. </el-form-item>
  137. <!-- <el-form-item
  138. v-if="refundInfo.refundMethod == 'system'"
  139. :label="$t('label.rejectionOfReturns')"
  140. >
  141. <el-radio-group v-model="refundInfo.rejectedGoods">
  142. <el-radio label="false">{{ $t("label.no") }}</el-radio>
  143. <el-radio label="true">{{ $t("label.yes") }}</el-radio>
  144. </el-radio-group>
  145. </el-form-item> -->
  146. <el-form-item
  147. v-if="
  148. refundInfo.refundMethod == 'system' &&
  149. refundInfo.rejectedGoods == 'true'
  150. "
  151. :label="$t('label.rejectionReason')"
  152. >
  153. <el-select
  154. :placeholder="$t('place.rejectionReason')"
  155. clearable
  156. style="width: 200px;"
  157. class="filter-item"
  158. :disabled="action != 'f_check'"
  159. v-model="refundInfo.rejectReason"
  160. >
  161. <el-option
  162. v-for="item in refundReasons"
  163. :key="item.id"
  164. :label="item.reasonContentChinese"
  165. :value="item.id"
  166. >
  167. </el-option>
  168. </el-select>
  169. </el-form-item>
  170. </el-form>
  171. <el-input
  172. v-if="action == 'f_check'"
  173. type="textarea"
  174. :placeholder="$t('place.financeAuditRemarks')"
  175. v-model="checkData.cwnotes"
  176. maxlength="150"
  177. :disabled="btndisableed"
  178. show-word-limit
  179. ></el-input>
  180. <div
  181. style="float:right;margin-top:20px;margin-bottom:20px;"
  182. :style="hideStyleBtn"
  183. v-if="action == 'f_check'"
  184. >
  185. <el-button
  186. type="success"
  187. size="mini"
  188. v-if="
  189. refundInfo.channelCode == 'SHOPIFY' &&
  190. refundInfo.refundMethod == 'system'
  191. "
  192. @click="handleCalculatesCheck"
  193. style="margin-right:20px;"
  194. >{{ $t("view.verification") }}</el-button
  195. >
  196. <el-button
  197. type="primary"
  198. size="mini"
  199. :disabled="
  200. refundInfo.channelCode == 'SHOPIFY' &&
  201. btndisabled &&
  202. refundInfo.refundMethod == 'system'
  203. "
  204. @click="handleCheck(6)"
  205. >{{ $t("view.approved") }}</el-button
  206. >
  207. <el-button type="primary" size="mini" @click="handleCheck(0)">{{
  208. $t("view.rejected")
  209. }}</el-button>
  210. </div>
  211. </el-card>
  212. <el-card class="box-card">
  213. <!-- 基本信息-->
  214. <el-descriptions
  215. :title="$t('title.basicInformation')"
  216. :colon="false"
  217. :column="6"
  218. border
  219. >
  220. <el-descriptions-item :label="$t('label.refundOrderNumber')"
  221. >{{ refundInfo.refundNo }}
  222. <i
  223. style="color:blue;"
  224. class="el-icon-document-copy"
  225. :title="$t('title.copy')"
  226. :copy-value="refundInfo.refundNo"
  227. v-on:click="copy"
  228. ></i
  229. ></el-descriptions-item>
  230. <el-descriptions-item :label="$t('label.totalRefundAmount')">{{
  231. refundInfo.refundAmount
  232. }}</el-descriptions-item>
  233. <el-descriptions-item :label="$t('label.SLFee')">
  234. {{ refundInfo.slFee || "0.00" }}
  235. </el-descriptions-item>
  236. <el-descriptions-item :label="$t('label.onlineShopOrder')"
  237. >{{ refundInfo.ormorder }}
  238. <i
  239. style="color:blue;"
  240. class="el-icon-document-copy"
  241. :title="$t('title.copy')"
  242. :copy-value="refundInfo.ormorder"
  243. v-on:click="copy"
  244. ></i
  245. ></el-descriptions-item>
  246. <!-- 添加shopify单号-->
  247. <el-descriptions-item label="实际退款金额">{{
  248. refundInfo.actualRefundAmount
  249. }}</el-descriptions-item>
  250. <el-descriptions-item :label="$t('label.shopifyNumber')"
  251. >{{ refundInfo.cutUser }}
  252. <i
  253. style="color:blue;"
  254. class="el-icon-document-copy"
  255. :title="$t('title.copy')"
  256. :copy-value="refundInfo.cutUser"
  257. v-on:click="copy"
  258. ></i
  259. ></el-descriptions-item>
  260. <el-descriptions-item :label="$t('label.afterSalesType')">{{
  261. refundInfo.refundType | refundTypeFilter(that)
  262. }}</el-descriptions-item>
  263. <!-- <el-descriptions-item label="退款原因(中文)">{{
  264. refundInfo.reasonContentChinese
  265. }}</el-descriptions-item>
  266. <el-descriptions-item label="退款原因(English)">{{
  267. refundInfo.reasonContentEnglish
  268. }}</el-descriptions-item>
  269. <el-descriptions-item
  270. v-if="refundInfo.otherReason"
  271. label="其他原因说明"
  272. >{{
  273. refundInfo.otherReason
  274. }}</el-descriptions-item> -->
  275. <el-descriptions-item
  276. :label="$t('label.receivingReturnWarehouse')"
  277. v-if="refundInfo.warehouseName"
  278. >
  279. {{ refundInfo.warehouseName }}
  280. </el-descriptions-item>
  281. <el-descriptions-item
  282. :label="$t('label.warehouseReceivingStatus')"
  283. v-if="refundInfo.warehouseName"
  284. >
  285. {{ refundInfo.warehouseReceivingStatus }}
  286. </el-descriptions-item>
  287. <el-descriptions-item
  288. :label="$t('label.returnLogisticsCompany')"
  289. v-if="refundInfo.shipmodeId"
  290. >{{ refundInfo.shipmodeId }}</el-descriptions-item
  291. >
  292. <el-descriptions-item
  293. :label="$t('label.returnExpressNumber')"
  294. v-if="refundInfo.shippingNo"
  295. >{{ refundInfo.shippingNo
  296. }}<i
  297. style="color:blue;"
  298. v-if="refundInfo.shippingNo"
  299. class="el-icon-document-copy"
  300. :title="$t('title.copy')"
  301. :copy-value="refundInfo.shippingNo"
  302. v-on:click="copy"
  303. ></i
  304. ></el-descriptions-item>
  305. <el-descriptions-item :label="$t('label.buyersNote')">{{
  306. refundInfo.buyNotes
  307. }}</el-descriptions-item>
  308. <el-descriptions-item :label="$t('label.customerReturnCountry')">{{
  309. addressInfo.receiverCountryName
  310. }}</el-descriptions-item>
  311. <el-descriptions-item :label="$t('label.refundMethod')">
  312. {{ refundInfo.refundMethod | refundMethodFilter(that) }}
  313. </el-descriptions-item>
  314. <el-descriptions-item :label="$t('label.accountType')">
  315. {{ refundInfo.refundAccountType | refundAccountTypeFilter(that) }}
  316. </el-descriptions-item>
  317. <el-descriptions-item :label="$t('label.refundAccount')">
  318. {{ refundInfo.refundAccount }}
  319. </el-descriptions-item>
  320. <el-descriptions-item :label="$t('label.isSelfPickupOrder')">
  321. <span v-if="refundInfo.isSelfPickupOrder === false">{{
  322. $t("no")
  323. }}</span>
  324. <span v-else>{{ $t("yes") }}</span>
  325. </el-descriptions-item>
  326. <!-- TODO 暂时关闭SL -->
  327. <el-descriptions-item :label="$t('label.openShippingLabel')">
  328. {{ refundInfo.slUseable | SlstatusFilter }}
  329. </el-descriptions-item>
  330. <el-descriptions-item :label="$t('label.useShippingLabel')">
  331. {{ refundInfo.slFlag | SlstatusFilter }}
  332. </el-descriptions-item>
  333. <el-descriptions-item :label="$t('label.shippingRefundAmount')">
  334. {{ refundInfo.refundPostageAmount }}
  335. </el-descriptions-item>
  336. <el-descriptions-item :label="$t('label.sumGiftCardRefundAmount')">
  337. {{ refundInfo.sumGiftCardRefundAmount }}
  338. </el-descriptions-item>
  339. <el-descriptions-item :label="$t('label.sumAiGiftCardRefundAmount')">
  340. {{ refundInfo.sumAiGiftCardRefundAmount }}
  341. </el-descriptions-item>
  342. <el-descriptions-item :label="$t('label.customerServiceNote')">{{
  343. refundInfo.notes
  344. }}</el-descriptions-item>
  345. </el-descriptions>
  346. </el-card>
  347. <!--
  348. <el-divider><i class="el-icon-magic-stick"></i></el-divider>
  349. -->
  350. <el-card class="box-card">
  351. <el-descriptions
  352. :title="$t('title.returnProducts') + '-' + (index + 1)"
  353. v-for="(item, index) in orderItemInfo"
  354. :key="index"
  355. :colon="false"
  356. :column="6"
  357. :style="titleColor(item)"
  358. border
  359. >
  360. <el-descriptions-item :label="$t('label.isNoHeadFlag')">
  361. <span v-if="item.isHeadFlag == 1">
  362. </span>
  363. <span v-if="item.isHeadFlag == 0">
  364. </span>
  365. </el-descriptions-item>
  366. <el-descriptions-item :label="$t('label.noHeadFlag')">
  367. <span v-if="item.isHeadFlag == 1">
  368. {{ item.ordersIdS }}
  369. </span>
  370. </el-descriptions-item>
  371. <el-descriptions-item :label="$t('label.uniqueCode')">{{
  372. item.uniqueCode
  373. }}</el-descriptions-item>
  374. <el-descriptions-item :label="$t('label.skuCode')"
  375. >{{ item.skuCode }}
  376. <i
  377. style="color:blue;"
  378. class="el-icon-document-copy"
  379. :title="$t('title.copy')"
  380. :copy-value="item.skuCode"
  381. v-on:click="copy"
  382. ></i
  383. ></el-descriptions-item>
  384. <el-descriptions-item :label="$t('label.shopifyNumber')"
  385. >{{ item.orderOnId }}
  386. <i
  387. style="color:blue;"
  388. class="el-icon-document-copy"
  389. :title="$t('title.copy')"
  390. :copy-value="item.orderOnId"
  391. v-on:click="copy"
  392. ></i
  393. ></el-descriptions-item>
  394. <el-descriptions-item :label="$t('label.orderStatus')"
  395. >{{ item.orderStatus | statusFilterStatus }}
  396. </el-descriptions-item>
  397. <el-descriptions-item :label="$t('label.orderItemStatus')"
  398. >{{ item.itemStatus | statusFilterStatus }}
  399. </el-descriptions-item>
  400. <el-descriptions-item :label="$t('label.exchangeGoods')">
  401. {{ item.exchangeFlag === "1" ? $t("label.yes") : $t("label.no") }}
  402. </el-descriptions-item>
  403. <el-descriptions-item :label="$t('label.originalSKU')">
  404. {{ item.oldSku }}
  405. </el-descriptions-item>
  406. <el-descriptions-item :label="$t('label.productName')">{{
  407. item.productName
  408. }}</el-descriptions-item>
  409. <el-descriptions-item
  410. :label="$t('label.quantity')"
  411. labelStyle="color: red;"
  412. contentStyle="color: red;"
  413. v-if="item.quantity > 1"
  414. >{{ item.quantity }}
  415. </el-descriptions-item>
  416. <el-descriptions-item
  417. :label="$t('label.quantity')"
  418. v-if="item.quantity <= 1"
  419. >{{ item.quantity }}
  420. </el-descriptions-item>
  421. <el-descriptions-item :label="$t('label.refundSubtotal')">{{
  422. item.refundAmount
  423. }}</el-descriptions-item>
  424. <el-descriptions-item :label="$t('label.salePrice')">{{
  425. item.price
  426. }}</el-descriptions-item>
  427. <el-descriptions-item :label="$t('label.paymentAmount')"
  428. >{{ item.totalFee }}
  429. </el-descriptions-item>
  430. <el-descriptions-item :label="$t('label.discountAmount')">{{
  431. item.discountFee
  432. }}</el-descriptions-item>
  433. <el-descriptions-item :label="$t('label.sellerDiscount')">{{
  434. item.sellerDiscount
  435. }}</el-descriptions-item>
  436. <el-descriptions-item :label="$t('label.platformDiscount')">{{
  437. item.platformDiscount
  438. }}</el-descriptions-item>
  439. <el-descriptions-item :label="$t('label.loanAmount')">{{
  440. item.loanAmount
  441. }}</el-descriptions-item>
  442. <el-descriptions-item :label="$t('label.status')"
  443. >{{ item.returnStatus | statusFiltr2 }}
  444. </el-descriptions-item>
  445. <el-descriptions-item :label="$t('inboundStatus')">
  446. {{ item.inboundStatus | inboundStatusFilter }}
  447. </el-descriptions-item>
  448. <el-descriptions-item :label="$t('label.receivedGoodsType')">{{
  449. item.receiveType | receiveTypeFilter
  450. }}</el-descriptions-item>
  451. <el-descriptions-item :label="$t('label.currencyInformation')">{{
  452. refundInfo.currency
  453. }}</el-descriptions-item>
  454. <el-descriptions-item :label="$t('label.refundReason')">{{
  455. item.refundReason | reasonFilter(item.refundReasonList)
  456. }}</el-descriptions-item>
  457. <el-descriptions-item :label="$t('label.otherReasons')">{{
  458. item.otherReason
  459. }}</el-descriptions-item>
  460. </el-descriptions>
  461. </el-card>
  462. <!--
  463. <el-divider><i class="el-icon-magic-stick"></i></el-divider>
  464. -->
  465. <!-- 多件多折信息 -->
  466. <el-card class="box-card" v-has="'priceRule:list'">
  467. <el-descriptions
  468. :column="6"
  469. :title="$t('discountInfo')"
  470. :colon="false"
  471. border
  472. >
  473. <el-descriptions-item
  474. :label="$t('multipleDiscountInfo.OriginalDiscount')"
  475. >2件9折</el-descriptions-item
  476. >
  477. <el-descriptions-item
  478. :label="$t('multipleDiscountInfo.OriginalMoneny')"
  479. >{{ addressInfo.receiverState }}</el-descriptions-item
  480. >
  481. <el-descriptions-item
  482. :label="$t('multipleDiscountInfo.afterReturnDiscount')"
  483. >{{ addressInfo.receiverCity }}</el-descriptions-item
  484. >
  485. <el-descriptions-item
  486. :label="$t('multipleDiscountInfo.afterReturnMoney')"
  487. >{{ addressInfo.receiverCity }}</el-descriptions-item
  488. >
  489. <el-descriptions-item :label="$t('multipleDiscountInfo.returnMoney')">{{
  490. addressInfo.receiverCity
  491. }}</el-descriptions-item>
  492. <el-descriptions-item
  493. :label="$t('multipleDiscountInfo.needPayMoney')"
  494. >{{ addressInfo.receiverCity }}</el-descriptions-item
  495. >
  496. </el-descriptions>
  497. </el-card>
  498. <el-card class="box-card">
  499. <el-descriptions
  500. :title="$t('title.buyerInformation')"
  501. :colon="false"
  502. border
  503. >
  504. <el-descriptions-item :label="$t('country')">{{
  505. addressInfo.receiverCountryName
  506. }}</el-descriptions-item>
  507. <el-descriptions-item :label="$t('state')">{{
  508. addressInfo.receiverState
  509. }}</el-descriptions-item>
  510. <el-descriptions-item :label="$t('city')">{{
  511. addressInfo.receiverCity
  512. }}</el-descriptions-item>
  513. <el-descriptions-item :label="$t('suburb')">{{
  514. addressInfo.receiverDistrict
  515. }}</el-descriptions-item>
  516. <el-descriptions-item :label="$t('street')">{{
  517. addressInfo.receiverStreet
  518. }}</el-descriptions-item>
  519. <el-descriptions-item :label="$t('address')">{{
  520. addressInfo.receiverAddress
  521. }}</el-descriptions-item>
  522. <el-descriptions-item :label="$t('dooeNo')">{{
  523. addressInfo.receiverAddress2
  524. }}</el-descriptions-item>
  525. <el-descriptions-item :label="$t('recipient')">{{
  526. addressInfo.receiverName
  527. }}</el-descriptions-item>
  528. <el-descriptions-item :label="$t('telephone')"
  529. >{{ addressInfo.receiverPhone
  530. }}<i
  531. style="color:blue;"
  532. v-if="addressInfo.receiverPhone"
  533. class="el-icon-document-copy"
  534. :title="$t('title.copy')"
  535. :copy-value="addressInfo.receiverPhone"
  536. v-on:click="copy"
  537. ></i
  538. ></el-descriptions-item>
  539. <el-descriptions-item :label="$t('moPhone')"
  540. >{{ addressInfo.receiverMobile
  541. }}<i
  542. style="color:blue;"
  543. v-if="addressInfo.receiverMobile"
  544. class="el-icon-document-copy"
  545. :title="$t('title.copy')"
  546. :copy-value="addressInfo.receiverMobile"
  547. v-on:click="copy"
  548. ></i
  549. ></el-descriptions-item>
  550. <el-descriptions-item :label="$t('post')"
  551. >{{ addressInfo.email
  552. }}<i
  553. style="color:blue;"
  554. v-if="addressInfo.email"
  555. class="el-icon-document-copy"
  556. :title="$t('title.copy')"
  557. :copy-value="addressInfo.email"
  558. v-on:click="copy"
  559. ></i
  560. ></el-descriptions-item>
  561. <el-descriptions-item :label="$t('refundImg')">
  562. <el-image
  563. style="width: 40px; height: 40px"
  564. :src="refundInfo.annexPath"
  565. :preview-src-list="[refundInfo.annexPath]"
  566. >
  567. <div slot="error" class="image-slot">
  568. <i class="el-icon-picture-outline"></i>
  569. </div>
  570. </el-image>
  571. </el-descriptions-item>
  572. </el-descriptions>
  573. </el-card>
  574. <!--
  575. <el-divider><i class="el-icon-magic-stick"></i></el-divider>
  576. -->
  577. <el-card class="box-card">
  578. <el-descriptions :title="$t('title.operationLog')"> </el-descriptions>
  579. <el-timeline>
  580. <el-timeline-item
  581. type="primary"
  582. v-for="(log, index) in logs"
  583. :key="index"
  584. :timestamp="log.timeplaced"
  585. >
  586. {{ log.userName }} : {{ log.statusNotes }}
  587. </el-timeline-item>
  588. </el-timeline>
  589. </el-card>
  590. </div>
  591. </template>
  592. <script>
  593. import { handleClipboard } from "@/api/oms/copy";
  594. import {
  595. getRefundInfo,
  596. checkRefundCalculates,
  597. checkCw,
  598. checkKf,
  599. queryShippingAmount
  600. } from "@/api/oms/refund/refund";
  601. import { fetchList as reasonList } from "@/api/oms/refund/refundReason";
  602. import global from "@/views/oms/global";
  603. import { queryByOrdersId, queryByOrmorder } from "@/api/oms/order/address";
  604. import { returnWarehouseList } from "@/api/oms/inventory/warehouse";
  605. import { statusKeyValue } from "@/api/oms/order/order";
  606. import i18n from "@/lang";
  607. import { red } from "stylus/lib/functions";
  608. const refundMethodOptions = [
  609. { key: "system", display_name: "view.systemRefund" },
  610. { key: "manual", display_name: "view.manualRefund" }
  611. ];
  612. const refundMethodKeyValue = refundMethodOptions.reduce((acc, cur) => {
  613. acc[cur.key] = cur.display_name;
  614. return acc;
  615. }, {});
  616. const refundAccountTypeOptions = [
  617. { key: "PayPal", display_name: "PayPal" },
  618. { key: "bankCard", display_name: "view.bankCard" },
  619. { key: "other", display_name: "view.other" }
  620. ];
  621. const refundAccountTypeKeyValue = refundAccountTypeOptions.reduce(
  622. (acc, cur) => {
  623. acc[cur.key] = cur.display_name;
  624. return acc;
  625. },
  626. {}
  627. );
  628. export default {
  629. name: "refundInfoDialog",
  630. props: ["refundId", "action"],
  631. components: {},
  632. data() {
  633. return {
  634. that: this,
  635. active: 1,
  636. isShopifyLabel: false,
  637. activeName: "orderItemList",
  638. afterSaleStatusSuccess: global.afterSaleStatusSuccess,
  639. discountInfo: [],
  640. refundInfo: {},
  641. orderItemInfo: {},
  642. addressInfo: {},
  643. logs: [],
  644. checkData: {
  645. refundMethod: "system",
  646. rejectReason: "",
  647. notes: ""
  648. },
  649. btndisabled: true,
  650. btnLoading: false,
  651. successbtndisabled: false,
  652. hideStyleBtn: "",
  653. btndisableed: false,
  654. wareHouses: [], //收退货仓库列表
  655. selectedWarehouseCode: "",
  656. returnWarehouseAddress: "", //收退货的地址
  657. returnWcodeAndAddress: {},
  658. refundPriority: "",
  659. refundReasons: [],
  660. slUseAble: "0",
  661. shippingLabelMessage: "",
  662. showSlChooseLabel: 0 //是否展示选择使用sl标签 0 否 1 是
  663. };
  664. },
  665. filters: {
  666. refundAccountTypeFilter(key, that) {
  667. return that.$t(refundAccountTypeKeyValue[key]);
  668. },
  669. refundMethodFilter(key, that) {
  670. return that.$t(refundMethodKeyValue[key]);
  671. },
  672. statusFilterStatus(key) {
  673. return i18n.t(statusKeyValue[key]);
  674. },
  675. statusFilter(key) {
  676. var value = "";
  677. global.afterSaleStatus.forEach(status => {
  678. if (status.value == key) {
  679. value = status.label;
  680. }
  681. });
  682. return value;
  683. },
  684. refundTypeFilter(key, that) {
  685. var value = "";
  686. global.afterSaleType.forEach(refundType => {
  687. if (refundType.value == key) {
  688. value = that.$t(refundType.label);
  689. }
  690. });
  691. return value;
  692. },
  693. statusFiltr2(key) {
  694. var value = "";
  695. if (key != null) {
  696. var keys = key.split(",");
  697. global.returnDeatilStatus.forEach(status => {
  698. for (var i = 0; i < keys.length; i++) {
  699. if (status.value == keys[i]) {
  700. value += status.label + ",";
  701. }
  702. }
  703. });
  704. }
  705. return value;
  706. },
  707. inboundStatusFilter(key) {
  708. var value = "";
  709. if (key != null) {
  710. var keys = key.split(",");
  711. global.inboundStatus.forEach(type => {
  712. for (var i = 0; i < keys.length; i++) {
  713. if (type.value == keys[i]) {
  714. value += type.label + ",";
  715. }
  716. }
  717. });
  718. }
  719. return value;
  720. },
  721. reasonFilter(key, refundReasonList) {
  722. var value = "";
  723. refundReasonList.forEach(type => {
  724. if (type.id == key) {
  725. value = type.reasonContentChinese;
  726. }
  727. });
  728. return value;
  729. },
  730. receiveTypeFilter(key) {
  731. var value = "";
  732. if (key != null) {
  733. var keys = key.split(",");
  734. global.receiveType.forEach(type => {
  735. for (var i = 0; i < keys.length; i++) {
  736. if (type.value == keys[i]) {
  737. value += type.label + ",";
  738. }
  739. }
  740. });
  741. }
  742. return value;
  743. },
  744. SlstatusFilter(key) {
  745. if (key == "1") {
  746. return "YES";
  747. } else if (key == "0") {
  748. return "NO";
  749. }
  750. }
  751. },
  752. created() {
  753. //获取退货详情信息
  754. this.initialization();
  755. //获取仓库列表
  756. // this.getReturnWarehouseList();
  757. },
  758. methods: {
  759. getRefundReasonList(type) {
  760. reasonList({ reasonType: type, limit: 1000 }).then(res => {
  761. if (200 == res.code) {
  762. this.refundReasons = res.data.list;
  763. }
  764. });
  765. },
  766. //选择物流公司编码,带出地址
  767. handelChangeReturnWarehouse() {
  768. if (
  769. this.selectedWarehouseCode !== "PSJ-H0000024" &&
  770. this.selectedWarehouseCode !== "PSJ-H0000019" &&
  771. this.selectedWarehouseCode !== "PSJ-H0000011" &&
  772. this.selectedWarehouseCode !== "PSJ-G001001" &&
  773. this.selectedWarehouseCode !== "PSJ-G001003" &&
  774. this.selectedWarehouseCode !== "PSJ-G001004"
  775. ) {
  776. this.slUseAble = "0";
  777. this.showSlChooseLabel = 0; //展示sl的选择标签
  778. // 触发预估运费查询,目前只有一个仓库使用,可暂时不添加查询逻辑,后续若多仓库支持,则需要增加实时查询预估运费逻辑
  779. } else {
  780. this.slUseAble = "1";
  781. this.showSlChooseLabel = 1; //展示sl的选择标签
  782. }
  783. //TODO 暂时关闭SL
  784. this.slUseAble = "0";
  785. this.showSlChooseLabel = 1; //展示sl的选择标签
  786. this.returnWarehouseAddress = this.returnWcodeAndAddress[
  787. this.selectedWarehouseCode
  788. ];
  789. this.checkPSJWarehouse(
  790. this.returnWarehouseAddress,
  791. this.selectedWarehouseCode
  792. );
  793. },
  794. //获取退货仓库列表
  795. getReturnWarehouseList() {
  796. this.wareHouses = [];
  797. this.returnWcodeAndAddress = {};
  798. returnWarehouseList({ limit: 1000 }).then(res => {
  799. if (200 == res.code) {
  800. if (res.data.list != null && res.data.list.length > 0) {
  801. res.data.list.forEach(item1 => {
  802. var addressInfo =
  803. item1.contacts +
  804. " " +
  805. item1.countryCode +
  806. " " +
  807. item1.province +
  808. " " +
  809. item1.city +
  810. " " +
  811. item1.district +
  812. " " +
  813. item1.street +
  814. " " +
  815. item1.address1 +
  816. " " +
  817. item1.address2 +
  818. " " +
  819. item1.phoneNo +
  820. " " +
  821. item1.mobileNo +
  822. " " +
  823. item1.email;
  824. this.wareHouses.push(item1);
  825. this.returnWcodeAndAddress[
  826. item1.returnWarehouseCode
  827. ] = addressInfo;
  828. if (item1.returnWarehouseCode == this.refundInfo.warehouseCode) {
  829. this.selectedWarehouseCode = this.refundInfo.warehouseCode;
  830. this.returnWarehouseAddress = this.returnWcodeAndAddress[
  831. this.selectedWarehouseCode
  832. ];
  833. }
  834. });
  835. }
  836. //展示sl的选择标签
  837. this.checkPSJWarehouse(
  838. this.returnWarehouseAddress,
  839. this.selectedWarehouseCode
  840. );
  841. // TODO 暂时关闭SL
  842. // if (this.selectedWarehouseCode == "PSJ-H0000024") {
  843. // this.slUseAble = "1";
  844. // this.showSlChooseLabel = 1; //展示sl的选择标签
  845. // }
  846. }
  847. this.listLoading = false;
  848. });
  849. },
  850. //获取售后详情
  851. initialization() {
  852. getRefundInfo(this.refundId)
  853. .then(res => {
  854. if (200 == res.code) {
  855. this.refundInfo = res.data;
  856. this.orderItemInfo = res.data.items;
  857. this.logs = res.data.logItems;
  858. //获取收退货仓库列表
  859. this.getShippingLabelAmount(this.refundInfo, "");
  860. // this.getRefundReasonList(res.data.refundType);
  861. return Promise.resolve(res.data.ordersNo);
  862. }
  863. return Promise.reject();
  864. })
  865. .then(ordersId => {
  866. return queryByOrdersId(ordersId);
  867. })
  868. .then(res => {
  869. if (200 == res.code) {
  870. this.addressInfo = res.data;
  871. this.getReturnWarehouseList();
  872. if (this.addressInfo.receiverCountryCode == "GB") {
  873. this.refundInfo.warehouseCode = "PSJ-H0000044";
  874. this.selectedWarehouseCode = "PSJ-H0000044";
  875. }
  876. if (this.addressInfo.receiverCountryCode == "JP") {
  877. this.refundInfo.warehouseCode = "JPNW01";
  878. this.selectedWarehouseCode = "JPNW01";
  879. }
  880. if (this.addressInfo.receiverCountryCode == "TW") {
  881. this.refundInfo.warehouseCode = "G00886001";
  882. this.selectedWarehouseCode = "G00886001";
  883. }
  884. if (this.addressInfo.receiverCountryCode == "HK") {
  885. this.refundInfo.warehouseCode = "HKW002";
  886. this.selectedWarehouseCode = "HKW002";
  887. }
  888. var esCountries = ['ES','AT','BE','BG','HR',
  889. 'CZ','DK','EE','FI','FR',
  890. 'DE','GR','HU','IE','IT',
  891. 'LV','LT','LU','NL','PL',
  892. 'PT','RO','SK','SI','SE'];
  893. if (esCountries.includes(this.addressInfo.receiverCountryCode)) {
  894. this.refundInfo.warehouseCode = 'ESPW03';
  895. this.selectedWarehouseCode = 'ESPW03';
  896. }
  897. }
  898. });
  899. },
  900. //复制
  901. copy(event) {
  902. var text = event.target.attributes["copy-value"].value;
  903. handleClipboard(text, event);
  904. },
  905. handleCheck(status) {
  906. this.btnLoading = true;
  907. this.btndisabled = true;
  908. let msg = "";
  909. if (status === 6) {
  910. msg = "确认审核通过?";
  911. } else {
  912. msg = "确认审核驳回?";
  913. }
  914. this.$confirm(msg, "提示", {
  915. confirmButtonText: "确定",
  916. cancelButtonText: "取消",
  917. type: "warning"
  918. })
  919. .then(() => {
  920. var params = {
  921. id: this.refundInfo.id,
  922. status: status,
  923. cwnotes: this.checkData.cwnotes,
  924. refundMethod: this.refundInfo.refundMethod,
  925. refundAccountType: this.refundInfo.refundAccountType,
  926. refundAccount: this.refundInfo.refundAccount,
  927. refundPriority: this.refundPriority
  928. };
  929. checkCw(params).then(
  930. res => {
  931. if (200 == res.code) {
  932. this.$message({
  933. message: "操作成功",
  934. type: "success"
  935. });
  936. this.hideStyleBtn = "display:none";
  937. this.btndisabled = false;
  938. this.btndisableed = true;
  939. this.btnLoading = false;
  940. this.$emit("refresh");
  941. }
  942. },
  943. error => {
  944. this.btnLoading = false;
  945. this.btndisabled = true;
  946. }
  947. );
  948. })
  949. .catch(() => {
  950. this.btnLoading = false;
  951. this.btndisabled = true;
  952. this.$message({
  953. type: "info",
  954. message: "已取消操作"
  955. });
  956. });
  957. },
  958. // 审核是否是派速捷仓库 美国地址
  959. checkPSJWarehouse(house, code) {
  960. let shu = house.split(" ");
  961. if (
  962. this.addressInfo.receiverCountryCode == "US" &&
  963. (code == "PSJ-G001003" ||
  964. code == "PSJ-G001001" ||
  965. code == "PSJ-H0000024" ||
  966. code == "PSJ-H0000019" ||
  967. code == "PSJ-H0000011" ||
  968. code == "PSJ-G001004")
  969. ) {
  970. this.isShopifyLabel = true;
  971. this.refundInfo.warehouseCode = code;
  972. this.slUseAble = "1";
  973. this.getShippingLabelAmount(this.refundInfo);
  974. } else {
  975. this.isShopifyLabel = false;
  976. }
  977. },
  978. //客服审核
  979. handleKfCheck(status) {
  980. this.btnLoading = true;
  981. this.btndisabled = true;
  982. let msg = "";
  983. if (status === 1) {
  984. msg = "确认审核通过?";
  985. } else {
  986. msg = "确认审核驳回?";
  987. }
  988. // if (this.slUseAble == "1") {
  989. // if (
  990. // this.refundInfo.shippingNo &&
  991. // this.refundInfo.shippingNo != "/" &&
  992. // (this.refundInfo.shipmodeId && this.refundInfo.shipmodeId != "/")
  993. // ) {
  994. // this.$message.error("当前退货物流信息已维护,无法使用SL渠道");
  995. // this.btnLoading = false;
  996. // this.btndisabled = false;
  997. // return;
  998. // }
  999. // }
  1000. this.$confirm(msg, "提示", {
  1001. confirmButtonText: "确定",
  1002. cancelButtonText: "取消",
  1003. type: "warning"
  1004. })
  1005. .then(() => {
  1006. //如果是退货退款 客服审核且当前的仓库编码是空的提示让客服选择一个收退货仓库编码
  1007. if (
  1008. this.refundInfo.refundType == "3" &&
  1009. !this.selectedWarehouseCode
  1010. ) {
  1011. this.$message({
  1012. type: "info",
  1013. message: "Please choose a warehouse to receive return goods"
  1014. });
  1015. return false;
  1016. }
  1017. var params = {
  1018. id: this.refundInfo.id,
  1019. status: status,
  1020. rejectReason: this.checkData.rejectReason,
  1021. notes: this.checkData.notes,
  1022. warehouseCode: this.selectedWarehouseCode, //选择的收退货仓库编码
  1023. // slUseable: this.slUseAble //是否使用SL
  1024. slUseable: this.slUseAble //TODO 暂时关闭SL
  1025. };
  1026. checkKf(params).then(
  1027. res => {
  1028. if (200 == res.code) {
  1029. this.$message({
  1030. message: "操作成功",
  1031. type: "success"
  1032. });
  1033. this.hideStyleBtn = "display:none";
  1034. this.btndisabled = false;
  1035. this.btndisableed = true;
  1036. this.btnLoading = false;
  1037. this.$emit("refresh");
  1038. }
  1039. },
  1040. error => {
  1041. this.btnLoading = false;
  1042. this.btndisabled = true;
  1043. }
  1044. );
  1045. })
  1046. .catch(() => {
  1047. this.btnLoading = false;
  1048. this.btndisabled = true;
  1049. this.$message({
  1050. type: "info",
  1051. message: "已取消操作"
  1052. });
  1053. });
  1054. },
  1055. handleCalculatesCheck() {
  1056. this.btnLoading = true;
  1057. var params = {
  1058. id: this.refundInfo.id
  1059. };
  1060. checkRefundCalculates(params)
  1061. .then(
  1062. res => {
  1063. if (200 === res.code) {
  1064. if (res.msg === "exist") {
  1065. this.refundPriority = "gift";
  1066. this.$confirm(
  1067. "当前订单存在礼品卡支付,执行退款将优先退还礼品卡金额",
  1068. "温馨提示",
  1069. {
  1070. confirmButtonText: "确认",
  1071. cancelButtonText: "关闭",
  1072. showCancelButton: false,
  1073. cancelButtonClass: "btnCancel",
  1074. type: "warning",
  1075. showClose: false
  1076. }
  1077. );
  1078. } else if (res.msg === "none") {
  1079. this.refundPriority = "";
  1080. this.$confirm(
  1081. "当前售后没有可退款的支付流水,请您选择手工退款方式",
  1082. "温馨提示",
  1083. {
  1084. confirmButtonText: "确认",
  1085. cancelButtonText: "关闭",
  1086. showCancelButton: false,
  1087. cancelButtonClass: "btnCancel",
  1088. type: "warning",
  1089. showClose: false
  1090. }
  1091. );
  1092. } else {
  1093. this.refundPriority = "";
  1094. }
  1095. this.$message({
  1096. message: "验证通过",
  1097. type: "success"
  1098. });
  1099. this.btnLoading = false;
  1100. this.btndisabled = false;
  1101. }
  1102. },
  1103. error => {
  1104. this.btnLoading = false;
  1105. this.btndisabled = true;
  1106. }
  1107. )
  1108. .catch(() => {
  1109. this.btnLoading = false;
  1110. this.btndisabled = true;
  1111. });
  1112. },
  1113. titleColor(item) {
  1114. if (item.quantity > 1) {
  1115. return "color: red !important;";
  1116. }
  1117. },
  1118. getShippingLabelAmount(refundInfo) {
  1119. if (refundInfo.refundType == "3" && this.selectedWarehouseCode) {
  1120. queryShippingAmount(refundInfo).then(res => {
  1121. if (201 == res.errorKey) {
  1122. this.shippingLabelMessage = res.msg;
  1123. } else if (200 == res.code) {
  1124. this.shippingLabelMessage =
  1125. "当前退款金额为" +
  1126. refundInfo.refundAmount +
  1127. ",开启后退款金额为" +
  1128. res.shippingLabelAmount;
  1129. }
  1130. });
  1131. }
  1132. }
  1133. }
  1134. };
  1135. </script>
  1136. <style lang="scss">
  1137. .detail {
  1138. .el-descriptions__title {
  1139. color: #606266;
  1140. font-size: 16px !important;
  1141. line-height: 16px;
  1142. position: relative;
  1143. padding-left: 8px !important;
  1144. &:before {
  1145. position: absolute;
  1146. left: 0px;
  1147. top: 0px;
  1148. content: "";
  1149. display: inline-block;
  1150. width: 3px;
  1151. height: 13px;
  1152. background: #ae8877;
  1153. border-radius: 0px 0px 0px 0px;
  1154. }
  1155. }
  1156. .box-card {
  1157. box-shadow: none;
  1158. border: none;
  1159. }
  1160. .el-descriptions {
  1161. margin-bottom: 40px;
  1162. &:last-child {
  1163. margin-bottom: 0px;
  1164. }
  1165. }
  1166. .el-descriptions__body {
  1167. width: 100%;
  1168. overflow: auto;
  1169. }
  1170. .el-descriptions__table {
  1171. table-layout: fixed;
  1172. }
  1173. }
  1174. </style>