outWarehousing.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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.shelfInfo&&basicInfoData.shelfInfo.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.customerAddr}}</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="printModal=true" :custom-style="customDefalutStyle" hover-class="none" shape="circle">打印标签</u-button>
  27. <u-button class="button" @click="goSendOutGoods" type="success" :custom-style="customStyle" hover-class="none" shape="circle">发货出库</u-button>
  28. </view>
  29. <!-- 打印贴签 -->
  30. <print-sticker-modal :openModal="printModal" @confirm="modalPrint" @close="printModal=false" />
  31. </view>
  32. </template>
  33. <script>
  34. import printStickerModal from './printStickerModal.vue'
  35. import { shelfReplenishDetail, shelfReplenishDetailList, shelfReplenishPutStock } from '@/api/shelfReplenish'
  36. import partList from '@/pages/common/partList.vue'
  37. export default {
  38. components: { partList, printStickerModal },
  39. data() {
  40. return {
  41. replenishBillSn: '',
  42. basicInfoData:null,
  43. partList: [],
  44. customStyle: {
  45. borderRadius:'100rpx',
  46. fontSize:'30rpx',
  47. background: this.$config('primaryColor')
  48. },
  49. customDefalutStyle: {
  50. borderRadius:'100rpx',
  51. fontSize:'30rpx',
  52. color: this.$config('primaryColor'),
  53. background: '#fff'
  54. },
  55. printModal: 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.sn
  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. // 打印贴签 confirm
  115. modalPrint(type){
  116. this.printModal = false
  117. if(type == 'manual'){ // 手动打印
  118. uni.navigateTo({ url: "/pages/replenishmentManage/manualPrint?sn="+this.replenishBillSn })
  119. }else if(type == 'scan'){ // 扫码打印
  120. uni.navigateTo({ url: "/pages/replenishmentManage/scanCodePrint?sn="+this.replenishBillSn })
  121. }
  122. },
  123. // 发货出库
  124. goSendOutGoods(){
  125. uni.navigateTo({ url: "/pages/replenishmentManage/sendOutGoods?sn="+this.replenishBillSn+'&shelfSn='+this.basicInfoData.shelfSn })
  126. }
  127. }
  128. }
  129. </script>
  130. <style lang="less">
  131. page {
  132. height: 100vh;
  133. }
  134. .replenishment-outWarehousing-wrap{
  135. position: relative;
  136. width: 100%;
  137. height: 100%;
  138. overflow: hidden;
  139. padding-bottom: 136upx;
  140. .replenishment-outWarehousing-body{
  141. padding: 0 30rpx;
  142. height: 100%;
  143. overflow: auto;
  144. > view{
  145. padding: 10rpx 25rpx;
  146. background-color: #fff;
  147. margin-bottom: 20rpx;
  148. border-radius: 25rpx;
  149. box-shadow: 2rpx 3rpx 5rpx #eee;
  150. }
  151. .head-info{
  152. .states{
  153. border: 0;
  154. padding: 20rpx 0;
  155. > view{
  156. color: #191919;
  157. text-align: center;
  158. font-size: 40rpx;
  159. text{
  160. margin-left: 20rpx;
  161. }
  162. }
  163. }
  164. .info-txt{
  165. word-break: break-word;
  166. }
  167. font-size: 30rpx;
  168. > view{
  169. display: flex;
  170. border-bottom: 2rpx solid #f5f5f5;
  171. padding: 20rpx 0;
  172. > view:last-child{
  173. flex-grow: 1;
  174. width: 80%;
  175. }
  176. &:last-child{
  177. border:0;
  178. }
  179. }
  180. .label{
  181. display: flex;
  182. align-items: center;
  183. width: 220rpx;
  184. height: 44rpx;
  185. color: #7C7D7E;
  186. text{
  187. margin-left: 10rpx;
  188. }
  189. }
  190. }
  191. }
  192. .replenishment-outWarehousing-footer{
  193. padding: 26upx 32upx 30upx;
  194. background-color: #fff;
  195. position: fixed;
  196. left: 0;
  197. bottom: 0;
  198. width: 100%;
  199. box-shadow: 3px 1px 7px #eee;
  200. display: flex;
  201. justify-content: space-between;
  202. align-items: center;
  203. .button{
  204. width: 45%;
  205. }
  206. }
  207. }
  208. </style>