|
|
|
@ -171,8 +171,14 @@ |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
<div v-if="item.columnProp === 'active'"> |
|
|
|
<el-tag v-if="scope.row[item.columnProp] === 'Y'" type="success">启用</el-tag> |
|
|
|
<el-tag v-if="scope.row[item.columnProp] === 'N'" type="danger">禁用</el-tag> |
|
|
|
</div> |
|
|
|
<div v-else> |
|
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
@ -223,14 +229,6 @@ |
|
|
|
<el-option label="3" value = 3></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="状态" prop="active" :rules="rules.active"> |
|
|
|
<el-select v-model="modalData.active" :disabled="!modalDisableFlag" style="width: 110px"> |
|
|
|
<el-option label="启用" value="Y"></el-option> |
|
|
|
<el-option label="禁用" value="N"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="业务类型" prop="recordType" :rules="rules.recordType"> |
|
|
|
<!-- <el-input style="width: 135px;" v-model="saveAuditRuleData.recordTypeDb"></el-input>--> |
|
|
|
<el-select v-model="modalData.recordType" placeholder= |
|
|
|
@ -243,6 +241,18 @@ |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-checkbox v-model="modalData.isSimultaneous">是否同时 |
|
|
|
</el-checkbox> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="状态" prop="active" :rules="rules.active"> |
|
|
|
<el-select v-model="modalData.active" :disabled="!modalDisableFlag" style="width: 110px"> |
|
|
|
<el-option label="启用" value="Y"></el-option> |
|
|
|
<el-option label="禁用" value="N"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="启用日期" prop="phaseInDate" :rules="rules.phaseInDate"> |
|
|
|
<el-date-picker v-model="modalData.phaseInDate" type="date" placeholder="选择日期" style="width: 150px"></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
@ -398,6 +408,7 @@ export default { |
|
|
|
userName: this.$store.state.user.name, |
|
|
|
buNo: '', |
|
|
|
recordType: '', |
|
|
|
isSimultaneous: false, |
|
|
|
authRuleId: '', |
|
|
|
ruleNo: '', |
|
|
|
ruleDesc: '', |
|
|
|
@ -1034,6 +1045,13 @@ export default { |
|
|
|
handler: function (newV, oldV) { |
|
|
|
this.ruleStepModalData.authGroupNo = this.ruleStepModalData.authGroupNo.toUpperCase() |
|
|
|
} |
|
|
|
}, |
|
|
|
// 监听 modalData.recordType 的变化,动态设置 isSimultaneous |
|
|
|
'modalData.recordType': function (newVal) { |
|
|
|
if (this.modalData.flag === '1') { |
|
|
|
// 根据 recordType 的值设置 isSimultaneous |
|
|
|
this.modalData.isSimultaneous = newVal === 2 && newVal !== undefined; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
@ -1167,6 +1185,7 @@ export default { |
|
|
|
priority: 1, |
|
|
|
phaseInDate: new Date(), |
|
|
|
active: 'Y', |
|
|
|
isSimultaneous: false, |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
} |
|
|
|
this.modalDisableFlag = false |
|
|
|
@ -1209,13 +1228,6 @@ export default { |
|
|
|
* @param row |
|
|
|
*/ |
|
|
|
updateModal (row) { |
|
|
|
if (row.active) { |
|
|
|
if (row.active === '启用') { |
|
|
|
row.active = 'Y' |
|
|
|
} else { |
|
|
|
row.active = 'N' |
|
|
|
} |
|
|
|
} |
|
|
|
this.modalData = { |
|
|
|
flag: '2', |
|
|
|
title: '审批规则编辑', |
|
|
|
@ -1233,6 +1245,7 @@ export default { |
|
|
|
phaseOutDate: row.phaseOutDate, |
|
|
|
remark: row.remark, |
|
|
|
active: row.active, |
|
|
|
isSimultaneous: row.isSimultaneous, |
|
|
|
createBy: row.createBy, |
|
|
|
createDate: row.createDate, |
|
|
|
updateBy: this.$store.state.user.name, |
|
|
|
@ -1400,17 +1413,19 @@ export default { |
|
|
|
} |
|
|
|
if (this.ruleStepDataList != null && this.ruleStepDataList.length > 0) { |
|
|
|
for (let i = 0; i < this.ruleStepDataList.length; i++) { |
|
|
|
if(this.ruleStepModalData.firstStepFlag === 'Y' && this.ruleStepDataList[i].firstStepFlag === 'Y') { |
|
|
|
this.$alert('该审批步骤下已存在首步骤!', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
if(this.ruleStepModalData.lastStepFlag === 'Y' && this.ruleStepDataList[i].lastStepFlag === 'Y') { |
|
|
|
this.$alert('该审批步骤下已存在末步骤!', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return |
|
|
|
if (this.ruleStepModalData.stepNo !== this.ruleStepDataList[i].stepNo) { |
|
|
|
if(this.ruleStepModalData.firstStepFlag === 'Y' && this.ruleStepDataList[i].firstStepFlag === 'Y') { |
|
|
|
this.$alert('该审批步骤下已存在首步骤!', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
if(this.ruleStepModalData.lastStepFlag === 'Y' && this.ruleStepDataList[i].lastStepFlag === 'Y') { |
|
|
|
this.$alert('该审批步骤下已存在末步骤!', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|