浏览代码

增加入库时间查询条件

YL2767 5 天前
父节点
当前提交
73b8d938c4
共有 1 个文件被更改,包括 27 次插入3 次删除
  1. 27
    3
      src/view/ware/storechange.vue

+ 27
- 3
src/view/ware/storechange.vue 查看文件

44
 						<el-input v-model="query.ordNo" size="small" style="width:120px;margin-left: -8px">
44
 						<el-input v-model="query.ordNo" size="small" style="width:120px;margin-left: -8px">
45
 						</el-input>
45
 						</el-input>
46
 					</el-form-item>
46
 					</el-form-item>
47
+					<el-form-item label="入库时间" style="margin-left: -35px">
48
+						<el-date-picker size="small" v-model="query.inRecordDate"  style="width:330px;margin-left: -8px" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
49
+						</el-date-picker>
50
+					</el-form-item>
47
 					<el-form-item label="" style="margin-top: 0px;margin-left: 10px">
51
 					<el-form-item label="" style="margin-top: 0px;margin-left: 10px">
48
 						<el-button @click="handleSearch" size="small"  type="primary">查询</el-button>
52
 						<el-button @click="handleSearch" size="small"  type="primary">查询</el-button>
49
 						<el-button @click="showChangeCustomer" size="small"  type="primary">货权转移</el-button>
53
 						<el-button @click="showChangeCustomer" size="small"  type="primary">货权转移</el-button>
99
 				</el-table-column>
103
 				</el-table-column>
100
 				<el-table-column prop="addTime" label="入库时间" width="200" show-overflow-tooltip header-align="center">
104
 				<el-table-column prop="addTime" label="入库时间" width="200" show-overflow-tooltip header-align="center">
101
 				</el-table-column>
105
 				</el-table-column>
106
+				<el-table-column prop="carNo" label="入库车号" width="200" show-overflow-tooltip header-align="center">
107
+				</el-table-column>
102
 			</el-table>
108
 			</el-table>
103
 			<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
109
 			<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
104
 			 :page-sizes="pageSizes" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalRows">
110
 			 :page-sizes="pageSizes" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalRows">
223
 					customerName: '',
229
 					customerName: '',
224
 					plateNo: '',
230
 					plateNo: '',
225
 					wareId:'',
231
 					wareId:'',
232
+					inRecordDate:[],
226
 				},
233
 				},
227
 				multipleSelection: [],
234
 				multipleSelection: [],
228
 				tableData: [],
235
 				tableData: [],
253
 			};
260
 			};
254
 		},
261
 		},
255
 		mounted() {
262
 		mounted() {
256
-			this.getWare()
263
+			this.getWare(),
264
+			THIS.setSearchTime()
257
 			//this.getTableData()
265
 			//this.getTableData()
258
 		},
266
 		},
259
 		methods: {
267
 		methods: {
268
+			setSearchTime(){
269
+				var now = new Date();
270
+				this.query.inRecordDate = [new Date(now.getFullYear(), now.getMonth(), now.getDate()),new Date(now.getFullYear(), now.getMonth(), now.getDate()+1)];
271
+			},
260
 			showMaterial() {
272
 			showMaterial() {
261
 				this.$refs.PopupMaterial.show()
273
 				this.$refs.PopupMaterial.show()
262
 			},
274
 			},
389
 			getTableData() {
401
 			getTableData() {
390
 				this.loading = true
402
 				this.loading = true
391
 				var url = 'WareStore/queryStore.do'
403
 				var url = 'WareStore/queryStore.do'
404
+				if(this.query.inRecordDate == null){
405
+					this.query.inRecordDate = [false,false];
406
+				}
392
 				var param = {
407
 				var param = {
393
 					page: this.currentPage,
408
 					page: this.currentPage,
394
 					rows: this.pageSize,
409
 					rows: this.pageSize,
397
 					model: this.query.model,
412
 					model: this.query.model,
398
 					materialName: this.query.materialName,
413
 					materialName: this.query.materialName,
399
 					standard: this.query.standard,
414
 					standard: this.query.standard,
400
-					customerName: this.query.customerName
415
+					customerName: this.query.customerName,
416
+					fromDate:(!this.query.inRecordDate[0]) ? "1970-01-01 00:00:00" : this.query.inRecordDate[0].Format("yyyy-MM-dd HH:mm:ss"),		//date类型
417
+					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"),
401
 				}
418
 				}
402
 				axios.get(url, param).then(response => {
419
 				axios.get(url, param).then(response => {
403
 					if (response.data.code == 0) {
420
 					if (response.data.code == 0) {
680
 
697
 
681
 			handleExport() {
698
 			handleExport() {
682
 				var imptData = [];
699
 				var imptData = [];
700
+				if(this.query.inRecordDate == null){
701
+					this.query.inRecordDate = [false,false];
702
+				}
683
 				var url = 'WareStore/queryStore.do'
703
 				var url = 'WareStore/queryStore.do'
684
 				var param = {
704
 				var param = {
685
 					page: this.currentPage,
705
 					page: this.currentPage,
689
 					model: this.query.model,
709
 					model: this.query.model,
690
 					materialName: this.query.materialName,
710
 					materialName: this.query.materialName,
691
 					standard: this.query.standard,
711
 					standard: this.query.standard,
692
-					customerName: this.query.customerName
712
+					customerName: this.query.customerName,
713
+					fromDate:(!this.query.inRecordDate[0]) ? "1970-01-01 00:00:00" : this.query.inRecordDate[0].Format("yyyy-MM-dd HH:mm:ss"),		//date类型
714
+					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"),
693
 				}
715
 				}
694
 
716
 
695
 
717
 
734
 								,"产地"
756
 								,"产地"
735
 								,"备注"
757
 								,"备注"
736
 								,"入库时间"
758
 								,"入库时间"
759
+								,"车号"
737
 
760
 
738
 				] // 导出的表头名
761
 				] // 导出的表头名
739
 				const filterVal = ["layer"
762
 				const filterVal = ["layer"
752
 									,"productionPlace"
775
 									,"productionPlace"
753
 									,"remark"
776
 									,"remark"
754
 									,"addTime"
777
 									,"addTime"
778
+									,"carNo"
755
 				]
779
 				]
756
 				for(var i=0;i<imptData.length;i++){
780
 				for(var i=0;i<imptData.length;i++){
757
 					imptData[i]["stackName"] 			= imptData[i].stack.name;
781
 					imptData[i]["stackName"] 			= imptData[i].stack.name;

正在加载...
取消
保存