Fixiaobai
2023-09-01 43ec64e3887b15a76d3ce69679a29084df5efaf4
Merge branch 'master' of http://192.168.110.209:9001/r/lims-before
已修改6个文件
187 ■■■■■ 文件已修改
package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/experiment/template_testReport/index.vue 152 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/checkTheReport/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/inspectionApplication/index.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inspectionManagement/commissionInspection/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inspectionManagement/reportForInspection/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json
@@ -22,6 +22,7 @@
    "element-ui": "2.13.2",
    "html2pdf.js": "^0.10.1",
    "js-cookie": "2.2.0",
    "moment": "^2.29.4",
    "normalize.css": "7.0.0",
    "nprogress": "0.2.0",
    "path-to-regexp": "2.4.0",
src/components/experiment/template_testReport/index.vue
@@ -174,57 +174,73 @@
                                    <span>检验类型</span><br>
                                    <span>Type of test</span>
                                </td>
                                <td colspan="2"></td>
                                <td colspan="2">
                                    {{reportData.type === 0 ? "原材料检验" : (reportData.type === 1 ? "委托检验" : "成品检验")}}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>样品状态</span><br>
                                    <span>Sample discription</span>
                                </td>
                                <td colspan="2"></td>
                                <td colspan="2">/</td>
                                <td>
                                    <span>生产单位</span><br>
                                    <span>Producer</span>
                                </td>
                                <td colspan="2"></td>
                                <td colspan="2">
                                    {{reportData.supplier}}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>收样时间</span><br>
                                    <span>送样时间</span><br>
                                    <span>Received date</span>
                                </td>
                                <td colspan="2"></td>
                                <td colspan="2">
                                </td>
                                <td>
                                    <span>检验日期</span><br>
                                    <span>Test date</span>
                                </td>
                                <td colspan="2"></td>
                                <td colspan="2">
                                    {{reportData.createTime}}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>委托人</span><br>
                                    <span>Consignor</span>
                                </td>
                                <td colspan="2"></td>
                                <td colspan="2">
                                    {{enterprise.linkName}}
                                </td>
                                <td>
                                    <span>电话</span><br>
                                    <span>Tel</span>
                                </td>
                                <td colspan="2"></td>
                                <td colspan="2">
                                    {{enterprise.linkPhone}}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>委托单位</span><br>
                                    <span>Client</span>
                                </td>
                                <td colspan="5"></td>
                                <td colspan="5">
                                    {{enterprise.name}}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>委托单位地址</span><br>
                                    <span>Address</span>
                                </td>
                                <td colspan="5"></td>
                                <td colspan="5">
                                    {{enterprise.address}}
                                </td>
                            </tr>
                            <tr>
                                <td>
@@ -246,12 +262,12 @@
                                    <span>Conclusion </span>
                                </td>
                                <td colspan="5">
                                    <div style="height: 120px;"></div>
                                    <div style="padding-left: 20px;width:100%;text-align:left; font-size:18px;height: 120px;line-height: 120px;">{{reportData.inspectionStatus === 1 ? "合格" : "不合格"}}</div>
                                    <div style="height: 60px;margin-left: 250px;">
                                        <span>(检测报告专用章)</span><br>
                                        <span>( SPECIFIC STAMP FOR TEST RTORT) </span><br>
                                        <span>签发日期: 年 月 日</span><br>
                                        <span>Date of issue: August 23, 2023</span>
                                        <span>签发日期: {{formattedDate('yyyy年MM月DD日','zh-cn') }}</span><br>
                                        <span>Date of issue: {{formattedDate('LL','en-ca') }}</span>
                                    </div>
                                </td>
                            </tr>
@@ -267,7 +283,7 @@
                                    <span>编制</span><br>
                                    <span>Preparer</span>
                                </td>
                                <td colspan="2"></td>
                                <td colspan="2">{{reportData.preparerName}}</td>
                                <td>
                                    <span>检验</span><br>
                                    <span>Tester</span>
@@ -308,8 +324,8 @@
                <div class="table">
                    <div class="table-header">
                        <div>
                            <span>报告编号:</span><br>
                            <span>Reference No:</span>
                            <span>报告编号:{{reportData.rcode}}</span><br>
                            <span>Reference No:{{reportData.rcode}}</span>
                        </div>
                        <div>
                            <span>第2页共2页</span><br>
@@ -323,12 +339,12 @@
                                    <span>样品编号</span><br>
                                    <span>Sample No</span>
                                </td>
                                <td colspan="3"></td>
                                <td colspan="3">{{reportData.imCode}}</td>
                                <td colspan="4">
                                    <span>规格型号</span><br>
                                    <span>Type</span>
                                </td>
                                <td colspan="3"></td>
                                <td colspan="3">{{reportData.specifications}}</td>
                            </tr>
                            <tr>
                                <td>
@@ -356,53 +372,35 @@
                                    <span>Conclusion</span>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span></span><br>
                                    <span></span>
                                </td>
                                <td colspan="3">
                                    <span>样品标识</span><br>
                                    <span>Sample labeling</span>
                                </td>
                                <td>
                                    <span></span><br>
                                    <span>I</span>
                                </td>
                                <td colspan="3">
                                    <span></span><br>
                                    <span></span>
                                </td>
                                <td colspan="3">
                                    <span></span><br>
                                    <span></span>
                                </td>
                                <td>
                                    <span></span><br>
                                    <span></span>
                                </td>
                            </tr>
                            <tr v-for="(item, index) in resultTable" :key="index">
                                <td>
                                    <span>{{ item.id }}</span><br>
                                    <span>{{ index + 1 }}</span><br>
                                </td>
                                <td colspan="3">
                                    <span>{{ item.testitem }}</span><br>
                                    <span>{{ item.testitem_engName }}</span>
                                    <span>{{ item.ipName }}</span>
                                </td>
                                <td>
                                    <span>{{ item.unit }}</span>
                                </td>
                                <td colspan="3">
                                    <span>{{ item.requirement }}</span><br>
                                    <span>{{ item.requirement_eng }}</span>
                                    <span>{{ item.required }}</span><br>
                                </td>
                                <td colspan="3">
                                    <span>{{ item.testresult }}</span><br>
                                    <span>{{ item.testresult_engName }}</span>
                                    <span>{{ item.testValue }}</span><br>
                                </td>
                                <td>
                                    <span>{{ item.conclusion }}</span>
                                    <span>{{ isIfState(item.testState) }}</span>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <span>备注:</span><br/>
                                    <span>remarks:</span>
                                </td>
                                <td colspan="13">
                                    “√”表示项目合格,“×”表示项目不合格,“-”表示不要判定,“/”表示没有标准要求。
                                    “√” indicates test Item is qualified,“×” indicates test Item is unqualified,
                                    “-” indicates test Item  judgment is not required,“/” indicates test Item is no test requirement .
                                </td>
                            </tr>
                        </table>
@@ -412,8 +410,8 @@
            <div class="pageFour">
                <div class="page-header" style="display: flex;justify-content: space-between;font-size: 12px;">
                    <div>
                        <span>报告编号:</span><br>
                        <span>Reference No:</span>
                        <span>报告编号:{{reportData.rcode}}</span><br>
                        <span>Reference No:{{reportData.rcode}}</span>
                    </div>
                    <div>
                        <span>附页</span><br>
@@ -474,6 +472,7 @@
                                </td>
                            </tr>
                        </table>
                        <p style="width:100%;text-align: center;font-size: 15px;">------以下空白(Following Blank)------</p>
                    </div>
                </div>
            </div>
@@ -482,6 +481,7 @@
</template>
<script>
    import moment from 'moment';
    import {
        get,
        post,
@@ -489,19 +489,9 @@
    } from "@/api/util/requestUtil.js"
    export default {
        name: 'TestReport',
        props: ["reportData"],
        data() {
            return {
                resultTable: [{
                    id: '1',
                    testitem: '原始拉伸',
                    testitem_engName: 'Primitive strength',
                    unit: 'MPa',
                    requirement: '最小10.0',
                    requirement_eng: 'Minimun 10.0',
                    testresult: '',
                    testitem_engName: ''
                }],
                resultTable: [],
                table: [{
                    id: 1,
                    equipment_name: '拖拉机',
@@ -516,7 +506,8 @@
            }
        },
        mounted() {
            this.getEnterprise()
            this.initResultData();
            this.getEnterprise();
            if (Object.keys(this.reportData).length > 0) {
                this.reData.productNames = ''
                this.reportData.products.forEach(a=>{
@@ -526,12 +517,39 @@
            }
        },
        methods: {
            initResultData(){
                this.resultTable = this.reportData.products;
                if (this.resultTable.length < 15) {
                    let size = this.resultTable.length;
                    let num = 15 - size;
                    for (let i = 0; i < num; i++) {
                        this.resultTable.push({
                            code: null,
                            ipName: "",
                            required: "",
                            testState: null,
                            testValue: "",
                            unit: ""
                        })
                    }
                }
            },
            isIfState(val) {
                if (val === 1) return "√"
                else if (val === null || val === undefined) return null
                else return "X"
            },
            formattedDate(fmt,local) {
                moment.locale(local);
                return moment().format(fmt);
            },
            getEnterprise() {
                get("/report/getEnterprise").then(res => {
                    this.enterprise = res.data
                })
            }
        }
        },
        props: ["reportData"],
    }
</script>
src/views/experiment/checkTheReport/index.vue
@@ -177,18 +177,20 @@
            TestReport
        },
        methods: {
            async queryReportByRCode(code) {
            async queryReportByRCode(code,name) {
                const resp = await getReportData({
                    code: code
                });
                this.reportData = resp.data;
                this.reportData.preparerName = name;
                this.dialogVisible = true;
                console.log(this.reportData);
            },
            //查看报告按钮
            previewFun(row) {
                this.reportType = row.type;
                this.queryReportByRCode(row.reportCode);
                this.queryReportByRCode(row.reportCode,row.name);
            },
            handleSelectionChange(selection) {
                this.selectedRows = selection;
src/views/experiment/inspectionApplication/index.vue
@@ -609,8 +609,12 @@
            },
            reset() {
                this.countSize = 1;
                this.pageSize = 8;
                this.searchData = {};
                this.pageSize = 10;
                this.searchData = {
                    applicationnumber: '',
                    type: '',
                    state: '',
                };
                this.selectInspectsList();
            },
            //被选中的信息 单选
@@ -770,12 +774,18 @@
                this.addInspection()
            },
            delInspect(row){
                delInspect({
                    id: row.id
                }).then(res=>{
                    this.$message.success('已作废')
                    this.selectInspectsList()
                })
                this.$confirm('您确认删除这条数据吗?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    delInspect({
                        id: row.id
                    }).then(()=>{
                        this.$message.success('已作废')
                        this.selectInspectsList()
                    })
                }).catch(() => {});
            }
        }
    }
src/views/inspectionManagement/commissionInspection/index.vue
@@ -71,7 +71,6 @@
                            <el-table-column prop="inspectionTime" label="送样时间" min-width="8%" />
                            <el-table-column prop="completionDeadline" label="完成期限" min-width="8%" />
                            <el-table-column prop="contacts" label="委托编制人" min-width="8%" />
                            <el-table-column prop="insTime" label="检验日期" min-width="8%" />
                            <el-table-column prop="inspection_status" label="状态" min-width="8%">
                                <template slot-scope="scope">
                                    <div v-if="scope.row.inspection_status === 0">
src/views/inspectionManagement/reportForInspection/index.vue
@@ -84,7 +84,6 @@
                        <el-table-column prop="quantity" label="数量" min-width="5%" />
                        <el-table-column prop="inspectionDate" label="报检日期" min-width="8%" />
                        <el-table-column prop="surveyor" label="检验人" min-width="8%" />
                        <el-table-column prop="insTime" label="检验日期" min-width="8%" />
                        <el-table-column prop="type" label="状态" min-width="8%">
                            <template slot-scope="scope">
                                <span :style="{ color: scope.row.type === 1 ? 'green' : 'red' }">