| | |
| | | }) |
| | | } |
| | | |
| | | |
| | | // 出库统计 /api/pdaservice/getOutBoundWorkPieceInfoCount |
| | | export function getOutBoundWorkPieceInfoCount(data) { |
| | | return request({ |
| | | url: `/api/pdaservice/getOutBoundWorkPieceInfoCount`, |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | |
| | | <template> |
| | | <default-header-page-layout ref="page" title="出库执行"> |
| | | |
| | | <view class="page-frame with-action-user-row" :style="{height:pageBodyHeight+'px'}" v-if="pageBodyHeight"> |
| | | <action-user-row /> |
| | | <view class="with-action-user-row-page-content"> |
| | | <scan-input-form-item :inputFocus="inputFocus" v-model="OP80NewCode" class="forma-item" label="OP80成品码/工件二维码" :msg="msg" :msg-type="msgType" |
| | | <scan-input-form-item :inputFocus="inputFocus" v-model="OP80NewCode" class="forma-item" :label="baseTitile" :msg="msg" :msg-type="msgType" |
| | | @search="onSearchContainter" @clear="onClearContainter" /> |
| | | <view class="with-action-user-row-page-content" > |
| | | |
| | | |
| | | <Content @deleteData="deleteData" :workPieceData="workPieceData" /> |
| | | </view> |
| | |
| | | import ScanInputFormItem from './modules/ScanInputFormItem.vue' |
| | | import Content from './modules/content.vue' |
| | | import modalPwd from './modules/modalPwd.vue' |
| | | import Vue from 'vue' |
| | | import { |
| | | parseDic, |
| | | $alert, |
| | |
| | | } from '@/static/js/utils/index.js' |
| | | import { |
| | | getWorkPieceByOP80NewCode, |
| | | outBoundWorkPiece |
| | | outBoundWorkPiece, |
| | | getOutBoundWorkPieceInfoCount |
| | | } from '@/api/outBound/index.js' |
| | | import {listbycode} from '@/api/common/index.js' |
| | | export default { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | barHeight: '', |
| | | ckNumToday:"0",//今天总出库数 |
| | | baseTitile:'扫描成品码/工件二维码',//扫描成品码/工件二维码 |
| | | title:'', |
| | | pageBodyHeight: 0, |
| | | initInterVal: null, |
| | | myInterval: null, |
| | | msg: '', |
| | | msgType: 'error', |
| | | OP80NewCode: '', |
| | |
| | | } |
| | | }, |
| | | onLoad() { |
| | | var _this=this; |
| | | _this._getOutBoundWorkPieceInfoCount(); |
| | | this.myInterval=setInterval(function(){ _this._getOutBoundWorkPieceInfoCount();}, 1000*10); |
| | | //this.myInterval=setInterval(this.myFun(), 3000); |
| | | }, |
| | | methods: { |
| | | // 获取工件信息 |
| | | async _getOutBoundWorkPieceInfoCount(OP80NewCode) { |
| | | try{ |
| | | let {data}=await getOutBoundWorkPieceInfoCount(null) |
| | | this.ckNumToday =data; |
| | | }catch(e){ |
| | | } |
| | | this.setMsg(); |
| | | }, |
| | | // 获取工件信息 |
| | | async onSearchContainter(OP80NewCode) { |
| | | this.inputFocus=false |
| | |
| | | //TODO handle the exception |
| | | console.log(e); |
| | | } |
| | | //this.msg = " 扫码数:"+this.workPieceData.length+" 今日出库数:"; |
| | | this.setMsg(); |
| | | }, |
| | | setMsg(){ |
| | | this.msg = " 扫码数:"+this.workPieceData.length+" 今日出库数:"+this.ckNumToday; |
| | | }, |
| | | initFocus(num){ |
| | | setTimeout(()=>{ |
| | |
| | | }, |
| | | deleteData(opt){ |
| | | this.workPieceData=this.workPieceData.filter(item=>item.workPieceID!=opt.workPieceID) |
| | | this.setMsg(); |
| | | }, |
| | | reflesh(){ |
| | | this.OP80NewCode = '' |
| | |
| | | /* 页面初始化获取页面body高度的定时器 */ |
| | | startInitInterval(callback) { |
| | | this.initInterVal = setInterval(() => { |
| | | //console.log('bbb') |
| | | if (this.pageBodyHeight) { |
| | | this.clearInitInterval() |
| | | callback && callback() |
| | |
| | | /* 清除定时器 */ |
| | | clearInitInterval() { |
| | | try { |
| | | //alert('执行'); |
| | | clearInterval(this.initInterVal) |
| | | this.initInterVal = null |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | }, |
| | | clearInitInterval2() { |
| | | try { |
| | | clearInterval(this.myInterval) |
| | | this.myInterval = null |
| | | } catch (e) { |
| | | //TODO handle the exception |
| | | } |
| | | }, |
| | | comfirmUpdate() { |
| | | this.$refs.pwdRef.showModal(this.barDetail); |
| | | }, |
| | | myFun(){ |
| | | console.log('aaaa') |
| | | } |
| | | }, |
| | | onReady() { |
| | | this.setMsg(); |
| | | |
| | | this.startInitInterval(() => { |
| | | /* 页面初始化后需要执行的代码在这边调用 */ |
| | | // this.listbycode() |
| | | |
| | | }) |
| | | }, |
| | | mounted() { |
| | | // 设置fixed定位 |
| | | //this.barHeight = Vue.prototype.CustomBar || 45 |
| | | this.barHeight = Vue.prototype.CustomBar |
| | | }, |
| | | onUnload() { |
| | | //alert(11); 页面离开时 |
| | | this.clearInitInterval() |
| | | this.clearInitInterval2(); |
| | | }, |
| | | //监听原生返回键 |
| | | onBackPress(e) { |
| | | // 此处一定要return为true,否则页面不会返回到指定路径 |
| | | if(1!=1){ |
| | | return false //可返回 |
| | | }else{ |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '是否确认返回?', |
| | | showCancel: true, |
| | | cancelColor: '#333333', |
| | | success: (res => { |
| | | if (res.confirm) { |
| | | uni.redirectTo({ |
| | | url: '/pages/home/index' |
| | | }) |
| | | } else if (res.cancel) { |
| | | |
| | | } |
| | | }) |
| | | }); |
| | | return true |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | |
| | | <view class="flex_status">{{item.qualityStateName}}</view> |
| | | </view> |
| | | <view class="content_flex"> |
| | | <view class="flex_color" style="width: 100%;">工件Id: {{item.workPieceID}}</view> |
| | | <view class="flex_color" style="width: 100%;">工件号: {{item.workPieceID}}</view> |
| | | <!-- <view class="flex_color" style="text-align: right;">当前工序: {{item.workingProcedureCurrent}}</view> --> |
| | | </view> |
| | | <view class="content_flex"> |
| | |
| | | <view class="flex_color" style="width: 100%;">当前工序: {{item.workingProcedureCurrent}}</view> |
| | | </view> |
| | | <view class="content_flex"> |
| | | <view class="flex_color" style="width: 100%;">设备Id: {{item.equipmentID}}</view> |
| | | <view class="flex_color" style="width: 100%;">设备编号: {{item.equipmentID}}</view> |
| | | </view> |
| | | </view> |
| | | </u-swipe-action-item> |
| | |
| | | data() { |
| | | return { |
| | | options: [{ |
| | | text: "删除", |
| | | text: "移除", |
| | | style: { |
| | | background: '#F08202' |
| | | } |
| | |
| | | }, |
| | | methods:{ |
| | | actionClick(opt){ |
| | | console.log('删除',opt); |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '是否确认移除工件号"'+this.workPieceData[opt.name].workPieceID+'"?', |
| | | showCancel: true, |
| | | cancelColor: '#333333', |
| | | success: (res => { |
| | | if (res.confirm) { |
| | | console.log('移除',opt); |
| | | this.$emit('deleteData',this.workPieceData[opt.name]) |
| | | } else if (res.cancel) { |
| | | |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | } |
| | | } |
| | | } |