流程保存
This commit is contained in:
@@ -678,7 +678,6 @@ export default {
|
||||
taskIds: this.taskIds,
|
||||
pId: this.pId
|
||||
}).then(res => {
|
||||
console.log(res.mesg)
|
||||
if (res) {
|
||||
const processForm = JSON.parse(res.mesg)
|
||||
this.getFormFieldList(processForm)
|
||||
@@ -718,22 +717,19 @@ export default {
|
||||
this.saveLoading = true;
|
||||
let _formData = new FormData();
|
||||
_formData.append("id", this.bpnId || "");
|
||||
_formData.append("createUser", this.$store.getters.userInfo.userId);
|
||||
_formData.append("createUserName", this.$store.getters.userInfo.userName);
|
||||
_formData.append("prcType", "4");
|
||||
_formData.append('taskIds', this.taskIds)
|
||||
_formData.append("json", JSON.stringify({
|
||||
form: this.listForm,
|
||||
commentText: this.commentText
|
||||
}));
|
||||
|
||||
// saveTaskForPub(_formData).then(res => {
|
||||
// this.saveLoading = false;
|
||||
// this.$message.success("保存成功");
|
||||
// this.bpnId = res.result;
|
||||
// }).catch(e => {
|
||||
// this.saveLoading = false;
|
||||
// });
|
||||
saveTaskForPub(_formData).then(res => {
|
||||
this.saveLoading = false;
|
||||
this.$message.success("保存成功");
|
||||
this.bpnId = res.result;
|
||||
}).catch(e => {
|
||||
this.saveLoading = false;
|
||||
});
|
||||
},
|
||||
//提交事件
|
||||
handleSubmit() {
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
import ProcessHeader from "../../components/ProcessHeader";
|
||||
import ProcessFooter from "../../components/ProcessFooter";
|
||||
import ProcessTitle from "../../components/ProcessTitle";
|
||||
import { inboundLiaisonDetail, queryDetail } from "api/process";
|
||||
import { inboundLiaisonDetail, saveTaskForPub } from "api/process";
|
||||
|
||||
export default {
|
||||
name: "xmpgStep3",
|
||||
@@ -348,7 +348,6 @@ export default {
|
||||
taskIds: this.taskIds,
|
||||
pId: this.pId
|
||||
}).then(res => {
|
||||
console.log(res.mesg)
|
||||
if (res) {
|
||||
const processForm = JSON.parse(res.mesg);
|
||||
this.getFormFieldList(processForm);
|
||||
@@ -362,36 +361,41 @@ export default {
|
||||
*/
|
||||
getFormFieldList(item) {
|
||||
this.listForm = JSON.parse(JSON.stringify(item));
|
||||
this.listForm.prcNum = this.prcNum;
|
||||
this.listForm.prcName = this.prcName;
|
||||
this.listForm["id"] = item.id;
|
||||
this.listForm = JSON.parse(JSON.stringify(item.pepdtos[0]));
|
||||
this.listForm.breakdownList = [];
|
||||
for (let i = 0; i < item.pepdtos.length; i++) {
|
||||
for (let j = 0; j < item.pepdtos[i].breakdownList.length; j++) {
|
||||
this.listForm.breakdownList.push({
|
||||
itemsName: item.pepdtos[i].breakdownList[j].itemsName,
|
||||
itemNum: item.pepdtos[i].breakdownList[j].itemsNum,
|
||||
responsibleEngineer: item.pepdtos[i].breakdownList[j].responsibleEngineer,
|
||||
responsibleUnit: item.pepdtos[i].breakdownList[j].responsibleUnit,
|
||||
productLine: item.pepdtos[i].sarStandProjectLibraries.productLine,
|
||||
projectNumber: item.pepdtos[i].sarStandProjectLibraries.projectNumber,
|
||||
projectName: item.pepdtos[i].sarStandProjectLibraries.projectName,
|
||||
implementer: item.pepdtos[i].breakdownList[j].implementer || null,
|
||||
distributePerson: item.pepdtos[i].distributePerson,
|
||||
distributePersonId: item.pepdtos[i].distributePersonId,
|
||||
uname: item.pepdtos[i].uname,
|
||||
projectManager: item.pepdtos[i].projectManager,
|
||||
certifiedEngineerName: item.pepdtos[i].certifiedEngineerName,
|
||||
qualityEngineerName: item.pepdtos[i].qualityEngineerName,
|
||||
standNumber: item.pepdtos[i].standNumber,
|
||||
standName: item.pepdtos[i].standName,
|
||||
xCXSSRQ: item.pepdtos[i].xCXSSRQ,
|
||||
zCCSSRQ: item.pepdtos[i].zCCSSRQ
|
||||
});
|
||||
if(item.form === undefined){
|
||||
this.listForm.prcNum = this.prcNum;
|
||||
this.listForm.prcName = this.prcName;
|
||||
this.listForm["id"] = item.id;
|
||||
this.listForm = JSON.parse(JSON.stringify(item.pepdtos[0]));
|
||||
this.listForm.breakdownList = [];
|
||||
for (let i = 0; i < item.pepdtos.length; i++) {
|
||||
for (let j = 0; j < item.pepdtos[i].breakdownList.length; j++) {
|
||||
this.listForm.breakdownList.push({
|
||||
itemsName: item.pepdtos[i].breakdownList[j].itemsName,
|
||||
itemNum: item.pepdtos[i].breakdownList[j].itemsNum,
|
||||
responsibleEngineer: item.pepdtos[i].breakdownList[j].responsibleEngineer,
|
||||
responsibleUnit: item.pepdtos[i].breakdownList[j].responsibleUnit,
|
||||
productLine: item.pepdtos[i].sarStandProjectLibraries.productLine,
|
||||
projectNumber: item.pepdtos[i].sarStandProjectLibraries.projectNumber,
|
||||
projectName: item.pepdtos[i].sarStandProjectLibraries.projectName,
|
||||
implementer: item.pepdtos[i].breakdownList[j].implementer || null,
|
||||
distributePerson: item.pepdtos[i].distributePerson,
|
||||
distributePersonId: item.pepdtos[i].distributePersonId,
|
||||
uname: item.pepdtos[i].uname,
|
||||
projectManager: item.pepdtos[i].projectManager,
|
||||
certifiedEngineerName: item.pepdtos[i].certifiedEngineerName,
|
||||
qualityEngineerName: item.pepdtos[i].qualityEngineerName,
|
||||
standNumber: item.pepdtos[i].standNumber,
|
||||
standName: item.pepdtos[i].standName,
|
||||
xCXSSRQ: item.pepdtos[i].xCXSSRQ,
|
||||
zCCSSRQ: item.pepdtos[i].zCCSSRQ
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.listForm = item.form
|
||||
this.listForm.breakdownList = item.form.breakdownList
|
||||
}
|
||||
console.log(this.listForm.breakdownList);
|
||||
|
||||
},
|
||||
checkedRole (data) {
|
||||
if (this.type === 1) {
|
||||
@@ -441,6 +445,22 @@ export default {
|
||||
|
||||
//保存事件
|
||||
handleSave() {
|
||||
this.saveLoading = true;
|
||||
let _formData = new FormData();
|
||||
_formData.append("id", this.bpnId || "");
|
||||
_formData.append("prcType", "5");
|
||||
_formData.append('taskIds', this.taskIds)
|
||||
_formData.append("json", JSON.stringify({
|
||||
form: this.listForm,
|
||||
commentText: this.commentText
|
||||
}));
|
||||
saveTaskForPub(_formData).then(res => {
|
||||
this.saveLoading = false;
|
||||
this.$message.success("保存成功");
|
||||
this.bpnId = res.result;
|
||||
}).catch(e => {
|
||||
this.saveLoading = false;
|
||||
});
|
||||
},
|
||||
//提交事件
|
||||
handleSubmit() {
|
||||
|
||||
@@ -347,7 +347,7 @@
|
||||
import ProcessHeader from "../../components/ProcessHeader";
|
||||
import ProcessFooter from "../../components/ProcessFooter";
|
||||
import ProcessTitle from "../../components/ProcessTitle";
|
||||
import { inboundLiaisonDetail, queryDetail } from "api/process";
|
||||
import { inboundLiaisonDetail, saveTaskForPub } from "api/process";
|
||||
|
||||
export default {
|
||||
name: "xmpgStep4",
|
||||
@@ -454,36 +454,59 @@ export default {
|
||||
getFormFieldList(item) {
|
||||
this.$nextTick(() => {
|
||||
this.listForm = JSON.parse(JSON.stringify(item));
|
||||
if (item.fenFlag === undefined ) {
|
||||
item.step3DTOS.forEach(item => {
|
||||
item.implementerId = this.$store.getters.userInfo.userId
|
||||
item.implementer = this.$store.getters.userInfo.userName
|
||||
})
|
||||
this.dataList = item.step3DTOS;
|
||||
if(item.form === undefined){
|
||||
if (item.fenFlag === undefined ) {
|
||||
item.step3DTOS.forEach(item => {
|
||||
item.implementerId = this.$store.getters.userInfo.userId
|
||||
item.implementer = this.$store.getters.userInfo.userName
|
||||
})
|
||||
this.dataList = item.step3DTOS;
|
||||
} else {
|
||||
this.dataList = item.dataList;
|
||||
this.dataList.forEach(item => {
|
||||
item.implementerId = this.$store.getters.userInfo.userId
|
||||
item.implementer = this.$store.getters.userInfo.userName
|
||||
})
|
||||
}
|
||||
this.listForm.prcNum = this.prcNum;
|
||||
this.listForm.prcName = this.prcName;
|
||||
this.listForm["id"] = item.id;
|
||||
this.listForm.standName = item.step3DTOS[0].standName;
|
||||
this.listForm.standNumber = item.step3DTOS[0].standNumber;
|
||||
this.listForm.qualityEngineerName = item.step3DTOS[0].qualityEngineerName;
|
||||
this.listForm.certifiedEngineerName = item.step3DTOS[0].certifiedEngineerName;
|
||||
this.listForm.itemsName = item.step3DTOS[0].itemsName;
|
||||
this.listForm.itemNum = item.step3DTOS[0].itemNum;
|
||||
this.listForm.responsibleUnit = item.step3DTOS[0].responsibleUnit;
|
||||
this.listForm.responsibleEngineer = item.step3DTOS[0].responsibleEngineer;
|
||||
} else {
|
||||
this.dataList = item.dataList;
|
||||
this.dataList.forEach(item => {
|
||||
item.implementerId = this.$store.getters.userInfo.userId
|
||||
item.implementer = this.$store.getters.userInfo.userName
|
||||
})
|
||||
this.listForm = item.form
|
||||
this.dataList = item.form.dataList
|
||||
}
|
||||
this.listForm.prcNum = this.prcNum;
|
||||
this.listForm.prcName = this.prcName;
|
||||
this.listForm["id"] = item.id;
|
||||
this.listForm.standName = item.step3DTOS[0].standName;
|
||||
this.listForm.standNumber = item.step3DTOS[0].standNumber;
|
||||
this.listForm.qualityEngineerName = item.step3DTOS[0].qualityEngineerName;
|
||||
this.listForm.certifiedEngineerName = item.step3DTOS[0].certifiedEngineerName;
|
||||
this.listForm.itemsName = item.step3DTOS[0].itemsName;
|
||||
this.listForm.itemNum = item.step3DTOS[0].itemNum;
|
||||
this.listForm.responsibleUnit = item.step3DTOS[0].responsibleUnit;
|
||||
this.listForm.responsibleEngineer = item.step3DTOS[0].responsibleEngineer;
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
//保存事件
|
||||
handleSave() {
|
||||
this.saveLoading = true;
|
||||
let _formData = new FormData();
|
||||
this.listForm.dataList = this.dataList;
|
||||
_formData.append("id", this.bpnId || "");
|
||||
_formData.append("prcType", "5");
|
||||
_formData.append('taskIds', this.taskIds)
|
||||
_formData.append("json", JSON.stringify({
|
||||
form:this.listForm,
|
||||
commentText: this.commentText
|
||||
}));
|
||||
saveTaskForPub(_formData).then(res => {
|
||||
this.saveLoading = false;
|
||||
this.$message.success("保存成功");
|
||||
this.bpnId = res.result;
|
||||
}).catch(e => {
|
||||
this.saveLoading = false;
|
||||
});
|
||||
},
|
||||
//提交事件
|
||||
handleSubmit() {
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
import ProcessHeader from "../../components/ProcessHeader";
|
||||
import ProcessFooter from "../../components/ProcessFooter";
|
||||
import ProcessTitle from "../../components/ProcessTitle";
|
||||
import { inboundLiaisonDetail, queryDetail } from "api/process";
|
||||
import { inboundLiaisonDetail, saveTaskForPub } from "api/process";
|
||||
|
||||
export default {
|
||||
name: "xmpg2Step3",
|
||||
@@ -339,18 +339,39 @@ export default {
|
||||
getFormFieldList(item) {
|
||||
this.$nextTick(() => {
|
||||
this.listForm = JSON.parse(JSON.stringify(item));
|
||||
this.listForm.prcNum = this.prcNum;
|
||||
this.listForm.prcName = this.prcName;
|
||||
this.listForm["id"] = item.id;
|
||||
this.listForm.dataList = item.dataList;
|
||||
this.dataList = item.dataList;
|
||||
this.dataList.distributePerson = item.dataList[0].distributePerson;
|
||||
this.listForm.breakdownList = item.breakdownList;
|
||||
if (item.form === undefined) {
|
||||
this.listForm.prcNum = this.prcNum;
|
||||
this.listForm.prcName = this.prcName;
|
||||
this.listForm["id"] = item.id;
|
||||
this.listForm.dataList = item.dataList;
|
||||
this.dataList = item.dataList;
|
||||
this.dataList.distributePerson = item.dataList[0].distributePerson;
|
||||
this.listForm.breakdownList = item.breakdownList;
|
||||
} else {
|
||||
this.listForm = item.form
|
||||
this.dataList = item.form.dataList
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
//保存事件
|
||||
handleSave() {
|
||||
|
||||
this.saveLoading = true;
|
||||
let _formData = new FormData();
|
||||
_formData.append("id", this.bpnId || "");
|
||||
_formData.append("prcType", "6");
|
||||
_formData.append("taskIds", this.taskIds);
|
||||
_formData.append("json", JSON.stringify({
|
||||
form: this.listForm,
|
||||
commentText: this.commentText
|
||||
}));
|
||||
saveTaskForPub(_formData).then(res => {
|
||||
this.saveLoading = false;
|
||||
this.$message.success("保存成功");
|
||||
this.bpnId = res.result;
|
||||
}).catch(e => {
|
||||
this.saveLoading = false;
|
||||
});
|
||||
},
|
||||
//提交事件
|
||||
handleSubmit() {
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
import ProcessHeader from "../../components/ProcessHeader";
|
||||
import ProcessFooter from "../../components/ProcessFooter";
|
||||
import ProcessTitle from "../../components/ProcessTitle";
|
||||
import { inboundLiaisonDetail, queryDetail } from "api/process";
|
||||
import { inboundLiaisonDetail, saveTaskForPub } from "api/process";
|
||||
|
||||
export default {
|
||||
name: "xmpg2Step4",
|
||||
@@ -333,6 +333,7 @@ export default {
|
||||
taskIds: this.taskIds,
|
||||
pId: this.pId
|
||||
}).then(res => {
|
||||
console.log(res.mesg);
|
||||
if (res) {
|
||||
const processForm = JSON.parse(res.mesg);
|
||||
this.getFormFieldList(processForm);
|
||||
@@ -345,18 +346,38 @@ export default {
|
||||
getFormFieldList(item) {
|
||||
this.$nextTick(() => {
|
||||
this.listForm = JSON.parse(JSON.stringify(item));
|
||||
this.listForm.prcNum = this.prcNum;
|
||||
this.listForm.prcName = this.prcName;
|
||||
this.listForm["id"] = item.id;
|
||||
this.listForm.dataList = item.dataList;
|
||||
this.dataList = item.dataList;
|
||||
// this.dataList.distributePerson = item.dataList[0].distributePerson;
|
||||
this.listForm.breakdownList = item.breakdownList;
|
||||
if(item.form === undefined){
|
||||
this.listForm.prcNum = this.prcNum;
|
||||
this.listForm.prcName = this.prcName;
|
||||
this.listForm["id"] = item.id;
|
||||
this.listForm.dataList = item.dataList;
|
||||
this.dataList = item.dataList;
|
||||
this.listForm.breakdownList = item.breakdownList;
|
||||
} else {
|
||||
this.listForm = item.form
|
||||
this.dataList = item.form.dataList
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
//保存事件
|
||||
handleSave() {
|
||||
|
||||
this.saveLoading = true;
|
||||
let _formData = new FormData();
|
||||
_formData.append("id", this.bpnId || "");
|
||||
_formData.append("prcType", "6");
|
||||
_formData.append("taskIds", this.taskIds);
|
||||
_formData.append("json", JSON.stringify({
|
||||
form: this.listForm,
|
||||
commentText: this.commentText
|
||||
}));
|
||||
saveTaskForPub(_formData).then(res => {
|
||||
this.saveLoading = false;
|
||||
this.$message.success("保存成功");
|
||||
this.bpnId = res.result;
|
||||
}).catch(e => {
|
||||
this.saveLoading = false;
|
||||
});
|
||||
},
|
||||
//提交事件
|
||||
handleSubmit() {
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
import ProcessHeader from "../../components/ProcessHeader";
|
||||
import ProcessFooter from "../../components/ProcessFooter";
|
||||
import ProcessTitle from "../../components/ProcessTitle";
|
||||
import { inboundLiaisonDetail, queryDetail } from "api/process";
|
||||
import { inboundLiaisonDetail, saveTaskForPub } from "api/process";
|
||||
|
||||
export default {
|
||||
name: "xmpg2Step5",
|
||||
@@ -328,43 +328,64 @@ export default {
|
||||
getFormFieldList(item) {
|
||||
this.$nextTick(() => {
|
||||
this.listForm = JSON.parse(JSON.stringify(item));
|
||||
this.listForm.prcNum = this.prcNum;
|
||||
this.listForm.prcName = this.prcName;
|
||||
this.listForm["id"] = item.id;
|
||||
this.listForm.dataList = item.dataList;
|
||||
this.dataList = item.dataList;
|
||||
// this.dataList.standNumber = item.dataList.standSort + '\xa0\xa0' +item.dataList.standSort + '-' + item.dataList.standYear
|
||||
let children = [];
|
||||
item.breakdownList.forEach(
|
||||
item => {
|
||||
let aa = {
|
||||
key: item.standId,
|
||||
id: item.id,
|
||||
standId: item.itemsNum,
|
||||
itemsNum: item.itemsNum,
|
||||
itemsName: item.itemsName,
|
||||
workPeople: "请选择责任人"
|
||||
};
|
||||
children.push(aa);
|
||||
}
|
||||
);
|
||||
this.dataList.forEach(key => {
|
||||
key["children"] = [];
|
||||
children.forEach(breakDown => {
|
||||
if (key.standId === breakDown.key) {
|
||||
key["children"].push(breakDown);
|
||||
if(item.form === undefined){
|
||||
this.listForm.prcNum = this.prcNum;
|
||||
this.listForm.prcName = this.prcName;
|
||||
this.listForm["id"] = item.id;
|
||||
this.listForm.dataList = item.dataList;
|
||||
this.dataList = item.dataList;
|
||||
// this.dataList.standNumber = item.dataList.standSort + '\xa0\xa0' +item.dataList.standSort + '-' + item.dataList.standYear
|
||||
let children = [];
|
||||
item.breakdownList.forEach(
|
||||
item => {
|
||||
let aa = {
|
||||
key: item.standId,
|
||||
id: item.id,
|
||||
standId: item.itemsNum,
|
||||
itemsNum: item.itemsNum,
|
||||
itemsName: item.itemsName,
|
||||
workPeople: "请选择责任人"
|
||||
};
|
||||
children.push(aa);
|
||||
}
|
||||
);
|
||||
this.dataList.forEach(key => {
|
||||
key["children"] = [];
|
||||
children.forEach(breakDown => {
|
||||
if (key.standId === breakDown.key) {
|
||||
key["children"].push(breakDown);
|
||||
}
|
||||
});
|
||||
if (key["children"].length === 0) {
|
||||
delete key["children"];
|
||||
}
|
||||
});
|
||||
if (key["children"].length === 0) {
|
||||
delete key["children"];
|
||||
}
|
||||
});
|
||||
this.listForm.children = children;
|
||||
this.listForm.children = children;
|
||||
} else {
|
||||
this.listForm = item.form
|
||||
this.dataList = item.form.dataList
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
//保存事件
|
||||
handleSave() {
|
||||
|
||||
this.saveLoading = true;
|
||||
let _formData = new FormData();
|
||||
_formData.append("id", this.bpnId || "");
|
||||
_formData.append("prcType", "6");
|
||||
_formData.append("taskIds", this.taskIds);
|
||||
_formData.append("json", JSON.stringify({
|
||||
form: this.listForm,
|
||||
commentText: this.commentText
|
||||
}));
|
||||
saveTaskForPub(_formData).then(res => {
|
||||
this.saveLoading = false;
|
||||
this.$message.success("保存成功");
|
||||
this.bpnId = res.result;
|
||||
}).catch(e => {
|
||||
this.saveLoading = false;
|
||||
});
|
||||
},
|
||||
//提交事件
|
||||
handleSubmit() {
|
||||
|
||||
@@ -338,7 +338,7 @@
|
||||
import ProcessHeader from "../../components/ProcessHeader";
|
||||
import ProcessFooter from "../../components/ProcessFooter";
|
||||
import ProcessTitle from "../../components/ProcessTitle";
|
||||
import { inboundLiaisonDetail, queryDetail } from "api/process";
|
||||
import { inboundLiaisonDetail, saveTaskForPub } from "api/process";
|
||||
|
||||
export default {
|
||||
name: "xmpg2Step6",
|
||||
@@ -470,16 +470,37 @@ export default {
|
||||
getFormFieldList(item) {
|
||||
this.$nextTick(() => {
|
||||
this.listForm = JSON.parse(JSON.stringify(item));
|
||||
this.listForm.prcNum = this.prcNum;
|
||||
this.listForm.prcName = this.prcName;
|
||||
this.listForm["id"] = item.id;
|
||||
// this.listForm.dataList = item.dataList;
|
||||
this.dataList = this.listForm.dataList;
|
||||
if(item.form === undefined){
|
||||
this.listForm.prcNum = this.prcNum;
|
||||
this.listForm.prcName = this.prcName;
|
||||
this.listForm["id"] = item.id;
|
||||
// this.listForm.dataList = item.dataList;
|
||||
this.dataList = this.listForm.dataList;
|
||||
} else {
|
||||
this.listForm = item.form
|
||||
this.dataList = item.form.dataList
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
//保存事件
|
||||
handleSave() {
|
||||
|
||||
this.saveLoading = true;
|
||||
let _formData = new FormData();
|
||||
_formData.append("id", this.bpnId || "");
|
||||
_formData.append("prcType", "6");
|
||||
_formData.append("taskIds", this.taskIds);
|
||||
_formData.append("json", JSON.stringify({
|
||||
form: this.listForm,
|
||||
commentText: this.commentText
|
||||
}));
|
||||
saveTaskForPub(_formData).then(res => {
|
||||
this.saveLoading = false;
|
||||
this.$message.success("保存成功");
|
||||
this.bpnId = res.result;
|
||||
}).catch(e => {
|
||||
this.saveLoading = false;
|
||||
});
|
||||
},
|
||||
//提交事件
|
||||
handleSubmit() {
|
||||
|
||||
Reference in New Issue
Block a user