orderInfoDialog.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575
  1. <template>
  2. <div v-loading.fullscreen.lock="detailLoading">
  3. <!-- <div class="head"></div> -->
  4. <div class="main">
  5. <div class="box" style="margin-top: 15px;">
  6. <div class="item_title">
  7. <span>{{ $t("baseMessage") }}</span>
  8. </div>
  9. <div class="ptitle baseinfotab">
  10. <baseInfoTab :orderInfo="orderInfo"></baseInfoTab>
  11. </div>
  12. </div>
  13. <div class="box" style="margin-top: 15px;">
  14. <el-collapse
  15. class="collapseContainer"
  16. v-model="collapse.promotionActive"
  17. accordion
  18. >
  19. <el-collapse-item
  20. :title="$t('multiBuyDiscount.promotionMessage')"
  21. name="2"
  22. >
  23. <div class="ptitle">
  24. <promotionInfoTab :orderInfo="orderInfo"></promotionInfoTab>
  25. </div>
  26. </el-collapse-item>
  27. </el-collapse>
  28. <!-- <div class="item_title">
  29. <span>{{ $t("multiBuyDiscount.promotionMessage") }}</span>
  30. </div>
  31. <div class="ptitle">
  32. <promotionInfoTab :orderInfo="orderInfo"></promotionInfoTab>
  33. </div> -->
  34. </div>
  35. <div class="box" style="margin-top: 15px;">
  36. <el-collapse
  37. class="collapseContainer"
  38. v-model="collapse.receivingInfoActive"
  39. accordion
  40. >
  41. <el-collapse-item :title="$t('receInfor')" name="2">
  42. <div class="ptitle">
  43. <receivingInfoTab
  44. :addressInfo="addressInfo"
  45. :orderInfo="orderInfo"
  46. ></receivingInfoTab>
  47. </div>
  48. </el-collapse-item>
  49. </el-collapse>
  50. <!-- <div class="item_title">
  51. <span>{{ $t("receInfor") }}</span>
  52. </div>
  53. <div class="ptitle">
  54. <receivingInfoTab
  55. :addressInfo="addressInfo"
  56. :orderInfo="orderInfo"
  57. ></receivingInfoTab>
  58. </div> -->
  59. </div>
  60. <div
  61. class="box"
  62. style="margin-top: 15px;"
  63. v-if="this.pickUpInfo != null && this.pickUpInfo.orderType == 'pickUp'"
  64. >
  65. <el-collapse
  66. class="collapseContainer"
  67. v-model="collapse.pickUpInfoActive"
  68. accordion
  69. >
  70. <el-collapse-item :title="$t('pickUpInfor')" name="2">
  71. <div class="ptitle">
  72. <pickUpInfoDiaTab :pickUpInfo="pickUpInfo"></pickUpInfoDiaTab>
  73. </div>
  74. </el-collapse-item>
  75. </el-collapse>
  76. <!-- <div class="item_title">
  77. <span>{{ $t("pickUpInfor") }}</span>
  78. </div>
  79. <div class="ptitle">
  80. <pickUpInfoDiaTab :pickUpInfo="pickUpInfo"></pickUpInfoDiaTab>
  81. </div> -->
  82. </div>
  83. <div
  84. class="box"
  85. style="margin-top: 15px;padding-bottom: 10px;"
  86. v-if="invoiceInfo != null"
  87. >
  88. <el-collapse
  89. class="collapseContainer"
  90. v-model="collapse.invoiceInfoActive"
  91. accordion
  92. >
  93. <el-collapse-item :title="$t('view.invoiceDetails')" name="2">
  94. <div class="ptitle">
  95. <invoiceInfoTab :invoiceInfo="invoiceInfo"></invoiceInfoTab>
  96. </div>
  97. </el-collapse-item>
  98. </el-collapse>
  99. <!-- <div class="item_title">
  100. <span>{{ $t("view.invoiceDetails") }}</span>
  101. </div>
  102. <div class="ptitle">
  103. <invoiceInfoTab :invoiceInfo="invoiceInfo"></invoiceInfoTab>
  104. </div> -->
  105. </div>
  106. <div class="box" style="margin-top: 15px;" v-if="this.logData != ''">
  107. <el-collapse
  108. class="collapseContainer"
  109. v-model="collapse.operationLogActive"
  110. accordion
  111. >
  112. <el-collapse-item :title="$t('title.operationLog')" name="2">
  113. <div class="ptitle">
  114. <operationLog :logData="this.logData"></operationLog>
  115. </div>
  116. </el-collapse-item>
  117. </el-collapse>
  118. </div>
  119. <div
  120. class="box"
  121. style="margin-top: 15px;"
  122. v-if="this.orderGiftCards != null"
  123. >
  124. <el-collapse
  125. class="collapseContainer"
  126. v-model="collapse.orderGiftCardsActive"
  127. accordion
  128. >
  129. <el-collapse-item :title="$t('orderPayType')" name="2">
  130. <div class="ptitle">
  131. <orderGiftCardsTab
  132. :orderGiftCards="orderGiftCards"
  133. ></orderGiftCardsTab>
  134. </div>
  135. </el-collapse-item>
  136. </el-collapse>
  137. <!-- <div class="item_title">
  138. <span>{{ $t("orderPayType") }}</span>
  139. </div>
  140. <div class="ptitle">
  141. <orderGiftCardsTab
  142. :orderGiftCards="orderGiftCards"
  143. ></orderGiftCardsTab>
  144. </div> -->
  145. </div>
  146. <!-- 多件多折信息 -->
  147. <div class="box" style="margin-top: 15px;" v-has="'priceRule:list'">
  148. <el-collapse
  149. class="collapseContainer"
  150. v-model="collapse.orderGiftCardsActive"
  151. accordion
  152. >
  153. <el-collapse-item :title="$t('discountInfo')" name="2">
  154. <div class="ptitle">
  155. <discountInfoTab :datas="orderGiftCards"></discountInfoTab>
  156. </div>
  157. </el-collapse-item>
  158. </el-collapse>
  159. <!-- <div class="item_title">
  160. <span>{{ $t("orderPayType") }}</span>
  161. </div>
  162. <div class="ptitle">
  163. <orderGiftCardsTab
  164. :orderGiftCards="orderGiftCards"
  165. ></orderGiftCardsTab>
  166. </div> -->
  167. </div>
  168. <div class="box" style="margin-top: 15px;">
  169. <el-collapse
  170. class="collapseContainer detailTab"
  171. v-model="collapse.orderItemListActive"
  172. accordion
  173. >
  174. <el-collapse-item :title="$t('orderDetails')" name="2">
  175. <div class="ptitle orderitemlist">
  176. <orderItemListTab
  177. :orderDeatils="orderDeatils"
  178. :orderInfo="orderInfo"
  179. :exchangeFlag="exchangeFlag"
  180. :getOrderInfo="getOrderInfo"
  181. ></orderItemListTab>
  182. </div>
  183. </el-collapse-item>
  184. </el-collapse>
  185. <!-- <div class="item_title">
  186. <span>{{ $t("orderDetails") }}</span>
  187. </div>
  188. <div class="ptitle">
  189. <orderItemListTab
  190. :orderDeatils="orderDeatils"
  191. :orderInfo="orderInfo"
  192. :exchangeFlag="exchangeFlag"
  193. :getOrderInfo="getOrderInfo"
  194. ></orderItemListTab>
  195. </div> -->
  196. </div>
  197. <!-- <div class="box" style="margin: 15px 0;padding-bottom: 10px;">
  198. <div class="item_title">
  199. <span>操作日志</span>
  200. </div>
  201. <div class="ptitle">
  202. <optLogTab :ordersId="ordersId"></optLogTab>
  203. </div>
  204. </div> -->
  205. </div>
  206. </div>
  207. </template>
  208. <script>
  209. import {
  210. getById,
  211. getLogData,
  212. queryOrderGiftCard,
  213. queryOrderDetails
  214. } from "@/api/oms/order/order";
  215. import { queryByOrdersId as getAddress } from "@/api/oms/order/address";
  216. import { getById as getInvoice } from "@/api/oms/order/invoice";
  217. import baseInfoTab from "./baseInfoTab";
  218. import promotionInfoTab from "./promotionInfoTab";
  219. import invoiceInfoTab from "./invoiceInfoTab";
  220. import optLogTab from "./optLogTab";
  221. import orderItemListTab from "./orderItemListTab";
  222. import orderGiftCardsTab from "./orderGiftCardsTab";
  223. import receivingInfoTab from "./receivingInfoTab";
  224. import discountInfoTab from "./discountInfoTab";
  225. import operationLog from "@/views/oms/order/components/operationLog.vue";
  226. import PickUpInfoDiaTab from "@/views/oms/order/components/pickUpInfoDiaTab.vue";
  227. export default {
  228. name: "orderInfoDialog",
  229. props: ["ordersId", "exchangeFlag"],
  230. components: {
  231. PickUpInfoDiaTab,
  232. operationLog,
  233. baseInfoTab,
  234. invoiceInfoTab,
  235. optLogTab,
  236. orderItemListTab,
  237. orderGiftCardsTab,
  238. receivingInfoTab,
  239. promotionInfoTab,
  240. discountInfoTab
  241. },
  242. data() {
  243. return {
  244. activeName: "orderItemList",
  245. logData: [],
  246. orderInfo: {},
  247. collapse: {
  248. promotionActive: "2",
  249. receivingInfoActive: "2",
  250. pickUpInfoActive: "2",
  251. operationLogActive: "1",
  252. orderGiftCardsActive: "2",
  253. orderItemListActive: "2",
  254. invoiceInfoActive: "2"
  255. },
  256. addressInfo: {},
  257. pickUpInfo: {},
  258. orderDeatils: [],
  259. orderGiftCards: [],
  260. invoiceInfo: null,
  261. detailLoading: false
  262. };
  263. },
  264. created() {
  265. this.getOrderInfo();
  266. },
  267. methods: {
  268. async getOrderInfo() {
  269. this.detailLoading = true;
  270. await getById(this.ordersId).then(res => {
  271. if (200 == res.code) {
  272. this.orderInfo = res.data;
  273. }
  274. });
  275. await getAddress(this.orderInfo.ordersId).then(res => {
  276. if (200 == res.code) {
  277. this.addressInfo = res.data;
  278. this.pickUpInfo = res.data.orderPickUpLogCustomEntity;
  279. }
  280. });
  281. getLogData(this.orderInfo.ordersId).then(res => {
  282. if (200 == res.code) {
  283. this.logData = res.data;
  284. }
  285. });
  286. queryOrderGiftCard(this.orderInfo.ormorder).then(res => {
  287. if (200 == res.code) {
  288. this.orderGiftCards = res.data;
  289. for (let i in this.orderGiftCards) {
  290. if (this.orderGiftCards[i].containRise == "01") {
  291. this.orderGiftCards[i].containRiseCheck = true;
  292. } else {
  293. this.orderGiftCards[i].containRiseCheck = false;
  294. }
  295. }
  296. }
  297. });
  298. queryOrderDetails(this.orderInfo.ordersId).then(res => {
  299. if (200 == res.code) {
  300. this.orderDeatils = res.data;
  301. for (let i in this.orderDeatils) {
  302. if (this.orderDeatils[i].exchangeFlag == "1") {
  303. this.orderDeatils[i].exchangeCheck = true;
  304. } else {
  305. this.orderDeatils[i].exchangeCheck = false;
  306. }
  307. if (this.orderDeatils[i].refundFlag == "0") {
  308. this.orderDeatils[i].returnCheck = false;
  309. } else {
  310. this.orderDeatils[i].returnCheck = true;
  311. }
  312. if (this.orderDeatils[i].isGift == "0") {
  313. this.orderDeatils[i].isGiftCheck = false;
  314. } else {
  315. this.orderDeatils[i].isGiftCheck = true;
  316. }
  317. }
  318. console.log(this.orderDeatils);
  319. this.detailLoading = false;
  320. }
  321. });
  322. // if(this.orderInfo.invoiceId && 0 != this.orderInfo.invoiceId){
  323. // await getInvoice({invoiceId:this.orderInfo.invoiceId}).then(res =>{
  324. // if(200 == res.code){
  325. // this.invoiceInfo = res.data;
  326. // }
  327. // })
  328. // }
  329. }
  330. }
  331. };
  332. </script>
  333. <style lang="scss" scoped>
  334. .head {
  335. padding: 0 20px;
  336. height: 25px;
  337. box-shadow: 0px 7px 6px -6px #f8eeee;
  338. display: flex;
  339. justify-content: space-between;
  340. span:nth-child(1) {
  341. font-size: 15px;
  342. line-height: 25px;
  343. color: #909399;
  344. font-weight: 600;
  345. }
  346. span:nth-child(2) {
  347. line-height: 25px;
  348. cursor: pointer;
  349. color: #ae8878;
  350. font-size: 13px;
  351. }
  352. }
  353. .big_box {
  354. min-width: 650px;
  355. border: 1px solid #e4e7ed;
  356. border-bottom: none;
  357. }
  358. .big_box div {
  359. border-bottom: 1px solid #e4e7ed;
  360. display: flex;
  361. }
  362. .big_box p {
  363. margin: 0;
  364. height: 30px;
  365. line-height: 30px;
  366. font-size: 13px;
  367. font-weight: bold;
  368. border-right: 1px solid #e4e7ed;
  369. padding: 0 5px;
  370. text-align: center;
  371. color: #909399;
  372. min-width: 100px;
  373. }
  374. .w {
  375. font-weight: 500 !important;
  376. color: #606266 !important;
  377. text-align: left !important;
  378. padding-left: 20px !important;
  379. }
  380. .main {
  381. margin-top: 15px;
  382. .box {
  383. text-align: center;
  384. position: relative;
  385. .box_item {
  386. padding: 0 20px;
  387. display: flex;
  388. .item_title {
  389. line-height: 40px;
  390. font-size: 18px;
  391. text-align: left;
  392. font-weight: 600;
  393. }
  394. .item_list {
  395. text-align: left;
  396. font-size: 14px;
  397. color: #606266;
  398. display: flex;
  399. p {
  400. margin: 10px 0;
  401. }
  402. div:nth-child(2) {
  403. margin-left: 30px;
  404. }
  405. }
  406. }
  407. .item_title {
  408. padding-left: 20px;
  409. line-height: 40px;
  410. font-size: 18px;
  411. text-align: left;
  412. font-weight: 600;
  413. }
  414. }
  415. }
  416. .ptitle {
  417. display: flex;
  418. justify-content: space-between;
  419. margin: 20px;
  420. color: #1f2d3d;
  421. text-align: left;
  422. font-weight: bold;
  423. }
  424. .pcode {
  425. color: #8f5842;
  426. font-weight: 500;
  427. }
  428. .demo-table-expand {
  429. font-size: 0;
  430. }
  431. .demo-table-expand label {
  432. width: 90px;
  433. color: #99a9bf;
  434. }
  435. .demo-table-expand .el-form-item {
  436. margin-right: 0;
  437. margin-bottom: 0;
  438. width: 50%;
  439. }
  440. /deep/ .el-collapse-item__header {
  441. padding-left: 20px;
  442. line-height: 40px;
  443. font-size: 18px;
  444. text-align: left;
  445. font-weight: 600;
  446. color: #606266;
  447. }
  448. </style>
  449. <style lang="scss">
  450. .orderDetailDialog {
  451. .el-dialog__header {
  452. padding: 36px 21px 0px 28px;
  453. .el-dialog__title {
  454. font-size: 18px;
  455. font-weight: bold;
  456. color: #ae8877;
  457. line-height: 22px;
  458. }
  459. }
  460. .el-dialog__headerbtn {
  461. top: 14px;
  462. right: 14px;
  463. font-weight: bold;
  464. .el-icon-close {
  465. font-weight: bold;
  466. }
  467. }
  468. .el-dialog__body {
  469. padding: 0px 8px 28px 8px;
  470. }
  471. .item_title,
  472. .el-collapse-item__header {
  473. color: #606266;
  474. font-size: 16px !important;
  475. line-height: 16px;
  476. position: relative;
  477. padding-left: 28px !important;
  478. &:before {
  479. position: absolute;
  480. left: 18px;
  481. top: 13px;
  482. content: "";
  483. display: inline-block;
  484. width: 3px;
  485. height: 13px;
  486. background: #ae8877;
  487. border-radius: 0px 0px 0px 0px;
  488. }
  489. }
  490. .el-collapse {
  491. border: none;
  492. .el-collapse-item__wrap {
  493. // margin: 18px;
  494. }
  495. .el-collapse-item__header {
  496. height: 40px;
  497. padding-left: 9px !important;
  498. &:before {
  499. left: 0px;
  500. }
  501. }
  502. .el-collapse-item__wrap,
  503. .el-collapse-item__header {
  504. border: none;
  505. }
  506. .el-collapse-item {
  507. margin: 18px;
  508. border-bottom: 1px solid#d8d8d8 !important;
  509. padding-bottom: 18px;
  510. }
  511. .el-collapse-item__content {
  512. padding-bottom: 0px;
  513. }
  514. }
  515. .collapseContainer {
  516. .ptitle {
  517. border-bottom: none;
  518. }
  519. }
  520. .el-descriptions-item__cell {
  521. line-height: 22px !important;
  522. }
  523. .ptitle {
  524. margin: 2px 20px;
  525. border-bottom: 1px solid#d8d8d8;
  526. &.baseinfotab {
  527. border-bottom: none;
  528. background: #f5f0ee;
  529. padding: 0px 18px;
  530. }
  531. &.orderitemlist {
  532. width: 100%;
  533. overflow-x: scroll;
  534. }
  535. .el-table {
  536. margin-bottom: 13px;
  537. }
  538. }
  539. .baseinfo {
  540. padding: 18px;
  541. .el-descriptions__table {
  542. background: #f5f0ee;
  543. }
  544. }
  545. .detailTab {
  546. .el-collapse-item {
  547. border-bottom: none !important;
  548. }
  549. }
  550. }
  551. </style>