diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue
index 70c4173..64e5640 100644
--- a/src/views/attendance/editRemarks.vue
+++ b/src/views/attendance/editRemarks.vue
@@ -267,6 +267,16 @@
add() {
this.resetForm()
this.addShow = true
+ if(this.remarksTypeList.length === 1){
+ this.remarksForm.remarksType = this.remarksTypeList[0].id
+ } else {
+ for(var i=0; i
+
+
+
+
+
+
生成报表
@@ -32,12 +48,43 @@
export default {
name: 'MakeReport',
data() {
+ const validateMonth = (value, callback) => {
+ if (this.form.beginDate === '' && this.form.endDate == '' && value === '') {
+ if (reg.test(value)) {
+ callback(new Error('请选择考勤月或起止日期'))
+ }
+ } else {
+ callback()
+ }
+ }
+ const validateBeginDate = (value, callback) => {
+ if (this.form.beginDate === '' && this.form.endDate == '' && value === '') {
+ if (reg.test(value)) {
+ callback(new Error('请选择考勤月或起止日期'))
+ }
+ } else {
+ callback()
+ }
+ }
+ const validateEndDate = (value, callback) => {
+ if (this.form.beginDate === '' && this.form.endDate == '' && value === '') {
+ if (reg.test(value)) {
+ callback(new Error('请选择考勤月或起止日期'))
+ }
+ } else {
+ callback()
+ }
+ }
return {
form: {
- month: ''
+ month: '',
+ beginDate: '',
+ endDate: ''
},
rules: {
- month: [{ required: true, message: '请选择考勤月', trigger: ['blur', 'change'] }]
+ month: [{ validator: 'validateMonth', trigger: ['blur', 'change'] }],
+ beginDate: [{ validator: 'validateBeginDate', trigger: ['blur', 'change'] }],
+ endDate: [{ validator: 'validateEndDate', trigger: ['blur', 'change'] }]
},
pickerOptions: {
disabledDate: (time) => {