From 41e6159cfa12416155adcd6747e48fab28ffc534 Mon Sep 17 00:00:00 2001
From: cyy <cuiqian2004@163.com>
Date: 星期一, 26 八月 2024 22:45:17 +0800
Subject: [PATCH] test

---
 pages/modal/5602.vue |  109 +++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 95 insertions(+), 14 deletions(-)

diff --git a/pages/modal/5602.vue b/pages/modal/5602.vue
index 215603f..622cfaa 100644
--- a/pages/modal/5602.vue
+++ b/pages/modal/5602.vue
@@ -98,7 +98,8 @@
 							<view v-if="param.Sub_Page[0].OK_Button==true">
 								<button type="default" @tap="cancel"
 									class="btn_cancel">{{translateSys('cancel')}}</button>
-								<button type="primary" @tap="ok" class="btn_add">{{translateSys('ok')}}</button>
+								<button type="primary" @tap="ok" class="btn_add" :class="okLoading?'btn_disabled':''"
+									:disabled="okLoading">{{translateSys('ok')}}</button>
 							</view>
 						</view>
 					</swiper-item>
@@ -147,7 +148,8 @@
 							<view v-if=" param.Sub_Page[1].OK_Button==true">
 								<button type="default" @tap="cancel"
 									class="btn_cancel">{{translateSys('cancel')}}</button>
-								<button type="primary" @tap="ok2" class="btn_add">{{translateSys('ok')}}</button>
+								<button type="primary" @tap="ok2" class="btn_add" :class="ok2Loading?'btn_disabled':''"
+									:disabled="ok2Loading">{{translateSys('ok')}}</button>
 							</view>
 						</view>
 					</swiper-item>
@@ -185,8 +187,8 @@
 		data() {
 			return {
 				title: this.translateSys("sorting"),
-				ClsID: "Sorting_Detail",
-				ClsID2: "Sorting_Result",
+				ClsID: "Distribution_CNTR_Detail",
+				ClsID2: "Picking_Result",
 				param: {},
 				focusFieldId: "",
 				focusOldFieldId: "",
@@ -210,6 +212,8 @@
 				items: [],
 				active_id: '',
 				activelist: [],
+				okLoading: false,
+				ok2Loading: false,
 			};
 		},
 		onLoad(options) {
@@ -545,6 +549,36 @@
 				})
 
 			},
+getUIStyleInfo(info) { //Mobox3鏁版嵁绫荤晫闈㈡牱寮�+				const loginInfo = this.$store.getters.loginid
+				const dataSApi = this.$store.getters.getDataSApi
+				return new Promise((resolve, reject) => {
+					uni.request({
+						url: dataSApi + 'api/class/uistyle/GetInfo?sessionid=' + loginInfo.result
+							.session_id,
+						data: info,
+						method: 'POST',
+						dataType: "json",
+						success: (_res) => {
+							// console.log(_res);
+							const ret = _res.data
+							if (ret.err_code == 0) {
+								resolve(ret);
+							} else {
+								reject({
+									"errMsg": ret.err_msg
+								});
+							}
+						},
+						fail: (err) => {
+							// console.log(err);
+							reject(err);
+						}
+					})
+
+				})
+
+			},
 
 			onClick(item) {
 				this.focusFieldId = item.fieldId
@@ -559,7 +593,7 @@
 					var $this = this;
 
 					console.log(item);
-					if (item.oldvalue != item.value) {
+					if (item.oldvalue != item.value && item.value.trim() != "") {
 						item.oldvalue = item.value;
 						var attr = item.fieldId;
 						this.head_styledef.form.model[attr] = item.value;
@@ -642,7 +676,7 @@
 			},
 			onEnterChange(item) { //鍥炶溅锛岀偣鍑绘寜閽紝鍙栨秷鑺傜偣浜嬩欢
 				// console.log(item);
-				if (item.oldvalue != item.value) {
+				if (item.oldvalue != item.value && item.value.trim() != "") {
 					item.oldvalue = item.value;
 					var attr = item.fieldId;
 					this.head_styledef.form.model[attr] = item.value;
@@ -832,7 +866,7 @@
 															this.translateSys(
 																"quotation_mark_left") + value
 															.page_name + this.translateSys(
-																"sys.quotation_mark_right") +
+																"quotation_mark_right") +
 															this.translate(
 																"are_you_sure_clear_last"),
 
@@ -966,8 +1000,34 @@
 													data.forEach(async (ele2, index) => {
 														if (ele.fieldId == ele2
 															.attr) {
+															if (ele.name ==
+																'Select' &&
+																ele2
+																.choice_list) {
+																const
+																	dictItemList = [];
+																const
+																	choiceList =
+																	ele2
+																	.choice_list ||
+																	[];
+																for (let d in
+																		choiceList) {
+																	const val =
+																		choiceList[
+																			d];
+																	dictItemList
+																		.push({
+																			text: val,
+																			value: val
+																		});
+																}
+																ele.dict =
+																	dictItemList;
+															}
 															ele.value = ele2
 																.value;
+
 														}
 													});
 												});
@@ -1509,21 +1569,23 @@
 			},
 			sava(event) {
 				var $this = this;
+
 				if (this.$data.detail1StyleDefList.length == 0) {
 					uni.showModal({
 						title: this.translateSys("tip"),
 						content: this.translate(
-								"page.tip_no_data_first") +
+								"tip_no_data_first") +
 							this.translateSys(
 								"quotation_mark_left") + this.param.Sub_Page[0].Name + this.translateSys(
-								"sys.quotation_mark_right") +
+								"quotation_mark_right") +
 							this.translate(
-								"page.tip_no_data_last"),
+								"tip_no_data_last"),
 						showCancel: false,
 						confirmText: this.translateSys("cancel")
 					});
 					return false;
 				}
+				this.okLoading = true
 				//鑾峰彇琛ㄥご灞炴�
 				var head_attr = {};
 				this.$data.head_styledef.form.items.forEach(item => {
@@ -1591,6 +1653,7 @@
 					});
 				});
 				if (jsonlist.length == 0) {
+					this.okLoading = false
 					uni.showModal({
 						title: this.translateSys("tip"),
 						content: this.translate("tip_no_select_data"),
@@ -1624,21 +1687,23 @@
 			},
 			sava2(event) {
 				var $this = this;
+
 				if (this.$data.detail1StyleDefList.length == 0) {
 					uni.showModal({
 						title: this.translateSys("tip"),
 						content: this.translate(
-								"page.tip_no_data_first") +
+								"tip_no_data_first") +
 							this.translateSys(
 								"quotation_mark_left") + this.param.Sub_Page[1].Name + this.translateSys(
-								"sys.quotation_mark_right") +
+								"quotation_mark_right") +
 							this.translate(
-								"page.tip_no_data_last"),
+								"tip_no_data_last"),
 						showCancel: false,
 						confirmText: this.translateSys("cancel")
 					});
 					return false;
 				}
+				this.ok2Loading = true
 				//鑾峰彇琛ㄥご灞炴�
 				var head_attr = {};
 				this.$data.head_styledef.form.items.forEach(item => {
@@ -1706,12 +1771,14 @@
 					});
 				});
 				if (jsonlist.length == 0) {
+					this.ok2Loading = false
 					uni.showModal({
 						title: this.translateSys("tip"),
 						content: this.translate("tip_no_select_data"),
 						showCancel: false,
 						confirmText: this.translateSys("cancel")
 					});
+
 					return;
 				}
 				const list = []
@@ -1835,7 +1902,7 @@
 														this.translateSys(
 															"quotation_mark_left") + value
 														.page_name + this.translateSys(
-															"sys.quotation_mark_right") +
+															"quotation_mark_right") +
 														this.translate(
 															"are_you_sure_clear_last"),
 													success: function(res) {
@@ -1976,7 +2043,15 @@
 							confirmText: this.translateSys("cancel")
 						});
 					}
+					if (type == "1")
+						this.okLoading = false
+					else if (type == "2")
+						this.ok2Loading = false
 				}).catch(ex => {
+					if (type == "1")
+						this.okLoading = false
+					else if (type == "2")
+						this.ok2Loading = false
 					var tip = typeof ex == "string" ? ex : ex.errMsg;
 					uni.showModal({
 						title: this.translateSys("error") + "8.1",
@@ -2247,9 +2322,15 @@
 			font-size: 38rpx;
 			font-weight: bold;
 			float: right;
+			color: #fff;
 			display: inline-block;
 		}
 
+		button.btn_disabled {
+			background-color: #ddd;
+			color: #888;
+		}
+
 		.logo {
 			height: 100rpx;
 			width: 460rpx;

--
Gitblit v1.9.1