| | |
| | | <view class="_label-name">净重:</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.NW }} |
| | | {{ item.KW }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <text class="item-one">批次号:</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <text class="item-one item-two">{{ |
| | | detailedList.BN |
| | | }}</text> |
| | | <text class="item-one item-two">{{ detailedList.BN }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | |
| | | <text class="item-one">品牌:</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <text class="item-one item-two">{{ |
| | | detailedList.BR |
| | | }}</text> |
| | | <text class="item-one item-two">{{ detailedList.BR }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | |
| | | <text class="item-one">净重:</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <text class="item-one item-two">{{ |
| | | detailedList.NW |
| | | }}</text> |
| | | <text class="item-one item-two">{{ detailedList.KW }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | whiteSpace: "nowrap", |
| | | }, |
| | | hasScanSnList: [], |
| | | showModal: false, // 控制弹窗显示隐藏的变量 |
| | | showModal: false, // 控制弹窗显示隐藏的变量 |
| | | detailedList: {}, |
| | | }; |
| | | }, |
| | |
| | | onShow() { |
| | | let that = this; |
| | | uni.$off("scan"); // 每次进来先 移除全局自定义事件监听器 |
| | | uni.$on("scan", function (data) { |
| | | this.detailedList = {}, |
| | | console.log("onscan"); |
| | | uni.$on("scan", function (data) { |
| | | (this.detailedList = {}), console.log("onscan"); |
| | | //扫码成功后的回调,你可以写自己的逻辑代码在这里 |
| | | console.log("页面扫码结果:", data.code); |
| | | if (data.code) { |
| | |
| | | }); |
| | | }, |
| | | methods: { |
| | | // 回显扫码的信息 |
| | | cancel() { |
| | | // 处理取消逻辑 |
| | | this.showModal = false; |
| | | }, |
| | | // 回显扫码的信息 |
| | | saveForm(val) { |
| | | this.detailedList = val; |
| | | this.showModal = true; |
| | | }, |
| | | confirm() { |
| | | // // 处理确认逻辑 |
| | | // this.$u.api.materialRequisition |
| | | // .materialRequisition({ |
| | | // ...this.detailedList, |
| | | // }) |
| | | // .then((res) => { |
| | | // this.hasScanSnList.push(this.detailedList); |
| | | // console.log("记录", this.hasScanSnList); |
| | | // this.$u.toast("领料成功"); |
| | | // }); |
| | | this.detailedList = val; |
| | | this.showModal = true; |
| | | }, |
| | | confirm() { |
| | | // 处理确认逻辑 |
| | | this.$u.api.materialRequisition |
| | | .materialRequisition({ |
| | | ...this.detailedList, |
| | | }) |
| | | .then((res) => { |
| | | this.hasScanSnList.push(this.detailedList); |
| | | console.log("记录", this.hasScanSnList); |
| | | this.$u.toast("领料成功"); |
| | | }) |
| | | .catch((err) => { |
| | | uni.showToast({ |
| | | title: res.msg || "网络错误,领料失败", |
| | | icon: "none", |
| | | }); |
| | | }); |
| | | }, |
| | | }, |
| | | }; |