addIceRaft.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <!-- 添加运单 -->
  3. <view>
  4. <u-navbar :title="headline" autoBack placeholder></u-navbar>
  5. <x-form ref="recipients" :list="list" :model="recipientsModel" :rules="rules"></x-form>
  6. <view style="width: 100%;height: 150rpx;"></view>
  7. <view class="btn_print" @click="printWaybill">
  8. <u-button type="primary" shape="circle" :text="headline"></u-button>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import {
  14. iceRaftRulesil
  15. } from "./waybill.js";
  16. export default {
  17. name: 'addIceRaft',
  18. data() {
  19. return {
  20. recipientsModel: {
  21. code: '',
  22. status: '',
  23. freezeClaim: '',
  24. },
  25. rules: {
  26. code: {
  27. required: true,
  28. message: '请输入编号',
  29. trigger: ['blur', 'change']
  30. },
  31. status: {
  32. required: true,
  33. message: '请选择状态',
  34. trigger: ['blur', 'change']
  35. },
  36. freezeClaim: {
  37. required: true,
  38. message: '请输入冷冻要求',
  39. trigger: ['blur', 'change']
  40. },
  41. },
  42. list: iceRaftRulesil(),
  43. userInfo: {},
  44. headline: '添加冰排',
  45. type: 1,
  46. }
  47. },
  48. onShow() {},
  49. onLoad(value) {},
  50. mounted() {
  51. var userInfo = this.$cache.getCache('userInfo')
  52. this.userInfo = userInfo
  53. },
  54. methods: {
  55. // tianjia运单
  56. async printWaybill() {
  57. let flag1 = await this.$refs['recipients'].validateForm();
  58. if (flag1) {
  59. let params = {
  60. codeList: [],
  61. freezeClaim: Number(this.recipientsModel.freezeClaim),
  62. status: null,
  63. }
  64. if (this.recipientsModel.status == '正常') {
  65. params.status = '2'
  66. } else {
  67. params.status = '1'
  68. }
  69. params.codeList.push(this.recipientsModel.code)
  70. this.$api.post('/api/ice-raft', params).then(res => {
  71. if (res.code == 200) {
  72. uni.redirectTo({
  73. url: '/pages/order/iceRaft'
  74. })
  75. }
  76. })
  77. } else {
  78. uni.$u.toast('请先完善表单')
  79. }
  80. },
  81. }
  82. }
  83. </script>
  84. <style lang="scss">
  85. page {
  86. background-color: #fff !important;
  87. }
  88. .title_waybill {
  89. font-size: 32rpx;
  90. padding: 20rpx;
  91. }
  92. .title_waybill1 {
  93. position: relative;
  94. margin: 20rpx;
  95. border-bottom: 1rpx;
  96. padding-bottom: 20rpx;
  97. }
  98. .card_Address {
  99. position: relative;
  100. }
  101. .card_flex_il {
  102. display: flex;
  103. align-items: center;
  104. padding: 20rpx;
  105. }
  106. .title_sou {
  107. font-size: 32rpx;
  108. }
  109. .card_Address:before {
  110. content: " ";
  111. position: absolute;
  112. left: 0;
  113. bottom: 0;
  114. width: 100%;
  115. height: 1px;
  116. border-top: 1px solid #e7e6e4;
  117. -webkit-transform-origin: 0 0;
  118. transform-origin: 0 0;
  119. -webkit-transform: scaleY(0.5);
  120. transform: scaleY(0.5);
  121. }
  122. .card_courier {
  123. min-height: 600rpx;
  124. padding-bottom: 20rpx;
  125. }
  126. .scroll-view {
  127. max-height: 60vh;
  128. overflow: hidden;
  129. }
  130. .headline {
  131. padding: 30rpx 30rpx 0rpx 30rpx;
  132. display: flex;
  133. align-items: center;
  134. justify-content: center;
  135. padding-bottom: 30rpx;
  136. font-size: 32rpx;
  137. font-weight: 600;
  138. }
  139. .search_card {
  140. padding: 0rpx 30rpx 10rpx 30rpx;
  141. }
  142. .courier_item {
  143. margin: 20rpx 20rpx;
  144. width: calc(100% - 80rpx);
  145. padding: 20rpx;
  146. border-radius: 20rpx;
  147. // box-shadow: 0 2rpx 10rpx 0 rgba(0, 0, 0, .1);
  148. border: 1rpx solid #e7e6e4;
  149. }
  150. .courier_name {
  151. display: flex;
  152. flex-direction: column;
  153. }
  154. .title_name {
  155. font-weight: 600;
  156. font-size: 32rpx;
  157. margin-bottom: 10rpx;
  158. }
  159. .title_phone {
  160. font-size: 28rpx;
  161. }
  162. .xd_title {
  163. width: auto;
  164. font-size: 28rpx;
  165. font-weight: 500;
  166. padding: 15rpx 30rpx;
  167. border-radius: 35rpx;
  168. // border: 3rpx solid #82848a;
  169. background-color: #E4E7ED;
  170. }
  171. </style>