| | |
| | | <form> |
| | | <view class="cu-form-group margin-top"> |
| | | <view class="title">接驳站点</view> |
| | | <input placeholder="请扫描接驳站点条码" v-model="agvStationInput" @input="checkAgvStation"></input> |
| | | <!-- <text class='cuIcon-search text-blue' @click="search"></text> --> |
| | | <input |
| | | placeholder="请扫描接驳站点条码" |
| | | v-model="agvStationInput" |
| | | @input="checkAgvStation" |
| | | /> |
| | | </view> |
| | | <view class="cu-form-group" v-if="agvStationName"> |
| | | <view |
| | | class="cu-form-group" |
| | | v-if="agvStationName" |
| | | > |
| | | <view class="title">站点编码</view> |
| | | <text >{{agvStationName}}</text> |
| | | </view> |
| | | <view class="cu-form-group"> |
| | | <view class="title">容器号</view> |
| | | <input placeholder="请扫描容器编码" v-model="barcode" @input="search"></input> |
| | | <!-- <text class='cuIcon-search text-blue' @click="search"></text> --> |
| | | <input |
| | | placeholder="请扫描容器编码" |
| | | v-model="barcode" |
| | | @input="search" |
| | | /> |
| | | </view> |
| | | <!-- <view class="flex solid-bottom padding-sm justify-between"> |
| | | <view class="text-blue margin-left">容器码:{{container}}</view> |
| | | </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 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> |
| | | </form> |
| | | |
| | | |
| | | <view class="cu-list det menu sm-border padding"> |
| | | <block v-for="(item, index) in list" :key="index"> |
| | | <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"> |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">收货数量:</text> |
| | |
| | | <text class="text-grey ">{{item.anfme}}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | </block> |
| | | </view> |
| | | |
| | | |
| | | <view class="cu-bar btn-group foot"> |
| | | <button v-if="hasButtonPermission('reset')" class="cu-btn text-blue line-blue shadow" @click="clear">清空</button> |
| | | <button v-if="hasButtonPermission('submit')" class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">入库</button> |
| | | <button |
| | | v-if="hasButtonPermission('reset')" |
| | | class="cu-btn text-blue line-blue shadow" |
| | | @click="clear" |
| | | > |
| | | 清空 |
| | | </button> |
| | | <button |
| | | v-if="hasButtonPermission('submit')" |
| | | 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'; |
| | | import { request } from '../../common/request.js' |
| | | import { mapState, mapMutations, mapActions, mapGetters } from 'vuex' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState('user', ['dynamicFields']), |
| | | ...mapState('user', ['dynamicFields']) |
| | | }, |
| | | mounted() { |
| | | // this.getRece() |
| | | // this.whAreaId = uni.getStorageSync('whAreaId') |
| | | |
| | | // 获取按钮权限 |
| | | this.buttonPermissions = uni.getStorageSync('buttonPermissions') || []; |
| | | console.log('当前页面按钮权限:', this.buttonPermissions); |
| | | this.buttonPermissions = uni.getStorageSync('buttonPermissions') || [] |
| | | console.log('当前页面按钮权限:', this.buttonPermissions) |
| | | }, |
| | | methods: { |
| | | async checkAgvStation() { |
| | |
| | | transferStationNo: this.agvStationInput |
| | | }) |
| | | if (code === 200) { |
| | | this.agvStationName = data.stationName |
| | | this.agvStationName = data.stationId |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | |
| | | } |
| | | }, |
| | | hasButtonPermission(route) { |
| | | return this.buttonPermissions.includes(route); |
| | | return this.buttonPermissions.includes(route) |
| | | }, |
| | | selChange(val) { |
| | | uni.setStorageSync('whAreaId', val) |
| | |
| | | }, |
| | | |
| | | remove(index) { |
| | | this.list.splice(index, 1); |
| | | this.list.splice(index, 1) |
| | | }, |
| | | clear() { |
| | | this.list = [] |
| | |
| | | async confirm() { |
| | | if(this.agvStationName === '' || this.agvStationName ===null){ |
| | | uni.showToast({ |
| | | title: "接驳站点不能为空", |
| | | icon: "none", |
| | | title: '接驳站点不能为空', |
| | | icon: 'none' |
| | | }) |
| | | return ; |
| | | return |
| | | } |
| | | if(this.barcode === '' || this.barcode ===null){ |
| | | uni.showToast({ |
| | | title: "容器号不能为空", |
| | | icon: "none", |
| | | title: '容器号不能为空', |
| | | icon: 'none' |
| | | }) |
| | | return ; |
| | | return |
| | | } |
| | | if(this.whAreaId === '' || this.whAreaId ===null){ |
| | | uni.showToast({ |
| | | title: "目标库区不能为空", |
| | | icon: "none", |
| | | title: '目标库区不能为空', |
| | | icon: 'none' |
| | | }) |
| | | return ; |
| | | return |
| | | } |
| | | this.repeatClick = true |
| | | const { |
| | | code, |
| | | data, |
| | | msg |
| | | } = await request('/AGV/task/start',{ |
| | | staNo: this.agvStationName, |
| | | const { code, data, msg } = await request('/AGV/task/start', { |
| | | staNo: this.agvStationInput, |
| | | area: this.whAreaId, |
| | | barcode:this.barcode |
| | | } |
| | | ) |
| | | }) |
| | | if (code === 200) { |
| | | uni.showToast({ |
| | | title: '启动成功' |
| | |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: "none", |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | this.repeatClick = false |
| | | }, |
| | | |
| | | async getRece() { |
| | | const { |
| | | code, |
| | | data, |
| | | msg |
| | | } = await request('/areas/user/all', {}, 'get') |
| | | const { code, data, msg } = await request( |
| | | '/areas/user/all', |
| | | {}, |
| | | 'get' |
| | | ) |
| | | if (code === 200) { |
| | | this.range = data.map(item => ({ |
| | | this.range = data.map((item) => ({ |
| | | value: item.id, |
| | | text: item.warehouseId$ + "-- " + item.name |
| | | })); |
| | | text: item.warehouseId$ + '-- ' + item.name |
| | | })) |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | |
| | | .text-blue { |
| | | color: #0081ff !important; |
| | | |
| | | } |
| | | |
| | | .item { |
| | |
| | | <form> |
| | | <view class="cu-form-group margin-top"> |
| | | <view class="title">容器号</view> |
| | | <input placeholder="请扫容器条码" v-model="container"></input> |
| | | <input |
| | | placeholder="请扫容器条码" |
| | | v-model="container" |
| | | /> |
| | | <!-- <text class='cuIcon-search text-blue' @click="search"></text> --> |
| | | </view> |
| | | <view class="cu-form-group "> |
| | | <view class="title">接驳站点</view> |
| | | <input placeholder="请扫描接驳站点条码" v-model="agvStationInput" @input="checkAgvStation"></input> |
| | | <input |
| | | placeholder="请扫描接驳站点条码" |
| | | v-model="agvStationInput" |
| | | @input="checkAgvStation" |
| | | /> |
| | | </view> |
| | | <view class="cu-form-group"> |
| | | <view class="title">接驳站点名称</view> |
| | | <input |
| | | disabled |
| | | placeholder="这里显示站点名称" |
| | | v-model="agvStationName" |
| | | /> |
| | | </view> |
| | | </form> |
| | | |
| | | |
| | | |
| | | <view class="cu-list det menu sm-border padding"> |
| | | <block v-for="(item, index) in list" :key="index"> |
| | | <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"> |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">批次:</text> |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">收货数量:</text> |
| | |
| | | <text class="text-grey ">{{item.anfme}}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | </block> |
| | | </view> |
| | | |
| | | |
| | | <view class="cu-bar btn-group foot"> |
| | | <button v-if="hasButtonPermission('reset')" class="cu-btn text-blue line-blue shadow" @click="clear">清空</button> |
| | | <button v-if="hasButtonPermission('submit')" class="cu-btn bg-blue shadow-blur" @click="confirm">回库</button> |
| | | <button |
| | | v-if="hasButtonPermission('reset')" |
| | | class="cu-btn text-blue line-blue shadow" |
| | | @click="clear" |
| | | > |
| | | 清空 |
| | | </button> |
| | | <button |
| | | v-if="hasButtonPermission('submit')" |
| | | class="cu-btn bg-blue shadow-blur" |
| | | @click="confirm" |
| | | > |
| | | 回库 |
| | | </button> |
| | | </view> |
| | | |
| | | <uni-popup ref="popup" class="cu-popup"> |
| | | <uni-popup |
| | | ref="popup" |
| | | class="cu-popup" |
| | | > |
| | | <view class="popup-content"> |
| | | <view class="head"> |
| | | <text>推荐</text> |
| | | <text class='cuIcon-close text-red close' @click="close"></text> |
| | | <text |
| | | class="cuIcon-close text-red close" |
| | | @click="close" |
| | | ></text> |
| | | </view> |
| | | |
| | | <div class="body"> |
| | | <view class="cu-list grid col-3 no-border"> |
| | | <view class="item" v-for="el in range"> |
| | | <view class="cu-btn round sm" :class="[el===curCode?'bg-blue':'line-blue']" |
| | | @click="itemChange(el)">{{el}}</view> |
| | | <view |
| | | class="item" |
| | | v-for="el in range" |
| | | > |
| | | <view |
| | | class="cu-btn round sm" |
| | | :class="[ |
| | | el === curCode ? 'bg-blue' : 'line-blue' |
| | | ]" |
| | | @click="itemChange(el)" |
| | | > |
| | | {{ el }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </div> |
| | | |
| | | <view class="cu-bar btn-group "> |
| | | <button class="cu-btn bg-blue shadow-blur" @click="popupSubmit">提交</button> |
| | | <button |
| | | class="cu-btn bg-blue shadow-blur" |
| | | @click="popupSubmit" |
| | | > |
| | | 提交 |
| | | </button> |
| | | </view> |
| | | </view> |
| | | </uni-popup> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | request |
| | | } from '../../common/request.js' |
| | | import { |
| | | mapState, |
| | | mapMutations, |
| | | mapActions, |
| | | mapGetters |
| | | } from 'vuex'; |
| | | import { request } from '../../common/request.js' |
| | | import { mapState, mapMutations, mapActions, mapGetters } from 'vuex' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState('user', ['dynamicFields']), |
| | | ...mapState('user', ['dynamicFields']) |
| | | }, |
| | | mounted() { |
| | | // 获取按钮权限 |
| | | this.buttonPermissions = uni.getStorageSync('buttonPermissions') || []; |
| | | console.log('当前页面按钮权限:', this.buttonPermissions); |
| | | this.buttonPermissions = uni.getStorageSync('buttonPermissions') || [] |
| | | console.log('当前页面按钮权限:', this.buttonPermissions) |
| | | }, |
| | | methods: { |
| | | async checkAgvStation() { |
| | |
| | | transferStationNo: this.agvStationInput |
| | | }) |
| | | if (code === 200) { |
| | | this.agvStationName = data.stationName |
| | | this.agvStationName = data.stationId |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | |
| | | } |
| | | }, |
| | | async search() { |
| | | const { |
| | | code, |
| | | data, |
| | | msg |
| | | } = await request('/stock/operate/list', { |
| | | const { code, data, msg } = await request('/stock/operate/list', { |
| | | barcode: this.container, |
| | | sta: this.barcode |
| | | }) |
| | |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: "none", |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | // 检查按钮权限 |
| | | hasButtonPermission(route) { |
| | | return this.buttonPermissions.includes(route); |
| | | return this.buttonPermissions.includes(route) |
| | | }, |
| | | |
| | | remove(index) { |
| | | this.list.splice(index, 1); |
| | | this.list.splice(index, 1) |
| | | }, |
| | | clear() { |
| | | this.list = [] |
| | |
| | | async confirm() { |
| | | if(this.container === '' || this.container ===null){ |
| | | uni.showToast({ |
| | | title: "容器码不能为空", |
| | | icon: "none", |
| | | title: '容器码不能为空', |
| | | icon: 'none' |
| | | }) |
| | | return ; |
| | | return |
| | | } |
| | | if(this.agvStationName === '' || this.agvStationName ===null){ |
| | | uni.showToast({ |
| | | title: "接驳站码不能为空", |
| | | icon: "none", |
| | | title: '接驳站码不能为空', |
| | | icon: 'none' |
| | | }) |
| | | return ; |
| | | return |
| | | } |
| | | const { |
| | | code, |
| | | data, |
| | | msg |
| | | } = await request('/in/emptyContainer/warehousing',{ |
| | | const { code, data, msg } = await request( |
| | | '/in/emptyContainer/warehousing', |
| | | { |
| | | containerNo: this.container, |
| | | transferStationNo: this.agvStationName |
| | | transferStationNo: this.agvStationInput |
| | | } |
| | | ) |
| | | if (code === 200) { |
| | |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: "none", |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | }, |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | |
| | | .text-blue { |
| | | color: #0081ff !important; |
| | | |
| | | } |
| | | |
| | | .item { |
| | |
| | | @input="checkAgvStation" |
| | | /> |
| | | </view> |
| | | |
| | | <view class="cu-form-group"> |
| | | <view class="title">接驳站点名称</view> |
| | | <input |
| | | disabled |
| | | placeholder="这里显示站点名称" |
| | | v-model="agvStationName" |
| | | /> |
| | | </view> |
| | | <view class="cu-form-group margin-bottom"> |
| | | <view class="title">容器类型</view> |
| | | <view style="width: 78%"> |
| | |
| | | const that = this |
| | | if (this.agvStationInput === '' || this.agvStationInput === null) { |
| | | uni.showToast({ |
| | | title: '容器码为空', |
| | | title: '站点码为空', |
| | | icon: 'none', |
| | | position: 'top' |
| | | }) |
| | |
| | | transferStationNo: this.agvStationInput |
| | | }) |
| | | if (code === 200) { |
| | | this.agvStationName = data.stationName |
| | | this.agvStationName = data.stationId |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | |
| | | const { code, data, msg } = await request( |
| | | '/callForEmptyContainers', |
| | | { |
| | | staNo: this.agvStationName, |
| | | staNo: this.agvStationInput, |
| | | type: this.palletTypeId |
| | | } |
| | | ) |
| | |
| | | <input |
| | | placeholder="请扫描接驳站点条码" |
| | | v-model="palletStaBarcode" |
| | | @input="checkAgvStation" |
| | | /> |
| | | </view> |
| | | <view class="cu-form-group"> |
| | | <view class="title">站点名称:</view> |
| | | <input |
| | | disabled |
| | | placeholder="这里显示站点名称" |
| | | v-model="agvStationName" |
| | | /> |
| | | </view> |
| | | <view class="cu-bar btn-group top margin-top"> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- <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}} |
| | | </view> |
| | | <view class="text-blue"> |
| | | {{`${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"> |
| | | <view class="content"> |
| | | <text class="text-black">ASN:</text> |
| | | </view> |
| | | <view class="action"> |
| | | <text class="text-grey ">{{item.asnCode}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">批次:</text> |
| | | </view> |
| | | <view class="action"> |
| | | <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> |
| | | </view> |
| | | </view> |
| | | |
| | | </block> |
| | | </view> --> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | palletStaBarcode: '', |
| | | matNr: '', |
| | | makTx: '', |
| | | transferStationNo: '' |
| | | transferStationNo: '', |
| | | agvStationName: '' |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | this.whAreaId = uni.getStorageSync('whAreaId') |
| | | }, |
| | | methods: { |
| | | async checkAgvStation() { |
| | | const that = this |
| | | if ( |
| | | this.palletStaBarcode === '' || |
| | | this.palletStaBarcode === null |
| | | ) { |
| | | uni.showToast({ |
| | | title: '站点号为空', |
| | | icon: 'none', |
| | | position: 'top' |
| | | }) |
| | | return |
| | | } |
| | | const { code, data, msg } = await request('/check/agvStation', { |
| | | transferStationNo: this.palletStaBarcode |
| | | }) |
| | | if (code === 200) { |
| | | this.agvStationName = data.stationId |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: 'none', |
| | | position: 'top' |
| | | }) |
| | | setTimeout(function () { |
| | | that.agvStationName = '' |
| | | that.palletStaBarcode = '' |
| | | }, 200) |
| | | } |
| | | }, |
| | | toEmptyIn() { |
| | | uni.navigateTo({ |
| | | url: '/pages/emptyTray/inBound' |
| | |
| | | icon: 'success' |
| | | }) |
| | | // 更新物料编码、物料名称 |
| | | // this.matNr = item.matnrCode || '' |
| | | // this.makTx = ' 待入库物料名称:' + (item.makTx || '') |
| | | this.matNr = item.matnrCode || '' |
| | | this.makTx = ' 待入库物料名称:' + (item.makTx || '') |
| | | |
| | | // 从列表中移除该项 |
| | | // const index = this.bagList.findIndex( |
| | | // (i) => i.palletId === item.palletId |
| | | // ) |
| | | // if (index > -1) { |
| | | // this.bagList.splice(index, 1) |
| | | // } |
| | | // // 如果列表为空,关闭弹窗 |
| | | // if (this.bagList.length === 0) { |
| | | // this.closeModal() |
| | | // } |
| | | const index = this.bagList.findIndex( |
| | | (i) => i.palletId === item.palletId |
| | | ) |
| | | if (index > -1) { |
| | | this.bagList.splice(index, 1) |
| | | } |
| | | // 如果列表为空,关闭弹窗 |
| | | if (this.bagList.length === 0) { |
| | | this.closeModal() |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |