| | |
| | | </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> |
| | |
| | | HSupNameList:[], |
| | | arrayHEmpName:[],//操作员 |
| | | HEmpNameList:[], |
| | | arrayHGroupName:[],//班组 |
| | | HGroupNameList:[], |
| | | |
| | | isEdit: false, |
| | | hform:{ |
| | |
| | | // HEmpID:'', |
| | | // HSource:'', |
| | | // HSourceID:'', |
| | | // HGroup:'', |
| | | // HGroupID:'', |
| | | HGroupName:'', |
| | | HGroupID:0, |
| | | // HDept:'', |
| | | // HDeptID:'', |
| | | |
| | |
| | | }else{ |
| | | this.getNewData() |
| | | } |
| | | this.getHGroupList() |
| | | this.getHMaterList() |
| | | this.getHProcList() |
| | | this.getHSupList() |
| | |
| | | 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(){ |
| | |
| | | }) |
| | | }, |
| | | }); |
| | | |
| | | }, |
| | | //选择接收人 |
| | | HEmpNameChange(e){ |
| | |
| | | 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 |
| | | } |
| | | } |
| | | }, |
| | |
| | | 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 |