quality-update.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  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="$utils.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="title">数量修正申请</view>
  17. <view class="row">
  18. <view class="col">
  19. <view class="label">合同号:</view>
  20. <view class="value">{{ option.purchaseBillNo }}</view>
  21. </view>
  22. </view>
  23. <view class="row">
  24. <view class="col">
  25. <view class="label">批次号:</view>
  26. <view class="value">{{ option.batchNo }}</view>
  27. </view>
  28. </view>
  29. <view class="row">
  30. <view class="col">
  31. <view class="label">供应商:</view>
  32. <view class="value">{{ option.supplier }}</view>
  33. </view>
  34. </view>
  35. <view class="row">
  36. <view class="col">
  37. <view class="label">物料名称:</view>
  38. <view class="value">{{ option.materialName }}</view>
  39. </view>
  40. </view>
  41. <view class="row">
  42. <view class="col">
  43. <view class="label">物料规格:</view>
  44. <view class="value">{{ option.spec }}</view>
  45. </view>
  46. </view>
  47. <view class="row">
  48. <view class="col">
  49. <view class="label">到货时间:</view>
  50. <view class="value">{{ option.arriveTime }}</view>
  51. </view>
  52. </view>
  53. <view class="row">
  54. <view class="col">
  55. <view class="label">申购数量:</view>
  56. <view class="value">{{ option.purchaseCount }}</view>
  57. </view>
  58. <view class="col">
  59. <view class="label">到货数量:</view>
  60. <view class="value">{{ option.inStockQty }}</view>
  61. </view>
  62. </view>
  63. <view class="row">
  64. <view class="col" style="align-items: center;">
  65. <span>数量修正:</span>
  66. <view style="width: 200rpx;background-color: #FFFFFF;margin-right: 10rpx;">
  67. <u-input v-model="option.adjustNum" type="number" :border="true"/>
  68. </view>
  69. %
  70. </view>
  71. </view>
  72. </view>
  73. <view class="title">质检短少记录</view>
  74. <view class="sub-title">共有{{ option.checkLakeItems.length }}个物料存在短少</view>
  75. </div>
  76. <view class="list">
  77. <view class="item" v-for="(item, index) in option.checkLakeItems" :key="index">
  78. <view class="row">
  79. <view class="col">
  80. <view class="label">标签值:</view>
  81. <view class="value">{{ item.rfidCode }}</view>
  82. </view>
  83. </view>
  84. <view class="row">
  85. <view class="col">
  86. <view class="label">物料数量:</view>
  87. <view class="value">{{ item.quantity }}</view>
  88. </view>
  89. </view>
  90. <view class="row border">
  91. <view class="col">
  92. <view class="label">短少比率:</view>
  93. <view class="value">{{ item.lakePercent }}%</view>
  94. </view>
  95. </view>
  96. <view class="row" style="justify-content: center;">
  97. <span>质检结论:</span>
  98. <span class="red">短少{{ item.lakeNum }}米</span>
  99. </view>
  100. </view>
  101. </view>
  102. <view class="btn">
  103. <u-button throttleTime="300" type="primary" style="width: 100%;" @click="cfm">提交申请</u-button>
  104. </view>
  105. </view>
  106. </view>
  107. </template>
  108. <script>
  109. export default {
  110. data() {
  111. return {
  112. num: 0,
  113. option: {}
  114. };
  115. },
  116. methods: {
  117. /* 结束质检 */
  118. cfm() {
  119. this.$http.AddStockQtyCheckAdjust({
  120. stockQuantityCheckId: this.option.stockQuantityCheckId,
  121. adjustNum: this.option.adjustNum
  122. }).then(res => {
  123. console.log(res)
  124. if(res.code === 0) {
  125. this.$msg.showToast(res.msg || '提交成功!')
  126. this.$storage.removeStorageSync(this.option.stockQuantityCheckId)
  127. /* 如果需要免检 */
  128. if(this.option.isNoCheck) {
  129. this.$utils.openNew(`/pages/store-in-manage/quality/quality-no-check?data=${this.$utils.object2Code(this.option)}`)
  130. } else {
  131. setTimeout(() => {
  132. this.$utils.back(2)
  133. }, 500)
  134. }
  135. }
  136. })
  137. },
  138. /* 绑定标签 */
  139. bind() {
  140. this.$utils.open('/pages/store-in-manage/quality/quality-scan')
  141. }
  142. },
  143. onLoad(option) {
  144. console.log('?????????????')
  145. this.option = this.$utils.code2Object(option.data)
  146. console.log(this.option)
  147. },
  148. onUnload() {
  149. // #ifdef APP-PLUS
  150. // #endif
  151. }
  152. }
  153. </script>
  154. <style lang="scss" scoped>
  155. .container-wrap {
  156. overflow: hidden;
  157. .container {
  158. padding: 10rpx;
  159. height: calc(100vh - var(--status-bar-height) - 44px);
  160. overflow: auto;
  161. .top {
  162. height: 600rpx;
  163. .info {
  164. padding: 10rpx 20rpx;
  165. font-size: 32rpx;
  166. }
  167. .title {
  168. font-size: 36rpx;
  169. font-weight: bold;
  170. text-align: center;
  171. }
  172. .sub-title {
  173. font-size: 24rpx;
  174. text-align: center;
  175. color: #7f7f7f;
  176. }
  177. }
  178. .list {
  179. padding: 10rpx 0;
  180. height: calc(100% - 680rpx);
  181. overflow: auto;
  182. background-color: #FFFFFF;
  183. .item {
  184. padding: 20rpx;
  185. margin-bottom: 10rpx;
  186. background-color: #FFFFFF;
  187. border: 1rpx solid rgba(215, 215, 215, 1);
  188. border-radius: 10rpx;
  189. .row {
  190. &.border {
  191. border-bottom: 1px solid rgba(215, 215, 215, 1);
  192. }
  193. .orange {
  194. color: rgb(245, 154, 35);
  195. }
  196. .red {
  197. color: red;
  198. }
  199. }
  200. }
  201. }
  202. }
  203. }
  204. .modal {
  205. padding: 40rpx 0;
  206. text-align: center;
  207. .img {
  208. margin: auto;
  209. width: 200rpx;
  210. }
  211. .content {
  212. padding: 30rpx 0;
  213. font-size: 36rpx;
  214. font-weight: bold;
  215. }
  216. }
  217. </style>