complaint.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <view>
  3. <view class="ts-header">
  4. <view class="ts-h-title">投诉门店</view>
  5. <view class="store-info">
  6. <view class="store-left">
  7. <view class="name">{{options.poi_name}}</view>
  8. <view class="address">{{options.poi_address}}</view>
  9. </view>
  10. </view>
  11. </view>
  12. <view class="ts-body">
  13. <view class="ts-form">
  14. <view class="ts-form-item">
  15. <view class="form-title">具体问题 <text>*</text></view>
  16. <view class="form-input">
  17. {{options.text}}
  18. </view>
  19. </view>
  20. <view class="ts-form-item">
  21. <view class="form-title">问题订单 <text>*</text></view>
  22. <view class="form-input">
  23. {{options.order}}
  24. </view>
  25. </view>
  26. <view class="ts-form-item">
  27. <view class="form-title">联系方式</view>
  28. <view class="form-input">
  29. <input type="number" v-model="options.mobile" class="ts-input" placeholder="请输入手机号" />
  30. </view>
  31. </view>
  32. <view class="ts-form-item">
  33. <view class="form-title">详细补充 <text>*</text></view>
  34. <view class="form-input-textarea">
  35. <textarea class="ts-input" v-model="options.content" placeholder="请详细描述该笔订单中您遇到的问题,描述内容不能为空" rows="10"></textarea>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="footer">
  41. <view class="footer-btn">
  42. <button class="btn" :disabled="disabled" @click="submitTs">提交</button>
  43. </view>
  44. <view class="footer-safe"></view>
  45. </view>
  46. <uni-popup ref="tspopup" type="center" border-radius="10px 10px 0 0" background-color="#f8f8f8">
  47. <view class="ts-popup">
  48. <view class="title">我要投诉门店</view>
  49. <view class="sub-title">请仔细阅读投诉说明</view>
  50. <view class="sub-title">受理时间1个工作日</view>
  51. <view class="tips-body">
  52. <view class="item-title">【退款/退货纠纷】</view>
  53. <view class="item-desc">在订单页-申请退款,门店需在24小时处理,否则平台将自动退款,如门店拒绝退款可在此投诉;</view>
  54. <view class="item-title">【质量/涉假问题】</view>
  55. <view class="item-desc">为避免恶意投诉,请上传包含单位公章及证书编号检测报告, 请往下滑动查看《检测报告案例》</view>
  56. </view>
  57. <view class="pup-close">
  58. <button class="pop-btn" @click="tipsPop">我已阅读并确认</button>
  59. </view>
  60. </view>
  61. </uni-popup>
  62. </view>
  63. </template>
  64. <script>
  65. var app;
  66. import * as Api from "@/static/api/order.js";
  67. import form from "@/static/js/form.js"
  68. export default {
  69. data() {
  70. return {
  71. options:null,
  72. disabled:false
  73. }
  74. },
  75. onLoad(options) {
  76. app = this;
  77. app.options = options;
  78. app.$nextTick(()=>{
  79. app.$refs.tspopup.open()
  80. })
  81. },
  82. methods: {
  83. tipsPop(){
  84. app.$refs.tspopup.close()
  85. },
  86. submitTs(){
  87. var validation = form.validation(app.options,[
  88. {name:"content",rule:["required"],msg:["请输入描述内容"]}
  89. ]);
  90. if(validation){
  91. app.$dialog.showSuccess(validation);
  92. return false;
  93. }
  94. Api.complaint(app.options).then((res)=>{
  95. if (res.code == 0) {
  96. return app.$dialog.showSuccess(res.msg);
  97. }
  98. app.$dialog.showSuccess(res.msg,"none",function(){
  99. uni.navigateBack()
  100. });
  101. })
  102. }
  103. }
  104. }
  105. </script>
  106. <style>
  107. page{background-color: #f8f8f8;}
  108. .ts-popup{background-color: #fff;width: 90vw;border-radius: 20upx;}
  109. .ts-popup .title{font-size: 32upx;color: #333;font-weight: bold;padding: 30upx 0;text-align: center;}
  110. .ts-popup .sub-title{color: #f00;padding: 20upx 0;text-align: center;font-size: 28upx;}
  111. .ts-popup .tips-body{width: 90%;margin: 0 auto;}
  112. .ts-popup .tips-body .item-title{font-size: 28upx;color: #333;padding: 15upx 0;}
  113. .ts-popup .tips-body .item-desc{font-size: 28upx;color: #333;line-height: 46upx;margin-bottom: 20upx;}
  114. .ts-popup .pup-close{padding-top: 40upx;}
  115. .ts-popup .pup-close .pop-btn{border: 0;background-color: #f00;font-size: 32upx;color: #fff;border-radius: 0 0 20upx 20upx;padding: 15upx 0;cursor: pointer;}
  116. .ts-header{padding: 20upx 0;margin-bottom: 20upx;}
  117. .ts-header .ts-h-title{font-size: 28upx;color: #666;padding: 20upx;}
  118. .ts-header .store-info{background-color: #fff;padding: 20upx;}
  119. .ts-header .store-info .store-left .name{font-size: 30rpx;color: #333;font-weight: bold;line-height: 80upx;}
  120. .ts-header .store-info .store-left .address{font-size: 24rpx;color: #999;}
  121. .ts-body{background-color: #fff;padding: 20upx;}
  122. .ts-form .ts-form-item{border-bottom: 2upx solid #f8f8f8;padding-bottom: 10upx;}
  123. .ts-form .ts-form-item:last-child{border-bottom: 0;}
  124. .ts-form .ts-form-item .form-title{color: #333;font-size: 28upx;padding: 20upx 0;}
  125. .ts-form .ts-form-item .form-title text{color: #f00;margin-left: 10upx;}
  126. .ts-form .ts-form-item .form-input{font-size: 28upx;color: #333;height: 80upx;display: flex;align-items: center;}
  127. .ts-form .ts-form-item .ts-input{height: 100%;border: 0;box-shadow: none;width: 100%;}
  128. .ts-form .form-input-textarea{height: 200upx;font-size: 28upx;color: #333;}
  129. .footer{position: fixed;bottom: 0;background-color: #fff;padding: 20upx 20upx 0 20upx;border-top: 2upx solid #f8f8f8;left: 0;right: 0;}
  130. .footer .footer-safe {height: env(safe-area-inset-bottom);width: 100%;}
  131. .footer .footer-btn{padding: 20upx 0;}
  132. .footer .footer-btn .btn{color: #fff;background-color: #f00;border-radius: 10upx;}
  133. </style>