resale.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <view>
  3. <view class="cmain">
  4. <view class="box order_detail">
  5. <view class="item">
  6. <text class="label">商品名称</text>
  7. <text class="desc omit">{{ item.goodsNames }}</text>
  8. </view>
  9. <view class="item">
  10. <text class="label">订单编号</text>
  11. <text class="desc omit">{{ item.tradeNo }}</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">
  24. <input type="number" v-model="resalePrice" placeholder="请输入(元)" />
  25. </text>
  26. </view>
  27. </view>
  28. <u-divider text="费项明细"></u-divider>
  29. <view class="box">
  30. <u-collapse v-for="(item,index) in feeItemLIst" :key="index">
  31. <u-collapse-item :title="item.name" class="cell_title" >
  32. <view class="itm">1、收费企业:{{ item.companyName }}</view>
  33. <view class="itm" v-if="item.feeType ==1">2、收费类型:按交易额收取</view>
  34. <view class="itm" v-if="item.feeType ==2">2、收费类型:按次收取</view>
  35. <view class="itm" v-if="item.feeType ==1">3、收费%(按交易额):<span style="color: coral;">{{ item.percent }} %</span></view>
  36. <view class="itm" v-if="item.feeType ==1">4、当前订单收取金额:<span style="color: coral;">{{ (item.percent * resalePrice)/100}} 元</span></view>
  37. <view class="itm" v-if="item.feeType ==2">3、收费金额(按次收):<span style="color: coral;">{{ item.feeMoney }} 元</span></view>
  38. <view class="itm" v-if="item.feeType ==2">4、当前订单收取金额:<span style="color: coral;">{{ item.feeMoney }} 元</span></view>
  39. </br>
  40. <view class="itm">当前费项收取金额以最后结算时为准</view>
  41. </u-collapse-item>
  42. </u-collapse>
  43. </view>
  44. </view>
  45. <view class="mfooter" v-if="item.resaleStatus != 1">
  46. <view class="flex">
  47. <view class="f">
  48. <button class="btn" @click="ok()">确定</button>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. export default {
  56. data() {
  57. return {
  58. item: {},
  59. resalePrice: '',
  60. feeItemLIst: []
  61. };
  62. },
  63. onLoad(e) {
  64. if (e.item) {
  65. this.item = JSON.parse(e.item);
  66. }
  67. this.getFeeItem();
  68. },
  69. methods: {
  70. //费项明细
  71. getFeeItem(){
  72. this.http.request({
  73. url: '/level-two-server/app/TbFeeItem/getList',
  74. success: res => {
  75. this.feeItemLIst = res.data.data
  76. }
  77. });
  78. },
  79. ok() {
  80. let rule = { name: 'resalePrice', checkType: 'notnull', errorMsg: '请输入转售金额' };
  81. if (!this.verify.check(this.resalePrice, rule)) {
  82. uni.showModal({ content: this.verify.error, showCancel: false });
  83. return false;
  84. }
  85. uni.showModal({
  86. title: '提示',
  87. content: '我已核对转售信息',
  88. success: res => {
  89. if (res.confirm) {
  90. this.http.request({
  91. url: '/level-two-server/app/TbOrders/addOrderByResale',
  92. data: {id: this.item.id, resalePrice: this.resalePrice},
  93. success: res => {
  94. uni.showToast({title: '提交成功'});
  95. this.item.resaleStatus = 1;
  96. }
  97. });
  98. }
  99. }
  100. });
  101. }
  102. }
  103. };
  104. </script>
  105. <style lang="scss">
  106. page {
  107. background-color: $pg;
  108. }
  109. .item {
  110. input{
  111. margin-top: 0px!important;
  112. }
  113. }
  114. </style>