resale.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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="order.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 * order.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-item title="会员有什么用?" class="cell_title">
  43. <view class="itm">1、普能会员:只浏览平台信息,不可下载平台上的相关附件。</view>
  44. <view class="itm">2、专业会员:上传展示产品与服务内容、上传相关附件,后台审核方可在平台展示。可下载其他专业会员上传的附件。</view>
  45. <view class="itm">3、专家会员:只有专家会员才能接受评测邀请。</view>
  46. </u-collapse-item>
  47. <u-collapse-item title="积分如何使用?" class="cell_title"><text class="coll">获得的积分可以去线下店铺使用享受折扣哦</text></u-collapse-item>
  48. <u-collapse-item title="如何申请高级会员?" class="cell_title">
  49. <view class="itm">1、普能会员:只浏览平台信息,不可下载平台上的相关附件。</view>
  50. <view class="itm">2、专业会员:上传展示产品与服务内容、上传相关附件,后台审核方可在平台展示。可下载其他专业会员上传的附件。</view>
  51. <view class="itm">3、专家会员:只有专家会员才能接受评测邀请。</view>
  52. </u-collapse-item>
  53. <u-collapse-item title="如何购买产品?" class="cell_title">
  54. <text class="coll">目前无法在线购买产品,如你想购买某款产品,可以去线下的店购买</text>
  55. </u-collapse-item> -->
  56. </u-collapse>
  57. </view>
  58. </view>
  59. <view class="mfooter" v-if="item.resaleStatus != 1">
  60. <view class="flex">
  61. <view class="f">
  62. <button class="btn" @click="ok()">提交</button>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </template>
  68. <script>
  69. export default {
  70. data() {
  71. return {
  72. user: this.getUser(),
  73. item: {},
  74. order: {
  75. resalePrice: '',
  76. levelOneOrderId: '',
  77. goodsId: '',
  78. goodsName: '',
  79. goodsUnit: '',
  80. tradeAreaId: '',
  81. tradeAreaName: '',
  82. },
  83. feeItemLIst: []
  84. };
  85. },
  86. onLoad(e) {
  87. if (e.item) {
  88. this.item = JSON.parse(e.item);
  89. this.order.levelOneOrderId = this.item.id;
  90. this.order.goodsId = this.item.goodsId;
  91. this.order.goodsName = this.item.goodsNames;
  92. this.order.goodsUnit = this.item.goodsUnit;
  93. this.order.tradeAreaId = this.item.tradeAreaId;
  94. this.order.tradeAreaName = this.item.tradeAreaName;
  95. }
  96. console.log("this.item",this.item)
  97. this.getFeeItem();
  98. },
  99. methods: {
  100. //费项明细
  101. getFeeItem(){
  102. this.http.request({
  103. url: '/level-two-server/app/TbFeeItem/getList',
  104. success: res => {
  105. this.feeItemLIst = res.data.data
  106. }
  107. });
  108. },
  109. ok() {
  110. let rule = [{ name: 'resalePrice', checkType: 'notnull', errorMsg: '请输入转售金额' }];
  111. if (!this.verify.check(this.order, rule)) {
  112. uni.showModal({ content: this.verify.error, showCancel: false });
  113. return false;
  114. }
  115. uni.showModal({
  116. title: '提示',
  117. content: '我已核对转售信息',
  118. success: res => {
  119. if (res.confirm) {
  120. this.http.request({
  121. url: '/level-two-server/app/TbOrders/addOrderByResale',
  122. method: 'POST',
  123. data: this.order,
  124. success: res => {
  125. uni.showToast({title: '提交成功'});
  126. this.item.resaleStatus = 1;
  127. }
  128. });
  129. }
  130. }
  131. });
  132. }
  133. }
  134. };
  135. </script>
  136. <style lang="scss">
  137. page {
  138. background-color: $pg;
  139. }
  140. .item {
  141. input{
  142. margin-top: 0px!important;
  143. }
  144. }
  145. </style>