orderInformation.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <template name="information">
  2. <view class="information-template">
  3. <!-- 订单信息 -->
  4. <view class="information-content">
  5. <view class="information-view title">
  6. <view class="view-num title">
  7. <text class="bage-buss" v-if="orderData.orderSubmitType == 3 || orderData.orderSubmitType == 4">协销</text>
  8. <text class="bage-auto" v-if="orderData.orderSubmitType == 0 || orderData.orderSubmitType == 1 ||orderData.orderSubmitType == 2">自主</text>
  9. <text class="bage-text">订单编号:{{orderData.orderNo =='undefined' ? '' : orderData.orderNo}}</text>
  10. <image class="bage-icon" src="../../../static/temp/icon-type@3x.png" mode="widthFix" v-if="orderData.secondHandOrderFlag == 1"></image>
  11. </view>
  12. </view>
  13. <view class="information-view">
  14. <view class="view-num time">下单时间:{{ orderData.orderTime =='undefined' ? '' : orderData.orderTime }}</view>
  15. <view class="view-type">{{ orderData.status | TextFormat }}</view>
  16. </view>
  17. <view class="information-view">
  18. <view class="view-num bold">
  19. 订单标识:{{ orderData.orderMark =='undefined' ? '' : orderData.orderMark }}
  20. <text class="clipboard" @click="clipboard(orderData.orderMark)">复制</text>
  21. </view>
  22. </view>
  23. <view class="information-view">
  24. <view class="view-num">订单总额:¥{{ orderData.payTotalFee =='undefined' ? '' : orderData.payTotalFee | NumFormat }}</view>
  25. <view class="view-man">应付总额:¥{{ orderData.payableAmount =='undefined' ? '0.00' : orderData.payableAmount | NumFormat }}</view>
  26. </view>
  27. <view class="information-view">
  28. <view class="view-num">待付金额:<text class="red">¥{{ orderData.pendingPayments =='undefined' ? '0.00' : orderData.pendingPayments | NumFormat }}</text></view>
  29. <view class="view-man"></view>
  30. </view>
  31. <view class="information-view">
  32. <view class="view-num">经理折扣:¥{{ orderData.discountFee =='undefined' ? '' : orderData.discountFee | NumFormat}}</view>
  33. <view class="view-man" v-show="orderData.promotionFullReduction>0">促销满减:¥{{ orderData.promotionFullReduction | NumFormat}}</view>
  34. </view>
  35. <view class="information-view">
  36. <view class="view-num">余额抵扣:¥{{ orderData.balancePayFee =='undefined' ? '' : orderData.balancePayFee | NumFormat}}</view>
  37. <view class="view-man">赠品总数:{{ orderData.presentCount + orderData.promotionalGiftsCount}}</view>
  38. </view>
  39. <view class="information-view">
  40. <view class="view-num" v-if="orderData.freePostFlag == '0'">运费:包邮</view>
  41. <view class="view-num" v-if="orderData.freePostFlag == '-1'">运费:到付</view>
  42. <view class="view-num" v-if="orderData.freePostFlag == '1'">运费:¥{{ orderData.freight | NumFormat}}</view>
  43. </view>
  44. <view class="information-view">
  45. <view class="view-num">已支付:¥{{ orderData.receiptAmount == null ? '0.00' : orderData.receiptAmount | NumFormat }}</view>
  46. <view class="view-man"></text></view>
  47. </view>
  48. </view>
  49. </view>
  50. </template>
  51. <script>
  52. const thorui = require("@/components/clipboard/clipboard.thorui.js")
  53. export default{
  54. name:"information",
  55. props:{
  56. information:{
  57. type:Object
  58. }
  59. },
  60. data() {
  61. return{
  62. orderData:'',
  63. freePostFlag:'',
  64. }
  65. },
  66. created(){
  67. this.initData(this.information)
  68. },
  69. filters:{
  70. NumFormat(value) {//处理金额
  71. return Number(value).toFixed(2);
  72. },
  73. TextFormat(status) {//处理金额
  74. let HtmlText,
  75. typeTextObject={
  76. 0:'待确认',
  77. 4:'交易完成',
  78. 5:'订单完成',
  79. 6:'已关闭',
  80. 7:'交易全退',
  81. 77:'交易全退',
  82. 11:'待付款待发货',
  83. 12:'待付款部分发货',
  84. 13:'待付款已发货',
  85. 21:'部分付款待发货',
  86. 22:'部分付款部分发货',
  87. 23:'部分付款已发货',
  88. 31:'已付款待发货',
  89. 32:'已付款部分发货',
  90. 33:'已付款已发货',
  91. 111:'待付款待发货',
  92. };
  93. Object.keys(typeTextObject).forEach(key => {
  94. if(key == status){
  95. HtmlText = typeTextObject[key]
  96. }
  97. })
  98. return HtmlText
  99. },
  100. },
  101. computed: {
  102. },
  103. watch:{
  104. information:{
  105. handler:function(val){
  106. this.initData(val)
  107. },
  108. deep:true//对象内部的属性监听,也叫深度监听
  109. }
  110. },
  111. methods:{
  112. initData(res) {
  113. this.orderData = res;
  114. },
  115. clipboard(data) {
  116. thorui.getClipboardData(data, (res) => {
  117. if (res) {
  118. this.$util.msg("复制成功",2000,true,'success');
  119. } else {
  120. this.$util.msg("复制失败",2000,true,'none');
  121. }
  122. })
  123. }
  124. }
  125. }
  126. </script>
  127. <style lang="scss">
  128. .information-template{
  129. width: 100%;
  130. height: auto;
  131. background: #FFFFFF;
  132. float: left;
  133. margin-top: 24rpx;
  134. .information-content{
  135. width: 702rpx;
  136. padding: 0 24rpx 20rpx 24rpx;
  137. .information-view{
  138. height: 50rpx;
  139. line-height: 50rpx;
  140. font-size: $font-size-28;
  141. color: $text-color;
  142. margin: 4rpx 0;
  143. display: flex;
  144. &.title{
  145. height: 68rpx;
  146. line-height: 68rpx;
  147. margin-bottom: 5rpx;
  148. }
  149. view{
  150. flex: 1;
  151. color: $text-color;
  152. text-align: left;
  153. }
  154. .view-num.title{
  155. height: 68rpx;
  156. line-height: 68rpx;
  157. position: relative;
  158. .bage-icon{
  159. width: 50rpx;
  160. height: 50rpx;
  161. display: block;
  162. position: absolute;
  163. right: 0;
  164. top: 9rpx;
  165. }
  166. .bage-buss{
  167. display: inline-block;
  168. width: 72rpx;
  169. height: 30rpx;
  170. background:radial-gradient(circle,rgba(255,39,180,1) 0%,rgba(193,77,245,1) 100%);
  171. border-radius: 4rpx;
  172. line-height: 30rpx;
  173. font-size: $font-size-24;
  174. text-align: center;
  175. color: #FFFFFF;
  176. margin-top: 10rpx;
  177. }
  178. .bage-auto{
  179. display: inline-block;
  180. width: 72rpx;
  181. height: 30rpx;
  182. background:radial-gradient(circle,rgba(255,180,39,1) 0%,rgba(245,142,77,1) 100%);
  183. border-radius: 4rpx;
  184. line-height: 30rpx;
  185. font-size: $font-size-24;
  186. text-align: center;
  187. color: #FFFFFF;
  188. margin-top: 10rpx;
  189. }
  190. .bage-text{
  191. display: inline-block;
  192. font-size: $font-size-28;
  193. line-height: 68rpx;
  194. text-align: left;
  195. color: $color-system;
  196. margin-left: 10rpx;
  197. }
  198. }
  199. .view-num.ord{
  200. color: $color-system;
  201. text-align: left;
  202. flex:3;
  203. font-weight: bold;
  204. }
  205. .view-num.time{
  206. color: #999999;
  207. flex: 6;
  208. }
  209. .bold{
  210. font-weight: bold;
  211. }
  212. .red{
  213. color: #FF2A2A;
  214. }
  215. .view-type{
  216. float: right;
  217. text-align: right;
  218. color: #FF2A2A;
  219. flex:4;
  220. }
  221. .clipboard{
  222. width: 84rpx;
  223. height: 36rpx;
  224. background: linear-gradient(34deg,rgba(255,41,41,1) 0%,rgba(255,109,27,1) 100%);
  225. text-align: center;
  226. font-size: $font-size-24;
  227. color: #FFFFFF;
  228. border-radius: 6rpx;
  229. line-height: 36rpx;
  230. display: inline-block;
  231. margin-left: 42rpx;
  232. }
  233. }
  234. }
  235. }
  236. </style>