| | |
| | | <view class="form-item"> |
| | | <view class="left">判断结论</view> |
| | | <view class="right none-border"> |
| | | <radio-group @changer="checkResultChange"> |
| | | <radio-group @change.stop="checkResultChange"> |
| | | <label> |
| | | <radio value="0" :checked="hform.HLastResult" /><text></text> |
| | | 合格 |
| | |
| | | </view> |
| | | </view> |
| | | <view style="height: 120rpx"></view> |
| | | <view class="bottom-btn"> |
| | | <button class="btn-a" size="mini" @tap="submit">提交</button> |
| | | <view class="bottom-btn" @tap.stop="() => {}"> |
| | | <button class="btn-a" size="mini" @tap.stop="submit">提交</button> |
| | | <view style="flex: 1"></view> |
| | | <button class="btn-a" size="mini" @tap="addNew">新增</button> |
| | | <button class="btn-c" size="mini" @tap="goBack">退出</button> |
| | | <button class="btn-a" size="mini" @tap.stop="addNew">新增</button> |
| | | <button class="btn-c" size="mini" @tap.stop="goBack">退出</button> |
| | | </view> |
| | | <SampleSchemePopupVue v-if="enablePopupModule == PopupModuleNameList[1]" ref="listPopup" |
| | | @update="SampleSchemeComplete" :bindKey="currentChechItemIDCache"> |
| | |
| | | @update="HQCSchemeComplete" :bindKey="0"></CheckProjectPopupVue> |
| | | <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HSourceBillType" |
| | | :HStockOrgID="hform.HStockOrgID" @BillSelectComplete="HandleBillSelectComplete"></BillListPopupVue> |
| | | |
| | | <uni-popup ref="popup" background-color="#fff"> |
| | | <view class="popup-content"> |
| | | <view class="tit">异常类型</view> |
| | | <view class="item" v-for="(item,index) in popList" :key="index" @tap="toAbnm(item)">{{item}}</view> |
| | | </view> |
| | | </uni-popup> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | // 检验员 |
| | | GyFirstCheckEmpList: [], |
| | | GyFirstCheckEmpNameList: [], |
| | | // 不良类型 |
| | | popList: [], |
| | | badReasonBackTypeList: [], |
| | | |
| | | // 检验方案 |
| | | arrayAnalysisMethod: [{ |
| | |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | this.hform.HMainSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HMainSourceBillNo = data[0]['单据号'] |
| | | this.hform.HSourceBillNo = data[0]['单据号'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | |
| | | this.hform.HProcExchQty = data[0].流转卡数量 |
| | | this.hform.HSourceName = data[0].生产资源 |
| | | this.hform.HSourceID = data[0].HSourceID |
| | | this.hform.HProcID = data[0].HProcID |
| | | this.hform.HProcName = data[0].当前工序 |
| | | this.hform.HTakeSampleCheckBillNo = data[0].单据号 |
| | | this.hform.HTakeSampleCheckBillID = data[0].HInterID |
| | | this.hform.HProcID = data[0].HProcID |
| | | this.hform.HProcName = data[0].工序名称 |
| | | this.hform.HCheckQty = data[0].检验数量 |
| | | } else if (this.hform.HSourceBillType == "3790") { |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | this.hform.HMainSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HMainSourceBillNo = data[0]['单据号'] |
| | | this.hform.HSourceBillNo = data[0]['单据号'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | this.hform.HMainSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HMainSourceBillNo = data[0]['单据号'] |
| | | this.hform.HSourceBillNo = data[0]['单据号'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | this.hform.HMainSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HMainSourceBillNo = data[0]['单据号'] |
| | | this.hform.HSourceBillNo = data[0]['单据号'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID || 1; |
| | | this.hform.HQCSchemeName = data[0].检验方案名称; |
| | | this.hform.HQCSchemeID = data[0].检验方案ID; |
| | | this.hform.HProcName = data[0].当前工序; |
| | | this.hform.HProcName = data[0].工序名称; |
| | | this.hform.HCheckQty = data[0].取样数量 |
| | | this.hform.HProcID = data[0].HProcID |
| | | this.hasSourceBill = true |
| | | this.get_CheckItem(); |
| | | } catch (err) { |
| | |
| | | } |
| | | return ""; |
| | | }, |
| | | checkResultChange(event) { |
| | | console.log("event: ", event); |
| | | checkResultChange({detail: {value}}) { |
| | | if(value == 1) { |
| | | this.hform.HLastResult = false |
| | | }else { |
| | | this.hform.HLastResult = true |
| | | } |
| | | }, |
| | | // 检验项目新增行 |
| | | addCheckItem(resource) { |
| | |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | // 判断 最后结果为不合格的情况下,检验项目中是否有不合格项 |
| | | if(this.hform.HLastResult == 0 || this.hform.HLastResult == false){ |
| | | let count = 0 |
| | | console.log('this.checkItems: ',this.checkItems); |
| | | for (let key in this.checkItems) { |
| | | if (this.checkItems.hasOwnProperty(key)) { |
| | | let element = this.checkItems[key]; |
| | | if(element.HResult == 2){ |
| | | count ++ |
| | | } |
| | | |
| | | } |
| | | } |
| | | if(count == 0) { |
| | | CommonUtils.showTips({ |
| | | message: "判断结论为不合格,检验项目中不存在不合格单据,提交失败!", |
| | | }); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | if(!this.hform.HSourceBillNo) { |
| | | CommonUtils.showTips({ |
| | | message: "未扫描(选择)源单,请扫描(选择)源单后提交!", |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | for (let key in this.checkItems) { |
| | | if (!this.checkItems[key].HQCCheckItemID) { |
| | |
| | | let AuditSuccess = await this.auditBill() |
| | | if (AuditSuccess) { |
| | | console.log("审核成功"); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: res.data.Message + "。是否继续新增?", |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log("用户点击确定"); |
| | | uni.redirectTo({ |
| | | url: "/pages/ZLGL/shoujianjianyan/form?operationType=1", |
| | | }); |
| | | } else if (res.cancel) { |
| | | console.log("用户点击取消"); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | }, |
| | | }); |
| | | } else { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '审核失败' |
| | | }) |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: res.data.Message + "。是否继续新增?", |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log("用户点击确定"); |
| | | uni.redirectTo({ |
| | | url: "/pages/ZLGL/shoujianjianyan/form?operationType=1", |
| | | }); |
| | | } else if (res.cancel) { |
| | | console.log("用户点击取消"); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | // 判断 该单据是否为不合格单据,如果为不合格单据,则跳转到异常反馈单 |
| | | if (this.hform.HLastResult == false) { |
| | | this.$refs.popup.open('center') |
| | | return |
| | | } |
| | | |
| | | // 根据 提交返回 的是否允许显示提示信息 判断是直接新增单据还是提示信息 |
| | | if(res.data.NotShowTips) { |
| | | this.addNew() |
| | | return |
| | | } |
| | | |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: res.data.Message + "。是否返回?", |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log("用户点击取消"); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } else if (res.cancel) { |
| | | console.log("用户点击确定"); |
| | | uni.redirectTo({ |
| | | url: "/pages/ZLGL/shoujianjianyan/form?operationType=1", |
| | | }); |
| | | } |
| | | }, |
| | | }); |
| | | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | |
| | | message: `首件检验单保存错误: ${err}`, |
| | | }); |
| | | } |
| | | }, |
| | | toAbnm(item) { |
| | | this.$refs.popup.close() |
| | | uni.redirectTo({ |
| | | url: '/pages/baogong/OA_ErrMsgBackBill?HICMOBillNo=' + this.hform.HICMOBillNo + |
| | | '&HSourceName=' + this.hform.HSourceName + |
| | | '&HSourceBillNo=' + this.hform.HSourceBillNo + |
| | | '&HType=' + item + |
| | | '&OperationType=5&linterid='+ this.hform.HInterID +'&HSouceBillType=7505' |
| | | }) |
| | | }, |
| | | async auditBill() { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | |
| | | }); |
| | | } |
| | | }, |
| | | async getErrMsgBackType() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_BadReason/Gy_ErrMsgBackTypeList', |
| | | data: { |
| | | sWhere: ` and 使用组织名称 = '${uni.getStorageSync('Organization')}'`, |
| | | user: getUserInfo()['Czymc'] |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.popList = Array.from(data).map(item => item['异常反馈类型名称']) |
| | | this.badReasonBackTypeList = data |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取异常反馈类型失败: ${Message}` |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取异常反馈类型失败: ${err}` |
| | | }) |
| | | } |
| | | }, |
| | | }, |
| | | async onLoad(e) { |
| | | this.operationType = e.operationType || 1; |
| | |
| | | await this.getMaxBillNo(); |
| | | } else if (this.operationType == 2) { |
| | | //有源单下推 |
| | | await this.getMaxBillNo(); |
| | | await this.getMaxBillNo(); |
| | | |
| | | if (e.HSouceBillType == "7521") { |
| | | if (uni.getStorageSync('Organization') == "宁波市华舟包装有限公司") { |
| | |
| | | this.hform.HTakeSampleCheckBillID = e.linterid; |
| | | //取样单查询数据 |
| | | await this.LoadingInformation_TakeSampleCheckBill(e.linterid); |
| | | } else if (e.HSouceBillType == "3772"){ |
| | | if (uni.getStorageSync('Organization') == "宁波市华舟包装有限公司") { |
| | | this.HSourceBillType = "工序流转卡"; // 显示名称 |
| | | this.hform.HSourceBillType = "3772"; // 对应的值 |
| | | this.hform.HSourceBillNo = e.HBillNo |
| | | } |
| | | |
| | | this.hform.HProcExchBillNo = e.HBillNo |
| | | this.hform.HProcExchInterID = e.linterid |
| | | this.hform.HProcExchEntryID = e.hsubid |
| | | |
| | | await this.HandleBillSelectComplete({HInterID: e.linterid, HEntryID: e.hsubid}) |
| | | } |
| | | } else if (this.operationType == 3) { |
| | | this.hform.HInterID = e.linterid || 0; |
| | |
| | | await this.InitHWorkShift(); |
| | | await this.InitHEmp(); |
| | | await this.loadCache(); |
| | | await this.getErrMsgBackType() |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | margin-left: 4px; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .popup-content { |
| | | width: 500rpx; |
| | | border-radius: 20rpx; |
| | | text-align: center; |
| | | padding-bottom: 20rpx; |
| | | |
| | | .tit { |
| | | height: 120rpx; |
| | | line-height: 120rpx; |
| | | font-size: 34rpx; |
| | | color: #222; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .item { |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | border-top: 1px solid #eee; |
| | | font-size: 32rpx; |
| | | color: #444; |
| | | } |
| | | } |
| | | </style> |