Browse Source

Merge branch 'master' of http://112.74.164.79:3000/chenying/X-web

damon227 3 years ago
parent
commit
cb15cd40b4

+ 8 - 0
src/api/check.js

@@ -42,3 +42,11 @@ export function getIncomingInspection (id) {
     method: 'get'
   })
 }
+
+// 获取来料通知单详情
+export function getIncomingInspection2 (id) {
+  return request({
+    url: request.adornUrl(`/biz-service/incomingInspection/info/notice/${id}`),
+    method: 'get'
+  })
+}

+ 130 - 0
src/views/modules/check/ibc-export1.vue

@@ -0,0 +1,130 @@
+<!-- 导出来料通知单 -->
+<template>
+  <div>
+    <el-dialog
+      title="导出"
+      width="80%"
+      :close-on-click-modal="false"
+      :visible.sync="visible">
+      <div class="my-table" id="printDiv" style="padding:55px 10px 0 10px;background-color:#fff;">
+        <h1 style="text-align: center">来料检验/入库通知单</h1>
+        <h4 style="text-align: right;margin-right: 20px;margin-top: 40px">编号: {{dataForm.inspectionCode}}</h4>
+        <table class="table-data-list" align="center" cellpadding="8" cellspacing="0" border="1"
+               style="width:100%;font-family: SimSun,serif;font-size: medium;text-align: center;border-width: 1px 1px 0 0">
+          <thead>
+          <tr>
+            <th style="width: 50px" rowspan="2">序号</th>
+            <th style="width: 140px" rowspan="2">日期</th>
+            <th style="width: 100px" rowspan="2">物品名称</th>
+            <th style="width: 100px" rowspan="2">型号、规格</th>
+            <th style="width: 60px" rowspan="2">单位</th>
+            <th style="width: 80px" colspan="2" rowspan="1">数量</th>
+            <th style="width: 100px" rowspan="2">检验结论</th>
+            <th style="width: 80px" rowspan="2">检验员</th>
+            <th style="width: 100px" rowspan="2">机型/用途</th>
+            <th style="width: auto" rowspan="2">备注</th>
+          </tr>
+          <tr>
+            <th style="width: 100px" colspan="1" rowspan="1">实际来料数量</th>
+            <th style="width: 100px" colspan="1" rowspan="1">检验/入库数量</th>
+          </tr>
+          </thead>
+          <tbody align="center">
+          <tr v-for="(item,i) in checkList">
+            <td>{{i+1}}</td>
+            <td>2021-11-28</td>
+            <td>{{item.inspectionProject}}</td>
+            <td>{{item.measuredRecords}}</td>
+            <td>{{dataForm.cnt}}</td>
+            <td>{{dataForm.qualifiedCnt}}</td>
+            <td>{{item.notes}}</td>
+            <td>{{item.notes}}</td>
+            <td>{{item.notes}}</td>
+            <td>{{item.notes}}</td>
+            <td>{{item.notes}}</td>
+          </tr>
+          </tbody>
+        </table>
+        <table class="table-conclusion" align="center" cellpadding="8" cellspacing="0" border="1" width="100%"
+               style="font-family: SimSun,serif;font-size: medium;text-align: center;border-width: 0; margin-top: 20px">
+          <tbody align="left">
+          <tr>
+            <th style="width: 200px">采购申请(日期):</th>
+            <td style="width: 100px">2021-11-12</td>
+            <th style="width: 200px">仓库审核(日期):</th>
+            <td style="width: 150px">2021-11-29</td>
+            <th style="width: 240px">质量管理部签收(日期):</th>
+            <td style="width: auto" colspan="0">2021-11-29</td>
+          </tr>
+          </tbody>
+        </table>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="visible = false">取消</el-button>
+        <el-button type="primary" v-print="printObj">导出</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {getIncomingInspection2} from '@/api/check'
+  export default {
+    name: 'ibc-export1',
+    data () {
+      return {
+        printObj: {
+          id: 'printDiv',
+          popTitle: '-',
+          extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>'
+        },
+        htmlTitle: '入厂检验报告',
+        visible: false,
+        dataForm: {},
+        checkList: [],
+        size: ''
+      }
+    },
+    methods: {
+      async init (id) {
+        this.visible = true
+        this.checkList = []
+        if (!id) return
+        await getIncomingInspection2(id).then(({data}) => {
+          if (data && data.code === '200') {
+            this.dataForm = data.data
+            if (data.data.qualityInspectionItemsList) {
+              this.checkList = data.data.qualityInspectionItemsList
+            }
+          }
+        })
+      }
+    }
+  }
+</script>
+
+<style scoped>
+  @page{
+    size:  auto;   /* auto is the initial value */
+    margin: 3mm;  /* this affects the margin in the printer settings */
+  }
+
+  html{
+    background-color: #FFFFFF;
+    margin: 0;  /* this affects the margin on the html before sending to printer */
+  }
+
+  body{
+    border: solid 1px blue ;
+    margin: 10mm 15mm 10mm 15mm; /* margin you want for the content */
+  }
+
+  .table-first td, .table-first th, .table-data-list th, .table-data-list td{
+    border-color: grey;
+    border-width: 0 0 1px 1px;
+  }
+  .table-conclusion td, .table-conclusion th{
+    border-color: grey;
+    border-width: 0;
+  }
+</style>

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

@@ -24,14 +24,15 @@
         prop="inspectionCode"
         header-align="center"
         align="center"
-        min-width="220"
+        width="160"
+        :show-tooltip-when-overflow="true"
         label="检验单编码">
       </el-table-column>
       <el-table-column
         prop="materialName"
         header-align="center"
         align="center"
-        width="120"
+        width="140"
         :show-tooltip-when-overflow="true"
         label="物品名称">
       </el-table-column>
@@ -53,6 +54,8 @@
         prop="batchNumber"
         header-align="center"
         align="center"
+        width="100"
+        :show-tooltip-when-overflow="true"
         label="批次号">
       </el-table-column>
       <el-table-column
@@ -110,12 +113,13 @@
         fixed="right"
         header-align="center"
         align="center"
-        width="150"
+        width="180"
         label="操作">
         <template slot-scope="scope">
           <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') && scope.row.state === '0'" type="text" size="small" @click="addOrUpdateHandle(scope.row.inspectionId)">处理</el-button>
-          <el-button v-if="isAuth('quality:inspection:info:report') && scope.row.state === '1'" type="text" size="small" @click="exportPdf(scope.row.inspectionId)">导出</el-button>
+          <el-button v-if="isAuth('quality:inspection:info:report') && scope.row.state === '1'" type="text" size="small" @click="exportPdf(scope.row.inspectionId)">检验单</el-button>
+          <el-button v-if="isAuth('quality:inspection:info:notice') && scope.row.state === '1'" type="text" size="small" @click="export1Pdf(scope.row.inspectionId)">来料单</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -131,6 +135,7 @@
     <!-- 弹窗, 新增 / 修改 -->
     <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
     <export v-if="exportPageVisible" ref="exportPage"/>
+    <export1 v-if="export1PageVisible" ref="export1Page"/>
     <detail v-if="detailVisible" ref="details"/>
   </div>
 </template>
@@ -138,14 +143,16 @@
 <script>
   import AddOrUpdate from './ibc-add-or-update'
   import Export from './ibc-export'
+  import Export1 from './ibc-export1'
   import Detail from './ibc-detail'
   import { getInBoundCheckList } from '@/api/check'
   export default {
     name: 'in-bound-check',
-    components: {AddOrUpdate, Export, Detail},
+    components: {AddOrUpdate, Export, Detail, Export1},
     data () {
       return {
         exportPageVisible: false,
+        export1PageVisible: false,
         addOrUpdateVisible: false,
         detailVisible: false,
         dataForm: {},
@@ -221,6 +228,12 @@
           this.$refs.exportPage.init(id)
         })
       },
+      export1Pdf (id) {
+        this.export1PageVisible = true
+        this.$nextTick(() => {
+          this.$refs.export1Page.init(id)
+        })
+      },
       details (id) {
         this.detailVisible = true
         this.$nextTick(() => {

+ 1 - 1
src/views/modules/order/order.vue

@@ -118,7 +118,7 @@
         label="操作">
         <template slot-scope="scope">
           <el-button v-if="isAuth('order:ctl:info')" type="text" size="small" @click="detailHandle(scope.row.orderId)">查看</el-button>
-          <el-button v-if="isAuth('order:ctl:editor')" type="text" size="small" @click="addOrUpdateHandle(scope.row.orderId,false)">编辑</el-button>
+          <el-button v-if="isAuth('order:ctl:editor') && Number(scope.row.state) < 2" type="text" size="small" @click="addOrUpdateHandle(scope.row.orderId,false)">编辑</el-button>
         </template>
       </el-table-column>
     </el-table>

+ 2 - 2
src/views/modules/sale/purchase.vue

@@ -123,8 +123,8 @@
         label="操作">
         <template slot-scope="scope">
           <el-button v-if="isAuth('sale:purchase:info')" type="text" size="small" @click="detailHandle(scope.row.purchaseId)">查看</el-button>
-          <el-button v-if="isAuth('sale:purchase:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.purchaseId, false)">编辑</el-button>
-          <el-button v-if="isAuth('sale:purchase:revoke')" style="color: red" type="text" size="small" @click="revokeHandle(scope.row.purchaseId)">撤回</el-button>
+          <el-button v-if="isAuth('sale:purchase:update') && Number(scope.row.purchaseState) < 2" type="text" size="small" @click="addOrUpdateHandle(scope.row.purchaseId, false)">编辑</el-button>
+          <el-button v-if="isAuth('sale:purchase:revoke') && Number(scope.row.purchaseState) < 2" style="color: red" type="text" size="small" @click="revokeHandle(scope.row.purchaseId)">撤回</el-button>
         </template>
       </el-table-column>
     </el-table>

+ 1 - 1
src/views/modules/warehouse/stock-order.vue

@@ -114,7 +114,7 @@
         <template slot-scope="scope">
           <el-button v-if="isAuth('wh:inon:info')" type="text" size="small" @click="detailHandle(scope.row.id)">查看</el-button>
           <el-button v-if="false" type="text" size="small" @click="exportItem(scope.row.id)">导出</el-button>
-          <el-button v-if="isAuth('wh:in:revoke')" type="text" size="small" @click="cancelItem(scope.row)">撤回</el-button>
+          <el-button v-if="isAuth('wh:in:revoke') && (Number(scope.row.state) === 1 || Number(scope.row.state) === 2)" type="text" size="small" @click="cancelItem(scope.row)">撤回</el-button>
         </template>
       </el-table-column>
     </el-table>

+ 1 - 1
src/views/modules/warehouse/template-delivery.vue

@@ -71,7 +71,7 @@
         label="操作">
         <template slot-scope="scope">
           <el-button v-if="isAuth('wh:template-out:info')" type="text" size="small" @click="detailHandle(scope.row.recordId)">查看</el-button>
-          <el-button v-if="isAuth('wh:template-out:out')" type="text" size="small" @click="addOrUpdateHandle(scope.row.recordId, false)">出库</el-button>
+          <el-button v-if="isAuth('wh:template-out:out') && Number(scope.row.state) !== 1" type="text" size="small" @click="addOrUpdateHandle(scope.row.recordId, false)">出库</el-button>
         </template>
       </el-table-column>
     </el-table>