|
|
@@ -0,0 +1,808 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-breadcrumb class="heading">
|
|
|
+ <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
|
|
|
+ <el-breadcrumb-item :to="{ path: '/lims/wzjys/reportpetroleumpipe' }">石油专用管材方钻杆检验记录</el-breadcrumb-item>
|
|
|
+ </el-breadcrumb>
|
|
|
+ <el-card>
|
|
|
+ <div slot="header">
|
|
|
+ <span>
|
|
|
+ <i class="icon icon-table2"></i> 石油专用管材油(套)管超声波检测记录
|
|
|
+ </span>
|
|
|
+ <span style="float: right;">
|
|
|
+ <el-button type="primary" size="mini" v-if="this.ischeck===1" @click="jiaoheshowdialog">校核</el-button>
|
|
|
+ <el-button type="primary" size="mini" v-if="this.DataStatus==0||this.DataStatus==5||this.DataStatus==3"
|
|
|
+ @click="setProoFreadShow">提交校核</el-button>
|
|
|
+ <el-button type="plain" size="mini" style="margin-left:10px; margin-top: -4px;"
|
|
|
+ v-if="this.DataStatus==0||this.DataStatus==5||this.DataStatus==3" @click="addDataEntity">添加明细</el-button>
|
|
|
+ <!--<el-button type="plain" @click="searchCommand('search')" size="mini"-->
|
|
|
+ <!--style="margin-left:10px; margin-top: -4px;">查询</el-button>-->
|
|
|
+
|
|
|
+ <router-link v-if="this.sign == '1'" :to="'/lims/dataentry/tacktodo'">
|
|
|
+ <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
|
|
|
+ </router-link>
|
|
|
+ <router-link v-else-if="this.sign == '2'" :to="'/lims/dataentry'">
|
|
|
+ <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
|
|
|
+ </router-link>
|
|
|
+ <router-link v-else-if="this.sign == '3'" :to="'/lims/dataentry/alltask'">
|
|
|
+ <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
|
|
|
+ </router-link>
|
|
|
+ <router-link v-else :to="'/lims/dataentry'">
|
|
|
+ <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
|
|
|
+ </router-link>
|
|
|
+ </span>
|
|
|
+ <el-form ref="form" :inline="true" style="float: right; margin-top: -7px">
|
|
|
+ <el-form-item label="样品编号">
|
|
|
+ <!--<el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"-->
|
|
|
+ <!--start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>-->
|
|
|
+ <el-input size="mini" v-model="searchForm.SampleNumber" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item>
|
|
|
+ <el-dropdown split-button type="primary" size="mini" @click="handleSearch" @command="searchCommand">
|
|
|
+ 查询
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item command="search">高级查询</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="clear">查询重置</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <el-form label-width="120px" ref="formDataMain" :model="formDataMain">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="编号">
|
|
|
+ <el-input v-model="formDataMain.UTNumber" placeholder="请输入" style="width: 100%"
|
|
|
+ :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="产品名称" prop="Product" :rules="{ required: true, message: '产品名称不能为空!'}">
|
|
|
+ <el-input v-model="formDataMain.Product" placeholder="请输入" style="width: 100%"
|
|
|
+ :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="产品规格">
|
|
|
+ <el-input v-model="formDataMain.Spec" placeholder="请输入" style="width: 100%"
|
|
|
+ :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="试块型号">
|
|
|
+ <el-input v-model="formDataMain.TBModel" placeholder="请输入" style="width: 100%"
|
|
|
+ :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="扫描灵敏度">
|
|
|
+ <el-input v-model="formDataMain.ScanSnty" placeholder="请输入" style="width: 100%"
|
|
|
+ :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="扫描调节" prop="ScanRegu">
|
|
|
+ <el-input v-model="formDataMain.ScanRegu" placeholder="请输入" style="width: 100%"
|
|
|
+ :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="扫查方式" prop="ScanMode">
|
|
|
+ <el-input v-model="formDataMain.ScanMode" placeholder="请输入" style="width: 100%"
|
|
|
+ :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="检测部位" prop="TestLoc">
|
|
|
+ <el-input v-model="formDataMain.TestLoc" placeholder="请输入" style="width: 100%"
|
|
|
+ :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="被检部位表面状态" prop="Appearance" label-width="130px">
|
|
|
+ <el-input v-model="formDataMain.Appearance" placeholder="请输入" style="width: 100%"
|
|
|
+ :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="耦合剂" prop="Couplant">
|
|
|
+ <el-input v-model="formDataMain.Couplant" placeholder="请输入" style="width: 100%"
|
|
|
+ :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="补偿" prop="Comp">
|
|
|
+ <el-input v-model="formDataMain.Comp" placeholder="请输入" style="width: 100%"
|
|
|
+ :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="声程范围" prop="UPRange">
|
|
|
+ <el-input v-model="formDataMain.UPRange" placeholder="请输入" style="width: 100%"
|
|
|
+ :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="声速范围" prop="SVRange">
|
|
|
+ <el-input v-model="formDataMain.SVRange" placeholder="请输入" style="width: 100%"
|
|
|
+ :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="检测标准" prop="DetectBasis">
|
|
|
+ <el-input v-model="formDataMain.DetectBasis" placeholder="请输入" style="width: 100%"
|
|
|
+ :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" align="center">
|
|
|
+ <el-button type="primary" size="mini" @click="saveMainInfo"
|
|
|
+ :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">保存</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="getDataHistory"
|
|
|
+ :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">选择历史记录</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </el-card>
|
|
|
+ <el-card class="box-card" style="height: calc(100vh - 270px);">
|
|
|
+ <el-table :data="entityList" border height="calc(100vh - 345px)" style="width: 100%" @sort-change="orderby"
|
|
|
+ @current-change="saveTableRow" @row-dblclick="dbTableRow">
|
|
|
+ <el-table-column v-if="this.DataStatus==0||this.DataStatus==5||this.DataStatus==3" label="操作" min-width="120"
|
|
|
+ align="center" fixed>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="primary" plain size="mini" title="编辑" @click="EditEntity(scope.row)">编辑</el-button>
|
|
|
+ <el-popover placement="top" title="提示">
|
|
|
+ <el-alert title="" description="确认要删除吗?" type="warning" :closable="false">
|
|
|
+ </el-alert>
|
|
|
+ <br />
|
|
|
+ <div style="text-align: right; margin: 0">
|
|
|
+ <el-button type="primary" size="mini" @click="deleteEntity(scope.row)">删除</el-button>
|
|
|
+ </div>
|
|
|
+ <el-button slot="reference" type="primary" plain size="mini" title="删除" style="margin-left:3px">
|
|
|
+ 删除
|
|
|
+ </el-button>
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="SampleNum" sortable min-width="110" label="样品编号" align="center"
|
|
|
+ show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3"
|
|
|
+ v-model="scope.row.SampleNum" style="width: 100%"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="DefectLoc" sortable min-width="110" label="缺陷位置" align="center"
|
|
|
+ show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3"
|
|
|
+ v-model="scope.row.DefectLoc" style="width: 100%"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="Depth" sortable min-width="110" label="缺陷深度" align="center"
|
|
|
+ show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3"
|
|
|
+ v-model="scope.row.Depth" style="width: 100%"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="Length" sortable min-width="110" label="缺陷长度" align="center"
|
|
|
+ show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3"
|
|
|
+ v-model="scope.row.Length" style="width: 100%"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="Heigth" sortable min-width="110" label="缺陷高度" align="center"
|
|
|
+ show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3"
|
|
|
+ v-model="scope.row.Heigth" style="width: 100%"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="Remark" sortable min-width="110" label="备注" align="center"
|
|
|
+ show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input size="small" :disabled="DataStatus != 0 && DataStatus!=5 && DataStatus!=3"
|
|
|
+ v-model="scope.row.Remark" style="width: 100%"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!--<el-table-column v-for="column in tableColumns"-->
|
|
|
+ <!--v-if="column.prop != 'CreateOn'" :prop="column.prop" sortable min-width="100" :label="column.label" align="center" show-overflow-tooltip></el-table-column>-->
|
|
|
+
|
|
|
+ <!--<el-table-column prop="CreateOn" sortable min-width="150" label="生成时间" align="center" show-overflow-tooltip>
|
|
|
+ <template scope="scope">
|
|
|
+ {{ jstimehandle(scope.row.CreateOn+'') }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>-->
|
|
|
+ </el-table>
|
|
|
+ <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
|
+ :page-sizes="[10, 15, 20, 25]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
|
|
|
+ </el-pagination>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <el-dialog title="高级查询" :visible.sync="dialogVisible" width="720px">
|
|
|
+ <el-form ref="advancedsearchForm" label-width="110px">
|
|
|
+ <el-row>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="生成时间">
|
|
|
+ <el-date-picker size="mini" v-model="CreateOn" type="daterange" style="width:100%" range-separator="至"
|
|
|
+ start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="">
|
|
|
+ <el-input size="mini" v-model="searchForm.Id" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="委托单ID">
|
|
|
+ <el-input size="mini" v-model="searchForm.EId" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="任务分配表ID">
|
|
|
+ <el-input size="mini" v-model="searchForm.TaskBalanceId" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="数据记录表ID">
|
|
|
+ <el-input size="mini" v-model="searchForm.DataEntryId" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="样品编号">
|
|
|
+ <el-input size="mini" v-model="searchForm.SampleNum" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="缺陷位置">
|
|
|
+ <el-input size="mini" v-model="searchForm.DefectLoc" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="缺陷深度">
|
|
|
+ <el-input size="mini" v-model="searchForm.Depth" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="缺陷长度">
|
|
|
+ <el-input size="mini" v-model="searchForm.Length" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="缺陷高度">
|
|
|
+ <el-input size="mini" v-model="searchForm.Heigth" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="备注">
|
|
|
+ <el-input size="mini" v-model="searchForm.Remark" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="mini" @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button size="mini" type="primary" @click="handleSearch">查 询</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog title="提交校核" :visible.sync="ProoFreadShow" top="5vh">
|
|
|
+ <el-form :model="shenhesubmitForm" label-width="130px" ref="shenhesubmitForm">
|
|
|
+ <el-row>
|
|
|
+ <el-form-item label="校核人" prop="AuthorUser">
|
|
|
+ <el-select ref="consigneeselect" v-model="shenhesubmitForm.AuditorUserId" placeholder="请选择校核人" style="width: 100%;">
|
|
|
+ <el-option v-for="item in acceptUsers" :key="item.id" :label="item.realname" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-form-item label="说明">
|
|
|
+ <el-input type="textarea" v-model="shenhesubmitForm.AuditorRemark" placeholder="请输入说明"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer" style="margin-top: -25px">
|
|
|
+ <el-button size="small" @click="ProoFreadShow = false">取 消</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="makesure()">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog title="校核信息" :visible.sync="jiaoheshow" top="5vh">
|
|
|
+ <el-form :model="jiaoheForm" label-width="130px" ref="jiaoheForm">
|
|
|
+ <el-form-item label="校核状态">
|
|
|
+ <template>
|
|
|
+ <el-radio class="radio" v-model="jiaoheForm.SuccessStatus" :label="2">校核通过</el-radio>
|
|
|
+ <el-radio class="radio" v-model="jiaoheForm.SuccessStatus" :label="3">校核未通过</el-radio>
|
|
|
+ </template>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="说明">
|
|
|
+ <el-input type="textarea" v-model="jiaoheForm.AuditorRemark" placeholder="请输入校核说明"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer" style="margin-top: -25px">
|
|
|
+ <el-button size="small" @click="jiaoheshow = false">取 消</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="jiaohemakesure()">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <data-opera ref="DataoperaCompoment" :DataEntryId="DataEntryId+''" :TaskBalanceId="TaskBalanceId+''" :EId="EId+''"
|
|
|
+ @init-data="initDatas"></data-opera>
|
|
|
+ <data-history ref="historyDataCompoment" @init-datalist="initDatas"></data-history>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+ import { mapGetters } from 'vuex'
|
|
|
+ import api from '@/api/wzjys/limsreportoilpipeultrasonic'
|
|
|
+ import DataHistory from './datahistory.vue'
|
|
|
+ import DataOpera from './operation.vue'
|
|
|
+ import cmp from '@/utils/strings.js'
|
|
|
+
|
|
|
+ export default {
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({
|
|
|
+ authUser: 'authUser'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ name: 'limsreportoilpipeultrasonic',
|
|
|
+ components: {
|
|
|
+ DataHistory,
|
|
|
+ DataOpera
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ dialogVisible: false,
|
|
|
+ Id: '',
|
|
|
+ EId: '',
|
|
|
+ TaskBalanceId: '',
|
|
|
+ DataEntryId: '',
|
|
|
+ ProoFreadShow: false,
|
|
|
+ jiaoheshow: false,
|
|
|
+ sign: '2',
|
|
|
+ ischeck: 0,
|
|
|
+ DataStatus: 0,
|
|
|
+ acceptUsers: [],
|
|
|
+ // 列表数据
|
|
|
+ entityList: [],
|
|
|
+ // 分页参数
|
|
|
+ size: 10,
|
|
|
+ currentPage: 1,
|
|
|
+ currentItemCount: 0,
|
|
|
+ // 列表排序
|
|
|
+ Column: {
|
|
|
+ Order: '',
|
|
|
+ Prop: ''
|
|
|
+ },
|
|
|
+ // 查询时间
|
|
|
+ CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
|
|
|
+ // 查询项
|
|
|
+ searchFormReset: {},
|
|
|
+ formDataMain: {
|
|
|
+ Id: '',
|
|
|
+ EId: '',
|
|
|
+ DocId: '',
|
|
|
+ TaskId: '',
|
|
|
+ UTNumber: '',
|
|
|
+ Product: '',
|
|
|
+ Spec: '',
|
|
|
+ Appearance: '',
|
|
|
+ TBModel: '',
|
|
|
+ ScanSnty: '',
|
|
|
+ ScanRegu: '',
|
|
|
+ ScanMode: '',
|
|
|
+ TestLoc: '',
|
|
|
+ Couplant: '',
|
|
|
+ Comp: '',
|
|
|
+ UPRange: '',
|
|
|
+ SVRange: '',
|
|
|
+ DetectBasis: ''
|
|
|
+ },
|
|
|
+ searchForm: {
|
|
|
+ Id: '',
|
|
|
+ EId: '',
|
|
|
+ TaskBalanceId: '',
|
|
|
+ DataEntryId: '',
|
|
|
+ SampleNum: '',
|
|
|
+ DefectLoc: '',
|
|
|
+ Depth: '',
|
|
|
+ Length: '',
|
|
|
+ Heigth: '',
|
|
|
+ Remark: '',
|
|
|
+ CreateUserId: '',
|
|
|
+ CreateOn: '',
|
|
|
+ CreateBy: '',
|
|
|
+ ModifiedOn: '',
|
|
|
+ ModifiedUserId: '',
|
|
|
+ ModifiedBy: ''
|
|
|
+
|
|
|
+ },
|
|
|
+ // 校核提交
|
|
|
+ shenhesubmitForm: {
|
|
|
+ AuditorUserId: '',
|
|
|
+ DataEntryId: '',
|
|
|
+ SuccessStatus: 1,
|
|
|
+ AuditorRemark: ''
|
|
|
+ },
|
|
|
+ jiaoheForm: {
|
|
|
+ SuccessStatus: 2,
|
|
|
+ AuditorRemark: '',
|
|
|
+ DataEntryId: 0
|
|
|
+ },
|
|
|
+ rowHistory: {},
|
|
|
+ params: {
|
|
|
+ Id: '',
|
|
|
+ EId: '',
|
|
|
+ DataDocId: '',
|
|
|
+ TestDepartId: '',
|
|
|
+ PositionCheckId: '',
|
|
|
+ TaskBalanceId: '',
|
|
|
+ DataEntryId: '',
|
|
|
+ EntrustCorp: ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ this.EId = this.$route.query.eid
|
|
|
+ this.TaskBalanceId = this.$route.query.tbid
|
|
|
+ this.DataEntryId = this.$route.query.deid
|
|
|
+ this.DataStatus = parseInt(this.$route.query.datastatus)
|
|
|
+ this.DataDocId = this.$route.query.datadocId
|
|
|
+ this.sign = this.$route.query.sign
|
|
|
+ this.ischeck = this.$route.query.ischeck
|
|
|
+ // 查询条件初始值备份
|
|
|
+ Object.assign(this.searchFormReset, this.searchForm)
|
|
|
+ // 查询列表
|
|
|
+ this.getDataEntry()
|
|
|
+ this.initDatas()
|
|
|
+ this.getUsersByRole()
|
|
|
+ // this.getDictOptions()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ saveMainInfo () {
|
|
|
+ this.formDataMain.Comp = parseFloat(this.formDataMain.Comp)
|
|
|
+ this.formDataMain.SVRange = parseFloat(this.formDataMain.SVRange)
|
|
|
+ this.$refs['formDataMain'].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.$axios.post('/limsdataentry/updateEntity/' + this.DataEntryId, this.formDataMain).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ this.getDataEntry()
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ console.log(error)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getDataEntry () {
|
|
|
+ this.$axios.get('/limsdataentry/getdataentry/' + this.DataEntryId).then(res => {
|
|
|
+ this.formDataMain = res.data
|
|
|
+ if (!this.formDataMain.InspectionDate || this.formDataMain.InspectionDate.indexOf('0001-01-01') !== -1) {
|
|
|
+ this.formDataMain.InspectionDate = new Date()
|
|
|
+ }
|
|
|
+ // this.params.Id = res.data.Id
|
|
|
+ }).catch(error => {
|
|
|
+ console.log(error)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getDataHistory () {
|
|
|
+ this.params.DataDocId = this.formDataMain.DocId
|
|
|
+ this.params.TaskBalanceId = this.formDataMain.TaskId
|
|
|
+ this.params.EId = this.formDataMain.EId
|
|
|
+ this.params.DataEntryId = this.formDataMain.Id
|
|
|
+ this.params.Id = this.formDataMain.Id
|
|
|
+ this.$refs['historyDataCompoment'].dialogTableVisible = true
|
|
|
+ this.$refs['historyDataCompoment'].OpenOrignDataInput(this.params)
|
|
|
+ },
|
|
|
+ initDatas () {
|
|
|
+ // 分页及列表条件
|
|
|
+ let params = {
|
|
|
+ _currentPage: this.currentPage,
|
|
|
+ _size: this.size,
|
|
|
+ Order: this.Column.Order,
|
|
|
+ Prop: this.Column.Prop
|
|
|
+ }
|
|
|
+ let myCreateOn = []
|
|
|
+ // 解析时间
|
|
|
+ // if (this.CreateOn.length === 2) {
|
|
|
+ // this.CreateOn[1].setHours(23)
|
|
|
+ // this.CreateOn[1].setMinutes(59)
|
|
|
+ // this.CreateOn[1].setSeconds(59)
|
|
|
+ // myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
|
|
|
+ // myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
|
|
|
+ // }
|
|
|
+ // 查询条件
|
|
|
+ this.searchForm.DataEntryId = this.DataEntryId
|
|
|
+ Object.assign(params, this.searchForm)
|
|
|
+ // 访问接口
|
|
|
+ api.getList(myCreateOn.join(','), params, this.$axios).then(res => {
|
|
|
+ this.entityList = res.data.items
|
|
|
+ this.currentItemCount = res.data.currentItemCount
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ addDataEntity () {
|
|
|
+ // 刷新子列表
|
|
|
+ this.$refs['DataoperaCompoment'].resetFormData()
|
|
|
+ this.$refs['DataoperaCompoment'].dialogVisible = true
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取校核人列表
|
|
|
+ getUsersByRole () {
|
|
|
+ // request
|
|
|
+ this.$axios.get('/limsdataentry/getuserlistbyjhrole/', {})
|
|
|
+ .then(res => {
|
|
|
+ if (res.data instanceof Array && res.data.length > 0) {
|
|
|
+ this.acceptUsers = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ // handle error
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ setProoFreadShow () {
|
|
|
+ // if (this.formData.PositionCheckId === '') {
|
|
|
+ // this.$message.warning('检测地点为空,不允许提交!')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ this.ProoFreadShow = true
|
|
|
+ },
|
|
|
+ // 打开校核弹窗
|
|
|
+ jiaoheshowdialog () {
|
|
|
+ this.jiaoheForm.DataEntryId = this.DataEntryId
|
|
|
+ this.jiaoheshow = true
|
|
|
+ },
|
|
|
+ checkstatus () {
|
|
|
+ this.shenhesubmitForm.SuccessStatus = 1
|
|
|
+ this.shenhesubmitForm.DataEntryId = parseInt(this.DataEntryId)
|
|
|
+ let params = this.shenhesubmitForm
|
|
|
+ this.$axios.put('/limsdataentry/checksubmit/', params)
|
|
|
+ .then(res => {
|
|
|
+ // response
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+
|
|
|
+ })
|
|
|
+ this.DataStatus = 1
|
|
|
+ // this.initDatas()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '校核提交错误!'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ // handle error
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 提交校核
|
|
|
+ makesure () {
|
|
|
+ console.log(this.formDataMain.Id, '====')
|
|
|
+ if (!this.formDataMain.Id || this.formDataMain.Id < 0) {
|
|
|
+ this.$message.warning('没有保存,不能提交!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$confirm('确定提交校核!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.ProoFreadShow = false
|
|
|
+ console.log('1')
|
|
|
+ this.checkstatus()
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
+ },
|
|
|
+ jiaohecheckstatus () {
|
|
|
+ let params = this.jiaoheForm
|
|
|
+ this.$axios.put('/limsdataentry/jiaohe/', params)
|
|
|
+ .then(res => {
|
|
|
+ // response
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ this.ischeck = '0'
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ // this.initdata2()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '校核错误,请先确定您已经录入内容并且录入的内容已经保存'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ // handle error
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ jiaohemakesure () {
|
|
|
+ this.$confirm('确认校核!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.jiaoheshow = false
|
|
|
+ this.jiaohecheckstatus()
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
+ },
|
|
|
+
|
|
|
+ getDictOptions () {
|
|
|
+ api.getDictList(this.$axios).then(res => {
|
|
|
+
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ dbTableRow (row) {
|
|
|
+ if (this.entityList.length === 1) {
|
|
|
+ this.updateTableRow(row)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ saveTableRow (row, oldRow) {
|
|
|
+ let noChange = true
|
|
|
+ if (oldRow && row) {
|
|
|
+ let tmpRow = {}
|
|
|
+ Object.assign(tmpRow, oldRow)
|
|
|
+ noChange = cmp(this.rowHistory, tmpRow)
|
|
|
+ }
|
|
|
+ if (oldRow && oldRow.Id > 0 && !noChange) {
|
|
|
+ this.updateTableRow(oldRow)
|
|
|
+ }
|
|
|
+ Object.assign(this.rowHistory, row)
|
|
|
+ },
|
|
|
+ updateTableRow (row) {
|
|
|
+ api.updateEntity(row.Id, row, this.$axios).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ // 保存成功后,初始化数据,变成修改
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ searchCommand (command) {
|
|
|
+ if (command === 'search') {
|
|
|
+ this.dialogVisible = true
|
|
|
+ } else if (command === 'clear') {
|
|
|
+ this.clearSearch()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 列表排序功能
|
|
|
+ orderby (column) {
|
|
|
+ if (column.order === 'ascending') {
|
|
|
+ this.Column.Order = 'asc'
|
|
|
+ } else if (column.order === 'descending') {
|
|
|
+ this.Column.Order = 'desc'
|
|
|
+ }
|
|
|
+ this.Column.Prop = column.prop
|
|
|
+ this.initDatas()
|
|
|
+ },
|
|
|
+ clearSearch () {
|
|
|
+ Object.assign(this.searchForm, this.searchFormReset)
|
|
|
+ // this.searchForm = this.searchFormReset;
|
|
|
+ this.CreateOn = ''
|
|
|
+ this.initDatas()
|
|
|
+ },
|
|
|
+ handleSearch () {
|
|
|
+ this.currentPage = 1
|
|
|
+ this.dialogVisible = false
|
|
|
+ this.initDatas()
|
|
|
+ },
|
|
|
+ handleCurrentChange (value) {
|
|
|
+ this.currentPage = value
|
|
|
+ this.initDatas()
|
|
|
+ },
|
|
|
+ handleSizeChange (value) {
|
|
|
+ this.size = value
|
|
|
+ this.currentPage = 1
|
|
|
+ this.initDatas()
|
|
|
+ },
|
|
|
+ deleteEntity (row) {
|
|
|
+ row.deleteConfirmFlag = false
|
|
|
+ api.deleteEntity(row.Id, this.$axios).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ this.initDatas()
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ EditEntity (row) {
|
|
|
+ this.$refs['DataoperaCompoment'].subListEditEntity(row.Id)
|
|
|
+ this.$refs['DataoperaCompoment'].dialogVisible = true
|
|
|
+ },
|
|
|
+
|
|
|
+ jstimehandle (val) {
|
|
|
+ if (val === '') {
|
|
|
+ return '----'
|
|
|
+ } else if (val === '0001-01-01T08:00:00+08:00') {
|
|
|
+ return '----'
|
|
|
+ } else if (val === '5000-01-01T23:59:59+08:00') {
|
|
|
+ return '永久'
|
|
|
+ } else {
|
|
|
+ val = val.replace('T', ' ')
|
|
|
+ return val.substring(0, 10)
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ formatDateTime (date) {
|
|
|
+ var y = date.getFullYear()
|
|
|
+ var m = date.getMonth() + 1
|
|
|
+ m = m < 10 ? ('0' + m) : m
|
|
|
+ var d = date.getDate()
|
|
|
+ d = d < 10 ? ('0' + d) : d
|
|
|
+ var h = date.getHours()
|
|
|
+ var minute = date.getMinutes()
|
|
|
+ minute = minute < 10 ? ('0' + minute) : minute
|
|
|
+ return y + '-' + m + '-' + d + ' ' + h + ':' + minute
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+
|
|
|
+</style>
|
|
|
+
|