From 471057bc4ece00870751e7b1187f244e8cc4137d Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期二, 18 四月 2023 13:58:49 +0800 Subject: [PATCH] # --- pages/login/login.vue | 4 manifest.json | 2 pages.json | 9 ++ pages/basics/pakinStart.vue | 146 ++++++++++++++++++++++++++++++++++++ pages/index/index.vue | 54 +++++++------ 5 files changed, 188 insertions(+), 27 deletions(-) diff --git a/manifest.json b/manifest.json index ec24ad2..6683caa 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name" : "涓壃WMS", "appid" : "__UNI__DA5854D", "description" : "", - "versionName" : "2023020501", + "versionName" : "2023041801", "versionCode" : 104, "transformPx" : false, /* 5+App鐗规湁鐩稿叧 */ diff --git a/pages.json b/pages.json index 885d263..dd39cc5 100644 --- a/pages.json +++ b/pages.json @@ -211,6 +211,15 @@ "enablePullDownRefresh": false } + }, + { + "path" : "pages/basics/pakinStart", + "style" : + { + "navigationBarTitleText": "鍚姩鍏ュ簱", + "enablePullDownRefresh": false + + } } diff --git a/pages/basics/pakinStart.vue b/pages/basics/pakinStart.vue new file mode 100644 index 0000000..827e1c3 --- /dev/null +++ b/pages/basics/pakinStart.vue @@ -0,0 +1,146 @@ +<template> + <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="barcode" type="text" placeholder="鎵爜 / 杈撳叆" + :focus="barcodeFocus" @confirm="barcodeInput()" placeholder-style="line-height: 85rpx;"> + <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="content-combox" @click="staNoSelect()"> + <uni-combox emptyTips="鏆傛棤鏁版嵁" + :candidates="sites" v-model="siteId" placeholder="璇烽�夋嫨鍏ュ簱绔欑偣" @input="check"> + </uni-combox> + </view> + </view> + <!-- 搴曢儴鎸夐挳 --> + <view class="footer flex justify-around"> + <!-- 搴曢儴鍏ㄩ�� 鍙嶉�夋寜閽� --> + <!-- <label class="label-btn" style="width: 170rpx;"> + <checkbox :checked="check" @click="allChecked()">{{checkText}}</checkbox> + </label> + <label class="label-btn" style="width: 100rpx;"> + <text @click="reChecked()">鍙嶉��</text> + </label> --> + + <label class="label-btn" style="width: 150rpx;"> + <button class="cu-btn" @click="resst()">閲嶇疆</button> + </label> + <label class="label-btn"> + <button class="cu-btn bg-blue " @click="outbound()">鍚姩鍏ュ簱</button> + </label> + </view> + </view> + +</template> + + +<script> + import permision from "@/common/permission.js" + import loginVue from "../login/login.vue"; + export default { + data() { + return { + commonUrl:null, + barcode: '', + barcodeFocus: true, + sites: ["102鍏ュ簱"], + siteId: "102鍏ュ簱", + staNo: 102 + } + }, + onShow() { + setTimeout(()=>{ + // this.focuss() + }, 100); + + }, + 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() + }, + methods: { + // 鑾峰彇url + getUrl() { + this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl + }, + removeBarcode() { + this.barcode = '' + uni.vibrateShort(); + this.barcodeFocus = false; + this.$nextTick(function() { + this.barcodeFocus = true; + }); + }, + // 閲嶇疆 + resst() { + this.barcode = '' + this.siteId = '' + }, + staNoSelect() { + // this.siteId = '' + }, + outbound() { + let that = this + if (that.barcode == '') { + uni.showToast({title: "璇锋壂鎻忔墭鐩樼爜", icon: "none",position: 'top'}) + return; + } + uni.request({ + url: that.commonUrl + "/mobile/pakin/request", + header: { + 'token':uni.getStorageSync('token'), + 'content-type': 'application/x-www-form-urlencoded' + }, + data: { + barcode: that.barcode, + staNo: that.staNo + }, + method: "POST", + success(res) { + res = res.data + if (res.code === 200) { + that.barcode = '' + uni.showToast({title: res.msg, icon: "none",position: 'top'}) + } else { + uni.showToast({title: res.msg, icon: "none",position: 'top'}) + } + } + }) + }, + check() { + switch(this.siteId) { + case "102鍏ュ簱": + this.staNo = 102 + break; + case "103鍏ュ簱": + this.staNo = 103 + break; + default: + this.staNo = 0 + + } + } + } + } +</script> + +<style> +</style> \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue index efa58c8..9bfad46 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -23,6 +23,12 @@ data() { return { elements:[ + { + title: '鍚姩鍏ュ簱', + name: 'pakinStart', + color: 'blue', + cuIcon: 'video' + }, // { // title: '涓婃灦绠$悊', // name: 'putOnSale', @@ -35,24 +41,24 @@ // color: 'blue', // cuIcon: 'copy' // }, - { - title: '缁勬墭鍏ュ簱', - name: 'pakin', - color: 'blue', - cuIcon: 'copy' - }, + // { + // title: '缁勬墭鍏ュ簱', + // name: 'pakin', + // color: 'blue', + // cuIcon: 'copy' + // }, // { // title: '璁㈠崟缁勬墭', // name: 'order', // color: 'blue', // cuIcon: 'goods' // }, - { - title: '搴撳瓨鏌ヨ', - name: 'stockQuery', - color: 'blue', - cuIcon: 'searchlist' - }, + // { + // title: '搴撳瓨鏌ヨ', + // name: 'stockQuery', + // color: 'blue', + // cuIcon: 'searchlist' + // }, // { // title: '鍗曟嵁鍑哄簱', @@ -72,18 +78,18 @@ // color: 'blue', // cuIcon: 'video' // }, - { - title: '搴撳瓨鐩樼偣', - name: 'stockCheck', - color: 'blue', - cuIcon: 'safe' - }, - { - title: '鎷f枡鍑哄簱', - name: 'piking', - color: 'blue', - cuIcon: 'safe' - }, + // { + // title: '搴撳瓨鐩樼偣', + // name: 'stockCheck', + // color: 'blue', + // cuIcon: 'safe' + // }, + // { + // title: '鎷f枡鍑哄簱', + // name: 'piking', + // color: 'blue', + // cuIcon: 'safe' + // }, // { // title: '骞充粨搴撳瓨鐩樼偣', // name: 'manStoCheck', diff --git a/pages/login/login.vue b/pages/login/login.vue index 7145c5a..e86f238 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -289,7 +289,7 @@ 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: { @@ -315,7 +315,7 @@ setTimeout(() => { // uni.navigateBack(); // 灏忕▼搴忕敤杩欎釜 鎶婇椤佃矾鐢辨斁绗竴涓� uni.reLaunch({ - url: '../index/index2' + url: '../index/index' }); }, 1000); } else { -- Gitblit v1.9.1