schangxiang@126.com
2024-08-28 6667b0cc7e221402fd50582151457fcf9ac38622
yiqi_pda/pages/outBound/index.vue
@@ -73,9 +73,12 @@
      onLoad() {
         var _this = this;
         _this._getOutBoundWorkPieceInfoCount();
         //不再循环读
         /*
         this.myInterval = setInterval(function() {
            _this._getOutBoundWorkPieceInfoCount();
         }, 1000 * 10);
         //*/
         //this.myInterval=setInterval(this.myFun(), 3000);
      },
      methods: {
@@ -91,25 +94,27 @@
         },
         // 获取工件信息
         async onSearchContainter(OP80NewCode) {
            // if (OP80NewCode.length > 22) {
            //    this.initFocus(100);
            //debugger
            if (OP80NewCode.length != 21) {
               this.initFocus(100);
            //    uni.showToast({
            //       title: '工件码或成品码长度不正确',
            //       icon: 'error',
            //       duration: 2000,
            //       mask: true
            //    });
            //    return;
            // }
               return;
            }
            this.inputFocus = false
            const param = {
               OP80NewCode: OP80NewCode
            }
            try {
               let {
                  data
               } = await getWorkPieceByOP80NewCode(param)
               let data={};
               data.addTime = new Date();
               data.workPieceID=OP80NewCode;
               data.oP80NewCode=OP80NewCode;
               if (!this.workPieceData.some(item => item.workPieceID == data.workPieceID)) {
                  data.addTime = new Date();
                  this.workPieceData.push(data)
@@ -117,6 +122,7 @@
               //顺序调转,排序
               this.workPieceData.sort((a, b) => b.addTime - a.addTime);
               this.OP80NewCode = ''; //每次刷完就清空输入框 【Editby shaocx,2024-06-12】
               this.initFocus(100);
               //console.log(this.workPieceData,'dsts');
               // setTimeout(()=>{
@@ -162,8 +168,15 @@
         reflesh() {
            this.OP80NewCode = ''
            this.workPieceData = []
            setTimeout(() => {
               this._getOutBoundWorkPieceInfoCount();
               this.setMsg();
            }, 1000)
         },
         outBoundConfirm() {
            this.$refs.pwdRef.showModal(this.workPieceData)
            /*
            // 存在非成品
            const flag = this.workPieceData.some(item => item.workPieceState != 10)
            if (flag) {
@@ -184,6 +197,8 @@
               this.$refs.pwdRef.showModal(this.workPieceData)
            }
            //*/
         },
         /* 页面初始化获取页面body高度的定时器 */
         startInitInterval(callback) {