| | |
| | | <template> |
| | | <view class="container"> |
| | | <view class="code"> |
| | | <uni-search-bar :focus="searchValueFocus" v-model="searchValue" |
| | | <!-- <uni-search-bar :focus="searchValueFocus" v-model="searchValue" |
| | | maxlength="500" ancel="cancel" @confirm="searchValueInput2()" @clear="clear" placeholder="输入 / 扫描 订单号"> |
| | | </uni-search-bar> |
| | | </uni-search-bar> --> |
| | | <view class="code-title"> |
| | | <view></view> |
| | | <view style="width: 100%;text-align: center;margin: 16rpx 0;">{{searchValue}} 总数量:- {{total}} -</view> |
| | |
| | | <view class="list list-font-color" :class="orderDetl.color" v-for="(orderDetl,index) in dataList" :key="index"> |
| | | <view class="list-left"> |
| | | <view class="detl-threeCode">{{orderDetl.wrkNo}}</view> |
| | | <view>工作类型:{{orderDetl.ioType$}}</view> |
| | | <view>工作时间:{{orderDetl.ioTime$}}</view> |
| | | <view>调拨类型:{{orderDetl.ioType$}}</view> |
| | | <view>工作状况:{{orderDetl.wrkSts$}}</view> |
| | | <view>源库位:{{orderDetl.sourceLocNo}}</view> |
| | | <view>目标库位:{{orderDetl.locNo}}</view> |
| | | <view>目标楼层:{{orderDetl.crnNo}}</view> |
| | | <view>货架码:{{orderDetl.barcode}}</view> |
| | | </view> |
| | | <view class="list-right" @click="addItem(index)"> |
| | | <uni-icons type="folder-add" size="25" color="#fff"></uni-icons> |
| | | <view class="list-right" @click="opt(orderDetl)"> |
| | | <uni-icons type="bars" size="25" color="#fff"></uni-icons> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | <view class="title">筛选</view> |
| | | <view class="popup-item" style="background-color: #dfdfdf;"> |
| | | <view class="item-cl"> |
| | | <view>销售订单:</view> |
| | | <input type="text" v-model="searchValue"> |
| | | <view>工作号:</view> |
| | | <input type="text" v-model="wrk_no"> |
| | | </view> |
| | | </view> |
| | | <view class="popup-item" style="background-color: #dfdfdf;"> |
| | | <view class="item-cl"> |
| | | <view>主订单号:</view> |
| | | <input type="text" v-model="orderNo"> |
| | | <view>工作类型:</view> |
| | | <input type="text" v-model="io_type"> |
| | | </view> |
| | | </view> |
| | | <view class="popup-item" style="background-color: #dfdfdf;"> |
| | | <view class="item-cl"> |
| | | <view>商品编号:</view> |
| | | <input type="text" v-model="matnr"> |
| | | <view>工作状态:</view> |
| | | <input type="text" v-model="wrk_sts"> |
| | | </view> |
| | | </view> |
| | | <view class="popup-item" style="background-color: #dfdfdf;"> |
| | | <view class="item-cl"> |
| | | <view>商品名称:</view> |
| | | <input type="text" v-model="maktx"> |
| | | <view>源库位:</view> |
| | | <input type="text" v-model="source_loc_no"> |
| | | </view> |
| | | </view> |
| | | <view class="popup-item" style="background-color: #dfdfdf;"> |
| | | <view class="item-cl"> |
| | | <view>商品种类:</view> |
| | | <input type="text" v-model="brand"> |
| | | <view>目标库位:</view> |
| | | <input type="text" v-model="loc_no"> |
| | | </view> |
| | | </view> |
| | | <view class="popup-item" style="background-color: #dfdfdf;"> |
| | | <view class="item-cl"> |
| | | <view>货架码:</view> |
| | | <input type="text" v-model="barcode"> |
| | | </view> |
| | | </view> |
| | | <view class="popup-item" style="background-color: #dfdfdf;"> |
| | | <view class="item-cl"> |
| | | <view>目标楼层:</view> |
| | | <input type="text" v-model="crn_no"> |
| | | </view> |
| | | </view> |
| | | <view class="btn filter-btn"> |
| | | <view class="btn-left" @click="filterClose">重置</view> |
| | | <view class="btn-right" @click="filterConfirm()">确认</view> |
| | | </view> |
| | | </view> |
| | | </uni-popup> |
| | | </view> |
| | | <!-- 操作弹窗 --> |
| | | <view> |
| | | <uni-popup ref="option" type="dialog"> |
| | | <view class="filter-popup" style="height: 50vh;"> |
| | | <!-- 标题 --> |
| | | <view class="title">操作</view> |
| | | <view style="display: flex;flex-wrap: wrap;"> |
| | | <button size="mini" type="primary" @click="handControlWrkMast('1')" v-show="complete" >完成</button> |
| | | <button size="mini" type="warn" @click="handControlWrkMast('2')">取消(AGV)</button> |
| | | <button size="mini" @click="handControlWrkMast('5')">取消</button> |
| | | </view> |
| | | <view style="display: flex;" v-show="tranType != 'N'"> |
| | | <button size="mini" @click="changeType()">{{tranType}}</button> |
| | | </view> |
| | | </view> |
| | | </uni-popup> |
| | |
| | | token: '', |
| | | searchValueFocus: true, |
| | | searchValue: '', |
| | | orderNo: '', |
| | | matnr: '', |
| | | maktx: '', |
| | | brand: '', |
| | | wrk_no: '', |
| | | barcode: '', |
| | | wrk_sts: '', |
| | | crn_no: '', |
| | | source_loc_no: '', |
| | | loc_no: '', |
| | | io_type: '', |
| | | total: '', |
| | | dataList: [], |
| | | orderCarList: [], |
| | | data: { |
| | | curr: 1, |
| | | limit: 100, |
| | | three_code: '', |
| | | matnr: '', |
| | | maktx: '', |
| | | order_no: '', |
| | | brand: '' |
| | | wrk_no: '', |
| | | barcode: '', |
| | | wrk_sts: '', |
| | | crn_no: '', |
| | | source_loc_no: '', |
| | | loc_no: '', |
| | | io_type: '' |
| | | }, |
| | | index: 0, |
| | | count: 0, |
| | | mask: false |
| | | mask: false, |
| | | wrkNo: '', |
| | | tranType: '转手动', |
| | | complete: true, |
| | | |
| | | |
| | | } |
| | | }, |
| | |
| | | methods: { |
| | | getOrderDetlList(threeCode,limit) { |
| | | uni.showLoading({}) |
| | | if (limit == 1) { |
| | | this.dataList = [] |
| | | this.data.curr = 1 |
| | | } |
| | | let _this = this |
| | | _this.mask = true |
| | | _this.data.three_code = threeCode |
| | | _this.data.limit = limit |
| | | _this.data.limit = 10 |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/agv/wrkMast/list/auth/dbList`, |
| | | header: {'token': uni.getStorageSync('token')}, |
| | |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | for (let k of res.data.records) { |
| | | if (k.anfme > k.qty && k.qty == 0) { |
| | | if ([21, 22, 201].includes(k.wrkSts)) { |
| | | k['color'] = 'order-sts-start' |
| | | } else if (k.anfme > k.qty && k.qty != 0) { |
| | | k['color'] = 'order-sts-working' |
| | | } else { |
| | | } else if ([205,206].includes(k.wrkSts)) { |
| | | k['color'] = 'order-sts-end' |
| | | } else { |
| | | k['color'] = 'order-sts-working' |
| | | } |
| | | } |
| | | let list = res.data.records |
| | |
| | | this.getOrderDetlList(this.searchValue,10) |
| | | },300) |
| | | }, |
| | | // 添加入库商品至 待组托列表 |
| | | addItem(index) { |
| | | // 判断添加的商品是否和已经添加的重复 |
| | | let dataList = this.dataList |
| | | for (let k of this.orderCarList) { |
| | | if (k.orderNo == dataList[index].orderNo |
| | | && k.threeCode == dataList[index].threeCode |
| | | && k.matnr == dataList[index].matnr) { |
| | | uni.showToast({ title: '请勿重复添加商品!', icon: "none", position: 'top' }) |
| | | return |
| | | // 操作 |
| | | opt(orderDetl) { |
| | | this.wrkNo = orderDetl.wrkNo |
| | | if (orderDetl.wrkSts != 22) { |
| | | this.tranType = 'N' |
| | | } else { |
| | | if (orderDetl.ioType == 108) { |
| | | this.tranType = '转手动' |
| | | } else { |
| | | this.tranType = '转自动' |
| | | } |
| | | } |
| | | this.index = index |
| | | this.$refs.addItem.open() |
| | | |
| | | |
| | | this.$refs.option.open('bottom') |
| | | }, |
| | | addClose() { |
| | | this.$refs.addItem.close() |
| | |
| | | filterConfirm() { |
| | | this.dataList = [] |
| | | this.data.curr = 1 |
| | | this.data.maktx = this.maktx |
| | | this.data.matnr = this.matnr |
| | | this.data.order_no = this.order_no |
| | | this.data.brand = this.brand |
| | | this.getOrderDetlList(this.searchValue,10) |
| | | this.data.wrk_no = this.wrk_no |
| | | this.data.barcode = this.barcode |
| | | this.data.wrk_sts = this.wrk_sts |
| | | this.data.crn_no = this.crn_no |
| | | this.data.source_loc_no = this.source_loc_no |
| | | this.data.loc_no = this.loc_no |
| | | this.data.io_type = this.io_type |
| | | this.getOrderDetlList(this.data.wrk_no,10) |
| | | this.$refs.filter.close() |
| | | }, |
| | | filterClose() { |
| | | this.dataList = [] |
| | | this.data.curr = 1 |
| | | this.data.maktx = '' |
| | | this.data.matnr = '' |
| | | this.data.order_no = '' |
| | | this.data.brand = '' |
| | | this.data.wrk_no = '' |
| | | this.data.barcode = '' |
| | | this.data.wrk_sts = '' |
| | | this.data.crn_no = '' |
| | | this.data.source_loc_no = '' |
| | | this.data.loc_no = '' |
| | | this.data.io_type = '' |
| | | this.getOrderDetlList(this.searchValue,10) |
| | | this.$refs.filter.close() |
| | | }, |
| | | handControlWrkMast(type) { |
| | | let _this = this |
| | | let param = {workNo: _this.wrkNo,type: type} |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/agv/hand/control/wrkMast`, |
| | | header: { |
| | | 'token': uni.getStorageSync('token'), |
| | | 'content-type': 'application/x-www-form-urlencoded' |
| | | }, |
| | | data: param, |
| | | method: 'POST', |
| | | success(res) { |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | _this.$refs.option.close() |
| | | setTimeout(()=>{ |
| | | _this.getOrderDetlList('',1) |
| | | },100) |
| | | } else if (res.code == 403) { |
| | | uni.showToast({ title: res.msg, icon: "error", position: 'top' }) |
| | | setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000); |
| | | } else { |
| | | uni.showToast({ title: res.msg, icon: "error", position: 'top' }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | changeType() { |
| | | let _this = this |
| | | let param = {workNo: _this.wrkNo} |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/agv/hand/control/wrkMast/changeType`, |
| | | header: { |
| | | 'token': uni.getStorageSync('token'), |
| | | 'content-type': 'application/x-www-form-urlencoded' |
| | | }, |
| | | data: param, |
| | | method: 'POST', |
| | | success(res) { |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | _this.$refs.option.close() |
| | | setTimeout(()=>{ |
| | | _this.getOrderDetlList('',1) |
| | | },100) |
| | | } else if (res.code == 403) { |
| | | uni.showToast({ title: res.msg, icon: "error", position: 'top' }) |
| | | setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000); |
| | | } else { |
| | | uni.showToast({ title: res.msg, icon: "error", position: 'top' }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | } |
| | |
| | | position: relative; |
| | | border-radius: 30rpx 30rpx 0rpx 0rpx; |
| | | } |
| | | .filter-popup button { |
| | | flex: 1; |
| | | margin: 16rpx; |
| | | } |
| | | .filter-popup-item { |
| | | height: 100%; |
| | | width: 100%; |