| | |
| | | ref="unitMoreDialog" |
| | | @saveUnitMore="saveUnitMore" |
| | | :workList="unitList" |
| | | :unitRight='editConfig.infomation.unit' |
| | | :dataList="editConfig.infomation.moreUnitList" |
| | | title="启用多单位" |
| | | ></UnitMoreDialog> |
| | |
| | | // 启用多单位的开关 |
| | | moreUnitChange(){ |
| | | let string=false; |
| | | if(this.editConfig.infomation.moreUnitList&&this.editConfig.infomation.moreUnitList.length>0){ |
| | | for(let i in this.editConfig.infomation.moreUnitList){ |
| | | if(this.editConfig.infomation.moreUnitList[i].unit&&this.editConfig.infomation.moreUnitList[i].amount){ |
| | | string=true; |
| | | break; |
| | | if(this.editConfig.infomation.unit){ |
| | | if(this.editConfig.infomation.moreUnitList&&this.editConfig.infomation.moreUnitList.length>0){ |
| | | for(let i in this.editConfig.infomation.moreUnitList){ |
| | | if(this.editConfig.infomation.moreUnitList[i].unit&&this.editConfig.infomation.moreUnitList[i].amount){ |
| | | string=true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if(!string){ |
| | | if(!string){ |
| | | this.editConfig.infomation.moreUnit=false |
| | | this.$message.error('请先配置多单位!') |
| | | this.$refs.unitMoreDialog.editDialogVisible = true; |
| | | } |
| | | }else{ |
| | | this.editConfig.infomation.moreUnit=false |
| | | this.$message.error('请先配置多单位!') |
| | | this.$message.error('请先选择单位!') |
| | | } |
| | | |
| | | }, |
| | | handleConfirmSave(dataList) { |
| | | saveUnitDict({ data: dataList }).then((res) => { |