YL2767 преди 3 седмици
родител
ревизия
b0c51ccca9
променени са 4 файла, в които са добавени 469 реда и са изтрити 239 реда
  1. 124
    1
      src/view/record/changerecord.vue
  2. 127
    80
      src/view/record/inrecord.vue
  3. 189
    138
      src/view/record/outrecord.vue
  4. 29
    20
      src/view/ware/storechange.vue

+ 124
- 1
src/view/record/changerecord.vue Целия файл

@@ -44,6 +44,7 @@
44 44
 						</el-form-item>
45 45
 						<el-form-item label=" " style="margin-top: -15px">
46 46
 							<el-button @click="handleSearch" type="primary"  size="small" >查询</el-button>
47
+							<el-button   type="success" @click="handleExport" style="margin-left: 2px" size="small">导出记录</el-button>
47 48
 						</el-form-item>
48 49
 					</el-row>
49 50
 				</el-form>
@@ -113,7 +114,16 @@
113 114
 	import PopupMaterial from '@/components/PopupMaterial.vue'
114 115
 	import PopupCustomer from '@/components/PopupCustomer.vue'
115 116
 	import TotalBlock    from '@/components/TotalBlock.vue'
117
+	import Export2Excel from '../../excel/Export2Excel.js'
118
+	import {
119
+		mapState
120
+	} from 'vuex'
116 121
 	export default {
122
+		computed: {
123
+			...mapState({
124
+				serverName: state => state.app.serverName
125
+			})
126
+		},
117 127
 		components: {
118 128
 			PopupStack,
119 129
 			PopupMaterial,
@@ -255,7 +265,120 @@
255 265
 			},
256 266
 			changeWare(){
257 267
 
258
-			}
268
+			},
269
+			handleExport() {
270
+				var imptData = [];
271
+				
272
+
273
+				var url = 'WareChangeRecord/query.do'
274
+				if(this.query.RecordDate == null){
275
+					this.query.RecordDate = [false,false];
276
+				}
277
+				var param = {
278
+					page: this.currentPage,
279
+					rows: this.pageSize,
280
+					wareName: this.query.wareName,
281
+					stackName: this.query.stackName,
282
+					model: this.query.model,
283
+					materialName: this.query.materialName,
284
+					standard: this.query.standard,
285
+					customerName: this.query.customerName,
286
+					plateNo: this.query.plateNo,
287
+					pFromDate:(!this.query.RecordDate[0]) ? "1970-01-01 00:00:00" : this.query.RecordDate[0].Format("yyyy-MM-dd HH:mm:ss"),		//date类型
288
+					pToDate  :(!this.query.RecordDate[1]) ? new Date().Format("yyyy-MM-dd HH:mm:ss") :this.query.RecordDate[1].Format("yyyy-MM-dd HH:mm:ss"), 
289
+				}
290
+				// alert(JSON.stringify(param))
291
+
292
+				axios.get(url, param).then(response => {
293
+					// alert(JSON.stringify(response))
294
+					if (response.data.code == 0) {
295
+						var imptData = response.data.data.list;
296
+						if (imptData.length == 0) {
297
+							this.$alert('无法导出,选择时间段无记录', '提示', {
298
+								confirmButtonText: '确定',
299
+								callback: action => {}
300
+							});
301
+						} else {
302
+
303
+							this.exportExcel(imptData)
304
+						}
305
+					} else {
306
+						this.$message({
307
+							type: 'error',
308
+							message: '操作失败;' + response.data.msg,
309
+						});
310
+					}
311
+
312
+				});
313
+				
314
+			},
315
+			exportExcel(imptData) {
316
+				 console.log(imptData)
317
+				const header = ["仓库名称",
318
+								"垛位",
319
+								"层号",
320
+								"品名",
321
+								"规格型号",
322
+								"钢种",
323
+								"数量",
324
+								"重量",
325
+								"钢板号",
326
+								"原货权单位",
327
+								"原客户名称",
328
+								"新货权单位",
329
+								"新客户名称",
330
+								"原收货地址",
331
+								"新收货地址",
332
+								"操作时间",
333
+								"操作人",
334
+								"计量方式",
335
+								"切边类型",
336
+								"产地",
337
+								"备注"
338
+
339
+				] // 导出的表头名
340
+				const filterVal = [
341
+						"wareName",
342
+						"stackName",
343
+						"layer",
344
+						"materialName",
345
+						"model",
346
+						"standard",
347
+						"count",
348
+						"weight",
349
+						"plateNo",
350
+						"fkCustomerNameOld",
351
+						"customerNameOld",
352
+						"fkCustomerNameNew",
353
+						"customerNameNew",
354
+						"receiveAddressOld",
355
+						"receiveAddressNew",
356
+						"addTime",
357
+						"addUserUserDesc",
358
+						"wgtDcnMtcCd",
359
+						"edgeTy",
360
+						"productionPlace",
361
+						"remark"
362
+				]
363
+
364
+				for(var i=0;i<imptData.length;i++){
365
+					imptData[i]["addUserUserDesc"] = imptData[i].addUser.userDesc;
366
+				}
367
+				const list = imptData
368
+				const data = this.formatJson(filterVal, list)
369
+
370
+				const filename = '货权转移记录' + (new Date()).toLocaleDateString();
371
+				Export2Excel.export_json_to_excel({
372
+					header,
373
+					data,
374
+					filename
375
+				})
376
+			},
377
+			formatJson(filterVal, jsonData) {
378
+				return jsonData.map(v => filterVal.map(j => {
379
+					return v[j]
380
+				}))
381
+			},
259 382
 		},
260 383
 	}
261 384
 </script>

+ 127
- 80
src/view/record/inrecord.vue Целия файл

@@ -12,7 +12,7 @@
12 12
 							<el-form-item label="垛位名称" style="margin-left: -35px">
13 13
 								<el-input v-model="query.stackName" size="small" style="width:100px;margin-left: -8px"></el-input>
14 14
 							</el-form-item>
15
-							<el-form-item label="物料名称" style="margin-left: -35px"> 
15
+							<el-form-item label="品名" style="margin-left: -35px"> 
16 16
 								<el-input v-model="query.materialName" size="small"  style="width:130px;margin-left: -8px">
17 17
 									<el-button slot="append" icon="el-icon-search" @click="showMaterial"></el-button>
18 18
 								</el-input>
@@ -22,49 +22,57 @@
22 22
 									<el-button slot="append" icon="el-icon-search" @click="showMaterial"></el-button>
23 23
 								</el-input>
24 24
 							</el-form-item>
25
-							<el-form-item label="客户名称" style="margin-left: -35px">
26
-								<el-input v-model="query.customerName" size="small"  style="width:200px;margin-left: -8px">
27
-									<el-button slot="append" icon="el-icon-search" @click="showCustomer"></el-button>
25
+							<el-form-item label="规格型号" style="margin-left: -25px">
26
+								<el-input v-model="query.model" size="small"  style="width:120px;margin-left: -8px">
28 27
 								</el-input>
29 28
 							</el-form-item>
30
-							<el-form-item label="订单号" style="margin-left: -25px">
31
-								<el-input v-model="query.ordNo" size="small"  style="width:120px;margin-left: -8px">
29
+							<el-form-item label="捆包号" style="margin-left: -15px">
30
+								<el-input v-model="query.packNo" clearable size="small" style="width:120px;margin-left: -8px" @input="getPackList">
32 31
 								</el-input>
33 32
 							</el-form-item>
34
-							<el-form-item label="车号" style="margin-left: -25px">
35
-								<el-input v-model="query.carNo" size="small"  style="width:120px;margin-left: -8px">
33
+							<el-form-item label="材料号" style="margin-left: -15px">
34
+								<el-input v-model="query.plateNo" clearable size="small" style="width:120px;margin-left: -8px" @input="getPltList">
36 35
 								</el-input>
37 36
 							</el-form-item>
38
-						</el-row>
39
-						<el-row>
40
-							<el-form-item label="规格型号" style="margin-left: -25px;margin-top: -15px">
41
-								<el-input v-model="query.model" size="small"  style="width:120px;margin-left: -8px">
37
+							<el-form-item label="订单号" style="margin-left: -15px">
38
+								<el-input v-model="query.ordNo" clearable size="small" style="width:120px;margin-left: -8px" @input="getOrdList">
39
+								</el-input>
40
+							</el-form-item>
41
+							<el-form-item label="合约号" style="margin-left: -15px">
42
+								<el-input v-model="query.contractNo" clearable size="small" style="width:120px;margin-left: -8px" @input="getContractList">
42 43
 								</el-input>
43 44
 							</el-form-item>
44
-							<el-form-item label="钢板号" style="margin-left: -35px;margin-top: -15px">
45
-								<el-input v-model="query.plateNo" size="small"  style="width:120px;margin-left: -8px">
45
+							<el-form-item label="货权单位" style="margin-left: -35px">
46
+								<el-select v-model="query.fkComponyName" filterable placeholder="请选择客户名称" clearable size="small" style="margin-left: 5px; width: 170px">
47
+									<el-option v-for="item in optionsCust" :key="item.name" :label="item.name" :value="item.name" >
48
+									</el-option>
49
+								</el-select>
50
+							</el-form-item>
51
+							<el-form-item label="客户名称" style="margin-left: -35px">
52
+								<el-select v-model="query.customerName" filterable placeholder="请选择订单客户" clearable size="small" style="margin-left: 5px; width: 170px">
53
+									<el-option v-for="item in optionsCust" :key="item.name" :label="item.name" :value="item.name" >
54
+									</el-option>
55
+								</el-select>
56
+							</el-form-item>
57
+							<el-form-item label="入库车号" style="margin-left: -25px">
58
+								<el-input v-model="query.carNo" size="small"  style="width:120px;margin-left: -8px">
46 59
 								</el-input>
47 60
 							</el-form-item>
48
-							<el-form-item label="理货人员" style="margin-top: -15px">
61
+							<el-form-item label="理货人员" style="">
49 62
 								<el-select v-model="query.tallyPeople" size="small" style="margin-left: 10px;margin-top: -15px" clearable placeholder="理货人员">
50 63
 									<el-option v-for="item in tallyPeopleOption" :key="item.id" :label="item.dicName" :value="item.dicCode">
51 64
 									</el-option>
52 65
 								</el-select>
53 66
 							</el-form-item>
54
-							<el-form-item label="入库时间" style="margin-left: -35px;margin-top: -15px">
67
+							<el-form-item label="入库时间" style="margin-left: -35px">
55 68
 								<el-date-picker size="small" v-model="query.inRecordDate"  style="width:330px;margin-left: -8px" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
56 69
 							    </el-date-picker>
57 70
 							</el-form-item>
58
-							<el-form-item label="付款单位" style="margin-left: -35px;margin-top: -15px">
59
-								<el-input v-model="query.fkComponyName" size="small" style="width:200px;margin-left: -8px">
60
-									<el-button slot="append" icon="el-icon-search" @click="showFkCompony"></el-button>
61
-								</el-input>
62
-							</el-form-item>
63
-							<el-form-item  label=" " style="margin-left: -35px;margin-top: -15px">
71
+							<el-form-item  label=" " style="margin-left: -35px">
64 72
 								<el-button size="small" @click="handleSearch" type="primary">查询</el-button>
65 73
 								<!-- <el-button @click="handleSearch" type="primary" size="small">查询</el-button> -->
66 74
 							</el-form-item>
67
-							<el-form-item label="" style="margin-top: -15px">
75
+							<el-form-item label="" style="">
68 76
 								<el-upload class="upload-demo" action="" 
69 77
 									 ref="upload" :limit="1" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
70 78
 									 :auto-upload="false"  >
@@ -164,9 +172,11 @@
164 172
 					materialName: '',
165 173
 					standard: '',
166 174
 					customerName: '',
167
-					plateNo: '',
175
+					plateNo: [],
168 176
 					inRecordDate:[],
169
-					ordNo:'',
177
+					ordNo:[],
178
+					contractNo:[],
179
+					packNo:[],
170 180
 					carNo:'',
171 181
 					tallyPeople:'',
172 182
 					fkComponyName:'',
@@ -183,18 +193,24 @@
183 193
 				pageSizes: [50, 100, 200,500],
184 194
 				pageSize: 50,
185 195
 				childParam:{
186
-					page: '',
187
-					rows: '',
188 196
 					wareName: '',
189 197
 					stackName: '',
190 198
 					model: '',
191 199
 					materialName: '',
192 200
 					standard: '',
193 201
 					customerName: '',
194
-					plateNo: ''
202
+					plateNo: [],
203
+					inRecordDate:[],
204
+					ordNo:[],
205
+					contractNo:[],
206
+					packNo:[],
207
+					carNo:'',
208
+					tallyPeople:'',
209
+					fkComponyName:'',
195 210
 				},
196 211
 				childUrl:'WareInRecord/queryTotal.do',
197
-				tallyPeopleOption:[]
212
+				tallyPeopleOption:[],
213
+				optionsCust: [],
198 214
 
199 215
 			};
200 216
 		},
@@ -204,6 +220,7 @@
204 220
 			this.getSearchItem();
205 221
 			// this.getTableData()
206 222
 			this.setSearchTime();
223
+			this.getAllCustomer();
207 224
 			
208 225
 		},
209 226
 		methods: {
@@ -221,6 +238,13 @@
221 238
 				});
222 239
 
223 240
 			},
241
+			getAllCustomer() {
242
+				var url = 'MaintCustomer/queryByUserId.do'
243
+				var param = {}
244
+				axios.get(url, param).then(response => {
245
+					this.optionsCust = response.data.data
246
+				});
247
+			},
224 248
 			typeFormatter: function(row, column) {
225 249
 				switch (row.recordType) {
226 250
 
@@ -294,6 +318,22 @@
294 318
 					}
295 319
 				});
296 320
 			},
321
+			getPltList(){
322
+				const replaceResult = this.query.plateNo.replace(/[;,,;\s\r\n]+/g, ",").split(",");
323
+				this.query.plateNo = replaceResult;
324
+			},
325
+			getOrdList(){
326
+				const replaceResult = this.query.ordNo.replace(/[;,,;\s\r\n]+/g, ",").split(",");
327
+				this.query.ordNo = replaceResult;
328
+			},
329
+			getContractList(){
330
+				const replaceResult = this.query.contractNo.replace(/[;,,;\s\r\n]+/g, ",").split(",");
331
+				this.query.contractNo = replaceResult;
332
+			},
333
+			getPackList(){
334
+				const replaceResult = this.query.packNo.replace(/[;,,;\s\r\n]+/g, ",").split(",");
335
+				this.query.packNo = replaceResult;
336
+			},
297 337
 			getTableData() {
298 338
 				var url = 'WareInRecord/query.do'
299 339
 				if(this.query.inRecordDate == null){
@@ -309,10 +349,12 @@
309 349
 					materialName: this.query.materialName,
310 350
 					standard: this.query.standard,
311 351
 					customerName: this.query.customerName,
312
-					plateNo: this.query.plateNo,
352
+					plateNo: this.query.plateNo.length == 0 ? '' : this.query.plateNo.join(','),
313 353
 					fromDate:(!this.query.inRecordDate[0]) ? "1970-01-01 00:00:00" : this.query.inRecordDate[0].Format("yyyy-MM-dd HH:mm:ss"),		//date类型
314 354
 					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"),
315
-					ordNo :this.query.ordNo,
355
+					ordNo: this.query.ordNo == 0 ? '' : this.query.ordNo.join(','),
356
+					contractNo: this.query.contractNo == 0 ? '' : this.query.contractNo.join(','),
357
+					packNo: this.query.packNo == 0 ? '' : this.query.packNo.join(','),
316 358
 					carNo : this.query.carNo,
317 359
 					tallyPeople:this.query.tallyPeople,
318 360
 					fkComponyName:this.query.fkComponyName
@@ -349,13 +391,15 @@
349 391
 					materialName: this.query.materialName,
350 392
 					standard: this.query.standard,
351 393
 					customerName: this.query.customerName,
352
-					plateNo: this.query.plateNo,
394
+					plateNo: this.query.plateNo.length == 0 ? '' : this.query.plateNo.join(','),
353 395
 					fromDate:(!this.query.inRecordDate[0]) ? "1970-01-01 00:00:00" : this.query.inRecordDate[0].Format("yyyy-MM-dd HH:mm:ss"),		//date类型
354 396
 					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"),
355
-					ordNo : this.query.ordNo,
397
+					ordNo: this.query.ordNo == 0 ? '' : this.query.ordNo.join(','),
398
+					contractNo: this.query.contractNo == 0 ? '' : this.query.contractNo.join(','),
399
+					packNo: this.query.packNo == 0 ? '' : this.query.packNo.join(','),
356 400
 					carNo : this.query.carNo,
357 401
 					tallyPeople:this.query.tallyPeople,
358
-					fkComponyName:this.query.fkComponyName,
402
+					fkComponyName:this.query.fkComponyName
359 403
 				}
360 404
 
361 405
 
@@ -384,59 +428,62 @@
384 428
 			},
385 429
 			exportExcel(imptData) {
386 430
 				// alert(JSON.stringify(imptData))
387
-				const header = ["仓库名称"
388
-								,"垛位"
389
-								,"层号"
390
-								,"品名"
391
-								,"订单号"
392
-								,"规格"
393
-								,"钢种"
394
-								,"入库数量"
395
-								,"入库重量"
396
-								,"钢板号"
397
-								,"货权单位"
398
-								,"付款单位"
399
-								,"收货地址"
400
-								,"计量方式"
401
-								,"切边类型"
402
-								,"产地"
403
-								,"入库车号"
404
-								,"入库理货人员"
405
-								,"入库操作人"
406
-								,"入库时间"
407
-								,"备注"
408
-								,"类型"
409
-								,"备注"
431
+				const header = ["仓库名称",
432
+								"垛位",
433
+								"层号",
434
+								"品名",
435
+								"钢种",
436
+								"产品编号",
437
+								"订单号",
438
+								"规格",
439
+								"入库重量",
440
+								"入库数量",
441
+								"合约号",
442
+								"入库车号",
443
+								"入库时间",
444
+								"货权单位",
445
+								"客户名称",
446
+								"收货地址",
447
+								"产地",
448
+								"捆包号",
449
+								"备注",
450
+								"货物状态",
451
+								"入库操作人",
452
+								"吊装工",
453
+								"计量方式",
454
+								"类型"
410 455
 				] // 导出的表头名
411 456
 				const filterVal = [
412
-						"wareName"
413
-						,"stackName"
414
-						,"layer"
415
-						,"materialName"
416
-						,"ordNo"
417
-						,"model"
418
-						,"standard"
419
-						,"count"
420
-						,"weight"
421
-						,"plateNo"
422
-						,"customerName"
423
-						,"fkComponyName"
424
-						,"receiveAddress"
425
-						,"wgtDcnMtcCd"
426
-						,"edgeTy"
427
-						,"productionPlace"
428
-						,"carNo"
429
-						,"tallyPeople"
430
-						,"addUserUserDesc"
431
-						,"addTime"
432
-						,"remark"
433
-						,"recordType"
434
-						,"remark"
457
+						"wareName",
458
+						"stackName",
459
+						"layer",
460
+						"materialName",
461
+						"standard",
462
+						"plateNo",
463
+						"ordNo",
464
+						"model",
465
+						"weight",
466
+						"count",
467
+						"contractNo",
468
+						"carNo",
469
+						"addTime",
470
+						"fkComponyName",
471
+						"customerName",
472
+						"receiveAddress",
473
+						"productionPlace",
474
+						"packNo",
475
+						"remark",
476
+						"outFlag",
477
+						"addUseruserDesc",
478
+						"tallyPeople",
479
+						"wgtDcnMtcCd",
480
+						"recordType"
435 481
 				]
436 482
 
437 483
 				for(var i=0;i<imptData.length;i++){
438 484
 					imptData[i]["addUserUserDesc"] = imptData[i].addUser.userDesc;
439 485
 					imptData[i]["recordType"]      = imptData[i]["recordType"] == 0 ? "入库取消" : "入库";
486
+					imptData[i]["outFlag"]      = imptData[i]["outFlag"] == 0 ? "正常在库" : "已出库";
440 487
 				}
441 488
 				const list = imptData
442 489
 				const data = this.formatJson(filterVal, list)

+ 189
- 138
src/view/record/outrecord.vue Целия файл

@@ -4,61 +4,71 @@
4 4
 			<el-row>
5 5
 				<el-form :model="query" label-width="100px" inline="">
6 6
 					<el-row>
7
-						<el-form-item label="库房名称">
8
-							<el-select size="small" v-model="query.wareName" clearable style="width: 140px;" @change="changeWare">
9
-								<el-option v-for="item in optionsWare" :key="item.id" :label="item.name" :value="item.name">
10
-								</el-option>
11
-							</el-select>
12
-						</el-form-item>
13
-						<el-form-item label="垛位名称" style="margin-left: -35px">
14
-							<el-input v-model="query.stackName" size="small" style="width:100px;margin-left: -8px"></el-input>
15
-						</el-form-item>
16
-						<el-form-item label="物料名称" style="margin-left: -35px">
17
-							<el-input v-model="query.materialName" size="small" style="width:130px;margin-left: -8px">
18
-								<el-button slot="append" icon="el-icon-search" @click="showMaterial"></el-button>
19
-							</el-input>
20
-						</el-form-item>
21
-						<el-form-item label="钢种" style="margin-left: -35px">
22
-							<el-input v-model="query.standard" size="small" style="width:130px;margin-left: -8px">
23
-								<el-button slot="append" icon="el-icon-search" @click="showMaterial"></el-button>
24
-							</el-input>
25
-						</el-form-item>
26
-						<el-form-item label="客户名称" style="margin-left: -35px">
27
-							<el-input v-model="query.customerName" size="small" style="width:200px;margin-left: -8px">
28
-								<el-button slot="append" icon="el-icon-search" @click="showCustomer"></el-button>
29
-							</el-input>
30
-						</el-form-item>
31
-						<el-form-item label="付款单位" style="margin-left: -35px">
32
-							<el-input v-model="query.fkComponyName" size="small" style="width:200px;margin-left: -8px">
33
-								<el-button slot="append" icon="el-icon-search" @click="showFkCompony"></el-button>
34
-							</el-input>
35
-						</el-form-item>
36
-						<el-form-item label="车号" style="margin-left: -35px">
37
-							<el-input v-model="query.carNo" size="small" style="width:100px;margin-left: -8px"></el-input>
38
-						</el-form-item>
39
-
40
-						<el-form-item label="规格型号" style="margin-left: 0px;">
41
-							<el-input v-model="query.model"  size="small" style="width:120px;margin-left: -8px">
42
-							</el-input>
43
-						</el-form-item>
44
-						<el-form-item label="钢板号" style="margin-left: -35px;">
45
-							<el-input v-model="query.plateNo" size="small" style="width:120px;margin-left: -8px">
46
-							</el-input>
47
-						</el-form-item>
48
-						<el-form-item label="出库时间" style="margin-left: -35px;margin-top: -15px">
49
-								<el-date-picker v-model="query.RecordDate" style="width:330px;margin-left: -8px" size="small" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
7
+						<el-form-item label="库房名称" style="margin-left: -25px">
8
+								<el-select v-model="query.wareName" clearable size="small"  style="width:100px;margin-left: -8px" @change="changeWare">
9
+									<el-option v-for="item in optionsWare" :key="item.id" :label="item.name" :value="item.name">
10
+									</el-option>
11
+								</el-select>
12
+							</el-form-item>
13
+							<el-form-item label="垛位名称" style="margin-left: -35px">
14
+								<el-input v-model="query.stackName" size="small" style="width:100px;margin-left: -8px"></el-input>
15
+							</el-form-item>
16
+							<el-form-item label="品名" style="margin-left: -35px"> 
17
+								<el-input v-model="query.materialName" size="small"  style="width:130px;margin-left: -8px">
18
+									<el-button slot="append" icon="el-icon-search" @click="showMaterial"></el-button>
19
+								</el-input>
20
+							</el-form-item>
21
+							<el-form-item label="钢种" style="margin-left: -35px">
22
+								<el-input v-model="query.standard" size="small"  style="width:150px;margin-left: -8px">
23
+									<el-button slot="append" icon="el-icon-search" @click="showMaterial"></el-button>
24
+								</el-input>
25
+							</el-form-item>
26
+							<el-form-item label="规格型号" style="margin-left: -25px">
27
+								<el-input v-model="query.model" size="small"  style="width:120px;margin-left: -8px">
28
+								</el-input>
29
+							</el-form-item>
30
+							<el-form-item label="捆包号" style="margin-left: -15px">
31
+								<el-input v-model="query.packNo" clearable size="small" style="width:120px;margin-left: -8px" @input="getPackList">
32
+								</el-input>
33
+							</el-form-item>
34
+							<el-form-item label="材料号" style="margin-left: -15px">
35
+								<el-input v-model="query.plateNo" clearable size="small" style="width:120px;margin-left: -8px" @input="getPltList">
36
+								</el-input>
37
+							</el-form-item>
38
+							<el-form-item label="订单号" style="margin-left: -15px">
39
+								<el-input v-model="query.ordNo" clearable size="small" style="width:120px;margin-left: -8px" @input="getOrdList">
40
+								</el-input>
41
+							</el-form-item>
42
+							<el-form-item label="合约号" style="margin-left: -15px">
43
+								<el-input v-model="query.contractNo" clearable size="small" style="width:120px;margin-left: -8px" @input="getContractList">
44
+								</el-input>
45
+							</el-form-item>
46
+							<el-form-item label="货权单位" style="margin-left: -35px">
47
+								<el-select v-model="query.fkComponyName" filterable placeholder="请选择客户名称" clearable size="small" style="margin-left: 5px; width: 170px">
48
+									<el-option v-for="item in optionsCust" :key="item.name" :label="item.name" :value="item.name" >
49
+									</el-option>
50
+								</el-select>
51
+							</el-form-item>
52
+							<el-form-item label="客户名称" style="margin-left: -35px">
53
+								<el-select v-model="query.customerName" filterable placeholder="请选择订单客户" clearable size="small" style="margin-left: 5px; width: 170px">
54
+									<el-option v-for="item in optionsCust" :key="item.name" :label="item.name" :value="item.name" >
55
+									</el-option>
56
+								</el-select>
57
+							</el-form-item>
58
+							<el-form-item label="出库车号" style="margin-left: -25px">
59
+								<el-input v-model="query.carNo" size="small"  style="width:120px;margin-left: -8px">
60
+								</el-input>
61
+							</el-form-item>
62
+							<el-form-item label="理货人员" style="">
63
+								<el-select v-model="query.tallyPeople" size="small" style="margin-left: 10px;margin-top: -15px" clearable placeholder="理货人员">
64
+									<el-option v-for="item in tallyPeopleOption" :key="item.id" :label="item.dicName" :value="item.dicCode">
65
+									</el-option>
66
+								</el-select>
67
+							</el-form-item>
68
+							<el-form-item label="出库时间" style="margin-left: -35px">
69
+								<el-date-picker size="small" v-model="query.RecordDate"  style="width:330px;margin-left: -8px" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
50 70
 							    </el-date-picker>
51
-						</el-form-item>
52
-						<el-form-item label="理货人员" style="margin-top: -15px">
53
-							<el-select v-model="query.tallyPeople" size="small" style="margin-left: 10px;margin-top: -15px" clearable placeholder="理货人员">
54
-								<el-option v-for="item in tallyPeopleOption" :key="item.id" :label="item.dicName" :value="item.dicCode">
55
-								</el-option>
56
-							</el-select>
57
-						</el-form-item>
58
-						<el-form-item label="订单号" style="margin-left: -25px;margin-top: -15px">
59
-							<el-input v-model="query.ordNo" size="small"  style="width:120px;margin-left: -8px">
60
-							</el-input>
61
-						</el-form-item>
71
+							</el-form-item>
62 72
 						<el-form-item label=" " style="margin-top: -15px;margin-left: -60px">
63 73
 							<el-button @click="handleSearch" type="primary" size="small">查询</el-button>
64 74
 							<el-button @click="handlePrintOut" type="primary" size="small" style="width:90px;text-align: left">打印出库单</el-button>
@@ -277,11 +287,13 @@
277 287
 					materialName: '',
278 288
 					standard: '',
279 289
 					customerName: '',
280
-					plateNo: '',
290
+					plateNo: [],
281 291
 					RecordDate:[],
292
+					ordNo:[],
293
+					contractNo:[],
294
+					packNo:[],
282 295
 					carNo:'',
283 296
 					tallyPeople:'',
284
-					ordNo:'',
285 297
 					fkComponyName:'',
286 298
 					
287 299
 				},
@@ -312,7 +324,14 @@
312 324
 					materialName: '',
313 325
 					standard: '',
314 326
 					customerName: '',
315
-					plateNo: ''
327
+					plateNo: [],
328
+					RecordDate:[],
329
+					ordNo:[],
330
+					contractNo:[],
331
+					packNo:[],
332
+					carNo:'',
333
+					tallyPeople:'',
334
+					fkComponyName:'',
316 335
 				},
317 336
 				childUrl:'WareOutRecord/queryTotal.do',
318 337
 				time:"",
@@ -325,7 +344,8 @@
325 344
 				popupCar:false,
326 345
 				truckNo:"",
327 346
 				driverName:"",
328
-				driverPhone:""
347
+				driverPhone:"",
348
+				optionsCust:[]
329 349
 			};
330 350
 		},
331 351
 		//页面加载完成渲染
@@ -334,6 +354,7 @@
334 354
 			// this.getTableData()
335 355
 			this.getSearchItem();
336 356
 			this.setSearchTime();
357
+			this.getAllCustomer();
337 358
 		},
338 359
 		methods: {
339 360
 			setSearchTime(){
@@ -350,6 +371,13 @@
350 371
 						break;
351 372
 				}
352 373
 			},
374
+			getAllCustomer() {
375
+				var url = 'MaintCustomer/queryByUserId.do'
376
+				var param = {}
377
+				axios.get(url, param).then(response => {
378
+					this.optionsCust = response.data.data
379
+				});
380
+			},
353 381
 			handleSavePriceMod(){
354 382
 				var url = 'WareOutRecord/savePriceMod.do'
355 383
 				var param = {
@@ -554,13 +582,15 @@
554 582
 					materialName: this.query.materialName,
555 583
 					standard: this.query.standard,
556 584
 					customerName: this.query.customerName,
557
-					plateNo: this.query.plateNo,
558 585
 					pFromDate:(!this.query.RecordDate[0]) ? "1970-01-01 00:00:00" : this.query.RecordDate[0].Format("yyyy-MM-dd HH:mm:ss"),		//date类型
559 586
 					pToDate  :(!this.query.RecordDate[1]) ? new Date().Format("yyyy-MM-dd HH:mm:ss") :this.query.RecordDate[1].Format("yyyy-MM-dd HH:mm:ss"),
560 587
 					carNo:this.query.carNo,
561 588
 					tallyPeople:this.query.tallyPeople,
562
-					ordNo :this.query.ordNo,
563
-					fkComponyName:this.query.fkComponyName
589
+					fkComponyName:this.query.fkComponyName,
590
+					plateNo: this.query.plateNo.length == 0 ? '' : this.query.plateNo.join(','),
591
+					ordNo: this.query.ordNo == 0 ? '' : this.query.ordNo.join(','),
592
+					contractNo: this.query.contractNo == 0 ? '' : this.query.contractNo.join(','),
593
+					packNo: this.query.packNo == 0 ? '' : this.query.packNo.join(','),
564 594
 				}
565 595
 				this.childParam = param;
566 596
 
@@ -585,31 +615,32 @@
585 615
 				this.selectRows = val
586 616
 			},
587 617
 			handleOutBack() {
588
-				if (this.selectRows.length != 1) {
589
-					this.$message({
590
-						type: 'error',
591
-						message: '只能选择一条数据取消出库!',
592
-					});
593
-					return
594
-				}
595
-
596
-				if (this.selectRows[0].recordType == '0') {
597
-					this.$message({
598
-						type: 'error',
599
-						message: '取消记录不能再次取消出库!',
600
-					});
601
-					return
602
-				}
603
-				
604
-				if (this.selectRows[0].backFlag == '1') {
605
-					this.$message({
606
-						type: 'error',
607
-						message: '该记录不能再次取消出库!',
618
+				this.$confirm('该操作将取消出库, 是否继续?', '提示', {
619
+					confirmButtonText: '确定',
620
+					cancelButtonText: '取消',
621
+					type: 'warning'
622
+					}).then(() => {
623
+						var url = 'WareOut/back.do'
624
+						var param = {
625
+							json: JSON.stringify(this.selectRows),
626
+							to: '',
627
+						}
628
+						axios.post(url, param).then(response => {
629
+							if (response.data.code == 0) {
630
+								this.getTableData()
631
+							} else {
632
+								this.$message({
633
+									type: 'error',
634
+									message: '操作失败;' + response.data.msg,
635
+								});
636
+							}
637
+						});
638
+					}).catch(() => {
639
+						this.$message({
640
+							type: 'info',
641
+							message: '已取消删除'
642
+						});          
608 643
 					});
609
-					return
610
-				}
611
-				// alert("1")
612
-				this.$refs.PopupStackWithSelectWare.show()
613 644
 
614 645
 			},
615 646
 			receviceFromWareStack(stack) {
@@ -670,6 +701,22 @@
670 701
 				this.time = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
671 702
 
672 703
 			},
704
+			getPltList(){
705
+				const replaceResult = this.query.plateNo.replace(/[;,,;\s\r\n]+/g, ",").split(",");
706
+				this.query.plateNo = replaceResult;
707
+			},
708
+			getOrdList(){
709
+				const replaceResult = this.query.ordNo.replace(/[;,,;\s\r\n]+/g, ",").split(",");
710
+				this.query.ordNo = replaceResult;
711
+			},
712
+			getContractList(){
713
+				const replaceResult = this.query.contractNo.replace(/[;,,;\s\r\n]+/g, ",").split(",");
714
+				this.query.contractNo = replaceResult;
715
+			},
716
+			getPackList(){
717
+				const replaceResult = this.query.packNo.replace(/[;,,;\s\r\n]+/g, ",").split(",");
718
+				this.query.packNo = replaceResult;
719
+			},
673 720
 			handleExport() {
674 721
 				var imptData = [];
675 722
 				
@@ -684,13 +731,15 @@
684 731
 					materialName: this.query.materialName,
685 732
 					standard: this.query.standard,
686 733
 					customerName: this.query.customerName,
687
-					plateNo: this.query.plateNo,
688 734
 					pFromDate:(!this.query.RecordDate[0]) ? "1970-01-01 00:00:00" : this.query.RecordDate[0].Format("yyyy-MM-dd HH:mm:ss"),		//date类型
689 735
 					pToDate  :(!this.query.RecordDate[1]) ? new Date().Format("yyyy-MM-dd HH:mm:ss") :this.query.RecordDate[1].Format("yyyy-MM-dd HH:mm:ss"),
690 736
 					carNo:this.query.carNo,
691 737
 					tallyPeople:this.query.tallyPeople,
692
-					ordNo :this.query.ordNo,
693
-					fkComponyName:this.query.fkComponyName
738
+					fkComponyName:this.query.fkComponyName,
739
+					plateNo: this.query.plateNo.length == 0 ? '' : this.query.plateNo.join(','),
740
+					ordNo: this.query.ordNo == 0 ? '' : this.query.ordNo.join(','),
741
+					contractNo: this.query.contractNo == 0 ? '' : this.query.contractNo.join(','),
742
+					packNo: this.query.packNo == 0 ? '' : this.query.packNo.join(','),
694 743
 				}
695 744
 				// alert(JSON.stringify(param))
696 745
 
@@ -768,59 +817,61 @@
768 817
 			},
769 818
 			exportExcel(imptData) {
770 819
 				 console.log(JSON.stringify(imptData))
771
-				const header = ["仓库名称"
772
-								,"垛位"
773
-								,"层号"
774
-								,"品名"
775
-								,"订单号"
776
-								,"入库人"
777
-								,"入库车号"
778
-								,"入库时间"
779
-								,"规格"
780
-								,"钢种"
781
-								,"出库数量"
782
-								,"出库重量"
783
-								,"钢板号"
784
-								,"货权单位"
785
-								,"付款单位"
786
-								,"收货地址"
787
-								,"计量方式"
788
-								,"切边类型"
789
-								,"产地"
790
-								,"出库车号"
791
-								,"出库理货人员"
792
-								,"出库操作人"
793
-								,"出库时间"
794
-								,"备注"
795
-								,"类型"
820
+				const header = ["仓库名称",
821
+								"垛位",
822
+								"层号",
823
+								"品名",
824
+								"钢种",
825
+								"产品编号",
826
+								"订单号",
827
+								"规格型号",
828
+								"出库重量",
829
+								"出库数量",
830
+								"合约号",
831
+								"出库车号",
832
+								"出库时间",
833
+								"货权单位",
834
+								"客户名称",
835
+								"收货地址",
836
+								"产地",
837
+								"捆包号",
838
+								"备注",
839
+								"出库操作人",
840
+								"吊装工",
841
+								"入库车号",
842
+								"入库时间",
843
+								"入库操作人",
844
+								"计量方式",
845
+								"类型"
796 846
 
797 847
 				] // 导出的表头名
798 848
 				const filterVal = [
799
-						"wareName"
800
-						,"stackName"
801
-						,"layer"
802
-						,"materialName"
803
-						,"ordNo"
804
-						,"inUser"
805
-						,"inCarNo"
806
-						,"inTime"
807
-						,"model"
808
-						,"standard"
809
-						,"count"
810
-						,"weight"
811
-						,"plateNo"
812
-						,"customerName"
813
-						,"fkComponyName"
814
-						,"receiveAddress"
815
-						,"wgtDcnMtcCd"
816
-						,"edgeTy"
817
-						,"productionPlace"
818
-						,"outCarNo"
819
-						,"tallyPeople"
820
-						,"addId"
821
-						,"addTime"
822
-						,"remark"
823
-						,"recordType"
849
+						"wareName",
850
+						"stackName",
851
+						"layer",
852
+						"materialName",
853
+						"standard",
854
+						"plateNo",
855
+						"ordNo",
856
+						"model",
857
+						"weight",
858
+						"count",
859
+						"contractNo",
860
+						"outCarNo",
861
+						"addTime",
862
+						"fkComponyName",
863
+						"customerName",
864
+						"receiveAddress",
865
+						"productionPlace",
866
+						"packNo",
867
+						"remark",
868
+						"addId",
869
+						"tallyPeople",
870
+						"inCarNo",
871
+						"inTime",
872
+						"inUser",
873
+						"wgtDcnMtcCd",
874
+						"recordType"
824 875
 				]
825 876
 
826 877
 				for(var i=0;i<imptData.length;i++){

+ 29
- 20
src/view/ware/storechange.vue Целия файл

@@ -12,11 +12,7 @@
12 12
 					<el-form-item label="垛位名称" style="margin-left: -35px">
13 13
 						<el-input v-model="query.stackName" size="small" style="width:120px;margin-left: -8px"></el-input>
14 14
 					</el-form-item>
15
-					<el-form-item label="钢板号" style="margin-left: -15px">
16
-						<el-input v-model="query.plateNo" size="small" style="width:120px;margin-left: -8px" @input="getPltList">
17
-						</el-input>
18
-					</el-form-item>
19
-					<el-form-item label="物料名称" style="margin-left: -35px">
15
+					<el-form-item label="品名" style="margin-left: -35px">
20 16
 						<el-input v-model="query.materialName" size="small" style="width:120px;margin-left: -8px">
21 17
 							<el-button slot="append" icon="el-icon-search" @click="showMaterial"></el-button>
22 18
 						</el-input>
@@ -26,6 +22,26 @@
26 22
 							<el-button slot="append" icon="el-icon-search" @click="showMaterial"></el-button>
27 23
 						</el-input>
28 24
 					</el-form-item>
25
+					<el-form-item label="规格型号" style="margin-left: -15px">
26
+						<el-input v-model="query.model" clearable size="small" style="width:120px;margin-left: -8px">
27
+						</el-input>
28
+					</el-form-item>
29
+					<el-form-item label="捆包号" style="margin-left: -15px">
30
+						<el-input v-model="query.packNo" clearable size="small" style="width:120px;margin-left: -8px" @input="getPackList">
31
+						</el-input>
32
+					</el-form-item>
33
+					<el-form-item label="材料号" style="margin-left: -15px">
34
+						<el-input v-model="query.plateNo" clearable size="small" style="width:120px;margin-left: -8px" @input="getPltList">
35
+						</el-input>
36
+					</el-form-item>
37
+					<el-form-item label="订单号" style="margin-left: -15px">
38
+						<el-input v-model="query.ordNo" clearable size="small" style="width:120px;margin-left: -8px" @input="getOrdList">
39
+						</el-input>
40
+					</el-form-item>
41
+					<el-form-item label="合约号" style="margin-left: -15px">
42
+						<el-input v-model="query.contractNo" clearable size="small" style="width:120px;margin-left: -8px" @input="getContractList">
43
+						</el-input>
44
+					</el-form-item>
29 45
 					<el-form-item label="货权单位" style="margin-left: -35px">
30 46
 						<el-select v-model="query.fkcustmerName" filterable placeholder="请选择客户名称" clearable size="small" style="margin-left: 5px; width: 170px">
31 47
 							<el-option v-for="item in optionsCust" :key="item.name" :label="item.name" :value="item.name" >
@@ -38,20 +54,6 @@
38 54
 							</el-option>
39 55
 						</el-select>
40 56
 					</el-form-item>
41
-					<el-form-item label="规格型号" style="margin-left: -15px">
42
-						<el-input v-model="query.model" size="small" style="width:120px;margin-left: -8px">
43
-						</el-input>
44
-					</el-form-item>
45
-					
46
-					<el-form-item label="订单号" style="margin-left: -15px">
47
-						<el-input v-model="query.ordNo" size="small" style="width:120px;margin-left: -8px" @input="getOrdList">
48
-						</el-input>
49
-					</el-form-item>
50
-					<el-form-item label="合约号" style="margin-left: -15px">
51
-						<el-input v-model="query.contractNo" size="small" style="width:120px;margin-left: -8px" @input="getContractList">
52
-						</el-input>
53
-					</el-form-item>
54
-
55 57
 					<el-form-item label="" style="margin-top: 0px;margin-left: 10px">
56 58
 						<el-button @click="handleSearch" size="small"  type="primary">查询</el-button>
57 59
 						<el-button @click="showChangeCustomer" size="small"  type="primary">货权转移</el-button>
@@ -330,6 +332,7 @@
330 332
 					wareId:'',
331 333
 					ordNo:[],
332 334
 					contractNo:[],
335
+					packNo:[],
333 336
 					fkcustmerName:'',
334 337
 					remark1:''
335 338
 				},
@@ -471,7 +474,7 @@
471 474
 				this.$refs.PopupIn.show()
472 475
 			},
473 476
 			handleInBack() {
474
-				this.$confirm("确认删除吗?", "提示", {
477
+				this.$confirm("确认取消入库吗?", "提示", {
475 478
 					confirmButtonText:'确认',
476 479
 					cancelButtonText:'取消',
477 480
 					type: "warning"
@@ -586,6 +589,7 @@
586 589
 					plateNo: this.query.plateNo.length == 0 ? '' : this.query.plateNo.join(','),
587 590
 					ordNo: this.query.ordNo == 0 ? '' : this.query.ordNo.join(','),
588 591
 					contractNo: this.query.contractNo == 0 ? '' : this.query.contractNo.join(','),
592
+					packNo: this.query.packNo == 0 ? '' : this.query.packNo.join(','),
589 593
 					remark1: this.query.remark1
590 594
 				}
591 595
 				//console.log(param);
@@ -914,6 +918,10 @@
914 918
 				const replaceResult = this.query.contractNo.replace(/[;,,;\s\r\n]+/g, ",").split(",");
915 919
 				this.query.contractNo = replaceResult;
916 920
 			},
921
+			getPackList(){
922
+				const replaceResult = this.query.packNo.replace(/[;,,;\s\r\n]+/g, ",").split(",");
923
+				this.query.packNo = replaceResult;
924
+			},
917 925
 
918 926
 			handleExport() {
919 927
 				var imptData = [];
@@ -931,6 +939,7 @@
931 939
 					plateNo: this.query.plateNo.length == 0 ? '' : this.query.plateNo.join(','),
932 940
 					ordNo: this.query.ordNo == 0 ? '' : this.query.ordNo.join(','),
933 941
 					contractNo: this.query.contractNo == 0 ? '' : this.query.contractNo.join(','),
942
+					packNo: this.query.packNo == 0 ? '' : this.query.packNo.join(','),
934 943
 					remark1: this.query.remark1
935 944
 				}
936 945
 

Loading…
Отказ
Запис