updatePrice.vue 3.8 KB

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