| | |
| | | </view> |
| | | <view class="icon-wrapper-big"> |
| | | <uni-icons class="right-icon" type="scan" |
| | | style="background-color: #3a78ff;padding: 6rpx; color: #fff;border-radius: 100%;" |
| | | size="20" @click="toScanCode"></uni-icons> |
| | | :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'" |
| | | :disabled="hasSourceBill" size="20" @click="toScanCode"></uni-icons> |
| | | </view> |
| | | <view class="icon-wrapper-big"> |
| | | <uni-icons class="right-icon" type="search" |
| | | :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'" |
| | | :disabled="hasSourceBill" size="20" @click="toBillSelector"></uni-icons> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | <view class="item" v-for="(item,index) in popList" :key="index" @tap="toAbnm(item)">{{item}}</view> |
| | | </view> |
| | | </uni-popup> |
| | | <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HSourceBillType" |
| | | :HStockOrgID="hform.HStockOrgID" @BillSelectComplete="HandleBillSelectComplete"></BillListPopupVue> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | import ProcExchBillPopupVue from "../../../components/ZLGL/ProcExchBillPopup.vue"; |
| | | import ProcessPopupVue from "../../../components/ZLGL/ProcessPopup.vue"; |
| | | import CheckProjectPopupVue from "../../../components/ZLGL/CheckProjectPopup.vue"; |
| | | import BillListPopupVue from "../../../components/BillListPopup/BillListPopup.vue"; |
| | | import { |
| | | getUserInfo |
| | | } from "../../../utils/auth"; |
| | |
| | | ProcExchBillPopupVue, |
| | | ProcessPopupVue, |
| | | CheckProjectPopupVue, |
| | | BillListPopupVue, |
| | | }, |
| | | computed: { |
| | | judgeConclusion: { |
| | |
| | | ], |
| | | // 主表属性 |
| | | hform: { |
| | | HBillType: '7520', |
| | | HSourceBillType: "3790", |
| | | HSourceBillNo: "", |
| | | HBillNo: "", |
| | |
| | | HMainSourceInterID: "0", |
| | | HMainSourceEntryID: "1", |
| | | HMainSourceBillNo: "", |
| | | HStockOrgID: uni.getStorageSync('OrganizationID'), |
| | | }, |
| | | // 检验项目和抽样检验 值 |
| | | checkItems: {}, |
| | |
| | | HSourceBillTypeNameChange(e) { |
| | | this.HSourceBillType = this.HSourceBillTypeNameList[e.detail.value]; |
| | | this.hform.HSourceBillType = this.HSourceBillTypeValueList[e.detail.value]; |
| | | const pages = getCurrentPages() |
| | | // 获取页面栈中的最后一个元素,也就是当前显示的页面 |
| | | const currentPage = pages[pages.length - 1] |
| | | // 选择源单类型后 缓存当前页面选择 |
| | | uni.setStorageSync(`${currentPage.route.split("/").pop()}_HSourceBillTypeCache`, { |
| | | HSourceBillTypeName: this.HSourceBillType, |
| | | HSourceBillType: this.hform.HSourceBillType |
| | | }) |
| | | }, |
| | | // 读取缓存 |
| | | loadCache() { |
| | | const pages = getCurrentPages() |
| | | // 获取页面栈中的最后一个元素,也就是当前显示的页面 |
| | | const currentPage = pages[pages.length - 1] |
| | | let HBillTypeCache = uni.getStorageSync(`${currentPage.route.split("/").pop()}_HSourceBillTypeCache`) |
| | | if (HBillTypeCache) { |
| | | this.HSourceBillType = HBillTypeCache.HSourceBillTypeName |
| | | this.hform.HSourceBillType = HBillTypeCache.HSourceBillType |
| | | this.hform.HMainSourceBillType = HBillTypeCache.HSourceBillType |
| | | } |
| | | }, |
| | | toBillSelector() { |
| | | this.$refs['billList'].showPopup() |
| | | }, |
| | | toScanCode() { |
| | | MpaasScan.scanCode((res) => { |
| | |
| | | }, |
| | | async getSourceBillInfo(HBarCode) { |
| | | console.log('HBarCode: ', HBarCode); |
| | | // 根据单据类型,调用不同的下推函数 |
| | | if (this.hform.HSourceBillType == 3790) { |
| | | // 工序进站接收单列表首检 |
| | | await this.LoadingInformation_StationInBill(HBarCode); |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | (uni.getStorageSync("OrganizationID") == "100199" && |
| | | uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/WEBSController/get_CheckBillBarCode_Json_CheckItem", |
| | | data: { |
| | | HBillType: this.hform.HBillType, |
| | | HSourceBillType: this.hform.HSourceBillType, |
| | | HBarCode: HBarCode, |
| | | HInterID: 0, |
| | | HEntryID: 0, |
| | | Mode: 1, //扫码模式 |
| | | user: getUserInfo()["Czymc"] |
| | | } |
| | | return; |
| | | }) |
| | | |
| | | console.log(res) |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | if (count == 1) { |
| | | if (this.hform.HSourceBillType == "3772") { |
| | | // 工序流转卡 |
| | | 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].单据号 |
| | | 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].当前工序 |
| | | } else if (this.hform.HSourceBillType == "3790") { |
| | | // 工序进站接收单 |
| | | 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].检验数量 |
| | | this.hform.HICMOBillNo = data[0].任务单号 |
| | | this.hform.HICMOInterID = data[0].HICMOInterID |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID |
| | | this.hform.HICMOQty = data[0].生产数量 |
| | | this.hform.HCheckQty = 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.HTakeSampleCheckBillNo = data[0].单据号 |
| | | this.hform.HTakeSampleCheckBillID = data[0].HInterID |
| | | } else { |
| | | // 其他类型(3793工序委外接收单、3710生产订单) |
| | | 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].单据号 |
| | | 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 == 3793) { |
| | | // 工序委外接收单列表首检 |
| | | await this.LoadingInformation_StationEntrustOutBill(HBarCode); |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | (uni.getStorageSync("OrganizationID") == "100199" && |
| | | uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | this.get_CheckItem(); |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | return; |
| | | |
| | | }, |
| | | async HandleBillSelectComplete(e) { |
| | | console.log('e: ', e); |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/WEBSController/get_CheckBillBarCode_Json_CheckItem", |
| | | data: { |
| | | HBillType: this.hform.HBillType, |
| | | HSourceBillType: this.hform.HSourceBillType, |
| | | HBarCode: "", |
| | | HInterID: e?.HInterID, |
| | | HEntryID: e?.HEntryID, |
| | | Mode: 2, //选单模式 |
| | | user: getUserInfo()["Czymc"] |
| | | } |
| | | if (this.hform.HSourceBillType == 3710) { |
| | | // 生产订单列表首检 |
| | | await this.LoadingInformation_ICMO(HBarCode); |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | (uni.getStorageSync("OrganizationID") == "100199" && |
| | | uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | if (count == 1) { |
| | | if (this.hform.HSourceBillType == "3772") { |
| | | // 工序流转卡 |
| | | 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.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].当前工序 |
| | | } else if (this.hform.HSourceBillType == "3790") { |
| | | // 工序进站接收单 |
| | | 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].检验数量 |
| | | this.hform.HICMOBillNo = data[0].任务单号 |
| | | this.hform.HICMOInterID = data[0].HICMOInterID |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID |
| | | this.hform.HICMOQty = data[0].生产数量 |
| | | this.hform.HCheckQty = 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.HTakeSampleCheckBillNo = data[0].单据号 |
| | | this.hform.HTakeSampleCheckBillID = data[0].HInterID |
| | | } else { |
| | | // 其他类型(3793工序委外接收单、3710生产订单) |
| | | 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.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].当前工序 |
| | | } |
| | | return; |
| | | |
| | | console.log('获取源单:', data) |
| | | |
| | | this.get_CheckItem(); |
| | | this.hasSourceBill = true; |
| | | this.$refs['billList'].exit(); |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | if (this.hform.HSourceBillType == 3772) { |
| | | // 工序流转卡列表首检 |
| | | await this.LoadingInformation_ProcExchange(HBarCode); |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | (uni.getStorageSync("OrganizationID") == "100199" && |
| | | uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | } |
| | | return; |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取源单信息错误: ${err}` |
| | | }) |
| | | } |
| | | }, |
| | | async GetCheckItemID() { |
| | |
| | | await this.InitHSource(); |
| | | await this.InitHWorkShift(); |
| | | await this.InitHEmp(); |
| | | await this.getErrMsgBackType() |
| | | await this.getErrMsgBackType(); |
| | | await this.loadCache(); |
| | | }, |
| | | }; |
| | | </script> |