ソースを参照

入厂检验单:详情界面

chris 3 年 前
コミット
75e011a163

+ 8 - 0
src/api/check.js

@@ -34,3 +34,11 @@ export function getIncomingInspectionDetail (id) {
     method: 'get'
   })
 }
+
+// 获取入库检验单详情
+export function getIncomingInspection (id) {
+  return request({
+    url: request.adornUrl(`/biz-service/incomingInspection/info/report/${id}`),
+    method: 'get'
+  })
+}

+ 36 - 0
src/views/modules/check/ibc-detail.vue

@@ -0,0 +1,36 @@
+<template>
+    <el-dialog
+      title="详情"
+      width="70%"
+      :close-on-click-modal="false"
+      :visible.sync="visible">
+      <div>
+        <el-descriptions title="测试">
+          <el-descriptions-item label="用户名">chris</el-descriptions-item>
+        </el-descriptions>
+      </div><span slot="footer" class="dialog-footer">
+        <el-button @click="visible = false">取消</el-button>
+      </span>
+
+    </el-dialog>
+</template>
+
+<script>
+  export default {
+    name: 'ibc-detail',
+    data () {
+      return {
+        visible: false
+      }
+    },
+    methods: {
+      async init (id) {
+        this.visible = true
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 46 - 24
src/views/modules/check/ibc-export.vue

@@ -7,22 +7,22 @@
       :visible.sync="visible">
       <div class="my-table" id="pdfDom" style="padding-top: 55px;background-color:#fff;">
         <h1 style="text-align: center">入  厂  检  验  报  告</h1>
-        <h3 style="text-align: right">编号: DQ/CX-20-01</h3>
+        <h4 style="text-align: right;margin-right: 100px;margin-top: 40px">编号: {{dataForm.inspectionCode}}</h4>
         <!-- border="1" -->
         <table align="center" border="1" cellpadding="8" cellspacing="0"
-               style="margin-top: 60px;font-family: SimSun,serif;font-size: large;text-align: center">
+               style="margin-top: 10px;font-family: SimSun,serif;font-size: large;text-align: center">
           <tbody align="center">
           <el-row>
             <th style="width: 100px">供方单位</th>
-            <td style="width: 250px" colspan="1" rowspan="1">重庆木之科技有限公司</td>
+            <td style="width: 250px" colspan="1" rowspan="1">{{dataForm.source}}</td>
             <th style="width: 100px">批次号</th>
-            <td style="width: 400px" colspan="1" rowspan="1">S100-078</td>
+            <td style="width: 400px" colspan="1" rowspan="1">{{dataForm.batchNumber}}</td>
           </el-row>
           <el-row>
             <th style="width: 100px">产品名称</th>
-            <td style="width: 250px" colspan="1" rowspan="1"></td>
+            <td style="width: 250px" colspan="1" rowspan="1">{{dataForm.materialName}}</td>
             <th style="width: 100px">产品图号</th>
-            <td style="width: 400px" colspan="1" rowspan="1"></td>
+            <td style="width: 400px" colspan="1" rowspan="1">{{dataForm.specifications}}</td>
           </el-row>
           <el-row>
             <th style="width: 100px">来料类型</th>
@@ -85,30 +85,36 @@
               label="备注">
             </el-table-column>
           </el-table>
-          <el-row>
-            <th style="width: 850px; text-align: left">检验结论:</th>
-          </el-row>
-          <el-row style="height: 200px">
-
-          </el-row>
-          <el-row>
-            <th style="width: 100px">检验员:</th>
-            <td style="width: 400px"></td>
-            <th style="width: 100px">审核:</th>
-            <td style="width: 250px"></td>
-          </el-row>
+          <table align="center" cellpadding="8" cellspacing="0"
+                 style="margin-top: 10px;font-family: SimSun,serif;font-size: large;text-align: center">
+            <tbody align="left">
+            <el-row>
+              <th style="width: 850px; text-align: left">检验结论:</th>
+            </el-row>
+            <el-row style="height: 200px">
+              {{dataForm.conclusion}}
+            </el-row>
+            <el-row>
+              <th style="width: 100px">检验员:</th>
+              <td style="width: 400px">{{dataForm.creatorName}}</td>
+              <th style="width: 80px">审核:</th>
+              <td style="width: 250px">梁瑞伟</td>
+            </el-row>
+            </tbody>
+          </table>
           </tbody>
         </table>
       </div>
       <span slot="footer" class="dialog-footer">
-      <el-button @click="visible = false">取消</el-button>
-      <el-button type="primary" v-on:click="getPdf()">导出</el-button>
-    </span>
+        <el-button @click="visible = false">取消</el-button>
+        <el-button type="primary" v-on:click="getPdf()">导出</el-button>
+      </span>
     </el-dialog>
   </div>
 </template>
 
 <script>
+  import {getIncomingInspection} from '@/api/check'
   export default {
     name: 'ibc-export',
     data () {
@@ -207,10 +213,26 @@
       }
     },
     methods: {
-      async init (dataForm) {
-        // console.log('dataForm = ' + JSON.stringify(dataForm))
-        this.dataForm = dataForm
+      async init (id) {
         this.visible = true
+        this.idsMaterial = []
+        this.idsDevice = []
+        this.checkList = []
+        if (!id) return
+        await getIncomingInspection(id).then(({data}) => {
+          if (data && data.code === '200') {
+            this.dataForm = data.data
+            if (data.data.inspectionType) {
+              this.idsMaterial.push(data.data.inspectionType)
+            }
+            if (data.data.detectionEquipment) {
+              this.idsDevice = data.data.detectionEquipment
+            }
+            if (data.data.qualityInspectionItemsList) {
+              this.checkList = data.data.qualityInspectionItemsList
+            }
+          }
+        })
       }
     }
   }

+ 14 - 5
src/views/modules/check/in-bound-check.vue

@@ -7,7 +7,6 @@
       </el-form-item>
       <el-form-item>
         <el-button @click="queryPage()">查询</el-button>
-        <el-button @click="exportPdf()" type="primary">导出预览</el-button>
       </el-form-item>
     </el-form>
     <el-table
@@ -107,8 +106,9 @@
         width="150"
         label="操作">
         <template slot-scope="scope">
-          <el-button v-if="isAuth('quality:inspection:info')" type="text" size="small" @click="addOrUpdateHandle(scope.row.inspectionId, true)">查看</el-button>
+          <el-button v-if="isAuth('quality:inspection:info')" type="text" size="small" @click="details(scope.row.inspectionId)">查看</el-button>
           <el-button v-if="isAuth('quality:inspection:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.inspectionId, false)">处理</el-button>
+          <el-button v-if="isAuth('quality:inspection:info:report')" type="text" size="small" @click="exportPdf(scope.row.inspectionId)">导出</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -124,20 +124,23 @@
     <!-- 弹窗, 新增 / 修改 -->
     <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
     <export v-if="exportPageVisible" ref="exportPage"/>
+    <detail v-if="detailVisible" ref="details"/>
   </div>
 </template>
 
 <script>
   import AddOrUpdate from './ibc-add-or-update'
   import Export from './ibc-export'
+  import Detail from './ibc-detail'
   import { getInBoundCheckList } from '@/api/check'
   export default {
     name: 'in-bound-check',
-    components: {AddOrUpdate, Export},
+    components: {AddOrUpdate, Export, Detail},
     data () {
       return {
         exportPageVisible: false,
         addOrUpdateVisible: false,
+        detailVisible: false,
         dataForm: {},
         dataList: [],
         pageIndex: 1,
@@ -197,10 +200,16 @@
           this.$refs.addOrUpdate.init(id, disable)
         })
       },
-      exportPdf () {
+      exportPdf (id) {
         this.exportPageVisible = true
         this.$nextTick(() => {
-          this.$refs.exportPage.init()
+          this.$refs.exportPage.init(id)
+        })
+      },
+      details (id) {
+        this.detailVisible = true
+        this.$nextTick(() => {
+          this.$refs.details.init(id)
         })
       }
     }

+ 2 - 2
src/views/modules/tech/ctafts-add-or-detail.vue

@@ -87,7 +87,7 @@
               </el-input>
             </el-form-item>
           </el-col>
-          <el-col v-if="drawerConf.prop != 'start' && drawerConf.prop != 'end'" :span="12">
+          <el-col v-if="drawerConf.prop !== 'start' && drawerConf.prop !== 'end'" :span="12">
             <el-form-item
                 label="节点类型"
                 prop="type">
@@ -103,7 +103,7 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col v-if="drawerConf.prop != 'start' && drawerConf.prop != 'end'" :span="12">
+          <el-col v-if="drawerConf.prop !== 'start' && drawerConf.prop !== 'end'" :span="12">
             <el-form-item
               label="工种"
               prop="workTypeId">