handle.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <template>
  2. <view>
  3. <view class="cmain">
  4. <view class="box order_detail" style="padding: 13px">
  5. <u-steps :current="current">
  6. <u-steps-item title="订单确认"></u-steps-item>
  7. <u-steps-item title="互助委托确认"></u-steps-item>
  8. <u-steps-item title="进口申报确认"></u-steps-item>
  9. </u-steps>
  10. </view>
  11. <view class="box order_detail">
  12. <view v-if="current == 0">
  13. <view class="item ctt">订单确认</view>
  14. </view>
  15. <view v-if="current == 1">
  16. <view class="item ctt">互助委托书</view>
  17. <view class="item desc">边民 {{ item.buyUserName }}(身份证号:4509231***12)委托代理边民互市(进口/入境)商品交易(进口/入境)商品交易信息如下:</view>
  18. </view>
  19. <view v-if="current == 2">
  20. <view class="item ctt">进口申报确认</view>
  21. </view>
  22. <view class="expand" :style="{height:expand?'auto':'300px'}">
  23. <view class="item">
  24. <text class="label">订单编号</text>
  25. <text class="desc omit">{{ item.tradeNo }}</text>
  26. </view>
  27. <view class="item">
  28. <text class="label">商品名称</text>
  29. <text class="desc">{{ item.goodsNames }}</text>
  30. </view>
  31. <view class="item">
  32. <text class="label">商品金额</text>
  33. <text class="desc">¥ {{ item.totalPrice }}</text>
  34. </view>
  35. <view class="item">
  36. <text class="label">车牌号</text>
  37. <text class="desc">{{ item.veNo }}</text>
  38. </view>
  39. <view class="item">
  40. <text class="label">商品金额</text>
  41. <text class="desc">¥ {{ item.totalPrice }}</text>
  42. </view>
  43. <view class="item">
  44. <text class="label">车牌号</text>
  45. <text class="desc">{{ item.veNo }}</text>
  46. </view>
  47. <view class="item">
  48. <text class="label">商品金额</text>
  49. <text class="desc">¥ {{ item.totalPrice }}</text>
  50. </view>
  51. <view class="item">
  52. <text class="label">车牌号</text>
  53. <text class="desc">{{ item.veNo }}</text>
  54. </view>
  55. <view class="item">
  56. <text class="label">商品金额</text>
  57. <text class="desc">¥ {{ item.totalPrice }}</text>
  58. </view>
  59. <view class="item">
  60. <text class="label">车牌号</text>
  61. <text class="desc">{{ item.veNo }}</text>
  62. </view>
  63. <view class="item">
  64. <text class="label">商品金额</text>
  65. <text class="desc">¥ {{ item.totalPrice }}</text>
  66. </view>
  67. <view class="item">
  68. <text class="label">车牌号</text>
  69. <text class="desc">{{ item.veNo }}</text>
  70. </view>
  71. <view class="item">
  72. <text class="label">商品金额</text>
  73. <text class="desc">¥ {{ item.totalPrice }}</text>
  74. </view>
  75. <view class="item">
  76. <text class="label">车牌号</text>
  77. <text class="desc">{{ item.veNo }}</text>
  78. </view>
  79. <view class="item">
  80. <text class="label">商品金额</text>
  81. <text class="desc">¥ {{ item.totalPrice }}</text>
  82. </view>
  83. <view class="item">
  84. <text class="label">车牌号</text>
  85. <text class="desc">{{ item.veNo }}</text>
  86. </view>
  87. </view>
  88. <view class="more" @click="expand = !expand">
  89. <text class="icon">&#xe649;</text>
  90. <text>{{expand?'收起':'更多信息'}}</text>
  91. </view>
  92. </view>
  93. </view>
  94. <view class="mfooter">
  95. <view class="flex">
  96. <view class="f">
  97. <button class="btn" @click="ok()">确定</button>
  98. </view>
  99. </view>
  100. </view>
  101. </view>
  102. </template>
  103. <script>
  104. export default {
  105. data() {
  106. return {
  107. expand: false, //展开
  108. current: 0,
  109. item: {},
  110. orderId: ''
  111. };
  112. },
  113. onLoad(e) {
  114. if (e.orderId) {
  115. this.orderId = e.orderId;
  116. this.getData();
  117. }
  118. },
  119. methods: {
  120. getData() {
  121. this.http.request({
  122. url: '/level-one-server/app/TbOrder/orderDetail',
  123. data: { orderId: this.orderId },
  124. success: res => {
  125. this.item = res.data.data;
  126. }
  127. });
  128. },
  129. ok() {
  130. //根据不同的步骤提交不同的url或者状态参数
  131. if (this.current == 0) {
  132. uni.showModal({
  133. title: '提示',
  134. content: '我已核对信息无误',
  135. success: res => {
  136. if (res.confirm) {
  137. this.http.request({
  138. url: '/level-one-server/app/TbOrder/confirmOrder',
  139. method: 'POST',
  140. data: { orderId: this.item.id },
  141. success: res => {
  142. uni.showToast({ title: '订单确认成功' });
  143. this.current = 1;
  144. uni.setNavigationBarTitle({ title: '互助委托确认' });
  145. }
  146. });
  147. }
  148. }
  149. });
  150. }
  151. if (this.current == 1) {
  152. uni.showModal({
  153. title: '提示',
  154. content: '我已核对信息无误',
  155. success: res => {
  156. if (res.confirm) {
  157. this.http.request({
  158. url: '/level-one-server/app/TbOrder/cooperOrder',
  159. method: 'POST',
  160. data: { orderId: this.item.id },
  161. success: res => {
  162. uni.showToast({ title: '互助委托确认成功' });
  163. this.current = 2;
  164. uni.setNavigationBarTitle({ title: '进口申报确认' });
  165. }
  166. });
  167. }
  168. }
  169. });
  170. }
  171. if (this.current == 2) {
  172. uni.showModal({
  173. title: '提示',
  174. content: '我已核对信息无误',
  175. success: res => {
  176. if (res.confirm) {
  177. this.http.request({
  178. url: '/level-one-server/app/TbOrder/applyOrder',
  179. method: 'POST',
  180. data: { orderId: this.item.id },
  181. success: res => {
  182. uni.showToast({ title: '进口申报确认成功' });
  183. setTimeout(() => {
  184. uni.switchTab({ url: '/pages/index/index' });
  185. }, 1000);
  186. }
  187. });
  188. }
  189. }
  190. });
  191. }
  192. }
  193. }
  194. };
  195. </script>
  196. <style lang="scss">
  197. page {
  198. background-color: $pg;
  199. }
  200. .cmain{
  201. padding-bottom: 100px;
  202. }
  203. .expand {
  204. overflow: hidden;
  205. }
  206. .more {
  207. text-align: center;
  208. padding: 10px 10px 15px 10px;
  209. .icon {
  210. padding-right: 3px;
  211. }
  212. }
  213. .ctt {
  214. text-align: center;
  215. font-weight: bold;
  216. }
  217. </style>