|
@@ -23,20 +23,22 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="replenishment-outWarehousing-footer">
|
|
<view class="replenishment-outWarehousing-footer">
|
|
- <u-button class="button" @click="printModal=true" :custom-style="customDefalutStyle" hover-class="none" shape="circle">打印标签</u-button>
|
|
|
|
- <u-button class="button" @click="goSendOutGoods" :loading="loading" type="success" :custom-style="customStyle" hover-class="none" shape="circle">发货出库</u-button>
|
|
|
|
|
|
+ <u-button class="button" @click="goSendOutGoods" :custom-style="customDefalutStyle" hover-class="none" shape="circle">扫码出库</u-button>
|
|
|
|
+ <u-button class="button" @click="confirmModal=true" :loading="loading" type="success" :custom-style="customStyle" hover-class="none" shape="circle">一键出库</u-button>
|
|
</view>
|
|
</view>
|
|
- <!-- 打印贴签 -->
|
|
|
|
- <print-sticker-modal :openModal="printModal" @confirm="modalPrint" @close="printModal=false" />
|
|
|
|
|
|
+ <!-- 一键出库弹框 -->
|
|
|
|
+ <common-modal :openModal="confirmModal" title="确认信息无误并进行出库吗?" confirmText="确认" @confirm="modalConfirm" @close="confirmModal=false">
|
|
|
|
+ <u-input type='textarea' v-model="remarks" :maxlength="100" placeholder="请输入出库备注(最多100字符)" border :height="100"></u-input>
|
|
|
|
+ </common-modal>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import printStickerModal from './printStickerModal.vue'
|
|
|
|
- import { shelfReplenishDetail, shelfReplenishDetailList } from '@/api/shelfReplenish'
|
|
|
|
|
|
+ import commonModal from '@/pages/common/commonModal.vue'
|
|
|
|
+ import { shelfReplenishDetail, shelfReplenishDetailList, shelfReplenishOutStock } from '@/api/shelfReplenish'
|
|
import partList from '@/pages/common/partList.vue'
|
|
import partList from '@/pages/common/partList.vue'
|
|
export default {
|
|
export default {
|
|
- components: { partList, printStickerModal },
|
|
|
|
|
|
+ components: { partList, commonModal },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
loading: false,
|
|
loading: false,
|
|
@@ -54,7 +56,8 @@
|
|
color: this.$config('primaryColor'),
|
|
color: this.$config('primaryColor'),
|
|
background: '#fff'
|
|
background: '#fff'
|
|
},
|
|
},
|
|
- printModal: false
|
|
|
|
|
|
+ confirmModal: false,
|
|
|
|
+ remarks: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onReady() {
|
|
onReady() {
|
|
@@ -93,14 +96,36 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 打印贴签 confirm
|
|
|
|
- modalPrint(type){
|
|
|
|
- this.printModal = false
|
|
|
|
- if(type == 'manual'){ // 手动打印
|
|
|
|
- uni.navigateTo({ url: "/pages/replenishmentManage/manualPrint?sn="+this.replenishBillSn })
|
|
|
|
- }else if(type == 'scan'){ // 扫码打印
|
|
|
|
- uni.navigateTo({ url: "/pages/replenishmentManage/scanCodePrint?sn="+this.replenishBillSn })
|
|
|
|
|
|
+ // 一键出库
|
|
|
|
+ modalConfirm(){
|
|
|
|
+ const arr = []
|
|
|
|
+ const _this = this
|
|
|
|
+ _this.partList.map((item, index) => {
|
|
|
|
+ arr.push({
|
|
|
|
+ productSn: item.productSn,
|
|
|
|
+ confirmQty: item.confirmQty,
|
|
|
|
+ replenishBillDetailSn: item.replenishBillDetailSn,
|
|
|
|
+ id: item.id
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ const params = {
|
|
|
|
+ replenishBillSn: _this.replenishBillSn,
|
|
|
|
+ detailList: arr,
|
|
|
|
+ remarks: _this.remarks,
|
|
|
|
+ shelfSn: _this.basicInfoData && _this.basicInfoData.shelfSn
|
|
}
|
|
}
|
|
|
|
+ _this.showLoading('正在出库...')
|
|
|
|
+ shelfReplenishOutStock(params).then(res => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ _this.remarks = ''
|
|
|
|
+ uni.$emit('refreshBL')
|
|
|
|
+ uni.$emit("refreshBhList",'WAIT_CHECK')
|
|
|
|
+ uni.navigateBack()
|
|
|
|
+ }
|
|
|
|
+ _this.toashMsg(res.message)
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 发货出库
|
|
// 发货出库
|
|
goSendOutGoods(){
|
|
goSendOutGoods(){
|