updatePrice.vue 3.4 KB

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