diff --git a/src/views/business/form/drug/comp/edit.vue b/src/views/business/form/drug/comp/edit.vue index 921ef9e..4f90ee1 100644 --- a/src/views/business/form/drug/comp/edit.vue +++ b/src/views/business/form/drug/comp/edit.vue @@ -118,7 +118,7 @@ export default { if (valid) { this.infoDialog.formData.status = status if(status === 3){ - this.$refs.editSignRef.show(this.oldStatus==1?this.$t('page.business.study.drug.submit'):this.$t('page.business.study.drug.xgsy'),this.oldStatus==1?this.$t('page.business.study.drug.create'):this.$t('page.business.study.drug.xgsy')) + this.$refs.editSignRef.show(this.oldStatus==1?this.$t('page.business.study.drug.submit'):this.$t('page.business.study.drug.xgsy'),this.oldStatus==1?this.$t('page.business.study.drug.create'):this.$t('page.business.study.drug.xgsy'),false,null,this.oldStatus!=1,this.oldStatus!=1) }else{ this.doSave({}) } diff --git a/src/views/business/form/drug/comp/sign.vue b/src/views/business/form/drug/comp/sign.vue index 97dedfc..e9054be 100644 --- a/src/views/business/form/drug/comp/sign.vue +++ b/src/views/business/form/drug/comp/sign.vue @@ -5,7 +5,7 @@ - + @@ -18,7 +18,7 @@ - + @@ -89,7 +89,9 @@ export default { message: ' ', trigger: 'change' }] - } + }, + + isReson:false } }, computed: { @@ -97,9 +99,9 @@ export default { created() { }, methods: { - show(title,qmyy,showDate) { + show(title,qmyy,showDate,selectedDate,isReson,reasonRequired) { this.showDate = showDate==undefined?false:showDate - this.dateArr = [] + this.dateArr = selectedDate || [] this.title = title this.form = { qmyy:qmyy, @@ -108,11 +110,45 @@ export default { qmrMc:this.$store.getters.nickName, qmrMcEn:this.$store.getters.name, qmrmm:'', - startDate:'', - endDate:'' + startDate:selectedDate&&selectedDate.length>0?selectedDate[0]:'', + endDate:selectedDate&&selectedDate.length>1?selectedDate[1]:'' } this.resetForm("signForm") this.open = true + + this.isReson = isReson || false + if(reasonRequired){ + this.rules ={ + qmrmm: [{ + required: true, + message: ' ', + trigger: 'blur' + }], + startDate: [{ + required: true, + message: ' ', + trigger: 'change' + }], + remark: [{ + required: true, + message: ' ', + trigger: 'blur' + }] + } + }else{ + this.rules ={ + qmrmm: [{ + required: true, + message: ' ', + trigger: 'blur' + }], + startDate: [{ + required: true, + message: ' ', + trigger: 'change' + }] + } + } }, cancel() { this.open = false diff --git a/src/views/business/form/nonTrial/comp/edit.vue b/src/views/business/form/nonTrial/comp/edit.vue index 4939b91..36927b3 100644 --- a/src/views/business/form/nonTrial/comp/edit.vue +++ b/src/views/business/form/nonTrial/comp/edit.vue @@ -118,7 +118,7 @@ export default { if (valid) { this.infoDialog.formData.status = status if(status === 3){ - this.$refs.editSignRef.show(this.oldStatus==1?this.$t('page.business.study.nonTrial.submit'):this.$t('page.business.study.nonTrial.xgsy'),this.oldStatus==1?this.$t('page.business.study.nonTrial.create'):this.$t('page.business.study.nonTrial.xgsy')) + this.$refs.editSignRef.show(this.oldStatus==1?this.$t('page.business.study.nonTrial.submit'):this.$t('page.business.study.nonTrial.xgsy'),this.oldStatus==1?this.$t('page.business.study.nonTrial.create'):this.$t('page.business.study.nonTrial.xgsy'),false,null,this.oldStatus!=1,this.oldStatus!=1) }else{ this.doSave({}) } diff --git a/src/views/business/form/nonTrial/comp/sign.vue b/src/views/business/form/nonTrial/comp/sign.vue index 9357bfc..e9054be 100644 --- a/src/views/business/form/nonTrial/comp/sign.vue +++ b/src/views/business/form/nonTrial/comp/sign.vue @@ -18,7 +18,7 @@ - + @@ -89,7 +89,9 @@ export default { message: ' ', trigger: 'change' }] - } + }, + + isReson:false } }, computed: { @@ -97,9 +99,9 @@ export default { created() { }, methods: { - show(title,qmyy,showDate) { + show(title,qmyy,showDate,selectedDate,isReson,reasonRequired) { this.showDate = showDate==undefined?false:showDate - this.dateArr = [] + this.dateArr = selectedDate || [] this.title = title this.form = { qmyy:qmyy, @@ -108,11 +110,45 @@ export default { qmrMc:this.$store.getters.nickName, qmrMcEn:this.$store.getters.name, qmrmm:'', - startDate:'', - endDate:'' + startDate:selectedDate&&selectedDate.length>0?selectedDate[0]:'', + endDate:selectedDate&&selectedDate.length>1?selectedDate[1]:'' } this.resetForm("signForm") this.open = true + + this.isReson = isReson || false + if(reasonRequired){ + this.rules ={ + qmrmm: [{ + required: true, + message: ' ', + trigger: 'blur' + }], + startDate: [{ + required: true, + message: ' ', + trigger: 'change' + }], + remark: [{ + required: true, + message: ' ', + trigger: 'blur' + }] + } + }else{ + this.rules ={ + qmrmm: [{ + required: true, + message: ' ', + trigger: 'blur' + }], + startDate: [{ + required: true, + message: ' ', + trigger: 'change' + }] + } + } }, cancel() { this.open = false diff --git a/src/views/business/study/comp/edit.vue b/src/views/business/study/comp/edit.vue index 1234ecd..39969d8 100644 --- a/src/views/business/study/comp/edit.vue +++ b/src/views/business/study/comp/edit.vue @@ -118,7 +118,7 @@ export default { if (valid) { this.infoDialog.formData.status = status if(status === 3){ - this.$refs.editSignRef.show(this.oldStatus==1?this.$t('page.business.study.study.submit'):this.$t('page.business.study.study.xgsy'),this.oldStatus==1?this.$t('page.business.study.study.create'):this.$t('page.business.study.study.xgsy')) + this.$refs.editSignRef.show(this.oldStatus==1?this.$t('page.business.study.study.submit'):this.$t('page.business.study.study.xgsy'),this.oldStatus==1?this.$t('page.business.study.study.create'):this.$t('page.business.study.study.xgsy'),false,null,this.oldStatus!=1,this.oldStatus!=1) }else{ this.doSave({}) }