修改 标准征求意见流程 意见反馈 回执说明为必填项

This commit is contained in:
baoyu
2024-04-10 09:42:49 +08:00
parent 9e35c9734a
commit 52c8386b34
@@ -176,13 +176,18 @@
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
</el-table> </el-table>
<ReceiptDescription <el-form ref="commentForm" :model="commentForm" :rules="commentFormRules">
title="回执说明" <div class="title" style="height: 48px;line-height: 48px"><span class="requiredTag">*</span>回执说明</div>
isItem <el-form-item prop="commentText3" label-width="0">
v-model="commentText3" <el-input
prop="commentText3" type="textarea"
:rules="{myProp: [{ required: true, message: '回执说明不能为空', trigger: 'blur' }]}" :autosize="{ minRows: 3 }"
></ReceiptDescription> resize="none"
placeholder="请输入意见"
v-model="commentForm.commentText3">
</el-input>
</el-form-item>
</el-form>
</div> </div>
<!--<el-collapse accordion>--> <!--<el-collapse accordion>-->
<!-- <el-collapse-item title="回执说明">--> <!-- <el-collapse-item title="回执说明">-->
@@ -357,6 +362,10 @@
name: "bzzqyjStep3", name: "bzzqyjStep3",
data() { data() {
return { return {
commentForm: {},
commentFormRules:{
commentText3:[{required: true, message: '回执说明不能为空',trigger: 'blur'}]
},
standId: '', standId: '',
modaltitle2: '', modaltitle2: '',
addType: '', addType: '',
@@ -611,7 +620,7 @@
_formData.append("taskIds", this.taskIds); _formData.append("taskIds", this.taskIds);
_formData.append("json", JSON.stringify({ _formData.append("json", JSON.stringify({
form: json, form: json,
commentText3: this.commentText3 commentText3: this.commentForm.commentText3
})); }));
saveTaskForPub(_formData).then(res => { saveTaskForPub(_formData).then(res => {
this.saveLoading = false; this.saveLoading = false;
@@ -641,74 +650,78 @@
}) })
}, },
handleSubmit() { handleSubmit() {
if (this.data.length < 1) { this.$refs.commentForm.validate(valid => {
this.isSubmit = true if (valid){
this.saveLoading = true if (this.data.length < 1) {
var json = this.json this.isSubmit = true
json.onlyKey = this.onlyKey this.saveLoading = true
json.commentText = this.commentText3 var json = this.json
json.info = [] json.onlyKey = this.onlyKey
json.form = this.form json.commentText = this.commentForm.commentText3
json.department = this.$store.getters.userInfo.orgName json.info = []
console.log(json) json.form = this.form
this.$http.post('lawss/activiti/completeTask', { json.department = this.$store.getters.userInfo.orgName
console.log(json)
this.$http.post('lawss/activiti/completeTask', {
json: JSON.stringify(json), json: JSON.stringify(json),
taskId: this.taskIds, taskId: this.taskIds,
userId: this.$store.getters.userInfo.userId userId: this.$store.getters.userInfo.userId
}, {}, res => { }, {}, res => {
if (res.success) { if (res.success) {
this.$message.success('提交成功') this.$message.success('提交成功')
this.$router.push('/processCenter') this.$router.push('/processCenter')
} }
this.isSubmit = false this.isSubmit = false
this.saveLoading = false this.saveLoading = false
}) })
} else { } else {
var a = 0 var a = 0
var b = 0 var b = 0
// var c = 0 // var c = 0
for (let s1 = 0; s1 < this.data.length; s1++) { for (let s1 = 0; s1 < this.data.length; s1++) {
if (!this.data[s1].chapterNumber) { if (!this.data[s1].chapterNumber) {
a++ a++
} }
if (!this.data[s1].chapterName) { if (!this.data[s1].chapterName) {
b++ b++
} }
// if (!this.data[s1].commentText) { // if (!this.data[s1].commentText) {
// c++ // c++
// } // }
} }
if (a > 0) { if (a > 0) {
this.$message.warning('请输入章节编号') this.$message.warning('请输入章节编号')
} else if (b > 0) { } else if (b > 0) {
this.$message.warning('请输入章节名称') this.$message.warning('请输入章节名称')
} }
// else if (c > 0) { // else if (c > 0) {
// this.$message.warning('请输入意见内容') // this.$message.warning('请输入意见内容')
// } // }
else { else {
this.isSubmit = true this.isSubmit = true
this.saveLoading = true this.saveLoading = true
var json = this.json var json = this.json
json.commentText = this.commentText3 json.commentText = this.commentForm.commentText3
json.info = this.data json.info = this.data
json.form = this.form json.form = this.form
json.department = this.$store.getters.userInfo.orgName json.department = this.$store.getters.userInfo.orgName
json.onlyKey = this.onlyKey json.onlyKey = this.onlyKey
this.$http.post('lawss/activiti/completeTask', { this.$http.post('lawss/activiti/completeTask', {
json: JSON.stringify(json), json: JSON.stringify(json),
taskId: this.taskIds, taskId: this.taskIds,
userId: this.$store.getters.userInfo.userId userId: this.$store.getters.userInfo.userId
}, {}, res => { }, {}, res => {
if (res.success) { if (res.success) {
this.$message.success('提交成功') this.$message.success('提交成功')
this.$router.push('/processCenter') this.$router.push('/processCenter')
} }
this.isSubmit = false this.isSubmit = false
this.saveLoading = false this.saveLoading = false
}) })
}
} }
} }
})
}, },
getItemList (standId, fileType) { // 查询分解单条款数据 getItemList (standId, fileType) { // 查询分解单条款数据
this.$http.get('SarStandItems/sar-stand-items/querySarItemAndInterpretation', { this.$http.get('SarStandItems/sar-stand-items/querySarItemAndInterpretation', {
@@ -739,7 +752,7 @@
this.acceptShow = false this.acceptShow = false
this.submitShow = true this.submitShow = true
} }
this.commentText3 = data.commentText3 || '' this.commentForm.commentText3 = data.commentText3 || ''
this.form.presidentUser = data.form ? data.form.presidentUser :data.presidentUser this.form.presidentUser = data.form ? data.form.presidentUser :data.presidentUser
this.form.presidentUserName = data.form ? data.form.presidentUserName : data.presidentUserName this.form.presidentUserName = data.form ? data.form.presidentUserName : data.presidentUserName
this.form.fjList = data.form ? data.form.fjList : (data.fjList ? data.fjList : [] ) this.form.fjList = data.form ? data.form.fjList : (data.fjList ? data.fjList : [] )
@@ -779,6 +792,12 @@
<style lang="less" scoped> <style lang="less" scoped>
@import '~@/assets/styles/style'; @import '~@/assets/styles/style';
.requiredTag{
color: #f56c6c;
margin-right: 4px;
font-size: 14px;
}
.bzdyStep3 { .bzdyStep3 {
/deep/.zTable_style { /deep/.zTable_style {
border-bottom: 1px solid #d1d1d1; border-bottom: 1px solid #d1d1d1;