Преглед на файлове

1.取号页面与流程优化
2.订单列表与详情页面关于取号的部分进行了修改或修复

GouGengquan преди 1 година
родител
ревизия
0509373f21
променени са 4 файла, в които са добавени 63 реда и са изтрити 31 реда
  1. 2 2
      src/api/modules/assets.js
  2. 4 4
      src/views/assets/allList.vue
  3. 5 5
      src/views/assets/myOrderList.vue
  4. 52 20
      src/views/assets/orderDetail.vue

+ 2 - 2
src/api/modules/assets.js

@@ -25,7 +25,7 @@ export default {
     },
     // 根据资产业务id获取资产业务评估对象集合
     getAETargetListByAssetsId(params) {
-        return request.get(`assetsEvaluationTarget/getAETargetListByAssetsId/${params}`)
+        return request.get(`assetsEvaluationTarget/getAETargetListByAssetsId`, { params: params })
     },
     // 获取所有资产评估目的集合
     getPurpose() {
@@ -81,6 +81,6 @@ export default {
     },
     // 资产产品取号
     takeAssetsProductionNo(params) {
-        return request.get(`assets/takeAssetsProductionNo`, params)
+        return request.post(`assets/takeAssetsProductionNo`, params)
     }
 }

+ 4 - 4
src/views/assets/allList.vue

@@ -42,14 +42,14 @@
                         <span>{{ row.allotType }}</span>
                     </template>
                 </el-table-column>
-                <el-table-column label="意见书号" align="center" width="180">
+                <el-table-column label="意见书号" align="center" width="250">
                     <template slot-scope="{row}">
-                        <span>{{ row.productionNo }}</span>
+                        <span v-if="row.productionType === 'STATEMENT'">{{ row.productionNo }}</span>
                     </template>
                 </el-table-column>
-                <el-table-column label="报告号" align="center" width="180">
+                <el-table-column label="报告号" align="center" width="250">
                     <template slot-scope="{row}">
-                        <span>{{ row.productionNo }}</span>
+                        <span v-if="row.productionType !== 'STATEMENT'">{{ row.productionNo }}</span>
                     </template>
                 </el-table-column>
                 <el-table-column label="项目名称" align="center" width="150">

+ 5 - 5
src/views/assets/myOrderList.vue

@@ -36,14 +36,14 @@
                         <span>{{ row.allotType }}</span>
                     </template>
                 </el-table-column>
-                <el-table-column label="意见书号" align="center" width="150">
+                <el-table-column label="意见书号" align="center" width="250">
                     <template slot-scope="{row}">
-                        <span>{{ row.productionNo }}</span>
+                        <span v-if="row.productionType === 'STATEMENT'">{{ row.productionNo }}</span>
                     </template>
                 </el-table-column>
-                <el-table-column label="报告号" align="center" width="150">
+                <el-table-column label="报告号" align="center" width="250">
                     <template slot-scope="{row}">
-                        <span>{{ row.productionNo }}</span>
+                        <span v-if="row.productionType !== 'STATEMENT'">{{ row.productionNo }}</span>
                     </template>
                 </el-table-column>
                 <el-table-column label="项目名称" align="center" width="150">
@@ -226,7 +226,7 @@ export default {
             this.$router.push({
                 path: "/assets/orderDetail",
                 query: {
-                    row: row,
+                    row: JSON.stringify(row),
                     back: '/assets/allList'
                 }
             })

+ 52 - 20
src/views/assets/orderDetail.vue

@@ -406,17 +406,17 @@
               </el-table-column>
               <el-table-column prop="checkValue" label="审核价格(万)" align="center" show-overflow-tooltip>
               </el-table-column>
-              <el-table-column label="操作" align="center" width="100" fixed="right">
+              <el-table-column label="操作" align="center" width="130" fixed="right">
                 <template slot-scope="scope">
                   <el-button type="text" size="small"
                     @click="getAssetsTargetDetail(scope.row.id), changeStatus('detail')">
                     查看
                   </el-button>
-                  <el-button v-if="currentNode.nodeCode === 'SPOT_RECONNAISSANCE'" type="text" size="small"
+                  <el-button v-if="currentNode.nodeCode === 'SPOT_RECONNAISSANCE_DETERMINE_PRICE'" type="text" size="small"
                     @click="getAssetsTargetDetail(scope.row.id), changeStatus('edit')">
                     编辑
                   </el-button>
-                  <el-button v-if="currentNode.nodeCode === 'SPOT_RECONNAISSANCE'" type="text" size="small"
+                  <el-button v-if="currentNode.nodeCode === 'SPOT_RECONNAISSANCE_DETERMINE_PRICE'" type="text" size="small"
                     @click="assetsTargetDelete(scope.row.id)">删除</el-button>
                 </template>
               </el-table-column>
@@ -1100,10 +1100,10 @@ export default {
       },
       // 资产业务取号dto
       takeAssetsProductionNoDTO: {
-        targetSelection: [],
+        targetIdList: [],
         businessId: null,
         productionType: null,
-        hasNotTakeNumTarget: null,
+        hasNotTakeNumTargetSelect: null,
         selectAll: null,
         printCount: null
       }
@@ -1118,12 +1118,13 @@ export default {
     // 获取页面参数
     this.pageParams.back = this.$route.query.back;
     this.pageParams.row = JSON.parse(this.$route.query.row);
-    this.getProductionTypes(this.pageParams.row.id);
+    this.getProductionTypes(this.pageParams.row.assetsId);
     this.getCurrentNodeInfo();
     this.getAllotDepartment();
     this.getCustomerCompany(0);
     this.getCustomerCompany(1);
-    this.getAssetsDetailById(this.pageParams.row.id);
+    this.getAssetsDetailById(this.pageParams.row.assetsId);
+    this.getProductionByBusinessId(this.pageParams.row.assetsId);
   },
 
   methods: {
@@ -1473,8 +1474,8 @@ export default {
     },
     // 获取流程节点信息
     getCurrentNodeInfo() {
-      if (this.pageParams.row.id) {
-        this.$api.workNodeInstance.currentNode({ "mainBusiness": "ASSET_BUSINESS", "businessId": this.pageParams.row.id, "businessSubId": this.pageParams.row.businessSubId, "businessMinId": this.pageParams.row.businessMinId }).then(res => {
+      if (this.pageParams.row.assetsId) {
+        this.$api.workNodeInstance.currentNode({ "mainBusiness": "ASSET_BUSINESS", "businessId": this.pageParams.row.assetsId, "businessSubId": this.pageParams.row.businessSubId, "businessMinId": this.pageParams.row.businessMinId }).then(res => {
           if (res.code === 200) {
             if (res.data) {
               this.currentNode = res.data;
@@ -1484,7 +1485,7 @@ export default {
               this.nodeBusinessInfo.currentNodePermission.reversible = res.data.reversible;
               this.nodeBusinessInfo.currentNodePermission.skippable = res.data.skippable;
               this.nodeBusinessInfo.currentNodePermission.terminable = res.data.terminable;
-              this.nodeBusinessInfo.businessId = this.pageParams.row.id;
+              this.nodeBusinessInfo.businessId = this.pageParams.row.assetsId;
             }
           }
         })
@@ -1527,7 +1528,10 @@ export default {
     },
     // 根据资产业务id获取资产业务评估对象集合
     getAETargetListByAssetsId() {
-      this.$api.assets.getAETargetListByAssetsId(this.assetsForm.id).then(res => {
+      let aETargetListSelectDTO = { businessId: null, productionNo: null }
+      aETargetListSelectDTO.businessId = this.assetsForm.id;
+      aETargetListSelectDTO.productionNo = this.pageParams.row.productionNo;
+      this.$api.assets.getAETargetListByAssetsId(aETargetListSelectDTO).then(res => {
         if (res.code === 200) {
           this.assetsEvaluationTarget = res.data;
         }
@@ -1756,15 +1760,15 @@ export default {
     // 打开产品选择表单弹窗
     openProductionDialog() {
       this.productionChoiceDialogVisible = true;
-      this.getProductionByBusinessId(this.pageParams.row.id);
+      this.getProductionByBusinessId(this.pageParams.row.assetsId);
     },
     // 根据业务id获取是否已选择产品
     getProductionByBusinessId(id) {
       this.$api.assets.getProductionByBusinessId(id).then(res => {
         if (res.code === 200) {
-          this.assetsProductionFrom = res.data;
           // 产品信息不为null,则证明已经选择过产品,将按钮改为修改
-          if (this.assetsProductionFrom !== null) {
+          if (res.data !== null) {
+            this.assetsProductionFrom = res.data;
             this.productionChoiceStatus = 1;
           }
         }
@@ -1842,21 +1846,49 @@ export default {
     // 资产产品取号
     takeAssetsProductionNo() {
       // 提交的要取号数组长度与table长度一致则是全部取号
-      if (this.takeAssetsProductionNoDTO.targetSelection.length === this.assetsEvaluationTarget.length) {
+      if (this.takeAssetsProductionNoDTO.targetIdList.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 === '');
+
+      // 判断表格中是否还有未选择且未取号的评估对象,返回布尔
+      let notTakeNumTargetSelect = this.assetsEvaluationTarget.filter(item => !this.takeAssetsProductionNoDTO.targetIdList.includes(item.id));
+      this.takeAssetsProductionNoDTO.hasNotTakeNumTargetSelect = notTakeNumTargetSelect.some(target => target.productionNo === null || target.productionNo === '');
+
       this.takeAssetsProductionNoDTO.businessId = this.assetsForm.id;
-      console.log(this.takeAssetsProductionNoDTO)
+      this.takeAssetsProductionNoDTO.productionType = this.nodeBusinessInfo.production[0];
+      this.getProductionByBusinessId(this.assetsForm.id);
+      this.takeAssetsProductionNoDTO.printCount = this.assetsProductionFrom.printCount;
+
+      if (!this.takeAssetsProductionNoDTO.targetIdList.length == 0) {
+        this.$api.assets.takeAssetsProductionNo(this.takeAssetsProductionNoDTO).then(res => {
+          if (res.code === 200) {
+            this.$notify({
+              title: '成功',
+              message: '产品取号成功!',
+              type: 'success',
+              duration: 2000
+            });
+            this.getAETargetListByAssetsId();
+          }
+        })
+      } else {
+        this.$notify({
+          title: '警告',
+          message: '您必须选择至少一个评估对象!',
+          type: 'warning',
+          duration: 2000
+        });
+      }
+
     },
     // 资产评估对象选取数据处理
     targetSelectionChange(val) {
-      this.takeAssetsProductionNoDTO.targetSelection = val;
-      this.takeAssetsProductionNoDTO.targetSelection = this.takeAssetsProductionNoDTO.targetSelection.map(selection => selection.id);
+      this.takeAssetsProductionNoDTO.targetIdList = val;
+      this.takeAssetsProductionNoDTO.targetIdList = this.takeAssetsProductionNoDTO.targetIdList.map(selection => selection.id);
     },
+    // 判断行数据是否可选
     selectable(row) {
       if (row.productionNo != null && row.productionNo != '') {
         return false;