Applied-detail.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. <template>
  2. <view class="">
  3. <view class='page'>
  4. <view class='body'>
  5. <view class='order-no'>
  6. <view class='order-no-num flex-row'>
  7. <view class='order-no-num-left flex-grow-1'> 订单编号:{{order_info.order_no}} </view>
  8. <view @click='copyText(order_info.order_no)'
  9. class='order-no-num-right flex-grow-0 flex-y-center flex-x-center'
  10. :data-text='order_info.order_no'> 复制 </view>
  11. </view>
  12. <view class='order-add-time'>下单时间:{{order_info.create_time}} </view>
  13. </view>
  14. <view class='order-info'>
  15. <view class='order-info-item flex-row'>
  16. <view class='order-info-title flex-grow-1'> 商品总额 </view>
  17. <view class='order-info-val flex-grow-1'> {{order_info.integral}}积分 <block
  18. v-if='order_info.total_price > 0'>+ ¥ {{order_info.total_price}}</block>
  19. </view>
  20. </view>
  21. <view class='order-info-item flex-row'>
  22. <view class='order-info-title flex-grow-1'> 商品数量 </view>
  23. <view class='order-info-val flex-grow-1'>×1</view>
  24. </view>
  25. <view class='order-info-item flex-row'>
  26. <view class='order-info-title flex-grow-1'> 运费 </view>
  27. <view class='order-info-val flex-grow-1'> ¥ {{order_info.express_price}} </view>
  28. </view>
  29. <view class='order-info-item flex-row' v-if="order_info.remark">
  30. <view class='order-info-title flex-grow-1'> 备注 </view>
  31. <view class='order-info-val flex-grow-1'> {{order_info.remark}} </view>
  32. </view>
  33. </view>
  34. <view class='order-total-price'> 合计:
  35. <text style='color:#ff5c5c;'>{{order_info.integral}}积分</text>
  36. </view>
  37. <view class='order-goods flex-row'>
  38. <view class='flex-grow-0 goods-image'>
  39. <image :src='URL+order_info.thumb'></image>
  40. </view>
  41. <view class='flex-grow-1 flex-col'>
  42. <view class='flex-grow-1'>
  43. <view class='goods-name'>{{order_info.goods.name}}</view>
  44. <view class='attr-list flex-row'>
  45. ¥:{{order_info.goods.price}}
  46. </view>
  47. </view>
  48. <view class='flex-grow-0 flex-row order-price'>
  49. <view class='flex-grow-1 num'>×1</view>
  50. <view class='flex-grow-0 price'>{{order_info.integral}}积分
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="footer-bar">
  58. <view class="content flex flex-center" @click="hex" >
  59. <!-- <button class="btn" hover-class="none" form-type="submit"> -->
  60. 确认核销
  61. <!-- </button> -->
  62. </view>
  63. </view>
  64. </view>
  65. </template>
  66. <script>
  67. export default {
  68. data() {
  69. return {
  70. URL: getApp().globalData.URL,
  71. page: 1,
  72. order_info: {
  73. create_time: "",
  74. order_no: "",
  75. address: '',
  76. name: "",
  77. mobile: "",
  78. express_no: "",
  79. total_price: "",
  80. integral: "",
  81. express_price: "",
  82. },
  83. qrcode: '',code:'',
  84. is_hide: false
  85. }
  86. },
  87. onLoad(e) {
  88. this.http(e.code);
  89. this.code=e.code;
  90. },
  91. methods: {
  92. copyText(e) {
  93. uni.setClipboardData({
  94. data: e,
  95. success: function() {
  96. console.log('success');
  97. }
  98. });
  99. },
  100. http(order_id) {
  101. this.request({
  102. url: "Smdcshop/ZtCode_info",
  103. data: {
  104. order_id: order_id,
  105. },
  106. }).then(res => {
  107. if (res.code == "200") {
  108. this.order_info = res.data;
  109. }
  110. }).catch((res) => {
  111. console.log(res, "666")
  112. uni.showToast({
  113. title: res.message,
  114. icon: 'none'
  115. })
  116. });
  117. },
  118. //请求详情
  119. hex() {
  120. this.request({
  121. url: "Smdcshop/ZtCode_Hx",
  122. data: {
  123. store_id: uni.getStorageSync("store_id"),
  124. admin_id: uni.getStorageSync("admin_id"),
  125. order_id: this.code,
  126. },
  127. }).then(res => {
  128. if (res.code == "200") {
  129. uni.showModal({
  130. title: '温馨提示',
  131. content: '核销成功',
  132. showCancel: false,
  133. confirmColor: "#000000",
  134. confirmText: '确定',
  135. success: (res) => {
  136. if (res.confirm) {
  137. uni.navigateBack()
  138. }
  139. },
  140. fail: () => {},
  141. complete: () => {}
  142. });
  143. }
  144. }).catch((res) => {
  145. console.log(res, "666")
  146. uni.showToast({
  147. title: res.message,
  148. icon: 'none'
  149. })
  150. setTimeout(()=>{
  151. uni.navigateBack()
  152. },2000)
  153. });
  154. },
  155. }
  156. }
  157. </script>
  158. <style>
  159. page {
  160. background: #F1F1F1;
  161. }
  162. .footer-bar {
  163. margin-top: 50rpx;
  164. }
  165. .footer-bar .content {
  166. width: 600rpx;
  167. margin: 0 auto;
  168. background: #C9271B;
  169. text-align: center;
  170. height: 100rpx;
  171. line-height: 100rpx;
  172. color: #fff;
  173. border-radius: 10px;
  174. margin-top: 100rpx;
  175. }
  176. .popupModel {
  177. position: fixed;
  178. top: 0;
  179. left: 0;
  180. background: rgba(0, 0, 0, 0.5);
  181. width: 100%;
  182. height: 100%;
  183. }
  184. .popupModel image {
  185. width: 300rpx;
  186. height: 300rpx;
  187. }
  188. .model {
  189. width: 200rpx;
  190. height: 200rpx;
  191. background: #FFFFFF;
  192. }
  193. .code-btn {
  194. width: 600rpx;
  195. margin: 0 auto;
  196. background: #C9271B;
  197. text-align: center;
  198. height: 100rpx;
  199. line-height: 100rpx;
  200. color: #fff;
  201. border-radius: 100px;
  202. margin-top: 100rpx;
  203. }
  204. .order-status {
  205. font-size: 13pt;
  206. margin-bottom: 14rpx;
  207. }
  208. .order-time {
  209. font-size: 10pt;
  210. }
  211. .user-info-mobile {
  212. text-align: right;
  213. }
  214. .order-address {
  215. background-color: #ffffff;
  216. padding: 32rpx 24rpx;
  217. font-size: 11pt;
  218. color: #353535;
  219. }
  220. .user-address-info {
  221. padding-top: 19rpx;
  222. }
  223. .order-no {
  224. margin-top: 20rpx;
  225. padding: 32rpx 24rpx;
  226. font-size: 11pt;
  227. color: #353535;
  228. background-color: #ffffff;
  229. }
  230. .order-no-num-right {
  231. text-align: right;
  232. width: 74rpx;
  233. height: 44rpx;
  234. border: 1rpx solid #dddddd;
  235. border-radius: 5rpx;
  236. font-size: 7pt;
  237. color: #666666;
  238. }
  239. .order-add-time {
  240. margin-top: 20rpx;
  241. }
  242. .order-info-val {
  243. text-align: right;
  244. }
  245. .order-info {
  246. margin-top: 20rpx;
  247. padding: 12rpx 24rpx 32rpx 24rpx;
  248. background-color: #ffffff;
  249. font-size: 11pt;
  250. color: #353535;
  251. }
  252. .order-info-item {
  253. padding-top: 20rpx;
  254. }
  255. .order-total-price {
  256. border-top: 1rpx solid #e2e2e2;
  257. background-color: #ffffff;
  258. line-height: 96rpx;
  259. text-align: right;
  260. height: 96rpx;
  261. padding: 0 24rpx;
  262. color: #353535;
  263. font-size: 13pt;
  264. }
  265. .order-goods {
  266. margin-top: 20rpx;
  267. background-color: #ffffff;
  268. padding: 0 24rpx 30rpx 24rpx;
  269. color: #353535;
  270. }
  271. .goods-image image {
  272. width: 156rpx;
  273. height: 156rpx;
  274. margin-right: 26rpx;
  275. margin-top: 30rpx;
  276. }
  277. .goods-name {
  278. font-size: 11pt;
  279. margin-top: 32rpx;
  280. line-height: 1;
  281. }
  282. .attr-list {
  283. font-size: 9pt;
  284. line-height: 1;
  285. margin-top: 12rpx;
  286. margin-bottom: 5rpx;
  287. }
  288. .order-price {
  289. font-size: 10pt;
  290. }
  291. .order-footer {
  292. height: 98rpx;
  293. margin-top: 20rpx;
  294. border-top: 1rpx solid #e2e2e2;
  295. background-color: #ffffff;
  296. padding: 0 24rpx;
  297. text-align: right;
  298. justify-content: flex-end;
  299. }
  300. .play-btn {
  301. height: 64rpx;
  302. border: 1rpx solid #ff5c5c !important;
  303. color: #ff5c5c;
  304. border-radius: 10rpx;
  305. line-height: 64rpx;
  306. text-align: center;
  307. padding: 0 20rpx !important;
  308. margin: 0 !important;
  309. background-color: transparent !important;
  310. }
  311. button::after {
  312. content: normal;
  313. }
  314. .express-info {
  315. padding: 20rpx 24rpx;
  316. background-color: #ffffff;
  317. font-size: 11pt;
  318. color: #353535;
  319. margin-bottom: 20rpx;
  320. }
  321. .express-info-right image {
  322. width: 16rpx;
  323. height: 26rpx;
  324. }
  325. .express {
  326. margin-bottom: 20rpx;
  327. }
  328. .block {
  329. margin-top: 20rpx;
  330. }
  331. .block-row {
  332. padding-bottom: 20rpx;
  333. }
  334. </style>