|
@@ -378,9 +378,9 @@
|
|
|
<el-button type="success" @click="takeAssetsReportProductionNo('REPORT')" round>报告取号</el-button>
|
|
|
</el-tooltip>
|
|
|
</el-col>
|
|
|
- <el-col :span="2" v-if="(currentNode.nodeCode === 'GENERATE_STATEMENT' || currentNode.nodeCode === 'WRITE_REPORT')
|
|
|
- && couldEdit
|
|
|
- && (writeProductionStatementNos.length > 0 || writeProductionReportNos.length > 0)">
|
|
|
+ <el-col :span="2" v-if="(currentNode.nodeCode === 'GENERATE_STATEMENT' && writeProductionStatementNos.length > 0)
|
|
|
+ || (currentNode.nodeCode === 'WRITE_REPORT' && writeProductionReportNos.length > 0)
|
|
|
+ && couldEdit">
|
|
|
<el-tooltip class="item" effect="dark" content="请仔细确认产品内容" placement="right">
|
|
|
<el-button type="success" @click="openWriteProductionDialog(false, 'add')" round>撰写产品信息</el-button>
|
|
|
</el-tooltip>
|
|
@@ -837,10 +837,13 @@
|
|
|
<el-col :xs="24" :sm="12" :lg="12" :span="6" style="width: 800px;">
|
|
|
<el-form-item label="产品类型:" prop="productionType" label-width="120px" class="postInfo-container-item">
|
|
|
<el-radio v-if="currentNode.nodeCode === 'PRODUCT_CHOICE'" v-model="assetsProductionForm.productionType"
|
|
|
- :label="1" border size="medium">价值意见书</el-radio>
|
|
|
- <el-radio v-model="assetsProductionForm.productionType" :label="2" border size="medium">咨询报告</el-radio>
|
|
|
- <el-radio v-model="assetsProductionForm.productionType" :label="3" border size="medium">评估报告</el-radio>
|
|
|
- <el-radio v-model="assetsProductionForm.productionType" :label="4" border size="medium">意见函</el-radio>
|
|
|
+ label="STATEMENT" border size="medium">价值意见书</el-radio>
|
|
|
+ <el-radio v-model="assetsProductionForm.productionType" label="CONSULT" border
|
|
|
+ size="medium">咨询报告</el-radio>
|
|
|
+ <el-radio v-model="assetsProductionForm.productionType" label="REPORT" border
|
|
|
+ size="medium">评估报告</el-radio>
|
|
|
+ <el-radio v-model="assetsProductionForm.productionType" label="LETTER" border
|
|
|
+ size="medium">意见函</el-radio>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -1724,7 +1727,7 @@ export default {
|
|
|
this.getCustomerCompany(0);
|
|
|
this.getCustomerCompany(1);
|
|
|
this.getAssetsDetailById(this.pageParams.row.assetsId);
|
|
|
- this.getProductionByBusinessId(this.pageParams.row.assetsId);
|
|
|
+ // this.getProductionByBusinessId(this.pageParams.row.assetsId);
|
|
|
this.getAETargetListByAssetsId();
|
|
|
this.getProductionList();
|
|
|
this.nodeBusinessInfo.reportNos.push(this.pageParams.row.statementNo);
|
|
@@ -2332,46 +2335,63 @@ export default {
|
|
|
// 打开产品选择表单弹窗
|
|
|
openProductionDialog() {
|
|
|
this.productionChoiceDialogVisible = true;
|
|
|
- this.getProductionByBusinessId(this.pageParams.row.assetsId);
|
|
|
- },
|
|
|
- // 根据业务id获取是否已选择产品
|
|
|
- getProductionByBusinessId(id) {
|
|
|
- this.$api.assets.getProductionByBusinessId(id).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- // 产品信息不为null,则证明已经选择过产品,将按钮改为修改
|
|
|
- if (res.data !== null) {
|
|
|
- if (res.data.productionType == 'STATEMENT' && (this.currentNode.nodeCode === 'PRODUCT_CHOICE' || this.currentNode.nodeCode === 'GENERATE_STATEMENT')) {
|
|
|
- this.assetsProductionForm = res.data;
|
|
|
- this.productionChoiceStatus = 1;
|
|
|
- }
|
|
|
- if (res.data.productionType !== 'STATEMENT' && (this.currentNode.nodeCode === 'REPORT_CHOICE' || this.currentNode.nodeCode === 'ASSET_REPORT_TAKE_NO')) {
|
|
|
- this.assetsProductionForm = res.data;
|
|
|
- this.productionChoiceStatus = 1;
|
|
|
- }
|
|
|
- }
|
|
|
+ // this.getProductionByBusinessId(this.pageParams.row.assetsId);
|
|
|
+ this.getChoiceLog();
|
|
|
+ },
|
|
|
+ // 获取产品选择记录
|
|
|
+ getChoiceLog() {
|
|
|
+ let selectDTO = {};
|
|
|
+ selectDTO.businessType = 'ASSET_BUSINESS';
|
|
|
+ selectDTO.businessId = this.pageParams.row.assetsId;
|
|
|
+ selectDTO.targetId = this.assetsEvaluationTarget[0].id;
|
|
|
+ this.$api.businessProductionChoiceLog.getChoiceLog(selectDTO).then(res => {
|
|
|
+ if (res.code == 200 && res.data !== null) {
|
|
|
+ this.productionChoiceStatus = 1;
|
|
|
+ this.assetsProductionForm.id = res.data.productionId;
|
|
|
+ this.assetsProductionForm.productionType = res.data.productionType;
|
|
|
+ this.assetsProductionForm.printCount = res.data.printCount;
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 根据业务id获取是否已选择产品
|
|
|
+ // getProductionByBusinessId(id) {
|
|
|
+ // this.$api.assets.getProductionByBusinessId(id).then(res => {
|
|
|
+ // if (res.code === 200) {
|
|
|
+ // // 产品信息不为null,则证明已经选择过产品,将按钮改为修改
|
|
|
+ // if (res.data !== null) {
|
|
|
+ // if (res.data.productionType == 'STATEMENT' && (this.currentNode.nodeCode === 'PRODUCT_CHOICE' || this.currentNode.nodeCode === 'GENERATE_STATEMENT')) {
|
|
|
+ // this.assetsProductionForm = res.data;
|
|
|
+ // this.productionChoiceStatus = 1;
|
|
|
+ // }
|
|
|
+ // if (res.data.productionType !== 'STATEMENT' && (this.currentNode.nodeCode === 'REPORT_CHOICE' || this.currentNode.nodeCode === 'ASSET_REPORT_TAKE_NO')) {
|
|
|
+ // this.assetsProductionForm = res.data;
|
|
|
+ // this.productionChoiceStatus = 1;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
// 选择产品,新增产品信息
|
|
|
assetsProductionSave() {
|
|
|
this.$refs.assetsProductionForm.validate(valid => {
|
|
|
if (valid) {
|
|
|
this.assetsProductionForm.businessId = this.assetsForm.id;
|
|
|
- if (this.assetsProductionForm.productionType == 1) {
|
|
|
- // 价值意见书
|
|
|
- this.assetsProductionForm.productionType = 'STATEMENT';
|
|
|
- } else if (this.assetsProductionForm.productionType == 4) {
|
|
|
- // 意见函
|
|
|
- this.assetsProductionForm.productionType = 'LETTER';
|
|
|
- } else if (this.assetsProductionForm.productionType == 2) {
|
|
|
- // 咨询报告
|
|
|
- this.assetsProductionForm.productionType = 'CONSULT';
|
|
|
- } else {
|
|
|
- // 评估报告
|
|
|
- this.assetsProductionForm.productionType = 'REPORT';
|
|
|
- }
|
|
|
+ // if (this.assetsProductionForm.productionType == 1) {
|
|
|
+ // // 价值意见书
|
|
|
+ // this.assetsProductionForm.productionType = 'STATEMENT';
|
|
|
+ // } else if (this.assetsProductionForm.productionType == 4) {
|
|
|
+ // // 意见函
|
|
|
+ // this.assetsProductionForm.productionType = 'LETTER';
|
|
|
+ // } else if (this.assetsProductionForm.productionType == 2) {
|
|
|
+ // // 咨询报告
|
|
|
+ // this.assetsProductionForm.productionType = 'CONSULT';
|
|
|
+ // } else {
|
|
|
+ // // 评估报告
|
|
|
+ // this.assetsProductionForm.productionType = 'REPORT';
|
|
|
+ // }
|
|
|
this.assetsProductionForm.filePath = JSON.stringify(this.assetsProductionForm.filePath);
|
|
|
this.assetsProductionForm.signatory = JSON.stringify(this.assetsProductionForm.signatory);
|
|
|
+ this.assetsProductionForm.targetIdList = this.assetsEvaluationTarget.map(item => item.id);
|
|
|
this.taskRecordDTO.recordId = this.currentNode.tasks[0].recordId;
|
|
|
this.taskRecordDTO.taskData = this.assetsProductionForm;
|
|
|
this.$api.assets.assetsProductionSave(this.taskRecordDTO).then(res => {
|
|
@@ -2395,18 +2415,19 @@ export default {
|
|
|
this.$refs.assetsProductionForm.validate(valid => {
|
|
|
if (valid) {
|
|
|
this.assetsProductionForm.businessId = this.assetsForm.id;
|
|
|
- if (this.assetsProductionForm.productionType == 1) {
|
|
|
- // 价值意见书
|
|
|
- this.assetsProductionForm.productionType = 'STATEMENT';
|
|
|
- } else if (this.assetsProductionForm.productionType == 4) {
|
|
|
- // 意见函
|
|
|
- this.assetsProductionForm.productionType = 'LETTER';
|
|
|
- } else {
|
|
|
- // 报告
|
|
|
- this.assetsProductionForm.productionType = 'REPORT';
|
|
|
- }
|
|
|
+ // if (this.assetsProductionForm.productionType == 1) {
|
|
|
+ // // 价值意见书
|
|
|
+ // this.assetsProductionForm.productionType = 'STATEMENT';
|
|
|
+ // } else if (this.assetsProductionForm.productionType == 4) {
|
|
|
+ // // 意见函
|
|
|
+ // this.assetsProductionForm.productionType = 'LETTER';
|
|
|
+ // } else {
|
|
|
+ // // 报告
|
|
|
+ // this.assetsProductionForm.productionType = 'REPORT';
|
|
|
+ // }
|
|
|
this.assetsProductionForm.filePath = JSON.stringify(this.assetsProductionForm.filePath);
|
|
|
this.assetsProductionForm.signatory = JSON.stringify(this.assetsProductionForm.signatory);
|
|
|
+ this.assetsProductionForm.targetIdList = this.assetsEvaluationTarget.map(item => item.id);
|
|
|
this.taskRecordDTO.recordId = this.currentNode.tasks[0].recordId;
|
|
|
this.taskRecordDTO.taskData = this.assetsProductionForm;
|
|
|
this.$api.assets.assetsProductionUpdate(this.taskRecordDTO).then(res => {
|
|
@@ -2470,6 +2491,7 @@ export default {
|
|
|
},
|
|
|
// 资产产品报告取号
|
|
|
takeAssetsReportProductionNo() {
|
|
|
+ this.takeAssetsProductionNoDTO.allTargetIdList = this.assetsEvaluationTarget.map(item => item.id);
|
|
|
// 提交的要取号数组长度与table长度一致则是全部取号
|
|
|
if (this.takeAssetsProductionNoDTO.targetIdList.length === this.assetsEvaluationTarget.length) {
|
|
|
this.takeAssetsProductionNoDTO.selectAll = true;
|
|
@@ -2479,7 +2501,7 @@ export default {
|
|
|
|
|
|
// 判断表格中是否还有未选择且未取号的评估对象,返回布尔
|
|
|
let notTakeNumTargetSelect = this.assetsEvaluationTarget.filter(item => !this.takeAssetsProductionNoDTO.targetIdList.includes(item.id));
|
|
|
- this.takeAssetsProductionNoDTO.hasNotTakeNumTargetSelect = notTakeNumTargetSelect.some(target => target.statementNo === null || target.statementNo === '');
|
|
|
+ this.takeAssetsProductionNoDTO.hasNotTakeNumTargetSelect = notTakeNumTargetSelect.some(target => target.reportNo === null || target.reportNo === '');
|
|
|
|
|
|
this.takeAssetsProductionNoDTO.businessId = this.assetsForm.id;
|
|
|
// this.getProductionByBusinessId(this.assetsForm.id);
|
|
@@ -2598,7 +2620,8 @@ export default {
|
|
|
aProListSelectDTO.statementNo = this.pageParams.row.statementNo;
|
|
|
aProListSelectDTO.reportNo = this.pageParams.row.reportNo;
|
|
|
if (this.currentNode.nodeCode == 'WRITE_REPORT' && this.assetsEvaluationTarget[0].statementNo !== null) {
|
|
|
- aProListSelectDTO.reportNo = this.assetsEvaluationTarget[0].reportNo;
|
|
|
+ // aProListSelectDTO.reportNo = this.assetsEvaluationTarget[0].reportNo;
|
|
|
+ aProListSelectDTO.reportNos = this.assetsEvaluationTarget.map(obj => obj.reportNo);
|
|
|
}
|
|
|
this.$api.assets.getProductionList(aProListSelectDTO).then(res => {
|
|
|
if (res.code == 200) {
|
|
@@ -2608,17 +2631,21 @@ export default {
|
|
|
},
|
|
|
//选择要提交节点的产品号
|
|
|
pushProductionNo() {
|
|
|
+ // 查询该产品是否已有提交的流程
|
|
|
+ let aProListSelectDTO = { businessId: null, productionNo: null, productionNos: [] };
|
|
|
+
|
|
|
this.nodeBusinessInfo.reportNos = [];
|
|
|
this.nodeBusinessInfo.reportNos.push(this.commitProductionNo);
|
|
|
if (this.currentNode.nodeCode == 'GENERATE_STATEMENT') {
|
|
|
this.nodeBusinessInfo.businessSubId = this.commitProductionNo;
|
|
|
+ aProListSelectDTO.productionNos = this.assetsProductionData.filter(obj => obj.productionType == 'STATEMENT').map(obj => obj.productionNo);
|
|
|
}
|
|
|
if (this.currentNode.nodeCode == 'WRITE_REPORT') {
|
|
|
this.nodeBusinessInfo.businessMinId = this.commitProductionNo;
|
|
|
+ aProListSelectDTO.productionNos = this.assetsProductionData.filter(obj => obj.productionType !== 'STATEMENT').map(obj => obj.productionNo);
|
|
|
}
|
|
|
|
|
|
- // 查询该产品是否已有提交的流程
|
|
|
- let aProListSelectDTO = { businessId: null, productionNo: null, productionNos: [] };
|
|
|
+
|
|
|
aProListSelectDTO.businessId = this.assetsForm.id;
|
|
|
aProListSelectDTO.productionNo = this.commitProductionNo;
|
|
|
this.$api.assets.getInatanceCount(aProListSelectDTO).then(res => {
|
|
@@ -2639,12 +2666,14 @@ export default {
|
|
|
(obj.reportCreateProductionDate === null || obj.reportCreateProductionDate === '')
|
|
|
);
|
|
|
}
|
|
|
- if (isNotWriteAllPro) {
|
|
|
+
|
|
|
+ // 判断是否完成节点
|
|
|
+ if (isNotWriteAllPro) { // 还有未撰写或未提交产品不完成节点
|
|
|
this.nodeBusinessInfo.ifCheckTask = false;
|
|
|
} else {
|
|
|
- aProListSelectDTO.productionNos = this.assetsProductionData.map(obj => obj.productionNo);
|
|
|
this.$api.assets.getInatanceCountList(aProListSelectDTO).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
+ // 未提交的同类型产品大于1时,不完成节点
|
|
|
if (res.data.filter(count => count === 0).length > 1) {
|
|
|
this.nodeBusinessInfo.ifCheckTask = false;
|
|
|
} else {
|