Преглед изворни кода

1.修复审核报告时,错误数为0提示错误的BUG
2.资产产品取号逻辑修改

GouGengquan пре 1 година
родитељ
комит
7208366601
2 измењених фајлова са 82 додато и 29 уклоњено
  1. 14 9
      src/views/assets/myOrderList.vue
  2. 68 20
      src/views/assets/orderDetail.vue

+ 14 - 9
src/views/assets/myOrderList.vue

@@ -134,24 +134,29 @@
                 <el-table-column label="送达状态" align="center" width="150">
                     <template slot-scope="{row}">
                         <el-tag v-if="row.reportDelivery" type='success'>已送达</el-tag>
-                        <el-button type="danger" size="mini"
-                            v-if="(!row.reportDelivery || row.reportDelivery == null) && row.reportRepertoryState">标记送达</el-button>
                     </template>
                 </el-table-column>
                 <el-table-column label="操作" align="center" :min-width="dynamicWidth" fixed="right">
                     <template slot-scope="{row}">
                         <div class="optionDiv" style="white-space: nowrap; display: inline-block">
-                            <el-button type="success" size="mini" @click="orderDetail(row)">查看</el-button>
-                            <el-button type="primary" size="mini" @click="openShouldAmountDialog(row)">订单应收款</el-button>
-                            <el-button v-if="row.reportNo !== null" type="success" size="mini"
-                                @click="openProShouldAmountDialog(row)">产品应收款</el-button>
-                            <el-button v-if="row.currentNodeCode === 'REPORT_OUT_APPLY'" type="danger" size="mini"
-                                @click="openRepertoryOutWarehouse(row)">
+                            <el-button type="danger" size="mini" v-if="(!row.reportDelivery || row.reportDelivery == null) && row.reportRepertoryState">
+                                标记送达
+                            </el-button>
+                            <el-button type="success" size="mini" @click="orderDetail(row)">
+                                查看
+                            </el-button>
+                            <el-button type="primary" size="mini" @click="openShouldAmountDialog(row)">
+                                订单应收款
+                            </el-button>
+                            <el-button v-if="row.reportNo !== null" type="success" size="mini" @click="openProShouldAmountDialog(row)">
+                                产品应收款
+                            </el-button>
+                            <el-button v-if="row.currentNodeCode === 'REPORT_OUT_APPLY'" type="danger" size="mini" @click="openRepertoryOutWarehouse(row)">
                                 申请提前出库
                             </el-button>
                             <!-- <el-button v-if="row.currentNodeCode === 'REPORT_OUT_APPLY'" type="text"
                             @click="canceladdRepertoryOutWarehouse(row)">
-                            撤销出库申请
+                            撤销出库申请 
                             </el-button> -->
                         </div>
                     </template>

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

@@ -370,12 +370,12 @@
               </el-col>
               <el-col :span="2" v-if="currentNode.nodeCode === 'GENERATE_STATEMENT' && couldEdit">
                 <el-tooltip class="item" effect="dark" content="全选取主号,多次取号(主号-子号)" placement="right">
-                  <el-button type="success" @click="takeAssetsStatementProductionNo" round>意见书取号</el-button>
+                  <el-button type="success" @click="takeAssetsStatementProductionNo('STATEMENT')" round>意见书取号</el-button>
                 </el-tooltip>
               </el-col>
               <el-col :span="2" v-if="currentNode.nodeCode === 'ASSET_REPORT_TAKE_NO' && couldEdit">
                 <el-tooltip class="item" effect="dark" content="全选取主号,多次取号(主号-子号)" placement="right">
-                  <el-button type="success" @click="takeAssetsReportProductionNo" round>报告取号</el-button>
+                  <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')
@@ -2340,8 +2340,14 @@ export default {
         if (res.code === 200) {
           // 产品信息不为null,则证明已经选择过产品,将按钮改为修改
           if (res.data !== null) {
-            this.assetsProductionForm = res.data;
-            this.productionChoiceStatus = 1;
+            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;
+            }
           }
         }
       })
@@ -2433,9 +2439,11 @@ export default {
       this.takeAssetsProductionNoDTO.hasNotTakeNumTargetSelect = notTakeNumTargetSelect.some(target => target.statementNo === null || target.statementNo === '');
 
       this.takeAssetsProductionNoDTO.businessId = this.assetsForm.id;
-      this.takeAssetsProductionNoDTO.productionType = this.nodeBusinessInfo.production[this.nodeBusinessInfo.production.length - 1];
-      this.getProductionByBusinessId(this.assetsForm.id);
-      this.takeAssetsProductionNoDTO.printCount = this.assetsProductionForm.printCount;
+      console.log(this.nodeBusinessInfo.production);
+      // this.getProductionByBusinessId(this.assetsForm.id);
+      // this.takeAssetsProductionNoDTO.productionType = this.assetsProductionForm.productionType;
+      // this.takeAssetsProductionNoDTO.productionType = this.nodeBusinessInfo.production[this.nodeBusinessInfo.production.length - 1];
+      // this.takeAssetsProductionNoDTO.printCount = this.assetsProductionForm.printCount;
 
       if (!this.takeAssetsProductionNoDTO.targetIdList.length == 0) {
         this.$api.assets.takeAssetsStatementProductionNo(this.takeAssetsProductionNoDTO).then(res => {
@@ -2474,9 +2482,10 @@ export default {
       this.takeAssetsProductionNoDTO.hasNotTakeNumTargetSelect = notTakeNumTargetSelect.some(target => target.statementNo === null || target.statementNo === '');
 
       this.takeAssetsProductionNoDTO.businessId = this.assetsForm.id;
-      this.takeAssetsProductionNoDTO.productionType = this.nodeBusinessInfo.production[this.nodeBusinessInfo.production.length - 1];
-      this.getProductionByBusinessId(this.assetsForm.id);
-      this.takeAssetsProductionNoDTO.printCount = this.assetsProductionForm.printCount;
+      // this.getProductionByBusinessId(this.assetsForm.id);
+      // this.takeAssetsProductionNoDTO.productionType = this.assetsProductionForm.productionType;
+      // this.takeAssetsProductionNoDTO.productionType = this.nodeBusinessInfo.production[this.nodeBusinessInfo.production.length - 1];
+      // this.takeAssetsProductionNoDTO.printCount = this.assetsProductionForm.printCount;
 
       this.taskRecordDTO.recordId = this.currentNode.tasks[0].recordId;
       this.taskRecordDTO.taskData = this.takeAssetsProductionNoDTO;
@@ -2531,6 +2540,7 @@ export default {
       assetsProductionDetailDTO.productionNo = this.assetsProductionForm.productionNo;
       this.$api.assets.getAssetsProductionDetailByNo(assetsProductionDetailDTO).then(res => {
         if (res.code == 200 && res.data !== null) {
+          this.assetsProductionForm.productionType = res.data.productionType
           this.assetsProductionForm.printCount = res.data.printCount;
           this.assetsProductionForm.clientName = this.assetsForm.bailorContactName;
           this.assetsProductionForm.clientTel = this.assetsForm.bailorContactTel;
@@ -2754,7 +2764,7 @@ export default {
         this.productionPerformanceForm.checkLoop = "四审";
       }
       this.$api.businessProductionPerformance.getProductionPerformance(this.productionPerformanceForm).then(res => {
-        if (res.code === 200 && res.data != null) {
+        if (res.code === 200 && res.data !== null) {
           this.productionPerformanceForm.id = res.data.id;
           this.productionPerformanceForm.fatalMistake = res.data.fatalMistake;
           this.productionPerformanceForm.hardMistake = res.data.hardMistake;
@@ -2765,8 +2775,53 @@ export default {
     },
     // 保存产品质检信息(新增与保存都是这个方法)
     saveQuality() {
-      if ((this.productionPerformanceForm.hardMistake + this.productionPerformanceForm.fatalMistake + this.productionPerformanceForm.normalMistake) > 0 &&
-        this.productionPerformanceForm.reason !== null && this.productionPerformanceForm.reason !== '') {
+      if ((this.productionPerformanceForm.hardMistake + this.productionPerformanceForm.fatalMistake + this.productionPerformanceForm.normalMistake) > 0) {
+        if (this.productionPerformanceForm.reason !== null && this.productionPerformanceForm.reason !== '') {
+
+          this.taskRecordDTO.recordId = this.currentNode.tasks[0].recordId;
+          this.taskRecordDTO.taskData = this.productionPerformanceForm;
+
+          // id不为空更新
+          if (this.productionPerformanceForm.id) {
+            this.$api.businessProductionPerformance.edit(this.taskRecordDTO).then(res => {
+              if (res.code === 200 && res.data) {
+                this.$notify({
+                  title: '成功',
+                  message: '质检信息更新成功,请继续提交流程节点!',
+                  type: 'success',
+                  duration: 3000
+                });
+                if (this.currentNode.nodeCode === 'RECHECK_REPORT' || this.currentNode.nodeCode === 'FOURTH_CHECK_REPORT') {
+                  this.updateProductionFileInfo();
+                }
+                this.productionCheckDialogVisible = false;
+              }
+            })
+          } else { // id为空新增
+            this.$api.businessProductionPerformance.add(this.taskRecordDTO).then(res => {
+              if (res.code === 200 && res.data) {
+                this.$notify({
+                  title: '成功',
+                  message: '质检信息保存成功,请继续提交流程节点!',
+                  type: 'success',
+                  duration: 3000
+                });
+                if (this.currentNode.nodeCode === 'RECHECK_REPORT' || this.currentNode.nodeCode === 'FOURTH_CHECK_REPORT') {
+                  this.updateProductionFileInfo();
+                }
+                this.productionCheckDialogVisible = false;
+              }
+            })
+          }
+        } else {
+          this.$notify({
+            title: '错误',
+            message: '错误个数大于0时必须填写扣分原因',
+            type: 'error',
+            duration: 3000
+          });
+        }
+      } else {
         this.taskRecordDTO.recordId = this.currentNode.tasks[0].recordId;
         this.taskRecordDTO.taskData = this.productionPerformanceForm;
 
@@ -2802,13 +2857,6 @@ export default {
             }
           })
         }
-      } else {
-        this.$notify({
-          title: '错误',
-          message: '错误个数大于0时必须填写扣分原因',
-          type: 'error',
-          duration: 3000
-        });
       }
     },
     // 根据资产产品id更新文件路由信息