outWarehousing.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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="" 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. }
  125. </script>
  126. <style lang="less">
  127. page {
  128. height: 100vh;
  129. }
  130. .replenishment-outWarehousing-wrap{
  131. position: relative;
  132. width: 100%;
  133. height: 100%;
  134. overflow: hidden;
  135. padding-bottom: 136upx;
  136. .replenishment-outWarehousing-body{
  137. padding: 0 30rpx;
  138. height: 100%;
  139. overflow: auto;
  140. > view{
  141. padding: 10rpx 25rpx;
  142. background-color: #fff;
  143. margin-bottom: 20rpx;
  144. border-radius: 25rpx;
  145. box-shadow: 2rpx 3rpx 5rpx #eee;
  146. }
  147. .head-info{
  148. .states{
  149. border: 0;
  150. padding: 20rpx 0;
  151. > view{
  152. color: #191919;
  153. text-align: center;
  154. font-size: 40rpx;
  155. text{
  156. margin-left: 20rpx;
  157. }
  158. }
  159. }
  160. .info-txt{
  161. word-break: break-word;
  162. }
  163. font-size: 30rpx;
  164. > view{
  165. display: flex;
  166. border-bottom: 2rpx solid #f5f5f5;
  167. padding: 20rpx 0;
  168. > view:last-child{
  169. flex-grow: 1;
  170. width: 80%;
  171. }
  172. &:last-child{
  173. border:0;
  174. }
  175. }
  176. .label{
  177. display: flex;
  178. align-items: center;
  179. width: 220rpx;
  180. height: 44rpx;
  181. color: #7C7D7E;
  182. text{
  183. margin-left: 10rpx;
  184. }
  185. }
  186. }
  187. }
  188. .replenishment-outWarehousing-footer{
  189. padding: 26upx 32upx 30upx;
  190. background-color: #fff;
  191. position: fixed;
  192. left: 0;
  193. bottom: 0;
  194. width: 100%;
  195. box-shadow: 3px 1px 7px #eee;
  196. display: flex;
  197. justify-content: space-between;
  198. align-items: center;
  199. .button{
  200. width: 45%;
  201. }
  202. }
  203. }
  204. </style>