From 72a7d5095ba74ca15e0c96d1c8b925664b5fc562 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期一, 13 十月 2025 08:32:56 +0800
Subject: [PATCH] 12
---
pages/pakin/outConfilm.vue | 214 +++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 198 insertions(+), 16 deletions(-)
diff --git a/pages/pakin/outConfilm.vue b/pages/pakin/outConfilm.vue
index b3cefc8..2b14f1c 100644
--- a/pages/pakin/outConfilm.vue
+++ b/pages/pakin/outConfilm.vue
@@ -5,12 +5,41 @@
<view class="code-decs">鎵樼洏鐮�:</view>
<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
@input="barcodeInput()">
- </view>
+ </view>
+ <view class="item">
+ <view class="code-decs">绔欑偣鐮�:</view>
+ <input type="text" placeholder="鍗曠函涓嬫灦涓嶉渶瑕佹壂绔欑偣鐮�" v-model="staNo" :focus="staNos"
+ @input="staNoInput()">
+ </view>
+ <view class="item">
+ <view class="code-decs">1鎵瑰彿:</view>
+ <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="batch1" :focus="batch1s"
+ @input="batch1Input()">
+ </view>
+ <view class="item">
+ <view class="code-decs">2鎵瑰彿:</view>
+ <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="batch2" :focus="batch2s"
+ @input="batch2Input()">
+ </view>
+ <view class="item">
+ <view class="code-decs">3鎵瑰彿:</view>
+ <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="batch3" :focus="batch33s"
+ >
+ </view>
+ <!-- <view class="item">
+ <view class="code-decs">4鎵瑰彿:</view>
+ <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="batch4" :focus="barcodeFocus">
+ </view>
+ <view class="item">
+ <view class="code-decs">5鎵瑰彿:</view>
+ <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="batch5" :focus="barcodeFocus">
+ </view> -->
</view>
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
+ <view class="mat-list-title" style="color: red;">
+ {{taskType}}
</view>
<scroll-view>
+ <view style="margin-top: 600rpx">
<view class="list" v-for="(item,i) in dataList" :key="i">
<view class="list-left">
<view class="list-left-item">
@@ -23,31 +52,30 @@
<uni-tag :text="item.matnr" type="primary"></uni-tag>
</view>
</view>
- <view class="list-left-item">
+ <!-- <view class="list-left-item">
<view class="desc">鍚嶇О锛�</view>
<view class="left-item">{{item.maktx}}</view>
</view>
<view class="list-left-item">
<view class="desc">瑙勬牸锛�</view>
<view class="left-item">{{item.specs}}</view>
- </view>
+ </view> -->
<view class="list-left-item">
<view class="desc">璁㈠崟锛�</view>
<view class="left-item">{{item.orderNo}}</view>
</view>
- <!-- <view class="list-left-item">
- <view class="desc">閲嶉噺锛�</view>
+ <view class="list-left-item">
+ <view class="desc">鎵瑰彿锛�</view>
<view class="left-item">
- <uni-tag :text="item.weight" type="warning"></uni-tag>
+ <uni-tag :text="item.batch" type="warning"></uni-tag>
</view>
- </view> -->
+ </view>
<view class="list-left-item">
<view class="desc">鏁伴噺锛�</view>
<view class="left-item">{{item.anfme}}</view>
</view>
</view>
-
- </view>
+ </view></view>
</scroll-view>
<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
<view class="buttom">
@@ -110,6 +138,12 @@
@confirm="comb" @close="combClose"></uni-popup-dialog>
</uni-popup>
</view>
+ <!-- <view>
+ <uni-popup ref="combConfirm" type="dialog">
+ <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
+ @confirm="comb" @close="combClose"></uni-popup-dialog>
+ </uni-popup>
+ </view> -->
<!-- 纭閲嶇疆 -->
<view>
<uni-popup ref="resetConfirm" type="dialog">
@@ -140,8 +174,23 @@
content: '',
barcodeFocus: true,
matFocus: false,
+ taskTypes: '鍑哄簱淇℃伅',
+ staNos: false,
+ batch1s: false,
+ batch2s: false,
+ batch33s: false,
+ batch4s: false,
+ batch5s: false,
matData: '',
removeNum: 0,
+ taskType: '鍑哄簱淇℃伅',
+ staNo: '',
+ batch1: '',
+ batch2: '',
+ batch3: '',
+ batch4: '',
+ batch5: '',
+ batcharry: [],
}
},
onLoad() {
@@ -157,8 +206,42 @@
this.$refs.message.open()
},
// barcode input 浜嬩欢
+ staNoInput() {
+ // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
+ setTimeout(() => {
+ this.batch1ss()
+ }, 200)
+ },
+ // barcode input 浜嬩欢
+ batch1Input() {
+ // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
+ setTimeout(() => {
+ this.batch2ss()
+ }, 200)
+ },
+ // barcode input 浜嬩欢
+ batch2Input() {
+ // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
+ setTimeout(() => {
+ this.batch3ss()
+ }, 200)
+ },
barcodeInput() {
- let that = this;
+ // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
+ setTimeout(() => {
+ var len = this.barcode.length
+ if (len != 8) {
+ uni.showToast({
+ title: '鎵樼洏鐮佹湁璇閲嶈瘯',
+ icon: "none",
+ position: 'top'
+ });
+ this.barcodeFocuss()
+ return;
+ }
+ this.focuss()
+ }, 200)
+ let that = this;
uni.request({
url: that.baseUrl + '/mobile/pakout/confirm/barcode/auth?barcode='+that.barcode,
header: {
@@ -168,6 +251,13 @@
res = res.data
if (res.code === 200) {
that.dataList = res.data.list
+ if(res.data.ioType === 101){
+ that.taskType = '鍏ㄦ澘鍑哄簱'
+ }else if(res.data.ioType === 103){
+ that.taskType = '鎷f枡鍑哄簱'
+ }else if(res.data.ioType === 107){
+ that.taskType = '鎷f枡鍑哄簱'
+ }
}else{
that.messageText = res.msg
that.messageToggle('error')
@@ -189,8 +279,50 @@
this.barcodeFocus = false;
this.matFocus = false;
setTimeout(() => {
- this.matnr = '';
- this.matFocus = true;
+ this.staNo = '';
+ this.staNos = true;
+ }, 100);
+ },// 绔欑偣鍏夋爣娓呯┖閲嶇疆
+ batch1ss() {
+ this.barcodeFocus = false;
+ this.matFocus = false;
+ this.staNos = false;
+ setTimeout(() => {
+ this.batch1='';
+ this.batch1s = true;
+ }, 100);
+ },// 2鎵瑰彿鍏夋爣娓呯┖閲嶇疆
+ batch2ss() {
+ this.barcodeFocus = false;
+ this.matFocus = false;
+ this.staNos = false;
+ this.batch1s = false;
+ setTimeout(() => {
+ this.batch2='';
+ this.batch2s = true;
+ }, 100);
+ },// 3鎵瑰彿鍏夋爣娓呯┖閲嶇疆
+ batch3ss() {
+ this.barcodeFocus = false;
+ this.matFocus = false;
+ this.staNos = false;
+ this.batch1s = false;
+ this.batch2s = false;
+ setTimeout(() => {
+ this.batch3='';
+ this.batch33s = true;
+ }, 100);
+ },// 4鎵瑰彿鍏夋爣娓呯┖閲嶇疆
+ batch4ss() {
+ this.barcodeFocus = false;
+ this.matFocus = false;
+ this.staNos = false;
+ this.batch1s = false;
+ this.batch2s = false;
+ this.batch3s = false;
+ setTimeout(() => {
+ this.batch4='';
+ this.batch4s = true;
}, 100);
},
// 鎼滅储鐗╂枡
@@ -370,6 +502,50 @@
comb() {
uni.vibrateShort();
let that = this;
+
+ if(this.batch1!=='' ){
+ this.batcharry.push(this.batch1);
+ }
+ if(this.batch2!==''){
+ this.batcharry.push(this.batch2);
+ }
+ if(this.batch3!==''){
+ this.batcharry.push(this.batch3);
+ }
+
+ for (var i = 0; i < this.batcharry.length-1; i++) {
+ for(var j = i+1; j < this.batcharry.length; j++) {
+ if(this.batcharry[i]===this.batcharry[j]){
+ this.messageText = "鎵瑰彿閲嶅"
+ this.messageToggle('error')
+ this.batcharry = [];
+ return;
+ }
+ }
+ }
+ if(this.batcharry.length !== this.dataList.length){
+ this.messageText = "鎵瑰彿鏁伴噺涓嶄竴鑷�"
+ this.messageToggle('error')
+ this.batcharry = [];
+ return;
+ }
+ //鍒ゆ柇鎵殑鎵瑰彿鏄惁閮芥槸璇ユ墭鐩樼殑鎵瑰彿
+ for (var i = 0; i < this.batcharry.length; i++) {
+ var boo=false;
+ for(var j = 0; j < this.dataList.length; j++) {
+ if(this.batcharry[i]===this.dataList[j].batch){
+ boo = true;
+ break;
+ }
+ }
+ if(!boo){
+ this.messageText = "鎵爜杈撳叆鐨勬壒鍙蜂笌璇ユ墭鐩樼殑鎵瑰彿涓嶄竴鑷�"
+ this.messageToggle('error')
+ this.batcharry = [];
+ return;
+ }
+ }
+
if (that.barcode === '') {
this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
this.messageToggle('error')
@@ -380,6 +556,7 @@
this.messageToggle('error')
return;
}
+
uni.request({
url: that.baseUrl + '/mobile/pakout/confirm/auth',
data: that.dataList,
@@ -432,6 +609,11 @@
this.dataList = []
this.barcode = ''
this.barcodeFocuss()
+ this.batch1 = ''
+ this.batch2 = ''
+ this.batch3 = ''
+ this.batch4 = ''
+ this.batch5 = ''
},
}
}
@@ -443,7 +625,7 @@
.code {
width: 100%;
position: fixed;
- min-height: 100rpx;
+ min-height: 200rpx;
background-color: #FFF;
z-index: 10;
}
@@ -483,7 +665,7 @@
width: 100%;
background-color: white;
position: fixed;
- margin-top: 100rpx;
+ margin-top: 500rpx;
z-index: 9;
/* border-top: 1px solid #DCDFE6; */
text-align: center;
--
Gitblit v1.9.1