From 092ee93f1b3cca41d230dd2d40504bb7be4f9c32 Mon Sep 17 00:00:00 2001 From: kongdeqiang <123456> Date: 星期四, 30 三月 2023 17:08:50 +0800 Subject: [PATCH] 修改前端页面 --- src/components/page/orderRecord/index.vue | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) diff --git a/src/components/page/orderRecord/index.vue b/src/components/page/orderRecord/index.vue index 3de0df0..666e134 100644 --- a/src/components/page/orderRecord/index.vue +++ b/src/components/page/orderRecord/index.vue @@ -16,6 +16,7 @@ </el-form-item> <el-form-item> <el-button type="primary" size="small" @click="onSearch" icon="el-icon-search">鏌ヨ</el-button> + <el-button type="primary" size="small" @click="onSearch2" icon="el-icon-search">鏌ヨ</el-button> </el-form-item> </el-form> </div> @@ -53,7 +54,7 @@ } }, mounted() { - this.loadData(); + this.defaultDate(); this.$byutil.postData(this, this.$systemconfig.basePath+'/park/findAll', this.formData, res => { this.table1 = res.data; }) @@ -74,6 +75,27 @@ onSearch() { this.loadData(); }, + onSearch2() { + this.$byutil.postData(this, this.urlPath+'getById/1000', null,res => { + console.log(res.data) + }); + }, + //璁剧疆榛樿鏃ユ湡 + defaultDate(){ + //鑾峰彇鏂扮殑鏃堕棿 + let date = new Date() + //鑾峰彇褰撳墠鏃堕棿鐨勫勾浠借浆涓哄瓧绗︿覆 + let year = date.getFullYear().toString() + //鑾峰彇鏈堜唤锛岀敱浜庢湀浠戒粠0寮�濮嬶紝姝ゅ瑕佸姞1锛屽垽鏂槸鍚﹀皬浜�10锛屽鏋滄槸鍦ㄥ瓧绗︿覆鍓嶉潰鎷兼帴'0' + let month = date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1).toString():(date.getMonth()+1).toString() + //鑾峰彇澶╋紝鍒ゆ柇鏄惁灏忎簬10锛屽鏋滄槸鍦ㄥ瓧绗︿覆鍓嶉潰鎷兼帴'0' + let da = date.getDate() < 10 ? '0'+date.getDate().toString():date.getDate().toString() + //瀛楃涓叉嫾鎺ワ紝寮�濮嬫椂闂达紝缁撴潫鏃堕棿 + let end = year + '-' + month + '-' + da //褰撳ぉ'2019-04-12' + let beg = year + '-' + month + '-' + da //褰撴湀绗竴澶�'2019-04-01' + this.searchForm.date = [beg,end] //灏嗗�艰缃粰鎻掍欢缁戝畾鐨勬暟鎹� + this.loadData(); + }, } } </script> -- Gitblit v1.9.1