LiGuang 2 anni fa
parent
commit
366b023655

+ 88 - 64
src/views/system/AttendanceRuleList.vue

@@ -22,7 +22,7 @@
           </a-col>
           <a-col :xl="6" :lg="6" :md="6" :sm="6">
             <a-form-item label="日期">
-              <a-month-picker valueFormat="YYYY-MM-DD HH:mm:ss" format="YYYY-MM" placeholder="请选择日期"
+              <a-month-picker :allowClear="false" valueFormat="YYYY-MM-DD HH:mm:ss" format="YYYY-MM" placeholder="请选择日期" :getCalendarContainer="node => node.parentNode"
                 v-model="queryParam.ShiftDate" />
             </a-form-item>
           </a-col>
@@ -45,14 +45,14 @@
       <a-button @click="handleAddts()" type="primary" icon="plus" v-has="'UserShift:add'" v-if="isColse" style="margin-left: 20px;">调整</a-button>
       <a-tabs default-active-key="2" @change="callback">
         <a-tab-pane key="2" tab="按班次上下班">
-          <a-table bordered rowKey="id" :loading="loading" :data-source="dataSource" :columns="columns"
-            :scroll="{ x:300,y:700}" :pagination="ipagination" @change="handleTableChange"
+          <a-table bordered rowKey="id" size="middle "	 :loading="loading" :data-source="dataSource" :columns="columns"
+            :scroll="{y:600}" :pagination="ipagination" @change="handleTableChange"
             :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
             <template v-for='(dayobject,i) in days' :slot="dayobject.day.getDate()" style="color: #ff6b81">
-              <div style="height: 35px;">
-                <div style="text-align: center;margin-top: -10px;">
-                  <p>{{dayobject.day.getDate()}}</p>
-                  <div style="margin-top: -10px;">
+              <div style="height: 0px;">
+                <div style="text-align: center;font-size: small;">
+                  <p style="margin-top: -10px;">{{dayobject.day.getDate()}}</p>
+                  <div style="margin-top: -15px;">
                     <p v-if='dayobject.day.getDay()==0'>日</p>
                     <p v-else-if='dayobject.day.getDay()==1'>一</p>
                     <p v-else-if='dayobject.day.getDay()==2'>二</p>
@@ -65,11 +65,11 @@
               </div>
             </template>
 
-            <span v-for='(d,i) in tpdata' style="margin-left: -6px;" :slot="d" slot-scope="text, record, index">
+            <span v-for='(d,i) in tpdata' style="margin-left: -5px;" :slot="d" slot-scope="text, record, index">
               <span >
-                <a-tag color="blue" v-if="text=='休'">{{text.substring(0,1)}}</a-tag>
+                <a-tag color="blue" v-if="text=='休'">{{text.substring(0,1)}}</a-tag>
                 <a-tag color="red" v-if="text=='法'">{{text.substring(0,1)}}</a-tag>
-                <a-tag color="#87d068" v-if="text!=''&&text!=null&&text!='法'&&text!='休'">{{text.substring(0,1)}}</a-tag>
+                <a-tag color="#87d068" v-if="text!=''&&text!=null&&text!='法'&&text!='休'">{{text.substring(0,1)}}</a-tag>
               </span>
             </span>
           </a-table>
@@ -95,13 +95,13 @@
           </a-table> -->
         </a-tab-pane>
         <a-tab-pane key="1" tab="固定时间上下班">
-          <a-table bordered rowKey="id" :loading="loading" :data-source="dataSource" :columns="columns"
-            :scroll="{ x:300 }" :pagination="ipagination" @change="handleTableChange">
+          <a-table bordered rowKey="id" ze="middle "  :loading="loading" :data-source="dataSource" :columns="columns"
+            :scroll="{x:500, y:500 }" :pagination="ipagination" @change="handleTableChange">
             <template v-for='(dayobject,i) in days' :slot="dayobject.day.getDate()" style="color: #ff6b81">
-              <div style="height: 35px;">
-                <div style="text-align: center;margin-top: -10px;">
-                  <p>{{dayobject.day.getDate()}}</p>
-                  <div style="margin-top: -10px;">
+              <div style="height: 0px;">
+                <div style="text-align: center;font-size: small;">
+                  <p style="margin-top: -10px;">{{dayobject.day.getDate()}}</p>
+                  <div style="margin-top: -15px;">
                     <p v-if='dayobject.day.getDay()==0'>日</p>
                     <p v-else-if='dayobject.day.getDay()==1'>一</p>
                     <p v-else-if='dayobject.day.getDay()==2'>二</p>
@@ -386,50 +386,33 @@
 
         moth.setMonth(moth.getMonth() + 1);
         moth.setDate(0);
-        this.columns.push({
-          title: '名称',
-          dataIndex: 'realname',
-          width: '85px',
-          fixed: 'left',
-          sorter: true
-        })
-        this.columnst.push({
-          title: '班次名称',
-          dataIndex: 'name',
-          width: '70px',
-          fixed: 'left'
-        })
-        this.columns.push({
-          title: '部门',
-          dataIndex: 'deptName',
-          width: '120px',
-          fixed: 'left',
-          sorter: true
-        })
+
+        // this.columnst.push({
+        //   title: '班次名称',
+        //   dataIndex: 'name',
+        //   width: '70px',
+        // })
+       
         if (this.queryParam.type == "1" || this.queryParam.type == "2" || this.queryParam.type == "3") {
-          // this.columns.push({
-          //   title: '类型',
-          //   dataIndex: 'type',
-          //   width: '117px',
-          //   fixed: 'left',
-          //   customRender: function(t, r, index) {
-          //     var name = "";
-          //     if (t == 1 || t == "1") {
-          //       name = "固定时间上下班";
-          //     } else if (t == 2 || t == "2") {
-          //       name = "按班次上下班";
-          //     } else if (t == 3 || t == "3") {
-          //       name = "自由时间上下班";
-          //     }
-          //     return name;
-          //   }
-          // })
+        
           if (this.queryParam.type == "1") {
+          this.columns.push({
+            title: '名称',
+            dataIndex: 'realname',
+            width: '100px',
+            sorter: true
+          })
+          this.columns.push({
+            title: '部门',
+            dataIndex: 'deptName',
+            width: '105px',
+            sorter: true
+          })
             this.columns.push({
               title: '上班时间',
               dataIndex: 'startDate',
-              width: '100px',
-              fixed: 'left',
+              width: '90px',
+              
               customRender: function(t, r, index) {
                 var date = "";
                 if (t != null && t != "") {
@@ -441,8 +424,8 @@
             this.columns.push({
               title: '下班时间',
               dataIndex: 'endDate',
-              width: '100px',
-              fixed: 'left',
+              width: '90px',
+              
               customRender: function(t, r, index) {
                 var date = "";
                 if (t != null && t != "") {
@@ -451,16 +434,57 @@
                 return date;
               }
             })
+           
+            /*for (var i = 1; i <= moth.getDate(); i++) { 
+              var d = new Date(this.formatDate(this.currentYear, this.currentMonth, i))
+              this.tpdata.push(i)
+              var dayobjectSelf = {
+                width: '50px',
+                slots: {
+                  title: d.getDate()
+                },
+                dataIndex: "a" + d.getDate(),
+                scopedSlots: {
+                  customRender: i
+                },
+            
+              } // 用一个对象包装Date对象  以便为以后预定功能添加属性
+            
+              var dayobjectSelfs = {
+                width: '50px',
+                slots: {
+                  title: d.getDate()
+                },
+                dataIndex: "b" + d.getDate(),
+              }
+              var dat = {};
+              dat.day = d;
+            
+              this.days.push(dat)
+              this.columns.push(dayobjectSelf) // 将日期放入data 中的days数组 供页面渲染使用
+              
+            }*/
           }
 
 
 
           if (this.queryParam.type == "2") {
+            this.columns.push({
+              title: '名称',
+              dataIndex: 'realname',
+              width: '70px',
+              sorter: true
+            })
+            this.columns.push({
+              title: '部门',
+              dataIndex: 'deptName',
+              width: '105px',
+              sorter: true
+            })
             for (var i = 1; i <= moth.getDate(); i++) {
               var d = new Date(this.formatDate(this.currentYear, this.currentMonth, i))
               this.tpdata.push(i)
               var dayobjectSelf = {
-                width: '49px',
                 slots: {
                   title: d.getDate()
                 },
@@ -472,7 +496,7 @@
               } // 用一个对象包装Date对象  以便为以后预定功能添加属性
 
               var dayobjectSelfs = {
-                width: '49px',
+                
                 slots: {
                   title: d.getDate()
                 },
@@ -485,12 +509,12 @@
               this.columns.push(dayobjectSelf) // 将日期放入data 中的days数组 供页面渲染使用
               this.columnst.push(dayobjectSelfs)
             }
-          } else {
+          }  else {
             for (var i = 1; i <= moth.getDate(); i++) {
               var d = new Date(this.formatDate(this.currentYear, this.currentMonth, i))
               this.tpdata.push(i)
               var dayobjectSelf = {
-                width: '49px',
+                width: '48px',
                 slots: {
                   title: d.getDate()
                 },
@@ -504,8 +528,8 @@
               this.columns.push(dayobjectSelf) // 将日期放入data 中的days数组 供页面渲染使用
             }
 
-          }
-        } else {
+          } 
+        } /* else {
           for (var i = 1; i <= moth.getDate(); i++) {
             var d = new Date(this.formatDate(this.currentYear, this.currentMonth, i))
             this.tpdata.push(i)
@@ -523,7 +547,7 @@
             this.days.push(dat)
             this.columns.push(dayobjectSelf) // 将日期放入data 中的days数组 供页面渲染使用
           }
-        }
+        } */
         
       },
       queryShift() {

+ 5 - 5
src/views/system/modules/AttendanceRuleModal.vue

@@ -96,11 +96,11 @@
 
             <span v-for='(d,i) in tpdata' style="margin-left: -13px;" :slot="d" slot-scope="text, record, index">
               <a-dropdown :trigger="['click']">
-                <a-tag closable @close="(e) => log(e,d,record)" color="blue" v-if="text=='休'"
+                <a-tag closable @close="(e) => log(e,d,record)" color="blue" v-if="text=='休'"
                   @click="UserType(d,record,index,text)">{{text.substring(0,1)}}</a-tag>
                 <a-tag color="red" style="margin-left: 10px;" v-if="text=='法'" @click="UserType(d,record,index,text)">
                   {{text.substring(0,1)}}</a-tag>
-                <a-tag closable @close="(e) => log(e,d,record)" color="#87d068" v-if="text!='休'&&text!=''&&text!=null"
+                <a-tag closable @close="(e) => log(e,d,record)" color="#87d068" v-if="text!='休'&&text!=''&&text!=null"
                   @click="UserType(d,record,index,text)">
                   {{text.substring(0,1)}}
                 </a-tag>
@@ -496,7 +496,7 @@
                 for (var t in obj) { //用javascript的for/in循环遍历对象的属性
                   if (this.currentYear == list[o].split("-")[0] && this.currentMonth == list[o].split("-")[1]) {
                     if (t == "shiftid" + list[o].split("-")[2] && list[o].split("-")[2] == e) {
-                      if (obj[t] != "0" && obj[t] != null&&obj[t] != "1") {
+                      if (obj[t] != "0" && obj[t] != null) {
                         sum++;
                         f = true;
                       }
@@ -504,7 +504,7 @@
                         xsum++;
                       }
                     } else if (t == "shiftid" + list[o].split("-")[2]) {
-                      if (obj[t] != "0" && obj[t] != null && obj[t] != "1") {
+                      if (obj[t] != "0" && obj[t] != null) {
                         sum++;
                       }
                       if (obj[t] != null && obj[t] == "0") {
@@ -596,7 +596,7 @@
         var name = a.name;
         var shift = a.id;
         if (a == 0 || a == "0") {
-          name = "休";
+          name = "休";
           shift = "0";
         }
 

+ 8 - 1
src/views/system/modules/UserModal.vue

@@ -43,7 +43,7 @@
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
             <a-form-item label="证件类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-select style="width: 70%"  v-model="sfzType" placeholder="请选择证件类型">
+              <a-select style="width: 70%" @change="codeType"  v-model="sfzType" placeholder="请选择证件类型">
                 <a-select-option value="0">中国身份证</a-select-option>
                 <a-select-option value="1">其他</a-select-option>
               </a-select>
@@ -652,6 +652,13 @@
         this.workMoths=this.workMoth;
         this.visloading=true;
       },
+      codeType(e){
+        
+          this.form.setFieldsValue({
+            sfzCode:null
+          })
+        
+      },
       beforeUploads(file){
         this.isupload=true;
       const isLtM=file.size / 1024 / 1024>10

+ 2 - 2
src/views/system/schedulingInformation/BdWorkOverTimeList.vue

@@ -110,7 +110,7 @@
             <a-button type="primary" @click="searchQuerys()" icon="search">查询</a-button>
             <a-button type="primary" @click="searchResets" icon="reload" style="margin-left: 8px">重置</a-button>
             <a-button type="primary" icon="download" @click="handleExportXlst('请假息列表')" style="margin-left: 8px;">导出</a-button>
-            <a-button @click="handleAdds()" type="primary" icon="plus" style="margin-left: 8px;">新增</a-button>
+            <a-button @click="handleAdds()" type="primary" icon="plus" style="margin-left: 8px;" v-has="'vacation:add'">新增</a-button>
          <a @click="handleToggleSearchs" style="margin-left: 8px">
            {{ toggleSearchStatuss ? '收起' : '展开' }}
            <a-icon :type="toggleSearchStatuss ? 'up' : 'down'"/>
@@ -493,7 +493,7 @@ import moment from "moment"
               startDate:moment(startDate).format('YYYY-MM-DD HH:mm:ss'),
               endDate:moment(endDate).format('YYYY-MM-DD HH:mm:ss'),
               demo:demo,
-              holidayCount:holidayCount,
+              holidayCount:holidayCount+".0",
               holidayType:holidayType
             },"post").then(res => { 
               if (res.success) {