outWarehousing.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <template>
  2. <view class="replenishment-outWarehousing-wrap" :style="`backgroundImage:linear-gradient(180deg, ${$config('primaryColor')}, #F5F6F7 12%)`">
  3. <view class="replenishment-outWarehousing-body">
  4. <view class="head-info" v-if="basicInfoData">
  5. <view class="states">
  6. <view>
  7. <u-icon name="icon_out" custom-prefix="iscm-icon" size="48"></u-icon>
  8. <text>待出库</text>
  9. </view>
  10. </view>
  11. <view>
  12. <view class="label"><u-icon name="ison_shelf" custom-prefix="iscm-icon" size="32"></u-icon><text>货架名称</text></view>
  13. <view class="info-txt">{{basicInfoData.shelfName || '--'}}</view>
  14. </view>
  15. <view>
  16. <view class="label"><u-icon name="icon_position" custom-prefix="iscm-icon" size="32"></u-icon><text>客户地址</text></view>
  17. <view class="info-txt">{{basicInfoData.remarks || '--'}}</view>
  18. </view>
  19. </view>
  20. <view class="part-list">
  21. <!-- 配件列表 -->
  22. <partList :list="partList" title="配件列表" model="view" fromPage="replenishmentOut" ref="partList" noDataText="暂无配件"></partList>
  23. </view>
  24. </view>
  25. <view class="replenishment-outWarehousing-footer">
  26. <u-button class="button" @click="confirmModal=true" :custom-style="customDefalutStyle" hover-class="none" shape="circle">打印标签</u-button>
  27. <u-button class="button" @click="confirmModal=true" type="success" :custom-style="customStyle" hover-class="none" shape="circle">发货出库</u-button>
  28. </view>
  29. <!-- 确认弹框 -->
  30. <common-modal :openModal="confirmModal" content="确认信息无误并进行出库吗?" confirmText="确认出库" @confirm="modalConfirm" @close="confirmModal=false" />
  31. </view>
  32. </template>
  33. <script>
  34. import commonModal from '@/pages/common/commonModal.vue'
  35. import { shelfReplenishDetail, shelfReplenishDetailList, shelfReplenishPutStock } from '@/api/shelfReplenish'
  36. import partList from '@/pages/common/partList.vue'
  37. export default {
  38. components: { partList, commonModal },
  39. data() {
  40. return {
  41. replenishBillSn: '',
  42. basicInfoData:null,
  43. partList: [],
  44. customStyle: {
  45. borderRadius:'100rpx',
  46. fontSize:'30rpx',
  47. background: '#0485F6'
  48. },
  49. customDefalutStyle: {
  50. borderRadius:'100rpx',
  51. fontSize:'30rpx',
  52. color: '#0485F6',
  53. background: '#fff'
  54. },
  55. confirmModal: false
  56. }
  57. },
  58. onReady() {
  59. uni.setNavigationBarColor({
  60. frontColor: '#ffffff',
  61. backgroundColor: this.$config('primaryColor')
  62. })
  63. },
  64. onLoad(option) {
  65. this.replenishBillSn = option.replenishBillSn
  66. this.getDetail()
  67. this.getPartList()
  68. },
  69. methods: {
  70. // 查询详情
  71. getDetail(){
  72. shelfReplenishDetail({ sn: this.replenishBillSn }).then(res => {
  73. if(res.status == 200){
  74. this.basicInfoData = res.data || null
  75. }else{
  76. this.basicInfoData = null
  77. }
  78. })
  79. },
  80. // 查询列表
  81. getPartList(){
  82. const _this = this
  83. shelfReplenishDetailList({ replenishBillSn: this.replenishBillSn }).then(res => {
  84. if(res.status == 200 && res.data){
  85. res.data.map(item =>{
  86. item.confirmQty = item.confirmQty ? Number(item.confirmQty) : 0
  87. })
  88. this.partList = res.data || []
  89. }else{
  90. this.partList = []
  91. }
  92. })
  93. },
  94. // 确认签收 confirm
  95. modalConfirm(){
  96. const arr = []
  97. this.partList.map((item, index) => {
  98. if (item.putQty || item.putQty == 0) {
  99. arr.push({ productSn: item.productSn, putQty: item.putQty })
  100. }
  101. })
  102. const params = {
  103. replenishBillSn: this.replenishBillSn,
  104. detailList: arr
  105. }
  106. shelfReplenishPutStock(params).then(res => {
  107. if(res.status == 200){
  108. uni.$emit('refreshBL')
  109. uni.navigateBack()
  110. }
  111. this.toashMsg(res.message)
  112. })
  113. }
  114. }
  115. }
  116. </script>
  117. <style lang="less">
  118. .replenishment-outWarehousing-wrap{
  119. position: relative;
  120. width: 100%;
  121. height: 100%;
  122. overflow: hidden;
  123. padding-bottom: 136upx;
  124. .replenishment-outWarehousing-body{
  125. padding: 0 30rpx;
  126. height: 100%;
  127. overflow: auto;
  128. > view{
  129. padding: 10rpx 25rpx;
  130. background-color: #fff;
  131. margin-bottom: 20rpx;
  132. border-radius: 25rpx;
  133. box-shadow: 2rpx 3rpx 5rpx #eee;
  134. }
  135. .head-info{
  136. .states{
  137. border: 0;
  138. padding: 20rpx 0;
  139. > view{
  140. color: #191919;
  141. text-align: center;
  142. font-size: 40rpx;
  143. text{
  144. margin-left: 20rpx;
  145. }
  146. }
  147. }
  148. .info-txt{
  149. word-break: break-word;
  150. }
  151. font-size: 30rpx;
  152. > view{
  153. display: flex;
  154. border-bottom: 2rpx solid #f5f5f5;
  155. padding: 20rpx 0;
  156. > view:last-child{
  157. flex-grow: 1;
  158. width: 80%;
  159. }
  160. &:last-child{
  161. border:0;
  162. }
  163. }
  164. .label{
  165. display: flex;
  166. align-items: center;
  167. width: 220rpx;
  168. height: 44rpx;
  169. color: #7C7D7E;
  170. text{
  171. margin-left: 10rpx;
  172. }
  173. }
  174. }
  175. }
  176. .replenishment-outWarehousing-footer{
  177. padding: 26upx 32upx 30upx;
  178. background-color: #fff;
  179. position: fixed;
  180. left: 0;
  181. bottom: 0;
  182. width: 100%;
  183. box-shadow: 3px 1px 7px #eee;
  184. display: flex;
  185. justify-content: space-between;
  186. align-items: center;
  187. .button{
  188. width: 45%;
  189. }
  190. }
  191. }
  192. </style>