|
@@ -367,10 +367,20 @@
|
|
|
<el-button v-if="currentNode.nodeCode === 'SPOT_RECONNAISSANCE_DETERMINE_PRICE'" type="danger"
|
|
|
@click="openTargetDialog(), changeStatus('add')" round>添加评估对象</el-button>
|
|
|
</el-col>
|
|
|
+ <el-col :span="2"
|
|
|
+ v-if="currentNode.nodeCode === 'GENERATE_STATEMENT' || currentNode.nodeCode === 'WRITE_REPORT'">
|
|
|
+ <el-tooltip class="item" effect="dark" content="全选取主号,多次取号(主号-子号)" placement="right">
|
|
|
+ <el-button type="success" @click="takeAssetsProductionNo" round>产品取号</el-button>
|
|
|
+ </el-tooltip>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
- <el-table ref="multipleTable" :data="assetsEvaluationTarget" stripe :header-row-style="{ color: '#333333' }"
|
|
|
- border takeNumberItems style="width: 100%; margin-top:20px">
|
|
|
- <el-table-column type="index" label="序号" width="80" align="center">
|
|
|
+ <el-table ref="multipleTable" :data="assetsEvaluationTarget" stripe @selection-change="targetSelectionChange"
|
|
|
+ :header-row-style="{ color: '#333333' }" border takeNumberItems style="width: 100%; margin-top:20px">
|
|
|
+ <el-table-column type="selection" width="55" :selectable="selectable">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="id" label="id" width="80" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="productionNo" label="产品号" align="center" show-overflow-tooltip>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="purposeName" label="评估目的" align="center" show-overflow-tooltip>
|
|
|
</el-table-column>
|
|
@@ -675,10 +685,10 @@
|
|
|
<el-row class="row-style">
|
|
|
<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-model="assetsProductionFrom.productionType" :label="STATEMENT" border size="medium">价值意见书</el-radio>
|
|
|
- <el-radio v-model="assetsProductionFrom.productionType" :label="CONSULT" border size="medium">咨询报告</el-radio>
|
|
|
- <el-radio v-model="assetsProductionFrom.productionType" :label="REPORT" border size="medium">评估报告</el-radio>
|
|
|
- <el-radio v-model="assetsProductionFrom.productionType" :label="LETTER" border size="medium">意见函</el-radio>
|
|
|
+ <el-radio v-model="assetsProductionFrom.productionType" :label="1" border size="medium">价值意见书</el-radio>
|
|
|
+ <el-radio v-model="assetsProductionFrom.productionType" :label="2" border size="medium">咨询报告</el-radio>
|
|
|
+ <el-radio v-model="assetsProductionFrom.productionType" :label="3" border size="medium">评估报告</el-radio>
|
|
|
+ <el-radio v-model="assetsProductionFrom.productionType" :label="4" border size="medium">意见函</el-radio>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -690,8 +700,10 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row class="row-style">
|
|
|
- <el-button v-if="productionChoiceStatus == 0" @click="assetsProductionSave" style="width:100%;">提交</el-button>
|
|
|
- <el-button v-if="productionChoiceStatus == 1" @click="assetsProductionUpdate" style="width:100%;">提交</el-button>
|
|
|
+ <el-button v-if="productionChoiceStatus == 0" @click="assetsProductionSave"
|
|
|
+ style="width:100%;">提交</el-button>
|
|
|
+ <el-button v-if="productionChoiceStatus == 1" @click="assetsProductionUpdate"
|
|
|
+ style="width:100%;">提交</el-button>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -879,7 +891,8 @@ export default {
|
|
|
},
|
|
|
//
|
|
|
pageParams: {
|
|
|
-
|
|
|
+ back: null,
|
|
|
+ row: null
|
|
|
},
|
|
|
// 业务类型下拉列表
|
|
|
assetsBusinessGeners: [
|
|
@@ -1084,6 +1097,15 @@ export default {
|
|
|
{ required: true, message: '请填写打印份数', trigger: 'blur' },
|
|
|
{ type: 'number', message: '请填写数字' }
|
|
|
]
|
|
|
+ },
|
|
|
+ // 资产业务取号dto
|
|
|
+ takeAssetsProductionNoDTO: {
|
|
|
+ targetSelection: [],
|
|
|
+ businessId: null,
|
|
|
+ productionType: null,
|
|
|
+ hasNotTakeNumTarget: null,
|
|
|
+ selectAll: null,
|
|
|
+ printCount: null
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -1094,13 +1116,14 @@ export default {
|
|
|
this.couldEdit = true;
|
|
|
this.couldBack = true;
|
|
|
// 获取页面参数
|
|
|
- this.pageParams = this.$route.query;
|
|
|
+ this.pageParams.back = this.$route.query.back;
|
|
|
+ this.pageParams.row = JSON.parse(this.$route.query.row);
|
|
|
+ this.getProductionTypes(this.pageParams.row.id);
|
|
|
this.getCurrentNodeInfo();
|
|
|
this.getAllotDepartment();
|
|
|
this.getCustomerCompany(0);
|
|
|
this.getCustomerCompany(1);
|
|
|
this.getAssetsDetailById(this.pageParams.row.id);
|
|
|
- this.getProductionTypes(this.pageParams.row.id);
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
@@ -1736,12 +1759,12 @@ export default {
|
|
|
this.getProductionByBusinessId(this.pageParams.row.id);
|
|
|
},
|
|
|
// 根据业务id获取是否已选择产品
|
|
|
- getProductionByBusinessId(id){
|
|
|
+ getProductionByBusinessId(id) {
|
|
|
this.$api.assets.getProductionByBusinessId(id).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.assetsProductionFrom = res.data;
|
|
|
// 产品信息不为null,则证明已经选择过产品,将按钮改为修改
|
|
|
- if(this.assetsProductionFrom !== null){
|
|
|
+ if (this.assetsProductionFrom !== null) {
|
|
|
this.productionChoiceStatus = 1;
|
|
|
}
|
|
|
}
|
|
@@ -1752,19 +1775,19 @@ export default {
|
|
|
this.$refs.assetsProductionFrom.validate(valid => {
|
|
|
if (valid) {
|
|
|
this.assetsProductionFrom.businessId = this.assetsForm.id;
|
|
|
- // if (this.assetsProductionFrom.productionType == 1) {
|
|
|
- // // 价值意见书
|
|
|
- // this.assetsProductionFrom.productionType = 'STATEMENT';
|
|
|
- // } else if (this.assetsProductionFrom.productionType == 4) {
|
|
|
- // // 意见函
|
|
|
- // this.assetsProductionFrom.productionType = 'LETTER';
|
|
|
- // }else if (this.assetsProductionFrom.productionType == 2) {
|
|
|
- // // 咨询报告
|
|
|
- // this.assetsProductionFrom.productionType = 'CONSULT';
|
|
|
- // } else {
|
|
|
- // // 评估报告
|
|
|
- // this.assetsProductionFrom.productionType = 'REPORT';
|
|
|
- // }
|
|
|
+ if (this.assetsProductionFrom.productionType == 1) {
|
|
|
+ // 价值意见书
|
|
|
+ this.assetsProductionFrom.productionType = 'STATEMENT';
|
|
|
+ } else if (this.assetsProductionFrom.productionType == 4) {
|
|
|
+ // 意见函
|
|
|
+ this.assetsProductionFrom.productionType = 'LETTER';
|
|
|
+ } else if (this.assetsProductionFrom.productionType == 2) {
|
|
|
+ // 咨询报告
|
|
|
+ this.assetsProductionFrom.productionType = 'CONSULT';
|
|
|
+ } else {
|
|
|
+ // 评估报告
|
|
|
+ this.assetsProductionFrom.productionType = 'REPORT';
|
|
|
+ }
|
|
|
this.assetsProductionFrom.filePath = JSON.stringify(this.assetsProductionFrom.filePath);
|
|
|
this.taskRecordDTO.recordId = this.currentNode.tasks[0].recordId;
|
|
|
this.taskRecordDTO.taskData = this.assetsProductionFrom;
|
|
@@ -1785,7 +1808,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 选择产品,更新已选择产品信息
|
|
|
- assetsProductionUpdate(){
|
|
|
+ assetsProductionUpdate() {
|
|
|
this.$refs.assetsProductionFrom.validate(valid => {
|
|
|
if (valid) {
|
|
|
this.assetsProductionFrom.businessId = this.assetsForm.id;
|
|
@@ -1815,6 +1838,31 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ // 资产产品取号
|
|
|
+ takeAssetsProductionNo() {
|
|
|
+ // 提交的要取号数组长度与table长度一致则是全部取号
|
|
|
+ if (this.takeAssetsProductionNoDTO.targetSelection.length === this.assetsEvaluationTarget.length) {
|
|
|
+ this.takeAssetsProductionNoDTO.selectAll = true;
|
|
|
+ } else {
|
|
|
+ this.takeAssetsProductionNoDTO.selectAll = false;
|
|
|
+ }
|
|
|
+ // 获取集合中是否还有未取号的评估对象,返回布尔
|
|
|
+ this.takeAssetsProductionNoDTO.hasNotTakeNumTarget = this.assetsEvaluationTarget.some(target => target.productionNo === null || target.productionNo === '');
|
|
|
+ this.takeAssetsProductionNoDTO.businessId = this.assetsForm.id;
|
|
|
+ console.log(this.takeAssetsProductionNoDTO)
|
|
|
+ },
|
|
|
+ // 资产评估对象选取数据处理
|
|
|
+ targetSelectionChange(val) {
|
|
|
+ this.takeAssetsProductionNoDTO.targetSelection = val;
|
|
|
+ this.takeAssetsProductionNoDTO.targetSelection = this.takeAssetsProductionNoDTO.targetSelection.map(selection => selection.id);
|
|
|
+ },
|
|
|
+ selectable(row) {
|
|
|
+ if (row.productionNo != null && row.productionNo != '') {
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|