| | |
| | | <view class="page"> |
| | | <view class="packing-registration-bg" /> |
| | | <u-navbar |
| | | title="订单下发" |
| | | title="物料下发" |
| | | :background="background" |
| | | :border-bottom="false" |
| | | :title-bold="true" |
| | |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <text class="item-one item-two" @click="seachPersonnelNo()">{{ |
| | | registerInfo.moNo == "" ? "点击选择" : registerInfo.moNo |
| | | registerInfo.ifsOrderNo == "" ? "点击选择" : registerInfo.ifsOrderNo |
| | | }}</text> |
| | | <u-icon |
| | | name="arrow-right" |
| | | color="#687792" |
| | | size="28" |
| | | @click="seachPersonnelNo()" |
| | | v-show="registerInfo.moNo == ''" |
| | | v-show="registerInfo.ifsOrderNo == ''" |
| | | ></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <!-- <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">工单</text> |
| | | </view> |
| | |
| | | v-show="registerInfo.optaskNo == ''" |
| | | ></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | </view> --> |
| | | <!-- <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">机台</text> |
| | | </view> |
| | |
| | | size="28" |
| | | ></u-icon> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">子件</text> |
| | | <text class="item-one">物料结构</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <text class="item-one item-two" @click="seachComp()">{{ |
| | |
| | | registerInfo: { |
| | | operationTaskId: "", |
| | | id: "", |
| | | moNo: "", |
| | | ifsOrderNo: "", |
| | | partNo: "", |
| | | partName: "", |
| | | optaskNo: "", |
| | |
| | | }); |
| | | return; |
| | | } |
| | | if (that.registerInfo.workstationId == "") { |
| | | uni.showToast({ |
| | | icon: "none", |
| | | title: "请先选择机台!", |
| | | duration: 2 * 1000, |
| | | }); |
| | | return; |
| | | } |
| | | // if (that.registerInfo.workstationId == "") { |
| | | // uni.showToast({ |
| | | // icon: "none", |
| | | // title: "请先选择机台!", |
| | | // duration: 2 * 1000, |
| | | // }); |
| | | // return; |
| | | // } |
| | | if (data.code) { |
| | | //扫码成功后的回调,你可以写自己的逻辑代码在这里 |
| | | console.log("扫码结果:", data.code); |
| | | let codeInfo = JSON.parse(data.code); |
| | | that.codeInfoId = codeInfo.id; |
| | | if (codeInfo.partNo) { |
| | | if (that.registerInfo.partNo != codeInfo.partNo) { |
| | | if (codeInfo.PN) { |
| | | if (that.registerInfo.partNo != codeInfo.PN) { |
| | | this.$u.toast("当前子件和扫码子件不一致!"); |
| | | return; |
| | | } |
| | |
| | | return; |
| | | } |
| | | // 处理确认逻辑 |
| | | this.$u.api.WorkshopOrderIssued.feeding({ |
| | | this.$u.api.WorkshopOrderIssued.feedingPDA({ |
| | | feedingFrom: "stocker", |
| | | operationTaskId: this.registerInfo.operationTaskId, |
| | | moId: this.registerInfo.id, |
| | | feeds: [ |
| | | { |
| | | ...this.modalList, |
| | |
| | | (this.registerInfo = { |
| | | operationTaskId: "", |
| | | id: val.id, |
| | | moNo: val.moNo, |
| | | ifsOrderNo: val.ifsOrderNo, |
| | | partNo: "", |
| | | partName: "", |
| | | optaskNo: "", |
| | |
| | | }, |
| | | //子件 |
| | | seachComp() { |
| | | if (this.registerInfo.optaskNo == "") { |
| | | this.$u.toast("请选择工单号"); |
| | | // if (this.registerInfo.optaskNo == "") { |
| | | // this.$u.toast("请选择工单号"); |
| | | // return; |
| | | // } |
| | | if (this.registerInfo.ifsOrderNo == "") { |
| | | this.$u.toast("请选择订单号"); |
| | | return; |
| | | } |
| | | console.log("子件"); |
| | |
| | | uni.navigateTo({ |
| | | url: |
| | | "/pages/product/WorkshopOrderIssued/comp?operationTaskId=" + |
| | | encodeURIComponent(JSON.stringify(this.registerInfo.operationTaskId)), |
| | | encodeURIComponent(JSON.stringify(this.registerInfo.id)), |
| | | }); |
| | | }, |
| | | //工单 |
| | | seachWork() { |
| | | if (this.registerInfo.moNo == "") { |
| | | if (this.registerInfo.ifsOrderNo == "") { |
| | | this.$u.toast("请选择订单号"); |
| | | return; |
| | | } |
| | |
| | | }, |
| | | // 扫码后数据回显 |
| | | scanHandle(val) { |
| | | const { outBatchNo } = val; |
| | | const { BN } = val; |
| | | const { workstationId, operationTaskId } = this.registerInfo; |
| | | const obj = { |
| | | outBatchNo: outBatchNo, |
| | | workstationId: workstationId, |
| | | operationTaskId: operationTaskId, |
| | | outBatchNo: BN, |
| | | // workstationId: workstationId, |
| | | // operationTaskId: operationTaskId, |
| | | }; |
| | | this.$u.api.WorkshopOrderIssued.checkRawPartPDA(obj).then((res) => { |
| | | console.log("res", res); |