deliverExtend.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <template>
  2. <view>
  3. <view class="deliver">
  4. <view v-for="(item, index) in deliverExtends" :key="index">
  5. <view class="extends">
  6. <view class="exTop dflex">
  7. <span class="fahuo">发货单{{ index + 1 }}</span>
  8. <span class="state">{{ item.state == 1 ? '待发货' : item.state == 2 ? '已发货' : '' }}</span>
  9. </view>
  10. <view class="cont dflex" v-for="(it, idx) in item.extendDTOList" :key="idx">
  11. <img :src="it.pic" class="eimg" />
  12. <view class="zhinfo">
  13. <view class="zhtit" v-text="it.productName"></view>
  14. <view class="guige">
  15. <!-- <span>规格:</span> -->
  16. <span v-if="it.productNumber != '' || it.productNumber != null">编码:{{ it.productNumber }}</span>
  17. </view>
  18. </view>
  19. <view class="num">X{{ it.quantity }}</view>
  20. </view>
  21. <view class="deliverId dflex">
  22. <span class="deliveri">发货号:{{ item.id }}</span>
  23. <span class="supplierName">{{ item.supplierName }}</span>
  24. </view>
  25. <view v-if="item.state == 1" class="btn dflex"><view v-if="item.state == 1" @click="deliverGoods(item)">确认发货</view></view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. data() {
  34. return {
  35. deliverExtends: '',
  36. id: '',
  37. merchantId: ''
  38. };
  39. },
  40. onLoad(opt) {
  41. this.id = opt.id;
  42. this.merchantId = opt.merchantId;
  43. this.deliverExtend();
  44. },
  45. methods: {
  46. deliverGoods(item) {
  47. this.jumpUrl('express?id=' + item.orderId + '&merchantId=' + this.merchantId+'&deliverId='+item.id);
  48. },
  49. // 获取发货单号
  50. deliverExtend() {
  51. req.postRequest(
  52. '/api/order/deliverExtend',
  53. {
  54. id: this.id
  55. },
  56. data => {
  57. this.deliverExtends = data;
  58. console.log(data);
  59. }
  60. );
  61. }
  62. }
  63. };
  64. </script>
  65. <style>
  66. @import './static/css/main.css';
  67. .extends {
  68. margin: 10px 20px;
  69. padding: 15px;
  70. background-color: #fff;
  71. border-radius: 10px;
  72. }
  73. .exTop {
  74. justify-content: space-between;
  75. }
  76. .fahuo {
  77. font-size: 16px;
  78. /* font-weight: bold; */
  79. color: #000000;
  80. }
  81. .state {
  82. color: #ff341e;
  83. }
  84. .cont {
  85. margin: 10px 0;
  86. padding: 10px;
  87. background-color: #f5f5f5;
  88. align-items: center;
  89. }
  90. .eimg {
  91. width: 40px;
  92. height: 40px;
  93. border-radius: 0.1rem;
  94. margin-right: 0.2rem;
  95. border: 0.02rem solid #e5e5e5;
  96. box-sizing: border-box;
  97. }
  98. .guige {
  99. white-space: nowrap;
  100. text-overflow: ellipsis;
  101. overflow: hidden;
  102. }
  103. .num {
  104. font-size: 15px;
  105. }
  106. .deliverId {
  107. justify-content: space-between;
  108. align-items: center;
  109. padding: 0 0 6px 0;
  110. }
  111. .deliveri {
  112. color: #999;
  113. }
  114. .deliverId span {
  115. white-space: nowrap;
  116. text-overflow: ellipsis;
  117. overflow: hidden;
  118. }
  119. .supplierName {
  120. font-size: 15px;
  121. color: #000000;
  122. }
  123. .btn {
  124. border-top: 1px solid #ebebeb;
  125. padding: 5px 0 0 0;
  126. justify-content: flex-end;
  127. }
  128. </style>