refundOrderDelivery.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <view class="content">
  3. <view class="inner">
  4. <view class="form-box">
  5. <view class="form-item">
  6. <text class="label">快递公司</text>
  7. <input type="text" v-model="form.deliveryName" placeholder="请输入物流公司" placeholder-class="form-input" />
  8. </view>
  9. <view class="form-item">
  10. <text class="label">快递单号</text>
  11. <input type="text" v-model="form.deliverySn" placeholder="请输入物流单号" placeholder-class="form-input" />
  12. </view>
  13. </view>
  14. </view>
  15. <view class="btn-box">
  16. <view class="sub-btn" @click="submit()">提交</view>
  17. </view>
  18. <ykscreenRecord></ykscreenRecord>
  19. </view>
  20. </template>
  21. <script>
  22. import {addDelivery} from '@/api/storeAfterSales.js'
  23. import ykscreenRecord from "@/components/yk-screenRecord/yk-screenRecord.vue"
  24. export default {
  25. components:{
  26. ykscreenRecord
  27. },
  28. data() {
  29. return {
  30. form:{
  31. salesId:null,
  32. deliverySn:null,
  33. deliveryName:null,
  34. }
  35. }
  36. },
  37. onLoad(option) {
  38. this.form.salesId=option.salesId
  39. },
  40. methods: {
  41. submit(){
  42. if(this.form.deliveryName==null){
  43. uni.showToast({
  44. icon:'none',
  45. title: '请输入快递公司'
  46. });
  47. return;
  48. }
  49. if(this.form.deliverySn==null){
  50. uni.showToast({
  51. icon:'none',
  52. title: '请输入快递单号'
  53. });
  54. return;
  55. }
  56. addDelivery(this.form).then(
  57. res => {
  58. if(res.code==200){
  59. uni.showToast({
  60. icon:'success',
  61. title: "提交成功",
  62. });
  63. uni.navigateBack({
  64. delta: 1
  65. })
  66. }else{
  67. uni.showToast({
  68. icon:'none',
  69. title: res.msg,
  70. });
  71. }
  72. },
  73. rej => {}
  74. );
  75. },
  76. },
  77. }
  78. </script>
  79. <style lang="scss">
  80. page{
  81. height: 100%;
  82. }
  83. .content{
  84. display: flex;
  85. flex-direction: column;
  86. justify-content: space-between;
  87. .inner{
  88. padding: 20upx;
  89. .form-box{
  90. padding: 0 30upx;
  91. background: #FFFFFF;
  92. border-radius: 16upx;
  93. .form-item{
  94. padding: 30upx 0;
  95. display: flex;
  96. align-items: flex-start;
  97. border-bottom: 1px solid #F1F1F1;
  98. &:last-child{
  99. border-bottom: none;
  100. }
  101. .label{
  102. width: 150upx;
  103. text-align: left;
  104. font-size: 30upx;
  105. line-height: 44upx;
  106. font-family: PingFang SC;
  107. font-weight: 500;
  108. color: #222222;
  109. flex-shrink: 0;
  110. }
  111. input{
  112. text-align: left;
  113. }
  114. .form-input{
  115. font-size: 30upx;
  116. font-family: PingFang SC;
  117. font-weight: 500;
  118. color: #999999;
  119. text-align: left;
  120. }
  121. }
  122. }
  123. }
  124. .btn-box{
  125. height: 120upx;
  126. padding: 0 30upx;
  127. display: flex;
  128. align-items: center;
  129. justify-content: center;
  130. .sub-btn{
  131. width: 100%;
  132. height: 88upx;
  133. line-height: 88upx;
  134. text-align: center;
  135. font-size: 30upx;
  136. font-family: PingFang SC;
  137. font-weight: bold;
  138. color: #FFFFFF;
  139. background: #C39A58;
  140. border-radius: 44upx;
  141. }
  142. }
  143. }
  144. </style>