From fe8fb74ce94e7bee23ed47b7175236248ac93b98 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期二, 19 十一月 2024 16:24:04 +0800 Subject: [PATCH] Merge branch 'nbncPda' of http://47.97.1.152:5880/r/wms_app into nbncPda --- pages/pakin/WarehouseIn.vue | 71 +++++++++++++++++++---------------- 1 files changed, 38 insertions(+), 33 deletions(-) diff --git a/pages/pakin/WarehouseIn.vue b/pages/pakin/WarehouseIn.vue index 5f4c2c6..3ac0933 100644 --- a/pages/pakin/WarehouseIn.vue +++ b/pages/pakin/WarehouseIn.vue @@ -1,5 +1,19 @@ <template> <view> + <view class="status_bar"> + <!-- 杩欓噷鏄姸鎬佹爮 --> + </view> + <uni-nav-bar left-icon="left" background-color="#f8f8f8" title="缁勬墭涓婃灦" @clickLeft="back" :fixed="true" + :border="false" rightWidth="160rpx" leftWidth="160rpx" + > + <block slot="right"> + <view class="city"> + <view> + <text class="uni-nav-bar-text">{{store}}</text> + </view> + </view> + </block> + </uni-nav-bar> <view class="code"> <view class="item"> <view class="code-decs">鎵樼洏鐮�:</view> @@ -134,6 +148,8 @@ return { baseUrl: '', token: '', + storeId: 0, + store: '', barcode: '', dataList: [], count: 0, @@ -159,8 +175,16 @@ onShow() { this.baseUrl = uni.getStorageSync('baseUrl'); this.token = uni.getStorageSync('token'); + this.storeId = uni.getStorageSync('store') + if (this.storeId == 1) { + this.store = '瀹佹尝浠�' + } + if (this.storeId == 2) { + this.store = '鏂版槍浠�' + } }, methods: { + back() { uni.navigateBack({}) }, messageToggle(type) { this.msgType1 = type this.$refs.message.open() @@ -182,27 +206,19 @@ } uni.request({ url: that.baseUrl + '/waitPakin/forBarcode/auth', - data: { - barcode: that.barcode - }, - header: { - 'token': uni.getStorageSync('token') - }, + data: { barcode: that.barcode }, + header: { 'token': uni.getStorageSync('token') }, success(result) { var res = result.data if (res.code === 200) { that.dataList = res.data; } else if (res.code == 403) { - that.messageText = res.msg - that.messageToggle('error') + uni.showToast({ title: res.msg, icon: "error", position: 'center' }) setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); + uni.reLaunch({ url: '../login/login' }); }, 1000); } else { - that.messageText = res.msg - that.messageToggle('error') + uni.showToast({ title: res.msg, icon: "error", position: 'center' }) } } }); @@ -358,8 +374,7 @@ }, // 纭绉婚櫎 removeConfirm() { - this.messageText = "绉婚櫎鎴愬姛" - this.messageToggle('success') + uni.showToast({ title: "绉婚櫎鎴愬姛", icon: "success", position: 'center' }) this.dataList.splice(this.removeNum, 1) }, // 鍙栨秷绉婚櫎 @@ -371,8 +386,7 @@ this.dataList[this.rowNum].batch = this.batch this.dataList[this.rowNum].weight = this.weight this.matnr = '' - this.messageText = "淇敼鎴愬姛" - this.messageToggle('success') + uni.showToast({ title: "淇敼鎴愬姛", icon: "success", position: 'center' }) this.$refs.revise.close() }, reviseClose() { @@ -395,8 +409,7 @@ let that = this; if (that.dataList.length === 0) { - this.messageText = "鎵樼洏鐮佺粍鎵樻暟鎹湁璇�" - this.messageToggle('error') + uni.showToast({ title: "鎵樼洏鐮佺粍鎵樻暟鎹湁璇�", icon: "error", position: 'center' }) return; } uni.request({ @@ -405,26 +418,19 @@ barcode: that.barcode, locNo: that.locNo }, - header: { - 'token': uni.getStorageSync('token') - }, + header: { 'token': uni.getStorageSync('token') }, success(result) { var res = result.data if (res.code === 200) { that.resst(); - that.messageText = "涓婃灦鎴愬姛" - that.messageToggle('success') + uni.showToast({ title: "涓婃灦鎴愬姛", icon: "success", position: 'center' }) } else if (res.code == 403) { - that.messageText = res.msg - that.messageToggle('error') + uni.showToast({ title: res.msg, icon: "error", position: 'center' }) setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); + uni.reLaunch({ url: '../login/login' }); }, 1000); } else { - that.messageText = res.msg - that.messageToggle('error') + uni.showToast({ title: res.msg, icon: "error", position: 'center' }) } } }); @@ -438,8 +444,7 @@ // 纭閲嶇疆 resetConfirm() { this.dataList = [] - this.messageText = "閲嶇疆瀹屾垚" - this.messageToggle('success') + uni.showToast({ title: "閲嶇疆瀹屾垚", icon: "success", position: 'center' }) }, // 鍙栨秷閲嶇疆 resetClose() { -- Gitblit v1.9.1