Эх сурвалжийг харах

张丁 作业票台账显示今天申请数据

zhangding 3 жил өмнө
parent
commit
8fa748c3bb

+ 3 - 2
master/src/main/resources/mybatis/invoice/TInvoiceBookingworkticketMapper.xml

@@ -111,8 +111,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectTInvoiceWorkcontentList" parameterType="TInvoiceBookingworkticket" resultMap="TInvoiceWorkcontentResult">
         <include refid="selectTInvoiceWorkcontentVo"/>
         <where>
-            <if test="createrCode != null "> and creater_code = #{createrCode}</if>
-            <if test="createdate != null "> and createdate = #{createdate}</if>
+            <if test="createrCode != null "> and creater_code = #{createrCode} </if>
+            <if test="createdate != null "> and d.createdate = #{createdate} and to_char(d.createdate, 'yyyy-mm-dd') = to_char(SYSDATE, 'yyyy-mm-dd')</if>
             <if test="updaterCode != null "> and updater_code = #{updaterCode}</if>
             <if test="updatedate != null "> and updatedate = #{updatedate}</if>
             <if test="workType != null "> and work_type = #{workType}</if>
@@ -135,6 +135,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         <!-- 数据范围过滤 -->
         ${params.dataScope}
+        order by b.work_start_time desc
     </select>
 
     <select id="selectDetailById" parameterType="Long" resultMap="TInvoiceBookingworkticketResultVo">

+ 14 - 3
ui/src/views/invoice/bookingworkticket/index.vue

@@ -101,7 +101,7 @@
           v-hasPermi="['invoice:bookingworkticket:export']"
         >导出</el-button>
       </el-col>
-	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="cancelQuery"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="bookingworkticketList" :span-method="mergeMethod"  @selection-change="handleSelectionChange" :height="clientHeight" border>
@@ -574,9 +574,11 @@ export default {
       //设置表格高度对应屏幕高度
       this.$nextTick(() => {
           this.clientHeight = document.body.clientHeight -250
+       
       })
-           this.getList();
-        this.getTreeselect();
+         this.getNowFormatDate()
+       this.getList();
+       this.getTreeselect();
         //初始化作业区域、 初始化用户单位下拉框
         this.getDeviceup();
      //   this.getOneCategorys();
@@ -741,6 +743,7 @@ export default {
             strDate = "0" + strDate;
         }
         var currentdate = year + seperator1 + month + seperator1 + strDate;
+        this.queryParams.createdate=currentdate
         return currentdate;
     },
     // 重置方法
@@ -849,6 +852,8 @@ export default {
     /** 搜索按钮操作 */
     handleQuery() {
       this.queryParams.pageNum = 1;
+      //搜索时全放开
+      this.queryParams.createdate=null;
       this.getList();
     },
     /** 重置按钮操作 */
@@ -856,6 +861,12 @@ export default {
       this.resetForm("queryForm");
       this.handleQuery();
     },
+    //取消搜索
+    cancelQuery() {
+     this.resetForm("queryForm");
+     this.getNowFormatDate()
+     this.getList()
+    },
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.bookingticketId)