From 6c9cbdf482ce1330704dc635c510ec51a1115a9f Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期一, 18 三月 2024 16:52:29 +0800
Subject: [PATCH] #

---
 pages/basics/orderOut.vue |  186 ++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 155 insertions(+), 31 deletions(-)

diff --git a/pages/basics/orderOut.vue b/pages/basics/orderOut.vue
index c5e4d62..adaa0c5 100644
--- a/pages/basics/orderOut.vue
+++ b/pages/basics/orderOut.vue
@@ -7,7 +7,7 @@
 			</view>
 			<view class="square-content">
 				<view class="content-input">
-					<input type="text" v-model="billNo" placeholder="鎵爜 / 杈撳叆" @input="searchBillNo">
+					<input type="text" v-model="billNo" placeholder="鎵爜 / 杈撳叆" @input="searchBillNo" placeholder-style="line-height:  85rpx;">
 					<uni-icons type="closeempty" size="20" color="#dadada" @click="removeBillNo"></uni-icons>
 				</view>
 			</view>
@@ -39,9 +39,9 @@
 		
 		<checkbox-group @change="checkbox">
 			<view v-for="(item,index) in matList" :key="index" class="data-list bg-false" :class="'bg-'+item.checked" >
-				<label class="left-check-box">
+				<!-- <label class="left-check-box">
 					<checkbox :value="item.id+''" :checked="item.checked" style="display: block;" />
-				</label>
+				</label> -->
 				<view class="data-list-left">
 					<view class="matnr"><text style="width: 700rpx;">缂栫爜锛歿{item.matnr}}</text></view>
 					<view><text style="width: 700rpx;">鍝佸悕锛歿{item.maktx}}</text></view>
@@ -51,7 +51,7 @@
 					</view>
 				</view>
 				<view class="data-list-right">
-					<label><uni-icons type="compose" size="20" color="#a5a5a5" @click="revise(item,index)"></uni-icons></label>
+					<!-- <label><uni-icons type="compose" size="20" color="#a5a5a5" @click="revise(item,index)"></uni-icons></label> -->
 					<!-- list涓垹闄ら敭 -->
 					<!-- <label><uni-icons type="trash" size="25" color="#a5a5a5" @click="remove(item,index)"></uni-icons></label> -->
 				</view>
@@ -65,7 +65,7 @@
                     <uni-th align="center" width="80">浜у搧浠e彿</uni-th>
                     <uni-th align="center" width="70">浜у搧鍚嶇О</uni-th>
                 </uni-tr>
-                <uni-tr v-for="(item, index) in matData" :key="index">
+                <uni-tr v-for="(item, index) in matList" :key="index">
                     <uni-td align="center">{{item.qty}}</uni-td>
                     <uni-td align="center">{{item.matNo}}</uni-td>
                     <uni-td align="center">{{item.size}}</uni-td>
@@ -99,20 +99,28 @@
     export default {
         data() {
             return {
-                billNo: null,
+				commonUrl:null,
+                billNo: '',
                 matList: [],
                 sites: [],
                 siteId: ''
             }
         },
         mounted(){
-            const UIP = uni.getStorageSync('UIP');
-            this.baseIP = UIP;
-            const UPORT = uni.getStorageSync('UPORT');
-            this.basePORT = UPORT;
-            this.staNoSelect();
+			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()
+			this.staNoSelect();
         },
         methods: {
+			// 鑾峰彇url
+			getUrl() {
+				this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl
+			},
 			// 娓呯┖鍗曞彿鎼滅储妗�
 			removeBillNo() {
 				this.billNo = null
@@ -120,25 +128,27 @@
             searchBillNo() {
                 let that = this;
                 uni.request({
-                    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/orderDetl/list/auth",
+                    url: that.commonUrl + "/orderDetl/list/auth",
                     header: {
 						'content-type':"application/x-www-form-urlencoded",
 						'token':uni.getStorageSync('token')
 						},
                     data: {
-                        curr:1,
-                        limit:10,
-                        // typeCode:1,
-                        order_no: that.billNo
+						curr:1,
+						limit:10,
+						// typeCode:1,
+						order_no: that.billNo
                     },
 					method:"POST",
                     success(result) {
-						console.log(that.billNo)
-						console.log(result)
                         let res = result.data
                         if (res.code === 200 ) {
-                            that.matData = res.data.records
-                            that.staNoSelect()
+							if (res.data) {
+								that.matList = res.data.records
+								that.staNoSelect()
+							} else {
+								that.matList = []
+							}
                         } else if (res.code == 403) {
                             uni.showToast({title: res.msg, icon: "none", position: 'top'})
                             setTimeout(() => {
@@ -155,9 +165,10 @@
             staNoSelect() {
                 let that = this;
                 uni.request({
-                    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/available/take/site",
+                    url: that.commonUrl + "/available/take/site",
                     header: {'token':uni.getStorageSync('token')},
                     success(result) {
+						console.log(result)
                         let res = result.data
                         if (res.code === 200 ) {
                             that.sites = [];
@@ -179,8 +190,8 @@
             },
             outbound() {
                 let that = this
-                if (that.matData.length === 0) {
-                    uni.showToast({title: "璇峰厛娣诲姞浜у搧", icon: "none",position: 'top'})
+                if (that.matList.length === 0) {
+					uni.showToast({title: "璇烽�夋嫨鍑哄簱鍙�", icon: "none",position: 'top'})
                 } else {
                     if (that.siteId == '') {
                         uni.showToast({title: "璇烽�夋嫨鍑哄簱鍙�", icon: "none",position: 'top'})
@@ -188,34 +199,40 @@
                     }
                 };
                 var staNo = that.siteId.substring(0,3)
-                
                 var locDetls = [];
-                that.matData.forEach(function(elem) {
+                that.matList.forEach(function(elem) {
                     locDetls.push({billNo:elem.billNo,seqNo:elem.seqNo, matNo: elem.matNo, count: elem.qty,});
                 });
                 let param = {
-                    outSite: 173,
+                    outSite: staNo,
                     locDetls: locDetls
                 }
+				console.log(param)
+				// return
                 uni.request({
-                    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/mat/out/start",
+                    url: that.commonUrl + "/mobile/order/out/pakout/auth",
                     header: {
                         'token':uni.getStorageSync('token')},
-                    data: JSON.stringify(param),
+                    // data: JSON.stringify(param),
+					data: {
+							staNo: staNo,
+							orderNo: that.billNo
+						},
                     method:"POST",
                     success(result) {
+						console.log(result)
                         if (result.data.code === 200) {
                             uni.showToast({title: result.data.msg, icon: "none",position: 'top'})
-                            that.reset()
+                            that.resst()
                         } else {
                             uni.showToast({title: result.data.msg, icon: "none",position: 'top'})
                         }
                     }
                 })
             },
-            reset() {
+            resst() {
                 this.billNo = '';
-                this.matData = [];
+                this.matList = [];
                 this.siteId = '';
             }
         }
@@ -236,4 +253,111 @@
         width: 200px;
         padding: 12px;
     }
+	.bg-false {
+		background-color: #FFFFFF;
+	}
+	.bg-true {
+		background-color: #ebebeb;
+	}
+	.data-list {
+		border-bottom: 1px solid #d8d8d8;
+		height: 180rpx;
+		width: 94%;
+		margin: 15rpx auto 15rpx auto;
+		border-radius: 20rpx;
+	}
+	.data-list:first-child {
+		margin-top: 20rpx;
+	}
+	.data-list:last-child {
+		margin-bottom: 160rpx;
+	}
+	/* .data-list-left {
+		display: inline-block;
+		float: left;
+		text-align: center;
+		width: 100rpx;
+		height: 180rpx;
+		line-height: 180rpx;
+	} */ 
+	.left-check-box {
+		display: inline-block;
+		/* background-color: #1E9FFF; */
+		float: left;
+		height: 100%;
+		width: 100rpx;
+		text-align: center;
+		line-height: 170rpx;
+	}
+	.data-list-left {
+		/* background-color: #ffff7f; */
+		display: inline-block;
+		float: left;
+		height: 180rpx;
+		width: 500rpx;
+		color: #676767;
+		text-indent: 20rpx;
+	}
+	.matnr {
+		padding-top: 10rpx;
+	}
+	.data-list-right {
+		/* background-color: #55ffff; */
+		display: inline-block;
+		float: right;
+		width: 100rpx;
+		height: 180rpx;
+		line-height: 180rpx;
+	}
+	.data-list-right label {
+		display: inline-block;
+		float: left;
+		width: 100rpx;
+		height: 180rpx;
+	}
+	.revise-box {
+		width: 500rpx;
+		height: 500rpx;
+	}
+	.revise-box-top {
+		width: 100%;
+		height: 100rpx;
+		background-color: #fff;
+		padding: 10rpx;
+	}
+	.changeBox {
+		width: 100%;
+		height: 100rpx;
+		line-height: 120rpx;
+		text-align: center;
+		background-color: #FFF;
+		margin-top: 20rpx;
+		border-bottom: 1px solid #e3e3e3;
+	}
+	.text-box {
+		width: 100%;
+		height: 100rpx;
+		line-height: 120rpx;
+		text-align: center;
+		/* padding-left: 120rpx; */
+		background-color: #FFF;
+		margin-top: 20rpx;
+		border-bottom: 1px solid #e3e3e3;
+	}
+	.changeBox .num-box {
+		display:  inline-block;
+		float: left;
+	}
+	.changeBox button {
+		float: left;
+	}
+	.revise-box-buttom {
+		position: absolute;
+		width: 100%;
+		height: 100rpx;
+		line-height: 100rpx;
+		background-color: #FFFFFF;
+		bottom: 0;
+		text-align: center;
+	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.1