From 5e9652487fd80b7e456155c45c90247e0b19440c Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期二, 27 五月 2025 10:18:12 +0800 Subject: [PATCH] ·12 --- pages/basics/order.vue | 9 +- pages.json | 2 pages/basics/stockCheck.vue | 74 +++++++++++++----------- pages/index/index.vue | 60 ++++++++++---------- 4 files changed, 75 insertions(+), 70 deletions(-) diff --git a/pages.json b/pages.json index 057e575..4d27ed7 100644 --- a/pages.json +++ b/pages.json @@ -42,7 +42,7 @@ "path" : "pages/basics/stockCheck", "style" : { - "navigationBarTitleText": "骞冲簱搴撲綅鐩樼偣", + "navigationBarTitleText": "搴撲綅鐩樼偣", "enablePullDownRefresh": false } },{ diff --git a/pages/basics/order.vue b/pages/basics/order.vue index 0647679..34c9053 100644 --- a/pages/basics/order.vue +++ b/pages/basics/order.vue @@ -66,7 +66,7 @@ </view> <checkbox-group @change="checkbox"> - <view v-for="(item,index) in matList" :key="index" v-if="item.anfme>0" class="data-list bg-false" :class="'bg-'+item.checked" > + <view v-for="(item,index) in matList" :key="index" class="data-list bg-false" :class="'bg-'+item.checked" > <label class="left-check-box" > <checkbox :value="item.id+''" :checked="true" style="display: block;" /> </label> @@ -75,10 +75,10 @@ <view><text style="width: 700rpx;">鍝佸悕锛歿{item.maktx}}</text></view> <view><text style="width: 700rpx;">鎵瑰彿锛歿{item.batch}}</text></view> <view> - <text style="width: 700rpx;">鎬绘暟閲忥細{{item.count}}</text> + <text style="width: 700rpx;">鎬绘暟閲忥細{{item.enableQty}}</text> </view> <view> - <text style="width: 700rpx;">鍙粍鎵樻渶澶ф暟閲忥細{{item.anfme}}</text> + <text style="width: 700rpx;">缁勬墭鏁伴噺锛歿{item.anfme}}</text> </view> </view> <view class="data-list-right"> @@ -436,8 +436,9 @@ var add = true for (var i = 0; i < len; i++) { if (mat.matnr == this.matList[i].matnr) { - if ( mat.batch){ + if (mat.batch){ if( mat.batch == this.matList[i].batch){ + this.matList[i].times +=1 this.matList[i].anfme += mat.anfme this.$forceUpdate() // 寮哄埗鍒锋柊 add = false diff --git a/pages/basics/stockCheck.vue b/pages/basics/stockCheck.vue index 2fa1509..4c07320 100644 --- a/pages/basics/stockCheck.vue +++ b/pages/basics/stockCheck.vue @@ -1,7 +1,7 @@ <template> <view> <scroll-view scroll-y> - <view class="pak-seach-box"> + <!-- <view class="pak-seach-box"> <view class="box-top"> <view class="color-block-blue"></view> <text class="title">閫夋嫨绔欏彴</text> @@ -12,7 +12,7 @@ <uni-combox @input="getCheckDetl" emptyTips="鏆傛棤鏁版嵁" :candidates="staNoList" v-model="staNo" placeholder="璇烽�夋嫨"></uni-combox> </view> </view> - </view> + </view> --> <view class="square-2"> <view class="square-title"> @@ -21,7 +21,7 @@ </view> <view class="square-content"> <view class="content-input"> - <input v-model="barcode" type="text" placeholder="鎵爜 / 杈撳叆" maxlength="8"placeholder-style="line-height: 85rpx;"> + <input v-model="barcode" @input="getCheckDetl" type="text" placeholder="鎵爜 / 杈撳叆" maxlength="8"placeholder-style="line-height: 85rpx;"> <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode" ></uni-icons> </view> </view> @@ -113,45 +113,45 @@ const PROJ = uni.getStorageSync('UPROJ'); this.baseUrl = PROJ this.getUrl() - this.getOutBound(); + //this.getOutBound(); }, methods: { // 鑾峰彇url getUrl() { this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl }, - getOutBound() { // 鑾峰彇鍑哄簱鍙� - let that = this - uni.request({ - url: that.commonUrl + '/available/take/check/site', - method: 'POST', - header: { - 'token':uni.getStorageSync('token') - }, - success(result) { - var res = result.data - if (res.code === 200) { - that.staNoList = res.data - } 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'}) - } - }, - }); - }, // getOutBound + // getOutBound() { // 鑾峰彇鍑哄簱鍙� + // let that = this + // uni.request({ + // url: that.commonUrl + '/available/take/check/site', + // method: 'POST', + // header: { + // 'token':uni.getStorageSync('token') + // }, + // success(result) { + // var res = result.data + // if (res.code === 200) { + // that.staNoList = res.data + // } 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'}) + // } + // }, + // }); + // }, // getOutBound getCheckDetl() { // 鑾峰彇鍑哄簱鍙h揣鐗╀俊鎭� let that = this uni.request({ - url: that.commonUrl + '/mobile/checkDetl/auth', - method: 'POST', + url: that.commonUrl + '/mobile/checkDetl/auth/v2', + method: 'GET', data: { - staNo:that.staNo + barcode:that.barcode }, header: { 'token':uni.getStorageSync('token') @@ -159,8 +159,10 @@ success(result) { var res = result.data console.log(result) - if (res.code === 200) { + console.log(that.barcode) + if (res.code === 200||res.data) { console.log(res.data) + that.matList =res.data.wrkDetls } else if (res.code == 403) { uni.showToast({title: res.msg, icon: "none", position: 'top'}) setTimeout(() => { @@ -262,11 +264,13 @@ }, adjust() { let that = this + console.log(that.matList) uni.request({ - url: that.commonUrl + '/adjust/auth', + url: that.commonUrl + '/mobile/adjust/auth', method: 'POST', data: { - combParam: that.matList + wrkDetls: that.matList, + barcode: that.barcode }, header: { 'token':uni.getStorageSync('token') diff --git a/pages/index/index.vue b/pages/index/index.vue index 0600c60..3f964d1 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -35,30 +35,30 @@ // color: 'blue', // cuIcon: 'copy' // }, - { - title: '缁勬墭鍏ュ簱', - name: 'pakin', - color: 'blue', - cuIcon: 'copy' - }, - { - title: '榻愬鍏ュ簱', - name: 'kitting', - color: 'blue', - cuIcon: 'searchlist' - }, - { - title: '鍦ㄥ簱鏍囪淇敼', - name: 'locOriginInOut', - color: 'blue', - cuIcon: 'searchlist' - }, - { - title: '搴撳瓨鏌ヨ', - name: 'stockQuery', - color: 'blue', - cuIcon: 'searchlist' - }, + // { + // title: '缁勬墭鍏ュ簱', + // name: 'pakin', + // color: 'blue', + // cuIcon: 'copy' + // }, + // { + // title: '榻愬鍏ュ簱', + // name: 'kitting', + // color: 'blue', + // cuIcon: 'searchlist' + // }, + // { + // title: '鍦ㄥ簱鏍囪淇敼', + // name: 'locOriginInOut', + // color: 'blue', + // cuIcon: 'searchlist' + // }, + // { + // title: '搴撳瓨鏌ヨ', + // name: 'stockQuery', + // color: 'blue', + // cuIcon: 'searchlist' + // }, { title: '璁㈠崟缁勬墭', name: 'order', @@ -84,12 +84,12 @@ // color: 'blue', // cuIcon: 'video' // }, - // { - // title: '搴撳瓨鐩樼偣', - // name: 'stoCheck', - // color: 'blue', - // cuIcon: 'safe' - // }, + { + title: '搴撳瓨鐩樼偣', + name: 'stockCheck', + color: 'blue', + cuIcon: 'safe' + }, // { // title: '骞充粨搴撳瓨鐩樼偣', // name: 'manStoCheck', -- Gitblit v1.9.1