From 4aa1546dda1adf637a8d612c6dc0a535532294b4 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期一, 17 四月 2023 12:28:56 +0800
Subject: [PATCH] #

---
 pages/basics/outPakin.vue |   51 +++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 47 insertions(+), 4 deletions(-)

diff --git a/pages/basics/outPakin.vue b/pages/basics/outPakin.vue
index 472e4fe..6ac8342 100644
--- a/pages/basics/outPakin.vue
+++ b/pages/basics/outPakin.vue
@@ -30,6 +30,15 @@
 				</view>
 			</view>
 			<view class="square-1">
+				<view class="square-title" style="display: flex;">
+					<view class="title-sign"><view class="sign"></view></view>
+					<view class="title-text" style="width: 200rpx;"><text>鎷ユ湁鑰�</text></view>
+					<view style="margin: auto auto;">
+						<uni-combox :candidates="ownerList" placeholder="璇烽�夋嫨鎷ユ湁鑰�" v-model="owner"></uni-combox>
+					</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>
@@ -136,7 +145,11 @@
 				current: 0,
 				isNum:false,
 				memo:'',
-				hide:true
+				hide:true,
+				ownerList: [],
+				ownerList2: '',
+				owner: '浜氬拰',
+				ownerId: 2
 				
 			}
 		},
@@ -148,6 +161,7 @@
 			const PROJ = uni.getStorageSync('UPROJ');
 			this.baseUrl = PROJ
 			this.getUrl()
+			this.getOwner()
 		},
 		onLoad() {
 			// #ifdef APP
@@ -165,6 +179,34 @@
 			getUrl() {
 				this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl
 			},
+			getOwner() {
+				let that = this
+				uni.request({
+					url: that.commonUrl + '/locOwner/list/auth',
+					header: {'token':uni.getStorageSync('token')},
+					success(result) {
+						for (var i = 0; i < result.data.data.records.length; i++) {
+							if(result.data.data.records[i].id == 1){
+								break
+							}
+							that.ownerList.push(result.data.data.records[i].owner)
+						}
+						that.ownerList2 = result.data.data.records
+					}
+					
+				})
+				setTimeout(()=>{
+					
+				},100)
+			},
+			getOwnerId(owner) {
+				
+				for (var key in this.ownerList2) {
+					if (this.ownerList2[key].owner == owner) {
+						this.ownerId = this.ownerList2[key].id
+					}
+				}
+			},
 			radioChange(evt) {
 				for (let i = 0; i < this.origins.length; i++) {
 					if (this.origins[i].value === evt.detail.value) {
@@ -175,7 +217,6 @@
 			},
 			// 纭鍑哄簱鍙�
 			check() {
-				console.log(this.matList);
 				let that = this
 				if (this.current == 0) {
 					this.origin = 1288
@@ -188,6 +229,7 @@
 				    data: JSON.stringify({
 						barcode: that.barcode,
 						origin: that.origin,
+						owner: 2,
 						combMats: that.matList
 					}),
 					method: 'POST',
@@ -206,6 +248,7 @@
 							that.barcode = '';
 							that.matList = '';
 							that.matList = [];
+							that.owner = '';
 							that.barcodeFocuss();
 						} else if (res.code == 403) {
 							uni.showToast({title: res.msg, icon: "none", position: 'top'})
@@ -261,6 +304,7 @@
 				this.matnrId = '';
 				this.matList = [];
 				this.barcode = '';
+				this.owner = ''
 				this.barcodeFocuss();
 			},
 			removeBarcode() {
@@ -287,9 +331,8 @@
 					uni.showToast({title: '璇锋坊鍔犲晢鍝佸垪琛�', icon: "none", position: 'top'});
 					return;
 				}
-				// uni.showLoading();
 				that.$refs.checkOrigin.open()
-				
+				this.getOwnerId(that.owner)
 			},
 			// 杈撳叆鐨勪笉鏄暟瀛楃殑鎺掗櫎
 			checkNum(theObj) {

--
Gitblit v1.9.1