|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <view> | 
|---|
|  |  |  | <view class="container"> | 
|---|
|  |  |  | <view class="code"> | 
|---|
|  |  |  | <uni-search-bar :focus="searchFocus" v-model="searchValue"  @input="searchInput()" ma | 
|---|
|  |  |  | maxlength="500" ancel="cancel" @clear="clear" placeholder="输入 / 扫描商品"> | 
|---|
|  |  |  | 
|---|
|  |  |  | <view class="list-left"> | 
|---|
|  |  |  | <!-- 左上 --> | 
|---|
|  |  |  | <view class="list-left-top"> | 
|---|
|  |  |  | <view style="font-weight: bold;">工作号4099</view> | 
|---|
|  |  |  | <view style="font-weight: bold;">工作号{{item.wrkNo}}</view> | 
|---|
|  |  |  | <view style="display: flex;border-bottom: 1px solid #FFF;margin: 10rpx;"> | 
|---|
|  |  |  | <text style="flex: 1;">工作状态</text> | 
|---|
|  |  |  | <text>201.生成入库任务ID</text> | 
|---|
|  |  |  | <text>{{item.wrkSts$}}</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view style="display: flex;border-bottom: 1px solid #FFF;margin: 10rpx;"> | 
|---|
|  |  |  | <text style="flex: 1;">入出库类型</text> | 
|---|
|  |  |  | <text>1.入库</text> | 
|---|
|  |  |  | <text>{{item.ioType$}}</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view style="display: flex;border-bottom: 1px solid #FFF;margin: 10rpx;"> | 
|---|
|  |  |  | <text style="flex: 1;">优先级</text> | 
|---|
|  |  |  | <text>300</text> | 
|---|
|  |  |  | <text>{{item.ioPri}}</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view style="display: flex;border-bottom: 1px solid #FFF;margin: 10rpx;"> | 
|---|
|  |  |  | <text style="flex: 1;">源库位</text> | 
|---|
|  |  |  | <text>CS-101-001-01@1</text> | 
|---|
|  |  |  | <text>{{item.sourceLocNo}}</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view style="display: flex;border-bottom: 1px solid #FFF;margin: 10rpx;"> | 
|---|
|  |  |  | <text style="flex: 1;">目标库位</text> | 
|---|
|  |  |  | <text>YZ-015-001-01@1</text> | 
|---|
|  |  |  | <text>{{item.locNo}}</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view style="display: flex;border-bottom: 1px solid #FFF;margin: 10rpx;"> | 
|---|
|  |  |  | <text style="flex: 1;">料箱码</text> | 
|---|
|  |  |  | <text>1112223335</text> | 
|---|
|  |  |  | <text>{{item.barcode}}</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <!-- 左下 --> | 
|---|
|  |  |  | <view class="list-left-bottom"> | 
|---|
|  |  |  | <button size="mini">明细</button> | 
|---|
|  |  |  | <button size="mini">完成</button> | 
|---|
|  |  |  | <button size="mini" @click="getWrkDetlList(item.wrkNo)">明细</button> | 
|---|
|  |  |  | <button size="mini" @click="handControl(item.wrkNo)">完成</button> | 
|---|
|  |  |  | <button size="mini">取消</button> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | data() { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | baseUrl: '', | 
|---|
|  |  |  | token: '', | 
|---|
|  |  |  | searchValue: '', | 
|---|
|  |  |  | searchFocus: true, | 
|---|
|  |  |  | dataList: [ | 
|---|
|  |  |  | {}, | 
|---|
|  |  |  | {}, | 
|---|
|  |  |  | {} | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | dataList: [] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | onShow() { | 
|---|
|  |  |  | this.baseUrl = uni.getStorageSync('baseUrl'); | 
|---|
|  |  |  | this.token = uni.getStorageSync('token'); | 
|---|
|  |  |  | this.oldDataList = [...this.dataList] | 
|---|
|  |  |  | this.getWrkMastList() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | // 搜索框输入 | 
|---|
|  |  |  | 
|---|
|  |  |  | // 重置搜索框 | 
|---|
|  |  |  | clear() { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 获取工作列表 | 
|---|
|  |  |  | getWrkMastList() { | 
|---|
|  |  |  | let _this = this | 
|---|
|  |  |  | _this.dataList = [] | 
|---|
|  |  |  | uni.request({ | 
|---|
|  |  |  | url: `${_this.baseUrl}/agv/wrkMast/list/auth`, | 
|---|
|  |  |  | header: {'token': uni.getStorageSync('token')}, | 
|---|
|  |  |  | data: { | 
|---|
|  |  |  | curr: 1, | 
|---|
|  |  |  | limit: 1000, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | method: 'GET', | 
|---|
|  |  |  | success(res) { | 
|---|
|  |  |  | res = res.data | 
|---|
|  |  |  | if (res.code === 200) { | 
|---|
|  |  |  | _this.dataList = res.data.records | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 获取工作明细 | 
|---|
|  |  |  | getWrkDetlList(e) { | 
|---|
|  |  |  | let _this = this | 
|---|
|  |  |  | uni.navigateTo({ | 
|---|
|  |  |  | url: "./wrkDetl", | 
|---|
|  |  |  | success: function(res) { | 
|---|
|  |  |  | // 通过eventChannel向被打开页面传送数据   向另外一个页面传递值的 | 
|---|
|  |  |  | res.eventChannel.emit('item', { | 
|---|
|  |  |  | item: e | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | events: { | 
|---|
|  |  |  | // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据  另外一个页面传过来的 | 
|---|
|  |  |  | acceptDataFromOpenedPage: function(data) { | 
|---|
|  |  |  | // _this.matnr = data.data | 
|---|
|  |  |  | _this.input(_this.matnr) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | handControl(wrkNo) { | 
|---|
|  |  |  | let _this = this | 
|---|
|  |  |  | uni.request({ | 
|---|
|  |  |  | url: `${_this.baseUrl}/agv/hand/control/wrkMast`, | 
|---|
|  |  |  | header: { | 
|---|
|  |  |  | 'token': uni.getStorageSync('token'), | 
|---|
|  |  |  | 'content-type': 'application/x-www-form-urlencoded' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | data: { | 
|---|
|  |  |  | workNo: wrkNo, | 
|---|
|  |  |  | type: 1 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | method: 'POST', | 
|---|
|  |  |  | success(res) { | 
|---|
|  |  |  | res = res.data | 
|---|
|  |  |  | if (res.code === 200) { | 
|---|
|  |  |  | _this.getWrkMastList() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <style> | 
|---|
|  |  |  | @import url('../../../static/css/common/order.css'); | 
|---|
|  |  |  | .code { | 
|---|
|  |  |  | background-color: #d9d9d9; | 
|---|
|  |  |  | z-index: 99; | 
|---|
|  |  |  | position: sticky; | 
|---|
|  |  |  | top: 80rpx; | 
|---|
|  |  |  | top: 0rpx; | 
|---|
|  |  |  | left: 0; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .list { | 
|---|