| | |
| | | <template> |
| | | <view class="has-foot"> |
| | | <form> |
| | | <view class="flex solid-bottom padding-sm justify-between"> |
| | | <view class="text-grey margin-left">已选物料信息:{{container}}</view> |
| | | </view> |
| | | |
| | | <view class="cu-form-group margin-top"> |
| | | <view class="title">空桶接驳站点</view> |
| | | <input placeholder="请扫描空桶接驳站点条码" v-model="barcode" ></input> |
| | | <!-- <text class='cuIcon-search text-blue' @click="search"></text> --> |
| | | </view> |
| | | |
| | | <view class="cu-bar btn-group top margin-top"> |
| | | <button class="cu-btn text-blue line-blue shadow" @click="clear">1.呼叫空桶</button> |
| | | <!-- <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">2.呼叫袋装新料</button> --> |
| | | <!-- <button class="ccu-btn bg-blue shadow-blur shadow-blur" @click="clear">呼叫袋装新料</button> |
| | | <button class="ccu-btn bg-blue shadow-blur shadow-blur" @click="clear">呼叫空桶</button> --> |
| | | <!-- <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">入库</button> --> |
| | | <input |
| | | placeholder="请扫描空桶接驳站点条码" |
| | | v-model="sta1" |
| | | /> |
| | | </view> |
| | | |
| | | <view class="cu-form-group margin-top"> |
| | | <view class="title">袋装新料接驳站点</view> |
| | | <input placeholder="请扫描袋装新料接驳站点条码" v-model="barcode" ></input> |
| | | <!-- <text class='cuIcon-search text-blue' @click="search"></text> --> |
| | | </view> |
| | | |
| | | <view class="cu-bar btn-group top margin-top"> |
| | | <!-- <button class="cu-btn text-blue line-blue shadow" @click="clear">1.呼叫空桶</button> --> |
| | | <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">2.呼叫袋装新料</button> |
| | | <!-- <button class="ccu-btn bg-blue shadow-blur shadow-blur" @click="clear">呼叫袋装新料</button> |
| | | <button class="ccu-btn bg-blue shadow-blur shadow-blur" @click="clear">呼叫空桶</button> --> |
| | | <!-- <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">入库</button> --> |
| | | </view> |
| | | |
| | | <view class="cu-form-group margin-top"> |
| | | <view class="title">容器号</view> |
| | | <input placeholder="请扫需要入库容器条码" v-model="container"></input> |
| | | <text class='cuIcon-search text-blue' @click="search"></text> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <!-- <view class="cu-form-group"> |
| | | <view class="title">目标库区</view> |
| | | <view style="width: 75%;"> |
| | | <uni-data-select style="min-width: 50%; max-width: 100%;" v-model="whAreaId" :localdata="range" |
| | | placement="bottom" @change="selChange"></uni-data-select> |
| | | </view> |
| | | </view> --> |
| | | |
| | | <view class="cu-bar btn-group top margin-top"> |
| | | <button class="cu-btn bg-green shadow-blur" @click="clear">3.桶装新料入库</button> |
| | | <button |
| | | class="cu-btn text-blue line-blue shadow" |
| | | @click="sta1Click()" |
| | | > |
| | | 1.呼叫空桶 |
| | | </button> |
| | | </view> |
| | | |
| | | <view class="cu-form-group margin-top"> |
| | | <view class="title">袋装新料接驳站点</view> |
| | | <input |
| | | placeholder="请扫描袋装新料接驳站点条码" |
| | | v-model="sta2" |
| | | /> |
| | | </view> |
| | | |
| | | <view class="cu-bar btn-group top margin-top"> |
| | | <button |
| | | class="cu-btn bg-blue shadow-blur" |
| | | :disabled="repeatClick" |
| | | @click="sta2Click()" |
| | | > |
| | | 2.呼叫袋装新料 |
| | | </button> |
| | | </view> |
| | | |
| | | <view class="cu-bar btn-group top margin-top"> |
| | | <button |
| | | class="cu-btn bg-green shadow-blur" |
| | | @click="toComb" |
| | | > |
| | | 3.去组托 |
| | | </button> |
| | | </view> |
| | | <view class="cu-bar btn-group top margin-top"> |
| | | <button |
| | | class="cu-btn bg-green shadow-blur" |
| | | @click="toIn" |
| | | > |
| | | 4.去入库 |
| | | </button> |
| | | </view> |
| | | </form> |
| | | |
| | | |
| | | <view class="cu-list det menu sm-border padding"> |
| | | <block v-for="(item, index) in list" :key="index"> |
| | | <view class="cu-list det menu sm-border padding"> |
| | | <block |
| | | v-for="(item, index) in list" |
| | | :key="index" |
| | | > |
| | | <view class="cu-bar bg-white solid-bottom margin-top-sm"> |
| | | <view class="action"> |
| | | <view class="index"> |
| | | {{index+1}} |
| | | {{ index + 1 }} |
| | | </view> |
| | | <view class="text-blue"> |
| | | {{`${item.maktx}`}} |
| | | {{ `${item.maktx}` }} |
| | | </view> |
| | | </view> |
| | | <!-- <view class="action" > |
| | | <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text> |
| | | </view> --> |
| | | </view> |
| | | |
| | | <view class="cu-item"> |
| | |
| | | <text class="text-black">ASN:</text> |
| | | </view> |
| | | <view class="action"> |
| | | <text class="text-grey ">{{item.asnCode}}</text> |
| | | <text class="text-grey">{{ item.asnCode }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="cu-item"> |
| | |
| | | <text class="text-black">批次:</text> |
| | | </view> |
| | | <view class="action"> |
| | | <text class="text-grey ">{{item.batch}}</text> |
| | | <text class="text-grey">{{ item.batch }}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">收货数量:</text> |
| | | </view> |
| | | <view class="action"> |
| | | <text class="text-grey ">{{item.anfme}}</text> |
| | | <text class="text-grey">{{ item.anfme }}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | </block> |
| | | </view> |
| | | |
| | | |
| | | <!-- <view class="cu-bar btn-group foot"> |
| | | <button class="cu-btn text-blue line-blue shadow" @click="clear">清空</button> |
| | | <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">入库</button> |
| | | </view> --> |
| | | |
| | | |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | request |
| | | } from '../../common/request.js' |
| | | import { |
| | | mapState, |
| | | mapMutations, |
| | | mapActions, |
| | | mapGetters |
| | | } from 'vuex'; |
| | | export default { |
| | | data() { |
| | | return { |
| | | barcode: '', |
| | | areaName: '', |
| | | locCode: '', |
| | | container: '', |
| | | list: [], |
| | | range: [], |
| | | curCode: '', |
| | | whAreaId:'', |
| | | repeatClick: false, |
| | | |
| | | import { request } from '../../common/request.js' |
| | | import { mapState, mapMutations, mapActions, mapGetters } from 'vuex' |
| | | export default { |
| | | data() { |
| | | return { |
| | | barcode: '', |
| | | areaName: '', |
| | | locCode: '', |
| | | container: '', |
| | | list: [], |
| | | range: [], |
| | | curCode: '', |
| | | whAreaId: '', |
| | | repeatClick: false, |
| | | sta1: '', |
| | | sta2: '' |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState('user', ['dynamicFields']) |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | async sta1Click() { |
| | | let that = this |
| | | const { code, data, msg } = await request( |
| | | '/orderOut/buffStore/callEmpty', |
| | | { |
| | | sta1: this.sta1 |
| | | }, |
| | | 'POST' |
| | | ) |
| | | if (code === 200) { |
| | | uni.showToast({ |
| | | title: '呼叫成功' |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState('user', ['dynamicFields']), |
| | | }, |
| | | mounted() { |
| | | this.getRece() |
| | | this.whAreaId = uni.getStorageSync('whAreaId') |
| | | }, |
| | | methods: { |
| | | selChange(val) { |
| | | uni.setStorageSync('whAreaId', val) |
| | | }, |
| | | async search() { |
| | | let that = this |
| | | const { |
| | | code, |
| | | data, |
| | | msg |
| | | } = await request('/staBind/list', { |
| | | sta: this.barcode |
| | | async sta2Click() { |
| | | let that = this |
| | | const { code, data, msg } = await request( |
| | | '/orderOut/buffStore/callNewMat', |
| | | { |
| | | sta1: this.sta1 |
| | | }, |
| | | 'POST' |
| | | ) |
| | | if (code === 200) { |
| | | uni.showToast({ |
| | | title: '呼叫成功' |
| | | }) |
| | | if (code === 200) { |
| | | if(data.list.length >0){ |
| | | that.container = data.barcode |
| | | that.list = data.list |
| | | } |
| | | that.range = data.warehouseAreasList.map(item => ({ |
| | | value: item.id, |
| | | text: item.name |
| | | })); |
| | | that.whAreaId = data.area |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: "none", |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | toComb() { |
| | | uni.navigateTo({ |
| | | url: '/pages/listing/matnrPalletising' |
| | | }) |
| | | }, |
| | | toIn() { |
| | | uni.navigateTo({ |
| | | url: '/pages/AGV/StartInTask' |
| | | }) |
| | | }, |
| | | selChange(val) { |
| | | uni.setStorageSync('whAreaId', val) |
| | | }, |
| | | async search() { |
| | | let that = this |
| | | const { code, data, msg } = await request('/staBind/list', { |
| | | sta: this.barcode |
| | | }) |
| | | if (code === 200) { |
| | | if (data.list.length > 0) { |
| | | that.container = data.barcode |
| | | that.list = data.list |
| | | } |
| | | }, |
| | | that.range = data.warehouseAreasList.map((item) => ({ |
| | | value: item.id, |
| | | text: item.name |
| | | })) |
| | | that.whAreaId = data.area |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | remove(index) { |
| | | this.list.splice(index, 1); |
| | | }, |
| | | clear() { |
| | | this.list = [] |
| | | |
| | | this.container = '' |
| | | this.barcode = '' |
| | | }, |
| | | remove(index) { |
| | | this.list.splice(index, 1) |
| | | }, |
| | | clear() { |
| | | this.list = [] |
| | | |
| | | open() { |
| | | this.$refs.popup.open() |
| | | }, |
| | | this.container = '' |
| | | this.barcode = '' |
| | | }, |
| | | |
| | | close() { |
| | | this.$refs.popup.close() |
| | | }, |
| | | open() { |
| | | this.$refs.popup.open() |
| | | }, |
| | | |
| | | popupSubmit() { |
| | | this.$refs.popup.close() |
| | | }, |
| | | itemChange(el) { |
| | | this.curCode = el |
| | | }, |
| | | close() { |
| | | this.$refs.popup.close() |
| | | }, |
| | | |
| | | async confirm() { |
| | | if(this.barcode === '' || this.barcode ===null){ |
| | | uni.showToast({ |
| | | title: "接驳站点不能为空", |
| | | icon: "none", |
| | | }) |
| | | return ; |
| | | } |
| | | if(this.whAreaId === '' || this.whAreaId ===null){ |
| | | uni.showToast({ |
| | | title: "目标库区不能为空", |
| | | icon: "none", |
| | | }) |
| | | return ; |
| | | } |
| | | this.repeatClick = true |
| | | const { |
| | | code, |
| | | data, |
| | | msg |
| | | } = await request('/AGV/task/start',{ |
| | | sta: this.barcode, |
| | | area: this.whAreaId |
| | | } |
| | | ) |
| | | if (code === 200) { |
| | | uni.showToast({ |
| | | title: '启动成功' |
| | | }) |
| | | this.clear() |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: "none", |
| | | }) |
| | | } |
| | | this.repeatClick = false |
| | | }, |
| | | |
| | | async getRece() { |
| | | const { |
| | | code, |
| | | data, |
| | | msg |
| | | } = await request('/areas/receipt', {}, 'get') |
| | | if (code === 200) { |
| | | this.range = data.map(item => ({ |
| | | value: item.id, |
| | | text: item.warehouseId$ + "-- " + item.name |
| | | })); |
| | | } |
| | | }, |
| | | popupSubmit() { |
| | | this.$refs.popup.close() |
| | | }, |
| | | itemChange(el) { |
| | | this.curCode = el |
| | | }, |
| | | |
| | | async confirm() { |
| | | if (this.barcode === '' || this.barcode === null) { |
| | | uni.showToast({ |
| | | title: '接驳站点不能为空', |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | if (this.whAreaId === '' || this.whAreaId === null) { |
| | | uni.showToast({ |
| | | title: '目标库区不能为空', |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | this.repeatClick = true |
| | | const { code, data, msg } = await request('/AGV/task/start', { |
| | | sta: this.barcode, |
| | | area: this.whAreaId |
| | | }) |
| | | if (code === 200) { |
| | | uni.showToast({ |
| | | title: '启动成功' |
| | | }) |
| | | this.clear() |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | this.repeatClick = false |
| | | }, |
| | | |
| | | async getRece() { |
| | | const { code, data, msg } = await request( |
| | | '/areas/receipt', |
| | | {}, |
| | | 'get' |
| | | ) |
| | | if (code === 200) { |
| | | this.range = data.map((item) => ({ |
| | | value: item.id, |
| | | text: item.warehouseId$ + '-- ' + item.name |
| | | })) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .index { |
| | | border: 1px solid #e54d42; |
| | | color: #e54d42; |
| | | border-radius: 50%; |
| | | display: block; |
| | | width: 50rpx; |
| | | height: 50rpx; |
| | | line-height: 48rpx; |
| | | text-align: center; |
| | | margin-right: 20rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | .index { |
| | | border: 1px solid #e54d42; |
| | | color: #e54d42; |
| | | border-radius: 50%; |
| | | display: block; |
| | | width: 50rpx; |
| | | height: 50rpx; |
| | | line-height: 48rpx; |
| | | text-align: center; |
| | | margin-right: 20rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | .text-blue { |
| | | color: #0081ff !important; |
| | | .text-blue { |
| | | color: #0081ff !important; |
| | | } |
| | | |
| | | } |
| | | .item { |
| | | position: relative; |
| | | display: flex; |
| | | min-height: 80upx; |
| | | align-items: center; |
| | | } |
| | | |
| | | .item { |
| | | position: relative; |
| | | display: flex; |
| | | min-height: 80upx; |
| | | align-items: center; |
| | | } |
| | | .uni-file-picker { |
| | | width: 100%; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .uni-file-picker { |
| | | width: 100%; |
| | | margin-bottom: 10px; |
| | | } |
| | | .uni-select__selector { |
| | | z-index: 999; |
| | | } |
| | | |
| | | .uni-select__selector { |
| | | z-index: 999; |
| | | } |
| | | .tj { |
| | | height: auto; |
| | | padding: 6px 8px; |
| | | display: inline-block; |
| | | border-radius: 6px; |
| | | } |
| | | |
| | | .tj { |
| | | height: auto; |
| | | padding: 6px 8px; |
| | | display: inline-block; |
| | | border-radius: 6px; |
| | | } |
| | | .item { |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .item { |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .item .cu-btn { |
| | | font-size: 26upx; |
| | | } |
| | | </style> |
| | | .item .cu-btn { |
| | | font-size: 26upx; |
| | | } |
| | | </style> |
| | |
| | | <input |
| | | placeholder="请扫容器条码" |
| | | v-model="container" |
| | | @input="search" |
| | | /> |
| | | <!-- <text class='cuIcon-search text-blue' @click="search"></text> --> |
| | | </view> |
| | |
| | | </view> |
| | | </form> |
| | | |
| | | <view class="cu-list det menu sm-border padding"> |
| | | <view |
| | | class="padding-lr margin-top-sm" |
| | | style="padding-bottom: 120upx" |
| | | > |
| | | <block |
| | | v-for="(item, index) in list" |
| | | :key="index" |
| | | > |
| | | <view class="cu-bar bg-white solid-bottom margin-top-sm"> |
| | | <view class="action"> |
| | | <view class="index"> |
| | | {{ index + 1 }} |
| | | <view |
| | | class="cu-list det menu sm-border margin-bottom-sm" |
| | | :class="[item.trackCode === barcode && 'act']" |
| | | :ref="item.trackCode + 'ref'" |
| | | > |
| | | <view class="cu-bar bg-white solid-bottom"> |
| | | <view class="action"> |
| | | <view class="index"> |
| | | {{ index + 1 }} |
| | | </view> |
| | | <view class="text-blue"> |
| | | 物料编码: |
| | | {{ `${item.matnrCode}` }} |
| | | </view> |
| | | </view> |
| | | <view class="text-blue"> |
| | | {{ `${item.maktx}` }} |
| | | <view |
| | | class="action" |
| | | v-if="!isconfirm" |
| | | > |
| | | <text |
| | | @click="remove(index)" |
| | | class="cuIcon-close text-red" |
| | | style="font-size: 24px" |
| | | ></text> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="action" > |
| | | <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text> |
| | | </view> --> |
| | | </view> |
| | | |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">ASN:</text> |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">物料名称:</text> |
| | | <text class="text-grey">{{ item.maktx }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="action"> |
| | | <text class="text-grey">{{ item.asnCode }}</text> |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">单据编码:</text> |
| | | </view> |
| | | <view class="action"> |
| | | <text class="text-grey"> |
| | | {{ item.platOrderCode }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">批次:</text> |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">计划跟踪号:</text> |
| | | </view> |
| | | <view class="action"> |
| | | <text class="text-grey"> |
| | | {{ item.platWorkCode }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | <view class="action"> |
| | | <text class="text-grey">{{ item.batch }}</text> |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">批次:</text> |
| | | </view> |
| | | <view class="action"> |
| | | <text class="text-grey">{{ item.splrBatch }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">收货数量:</text> |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black"> |
| | | 单位: |
| | | <text class="text-grey"> |
| | | {{ item.unit }} |
| | | </text> |
| | | </text> |
| | | </view> |
| | | <view class="content"> |
| | | <text class="text-black"> |
| | | 收货数量: |
| | | <text class="text-grey">{{ item.anfme }}</text> |
| | | </text> |
| | | </view> |
| | | <!-- <view class="content"> |
| | | <text class="text-black">已上架数量: <text |
| | | class="text-grey ">{{item.workQty + item.qty}}</text></text> |
| | | </view> --> |
| | | </view> |
| | | <view class="action"> |
| | | <text class="text-grey">{{ item.anfme }}</text> |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black"> |
| | | 可用数量: |
| | | <text class="text-grey"> |
| | | {{ item.ableQty }} |
| | | </text> |
| | | </text> |
| | | </view> |
| | | </view> |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <view class="cu-form-group padding-lr-0"> |
| | | <view class="title text-blue"> |
| | | <text |
| | | class="text-red text-xl vertical-middle" |
| | | > |
| | | * |
| | | </text> |
| | | 换绑数量: |
| | | </view> |
| | | <uni-number-box |
| | | style="width: 70%" |
| | | :min="0" |
| | | :max="item.ableQty" |
| | | :decimal="2" |
| | | :step="0.01" |
| | | v-model="item.inputQty" |
| | | ></uni-number-box> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </block> |
| | |
| | | curCode: '', |
| | | agvStationInput: '', // AGV站点输入值 |
| | | agvStationName: '', |
| | | buttonPermissions: [] // 按钮权限列表 |
| | | buttonPermissions: [], // 按钮权限列表, |
| | | isconfirm: false |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | console.log('当前页面按钮权限:', this.buttonPermissions) |
| | | }, |
| | | methods: { |
| | | async checkAgvStation() { |
| | | const that = this |
| | | if (this.container === '' || this.container === null) { |
| | | uni.showToast({ |
| | | title: '容器码为空', |
| | | icon: 'none', |
| | | position: 'top' |
| | | }) |
| | | return |
| | | } |
| | | const { code, data, msg } = await request('/check/agvStation', { |
| | | transferStationNo: this.agvStationInput |
| | | }) |
| | | if (code === 200) { |
| | | this.agvStationName = data.stationName |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: 'none', |
| | | position: 'top' |
| | | }) |
| | | setTimeout(function () { |
| | | that.agvStationName = '' |
| | | that.agvStationInput = '' |
| | | }, 200) |
| | | } |
| | | }, |
| | | async search() { |
| | | const { code, data, msg } = await request('/stock/operate/list', { |
| | | barcode: this.container, |
| | | sta: this.barcode |
| | | }) |
| | | const { code, data, msg } = await request( |
| | | '/orderOut/taskItemList', |
| | | { |
| | | containerNo: this.container |
| | | } |
| | | ) |
| | | if (code === 200) { |
| | | // const find = this.list.find(el => el.id === data.id); |
| | | // !find && |
| | | this.list = data |
| | | } else { |
| | | uni.showToast({ |
| | |
| | | }) |
| | | return |
| | | } |
| | | if ( |
| | | this.list === '' || |
| | | this.list === null || |
| | | this.list.length === 0 |
| | | ) { |
| | | uni.showToast({ |
| | | title: '明细不能为空', |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | const { code, data, msg } = await request( |
| | | '/orderOut/containerRebinding', |
| | | { |
| | | containerNo: this.container, |
| | | newContainerNo: this.newContainer |
| | | newContainerNo: this.newContainer, |
| | | taskItemList: this.list |
| | | } |
| | | ) |
| | | if (code === 200) { |
| | |
| | | <text class="header-value">{{ order.wkType$ || '-' }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="header-actions"> |
| | | <button |
| | | class="cu-btn bg-white text-blue round header-btn" |
| | | :disabled="waveLoading" |
| | | @click="generateWave" |
| | | > |
| | | {{ waveLoading ? '生成中...' : '生成波次' }} |
| | | </button> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 搜索框 --> |
| | |
| | | condition: '', |
| | | menuList: [], |
| | | order: '', |
| | | loading: false |
| | | loading: false, |
| | | waveLoading: false |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | this.loading = false |
| | | } |
| | | }, |
| | | // 生成波次 |
| | | async generateWave() { |
| | | if (!this.order || !this.order.code || this.waveLoading) return |
| | | this.waveLoading = true |
| | | try { |
| | | const res = await request('/orderOut/all/in', { |
| | | ids: [this.order.id], |
| | | waveRuleId: 16 |
| | | }) |
| | | |
| | | if (res.code === 200) { |
| | | uni.showToast({ |
| | | title: res.msg || '波次生成成功', |
| | | icon: 'none', |
| | | position: 'top' |
| | | }) |
| | | this.getOrderNoList(this.order) |
| | | } else if (res.code === 403) { |
| | | uni.showToast({ |
| | | title: res.msg, |
| | | icon: 'none', |
| | | position: 'top' |
| | | }) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ url: '../login/login' }) |
| | | }, 1000) |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.msg || '波次生成失败', |
| | | icon: 'none', |
| | | position: 'top' |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | // request.js 已经处理了错误提示 |
| | | } finally { |
| | | this.waveLoading = false |
| | | } |
| | | }, |
| | | // 选择明细进行出库 |
| | | chose(item) { |
| | | if (item.ableQty <= 0) { |
| | |
| | | padding: 12rpx 16rpx; |
| | | } |
| | | |
| | | .header-actions { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | margin-top: 16rpx; |
| | | } |
| | | |
| | | .header-btn { |
| | | min-width: 180rpx; |
| | | } |
| | | |
| | | .header-row { |
| | | display: flex; |
| | | justify-content: space-between; |