From 3878c57a2bd710295931303ea85439a596838dfd Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期二, 05 九月 2023 16:01:31 +0800
Subject: [PATCH] 小程序

---
 minipro_standard/pages_adjust/pages/warehousingDetails1/warehousingDetails1.vue |   71 +++++++++++++++++++++++++++++++++--
 1 files changed, 66 insertions(+), 5 deletions(-)

diff --git a/minipro_standard/pages_adjust/pages/warehousingDetails1/warehousingDetails1.vue b/minipro_standard/pages_adjust/pages/warehousingDetails1/warehousingDetails1.vue
index 3f94b84..d184e6e 100644
--- a/minipro_standard/pages_adjust/pages/warehousingDetails1/warehousingDetails1.vue
+++ b/minipro_standard/pages_adjust/pages/warehousingDetails1/warehousingDetails1.vue
@@ -3,7 +3,6 @@
 		<view class="order-message">
 			<view class="content_list_item_top">
 				<view class="content_list_item_top_left">
-					<!--<text>鍏ュ簱鍗曞彿锛�</text>-->
 					<text>{{ data.code }}</text>
 				</view>
 				<view class="content_list_item_top_right">
@@ -16,7 +15,7 @@
 				<view class="content_list_item_content_item">
 					<view class="content_list_item_content_item_label">鍗曟嵁绫诲瀷锛�</view>
 					<view class="content_list_item_content_item_nr" v-if="data.billType">
-						{{ orderTyepToStr(data.billType) }}
+						{{ seeText(data.billType) }}
 					</view>
 				</view>
 				<view class="content_list_item_content_item">
@@ -79,7 +78,8 @@
 					</view>
 					<view class="content_list_item_content_item">
 						<text class="content_list_item_content_item_label">鍏ュ簱璐т綅锛�</text>
-						<text class="content_list_item_content_item_nr">{{ item.locationName ? item.locationName : '-' }}</text>
+						<text
+							class="content_list_item_content_item_nr">{{ item.locationName ? item.locationName : '-' }}</text>
 					</view>
 				</view>
 			</view>
@@ -96,9 +96,15 @@
 	import {
 		orderTyepToStr
 	} from '@/util/constData.js'
+	import {
+		getBoundDetail,
+		cancelBound
+	} from '@/util/api/materialStorage'
+
 	export default {
 		data() {
 			return {
+				id: null,
 				types: [{
 						name: '鍏ㄩ儴',
 						id: '',
@@ -130,13 +136,46 @@
 						isActive: false
 					},
 				],
-				data: {},
+				data: {
+					code: "",
+					createName: "",
+					planDate: "",
+					dealDate: "",
+					status: 0,
+					originType: 0,
+					originCode: "",
+					updateName: "",
+					updateMobile: "",
+					updateTime: "",
+					warehouseName: "",
+					warehouseCode: "",
+					outPlandate: "",
+					inPlandate: "",
+					woutboundDetailsWait: [],
+					woutboundDetailsOut: []
+				},
 				materailArray: []
 			};
 		},
+		onLoad(option) {
+			this.id = option.id
+			getBoundDetail({
+				id: option.id
+			})
+			.then(res => {
+				this.data = res.data
+				if (this.data.status === 1) {
+					this.materailArray.push(...this.data.woutboundDetailsOut)
+				} else {
+					this.materailArray.push(...this.data.woutboundDetailsWait)
+				}
+			})
+		},
 		methods: {
+			seeText(id) {
+				return orderTyepToStr(id)
+			},
 			tyepToStr(type) {
-				//  <!-- 1銆佽溅闂撮鏂欙紱2銆佽溅闂村鏂欙紱3銆佸叾浠栵紱4銆佸畬宸ュ叆搴� -->
 				for (const item of this.types) {
 					if (parseInt(item.id) === this.type) {
 						return item.name
@@ -146,6 +185,28 @@
 			},
 			submit() {
 
+			},
+			cancel() {
+				cancelBound({
+					id: this.id
+				})
+				.then(res => {
+					uni.showToast({
+						title: '鍙栨秷鎴愬姛',
+						icon: 'success',
+						duration: 2000
+					});
+					uni.navigateBack({
+						delta: 1
+					});
+				})
+				.catch(err => {
+					uni.showToast({
+						title: err.message,
+						icon: 'error',
+						duration: 2000
+					});
+				})
 			}
 		}
 	}

--
Gitblit v1.9.3