소스 검색

多行复制查询

LiuCheng 2 달 전
부모
커밋
4d7d2729e0
1개의 변경된 파일8개의 추가작업 그리고 5개의 파일을 삭제
  1. 8
    5
      src/view/ware/storechange.vue

+ 8
- 5
src/view/ware/storechange.vue 파일 보기

@@ -37,7 +37,7 @@
37 37
 						</el-input>
38 38
 					</el-form-item>
39 39
 					<el-form-item label="钢板号" style="margin-left: -35px">
40
-						<el-input v-model="query.plateNo" size="small" style="width:120px;margin-left: -8px">
40
+						<el-input v-model="query.plateNo" size="small" style="width:120px;margin-left: -8px" @input="getPltList">
41 41
 						</el-input>
42 42
 					</el-form-item>
43 43
 					<el-form-item label="订单号" style="margin-left: -35px">
@@ -235,7 +235,7 @@
235 235
 					materialName: '',
236 236
 					standard: '',
237 237
 					customerName: '',
238
-					plateNo: '',
238
+					plateNo: [],
239 239
 					wareId:'',
240 240
 					inRecordDate:[],
241 241
 					fkcustmerName:'',
@@ -426,7 +426,7 @@
426 426
 					materialName: this.query.materialName,
427 427
 					standard: this.query.standard,
428 428
 					customerName: this.query.customerName,
429
-					plateNo: this.query.plateNo,
429
+					plateNo: this.query.plateNo.length == 0 ? '' : this.query.plateNo.join(','),
430 430
 					fromDate:(!this.query.inRecordDate[0]) ? "1970-01-01 00:00:00" : this.query.inRecordDate[0].Format("yyyy-MM-dd HH:mm:ss"),		//date类型
431 431
 					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"),
432 432
 					fkcustmerName : this.query.fkcustmerName,
@@ -717,7 +717,10 @@
717 717
 			selectAll(selection){
718 718
 				this.selectRows = selection;
719 719
 			},
720
-
720
+			getPltList(){
721
+				const replaceResult = this.query.plateNo.replace(/[;,,;\s\r\n]+/g, ",").split(",");
722
+				this.query.plateNo = replaceResult;
723
+			},
721 724
 			handleExport() {
722 725
 				var imptData = [];
723 726
 				if(this.query.inRecordDate == null){
@@ -733,7 +736,7 @@
733 736
 					materialName: this.query.materialName,
734 737
 					standard: this.query.standard,
735 738
 					customerName: this.query.customerName,
736
-					plateNo: this.query.plateNo,
739
+					plateNo: this.query.plateNo.length == 0 ? '' : this.query.plateNo.join(','),
737 740
 					fromDate:(!this.query.inRecordDate[0]) ? "1970-01-01 00:00:00" : this.query.inRecordDate[0].Format("yyyy-MM-dd HH:mm:ss"),		//date类型
738 741
 					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"),
739 742
 					fkcustmerName : this.query.fkcustmerName,

Loading…
취소
저장