| | |
| | | <template> |
| | | <view class="page"> |
| | | <view class="movewarehouse-index-bg" /> |
| | | <u-navbar title="移库" :background="background" :border-bottom="false" :title-bold="true" title-color="#000" |
| | | back-icon-color="#000" /> |
| | | <u-navbar |
| | | title="移库" |
| | | :background="background" |
| | | :border-bottom="false" |
| | | :title-bold="true" |
| | | title-color="#000" |
| | | back-icon-color="#000" |
| | | /> |
| | | <view class="packing-registration-param"> |
| | | <view class="packing-registration-param-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">{{registerInfo.storageLocation}}</text> |
| | | <text class="item-one item-two">{{ registerInfo.storageLocation == '' ? "请扫描库位" : registerInfo.storageLocation }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">{{`移库记录(${registerInfo.num}条):`}}</text> |
| | | <text class="item-one">{{ |
| | | `移库记录(${registerInfo.num}条):` |
| | | }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="wrap"> |
| | | <scroll-view class="packing-registration-scroll-list" scroll-y="true"> |
| | | <u-cell-group class="packing-registration-scroll-list-group" :border="false"> |
| | | <u-cell-group |
| | | class="packing-registration-scroll-list-group" |
| | | :border="false" |
| | | > |
| | | <!-- <div class="tip" style="text-align: center;" v-if="hasScanSnList.length==0">-请扫码-</div> --> |
| | | <view class="content" v-for="(item, index) in hasScanSnList" :key="index" :index="index"> |
| | | <view |
| | | class="content" |
| | | v-for="(item, index) in hasScanSnList" |
| | | :key="index" |
| | | :index="index" |
| | | > |
| | | <view class="content-header"> |
| | | <view class="content-header-title">{{ index+1 }}</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"> |
| | | <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> |
| | | </view> |
| | | </u-modal> |
| | | <scan></scan> |
| | | </view> |
| | | </template> |
| | | <script> |
| | |
| | | backgroundRepeat: "no-repeat", |
| | | }, |
| | | registerInfo: { |
| | | storageLocation: "LG001", |
| | | storageLocation: "", |
| | | num: 0, |
| | | }, |
| | | showModal: true, // 控制弹窗显示隐藏的变量 |
| | | hasScanSnList: [ |
| | | { |
| | | value0: '11111111111111111111111', |
| | | value1: '111', |
| | | value2: '111', |
| | | value3: '111', |
| | | value0: "11111111111111111111111", |
| | | value1: "111", |
| | | value2: "111", |
| | | value3: "111", |
| | | }, |
| | | { |
| | | value0: '111', |
| | | value1: '111', |
| | | value2: '111', |
| | | value3: '111', |
| | | value0: "111", |
| | | value1: "111", |
| | | value2: "111", |
| | | value3: "111", |
| | | }, |
| | | { |
| | | value0: '111', |
| | | value1: '111', |
| | | value2: '111', |
| | | value3: '111', |
| | | value0: "111", |
| | | value1: "111", |
| | | value2: "111", |
| | | value3: "111", |
| | | }, |
| | | { |
| | | value0: '111', |
| | | value1: '111', |
| | | value2: '111', |
| | | value3: '111', |
| | | value0: "111", |
| | | value1: "111", |
| | | value2: "111", |
| | | value3: "111", |
| | | }, |
| | | { |
| | | value0: '111', |
| | | value1: '111', |
| | | value2: '111', |
| | | value3: '111', |
| | | value0: "111", |
| | | value1: "111", |
| | | value2: "111", |
| | | value3: "111", |
| | | }, |
| | | ], |
| | | }; |
| | |
| | | onLoad() {}, |
| | | onShow() { |
| | | let that = this; |
| | | |
| | | uni.$off("scan"); // 每次进来先 移除全局自定义事件监听器 |
| | | uni.$on("scan", function(data) { |
| | | console.log("onscan"); |
| | | //扫码成功后的回调,你可以写自己的逻辑代码在这里 |
| | | console.log("扫码结果:", data.code); |
| | | }); |
| | | }, |
| | | onNavigationBarButtonTap(e) { |
| | | uni.scanCode({ |
| | | success: (res) => { |
| | | try { |
| | | const result = JSON.parse(res.result); |
| | | } catch (e) {} |
| | | }, |
| | | console.log("页面扫码结果:", data.code); |
| | | if (data.code) { |
| | | let codeInfo = JSON.parse(data.code); |
| | | if (codeInfo.WorkNo) { |
| | | // 扫描报工单二维码 |
| | | that.saveForm(codeInfo); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | methods: { |
| | |
| | | cancel() { |
| | | this.show = false; // 关闭弹窗 |
| | | }, |
| | | // 回显扫码的信息-报工单 |
| | | saveForm(val) { |
| | | let { WorkNo, ProcessName, ORDER_NO } = val |
| | | this.form.value1 = WorkNo |
| | | this.form.value2 = ProcessName |
| | | this.form.value3 = ORDER_NO |
| | | } |
| | | }, |
| | | }; |
| | | </script> |