Browse Source

序号自动生成

master
陈裕财 5 years ago
parent
commit
d1dd751b28
  1. 18
      src/views/xm/core/xmIteration/XmIterationAdd.vue
  2. 18
      src/views/xm/core/xmMenu/XmMenuAdd.vue
  3. 16
      src/views/xm/core/xmProjectPhase/XmProjectPhaseAdd.vue
  4. 14
      src/views/xm/core/xmTask/XmTaskAdd.vue

18
src/views/xm/core/xmIteration/XmIterationAdd.vue

@ -76,6 +76,14 @@
this.addForm.branchId=this.userInfo.branchId
this.cuserid=this.userInfo.userid
this.cusername=this.userInfo.username
if(this.parentIteration){
if(this.parentIteration.children){
this.addForm.seqNo=this.parentIteration.seqNo+"."+(this.parentIteration.children.length+1)
}else{
this.addForm.seqNo=this.parentIteration.seqNo+"."+1
}
}
}
}
}
@ -160,6 +168,16 @@
this.addForm.branchId=this.userInfo.branchId
this.cuserid=this.userInfo.userid
this.cusername=this.userInfo.username
if(this.parentIteration){
if(this.parentIteration.children){
this.addForm.seqNo=this.parentIteration.seqNo+"."+(this.parentIteration.children.length+1)
}else{
this.addForm.seqNo=this.parentIteration.seqNo+"."+1
}
}
}
/**在下面写其它函数***/

18
src/views/xm/core/xmMenu/XmMenuAdd.vue

@ -11,7 +11,7 @@
</el-form-item>
<el-form-item label="序号" prop="seqNo">
<el-input v-model="addForm.seqNo" placeholder="如1.0 , 1.1 , 1.1.1等" ></el-input>
<span v-if="parentMenu" style="color:red;">建议{{parentMenu.seqNo}}.1 </span>
<span v-if="parentMenu" style="color:red;">建议{{parentMenu.seqNo}}.{{parentMenu.children?parentMenu.children.length+1:1}} </span>
</el-form-item>
<el-form-item label="故事名称" prop="menuName">
<el-input v-model="addForm.menuName" placeholder="故事名称" ></el-input>
@ -62,6 +62,14 @@
},
'visible':function(visible) {
if(visible==true){
if(this.parentMenu){
if(this.parentMenu.children){
this.addForm.seqNo=this.parentMenu.seqNo+"."+(this.parentMenu.children.length+1)
}else{
this.addForm.seqNo=this.parentMenu.seqNo+"."+1
}
}
//
}
}
@ -161,6 +169,14 @@
this.addForm.mmUserid=this.userInfo.userid
this.addForm.mmUsername=this.userInfo.username
this.addForm.remark="作为 ,我需要 ,以便我能够 。"
if(this.parentMenu){
if(this.parentMenu.children){
this.addForm.seqNo=this.parentMenu.seqNo+"."+(this.parentMenu.children.length+1)
}else{
this.addForm.seqNo=this.parentMenu.seqNo+"."+1
}
}
/**在下面写其它函数***/
}//end mounted

16
src/views/xm/core/xmProjectPhase/XmProjectPhaseAdd.vue

@ -188,6 +188,14 @@
'visible':function(visible) {
if(visible==true){
//
if(this.parentProjectPhase){
if(this.parentProjectPhase.children){
this.addForm.seqNo=this.parentProjectPhase.seqNo+"."+(this.parentProjectPhase.children.length+1)
}else{
this.addForm.seqNo=this.parentProjectPhase.seqNo+"."+1
}
}
}
},
},
@ -369,6 +377,14 @@
this.addForm=Object.assign(this.addForm, this.xmProjectPhase);
/**在下面写其它函数***/
if(this.parentProjectPhase){
if(this.parentProjectPhase.children){
this.addForm.seqNo=this.parentProjectPhase.seqNo+"."+(this.parentProjectPhase.children.length+1)
}else{
this.addForm.seqNo=this.parentProjectPhase.seqNo+"."+1
}
}
listOption([{categoryId:'all',itemCode:'planType'},{categoryId:'all',itemCode:'taskType'}]).then(res=>{
this.options=res.data.data;
})

14
src/views/xm/core/xmTask/XmTaskAdd.vue

@ -195,6 +195,13 @@
this.addForm.projectName=this.xmProject.name
this.addForm.projectPhaseId=this.projectPhase.id
this.addForm.projectPhaseName=this.projectPhase.phaseName
if(this.parentTask ){
if(this.parentTask.children){
this.addForm.sortLevel=this.parentTask.sortLevel+"."+(this.parentTask.children.length+1)
}else{
this.addForm.sortLevel=this.parentTask.sortLevel+"."+1
}
}
this.addForm.id = sn();
//
}
@ -429,6 +436,13 @@
this.addForm.projectName=this.xmProject.name
this.addForm.projectPhaseId=this.projectPhase.id
this.addForm.projectPhaseName=this.projectPhase.phaseName
if(this.parentTask ){
if(this.parentTask.children){
this.addForm.sortLevel=this.parentTask.sortLevel+"."+(this.parentTask.children.length+1)
}else{
this.addForm.sortLevel=this.parentTask.sortLevel+"."+1
}
}
this.addForm.id = sn();
listOption([{categoryId:'all',itemCode:'planType'},{categoryId:'all',itemCode:'taskType'},{categoryId:'all',itemCode:'urgencyLevel'},{categoryId:'all',itemCode:'priority'},{categoryId:'all',itemCode:'xmTaskSettleSchemel'}]).then(res=>{
this.options=res.data.data;

Loading…
Cancel
Save