| | |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">源单类型</view> |
| | | <view class="right" style="position: relative"> |
| | | <picker mode="selector" :range="HSourceBillTypeNameList" |
| | | <view class="right" style="position: relative" :class="!hasSourceBill?'':'disabled'"> |
| | | <picker mode="selector" :range="HSourceBillTypeNameList" :disabled="hasSourceBill" |
| | | @change="HSourceBillTypeNameChange"> |
| | | <input type="text" placeholder="请输入或扫描源单号" v-model="HSourceBillType" /> |
| | | <input type="text" placeholder="请选择源单类型" v-model="HSourceBillType" /> |
| | | <view class="picker-overlay"></view> |
| | | </picker> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">源单单号</view> |
| | | <view class="right"> |
| | | <input type="text" placeholder="请输入或扫描源单号" v-model="hform.HSourceBillNo" |
| | | <view class="right" :class="!hasSourceBill?'':'disabled'"> |
| | | <input type="text" :disabled="hasSourceBill" placeholder="请输入或扫描源单号" v-model="hform.HSourceBillNo" |
| | | @confirm="getSourceBillInfo(hform.HSourceBillNo)" /> |
| | | </view> |
| | | <view class="icon-wrapper-big"> |
| | |
| | | <view class="form-item"> |
| | | <view class="left">制单人</view> |
| | | <view class="right disabled"> |
| | | <input type="text" value="" disabled /> |
| | | <input type="text" :value="hform.HMaker" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">制单日期</view> |
| | | <view class="right disabled"> |
| | | <input type="text" value="" disabled /> |
| | | <input type="text" :value="hform.HMakeDate" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">审核人</view> |
| | | <view class="right disabled"> |
| | | <input type="text" value="" disabled /> |
| | | <input type="text" :value="hform.HChecker" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">审核日期</view> |
| | | <view class="right disabled"> |
| | | <input type="text" value="" disabled /> |
| | | <input type="text" :value="hform.HCheckDate" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">关闭人</view> |
| | | <view class="right disabled"> |
| | | <input type="text" value="" disabled /> |
| | | <input type="text" :value="hform.HCloseMan" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">关闭日期</view> |
| | | <view class="right disabled"> |
| | | <input type="text" value="" disabled /> |
| | | <input type="text" :value="hform.HCloseDate" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">修改人</view> |
| | | <view class="right disabled"> |
| | | <input type="text" value="" disabled /> |
| | | <input type="text" :value="hform.HUpDater" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">修改日期</view> |
| | | <view class="right disabled"> |
| | | <input type="text" value="" disabled /> |
| | | <input type="text" :value="hform.HUpDateDate" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">作废人</view> |
| | | <view class="right disabled"> |
| | | <input type="text" value="" disabled /> |
| | | <input type="text" :value="hform.HDeleteMan" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">作废日期</view> |
| | | <view class="right disabled"> |
| | | <input type="text" value="" disabled /> |
| | | <input type="text" :value="hform.HDeleteDate" disabled /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <text>样本不合格数:</text>{{ SamplingItem.HSampleUnRightQty }} |
| | | </view> |
| | | <view class="detail editable"> |
| | | <text>样本破坏数:</text>{{ SamplingItem.HSampleDamageQty }} |
| | | <text>样本破坏数:</text> |
| | | <view class="sampleDestory"> |
| | | <input type="number" v-model="SamplingItem.HSampleDamageQty" /> |
| | | </view> |
| | | </view> |
| | | <view class="detail editable"> |
| | | <text>检验结果:</text> |
| | | <view style="border-radius: 15%; padding: 0 10rpx" :class=" |
| | | SamplingItem.HInspectResultToSee == '合格' |
| | | ? 'pass-background' |
| | | : SamplingItem.HInspectResultToSee == '不合格' |
| | | ? 'unpass-background' |
| | | : '' |
| | | "> |
| | | SamplingItem.HInspectResultToSee == '合格' |
| | | ? 'pass-background' |
| | | : SamplingItem.HInspectResultToSee == '不合格' |
| | | ? 'unpass-background' |
| | | : '' |
| | | "> |
| | | {{ SamplingItem.HInspectResultToSee }} |
| | | </view> |
| | | </view> |
| | |
| | | |
| | | mainTabSelected: 1, |
| | | subTabSelected: 1, |
| | | |
| | | // 源单状态控制 |
| | | hasSourceBill: false, |
| | | |
| | | // 控制当前显示的弹窗模块 |
| | | enablePopupModule: "", |
| | |
| | | HDeleteMan: "", |
| | | HUpDateDate: "", |
| | | HDeleteDate: "", |
| | | HResult: "", |
| | | HResult: 1, |
| | | HAnalysisMethod: "", |
| | | |
| | | HResDec: "", |
| | | HStatus: "", |
| | | HStatus: 1, |
| | | |
| | | HMainSourceBillType: "", |
| | | HMainSourceInterID: "0", |
| | |
| | | }); |
| | | }, |
| | | async getSourceBillInfo(HBarCode) { |
| | | console.log('HBarCode: ',HBarCode); |
| | | console.log('HBarCode: ', HBarCode); |
| | | // 根据单据类型,调用不同的下推函数 |
| | | if (this.hform.HSourceBillType == 3790) { |
| | | // 工序进站接收单列表首检 |
| | |
| | | this.hform.HProcExchBillNo = data[0].流转卡号; |
| | | this.hform.HProcExchInterID = data[0].HProcExchInterID; |
| | | this.hform.HProcExchEntryID = data[0].HProcExchEntryID || 0; |
| | | this.hform.HProcExchQty = data[0].流转卡数量; |
| | | this.hform.HProcExchQty = data[0].流转卡数量 || 0; |
| | | this.hform.HICMOBillNo = data[0].任务单; |
| | | this.hform.HICMOInterID = data[0].HICMOInterID; |
| | | this.hform.HICMOQty = data[0].HICMOQty || 0; |
| | |
| | | this.hform.HMainSourceBillNo = data[0].单据号; |
| | | this.hform.HMainSourceBillType = data[0].HBillType; |
| | | this.hform.HMainSourceInterID = data[0].HInterID; |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID || 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.HBatchNo = data[0].批号; |
| | | |
| | | this.hasSourceBill = true |
| | | this.get_CheckItem(); |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | |
| | | this.hform.HProcExchBillNo = data[0].流转卡号; |
| | | this.hform.HProcExchInterID = data[0].HProcExchInterID; |
| | | this.hform.HProcExchEntryID = data[0].HProcExchEntryID; |
| | | this.hform.HProcExchQty = data[0].流转卡数量; |
| | | this.hform.HProcExchQty = data[0].流转卡数量 || 0; |
| | | this.hform.HICMOBillNo = data[0].任务单; |
| | | this.hform.HICMOInterID = data[0].HICMOInterID; |
| | | this.hform.HICMOQty = data[0].HICMOQty; |
| | |
| | | this.hform.HMainSourceBillNo = data[0].单据号; |
| | | this.hform.HMainSourceBillType = data[0].HBillType; |
| | | this.hform.HMainSourceInterID = data[0].HInterID; |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID; |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID || 1; |
| | | this.hform.HQCSchemeName = data[0].检验方案名称; |
| | | this.hform.HQCSchemeID = data[0].检验方案ID; |
| | | this.hform.HProcName = data[0].当前工序; |
| | | |
| | | this.hasSourceBill = true |
| | | this.get_CheckItem(); |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | |
| | | HProcExchBillNo = data[0].流转卡号; |
| | | HProcExchInterID = data[0].HProcExchInterID; |
| | | HProcExchEntryID = data[0].HProcExchEntryID; |
| | | HProcExchQty = data[0].流转卡数量; |
| | | HProcExchQty = data[0].流转卡数量 || 0; |
| | | HICMOBillNo = data[0].生产订单号; |
| | | HICMOInterID = data[0].HICMOInterID; |
| | | HICMOQty = data[0].HICMOQty; |
| | |
| | | HMainSourceBillNo = data[0].单据号; |
| | | HMainSourceBillType = data[0].HBillType; |
| | | HMainSourceInterID = data[0].HInterID; |
| | | HICMOEntryID = data[0].HICMOEntryID; |
| | | |
| | | HICMOEntryID = data[0].HICMOEntryID || 1; |
| | | this.hasSourceBill = true |
| | | this.get_CheckItem(); |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | |
| | | this.hform.HProcExchBillNo = data[0].流转卡号; |
| | | this.hform.HProcExchInterID = data[0].HProcExchInterID; |
| | | this.hform.HProcExchEntryID = data[0].HProcExchEntryID; |
| | | this.hform.HProcExchQty = data[0].流转卡数量; |
| | | this.hform.HProcExchQty = data[0].流转卡数量 || 0; |
| | | this.hform.HICMOBillNo = data[0].任务单; |
| | | this.hform.HICMOInterID = data[0].HICMOInterID; |
| | | this.hform.HICMOQty = data[0].HICMOQty; |
| | |
| | | this.hform.HMainSourceBillNo = data[0].单据号; |
| | | this.hform.HMainSourceBillType = data[0].HBillType; |
| | | this.hform.HMainSourceInterID = data[0].HInterID; |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID; |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID || 1; |
| | | this.hform.HQCSchemeName = data[0].检验方案名称; |
| | | this.hform.HQCSchemeID = data[0].检验方案ID; |
| | | this.hform.HProcName = data[0].当前工序; |
| | | |
| | | |
| | | for(let i =0; i<data.length;i++) { |
| | | this.addCheckItem(data[i]) |
| | | } |
| | | |
| | | this.hasSourceBill = true |
| | | this.get_CheckItem(); |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | |
| | | // 结论修改 |
| | | HResultChange(id, e) { |
| | | console.log("e: ", e); |
| | | this.checkItems[id]["HResult"] = e.detail.value ? 1 : 0; |
| | | this.checkItems[id]["HResult"] = e.detail.value ? 1 : 2; |
| | | |
| | | this.HCheckLastResult(); |
| | | }, |
| | |
| | | HCheckLastResult() { |
| | | let unPassNum = 0; |
| | | for (var key in this.checkItems) { |
| | | if (this.checkItems[key]["HResult"] == 0) { |
| | | if (!(this.checkItems[key]["HResult"] == 1)) { |
| | | unPassNum++; |
| | | } |
| | | } |
| | |
| | | let data = e["retVal"][key]; |
| | | Object.assign(this.hform, { |
| | | HICMOInterID: data.hmainid, |
| | | HICMOEntryID: data.HEntryID, |
| | | HICMOEntryID: data.HEntryID || 1, |
| | | HICMOBillNo: data.单据号, |
| | | HMaterNumber: data.产品代码, |
| | | HMaterName: data.产品名称, |
| | |
| | | }, |
| | | // 带出检验项目 |
| | | async get_CheckItem() { |
| | | // 首先清空检验项目 和 检验值 |
| | | this.checkItems = {} |
| | | for (let key in this.subTabs) { |
| | | if (key.substring(1) == "_") { |
| | | this.$delete(this.subTabs, key) |
| | | } |
| | | } |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/GetCheckItemByCheckProjectID", |
| | |
| | | HInspectionLevel: data[i].检验水平, |
| | | HRejectQty: data[i].拒绝数, |
| | | HStrictness: data[i].严格度, |
| | | HSampleUnRightQty: "", |
| | | HSampleUnRightQty: 0, |
| | | HAQL: data[i].AQL, |
| | | HSamplingType: data[i].抽样类型, |
| | | HCompareSymbol: data[i].比较符, |
| | | HTargetVal: data[i].目标值 || 0, |
| | | }; |
| | | |
| | | this.addCheckItem(checkItem); |
| | |
| | | }); |
| | | } |
| | | }, |
| | | // 检验项目返回值 |
| | | // 检验值返回值 |
| | | InspectValueComplete(e) { |
| | | console.log("e: ", e); |
| | | let key = e.num; |
| | | e.HStatus = e.HStatus ? 1 : 0 |
| | | if(e.HResult2 == ''){ |
| | | e.HResult2 = this.checkItems[key].HResult |
| | | } |
| | | Object.assign(this.checkItems[key], e); |
| | | this.checkItems[key].HInspectResultToSee = this.checkItems[key].HResult2; |
| | | this.checkItems[key].HResult = this.checkItems[key].HResult2 == '合格' ? 1 : 2; |
| | | |
| | | this.HCheckLastResult(); |
| | | |
| | | }, |
| | | checkSubmitValidate() { |
| | | if (this.hform.HICMOQty == "" || this.hform.HICMOQty <= 0) { |
| | |
| | | return false; |
| | | } |
| | | |
| | | if (this.hform.HFirstCheckEmp) { |
| | | if (this.hform.HFirstCheckEmp == 0) { |
| | | CommonUtils.showTips({ |
| | | message: "检验员未选择!", |
| | | }); |
| | |
| | | } |
| | | |
| | | for (let key in this.checkItems) { |
| | | if (this.checkItems[key].HQCCheckItemID) { |
| | | if (!this.checkItems[key].HQCCheckItemID) { |
| | | CommonUtils.showTips({ |
| | | message: `第${this.checkItems[key].num}行检验项目不能为空!`, |
| | | }); |
| | |
| | | } |
| | | if ( |
| | | this.checkItems[key].HSampleUnRightQty == "" || |
| | | this.checkItems[key].HSampleUnRightQty == null |
| | | this.checkItems[key].HSampleUnRightQty == 0 |
| | | ) { |
| | | this.checkItems[key].HSampleUnRightQty = 0; |
| | | } |
| | |
| | | return true; |
| | | }, |
| | | async submit() { |
| | | if (!this.checkSubmitValidate) { |
| | | if (!this.checkSubmitValidate()) { |
| | | return; |
| | | } |
| | | try { |
| | | console.log('this.$refs: ',this.$refs); |
| | | // 检查是否有未切换的检验值模块(是否包含set_SaveValue方法),如果有,则运行一次保存检验值的方法,根据检验值是否保存成功再执行下一步 |
| | | if (typeof this.$refs.InspectValueModules != "undefined") { |
| | | if (typeof this.$refs.InspectValueModules != "undefined" && this.$refs.InspectValueModules.length > 0) { |
| | | // 加载有检验值模块 |
| | | await this.$refs.InspectValueModules[0].set_SaveValue(); |
| | | this.InspectValues[0] = this.$refs.InspectValueModules[0].InSpectValues; |
| | | await this.InspectValueComplete(this.$refs.InspectValueModules[0].checkData) |
| | | } |
| | | let InspectValuesTrans = []; |
| | | let HInterID = this.hform.HInterID; |
| | |
| | | let HEntryID = key; |
| | | |
| | | InspectValuesTrans.push( |
| | | `${JSON.stringify(this.InspectValues[key])};${HInterID};${HEntryID}` |
| | | `${JSON.stringify(this.InspectValues[key])}` |
| | | ); |
| | | } |
| | | let checkItemsArray = []; |
| | | for (var key in this.checkItems) { |
| | | checkItemsArray.push(this.checkItems[key].data); |
| | | let checkItem = JSON.parse(JSON.stringify(this.checkItems[key])) |
| | | delete checkItem.data |
| | | checkItemsArray.push(checkItem); |
| | | } |
| | | |
| | | console.log('checkItemsArray: ',checkItemsArray); |
| | | let sMainSub = `${JSON.stringify(this.hform)};${JSON.stringify( |
| | | checkItemsArray |
| | | )};${this.operationType};${getUserInfo()["Czymc"]};${InspectValuesTrans[0]}`; |
| | | console.log("this.checkItems: ", this.checkItems); |
| | | |
| | | let msg = { |
| | | sMainSub: sMainSub, |
| | | sValues: InspectValuesTrans, |
| | | }; |
| | | |
| | | console.log("msg: ", msg); |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: "/QC_FirstPieceCheckBill/set_SaveBill", |
| | | data: { |
| | |
| | | HICMOBillNo: data[0].任务单号, |
| | | HICMOQty: data[0].任务单数量, |
| | | HICMOInterID: data[0].HICMOInterID, |
| | | HICMOEntryID: data[0].HICMOEntryID, |
| | | HICMOEntryID: data[0].HICMOEntryID || 1, |
| | | HMaterID: data[0].HMaterID, |
| | | HMaterName: data[0].物料名称, |
| | | HMaterNumber: data[0].物料代码, |
| | | HProcID: data[0].HProcID, |
| | | HProcName: data[0].HProcName, |
| | | HProcExchQty: data[0].HProcExchQty, |
| | | HProcExchQty: data[0].HProcExchQty || 0, |
| | | HProcExchBillNo: data[0].HProcExchBillNo, |
| | | HProcExchInterID: data[0].HProcExchInterID, |
| | | HProcExchEntryID: data[0].HProcExchEntryID, |
| | | HProcExchEntryID: data[0].HProcExchEntryID || 0, |
| | | HFirstCheckEmp: data[0].HFirstCheckEmp, |
| | | HFirstCheckEmpName: data[0].质检员名称, |
| | | HQCSchemeID: data[0].检验方案ID, |
| | |
| | | HInspectionLevel: data[0].检验水平, |
| | | HRejectQty: data[0].拒绝数, |
| | | HStrictness: data[0].严格度, |
| | | HSampleUnRightQty: data[0].样本不合格数, |
| | | HSampleUnRightQty: data[0].样本不合格数 || 0, |
| | | HSampleUnRightQty2: data[0].样本不合格数, |
| | | HAQL: data[0].AQL, |
| | | HUnitID: data[0].HUnitID, |
| | |
| | | HShiftsName: data[0].班次名称, |
| | | HErrTreatment: data[0].异常临时处理方案, |
| | | HBatchNo: data[0].批号, |
| | | HLastResult: data[0].判定结论 == "合格" ? "true" : "false", |
| | | HLastResult: data[0].判定结论 == "合格" ? true : false, |
| | | HTakeSampleCheckBillID: data[0].HTakeSampleCheckBillID, |
| | | HTakeSampleCheckBillNo: data[0].HTakeSampleCheckBillNo, |
| | | HAnalysisMethod: function(){ |
| | | if(data[0].HAnalysisMethod == 1) { |
| | | return '定性检验' |
| | | }else if(data[0].HAnalysisMethod == 2) { |
| | | return '定量检验' |
| | | }else { |
| | | return '其他检验' |
| | | } |
| | | }(), |
| | | |
| | | |
| | | |
| | | }); |
| | | |
| | | for (let i = 0; i < data.length; i++) { |
| | |
| | | HAvg: data[i].平均值, |
| | | HRemark: data[i].表体备注, |
| | | HAnalysisMethod: data[i].分析方法 == "定性分析" ? |
| | | 1 : |
| | | data[i].分析方法 == "定量分析" ? |
| | | 2 : |
| | | 3, |
| | | 1 : data[i].分析方法 == "定量分析" ? |
| | | 2 : 3, |
| | | HKeyInspect: data[i].重点检查 == "否" ? false : true, |
| | | HSampleSchemeID: data[i].HSampleSchemeID, |
| | | HUnitID: data[i].HUnitID, |
| | |
| | | HSamplingType: 0, |
| | | HSamplingType: data[i].抽样类型, |
| | | HStrictness: data[i].严格度, |
| | | HInspectResultToSee: data[i].检验结果 |
| | | }); |
| | | |
| | | } |
| | | |
| | | |
| | | this.hasSourceBill = true |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | |
| | | if (this.operationType == 1) { |
| | | await this.getMaxBillNo(); |
| | | } else if (this.operationType == 2) { |
| | | |
| | | } else if (this.operationType == 3) { |
| | | await this.RoadBillMain(); |
| | | } else if (this.operationType == 3) {} |
| | | } |
| | | |
| | | await this.InitHSource(); |
| | | await this.InitHWorkShift(); |
| | |
| | | display: inline-flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | |
| | | text { |
| | | flex-shrink: 0; |
| | | } |
| | | |
| | | .sampleDestory { |
| | | border: 1px solid #acacac; |
| | | border-radius: 10%; |
| | | padding: 0 12rpx; |
| | | } |
| | | } |
| | | } |
| | | } |