Browse Source

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

YL2767 3 months ago
parent
commit
666e32871a
1 changed files with 26 additions and 4 deletions
  1. 26
    4
      src/components/PopupStackWithSelectWare.vue

+ 26
- 4
src/components/PopupStackWithSelectWare.vue View File

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

Loading…
Cancel
Save