Commit 3b36fe6e by 无尘

fix: 班次编辑

parent e5fdc206
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link href=./static/css/app.25fad2d3f4b5b64fa877ccfa02fa840d.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.b4fff87548fcff1b7e0a.js></script><script type=text/javascript src=./static/js/vendor.0000e68e65e4a9dc3840.js></script><script type=text/javascript src=./static/js/app.53a7b7801a78626e6bb5.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link href=./static/css/app.ac59d620ff7fe5a927dba35cd94f0985.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.a08b5a46f53c244963c1.js></script><script type=text/javascript src=./static/js/vendor.0000e68e65e4a9dc3840.js></script><script type=text/javascript src=./static/js/app.d2dca2485bfabbd8023a.js></script></body></html>
\ No newline at end of file
......@@ -1157,3 +1157,46 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
.el-table__footer {
border-collapse: collapse !important;
}
.day-tag-blue {
background: #5e90ff;
border-color: #5e90ff;
color: #fff;
}
.day-tag-red {
background: #fb6370;
border-color: #fb6370;
color: #fff;
}
.day-tag-purple {
background: #7e6bd4;
border-color: #7e6bd4;
color: #fff;
}
.day-tag-orange {
background: #ff943e;
border-color: #ff943e;
color: #fff;
}
.day-tag-green {
background: #15bc83;
border-color: #15bc83;
color: #fff;
}
.day-tag-pink {
background: #ed4dae;
border-color: #ed4dae;
color: #fff;
}
.day-tag-cyan {
background: #3d66c3;
border-color: #3d66c3;
color: #fff;
}
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,d,n){for(var r,t,o,i=0,u=[];i<a.length;i++)t=a[i],b[t]&&u.push(b[t][0]),b[t]=0;for(r in d)Object.prototype.hasOwnProperty.call(d,r)&&(e[r]=d[r]);for(c&&c(a,d,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=f(f.s=n[i]);return o};var a={},b={103:0};function f(c){if(a[c])return a[c].exports;var b=a[c]={i:c,l:!1,exports:{}};return e[c].call(b.exports,b,b.exports,f),b.l=!0,b.exports}f.e=function(e){var c=b[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,f){c=b[e]=[a,f]});c[2]=a;var d=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,f.nc&&n.setAttribute("nonce",f.nc),n.src=f.p+"static/js/"+e+"."+{0:"ab616832b6f6019a8690",1:"fe9dec1f31b04053fd7e",2:"54aabab28c7735d34c10",3:"b7e6d57d97174b75b050",4:"11254d7e3a102121b8ec",5:"330c91a0a9fe8490c0e7",6:"124ad8222f7b043b44ae",7:"ebad93a8c5bffffd9e98",8:"f1c9fb5c9212483138d8",9:"b5aae16b3951516573ad",10:"ebbed2d956a1376f014a",11:"59c7813cc972f62b1d18",12:"879536ae7ce46f0c54ec",13:"57e51fc1b6342003f25d",14:"d4577e674687596a82fe",15:"26e240debc0e9e519cfc",16:"3764f209950b5a339958",17:"cd897e152428f8fe12c6",18:"f7633d51986d0c6798f1",19:"60cda7a1997f26103e8b",20:"9978a0294be1004d697d",21:"ed8d46095e29b1e8d098",22:"537abc52bc237952c65a",23:"ba6658b78f36c8b29a87",24:"56085041ae784faf3c32",25:"e23f42a6b2180b63c129",26:"88e76d9c9f4d5e2d0c27",27:"c3f7fb68797f235ad906",28:"8eb2bb1afe16d964a0b2",29:"c5bb15e8e1bd17cdc0f7",30:"ea05d43b99177823fbdc",31:"b8b827be7489c76082e9",32:"fa08375056ae64364bce",33:"f4e32fc6846aa744ee48",34:"0fb2eb67d47b9ecbd519",35:"e64c33855b455bcdd9a2",36:"8615782328f743c5f783",37:"8d599976023acb79bef4",38:"6620399d71206af0621b",39:"200970a93d2f730ebbd5",40:"52567857be12ee835446",41:"7264f33d2c3cf44d63a5",42:"9cacb9b0dc2a83864afe",43:"2324b3155ba3e3fe67b2",44:"a899f81af77b5d1b6daf",45:"d4e2ecd5b9efc4c430de",46:"03ae66bfca82c8ffa033",47:"393792502b1faedfd75b",48:"e413bb6ddbf0598e75ed",49:"8be0d341bf9560ab91d8",50:"edc711153403cc5a63ed",51:"5996349b24bab60188ec",52:"4b670e09f79ed49e862d",53:"ec91f2b143d0b1e708b5",54:"31eed9c38748896262d1",55:"4f96191ae2c44c6f18f7",56:"99063bd3b07926595af4",57:"ba6530916d934b70d218",58:"2241679269f18e7f14c3",59:"5c336f6f4d119300c1d8",60:"d43c13d5c29feb45e864",61:"0806aac37bd2b86e8bc2",62:"8ef5c75f77376ecd8873",63:"bbe4da77ef31a0aa9150",64:"f26939887c305ec6f7fc",65:"069ccaf5f8e5b5f3c59d",66:"5f0382c9cb76b57ba778",67:"745b9621e5297c575b33",68:"aaaa125fb978b59c2cbf",69:"bb6a8bab41cac9f11bd4",70:"a226d330de7ebb2a4c5f",71:"9551ae81326c57064dec",72:"cb1b3985b92be4556fc1",73:"b6b1fb51b601c0fafcda",74:"6206c00744e77bc84fec",75:"93eb5a61daaa3a1df425",76:"78e5a422e9fecbbd255a",77:"b3f7cf4d2b54d306c522",78:"1fc3472c5f95a0a66979",79:"69811ba75d1fceae9737",80:"12442b543aff65f2c05d",81:"00a94b58ac2affb758dc",82:"1fa56152d6bdcfd4ec14",83:"976088a6ee120b8caa17",84:"45dae077c86a1a0050ff",85:"0c7635a15cceae31d981",86:"d0d0607a424156f2d88d",87:"8c62418c0b2cc9b8e750",88:"d451f8cffee0abe026c6",89:"b528547071d6c896cf0f",90:"57319965505945b3ae7e",91:"446342439ce97b19c84f",92:"09a5823b00d6180576b9",93:"e801fdd8bbd27a68d8ee",94:"0667cc1720cd56e116d9",95:"a08b7e730d57a7f096a5",96:"37acaa2f6f812ee7216b",97:"84d009afd65fa1e0cb42",98:"d54541a3a62bae3a075b",99:"b2c0b52f472168172ad5",102:"2c7e1d628bd2f4ac709c"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var c=b[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),b[e]=void 0)}return n.onerror=n.onload=t,d.appendChild(n),a},f.m=e,f.c=a,f.d=function(e,c,a){f.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},f.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(c,"a",c),c},f.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},f.p="./",f.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,d,n){for(var r,t,o,i=0,u=[];i<a.length;i++)t=a[i],b[t]&&u.push(b[t][0]),b[t]=0;for(r in d)Object.prototype.hasOwnProperty.call(d,r)&&(e[r]=d[r]);for(c&&c(a,d,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=f(f.s=n[i]);return o};var a={},b={103:0};function f(c){if(a[c])return a[c].exports;var b=a[c]={i:c,l:!1,exports:{}};return e[c].call(b.exports,b,b.exports,f),b.l=!0,b.exports}f.e=function(e){var c=b[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,f){c=b[e]=[a,f]});c[2]=a;var d=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,f.nc&&n.setAttribute("nonce",f.nc),n.src=f.p+"static/js/"+e+"."+{0:"ab616832b6f6019a8690",1:"fe9dec1f31b04053fd7e",2:"54aabab28c7735d34c10",3:"b7e6d57d97174b75b050",4:"11254d7e3a102121b8ec",5:"330c91a0a9fe8490c0e7",6:"124ad8222f7b043b44ae",7:"ebad93a8c5bffffd9e98",8:"f1c9fb5c9212483138d8",9:"b5aae16b3951516573ad",10:"ebbed2d956a1376f014a",11:"59c7813cc972f62b1d18",12:"879536ae7ce46f0c54ec",13:"57e51fc1b6342003f25d",14:"d4577e674687596a82fe",15:"26e240debc0e9e519cfc",16:"3764f209950b5a339958",17:"cd897e152428f8fe12c6",18:"f7633d51986d0c6798f1",19:"60cda7a1997f26103e8b",20:"9978a0294be1004d697d",21:"ed8d46095e29b1e8d098",22:"537abc52bc237952c65a",23:"6586d8dbbc88ff9e7868",24:"ae973093bb8dd3a5b495",25:"38c7fffee3988d031ec9",26:"88e76d9c9f4d5e2d0c27",27:"c3f7fb68797f235ad906",28:"8eb2bb1afe16d964a0b2",29:"c5bb15e8e1bd17cdc0f7",30:"ea05d43b99177823fbdc",31:"b8b827be7489c76082e9",32:"fa08375056ae64364bce",33:"f4e32fc6846aa744ee48",34:"0fb2eb67d47b9ecbd519",35:"e64c33855b455bcdd9a2",36:"8615782328f743c5f783",37:"8d599976023acb79bef4",38:"6620399d71206af0621b",39:"823bd52fe45b0b574689",40:"52567857be12ee835446",41:"7264f33d2c3cf44d63a5",42:"9cacb9b0dc2a83864afe",43:"2324b3155ba3e3fe67b2",44:"a899f81af77b5d1b6daf",45:"d4e2ecd5b9efc4c430de",46:"03ae66bfca82c8ffa033",47:"393792502b1faedfd75b",48:"e413bb6ddbf0598e75ed",49:"8be0d341bf9560ab91d8",50:"edc711153403cc5a63ed",51:"5996349b24bab60188ec",52:"4b670e09f79ed49e862d",53:"ec91f2b143d0b1e708b5",54:"31eed9c38748896262d1",55:"4f96191ae2c44c6f18f7",56:"99063bd3b07926595af4",57:"ba6530916d934b70d218",58:"2241679269f18e7f14c3",59:"5c336f6f4d119300c1d8",60:"d43c13d5c29feb45e864",61:"0806aac37bd2b86e8bc2",62:"8ef5c75f77376ecd8873",63:"bbe4da77ef31a0aa9150",64:"f26939887c305ec6f7fc",65:"069ccaf5f8e5b5f3c59d",66:"5f0382c9cb76b57ba778",67:"745b9621e5297c575b33",68:"aaaa125fb978b59c2cbf",69:"bb6a8bab41cac9f11bd4",70:"a226d330de7ebb2a4c5f",71:"9551ae81326c57064dec",72:"cb1b3985b92be4556fc1",73:"b6b1fb51b601c0fafcda",74:"6206c00744e77bc84fec",75:"93eb5a61daaa3a1df425",76:"78e5a422e9fecbbd255a",77:"b3f7cf4d2b54d306c522",78:"1fc3472c5f95a0a66979",79:"69811ba75d1fceae9737",80:"12442b543aff65f2c05d",81:"00a94b58ac2affb758dc",82:"1fa56152d6bdcfd4ec14",83:"976088a6ee120b8caa17",84:"45dae077c86a1a0050ff",85:"0c7635a15cceae31d981",86:"d0d0607a424156f2d88d",87:"8c62418c0b2cc9b8e750",88:"d451f8cffee0abe026c6",89:"b528547071d6c896cf0f",90:"57319965505945b3ae7e",91:"446342439ce97b19c84f",92:"09a5823b00d6180576b9",93:"e801fdd8bbd27a68d8ee",94:"0667cc1720cd56e116d9",95:"a08b7e730d57a7f096a5",96:"37acaa2f6f812ee7216b",97:"84d009afd65fa1e0cb42",98:"d54541a3a62bae3a075b",99:"b2c0b52f472168172ad5",102:"2c7e1d628bd2f4ac709c"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var c=b[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),b[e]=void 0)}return n.onerror=n.onload=t,d.appendChild(n),a},f.m=e,f.c=a,f.d=function(e,c,a){f.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},f.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(c,"a",c),c},f.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},f.p="./",f.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-12-17 09:40:42
* @LastEditors: 无尘
* @LastEditTime: 2019-12-17 16:05:44
* @LastEditTime: 2019-12-17 16:43:31
-->
<!--
......@@ -18,41 +18,39 @@ import classSelect from '@/components/app/dailyAttendance/class-select.vue'
-->
<template>
<div v-show="customDialog">
<el-dialog class="edit-dialog" :title="classesId ? '编辑班次' : '新建班次'" :visible.sync="customDialog" width="600px" :before-close="handleClose">
<div class="edit-dialog-body">
<div>
<el-input placeholder="请输入班次名称" v-model="classesName" class="w-264" style="width: 264px;" prefix-icon="el-icon-search" @keyup.native="value => toInput(value, classesName)" clearable @clear="clearInput"></el-input>
</div>
<el-table :data="tableData" style="width: 100%">
<el-table-column label="" width="50">
<template slot-scope="scope">
<el-radio v-model="selClassesId" :label="scope.row.classesId" @change="changeId($event, scope.row)">{{ '' }}</el-radio>
</template>
</el-table-column>
<el-table-column prop="imageUrl" label="班次名称" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.classesName }}
</template>
</el-table-column>
<el-table-column prop="titleName" label="考勤时间" show-overflow-tooltip>
<template slot-scope="scope">
<div class="cell color-1890ff cursor-pointer" @click="showPreviewDetail(scope.row)">{{ scope.row.titleName || '--' }}</div>
</template>
</el-table-column>
</el-table>
<el-dialog class="edit-dialog" title="选择班次" :visible.sync="customDialog" width="600px" :before-close="handleClose">
<div class="edit-dialog-body">
<div class="m-b-20">
<el-input placeholder="请输入班次名称" v-model="classesName" class="w-264" style="width: 264px;" prefix-icon="el-icon-search" @keyup.native="value => toInput(value, classesName)" clearable @clear="clearInput"></el-input>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click.stop="customCancel">取消</el-button>
<el-button type="primary" @click.stop="customConfirm('ruleForm')">确定</el-button>
</div>
</el-dialog>
</div>
<el-table :data="tableData" style="width: 100%">
<el-table-column label="" width="50">
<template slot-scope="scope">
<el-radio v-model="selClassesId" :label="scope.row.classesId">{{ '' }}</el-radio>
</template>
</el-table-column>
<el-table-column prop="imageUrl" label="班次名称" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.classesName }}
</template>
</el-table-column>
<el-table-column prop="titleName" label="考勤时间" show-overflow-tooltip>
<template slot-scope="scope">
<div v-for="(item, index) in scope.row.classessTimesJson" :key="index + 'time'">{{ item.startTime }}-{{ item.endTime }}</div>
</template>
</el-table-column>
</el-table>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click.stop="customCancel">取消</el-button>
<el-button type="primary" @click.stop="customConfirm('ruleForm')">确定</el-button>
</div>
</el-dialog>
</template>
<script>
import { getRequest } from '@/api/api';
// import errMsg from '@/common/js/error';
// import showMsg from '@/common/js/showmsg';
import showMsg from '@/common/js/showmsg';
import { _debounce } from '@/common/js/public';
export default {
name: 'class-select',
......@@ -94,7 +92,20 @@ export default {
customConfirm: _debounce(async function() {
const that = this;
that.customDialog = false;
that.$emit('hideClassDialog', that.selClassesId);
if (!that.selClassesId) {
showMsg.showmsg('请选择班次', 'warning');
return false;
}
let obj = {};
that.tableData.forEach(ele => {
if (ele.classesId == that.selClassesId) {
obj = ele;
}
});
that.$emit('hideClassDialog', obj);
that.$nextTick(() => {
that.selClassesId = '';
});
}, 300),
/**
* 关闭
......@@ -119,6 +130,9 @@ export default {
const that = this;
that.customDialog = false;
that.$emit('hideClassDialog');
that.$nextTick(() => {
that.selClassesId = '';
});
},
/**
* 获取班次
......@@ -133,14 +147,15 @@ export default {
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
if (resData.result.list && resData.result.list.length) {
resData.result.list.forEach(ele => {
if (resData.result && resData.result.length) {
resData.result.forEach(ele => {
if (ele.classessTimesJson) {
ele.classessTimesJson = JSON.parse(ele.classessTimesJson);
}
});
}
that.tableData = resData.result.list || [];
console.log(resData.result);
that.tableData = resData.result || [];
}
})
.catch(function(error) {
......@@ -160,14 +175,19 @@ export default {
const that = this;
if (newData) {
that.selClassesId = newData;
} else {
that.selClassesId = '';
}
}
},
mounted() {
const that = this;
console.log(that.classesId);
that.getClassifyData();
if (that.classesId) {
that.selClassesId = that.classesId;
} else {
that.selClassesId = '';
}
that.customDialog = that.workClassShow;
}
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-10-21 14:27:29
* @LastEditors: 无尘
* @LastEditTime: 2019-12-17 15:58:45
* @LastEditTime: 2019-12-17 16:14:14
-->
<!--
......@@ -140,19 +140,19 @@ import createWorkClass from '@/components/app/dailyAttendance/create-work-class.
</el-form-item>
<el-form-item label="个性化设置:" prop="">
<div class="m-b-10">
<el-checkbox v-model="formData.isAllowLate">允许迟到</el-checkbox>
<el-input-number v-if="formData.isAllowLate" class="w-90 m-l-20" v-model="formData.allowLateDate" controls-position="right" :min="1" :max="3600"></el-input-number>
<span v-if="formData.isAllowLate" class="font-14 color-606266">分钟以内打上班卡不算迟到</span>
<el-checkbox v-model="formData.allowLateFlag">允许迟到</el-checkbox>
<el-input-number v-if="formData.allowLateFlag" class="w-90 m-l-20" v-model="formData.allowLateDate" controls-position="right" :min="1" :max="3600"></el-input-number>
<span v-if="formData.allowLateFlag" class="font-14 color-606266">分钟以内打上班卡不算迟到</span>
</div>
<div class="m-b-10">
<el-checkbox v-model="formData.isMoreLate">严重迟到</el-checkbox>
<el-input-number v-if="formData.isMoreLate" class="w-90 m-l-20" v-model="formData.moreLateDate" controls-position="right" :min="1" :max="3600"></el-input-number>
<span v-if="formData.isMoreLate" class="font-14 color-606266">分钟以上打上班卡算严重迟到</span>
<el-checkbox v-model="formData.moreLateFlag">严重迟到</el-checkbox>
<el-input-number v-if="formData.moreLateFlag" class="w-90 m-l-20" v-model="formData.moreLateDate" controls-position="right" :min="1" :max="3600"></el-input-number>
<span v-if="formData.moreLateFlag" class="font-14 color-606266">分钟以上打上班卡算严重迟到</span>
</div>
<div class="m-b-10">
<el-checkbox v-model="formData.isMostLate">旷工迟到</el-checkbox>
<el-input-number v-if="formData.isMostLate" class="w-90 m-l-20" v-model="formData.mostLateDate" controls-position="right" :min="1" :max="3600"></el-input-number>
<span v-if="formData.isMostLate" class="font-14 color-606266">分钟以上打上班卡算旷工</span>
<el-checkbox v-model="formData.mostLateFlag">旷工迟到</el-checkbox>
<el-input-number v-if="formData.mostLateFlag" class="w-90 m-l-20" v-model="formData.mostLateDate" controls-position="right" :min="1" :max="3600"></el-input-number>
<span v-if="formData.mostLateFlag" class="font-14 color-606266">分钟以上打上班卡算旷工</span>
</div>
<div class="m-b-10">
<el-checkbox :disabled="maxLate < 1.5" v-model="formData.lateRule" @change="handleChangeLate">晚走次日晚到</el-checkbox>
......@@ -250,9 +250,9 @@ export default {
relaxFlag: false, // 休息时间
relaxStartDate: '12:00',
relaxEndDate: '13:00',
isAllowLate: false, // 允许迟到
isMoreLate: false, // 严重迟到
isMostLate: false, // 旷工迟到
allowLateFlag: false, // 允许迟到
moreLateFlag: false, // 严重迟到
mostLateFlag: false, // 旷工迟到
allowLateDate: '30', // 允许迟到 分
moreLateDate: '35', // 严重迟到 分
mostLateDate: '60', // 旷工迟到 分
......@@ -805,23 +805,23 @@ export default {
showMsg.showmsg('请填写休息时间', 'warning');
return false;
}
if (that.formData.isAllowLate && !that.formData.allowLateDate) {
if (that.formData.allowLateFlag && !that.formData.allowLateDate) {
showMsg.showmsg('请填写允许迟到时间', 'warning');
return false;
}
if (that.formData.isMoreLate && !that.formData.moreLateDate) {
if (that.formData.moreLateFlag && !that.formData.moreLateDate) {
showMsg.showmsg('请填写严重迟到时间', 'warning');
return false;
}
if (that.formData.isAllowLate && that.formData.isMoreLate && that.formData.allowLateDate >= that.formData.moreLateDate) {
if (that.formData.allowLateFlag && that.formData.moreLateFlag && that.formData.allowLateDate >= that.formData.moreLateDate) {
showMsg.showmsg('严重迟到时间必须大于迟到允许时间', 'warning');
return false;
}
if (that.formData.isMostLate && !that.formData.mostLateDate) {
if (that.formData.mostLateFlag && !that.formData.mostLateDate) {
showMsg.showmsg('请填写旷工迟到时间', 'warning');
return false;
}
if (that.formData.isMoreLate && that.formData.isMostLate && that.formData.moreLateDate >= that.formData.mostLateDate) {
if (that.formData.moreLateFlag && that.formData.mostLateFlag && that.formData.moreLateDate >= that.formData.mostLateDate) {
showMsg.showmsg('旷工迟到时间必须大于严重迟到时间', 'warning');
return false;
}
......@@ -862,9 +862,9 @@ export default {
relaxFlag: that.formData.relaxFlag ? 1 : 0, // 休息时间
relaxStartDate: that.formData.relaxStartDate,
relaxEndDate: that.formData.relaxEndDate,
isAllowLate: that.formData.isAllowLate ? 1 : 0, // 允许迟到
isMostLate: that.formData.isMostLate ? 1 : 0, // 严重迟到
isMoreLate: that.formData.isMoreLate ? 1 : 0, // 旷工迟到
allowLateFlag: that.formData.allowLateFlag ? 1 : 0, // 允许迟到
mostLateFlag: that.formData.mostLateFlag ? 1 : 0, // 严重迟到
moreLateFlag: that.formData.moreLateFlag ? 1 : 0, // 旷工迟到
allowLateDate: that.formData.allowLateDate, // 允许迟到 分
mostLateDate: that.formData.mostLateDate, // 严重迟到 分
moreLateDate: that.formData.moreLateDate, // 旷工迟到 分
......@@ -927,9 +927,9 @@ export default {
if (resData.errorCode == 1) {
resData.result.clockType = resData.result.clockType == 1 ? true : false; // 1/0 打开时间段设置
resData.result.relaxFlag = resData.result.relaxFlag == 1 ? true : false; // 休息时间
resData.result.isAllowLate = resData.result.isAllowLate == 1 ? true : false; // 允许迟到
resData.result.isMostLate = resData.result.isMostLate == 1 ? true : false; // 严重迟到
resData.result.isMoreLate = resData.result.isMoreLate == 1 ? true : false; // 旷工迟到
resData.result.allowLateFlag = resData.result.allowLateFlag == 1 ? true : false; // 允许迟到
resData.result.mostLateFlag = resData.result.mostLateFlag == 1 ? true : false; // 严重迟到
resData.result.moreLateFlag = resData.result.moreLateFlag == 1 ? true : false; // 旷工迟到
resData.result.lateRule = resData.result.lateRule == 1 ? true : false; // 晚走次日晚到
if (resData.result.classessTimesJson) {
resData.result.classessTimesJson = JSON.parse(resData.result.classessTimesJson);
......@@ -975,9 +975,9 @@ export default {
relaxFlag: false, // 休息时间
relaxStartDate: '12:00',
relaxEndDate: '13:00',
isAllowLate: false, // 允许迟到
isMoreLate: false, // 严重迟到
isMostLate: false, // 旷工迟到
allowLateFlag: false, // 允许迟到
moreLateFlag: false, // 严重迟到
mostLateFlag: false, // 旷工迟到
allowLateDate: '30', // 允许迟到 分
moreLateDate: '35', // 严重迟到 分
mostLateDate: '60', // 旷工迟到 分
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-12-17 09:40:42
* @LastEditors: 无尘
* @LastEditTime: 2019-12-17 15:39:44
* @LastEditTime: 2019-12-17 17:04:29
-->
<!--
......@@ -91,6 +91,7 @@ export default {
geocoder.getAddress([lng, lat], function(status, result) {
if (status === 'complete' && result.info === 'OK') {
if (result && result.regeocode) {
console.log(result);
that.address = result.regeocode.formattedAddress;
that.ruleForm.address = result.regeocode.formattedAddress;
that.$nextTick();
......@@ -114,6 +115,10 @@ export default {
longitude: that.lng,
latitude: that.lat
});
that.$nextTick(() => {
that.address = '';
that.ruleForm.address = '';
});
}
});
}, 300),
......@@ -140,6 +145,10 @@ export default {
const that = this;
that.customDialog = false;
that.$emit('hideMapDialog');
that.$nextTick(() => {
that.address = '';
that.ruleForm.address = '';
});
}
},
watch: {
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-04-12 17:56:45
* @LastEditors: 无尘
* @LastEditTime: 2019-12-17 16:09:54
* @LastEditTime: 2019-12-17 17:36:44
-->
<template>
<div class="notice-list-wrap">
......@@ -118,18 +118,23 @@
<el-table ref="multipleTable" :data="ruleFormData.attenceWorkJson" tooltip-effect="dark" style="width: 567px">
<el-table-column width="55">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.workType"></el-checkbox>
<!-- <el-checkbox v-model="scope.row.workType"></el-checkbox> -->
</template>
</el-table-column>
<el-table-column label="工作日" width="120">
<template slot-scope="scope">{{ scope.row.weekDay }}</template>
</el-table-column>
<el-table-column prop="name" label="排班时间段" width="120">
<template slot-scope="scope">{{ scope.row.workType ? scope.row.weekDay : '休息' }}</template>
<template slot-scope="scope">
<div v-if="scope.row.workType">
<div v-for="(item, index) in scope.row.classessTimesJson" :key="index + 'time'">{{ item.startTime }}-{{ item.endTime }}</div>
</div>
<div v-else>休息</div>
</template>
</el-table-column>
<el-table-column prop="address" label="操作" show-overflow-tooltip>
<template slot-scope="scope">
<el-button type="text" @click.stop="modClasses(scope.row)">更改班次</el-button>
<el-button type="text" @click.stop="modClasses(scope.$index, scope.row)">更改班次</el-button>
</template>
</el-table-column>
</el-table>
......@@ -174,9 +179,39 @@
</div>
</el-form-item> -->
<el-form-item v-if="ruleFormData.attenceType == 2" label="考勤班次:" prop="">
<div class="tags-classes"></div>
<div class="tags-classes">
<div class="new-tag-schedule">
<div class="attend-type-classes">
<div class="attend-type-classes-display" data-spm-anchor-id="0.0.0.i25.23964ce3NvNZUj">
<div class="ant-tag ant-tag-blue" v-for="(pItem, pIndex) in ruleFormData.classesJson" :key="pIndex">
<span class="ant-tag-text">{{ pItem.classesName }}</span>
<span v-for="(item, index) in pItem.classessTimesJson" :key="index + 'time'">{{ item.startTime }}-{{ item.endTime }}</span>
</div>
</div>
</div>
</div>
</div>
</el-form-item>
<el-form-item v-if="ruleFormData.attenceType == 2" label="排班周期:" prop="">
<el-table :data="ruleFormData.attenceClassesRangeJSON" tooltip-effect="dark" style="width: 567px">
<el-table-column prop="ranageName" label="周期名称">
<template slot-scope="scope">{{ scope.row.ranageName }}</template>
</el-table-column>
<el-table-column prop="name" label="周期班次">
<template slot-scope="scope">
<div v-for="(item, index) in scope.row.classessTimesJson" :key="index + 'time'">{{ item.startTime }}-{{ item.endTime }}</div>
</template>
</el-table-column>
<el-table-column prop="ranageName" label="周期天数">
<template slot-scope="scope">{{ scope.row.ranageName }}</template>
</el-table-column>
<el-table-column prop="address" label="操作" show-overflow-tooltip>
<template slot-scope="scope">
<el-button type="text" @click="editRange(scope.$index, scope.row)">编辑</el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-form-item v-if="ruleFormData.attenceType == 2" label="排班周期:" prop=""> </el-form-item>
<el-form-item label="考勤方式:" prop="">
<div>
<el-checkbox v-model="ruleFormData.gpsFlag">GPS打卡</el-checkbox>
......@@ -195,7 +230,9 @@
<template slot-scope="scope">{{ scope.row.address }}</template>
</el-table-column>
<el-table-column prop="address" label="操作" show-overflow-tooltip>
<el-button type="text" @click="delGps(scope.row)" plain>删除</el-button>
<template slot-scope="scope">
<el-button type="text" @click="delGps(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
......@@ -288,19 +325,20 @@ export default {
noAdminList: [],
noStoreList: [],
lawFreeFlag: false, // 是否法定节假日自动排休
clockDistance: '', // 考勤距离
clockDistance: 300, // 考勤距离
storeClockFlag: false, // 是否开启门店打卡
gpsFlag: false, // 是否gps打卡1是0否
distanceAddress: [{ address: '', longitude: '', latitude: '' }], // 考勤地址范围集合
attenceRangeJson: [{ rangeType: '', userId: '', storeId: '', groupId: '', storeFlag: '' }],
// 需要打卡的范围1需要打卡的2无须打卡的 storeFlag 1门店架构0行政架构
distanceAddress: [], // 考勤地址范围集合{ address: '', longitude: '', latitude: '' }
attenceRangeJson: [],
// 需要打卡的范围1需要打卡的2无须打卡的 storeFlag 1门店架构0行政架构{ rangeType: '', userId: '', storeId: '', groupId: '', storeFlag: '' }
sperialRangeJson: [{ attenceDate: '', sperialType: '' }],
mustJson: [],
noMustJson: [],
//特殊考勤日期sperialType 1必须打卡0无须打卡
attenceWorkJson: [{ weekDay: '周一', workType: false, classesName: '', classesId: '', classessTimesJson: '' }, { weekDay: '周二', workType: false, classesName: '', classesId: '', classessTimesJson: '' }, { weekDay: '周三', workType: false, classesName: '', classesId: '', classessTimesJson: '' }, { weekDay: '周四', workType: false, classesName: '', classesId: '', classessTimesJson: '' }, { weekDay: '周五', workType: false, classesName: '', classesId: '', classessTimesJson: '' }, { weekDay: '周六', workType: false, classesName: '', classesId: '', classessTimesJson: '' }, { weekDay: '周日', workType: false, classesName: '', classesId: '', classessTimesJson: '' }],
// 类型上班还是休息1上班0休息
attenceClassesRangeJSON: { ranageName: '', classes: { classesId: '', times: '' } }
attenceClassesRangeJSON: [],
classesJson: []
},
rules: {
// receiveType: [{ required: true, message: '请选择发送对象', trigger: 'change' }],
......@@ -337,6 +375,9 @@ export default {
saveDataBool: true,
showEffect: false,
// 工作日设置
workClassShow: false,
modIndex: '',
modRow: {},
showClassesFlag: false,
multipleSelection: [],
distance: [
......@@ -345,12 +386,21 @@ export default {
label: '50米'
}
],
mapShow: false
mapShow: false,
// 周期
rangeShow: false
};
},
methods: {
/**
* 周期
*/
editRange(index, row) {
const that = this;
that.rangeShow = true;
},
/**
* 地图
*/
addMap() {
......@@ -364,12 +414,16 @@ export default {
if (!obj) {
return false;
}
that.distanceAddress.push({
that.ruleFormData.distanceAddress.push({
address: obj.address,
longitude: obj.longitude,
latitude: obj.latitude
});
},
delGps(index, row) {
const that = this;
that.ruleFormData.distanceAddress.splice(index, 1);
},
/**
* 工作日设置
*
......@@ -378,15 +432,26 @@ export default {
const that = this;
that.workClassShow = true;
},
modClasses(row) {
modClasses(index, row) {
const that = this;
console.log(row);
that.modIndex = index;
that.modRow = row;
that.classesId = row.classesId || '';
that.workClassShow = true;
},
hideClassDialog() {
hideClassDialog(val) {
const that = this;
that.workClassShow = false;
that.classesId = '';
if (!val) {
return false;
}
that.modRow.workType = true;
const obj = JSON.parse(JSON.stringify(val));
that.modRow.classesName = obj.classesName;
that.modRow.classesId = obj.classesId;
that.modRow.classessTimesJson = obj.classessTimesJson;
},
handleSelectionChange(val) {
const that = this;
......@@ -669,7 +734,6 @@ export default {
},
mounted() {
const that = this;
that.getClassifyData();
that.setDistance();
if (that.$route.query.attenceGroupId) {
that.$nextTick(() => {
......
......@@ -1157,3 +1157,46 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
.el-table__footer {
border-collapse: collapse !important;
}
.day-tag-blue {
background: #5e90ff;
border-color: #5e90ff;
color: #fff;
}
.day-tag-red {
background: #fb6370;
border-color: #fb6370;
color: #fff;
}
.day-tag-purple {
background: #7e6bd4;
border-color: #7e6bd4;
color: #fff;
}
.day-tag-orange {
background: #ff943e;
border-color: #ff943e;
color: #fff;
}
.day-tag-green {
background: #15bc83;
border-color: #15bc83;
color: #fff;
}
.day-tag-pink {
background: #ed4dae;
border-color: #ed4dae;
color: #fff;
}
.day-tag-cyan {
background: #3d66c3;
border-color: #3d66c3;
color: #fff;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment