quality-no-check.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <!-- 申请免检 -->
  2. <template>
  3. <view class="container-wrap">
  4. <uni-nav-bar title="申请免检" :status-bar="true" background-color="#3F92F9" color="#FFF">
  5. <view slot="left">
  6. <u-icon name="account-fill" color="#FFF" size="35"></u-icon>
  7. <span style="padding: 0 5rpx;color: #FFFFFF;">{{ userInfo.name }}</span>
  8. </view>
  9. <view slot="right" @tap="back()">
  10. <span style="color: #FFFFFF;">返回</span>
  11. </view>
  12. </uni-nav-bar>
  13. <view class="container">
  14. <div class="top">
  15. <view class="info">
  16. <view class="row">
  17. <view class="col">
  18. <view class="label">合同号:</view>
  19. <view class="value">{{ option.purchaseBillNo }}</view>
  20. </view>
  21. </view>
  22. <view class="row">
  23. <view class="col">
  24. <view class="label">批次号:</view>
  25. <view class="value">{{ option.batchNo }}</view>
  26. </view>
  27. </view>
  28. <view class="row">
  29. <view class="col">
  30. <view class="label">供应商:</view>
  31. <view class="value">{{ option.supplier }}</view>
  32. </view>
  33. </view>
  34. <view class="row">
  35. <view class="col">
  36. <view class="label">物料名称:</view>
  37. <view class="value">{{ option.materialName }}</view>
  38. </view>
  39. </view>
  40. <view class="row">
  41. <view class="col">
  42. <view class="label">物料规格:</view>
  43. <view class="value">{{ option.spec }}</view>
  44. </view>
  45. </view>
  46. <view class="row">
  47. <view class="col">
  48. <view class="label">到货时间:</view>
  49. <view class="value">{{ option.arriveTime }}</view>
  50. </view>
  51. </view>
  52. <view class="row">
  53. <view class="col">
  54. <view class="label">申购数量:</view>
  55. <view class="value">{{ option.purchaseCount }}</view>
  56. </view>
  57. </view>
  58. <view class="row">
  59. <view class="col">
  60. <view class="label">到货数量:</view>
  61. <view class="value">{{ option.inStockQty }}</view>
  62. </view>
  63. </view>
  64. </view>
  65. </div>
  66. <view class="list">
  67. <div><span style="color: red;">*</span>申请原因</div>
  68. <div style="background-color: #FFFFFF;margin-top: 10rpx;">
  69. <u-input
  70. placeholder=""
  71. v-model="reason"
  72. type="textarea"
  73. :border="true"
  74. :height="180"
  75. ></u-input>
  76. </div>
  77. </view>
  78. <view class="btn">
  79. <u-button throttleTime="300" type="primary" style="width: 100%;" @click="cfm">提交申请</u-button>
  80. </view>
  81. </view>
  82. </view>
  83. </template>
  84. <script>
  85. import error from '../../../static/images/error.png'
  86. export default {
  87. data() {
  88. return {
  89. reason: '',
  90. option: {}
  91. };
  92. },
  93. methods: {
  94. cfm() {
  95. if(!this.reason) {
  96. return this.$msg.showToast('请输入申请原因!')
  97. }
  98. this.$http.AddStockExemptCheck({
  99. stockQuantityCheckId: this.option.stockQuantityCheckId,
  100. reason: this.reason
  101. }).then(res => {
  102. console.log(res)
  103. if(res.code === 0) {
  104. this.$msg.showToast(res.msg || '提交成功!')
  105. this.$storage.removeStorageSync(this.option.stockQuantityCheckId)
  106. setTimeout(() => {
  107. this.$utils.back(3)
  108. }, 500)
  109. }
  110. })
  111. },
  112. back () {
  113. if(this.option.isNoCheck) {
  114. this.$utils.back(3)
  115. } else {
  116. this.$utils.back(1)
  117. }
  118. }
  119. },
  120. onLoad(option) {
  121. this.option = this.$utils.code2Object(option.data)
  122. },
  123. onShow() {
  124. },
  125. onUnload() {
  126. },
  127. onBackPress(e) {
  128. if(e.from === 'navigateBack') {
  129. return false
  130. } else {
  131. this.back()
  132. return true
  133. }
  134. // return true 表示禁止默认返回
  135. // if(this.option.isNoCheck) {
  136. // uni.navigateBack({delta: 2})
  137. // return false
  138. // } else {
  139. // uni.navigateBack({delta: 1})
  140. // return false
  141. // }
  142. }
  143. }
  144. </script>
  145. <style lang="scss" scoped>
  146. .container-wrap {
  147. overflow: hidden;
  148. .container {
  149. padding: 10rpx;
  150. height: calc(100vh - var(--status-bar-height) - 44px);
  151. overflow: hidden;
  152. display: flex;
  153. flex-direction: column;
  154. .top {
  155. .info {
  156. padding: 10rpx 20rpx;
  157. font-size: 32rpx;
  158. }
  159. .title {
  160. margin-top: 20rpx;
  161. font-size: 36rpx;
  162. font-weight: bold;
  163. text-align: center;
  164. }
  165. .sub-title {
  166. padding: 10rpx 0;
  167. font-size: 24rpx;
  168. text-align: center;
  169. color: #7f7f7f;
  170. }
  171. }
  172. .list {
  173. padding: 10rpx 20rpx;
  174. margin-bottom: 10rpx;
  175. flex: 1;
  176. overflow: auto;
  177. .item {
  178. padding: 20rpx;
  179. margin-bottom: 10rpx;
  180. background-color: #FFFFFF;
  181. border: 1rpx solid rgba(215, 215, 215, 1);
  182. border-radius: 10rpx;
  183. .row {
  184. &.border {
  185. border-bottom: 1px solid rgba(215, 215, 215, 1);
  186. }
  187. .orange {
  188. color: rgb(245, 154, 35);
  189. }
  190. .blue {
  191. color: #02A7F0;
  192. }
  193. .red {
  194. color: red;
  195. }
  196. }
  197. }
  198. }
  199. }
  200. }
  201. .modal {
  202. padding: 40rpx 0;
  203. text-align: center;
  204. .img {
  205. margin: auto;
  206. width: 200rpx;
  207. }
  208. .content {
  209. padding: 30rpx 0;
  210. font-size: 36rpx;
  211. font-weight: bold;
  212. }
  213. }
  214. </style>