LiGuang 3 năm trước cách đây
mục cha
commit
7fe6f6aab8

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

@@ -78,11 +78,11 @@
         </div>
 
         <div>
-          <a-table bordered :data-source="dataSource" :loading="loading" :columns="columns" :scroll="{ x:500,y:450}" :pagination="ipagination"
+          <a-table bordered :data-source="dataSource" :loading="loading" :columns="columns" :scroll="{ x:1500,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;margin-left: 10px;">
+                <div style="text-align: center;margin-top: -13px;margin-left: 10px;">
                   <p>{{dayobject.day.getDate()}}</p>
                   <div style="margin-top: -10px;">
                     <p v-if='dayobject.day.getDay()==0'>日</p>
@@ -96,8 +96,7 @@
                 </div>
               </div>
             </template>
-
-
+      
             <span v-for='(d,i) in tpdata' style="margin-left: -11px;" :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=='休息'" @click="UserType(d,record,index)">{{text}}</a-tag>
@@ -116,7 +115,11 @@
               </a-dropdown>
 
             </span>
-
+              <template  slot="names" slot-scope="text, record, index">
+                <div style="height: 27px;">
+                {{text}}
+                </div>
+            </template>
           </a-table>
         </div>
 
@@ -685,6 +688,9 @@
           title: '名称',
           dataIndex: 'realname',
           width: '80px',
+          scopedSlots: {
+            customRender: 'names'
+          },
           fixed: 'left'
         })
         for (var i = 1; i <= moth.getDate(); i++) {

+ 13 - 6
src/views/system/modules/StatutoryLeaveModal.vue

@@ -63,6 +63,7 @@
         title:"操作",
         visible: false,
         type:"2",
+        id:null,
         model: {},
         date:null,
         labelCol: {
@@ -131,15 +132,20 @@
           callback()
           this.date=1;
          this.queryDate(value.format('YYYY-MM-DD HH:mm:ss'))
-         this.form.setFieldsValue({
-           endDate:null
-         })
-         
-         
+         var end=this.form.getFieldValue('endDate');
+         if(end!=null){
+           var start=new Date(value);
+           var ends=new Date(end);
+           if(ends.getTime()<start.getTime()){
+             this.form.setFieldsValue({
+               endDate:null
+             }) 
+           }
+         }
         }
       },
       queryDate(e,a){
-        getAction(this.url.getOne,{startDate:e}).then((res)=>{
+        getAction(this.url.getOne,{startDate:e,id:this.id}).then((res)=>{
           if(res.success){
             if(res.result!=null){
               if(this.date==1){
@@ -169,6 +175,7 @@
         }
         this.model = Object.assign({}, record);
         this.visible = true;
+        this.id=record.id;
         this.$nextTick(() => {
           this.form.setFieldsValue(pick(this.model,'name','sum'))
 		  //时间格式化

+ 2 - 2
src/views/system/modules/UserModal.vue

@@ -267,13 +267,13 @@
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
-            <a-form-item label="合同类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-form-item v-if="!isEdit" label="合同类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <j-dict-select-tag  :disabled="isEdit" v-decorator="['contractType',{rules: [{ required: true, message: '请选择入合同类型'}]}]" :triggerChange="true" placeholder="请选择合同类型"
                dictCode="contract_type" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8" :lg="8">
-            <a-form-item label="合同结束日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-form-item v-if="!isEdit" label="合同结束日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-date-picker :disabled="isEdit" style="width: 100%" placeholder="请选择试合同结束日期"
                v-model="cEndDate"
                />