| | |
| | | </view> |
| | | <view style="height: 120rpx"></view> |
| | | <view class="bottom-btn"> |
| | | <button class="btn-a" size="mini" @tap="submit">提交</button> |
| | | <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: [{ |
| | | value: 1, |
| | |
| | | HMainSourceEntryID: "1", |
| | | HMainSourceBillNo: "", |
| | | HStockOrgID: uni.getStorageSync('OrganizationID'), |
| | | HRemarkSN: '' // SN码记录 |
| | | }, |
| | | // 检验项目和抽样检验 值 |
| | | checkItems: {}, |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | // 获取异常反馈类型 |
| | | 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}` |
| | | }) |
| | | } |
| | | }, |
| | | // 去异常反馈单页面 |
| | | 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=4&linterid=&HSouceBillType=' |
| | | }) |
| | | }, |
| | | // 源单类型选择 |
| | | HSourceBillTypeNameChange(e) { |
| | | this.HSourceBillType = this.HSourceBillTypeNameList[e.detail.value]; |
| | |
| | | }); |
| | | }, |
| | | async getSourceBillInfo(HBarCode) { |
| | | let HBarCodeOld = HBarCode |
| | | console.log('HBarCode: ', HBarCode); |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/WEBSController/get_CheckBillBarCode_Json_CheckItem", |
| | |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | count, |
| | | code |
| | | } = res.data |
| | | if (count == 1) { |
| | | if (data[0]['HBack'] == 1) { |
| | |
| | | }) |
| | | return; |
| | | } |
| | | if (this.hform.HSourceBillType == "3791") { //出站单 |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | 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.HQCSchemeID = data[0].检验方案ID |
| | | this.hform.HSourceBillQty = data[0].HSourceBillQty |
| | | this.hasSourceBill = true |
| | | this.hform.HICMOBillNo = data[0].任务单号 |
| | | this.hform.HICMOInterID = data[0].HICMOInterID |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID |
| | | this.hform.HICMOQty = data[0].生产数量 |
| | | this.hform.HProcExchBillNo = data[0].HProcExchBillNo |
| | | this.hform.HProcExchInterID = data[0].HProcExchInterID |
| | | this.hform.HProcExchEntryID = data[0].HProcExchEntryID |
| | | 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.HCheckQty = data[0].出站数量 |
| | | |
| | | if (code == 2) { |
| | | // 存在已有的单据,提示是否需要继续新增 |
| | | uni.showModal({ |
| | | title: '温馨提示', |
| | | content: "此单据已生成末件检验单,是否需要继续新增", |
| | | confirmText: "是", |
| | | cancelText: "否", |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | if (this.hform.HSourceBillType == "3791") { //出站单 |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | 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.HQCSchemeID = data[0].检验方案ID |
| | | this.hform.HSourceBillQty = data[0].HSourceBillQty |
| | | this.hasSourceBill = true |
| | | this.hform.HICMOBillNo = data[0].任务单号 |
| | | this.hform.HICMOInterID = data[0].HICMOInterID |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID |
| | | this.hform.HICMOQty = data[0].生产数量 |
| | | this.hform.HProcExchBillNo = data[0].HProcExchBillNo |
| | | this.hform.HProcExchInterID = data[0].HProcExchInterID |
| | | this.hform.HProcExchEntryID = data[0].HProcExchEntryID |
| | | 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.HCheckQty = data[0].出站数量 |
| | | } else { |
| | | 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]['单据号'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | | this.hform.HQCSchemeID = data[0].检验方案ID |
| | | this.hform.HSourceBillQty = data[0].HSourceBillQty |
| | | this.hasSourceBill = true |
| | | this.hform.HICMOBillNo = data[0].任务单号 |
| | | this.hform.HICMOInterID = data[0].HICMOInterID |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID |
| | | this.hform.HICMOQty = data[0].生产数量 |
| | | this.hform.HProcExchBillNo = data[0].单据号 |
| | | this.hform.HProcExchInterID = data[0].HInterID |
| | | this.hform.HProcExchEntryID = data[0].HEntryID |
| | | 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.HRemarkSN = HBarCodeOld // 所扫描的条码存SN字段 |
| | | this.get_CheckItem(); |
| | | } else if (res.cancel) {} |
| | | }, |
| | | }) |
| | | } else { |
| | | 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]['单据号'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | | this.hform.HQCSchemeID = data[0].检验方案ID |
| | | this.hform.HSourceBillQty = data[0].HSourceBillQty |
| | | this.hasSourceBill = true |
| | | this.hform.HICMOBillNo = data[0].任务单号 |
| | | this.hform.HICMOInterID = data[0].HICMOInterID |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID |
| | | this.hform.HICMOQty = data[0].生产数量 |
| | | this.hform.HProcExchBillNo = data[0].单据号 |
| | | this.hform.HProcExchInterID = data[0].HInterID |
| | | this.hform.HProcExchEntryID = data[0].HEntryID |
| | | 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].当前工序 |
| | | if (this.hform.HSourceBillType == "3791") { //出站单 |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | 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.HQCSchemeID = data[0].检验方案ID |
| | | this.hform.HSourceBillQty = data[0].HSourceBillQty |
| | | this.hasSourceBill = true |
| | | this.hform.HICMOBillNo = data[0].任务单号 |
| | | this.hform.HICMOInterID = data[0].HICMOInterID |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID |
| | | this.hform.HICMOQty = data[0].生产数量 |
| | | this.hform.HProcExchBillNo = data[0].HProcExchBillNo |
| | | this.hform.HProcExchInterID = data[0].HProcExchInterID |
| | | this.hform.HProcExchEntryID = data[0].HProcExchEntryID |
| | | 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.HCheckQty = data[0].出站数量 |
| | | } else { |
| | | 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]['单据号'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | | this.hform.HQCSchemeID = data[0].检验方案ID |
| | | this.hform.HSourceBillQty = data[0].HSourceBillQty |
| | | this.hasSourceBill = true |
| | | this.hform.HICMOBillNo = data[0].任务单号 |
| | | this.hform.HICMOInterID = data[0].HICMOInterID |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID |
| | | this.hform.HICMOQty = data[0].生产数量 |
| | | this.hform.HProcExchBillNo = data[0].单据号 |
| | | this.hform.HProcExchInterID = data[0].HInterID |
| | | this.hform.HProcExchEntryID = data[0].HEntryID |
| | | 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.HRemarkSN = HBarCodeOld // 所扫描的条码存SN字段 |
| | | this.get_CheckItem(); |
| | | } |
| | | this.get_CheckItem(); |
| | | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Gy_Employee/list", |
| | | data: { |
| | | sWhere: ` and 组织名称 = '${uni.getStorageSync("Organization")}' and 禁用标记 = ''and 审核人 !='' `, |
| | | sWhere: ` and 组织名称 = '${uni.getStorageSync("Organization")}' and 禁用标记 = ''and 审核人 !='' and HDeptID = ${uni.getStorageSync("HDeptID")}`, |
| | | user: getUserInfo()["Czymc"], |
| | | Organization: uni.getStorageSync("Organization"), |
| | | }, |
| | |
| | | CurUserName: getUserInfo()['Czymc'] |
| | | } |
| | | }) |
| | | |
| | | |
| | | if (res.data.count == 1) { |
| | | return true |
| | | } else { |
| | |
| | | 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/mojianjianyan/ProcessCheckBill?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/mojianjianyan/ProcessCheckBill?operationType=1", |
| | | }); |
| | | } else if (res.cancel) { |
| | | console.log("用户点击取消"); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | // 判断 该单据是否为不合格单据,如果为不合格单据,则跳转到异常反馈单 |
| | | if (this.hform.HCheckerResult == 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/mojianjianyan/ProcessCheckBill?operationType=1", |
| | | }); |
| | | } |
| | | }, |
| | | }); |
| | | |
| | | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | |
| | | this.hform.HQCSchemeName = data[0].检验方案名称; |
| | | this.hform.HQCSchemeID = data[0].检验方案ID; |
| | | this.hform.HProcName = data[0].当前工序; |
| | | this.hform.HProcID = data[0].HProcID |
| | | this.hasSourceBill = true |
| | | this.get_CheckItem(); |
| | | } catch (err) { |
| | |
| | | await this.InitHWorkShift(); |
| | | await this.InitHEmp(); |
| | | await this.loadCache(); |
| | | await this.getErrMsgBackType() |
| | | }, |
| | | onUnload() { |
| | | this.setPortrait(); |
| | |
| | | <style lang="scss" scoped> |
| | | input { |
| | | width: inherit; |
| | | font-size: 26rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | .uni-input { |
| | |
| | | |
| | | view { |
| | | width: auto; |
| | | font-size: 26rpx; |
| | | font-size: 30rpx; |
| | | color: #555; |
| | | text-align: center; |
| | | padding: 16rpx 0; |
| | |
| | | |
| | | /* 多行对齐方式 */ |
| | | .form-item { |
| | | width: 600rpx; |
| | | width: 650rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 26rpx; |
| | | font-size: 30rpx; |
| | | padding: 6rpx 0; |
| | | margin-right: 20rpx; |
| | | |
| | |
| | | .right { |
| | | // width: 450rpx; |
| | | padding: 8rpx 20rpx; |
| | | font-size: 26rpx; |
| | | font-size: 30rpx; |
| | | flex: 1; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #acacac; |
| | |
| | | |
| | | .uni-input-placeholder, |
| | | .uni-input-input { |
| | | font-size: 26rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | |
| | | .uni-combox::v-deep input { |
| | | height: inherit; |
| | | font-size: 26rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | |
| | | .right-select { |
| | | //padding: 8rpx 20rpx; |
| | | font-size: 26rpx; |
| | | font-size: 30rpx; |
| | | flex: 1; |
| | | |
| | | } |
| | |
| | | width: 180rpx; |
| | | height: 66rpx; |
| | | line-height: 66rpx; |
| | | font-size: 26rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | .btn-a { |
| | |
| | | gap: 10rpx 0; |
| | | |
| | | input { |
| | | font-size: 26rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | .detail { |
| | | // width: 50%; |
| | | box-sizing: border-box; |
| | | font-size: 26rpx; |
| | | font-size: 30rpx; |
| | | color: #555; |
| | | padding-right: 20rpx; |
| | | |
| | | text { |
| | | color: #999; |
| | | font-size: 26rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | |
| | |
| | | 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> |