From e8d7d04eb0b05157a9da9bf6fb2aa88ef06edeed Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期六, 06 七月 2024 17:08:42 +0800
Subject: [PATCH] #
---
pages/basics/changePallet.vue | 268 +++++++++++++++++++++++++++++++++++++++++++++++++++++
pages/login/login.vue | 2
pages.json | 7 +
pages/index/index.vue | 6 +
4 files changed, 282 insertions(+), 1 deletions(-)
diff --git a/pages.json b/pages.json
index 3bdeaf5..b07ee06 100644
--- a/pages.json
+++ b/pages.json
@@ -177,6 +177,13 @@
"enablePullDownRefresh": false
}
+ },
+ {
+ "path" : "pages/basics/changePallet",
+ "style" :
+ {
+ "navigationBarTitleText" : "鎹㈡澘缁戝畾"
+ }
}
diff --git a/pages/basics/changePallet.vue b/pages/basics/changePallet.vue
new file mode 100644
index 0000000..6e042c7
--- /dev/null
+++ b/pages/basics/changePallet.vue
@@ -0,0 +1,268 @@
+<template>
+ <view >
+ <scroll-view scroll-y catch:touchmove="touchmove">
+ <view class="square-2">
+ <view class="square-title">
+ <view class="title-sign"><view class="sign"></view></view>
+ <view class="title-text"><text>鍘熸墭鐩樼爜</text></view>
+ </view>
+ <view class="square-content">
+ <view class="content-input">
+ <input readonly="value" v-model="barcode" type="text" placeholder="鎵爜 / 杈撳叆" maxlength="8"
+ :focus="barcodeFocus" @input="nextInput">
+ <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons>
+ </view>
+ </view>
+ </view>
+ <view class="square-2">
+ <view class="square-title">
+ <view class="title-sign"><view class="sign"></view></view>
+ <view class="title-text"><text>杞崲鎵樼洏鐮�</text></view>
+ </view>
+ <view class="square-content">
+ <view class="content-input">
+ <input v-model="tBarcode" @input="checkBarcode" type="text" placeholder="鎵爜 / 杈撳叆" :focus="focus">
+ <uni-icons type="closeempty" size="20" color="#dadada" @click="foucss()"></uni-icons>
+ </view>
+ </view>
+ </view>
+ <view class="square-1">
+ <view class="square-title">
+ <view class="title-sign"><view class="sign"></view></view>
+ <view class="title-text"><text>鍟嗗搧鍒楄〃</text></view>
+ </view>
+ </view>
+ <view class="square-none" v-show="matList.length === 0">
+ <view class="v-show">鏆傛棤鏇村鏁版嵁...</view>
+ </view>
+ <!-- <checkbox-group >
+ <view v-for="(item,index) in matList" :key="index" class="data-list bg-false" :class="'bg-'+item.checked" >
+ <view class="data-list-left">
+ <view class="matnr">No:{{listLen-index}} <text style="margin-left: 4em;font-size: 10px;"></text></view>
+ <view class="matnr">鐗╂枡鍙凤細{{item.matNo}}</view>
+ <view class="matnr">鐗╂枡鍚嶏細{{item.matName}}</view>
+ <view class="matnr">鎵瑰彿锛歿{item.specs}}</view>
+ <view class="matnr">鎷h揣閲忥細{{item.qty}}</view>
+ </view>
+ </view>
+ </checkbox-group> -->
+ <view class="new-data-list" v-for="(item,index) in matList" :key="index">
+ <view>
+ <view class="matnr">No:{{listLen-index}} <text style="margin-left: 4em;font-size: 10px;"></text></view>
+ <view class="matnr">鐗╂枡鍙凤細{{item.matNo}}</view>
+ <view class="matnr">鐗╂枡鍚嶏細{{item.matName}}</view>
+ <view class="matnr">鎵瑰彿锛歿{item.specs}}</view>
+ <view class="matnr">鎷h揣閲忥細{{item.qty}}</view>
+ </view>
+ </view>
+ <view class="footer flex justify-around">
+ <view>
+ <button class="cu-btn lg" @click="resst()">閲嶇疆</button>
+ </view>
+ <view>
+ <button class="cu-btn lg pakin-btn bg-blue" @click="changePallet()">鎹㈡澘</button>
+ </view>
+ </view>
+ </scroll-view>
+ <view>
+ <!-- 鎻愮ず淇℃伅寮圭獥 -->
+ <uni-popup ref="message" type="message">
+ <uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
+ </uni-popup>
+ </view>
+ </view>
+</template>
+
+<script>
+ import permision from "@/common/permission.js"
+ export default {
+ data() {
+ return {
+ commonUrl:null,
+ barcode: '',
+ tBarcode: '',
+ matList:[],
+ barcodeFocus:true,
+ focus:false,
+ hide:true,
+ listLen:0,
+ msgType: 'success',
+ messageText: '杩欐槸涓�鏉℃垚鍔熸彁绀�',
+
+ }
+ },
+ mounted(){
+ const UIP = uni.getStorageSync('UIP');
+ this.baseIP = UIP;
+ const UPORT = uni.getStorageSync('UPORT');
+ this.basePORT = UPORT
+ const PROJ = uni.getStorageSync('UPROJ');
+ this.baseUrl = PROJ
+ this.getUrl()
+ },
+ onLoad() {
+ // #ifdef APP
+ setInterval(()=>{
+ if (this.hide) {
+ uni.hideKeyboard()
+ } else {
+
+ }
+ },20)
+ // #endif
+ },
+ methods: {
+ // 鑾峰彇url
+ getUrl() {
+ this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl
+ },
+ nextInput() {
+ let that = this
+ if (that.barcode.length == 8) {
+ uni.request({
+ url: that.commonUrl + '/mobile/piking/auth',
+ header: {
+ 'token':uni.getStorageSync('token')
+ },
+ data: {barcode:that.barcode},
+ success(res) {
+ res = res.data
+ if(res.code===200) {
+ that.matList = res.data
+ that.listLen = that.matList.length;
+ that.foucss()
+ } else if (res.code == 403) {
+ uni.showToast({title: res.msg, icon: "none", position: 'top'})
+ setTimeout(() => {
+ uni.reLaunch({
+ url: '../login/login'
+ });
+ }, 1000);
+ } else {
+ uni.showToast({title: res.msg, icon: "none",position: 'top'})
+ }
+ }
+ })
+
+ }
+ },
+ foucss() {
+ // #ifdef APP
+ let that = this;
+ that.focus = false;
+ setTimeout(()=>{
+ that.focus = true;
+ that.tBarcode = ''
+ }, 100);
+ // #endif
+ },
+ removeBarcode() {
+ this.barcode = ''
+ this.barcodeFocus = false;
+ this.$nextTick(function() {
+ this.barcodeFocus = true;
+ });
+ },
+ changePallet() {
+ let that = this
+ uni.request({
+ url: that.commonUrl + '/mobile/piking/to/full',
+ header: {
+ 'token':uni.getStorageSync('token')
+ },
+ data: {sBarcode:that.barcode,tBarcode:that.tBarcode},
+ success(res) {
+ console.log(res.data);
+ res = res.data
+ if (res.code === 200) {
+ that.barcode = ''
+ that.matList = []
+ that.tBarcode = ''
+ uni.showToast({title: res.msg, icon: "none", position: 'top'})
+ } else if (res.code == 403) {
+ uni.showToast({title: res.msg, icon: "none", position: 'top'})
+ setTimeout(() => {
+ uni.reLaunch({
+ url: '../login/login'
+ });
+ }, 1000);
+ } else {
+ uni.showToast({title: res.msg, icon: "none",position: 'top'})
+ }
+ }
+ })
+ },
+ checkBarcode() {
+ if (this.tBarcode.length != 8) {
+ uni.showToast({title: '鎵樼洏鐮侀暱搴﹀紓甯�,璇烽噸鏂版壂鎻�', icon: "none", position: 'top'})
+ this.foucss()
+ }
+ }
+ }
+ }
+</script>
+
+
+
+<style>
+ .new-data-list {
+ background-color: #FFFFFF;
+ color: #676767;
+ border-bottom: 1px solid #d8d8d8;
+ margin: 15rpx;
+ border-radius: 20rpx;
+ padding: 20rpx 30rpx;
+ }
+ .pakin-btn {
+ background-color: #1E9FFF;
+ }
+ .bg-false {
+ background-color: #FFFFFF;
+ }
+ .bg-true {
+ background-color: #ebebeb;
+ }
+ .data-list {
+ border-bottom: 1px solid #d8d8d8;
+ min-height: 130rpx;
+ margin: 15rpx;
+ border-radius: 20rpx;
+ }
+ .data-list:first-child {
+ margin-top: 20rpx;
+ }
+ .data-list:last-child {
+ margin-bottom: 200rpx;
+ }
+ /* .data-list-left {
+ display: inline-block;
+ float: left;
+ text-align: center;
+ width: 100rpx;
+ height: 180rpx;
+ line-height: 180rpx;
+ } */
+ .data-list-left {
+ /* display: inline-block; */
+ padding: 15rpx;
+ float: left;
+ margin-left: 6%;
+ min-height: 130rpx;
+ /* line-height: 100rpx; */
+ color: #676767;
+ }
+ .matnr {
+ font-size: 14px;
+ font-weight: 700;
+ /* padding-top: 15rpx; */
+ /* padding-top: 15rpx; */
+ }
+ .data-list-right {
+ display: inline-block;
+ float: right;
+ height: 130rpx;
+ line-height: 130rpx;
+ margin-right: 2%;
+ width: 20%;
+ }
+</style>
\ No newline at end of file
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 20e7802..2905e0d 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -90,6 +90,12 @@
color: 'blue',
cuIcon: 'safe'
},
+ {
+ title: '鎹㈡澘缁戝畾',
+ name: 'changePallet',
+ color: 'blue',
+ cuIcon: 'refresh'
+ },
// {
// title: '骞充粨搴撳瓨鐩樼偣',
// name: 'manStoCheck',
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 36d0a68..0ee6aa7 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -270,7 +270,7 @@
uni.request({
url: this.baseHttp + this.baseIP + ':' +this.basePORT +"/" +this.baseUrl + '/login.action',
data: {
- username:this.userName,
+ mobile:this.userName,
password:md5.hex_md5(this.password)
},
header: {
--
Gitblit v1.9.1