qq_41295110
2025-07-21 3a2dfe59a4ded45f03c3aa30c42f50407029cbe1
pages/weiwaigxOut/form.vue
@@ -58,6 +58,12 @@
            </view>
         </view>
         <view class="form-item">
            <view class="title"><text>*</text>生产班组:</view>
            <view class="right">
               <uni-combox :candidates="arrayHGroupName" placeholder="请选择生产班组" v-model="hform.HGroupName" @input="HGroupNameChange"></uni-combox>
            </view>
         </view>
         <view class="form-item">
            <view class="title">备注:</view>
            <view class="right">
               <textarea name="HRemark" v-model="hform.HRemark" auto-height placeholder="请输入备注"></textarea>
@@ -344,6 +350,8 @@
            HSupNameList:[],
            arrayHEmpName:[],//操作员
            HEmpNameList:[],
            arrayHGroupName:[],//班组
            HGroupNameList:[],
            
            isEdit: false,
            hform:{
@@ -400,8 +408,8 @@
               // HEmpID:'',
               // HSource:'',
               // HSourceID:'',      
               // HGroup:'',
               // HGroupID:'',
               HGroupName:'',
               HGroupID:0,
               // HDept:'',
               // HDeptID:'',      
                  
@@ -434,6 +442,7 @@
         }else{
            this.getNewData()
         }
         this.getHGroupList()
         this.getHMaterList()
         this.getHProcList()
         this.getHSupList()
@@ -442,16 +451,16 @@
        methods: {
         //扫码
         toScanCode(){
            // this.hform.HBarCode = 'GXLX00000967'
            // this.getHBarCodeData('GXLX00000967')
            uni.scanCode({
                onlyFromCamera: true,
                success: (res) => {
                    console.log('条码内容:' + res.result);
                  this.hform.HBarCode = res.result
                  this.getHBarCodeData(res.result)
                }
            });
            this.hform.HBarCode = 'OP000021_01'
            this.getHBarCodeData('OP000021_01')
            // uni.scanCode({
            //     onlyFromCamera: true,
            //     success: (res) => {
            //         console.log('条码内容:' + res.result);
            //       this.hform.HBarCode = res.result
            //       this.getHBarCodeData(res.result)
            //     }
            // });
         },
         //扫流水号
         toScanProcNo(){
@@ -612,6 +621,7 @@
                  })
               },
            });
         },
         //选择接收人
         HEmpNameChange(e){
@@ -619,6 +629,43 @@
               if(this.HEmpNameList[i].HName == e){
                  this.hform.HEmpID = this.HEmpNameList[i].HItemID
                  this.hform.HQCCheckID = this.HEmpNameList[i].HItemID
               }
            }
         },
         //生产班组
         getHGroupList(){
            uni.request({
               url: this.serverUrl + '/Web/GetProductionTeamList_Json',
               data: { sWhere: "and HUSEORGID = " + uni.getStorageSync('OrganizationID') + "" },
               success: (res) => {
                  if(res.data.count == 1){
                     this.HGroupNameList = res.data.data
                     for(var i=0;i<res.data.data.length;i++){
                        this.arrayHGroupName[i] = res.data.data[i].班组
                     }
                     this.$forceUpdate();
                  }else{
                     uni.showToast({
                        title:res.data.Message,
                        icon:'none'
                     })
                  }
               },
               fail: (res) => {
                  console.log(res);
                  uni.showToast({
                     title:'接口请求失败',
                     icon:'none'
                  })
               },
            });
         },
         //选择生产班组
         HGroupNameChange(e){
            for(var i=0;i<this.HGroupNameList.length;i++){
               if(this.HGroupNameList[i].班组 == e){
                  this.hform.HGroupName = this.HGroupNameList[i].班组
                  this.hform.HGroupID = this.HGroupNameList[i].HItemID
               }
            }
         },
@@ -754,7 +801,7 @@
                            this.hform.HSourceID= data.HSourceID
                            this.hform.HSource= data.生产资源
                            this.hform.HGroupID= data.HGroupID
                            this.hform.HGroup= data.班组
                            this.hform.HGroupName= data.班组
                            this.hform.HDeptID= this.userInfo.HDeptID
                            this.hform.HDept= this.userInfo.HDept
                            this.hform.HProcExchHinteID= data.hmainid