소스 검색

垛位转移时弹窗中增加区域选项

YL2767 1 주 전
부모
커밋
666e32871a
1개의 변경된 파일26개의 추가작업 그리고 4개의 파일을 삭제
  1. 26
    4
      src/components/PopupStackWithSelectWare.vue

+ 26
- 4
src/components/PopupStackWithSelectWare.vue 파일 보기

@@ -6,11 +6,15 @@
6 6
 					<el-option v-for="item in wares" :key="item.id" :label="item.name" :value="item.id">
7 7
 					</el-option>
8 8
 				</el-select>
9
+				<el-select v-model="areaId" style="margin-left: 5px; width: 100px" clearable placeholder="请选择区域" @change="changeArea">
10
+					<el-option v-for="item in optionsArea" :key="item.id" :label="item.name" :value="item.code">
11
+					</el-option>
12
+				</el-select>
9 13
 				<el-input v-model="layer" style="width: 200px;" v-show="layerVisible"></el-input>
10 14
 				<el-button type="success" @click="handleComfirm">确定</el-button>
11 15
 			</el-row>
12 16
 			<el-row>
13
-				<div id="popMoveWareLayout" style=" margin:10px;width:600px; height: 300px;background-color: #00FFFF;"></div>
17
+				<div id="popMoveWareLayout" style=" margin:10px;width:600px; height: 500px;background-color: #00FFFF;"></div>
14 18
 			<!-- 	<div id="popMoveStoreLayer" style=" margin:10px;width:600px; height: 300px;background-color: #00FFFF;"></div> -->
15 19
 			</el-row>
16 20
 		</el-dialog>
@@ -42,7 +46,9 @@
42 46
 		data() {
43 47
 			return {
44 48
 				wareId: '',
49
+				areaId: '',
45 50
 				wareStack: [],
51
+				optionsArea: [],
46 52
 				dialogVisible: false,
47 53
 				layerVisible: false,
48 54
 				popMoveWare: {},
@@ -76,7 +82,8 @@
76 82
 				//console.log(this.wareName)
77 83
 				var url = 'MaintStack/queryByWareId.do'
78 84
 				var param = {
79
-					wareId: this.wareId
85
+					wareId: this.wareId,
86
+					areaId: this.areaId
80 87
 				}
81 88
 				axios.get(url, param).then(response => {
82 89
 					// alert(JSON.stringify(response));
@@ -208,11 +215,20 @@
208 215
 					this.wares = response.data.data
209 216
 					//console.log("getWare() :" + JSON.stringify(this.options))
210 217
 					if (response.data.data.length == 1) {
211
-						this.query.wareId = response.data.data[0].id
212
-						this.getAllStackByWareId(this.query.wareId)
218
+						this.wareId = response.data.data[0].id
219
+						this.getAllStackByWareId(this.wareId)
213 220
 					}
214 221
 				});
215 222
 			},
223
+			getArea() {
224
+				var url = 'MaintArea/queryAll.do'
225
+      			var param = {
226
+          			wareId: this.wareId
227
+        		}
228
+      			axios.get(url, param).then(response => {
229
+      				this.optionsArea = response.data.data
230
+				});
231
+			},
216 232
 			drawStoreNoLayer(data) {
217 233
 				//console.log("drawStoreLayer(data)");
218 234
 				this.popMoveStore = zrender.init(document.getElementById('popMoveStoreLayer'));
@@ -245,6 +261,12 @@
245 261
 				if (val != '') {
246 262
 					this.getAllStackByWareId()
247 263
 				}
264
+				this.getArea()
265
+			},
266
+			changeArea(val) {
267
+				if (val != '') {
268
+					this.getAllStackByWareId(val)
269
+				}
248 270
 			},
249 271
 			setColor() {
250 272
 				for (let i = 0; i < this.popMoveWare.storage._roots.length; i++) {

Loading…
취소
저장