orderInformation.vue 6.9 KB

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