jt
2023-09-06 e792217d89c64aeacf543c91313cb05841e64e6a
pages/modal/5600.vue
@@ -555,40 +555,50 @@
              // console.log(ret);
              if (ret.err_code == 0) {
               var result = ret.result; 
                 if(result.result_type == 0 && result.action){
                     result.action.forEach(item=>{
                         if(item.action_type == "insert_subtable_page_row"){ //码盘中
                             var value = item.value;
                             $this.viewAceionRow(value);
                         } else if(item.action_type == "set_subtable_page_content"){  //已码盘
                             var value = item.value;
                             if(value.clear == true && $this.$data.detail1StyleDefList.length>0){ //判断是否清空页签内容,正在码盘是否有数据
                           uni.showModal({
                              title: '提示',
                              content: '系统检测到有正在码盘中的货品,继续操作会清空,是否继续?',
                              success: function (res) {
                                 if (res.confirm) {
                                   $this.$data.detail1StyleDefList=[];
                                   $this.$data.detail2StyleDefList=[];
                                   $this.viewAceionContent(value);
                                 } else if (res.cancel) {
                                   $this.$data.detail2StyleDefList=[];
                                   $this.viewAceionContent(value);
               if (result.ret != 0) {
                   var tip = result.err_info ? typeof result.err_info == 'string' ? result.err_info : result.err_info.join('<br/>') : '';
                   if (result.ret == 801) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"});
                   else uni.showModal({title:'提示',content:tip+',提示:'+result.ret,showCancel:false,confirmText:"取消"});
                  return false
               }else{
                  let tip = result.info ? typeof result.info == 'string' ? result.info : result.info.join('<br/>') : '';
                  if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"});
                  if(result.result_type == 0 && result.action){
                     result.action.forEach(item=>{
                        if(item.action_type == "insert_subtable_page_row"){ //码盘中
                           var value = item.value;
                           $this.viewAceionRow(value);
                        } else if(item.action_type == "set_subtable_page_content"){  //已码盘
                           var value = item.value;
                           if(value.clear == true && $this.$data.detail1StyleDefList.length>0){ //判断是否清空页签内容,正在码盘是否有数据
                              uni.showModal({
                                 title: '提示',
                                 content: '系统检测到有正在码盘中的货品,继续操作会清空,是否继续?',
                                 success: function (res) {
                                    if (res.confirm) {
                                      $this.$data.detail1StyleDefList=[];
                                      $this.$data.detail2StyleDefList=[];
                                      $this.viewAceionContent(value);
                                    } else if (res.cancel) {
                                      $this.$data.detail2StyleDefList=[];
                                      $this.viewAceionContent(value);
                                    }
                                 }
                              }
                           });
                             } else {
                                 $this.$data.detail2StyleDefList=[];
                                 $this.viewAceionContent(value);
                             }
                         }
                     });
                 }else{
                  // this.detail2StyleDefList=[];
                     if(result.info){
                     uni.showModal({title:"错误4.3",content:result.info,showCancel:false,confirmText:"取消"});
                              });
                           } else {
                              $this.$data.detail2StyleDefList=[];
                              $this.viewAceionContent(value);
                           }
                        }
                     });
                  }else{
                     // this.detail2StyleDefList=[];
                     if(result.info){
                        uni.showModal({title:"错误4.3",content:result.info,showCancel:false,confirmText:"取消"});
                     }
                  }
                 }
               }
                 
              }else{
                 uni.showModal({title:"错误4",content:ret.err_msg,showCancel:false,confirmText:"取消"});
@@ -795,41 +805,51 @@
         console.log(res);
         if (res.err_code == 0) {
            var result = res.result; 
            if(result.result_type == 0){
              if(result.action){
               result.action.forEach(item=>{
                 if(item.action_type == "insert_subtable_page_row"){ //码盘中
                   var value = item.value;
                   //加载已经码盘数据
                    $this.viewAceionRow(value,'add');
                     //清空条码内容
                  $this.$data.head_styledef.form.items.forEach((item,index) => {
                     if(item.fieldId != "S_CNTR_CODE"){
                       item.value = '';
                         item.oldvalue = '';
                       $this.$data.head_styledef.form.model[item.fieldId] = '';
                     }
                  });
                  //清除正在码盘中成功的数据
                  $this.$data.detail1StyleDefList.forEach((style,index)=>{
                    if(style.form.items[0].fieldId == json.attrs[0].attr && style.form.items[0].value == json.attrs[0].value){
                     $this.$data.detail1StyleDefList.splice(index,1);
                     return;
            if (result.ret != 0) {
                var tip = result.err_info ? typeof result.err_info == 'string' ? result.err_info : result.err_info.join('<br/>') : '';
                if (result.ret == 801) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"});
                else uni.showModal({title:'提示',content:tip+',提示:'+result.ret,showCancel:false,confirmText:"取消"});
               return false
            }else{
               let tip = result.info ? typeof result.info == 'string' ? result.info : result.info.join('<br/>') : '';
               if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"});
               if(result.result_type == 0){
                 if(result.action){
                  result.action.forEach(item=>{
                    if(item.action_type == "insert_subtable_page_row"){ //码盘中
                     var value = item.value;
                     //加载已经码盘数据
                     $this.viewAceionRow(value,'add');
                     //清空条码内容
                     $this.$data.head_styledef.form.items.forEach((item,index) => {
                        if(item.fieldId != "S_CNTR_CODE"){
                          item.value = '';
                          item.oldvalue = '';
                          $this.$data.head_styledef.form.model[item.fieldId] = '';
                        }
                     });
                     //清除正在码盘中成功的数据
                     $this.$data.detail1StyleDefList.forEach((style,index)=>{
                       if(style.form.items[0].fieldId == json.attrs[0].attr && style.form.items[0].value == json.attrs[0].value){
                        $this.$data.detail1StyleDefList.splice(index,1);
                        return;
                       }
                     });
                     // this.detail2StyleDefList=[];
                     uni.showModal({title:"提示",content:"码盘成功",showCancel:false,confirmText:"取消"});
                    }
                  });
                   // this.detail2StyleDefList=[];
                  uni.showModal({title:"提示",content:"码盘成功",showCancel:false,confirmText:"取消"});
                 }else{
                  if($this.$data.param.After_OK_Event.ID != event.ID){ //判断当前事件是否是确定后事件
                     $this.sava($this.$data.param.After_OK_Event); //执行确定后事件
                  }
                 }
               });
              }else{
               if($this.$data.param.After_OK_Event.ID != event.ID){ //判断当前事件是否是确定后事件
                   $this.sava($this.$data.param.After_OK_Event); //执行确定后事件
               }
              }
            }else{
               // $this.$data.detail2StyleDefList=[];
                if(result.info){
                 uni.showModal({title:"提示",content:result.info,showCancel:false,confirmText:"取消"});
               }else{
                  // $this.$data.detail2StyleDefList=[];
                  if(result.info){
                    uni.showModal({title:"提示",content:result.info,showCancel:false,confirmText:"取消"});
                  }
               }
            }
         }else{