orderInformation.vue 8.1 KB

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