resale.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <view>
  3. <view class="cmain" style="padding-bottom: 80px;">
  4. <view class="box order_detail">
  5. <view class="item">
  6. <text class="label">订单编号</text>
  7. <text class="desc omit">{{ item.tradeNo }}</text>
  8. </view>
  9. <view class="item">
  10. <text class="label">商品名称</text>
  11. <text class="desc omit">{{ item.goodsNames }}</text>
  12. </view>
  13. <view class="item">
  14. <text class="label">商品重量</text>
  15. <text class="desc">{{ item.totalWeight }}</text>
  16. </view>
  17. <view class="item">
  18. <text class="label">商品单位</text>
  19. <text class="desc">{{ item.goodsUnit }}</text>
  20. </view>
  21. <view class="item">
  22. <text class="label">订单金额</text>
  23. <text class="desc">¥ {{ item.totalPrice }}</text>
  24. </view>
  25. <!-- <view class="item">
  26. <text class="label">转售金额</text>
  27. <text class="desc">
  28. <input type="number" v-model="resalePrice" placeholder="请输入(元)" />
  29. </text>
  30. </view> -->
  31. <view class="item">
  32. <text class="label">利润</text>
  33. <text class="desc">50元</text>
  34. </view>
  35. <view class="item">
  36. <text class="label">计算总金额</text>
  37. <text class="desc">
  38. <input type="number" v-model="resalePrice" :disabled="true"/>
  39. </text>
  40. </view>
  41. </view>
  42. <u-divider text="费项明细"></u-divider>
  43. <view class="box">
  44. <u-collapse v-for="(item,index) in newRuleList" :key="index">
  45. <u-collapse-item :title="item.name" class="cell_title" >
  46. <view class="itm">1、收费企业:{{ item.companyName }}</view>
  47. <view class="itm" v-if="item.feeType ==1">2、收费类型:按交易额收取</view>
  48. <view class="itm" v-if="item.feeType ==2">2、收费类型:按次收取</view>
  49. <view class="itm" v-if="item.feeType ==3">2、收费类型:按吨收取</view>
  50. <view class="itm" v-if="item.feeType ==1">3、收费%(按交易额收):<span style="color: coral;">{{ item.percent }} %</span></view>
  51. <view class="itm" v-if="item.feeType ==1">4、当前订单收取金额:<span style="color: coral;">{{ item.percent*price/100 }} 元</span></view>
  52. <view class="itm" v-if="item.feeType ==2">3、收费金额(按次收):<span style="color: coral;">{{ item.feeMoney }} 元</span></view>
  53. <view class="itm" v-if="item.feeType ==2">4、当前订单收取金额:<span style="color: coral;">{{ item.feeMoney }} 元</span></view>
  54. <view class="itm" v-if="item.feeType ==3">3、收费%(按吨收):<span style="color: coral;">{{ item.percent }} %</span></view>
  55. <view class="itm" v-if="item.feeType ==3">4、当前订单收取金额:<span style="color: coral;">{{ item.percent*weight/100 }} 元</span></view>
  56. </br>
  57. <view class="itm">当前费项收取金额以最后结算时为准</view>
  58. </u-collapse-item>
  59. </u-collapse>
  60. </view>
  61. </view>
  62. <view class="mfooter" v-if="item.resaleStatus != 1">
  63. <view class="flex">
  64. <view class="f">
  65. <button class="btn" @click="ok()">确定</button>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. </template>
  71. <script>
  72. export default {
  73. data() {
  74. return {
  75. item: {},
  76. resalePrice: '',
  77. weight: '',
  78. price: '',
  79. newRuleList: []
  80. };
  81. },
  82. onLoad(e) {
  83. if (e.item) {
  84. this.item = JSON.parse(e.item);
  85. this.price = this.item.totalPrice;
  86. this.weight = this.item.totalWeight;
  87. this.countPrice();
  88. }
  89. },
  90. methods: {
  91. //费项合计
  92. countPrice(){
  93. this.http.request({
  94. url: '/level-two-server/app/TbOrders/countPrice',
  95. data: {id: this.item.id},
  96. success: res => {
  97. this.resalePrice = (res.data.data.sumPrice + 50).toFixed(2)
  98. this.newRuleList = res.data.data.newRuleList
  99. }
  100. });
  101. },
  102. ok() {
  103. console.log("----this.resalePrice-----=",this.resalePrice)
  104. uni.showModal({
  105. title: '提示',
  106. content: '我已核对转售信息',
  107. success: res => {
  108. if (res.confirm) {
  109. this.http.request({
  110. url: '/level-two-server/app/TbOrders/addOrderByResale',
  111. data: {id: this.item.id, resalePrice: this.resalePrice},
  112. success: res => {
  113. uni.showToast({title: '提交成功'});
  114. this.item.resaleStatus = 1;
  115. }
  116. });
  117. }
  118. }
  119. });
  120. }
  121. }
  122. };
  123. </script>
  124. <style lang="scss">
  125. page {
  126. background-color: $pg;
  127. }
  128. .item {
  129. input{
  130. margin-top: 0px!important;
  131. }
  132. }
  133. </style>