From 46ef7eea68d020215c9a60ddb8fd6a1ad51afc17 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周四, 20 6月 2024 13:25:50 +0800
Subject: [PATCH] 2
---
yiqi_pda/pages/outBound/index.vue | 108 ++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 96 insertions(+), 12 deletions(-)
diff --git a/yiqi_pda/pages/outBound/index.vue b/yiqi_pda/pages/outBound/index.vue
index e434074..27c1cda 100644
--- a/yiqi_pda/pages/outBound/index.vue
+++ b/yiqi_pda/pages/outBound/index.vue
@@ -1,12 +1,14 @@
<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"
- @search="onSearchContainter" @clear="onClearContainter" />
+ <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" />
+ <Content @deleteData="deleteData" :workPieceData="workPieceData" />
</view>
<modalPwd @reflesh="reflesh" ref="pwdRef"/>
</view>
@@ -26,6 +28,7 @@
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,
@@ -33,7 +36,8 @@
} 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 {
@@ -47,8 +51,13 @@
},
data() {
return {
+ barHeight: '',
+ ckNumToday:"0",//浠婂ぉ鎬诲嚭搴撴暟
+ baseTitile:'鎵弿鎴愬搧鐮�/宸ヤ欢浜岀淮鐮�',//鎵弿鎴愬搧鐮�/宸ヤ欢浜岀淮鐮�
+ title:'',
pageBodyHeight: 0,
initInterVal: null,
+ myInterval: null,
msg: '',
msgType: 'error',
OP80NewCode: '',
@@ -59,10 +68,25 @@
}
},
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
+ this.initFocus(100);
const param = {
OP80NewCode: OP80NewCode
}
@@ -71,16 +95,28 @@
if(!this.workPieceData.some(item=>item.workPieceID==data.workPieceID)) {
this.workPieceData.push(data)
}
- console.log(this.workPieceData,'dsts');
- this.inputFocus=false
- setTimeout(()=>{
- this.OP80NewCode = '' ;//姣忔鍒峰畬灏辨竻绌鸿緭鍏ユ 銆怑ditby shaocx,2024-06-12銆�
- this.inputFocus=true
- },100)
+ //console.log(this.workPieceData,'dsts');
+ // setTimeout(()=>{
+ // this.OP80NewCode = '' ;//姣忔鍒峰畬灏辨竻绌鸿緭鍏ユ 銆怑ditby shaocx,2024-06-12銆�
+ // this.inputFocus=true
+ // },100)
}catch(e){
+ //debugger
+ this.initFocus(100);
//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(()=>{
+ this.OP80NewCode = '' ;//姣忔鍒峰畬灏辨竻绌鸿緭鍏ユ 銆怑ditby shaocx,2024-06-12銆�
+ this.inputFocus=true
+ },num)
},
// 鑾峰彇鎵爜闀垮害
// async listbycode(){
@@ -98,6 +134,7 @@
},
deleteData(opt){
this.workPieceData=this.workPieceData.filter(item=>item.workPieceID!=opt.workPieceID)
+ this.setMsg();
},
reflesh(){
this.OP80NewCode = ''
@@ -125,6 +162,7 @@
/* 椤甸潰鍒濆鍖栬幏鍙栭〉闈ody楂樺害鐨勫畾鏃跺櫒 */
startInitInterval(callback) {
this.initInterVal = setInterval(() => {
+ //console.log('bbb')
if (this.pageBodyHeight) {
this.clearInitInterval()
callback && callback()
@@ -136,25 +174,71 @@
/* 娓呴櫎瀹氭椂鍣� */
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(() => {
/* 椤甸潰鍒濆鍖栧悗闇�瑕佹墽琛岀殑浠g爜鍦ㄨ繖杈硅皟鐢� */
// 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涓簍rue锛屽惁鍒欓〉闈笉浼氳繑鍥炲埌鎸囧畾璺緞
+ 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>
--
Gitblit v1.9.3