| | |
| | | <view class="content-body"> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-1"> </view> |
| | | <view class="_label-name">订单号:</view> |
| | | <view class="_label-name">批号:</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.moNo }} |
| | |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-2"> </view> |
| | | <view class="_label-name">零件号:</view> |
| | | </view> |
| | | <view class="_content"> |
| | |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-3"> </view> |
| | | <view class="_label-name">零件描述:</view> |
| | | </view> |
| | | <view class="_content"> |
| | |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-1"> </view> |
| | | <view class="_label-name">批量大小:</view> |
| | | <view class="_label-name">取消接收数量:</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.qtyRequired }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-2"> </view> |
| | | <view class="_label-name">开始日期:</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.startDate }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-3"> </view> |
| | | <view class="_label-name">结束日期:</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.endDate }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </u-cell-group> |
| | | </scroll-view> |
| | | </view> |
| | | <u-modal |
| | | v-model="showModal" |
| | | title="" |
| | | :show-cancel-button="true" |
| | | :show-confirm-button="true" |
| | | @confirm="confirm" |
| | | @cancel="cancel" |
| | | > |
| | | <view class="popup-content"> |
| | | <view class="packing-registration-param"> |
| | | <view class="packing-registration-param-view"> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">批号</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <text class="item-one item-two">{{ detailedList.value1 }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">零件号</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <text class="item-one item-two">{{ detailedList.value2 }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">零件描述</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <text class="item-one item-two">{{ detailedList.value3 }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">取消接收数量</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <u-input |
| | | class="item-one item-two" |
| | | v-model="detailedList.value4" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-modal> |
| | | <scan></scan> |
| | | </view> |
| | | </template> |
| | |
| | | form: { |
| | | moNo: "", |
| | | }, |
| | | detailedList: { |
| | | value1: "", |
| | | value2: "", |
| | | value3: "", |
| | | value4: "", |
| | | }, |
| | | list: [ |
| | | { |
| | | moNo: 1, |
| | |
| | | }, |
| | | ], |
| | | rules: {}, |
| | | showModal: false, |
| | | }; |
| | | }, |
| | | onReady() { |
| | | }, |
| | | onReady() {}, |
| | | onShow() { |
| | | let that = this; |
| | | uni.$off("scan"); // 每次进来先 移除全局自定义事件监听器 |
| | | if ((form.moNO = null)) { |
| | | uni.showToast({ |
| | | icon: "none", |
| | | title: "请先选择订单号!", |
| | | duration: 2 * 1000, |
| | | }); |
| | | return; |
| | | } |
| | | if ((form.moNO = null)) { |
| | | uni.showToast({ |
| | | icon: "none", |
| | | title: "扫描的二维码与该订单不一致", |
| | | duration: 2 * 1000, |
| | | }); |
| | | return; |
| | | } |
| | | uni.$on("scan", function (data) { |
| | | console.log("onscan"); |
| | | //扫码成功后的回调,你可以写自己的逻辑代码在这里 |
| | | console.log("页面扫码结果:", data.code); |
| | | if ((list.moNO = null)) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '请先选择订单号!', |
| | | duration: 2 * 1000 |
| | | }) |
| | | return |
| | | } |
| | | if ((list.moNO = null)) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '扫描的二维码与该订单不一致', |
| | | duration: 2 * 1000 |
| | | }) |
| | | return |
| | | } |
| | | if (data.code) { |
| | | let codeInfo = JSON.parse(data.code); |
| | | if (codeInfo.WorkNo) { |
| | | // 扫描报工单二维码 |
| | | that.saveForm(codeInfo); |
| | | (this.detailedList = {}), |
| | | // 扫描报工单二维码 |
| | | that.saveForm(codeInfo); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | methods: { |
| | | // 点击确认后获取取消报工记录 |
| | | confirm() { |
| | | // 处理确认逻辑 |
| | | this.showModal = false; |
| | | this.$u.api.workReporting._({}).then((res) => { |
| | | console.log("res", res); |
| | | this.list = res.data.records; |
| | | }); |
| | | }, |
| | | cancel() { |
| | | this.showModal = false; // 关闭弹窗 |
| | | }, |
| | | openList() { |
| | | uni.navigateTo({ |
| | | url: "/pages/product/report/orderList", |
| | |
| | | // 回显扫码的信息-报工单 |
| | | saveForm(val) { |
| | | let { WorkNo, ProcessName, ORDER_NO } = val; |
| | | this.form.value1 = WorkNo; |
| | | this.form.value2 = ProcessName; |
| | | this.form.value3 = ORDER_NO; |
| | | this.detailedList.value1 = WorkNo; |
| | | this.detailedList.value2 = ProcessName; |
| | | this.detailedList.value3 = ORDER_NO; |
| | | this.showModal = true; |
| | | }, |
| | | }, |
| | | }; |