Pārlūkot izejas kodu

1.新增根据业务类型,产品id及checkLoop获取质检信息接口
2.新增产品复审
3.产品装订盖章
4.产品出入库(开发中)

GouGengquan 1 gadu atpakaļ
vecāks
revīzija
4d55ffd77e

+ 4 - 0
src/api/modules/businessProductionPerformance.js

@@ -21,5 +21,9 @@ export default {
   delete(params) {
     return request.delete(`businessProductionPerformance/${params}`)
   },
+  // 根据业务类型,产品id及checkLoop获取质检信息
+  getProductionPerformance(params) {
+    return request.get(`businessProductionPerformance/getProductionPerformance`, { params: params })
+  }
 
 }

+ 69 - 17
src/views/assets/orderDetail.vue

@@ -458,6 +458,13 @@
                   :value="pro.productionNo" :key="pro.id"></el-option>
               </el-select>
             </span>
+            <div style="margin-top: 30px;">
+              <span v-if="currentNode.nodeCode === 'STATEMENT_BOOKBINDING_STAMP'">
+                <span v-for="pro in assetsProductionData" :key="pro.id" style="color: red;">
+                  打印份数:{{ pro.printCount }}
+                </span>
+              </span>
+            </div>
             <el-table ref="multipleTable" :data="assetsProductionData" stripe :header-row-style="{ color: '#333333' }"
               border takeNumberItems style="width: 100%; margin-top:20px">
               <el-table-column prop="id" label="id" width="80" align="center">
@@ -517,9 +524,17 @@
                     编辑
                   </el-button>
                   <el-button v-if="currentNode.nodeCode === 'REVIEW_STATEMENT'" type="text" size="small"
-                    @click="productionCheckDialogVisible = true, productionPerformanceForm.productionId = scope.row.id">
-                    产品质检
+                    @click="productionPerformanceForm.productionId = scope.row.id, openProductionCheckDialog(), productionCheckDialogVisible = true">
+                    审核意见书
+                  </el-button>
+                  <el-button v-if="currentNode.nodeCode === 'REEXAMINE_STATEMENT'" type="text" size="small"
+                    @click="productionPerformanceForm.productionId = scope.row.id, openProductionCheckDialog(), productionCheckDialogVisible = true">
+                    复审意见书
                   </el-button>
+                  <el-button v-if="currentNode.nodeCode === 'STATEMENT_IN' || currentNode.nodeCode === 'REPORT_IN'"
+                    type="text" size="small" @click="openWareHouseDialog(scope.row);">产品入库</el-button>
+                  <el-button v-if="currentNode.nodeCode === 'STATEMENT_OUT' || currentNode.nodeCode === 'REPORT_OUT'"
+                    type="text" size="small" @click="openWareHouseDialog(scope.row);">产品出库</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -1038,19 +1053,28 @@
         </div>
       </el-form>
     </el-dialog>
+
+    <el-dialog :visible.sync="warehouseDialog" width="25%" center top="35vh" custom-class="doWarehouseClass"
+      @closed="cleanWareHouseProductionType()">
+      <ScanEntry ref="scanEntry" @scanEntryFun="handleScanEntry" label="请扫描二维码或输入报告号" />
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="warehouseDialog = false">取 消</el-button>
+        <el-button type="primary" @click="doWareHouse()">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 <script>
 import YDetailPageLayout from '@/components/YDetailPageLayout/index_detail'
 import WorkflowBoard from '@/components/workflowBoard'
-import { isNumber, phoneNumber, postiveInteger, isIdNumber } from '@/utils/validate'
-import { calculateTargetPrice, validateParams } from '@/utils/personalUtil'
+import ScanEntry from '@/components/ScanEntry'
 
 export default {
   name: 'assetsDetail',
   components: {
     YDetailPageLayout,
-    WorkflowBoard
+    WorkflowBoard,
+    ScanEntry
   },
   data() {
     return {
@@ -1502,7 +1526,9 @@ export default {
         normalMistake: 0,
         reason: null,
         checkId: null
-      }
+      },
+      // 产品入库弹窗
+      warehouseDialog: false
     }
   },
   watch: {
@@ -2498,23 +2524,36 @@ export default {
         }
       })
     },
+    // 根据业务类型,产品id及checkLoop获取质检信息
+    openProductionCheckDialog() {
+      this.productionPerformanceForm.businessType = 'ASSET_BUSINESS';
+      const curNode = this.currentNode.nodeCode;
+      if (curNode === 'REVIEW_STATEMENT' || curNode === 'CHECK_REPORT') {
+        this.productionPerformanceForm.checkLoop = "初审";
+      }
+      if (curNode === 'REEXAMINE_STATEMENT' || curNode === 'RECHECK_REPORT') {
+        this.productionPerformanceForm.checkLoop = "复审";
+      }
+      if (curNode === 'FOURTH_CHECK_REPORT') {
+        this.productionPerformanceForm.checkLoop = "三审";
+      }
+      this.$api.businessProductionPerformance.getProductionPerformance(this.productionPerformanceForm).then(res => {
+        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;
+          this.productionPerformanceForm.normalMistake = res.data.normalMistake;
+          this.productionPerformanceForm.reason = res.data.reason;
+        }
+      })
+    },
     // 保存产品质检信息(新增与保存都是这个方法)
     saveQuality() {
       if ((this.productionPerformanceForm.hardMistake + this.productionPerformanceForm.fatalMistake + this.productionPerformanceForm.normalMistake) > 0 &&
         this.productionPerformanceForm.reason !== null && this.productionPerformanceForm.reason !== '') {
         this.taskRecordDTO.recordId = this.currentNode.tasks[0].recordId;
         this.taskRecordDTO.taskData = this.productionPerformanceForm;
-        this.productionPerformanceForm.businessType = 'ASSET_BUSINESS';
-        const curNode = this.currentNode.nodeCode;
-        if (curNode==='REVIEW_STATEMENT' || curNode==='CHECK_REPORT'){
-          this.productionPerformanceForm.checkLoop = "初审";
-        }
-        if (curNode==='REEXAMINE_STATEMENT' || curNode==='RECHECK_REPORT'){
-          this.productionPerformanceForm.checkLoop = "复审";
-        }
-        if (curNode==='FOURTH_CHECK_REPORT'){
-          this.productionPerformanceForm.checkLoop = "三审";
-        }
+
         // id不为空更新
         if (this.productionPerformanceForm.id) {
           this.$api.businessProductionPerformance.edit(this.taskRecordDTO).then(res => {
@@ -2549,6 +2588,19 @@ export default {
           duration: 3000
         });
       }
+    },
+    // 打开产品出入库弹窗
+    openWareHouseDialog(row) {
+      this.warehouseDialog = true;
+      this.wareHouseProductionType = row.production;
+      this.wareHouseproductionId = row.id
+    },
+    handleScanEntry(scanData) {
+      this.scanEntryData = scanData;
+    },
+    cleanWareHouseProductionType() {
+      this.wareHouseProductionType = null;
+      this.wareHouseproductionId = null;
     }
   }