resale.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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.netWt }}</text>
  20. </view>
  21. <view class="item">
  22. <text class="label">毛重</text>
  23. <text class="desc">{{ item.grossWt }}</text>
  24. </view>
  25. <view class="item">
  26. <text class="label">商品单位</text>
  27. <text class="desc">{{ item.goodsUnit }}</text>
  28. </view>
  29. <view class="item">
  30. <text class="label">申报金额</text>
  31. <text class="desc">¥ {{ item.totalPrice }}</text>
  32. </view>
  33. <view class="item">
  34. <text class="label">预上架金额</text>
  35. <text class="desc">¥ {{ item.totalPrice }}</text>
  36. </view>
  37. <!-- <view class="item">
  38. <text class="label">利润</text>
  39. <text class="desc">50元</text>
  40. </view> -->
  41. <!-- <view class="item">
  42. <text class="label">上架金额</text>
  43. <text class="desc">¥ {{ resalePrice }}</text>
  44. </view> -->
  45. <view style="font-size: 12px;padding: 5px;height: 30px;line-height: 30px;">注:本次上架需扣除服务1点数</view>
  46. </view>
  47. <!-- <u-divider text="服务费明细"></u-divider>
  48. <view v-if="fee.totalFee>0">{{fee.title}}:{{fee.totalFee}}<span style="color: coral;margin-left: 5px;font-size: 16px;">元</span></view>
  49. <view class="box">
  50. <u-collapse v-for="(item,index) in fee.feeList" :key="index" :value="['1']">
  51. <u-collapse-item :title="item.name" class="cell_title" name="1">
  52. <view class="itm">1、系统服务费:{{ item.name }}</view>
  53. <view class="itm" v-if="item.feeType ==1">2、收费类型:按交易额收取</view>
  54. <view class="itm" v-if="item.feeType ==2">2、收费类型:按次收取</view>
  55. <view class="itm" v-if="item.feeType ==3">2、收费类型:按吨收取</view>
  56. <view class="itm" v-if="item.feeType ==1">3、收费%(按交易额收):<span style="color: coral;">{{ item.percent }} %</span></view>
  57. <view class="itm" v-if="item.feeType ==2">3、收费金额(按次收):<span style="color: coral;">{{ item.feeMoney }} 元</span></view>
  58. <view class="itm" v-if="item.feeType ==3">3、收费%(按吨收):<span style="color: coral;">{{ item.percent }} %</span></view>
  59. <view class="itm">4、当前订单收取金额:<span style="color: coral;">{{ item.feeMoney }} 元</span></view>
  60. </u-collapse-item>
  61. </u-collapse>
  62. </view> -->
  63. </view>
  64. <view class="mfooter" v-if="item.upStatus != 2">
  65. <view class="flex">
  66. <view class="f">
  67. <button class="btn" @click="ok()">确定上架</button>
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. </template>
  73. <script>
  74. export default {
  75. data() {
  76. return {
  77. item: {},
  78. resalePrice: '',
  79. weight: '',
  80. price: '',
  81. newRuleList: [],
  82. fee:{
  83. totalFee:0,
  84. feeList:[]
  85. }
  86. };
  87. },
  88. onLoad(e) {
  89. if (e.item) {
  90. this.item = JSON.parse(e.item);
  91. this.price = this.item.totalPrice;
  92. this.weight = this.item.totalWeight;
  93. //this.countPrice();
  94. }
  95. },
  96. methods: {
  97. fetchItemList(){
  98. this.http.request({
  99. url: '/level-two-server/app/TbOrders/fetchItemList',
  100. data: {id: this.item.id},
  101. success: res => {
  102. this.resalePrice = (res.data.data.sumPrice + 50).toFixed(2)
  103. this.newRuleList = res.data.data.newRuleList
  104. }
  105. });
  106. },
  107. //费项合计
  108. countPrice(){
  109. this.http.request({
  110. url: '/level-two-server/app/TbOrders/countPrice',
  111. data: {id: this.item.id},
  112. success: res => {
  113. // this.resalePrice = (res.data.data.sumPrice + 50).toFixed(2)
  114. // this.newRuleList = res.data.data.newRuleList
  115. this.fee=res.data.data;
  116. this.resalePrice = (this.fee.totalFee + this.item.totalPrice).toFixed(2);
  117. }
  118. });
  119. },
  120. ok() {
  121. let resalePrice=this.resalePrice;
  122. /* if(!resalePrice){
  123. uni.showToast({title: '请填写上架金额',icon:'error'});
  124. return;
  125. }
  126. if(resalePrice<this.item.totalPrice){
  127. uni.showToast({title: '上架金额不能小于订单金额',icon:'error'});
  128. return;
  129. } */
  130. uni.showModal({
  131. title: '提示',
  132. content: '确定上架?',
  133. success: res => {
  134. if (res.confirm) {
  135. this.http.request({
  136. url: '/level-one-server/app/TbOrder/up',
  137. data: {id: this.item.id, upPrice: this.item.totalPrice},
  138. success: res => {
  139. uni.showToast({title: '提交成功'});
  140. uni.navigateBack();
  141. }
  142. });
  143. }
  144. }
  145. });
  146. }
  147. }
  148. };
  149. </script>
  150. <style lang="scss">
  151. page {
  152. background-color: $pg;
  153. }
  154. .item {
  155. input{
  156. margin-top: 0px!important;
  157. }
  158. }
  159. </style>