Răsfoiți Sursa

生产线修改

wcs 1 săptămână în urmă
părinte
comite
3d713eee52
2 a modificat fișierele cu 71 adăugiri și 16 ștergeri
  1. 36 8
      pages/sample/group.vue
  2. 35 8
      pages/sample/select_product.vue

+ 36 - 8
pages/sample/group.vue

@@ -202,13 +202,7 @@
 			return {
 				printedList: [],
 				printed: "无印刷",
-				production_lineList: [{
-					label: "一期",
-					value: "一期",
-				}, {
-					label: "二期",
-					value: "二期",
-				}],
+				production_lineList: [],
 				production_line: "一期",
 				container_code: "",
 				product_code: "",
@@ -281,7 +275,8 @@
 				_this = this;
 				_this.firstFocus = true;
 				_this.getSn()
-				this.PrintedGet();
+				_this.PrintedGet();
+				_this.ProductionLineGet();
 				// 打印相关
 				/*
 				setTimeout(() => {
@@ -821,6 +816,39 @@
 					})
 				}, 500);
 			},
+			
+			ProductionLineGet() {
+				uni.request({
+					url: reqRootUrl + '/wms/api',
+					method: 'POST',
+					headers: {
+						'Content-Type': 'application/json'
+					},
+					data: JSON.stringify({
+						"method": "ProductionLineGet",
+						"param": {
+							"disable": false,
+						}
+					}),
+					success: (ret) => {
+						if (ret.data.ret === "ok") {
+							let rows = ret.data.data;
+							for (var i = 0; i < rows.length; i++) {
+								this.production_lineList.push({
+									label: rows[i].name,
+									value: rows[i].name
+								})
+							}
+						}
+					},
+					fail: (err) => {
+						// console.log('request fail', err);
+					},
+					complete: () => {
+						// console.log('complete');
+					}
+				})
+			},
 			PrintedGet() {
 				uni.request({
 					url: reqRootUrl + '/wms/api',

+ 35 - 8
pages/sample/select_product.vue

@@ -101,13 +101,7 @@
 			return {
 				printedList: [],
 				printed: "无印刷",
-				production_lineList: [{
-					label: "一期",
-					value: "一期",
-				}, {
-					label: "二期",
-					value: "二期",
-				}],
+				production_lineList: [],
 				production_line: "一期",
 				query_code: "",
 				tableData: [],
@@ -163,6 +157,7 @@
 				setTimeout(() => {
 					this.getList();
 					this.PrintedGet();
+					this.ProductionLineGet();
 				}, 350);
 			},
 			onShow() {
@@ -341,7 +336,39 @@
 					}
 				})
 			},
-
+			
+			ProductionLineGet() {
+				uni.request({
+					url: reqRootUrl + '/wms/api',
+					method: 'POST',
+					headers: {
+						'Content-Type': 'application/json'
+					},
+					data: JSON.stringify({
+						"method": "ProductionLineGet",
+						"param": {
+							"disable": false,
+						}
+					}),
+					success: (ret) => {
+						if (ret.data.ret === "ok") {
+							let rows = ret.data.data;
+							for (var i = 0; i < rows.length; i++) {
+								this.production_lineList.push({
+									label: rows[i].name,
+									value: rows[i].name
+								})
+							}
+						}
+					},
+					fail: (err) => {
+						// console.log('request fail', err);
+					},
+					complete: () => {
+						// console.log('complete');
+					}
+				})
+			},
 			PrintedGet() {
 				uni.request({
 					url: reqRootUrl + '/wms/api',