YL2767 il y a 3 semaines
Parent
révision
79e4b84b23
3 fichiers modifiés avec 334 ajouts et 253 suppressions
  1. 28
    3
      src/view/customer/storequery.vue
  2. 278
    249
      src/view/system/main.vue
  3. 28
    1
      src/view/ware/storechange.vue

+ 28
- 3
src/view/customer/storequery.vue Voir le fichier

@@ -61,6 +61,7 @@
61 61
 				</el-row>
62 62
 				
63 63
 			</el-form>
64
+			<total-block ref="totalBlock" style="margin-left: -25px;font-size: 13px;margin-left: 5px" v-bind:childParam="childParam" v-bind:childUrl = 'childUrl'></total-block>
64 65
 		</div>
65 66
 		<div class="tabledata-grid">
66 67
 			<el-table :data="tableData" height="100%"   border style="width: 97%;" v-loading="loading" ref="multipleTable"	@select="handleTableSelect"	 @selection-change="handleSelectionChange" @select-all = "selectAll">
@@ -263,6 +264,7 @@
263 264
 	import PopupOut from '@/components/PopupOut.vue'
264 265
 	import PopupIn from '@/components/PopupIn.vue'
265 266
 	import Export2Excel from '../../excel/Export2Excel.js'
267
+	import TotalBlock    from '@/components/TotalBlock.vue'
266 268
 	import {
267 269
 		mapState
268 270
 	} from 'vuex'
@@ -275,6 +277,7 @@
275 277
 			PopupDistribution,
276 278
 			PopupOut,
277 279
 			PopupIn,
280
+			TotalBlock
278 281
 		},
279 282
 		computed: {
280 283
 			// splitCount: function() {
@@ -354,7 +357,25 @@
354 357
 				newOrdno:'',
355 358
 				newReceiveaddress:'',
356 359
 				newProductionplace:'',
357
-				newPackno:''
360
+				newPackno:'',
361
+				childParam:{
362
+					wareName: '',
363
+					stackName: '',
364
+					model: '',
365
+					materialName: '',
366
+					standard: '',
367
+					customerName: '',
368
+					plateNo: [],
369
+					wareId:'',
370
+					ordNo:[],
371
+					contractNo:[],
372
+					packNo:[],
373
+					fkcustmerName:'',
374
+					remark1:'',
375
+					outFlag:'0',
376
+					inRecordDate:[]
377
+				},
378
+				childUrl:'WareStore/queryTotal.do',
358 379
 			};
359 380
 		},
360 381
 		mounted() {
@@ -573,14 +594,17 @@
573 594
 					ordNo: this.query.ordNo == 0 ? '' : this.query.ordNo.join(','),
574 595
 					contractNo: this.query.contractNo == 0 ? '' : this.query.contractNo.join(','),
575 596
 					packNo: this.query.packNo == 0 ? '' : this.query.packNo.join(','),
576
-					remark1: this.query.remark1
597
+					remark1: this.query.remark1,
598
+					outFlag:'0'
577 599
 				}
600
+				this.childParam = param;
578 601
 				//console.log(param);
579 602
 				axios.get(url, param).then(response => {
580 603
 					if (response.data.code == 0) {
581 604
 						//console.log(response.data.data.list);
582 605
 						this.tableData = response.data.data.list
583 606
 						this.totalRows = response.data.data.total
607
+						this.$refs.totalBlock.getTotalData();
584 608
 					} else {
585 609
 						this.$message({
586 610
 							type: 'error',
@@ -923,7 +947,8 @@
923 947
 					ordNo: this.query.ordNo == 0 ? '' : this.query.ordNo.join(','),
924 948
 					contractNo: this.query.contractNo == 0 ? '' : this.query.contractNo.join(','),
925 949
 					packNo: this.query.packNo == 0 ? '' : this.query.packNo.join(','),
926
-					remark1: this.query.remark1
950
+					remark1: this.query.remark1,
951
+					outFlag:'0'
927 952
 				}
928 953
 
929 954
 

+ 278
- 249
src/view/system/main.vue Voir le fichier

@@ -23,9 +23,17 @@
23 23
 	</div>
24 24
 </template>
25 25
 <script>
26
+	import axios from '@/axios'
26 27
 	export default {
27 28
 		data() {
28 29
 			return {
30
+				drawLine1_date1:[],
31
+				drawLine1_date2:[],
32
+				drawLine2_date1:[],
33
+				drawLine3_date1:[],
34
+				drawLine3_date2:[],
35
+				drawLine3_date3:[],
36
+				drawLine4_value:''
29 37
 
30 38
 			}
31 39
 		},
@@ -38,290 +46,311 @@
38 46
 		},
39 47
 		methods: {
40 48
 			drawLine1() {
41
-				let myChart1 = this.$echarts.init(document.getElementById('myChart1'), 'default')
42
-				myChart1.setOption({
43
-					title: {
44
-						text: '年度总收入',
45
-						// subtext: '纯属虚构'
46
-					},
47
-					tooltip: {
48
-						trigger: 'axis'
49
-					},
50
-					legend: {
51
-						data: ['库存费用']
52
-					},
53
-					// toolbox: {
54
-					// 	show: true,
55
-					// 	feature: {
56
-					// 		mark: {
57
-					// 			show: true
58
-					// 		},
59
-					// 		dataView: {
60
-					// 			show: true,
61
-					// 			readOnly: false
62
-					// 		},
63
-					// 		magicType: {
64
-					// 			show: true,
65
-					// 			type: ['line', 'bar']
66
-					// 		},
67
-					// 		restore: {
68
-					// 			show: true
69
-					// 		},
70
-					// 		saveAsImage: {
71
-					// 			show: true
72
-					// 		}
73
-					// 	}
74
-					// },
75
-					calculable: true,
76
-					xAxis: [{
77
-						type: 'category',
78
-						boundaryGap: false,
79
-						data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']
80
-					}],
81
-					yAxis: [{
82
-						type: 'value',
83
-						axisLabel: {
84
-							formatter: '{value}'
49
+				var url = 'Home/querydrawLine1.do'
50
+				var param = {
51
+				}
52
+				axios.get(url, param).then(response => {
53
+					if (response.data.code == 0) {
54
+						console.log(response.data.data[0].value1)
55
+						for (let i = 0; i < response.data.data.length; i++) {
56
+							this.drawLine1_date1.push(response.data.data[i].value1)
57
+							this.drawLine1_date2.push(response.data.data[i].value2)
85 58
 						}
86
-					}],
87
-					series: [{
88
-							name: '收入',
89
-							type: 'line',
90
-							data: [11, 11, 15, 13, 12, 13, 10, 8, 16, 15, 12, 14],
91
-							markPoint: {
92
-								data: [{
93
-										type: 'max',
94
-										name: '最大值'
59
+						console.log(this.drawLine1_date1);
60
+						let myChart1 = this.$echarts.init(document.getElementById('myChart1'), 'default')
61
+						myChart1.setOption({
62
+							title: {
63
+								text: '年度出入量',
64
+								// subtext: '纯属虚构'
65
+							},
66
+							tooltip: {
67
+								trigger: 'axis'
68
+							},
69
+							legend: {
70
+								data: ['出入量']
71
+							},
72
+							calculable: true,
73
+							xAxis: [{
74
+								type: 'category',
75
+								boundaryGap: false,
76
+								data: this.drawLine1_date1
77
+							}],
78
+							yAxis: [{
79
+								type: 'value',
80
+								axisLabel: {
81
+									formatter: '{value}'
82
+								}
83
+							}],
84
+							series: [{
85
+									name: '出入库',
86
+									type: 'line',
87
+									data: this.drawLine1_date2,
88
+									markPoint: {
89
+										data: [{
90
+												type: 'max',
91
+												name: '最大值'
92
+											},
93
+											{
94
+												type: 'min',
95
+												name: '最小值'
96
+											}
97
+										]
95 98
 									},
96
-									{
97
-										type: 'min',
98
-										name: '最小值'
99
+									markLine: {
100
+										data: [{
101
+											type: 'average',
102
+											name: '平均值'
103
+										}]
99 104
 									}
100
-								]
101
-							},
102
-							markLine: {
103
-								data: [{
104
-									type: 'average',
105
-									name: '平均值'
106
-								}]
107
-							}
108
-						},
105
+								},
109 106
 
110
-					]
111
-				});
107
+							]
108
+						});
109
+			
110
+					} else {
111
+						this.$message({
112
+							type: 'error',
113
+							message: '保存失败' + response.data.msg,
114
+						});
115
+					}
116
+				})
112 117
 			},
113 118
 
114 119
 
115 120
 			drawLine2() {
116
-				let myChart2 = this.$echarts.init(document.getElementById('myChart2'), 'default')
117
-				myChart2.setOption({
121
+				var url = 'Home/querydrawLine2.do'
122
+				var param = {
123
+				}
124
+				var all_weight=0
125
+				axios.get(url, param).then(response => {
126
+					if (response.data.code == 0) {
127
+						console.log(response.data.data[0].value1)
128
+						for (let i = 0; i < response.data.data.length; i++) {
129
+							this.drawLine2_date1.push({name:response.data.data[i].value1,value:response.data.data[i].value2})
130
+							all_weight = parseFloat(all_weight) + parseFloat(response.data.data[i].value2);
131
+						}
132
+						console.log(this.drawLine2_date1);
133
+						console.log(all_weight);
134
+						let myChart2 = this.$echarts.init(document.getElementById('myChart2'), 'default')
135
+						myChart2.setOption({
118 136
 
119
-					title: {
120
-						text: '当前库存',
121
-						subtext: ' ',
122
-						x: 'center'
123
-					},
124
-					tooltip: {
125
-						trigger: 'item',
126
-						formatter: "{a} <br/>{b} : {c} ({d}%)"
127
-					},
128
-					// legend: {
129
-					// 	orient: 'vertical',
130
-					// 	x: 'left',
131
-					// 	data: ['钢板', '钢卷', '螺纹', '盘螺']
132
-					// },
133
-					toolbox: {
134
-						show: true,
135
-						feature: {
136
-							mark: {
137
-								show: true
137
+							title: {
138
+								text: '当前库存',
139
+								subtext: ' ',
140
+								x: 'center'
138 141
 							},
139
-							dataView: {
140
-								show: true,
141
-								readOnly: false
142
+							tooltip: {
143
+								trigger: 'item',
144
+								formatter: "{a} <br/>{b} : {c} ({d}%)"
142 145
 							},
143
-							magicType: {
146
+							toolbox: {
144 147
 								show: true,
145
-								type: ['pie', 'funnel'],
146
-								option: {
147
-									funnel: {
148
-										x: '25%',
149
-										width: '50%',
150
-										funnelAlign: 'left',
151
-										max: 1548
148
+								feature: {
149
+									mark: {
150
+										show: true
151
+									},
152
+									dataView: {
153
+										show: true,
154
+										readOnly: false
155
+									},
156
+									magicType: {
157
+										show: true,
158
+										type: ['pie', 'funnel'],
159
+										option: {
160
+											funnel: {
161
+												x: '25%',
162
+												width: '50%',
163
+												funnelAlign: 'left',
164
+												max: 1548
165
+											}
166
+										}
167
+									},
168
+									restore: {
169
+										show: true
170
+									},
171
+									saveAsImage: {
172
+										show: true
152 173
 									}
153 174
 								}
154 175
 							},
155
-							restore: {
156
-								show: true
157
-							},
158
-							saveAsImage: {
159
-								show: true
160
-							}
161
-						}
162
-					},
163
-					calculable: true,
164
-					series: [{
165
-						name: '访问来源',
166
-						type: 'pie',
167
-						radius: '55%',
168
-						center: ['50%', '60%'],
169
-						data: [{
170
-								value: 335,
171
-								name: '钢板'
172
-							},
173
-							{
174
-								value: 310,
175
-								name: '钢卷'
176
-							},
177
-							{
178
-								value: 234,
179
-								name: '螺纹'
180
-							},
181
-							{
182
-								value: 135,
183
-								name: '盘螺'
184
-							}
185
-						]
186
-					}]
176
+							calculable: true,
177
+							series: [{
178
+								name: '访问来源',
179
+								type: 'pie',
180
+								radius: '55%',
181
+								center: ['50%', '60%'],
182
+								data: this.drawLine2_date1
183
+							}]
187 184
 
188 185
 
189
-				});
186
+						});
187
+			
188
+			
189
+					} else {
190
+						this.$message({
191
+							type: 'error',
192
+							message: '保存失败' + response.data.msg,
193
+						});
194
+					}
195
+				})
190 196
 			},
197
+
191 198
 			drawLine3() {
192
-				let myChart3 = this.$echarts.init(document.getElementById('myChart3'), 'default')
193
-				myChart3.setOption({
194
-					title: {
195
-						text: '年入库量和出库量',
196
-						subtext: ''
197
-					},
198
-					tooltip: {
199
-						trigger: 'axis'
200
-					},
201
-					legend: {
202
-						data: ['入库量', '出库量']
203
-					},
204
-					toolbox: {
205
-						show: true,
206
-						feature: {
207
-							mark: {
208
-								show: true
209
-							},
210
-							dataView: {
211
-								show: true,
212
-								readOnly: false
199
+
200
+				var url = 'Home/querydrawLine3.do'
201
+				var param = {
202
+				}
203
+				axios.get(url, param).then(response => {
204
+					if (response.data.code == 0) {
205
+						console.log(response.data.data[0].value1)
206
+						for (let i = 0; i < response.data.data.length; i++) {
207
+							this.drawLine3_date1.push(response.data.data[i].value1)
208
+							this.drawLine3_date2.push(response.data.data[i].value2)
209
+							this.drawLine3_date3.push(response.data.data[i].value3)
210
+						}
211
+						console.log(this.drawLine3_date1);
212
+						let myChart3 = this.$echarts.init(document.getElementById('myChart3'), 'default')
213
+						myChart3.setOption({
214
+							title: {
215
+								text: '年入库量和出库量',
216
+								subtext: ''
213 217
 							},
214
-							magicType: {
215
-								show: true,
216
-								type: ['line', 'bar']
218
+							tooltip: {
219
+								trigger: 'axis'
217 220
 							},
218
-							restore: {
219
-								show: true
221
+							legend: {
222
+								data: ['入库量', '出库量']
220 223
 							},
221
-							saveAsImage: {
222
-								show: true
223
-							}
224
-						}
225
-					},
226
-					calculable: true,
227
-					xAxis: [{
228
-						type: 'category',
229
-						data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
230
-					}],
231
-					yAxis: [{
232
-						type: 'value'
233
-					}],
234
-					series: [{
235
-							name: '入库量',
236
-							type: 'bar',
237
-							data: [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],
238
-							markPoint: {
239
-								data: [{
240
-										type: 'max',
241
-										name: '最大值'
224
+							toolbox: {
225
+								show: true,
226
+								feature: {
227
+									mark: {
228
+										show: true
229
+									},
230
+									dataView: {
231
+										show: true,
232
+										readOnly: false
233
+									},
234
+									magicType: {
235
+										show: true,
236
+										type: ['line', 'bar']
242 237
 									},
243
-									{
244
-										type: 'min',
245
-										name: '最小值'
238
+									restore: {
239
+										show: true
240
+									},
241
+									saveAsImage: {
242
+										show: true
246 243
 									}
247
-								]
244
+								}
248 245
 							},
249
-							markLine: {
250
-								data: [{
251
-									type: 'average',
252
-									name: '平均值'
253
-								}]
254
-							}
255
-						},
256
-						{
257
-							name: '出库量',
258
-							type: 'bar',
259
-							data: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],
260
-							markPoint: {
261
-								data: [{
262
-										name: '年最高',
263
-										value: 182.2,
264
-										xAxis: 7,
265
-										yAxis: 183,
266
-										symbolSize: 18
246
+							calculable: true,
247
+							xAxis: [{
248
+								type: 'category',
249
+								data: this.drawLine3_date1
250
+							}],
251
+							yAxis: [{
252
+								type: 'value'
253
+							}],
254
+							series: [{
255
+									name: '入库量',
256
+									type: 'bar',
257
+									data: this.drawLine3_date2,
258
+									markPoint: {
259
+										data: [{
260
+												type: 'max',
261
+												name: '最大值'
262
+											},
263
+											{
264
+												type: 'min',
265
+												name: '最小值'
266
+											}
267
+										]
267 268
 									},
268
-									{
269
-										name: '年最低',
270
-										value: 2.3,
271
-										xAxis: 11,
272
-										yAxis: 3
269
+									markLine: {
270
+										data: [{
271
+											type: 'average',
272
+											name: '平均值'
273
+										}]
273 274
 									}
274
-								]
275
-							},
276
-							markLine: {
277
-								data: [{
278
-									type: 'average',
279
-									name: '平均值'
280
-								}]
281
-							}
282
-						}
283
-					]
275
+								},
276
+								{
277
+									name: '出库量',
278
+									type: 'bar',
279
+									data: this.drawLine3_date3,
280
+									markLine: {
281
+										data: [{
282
+											type: 'average',
283
+											name: '平均值'
284
+										}]
285
+									}
286
+								}
287
+							]
284 288
 
285
-				});
289
+						});
290
+			
291
+			
292
+					} else {
293
+						this.$message({
294
+							type: 'error',
295
+							message: '保存失败' + response.data.msg,
296
+						});
297
+					}
298
+				})
299
+				
286 300
 			},
287 301
 
288
-
289
-
290
-
291 302
 			drawLine4() {
292
-				let myChart4 = this.$echarts.init(document.getElementById('myChart4'), 'default')
293
-				myChart4.setOption({
303
+				var url = 'Home/querydrawLine4.do'
304
+				var param = {
305
+				}
306
+				axios.get(url, param).then(response => {
307
+					if (response.data.code == 0) {
308
+						console.log(response.data.data)
309
+						this.drawLine4_value = response.data.data.value1
310
+						let myChart4 = this.$echarts.init(document.getElementById('myChart4'), 'default')
311
+						
312
+						myChart4.setOption({
294 313
 
295
-					tooltip: {
296
-						formatter: "{a} <br/>{b} : {c}%"
297
-					},
298
-					toolbox: {
299
-						show: true,
300
-						feature: {
301
-							mark: {
302
-								show: true
314
+							tooltip: {
315
+								formatter: "{a} <br/>{b} : {c}%"
303 316
 							},
304
-							restore: {
305
-								show: true
317
+							toolbox: {
318
+								show: true,
319
+								feature: {
320
+									mark: {
321
+										show: true
322
+									},
323
+									restore: {
324
+										show: true
325
+									},
326
+									saveAsImage: {
327
+										show: true
328
+									}
329
+								}
306 330
 							},
307
-							saveAsImage: {
308
-								show: true
309
-							}
310
-						}
311
-					},
312
-					series: [{
313
-						name: '业务指标',
314
-						type: 'gauge',
315
-						detail: {
316
-							formatter: '{value}%'
317
-						},
318
-						data: [{
319
-							value: 50,
320
-							name: '库存占用率'
321
-						}]
322
-					}]
331
+							series: [{
332
+								name: '业务指标',
333
+								type: 'gauge',
334
+								detail: {
335
+									formatter: '{value}%'
336
+								},
337
+								data: [{
338
+									value: parseFloat(this.drawLine4_value).toFixed(2),
339
+									name: '垛位占用率'
340
+								}]
341
+							}]
323 342
 
324
-				});
343
+						});
344
+			
345
+			
346
+					} else {
347
+						this.$message({
348
+							type: 'error',
349
+							message: '保存失败' + response.data.msg,
350
+						});
351
+					}
352
+				})
353
+				
325 354
 			},
326 355
 
327 356
 

+ 28
- 1
src/view/ware/storechange.vue Voir le fichier

@@ -100,6 +100,7 @@
100 100
 				</el-row>
101 101
 				
102 102
 			</el-form>
103
+			<total-block ref="totalBlock" style="margin-left: -25px;font-size: 13px;margin-left: 5px" v-bind:childParam="childParam" v-bind:childUrl = 'childUrl'></total-block>
103 104
 		</div>
104 105
 		<div class="tabledata-grid">
105 106
 			<el-table :data="tableData" height="100%"   border style="width: 97%;" v-loading="loading" ref="multipleTable"	@select="handleTableSelect"	 @selection-change="handleSelectionChange" @select-all = "selectAll" 
@@ -312,6 +313,7 @@
312 313
 	import PopupOut from '@/components/PopupOut.vue'
313 314
 	import PopupIn from '@/components/PopupIn.vue'
314 315
 	import Export2Excel from '../../excel/Export2Excel.js'
316
+	import TotalBlock    from '@/components/TotalBlock.vue'
315 317
 	import {
316 318
 		mapState
317 319
 	} from 'vuex'
@@ -324,6 +326,7 @@
324 326
 			PopupDistribution,
325 327
 			PopupOut,
326 328
 			PopupIn,
329
+			TotalBlock
327 330
 		},
328 331
 		computed: {
329 332
 			// splitCount: function() {
@@ -417,6 +420,24 @@
417 420
 					value: '1',
418 421
 					label: '已出库'
419 422
 				}],
423
+				childParam:{
424
+					wareName: '',
425
+					stackName: '',
426
+					model: '',
427
+					materialName: '',
428
+					standard: '',
429
+					customerName: '',
430
+					plateNo: [],
431
+					wareId:'',
432
+					ordNo:[],
433
+					contractNo:[],
434
+					packNo:[],
435
+					fkcustmerName:'',
436
+					remark1:'',
437
+					outFlag:'0',
438
+					inRecordDate:[]
439
+				},
440
+				childUrl:'WareStore/queryTotal.do',
420 441
 			};
421 442
 		},
422 443
 		mounted() {
@@ -666,12 +687,15 @@
666 687
 					toDate  :(!this.query.inRecordDate[1]) ? new Date().Format("yyyy-MM-dd HH:mm:ss") :this.query.inRecordDate[1].Format("yyyy-MM-dd HH:mm:ss"),
667 688
 
668 689
 				}
690
+
691
+				this.childParam = param;
669 692
 				//console.log(param);
670 693
 				axios.get(url, param).then(response => {
671 694
 					if (response.data.code == 0) {
672 695
 						//console.log(response.data.data.list);
673 696
 						this.tableData = response.data.data.list
674 697
 						this.totalRows = response.data.data.total
698
+						this.$refs.totalBlock.getTotalData();
675 699
 					} else {
676 700
 						this.$message({
677 701
 							type: 'error',
@@ -1004,7 +1028,10 @@
1004 1028
 					ordNo: this.query.ordNo == 0 ? '' : this.query.ordNo.join(','),
1005 1029
 					contractNo: this.query.contractNo == 0 ? '' : this.query.contractNo.join(','),
1006 1030
 					packNo: this.query.packNo == 0 ? '' : this.query.packNo.join(','),
1007
-					remark1: this.query.remark1
1031
+					remark1: this.query.remark1,
1032
+					outFlag: this.query.outFlag,
1033
+					fromDate:(!this.query.inRecordDate[0]) ? "1970-01-01 00:00:00" : this.query.inRecordDate[0].Format("yyyy-MM-dd HH:mm:ss"),		//date类型
1034
+					toDate  :(!this.query.inRecordDate[1]) ? new Date().Format("yyyy-MM-dd HH:mm:ss") :this.query.inRecordDate[1].Format("yyyy-MM-dd HH:mm:ss"),
1008 1035
 				}
1009 1036
 
1010 1037
 

Loading…
Annuler
Enregistrer