123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 |
- <template>
- <view class="replenishment-outWarehousing-wrap" :style="`backgroundImage:linear-gradient(180deg, ${$config('primaryColor')}, #F5F6F7 12%)`">
- <view class="replenishment-outWarehousing-body">
- <view class="head-info" v-if="basicInfoData">
- <view class="states">
- <view>
- <u-icon name="icon_out" custom-prefix="iscm-icon" size="48"></u-icon>
- <text>待出库</text>
- </view>
- </view>
- <view>
- <view class="label"><u-icon name="ison_shelf" custom-prefix="iscm-icon" size="32"></u-icon><text>货架名称</text></view>
- <view class="info-txt">{{basicInfoData.shelfInfo&&basicInfoData.shelfInfo.shelfName || '--'}}</view>
- </view>
- <view>
- <view class="label"><u-icon name="icon_position" custom-prefix="iscm-icon" size="32"></u-icon><text>客户地址</text></view>
- <view class="info-txt">{{basicInfoData.customerAddr || '--'}}</view>
- </view>
- </view>
- <view class="part-list">
- <!-- 配件列表 -->
- <partList :list="partList" title="配件列表" model="view" fromPage="replenishmentOut" ref="partList" noDataText="暂无配件"></partList>
- </view>
- </view>
- <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="" type="success" :custom-style="customStyle" hover-class="none" shape="circle">发货出库</u-button>
- </view>
- <!-- 打印贴签 -->
- <print-sticker-modal :openModal="printModal" @confirm="modalPrint" @close="printModal=false" />
- </view>
- </template>
- <script>
- import printStickerModal from './printStickerModal.vue'
- import { shelfReplenishDetail, shelfReplenishDetailList, shelfReplenishPutStock } from '@/api/shelfReplenish'
- import partList from '@/pages/common/partList.vue'
- export default {
- components: { partList, printStickerModal },
- data() {
- return {
- replenishBillSn: '',
- basicInfoData:null,
- partList: [],
- customStyle: {
- borderRadius:'100rpx',
- fontSize:'30rpx',
- background: this.$config('primaryColor')
- },
- customDefalutStyle: {
- borderRadius:'100rpx',
- fontSize:'30rpx',
- color: this.$config('primaryColor'),
- background: '#fff'
- },
- printModal: false
- }
- },
- onReady() {
- uni.setNavigationBarColor({
- frontColor: '#ffffff',
- backgroundColor: this.$config('primaryColor')
- })
- },
- onLoad(option) {
- this.replenishBillSn = option.sn
- this.getDetail()
- this.getPartList()
- },
- methods: {
- // 查询详情
- getDetail(){
- shelfReplenishDetail({ sn: this.replenishBillSn }).then(res => {
- if(res.status == 200){
- this.basicInfoData = res.data || null
- }else{
- this.basicInfoData = null
- }
- })
- },
- // 查询列表
- getPartList(){
- const _this = this
- shelfReplenishDetailList({ replenishBillSn: this.replenishBillSn }).then(res => {
- if(res.status == 200 && res.data){
- res.data.map(item =>{
- item.confirmQty = item.confirmQty ? Number(item.confirmQty) : 0
- })
- this.partList = res.data || []
- }else{
- this.partList = []
- }
- })
- },
- // 确认签收 confirm
- modalConfirm(){
- const arr = []
- this.partList.map((item, index) => {
- if (item.putQty || item.putQty == 0) {
- arr.push({ productSn: item.productSn, putQty: item.putQty })
- }
- })
- const params = {
- replenishBillSn: this.replenishBillSn,
- detailList: arr
- }
- shelfReplenishPutStock(params).then(res => {
- if(res.status == 200){
- uni.$emit('refreshBL')
- uni.navigateBack()
- }
- this.toashMsg(res.message)
- })
- },
- // 打印贴签 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 })
- }
- }
- }
- }
- </script>
- <style lang="less">
- .replenishment-outWarehousing-wrap{
- position: relative;
- width: 100%;
- height: 100%;
- overflow: hidden;
- padding-bottom: 136upx;
- .replenishment-outWarehousing-body{
- padding: 0 30rpx;
- height: 100%;
- overflow: auto;
- > view{
- padding: 10rpx 25rpx;
- background-color: #fff;
- margin-bottom: 20rpx;
- border-radius: 25rpx;
- box-shadow: 2rpx 3rpx 5rpx #eee;
- }
- .head-info{
- .states{
- border: 0;
- padding: 20rpx 0;
- > view{
- color: #191919;
- text-align: center;
- font-size: 40rpx;
- text{
- margin-left: 20rpx;
- }
- }
- }
- .info-txt{
- word-break: break-word;
- }
- font-size: 30rpx;
- > view{
- display: flex;
- border-bottom: 2rpx solid #f5f5f5;
- padding: 20rpx 0;
- > view:last-child{
- flex-grow: 1;
- width: 80%;
- }
- &:last-child{
- border:0;
- }
- }
- .label{
- display: flex;
- align-items: center;
- width: 220rpx;
- height: 44rpx;
- color: #7C7D7E;
- text{
- margin-left: 10rpx;
- }
- }
- }
- }
- .replenishment-outWarehousing-footer{
- padding: 26upx 32upx 30upx;
- background-color: #fff;
- position: fixed;
- left: 0;
- bottom: 0;
- width: 100%;
- box-shadow: 3px 1px 7px #eee;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .button{
- width: 45%;
- }
- }
- }
- </style>
|