|
|
@@ -1,35 +1,65 @@
|
|
|
<style>
|
|
|
- .input-with-select .el-select .el-input {
|
|
|
- width: 110px;
|
|
|
- }
|
|
|
-
|
|
|
- .input-with-select .el-input-group__append {
|
|
|
- background-color: #fff;
|
|
|
- }
|
|
|
+.input-with-select .el-select .el-input {
|
|
|
+ width: 110px;
|
|
|
+}
|
|
|
|
|
|
+.input-with-select .el-input-group__append {
|
|
|
+ background-color: #fff;
|
|
|
+}
|
|
|
</style>
|
|
|
|
|
|
<template>
|
|
|
<div>
|
|
|
<el-card style="min-height: calc(100vh - 92px);">
|
|
|
- <div slot="header" style="height: 20px;">
|
|
|
+ <div slot="header"
|
|
|
+ style="height: 20px;">
|
|
|
<span style="float: left;">
|
|
|
<i class="icon icon-table2"></i>
|
|
|
</span>
|
|
|
- <el-breadcrumb class="heading" style="float: left; margin-left: 5px">
|
|
|
+ <el-breadcrumb class="heading"
|
|
|
+ style="float: left; margin-left: 5px">
|
|
|
<el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item :to="{ path: '/biobank/sampleCK' }">出库申请</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item>{{pagetitle}}</el-breadcrumb-item>
|
|
|
</el-breadcrumb>
|
|
|
<span style="float: right;">
|
|
|
- <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 8px" :disabled="save_flag"
|
|
|
- @click="saveApply">保存</el-button>
|
|
|
- <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 8px"
|
|
|
- onclick="window.history.go(-1)">返回</el-button>
|
|
|
+ <!-- <el-dropdown split-button
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ style="margin-left:10px; margin-top: -4px;"
|
|
|
+ @command="handleExportsamplesCommand">
|
|
|
+ 导出
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item style="color:black;"
|
|
|
+ command="exportchosen">导出所选样本</el-dropdown-item>
|
|
|
+ <el-dropdown-item style="color:black;"
|
|
|
+ command="exportpage">导出当前页样本</el-dropdown-item>
|
|
|
+ <el-dropdown-item style="color:black;"
|
|
|
+ command="exportall">导出所有样本</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown> -->
|
|
|
+ <el-button size="mini"
|
|
|
+ type="primary"
|
|
|
+ class="el-button--small"
|
|
|
+ style="margin-left: 8px"
|
|
|
+ :disabled="save_flag"
|
|
|
+ @click="saveApply">保存</el-button>
|
|
|
+ <el-button size="mini"
|
|
|
+ type="primary"
|
|
|
+ class="el-button--small"
|
|
|
+ style="margin-left: 8px"
|
|
|
+
|
|
|
+ @click="handleExportsamplesCommand">导出</el-button>
|
|
|
+ <el-button size="mini"
|
|
|
+ type="primary"
|
|
|
+ class="el-button--small"
|
|
|
+ style="margin-left: 8px"
|
|
|
+ onclick="window.history.go(-1)">返回</el-button>
|
|
|
</span>
|
|
|
</div>
|
|
|
-
|
|
|
- <el-form :model="SampleCKform" label-width="100px" ref="SampleCKform">
|
|
|
+ <el-form :model="SampleCKform"
|
|
|
+ label-width="100px"
|
|
|
+ ref="SampleCKform">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="24">
|
|
|
<el-card class="box-card equipmentdetail">
|
|
|
@@ -39,51 +69,76 @@
|
|
|
</div>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="出库单号">
|
|
|
- <el-input v-model="SampleCKform.EntryNo" placeholder="为空默认自动生成" :disabled="add_flag"></el-input>
|
|
|
+ <el-input v-model="SampleCKform.EntryNo"
|
|
|
+ placeholder="为空默认自动生成"
|
|
|
+ :disabled="add_flag"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="申请人">
|
|
|
- <el-input v-model="SampleCKform.OperationBy" placeholder="请输入申请人" :disabled="add_flag"></el-input>
|
|
|
+ <el-input v-model="SampleCKform.OperationBy"
|
|
|
+ placeholder="请输入申请人"
|
|
|
+ :disabled="add_flag"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="领用部门">
|
|
|
- <el-input v-model="SampleCKform.Section" placeholder="请输入领用部门" :disabled="add_flag"></el-input>
|
|
|
+ <el-input v-model="SampleCKform.Section"
|
|
|
+ placeholder="请输入领用部门"
|
|
|
+ :disabled="add_flag"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="申请时间">
|
|
|
- <el-date-picker v-model="SampleCKform.EntryTime" type="datetime" style="width:100%"
|
|
|
- placeholder="请选择申请时间" :disabled="add_flag">
|
|
|
+ <el-date-picker v-model="SampleCKform.EntryTime"
|
|
|
+ type="datetime"
|
|
|
+ style="width:100%"
|
|
|
+ placeholder="请选择申请时间"
|
|
|
+ :disabled="add_flag">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8" v-if="(save_flag) && (SampleCKform.ApplyStatus != 5)">
|
|
|
+ <el-col :span="8"
|
|
|
+ v-if="(save_flag) && (SampleCKform.ApplyStatus != 5)">
|
|
|
<el-form-item label="审核人">
|
|
|
- <el-select ref="reflrrselect" v-model="SampleCKform.ConUserId" style="width:100%">
|
|
|
- <el-option v-for="item in userlist" :label="item.Realname" :value="item.Id" :key="item.Id">
|
|
|
+ <el-select ref="reflrrselect"
|
|
|
+ v-model="SampleCKform.ConUserId"
|
|
|
+ style="width:100%">
|
|
|
+ <el-option v-for="item in userlist"
|
|
|
+ :label="item.Realname"
|
|
|
+ :value="item.Id"
|
|
|
+ :key="item.Id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8" v-if="(save_flag) && (SampleCKform.ApplyStatus != 5)">
|
|
|
+ <el-col :span="8"
|
|
|
+ v-if="(save_flag) && (SampleCKform.ApplyStatus != 5)">
|
|
|
<el-form-item label="审核时间">
|
|
|
- <el-date-picker v-model="SampleCKform.ConTime" type="datetime" style="width:100%"
|
|
|
- placeholder="请选择审核时间">
|
|
|
+ <el-date-picker v-model="SampleCKform.ConTime"
|
|
|
+ type="datetime"
|
|
|
+ style="width:100%"
|
|
|
+ placeholder="请选择审核时间">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="备注">
|
|
|
- <el-input v-model="SampleCKform.Remark" type="textarea" :rows=3 :disabled="add_flag"
|
|
|
- placeholder="请输入备注信息"></el-input>
|
|
|
+ <el-input v-model="SampleCKform.Remark"
|
|
|
+ type="textarea"
|
|
|
+ :rows=3
|
|
|
+ :disabled="add_flag"
|
|
|
+ placeholder="请输入备注信息"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="24" v-if="(save_flag) && (SampleCKform.ApplyStatus != 5)">
|
|
|
+ <el-col :span="24"
|
|
|
+ v-if="(save_flag) && (SampleCKform.ApplyStatus != 5)">
|
|
|
<el-form-item label="审核备注">
|
|
|
- <el-input v-model="SampleCKform.AuditorRemark" type="textarea" :rows=3 :disabled="save_flag"
|
|
|
- placeholder="请输入审核备注信息"></el-input>
|
|
|
+ <el-input v-model="SampleCKform.AuditorRemark"
|
|
|
+ type="textarea"
|
|
|
+ :rows=3
|
|
|
+ :disabled="save_flag"
|
|
|
+ placeholder="请输入审核备注信息"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-card>
|
|
|
@@ -95,10 +150,14 @@
|
|
|
<el-col :span="24"> </el-col>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-form :model="applyForm" label-width="100px" ref="applydetail">
|
|
|
- <el-row :gutter="20" class="applydetailcss">
|
|
|
+ <el-form :model="applyForm"
|
|
|
+ label-width="100px"
|
|
|
+ ref="applydetail">
|
|
|
+ <el-row :gutter="20"
|
|
|
+ class="applydetailcss">
|
|
|
<el-col :span="24">
|
|
|
- <el-card class="box-card equipmentdetail adddetailcard" v-if="save_flag">
|
|
|
+ <el-card class="box-card equipmentdetail adddetailcard"
|
|
|
+ v-if="save_flag">
|
|
|
<div slot="header">
|
|
|
<legend style="color:#436EEE"></legend>
|
|
|
<i class="icon icon-paragraph-justify">申请信息</i>
|
|
|
@@ -108,42 +167,87 @@
|
|
|
</div>
|
|
|
<!-- <el-table :data="ApplyList" border style="width: 100%" @selection-change="authorSelectionChange"> -->
|
|
|
<!-- <el-table-column type="selection" width="35px"></el-table-column> -->
|
|
|
- <el-table :data="ApplyList" border style="width: 100%">
|
|
|
- <el-table-column prop="BarCode" label="样本条码" min-width="120" align="center" show-overflow-tooltip>
|
|
|
+ <el-table :data="ApplyList"
|
|
|
+ border
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ style="width: 100%">
|
|
|
+
|
|
|
+ <el-table-column type="selection" width="55"></el-table-column>
|
|
|
+ <el-table-column prop="BarCode"
|
|
|
+ label="样本条码"
|
|
|
+ min-width="120"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="SampleCode" label="样本编码" min-width="120" align="center" show-overflow-tooltip>
|
|
|
+ <el-table-column prop="SampleCode"
|
|
|
+ label="样本编码"
|
|
|
+ min-width="120"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="SampleTypeName" min-width="80" label="样本类型" align="center" show-overflow-tooltip>
|
|
|
+ <el-table-column prop="SampleTypeName"
|
|
|
+ min-width="80"
|
|
|
+ label="样本类型"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="可用容量" min-width="80" show-overflow-tooltip align="center" header-align="center">
|
|
|
+ <el-table-column label="可用容量"
|
|
|
+ min-width="80"
|
|
|
+ show-overflow-tooltip
|
|
|
+ align="center"
|
|
|
+ header-align="center">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.Capacity }} {{ scope.row.Unit }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="存储位置" min-width="120" show-overflow-tooltip align="center"
|
|
|
- header-align="center">
|
|
|
+ <el-table-column label="存储位置"
|
|
|
+ min-width="120"
|
|
|
+ show-overflow-tooltip
|
|
|
+ align="center"
|
|
|
+ header-align="center">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.ECode + "-" + numtoupchar(scope.row.ShelfY) + scope.row.ShelfX + "-" +
|
|
|
numtoupchar(scope.row.BoxY) + scope.row.BoxX + "-" + postiontoupchar(scope.row.Position) }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="DetailStatus" sortable label="审核状态" align="center" min-width="80">
|
|
|
+ <el-table-column prop="DetailStatus"
|
|
|
+ sortable
|
|
|
+ label="审核状态"
|
|
|
+ align="center"
|
|
|
+ min-width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tag v-show="scope.row.DetailStatus=='0'" type="warning">未审核</el-tag>
|
|
|
- <el-tag v-show="scope.row.DetailStatus=='1'" type="success">已审核</el-tag>
|
|
|
- <el-tag v-show="scope.row.DetailStatus=='2'" type="success">已审核</el-tag>
|
|
|
- <el-tag v-show="scope.row.DetailStatus=='3'" type="danger">审核异常</el-tag>
|
|
|
- <el-tag v-show="scope.row.DetailStatus=='5'" type="danger">已撤销</el-tag>
|
|
|
+ <el-tag v-show="scope.row.DetailStatus=='0'"
|
|
|
+ type="warning">未审核</el-tag>
|
|
|
+ <el-tag v-show="scope.row.DetailStatus=='1'"
|
|
|
+ type="success">已审核</el-tag>
|
|
|
+ <el-tag v-show="scope.row.DetailStatus=='2'"
|
|
|
+ type="success">已审核</el-tag>
|
|
|
+ <el-tag v-show="scope.row.DetailStatus=='3'"
|
|
|
+ type="danger">审核异常</el-tag>
|
|
|
+ <el-tag v-show="scope.row.DetailStatus=='5'"
|
|
|
+ type="danger">已撤销</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="CHUserBy" min-width="80" label="操作人" align="center" show-overflow-tooltip>
|
|
|
+ <el-table-column prop="CHUserBy"
|
|
|
+ min-width="80"
|
|
|
+ label="操作人"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="CancelBy" min-width="80" label="撤销人" align="center" show-overflow-tooltip>
|
|
|
+ <el-table-column prop="CancelBy"
|
|
|
+ min-width="80"
|
|
|
+ label="撤销人"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-pagination @size-change="HandleSizeChange" @current-change="HandleCurrentChange"
|
|
|
- :current-page="CurrentPage" :page-sizes="[10, 15, 20]" :page-size="Size"
|
|
|
- layout="total, sizes, prev, next, jumper" :total="CurrentItemCount">
|
|
|
+ <el-pagination @size-change="HandleSizeChange"
|
|
|
+ @current-change="HandleCurrentChange"
|
|
|
+ :current-page="CurrentPage"
|
|
|
+ :page-sizes="[10, 15, 20]"
|
|
|
+ :page-size="Size"
|
|
|
+ layout="total, sizes, prev, next, jumper"
|
|
|
+ :total="CurrentItemCount">
|
|
|
</el-pagination>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
@@ -154,27 +258,70 @@
|
|
|
<el-col :span="24"> </el-col>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-form :model="samplesForm" label-width="100px" ref="samplesdetail">
|
|
|
- <el-row :gutter="20" class="samplesdetailcss">
|
|
|
+ <el-form :model="samplesForm"
|
|
|
+ label-width="100px"
|
|
|
+ ref="samplesdetail">
|
|
|
+ <el-row :gutter="20"
|
|
|
+ class="samplesdetailcss">
|
|
|
<el-col :span="24">
|
|
|
- <el-card class="box-card equipmentdetail adddetailcard" v-if="!save_flag">
|
|
|
+ <el-card class="box-card equipmentdetail adddetailcard"
|
|
|
+ v-if="!save_flag">
|
|
|
<div slot="header">
|
|
|
<legend style="color:#436EEE"></legend>
|
|
|
<i class="icon icon-paragraph-justify">样本信息</i>
|
|
|
<span style="float: right;">
|
|
|
- <el-button type="primary" class="el-button--mini" @click="AddDetail" :disabled="!add_flag">样本出库
|
|
|
+ <el-dropdown split-button
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ @click="seachdata"
|
|
|
+ class="el-button--mini"
|
|
|
+ @command="handleSearchCommand">
|
|
|
+ 出库查询
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item command="search">高级查询</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="clear">查询重置</el-dropdown-item>
|
|
|
+ <!-- <el-dropdown-item style="color:black;"
|
|
|
+ v-for="item in searchTemplates"
|
|
|
+ :key="item.Name"
|
|
|
+ :command="item.Name">{{item.Name}}</el-dropdown-item> -->
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ <el-button type="primary"
|
|
|
+ class="el-button--mini"
|
|
|
+ @click="AddDetail"
|
|
|
+ :disabled="!add_flag">样本出库
|
|
|
</el-button>
|
|
|
</span>
|
|
|
</div>
|
|
|
- <el-table :data="SamplesList" border style="width: 100%" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" width="35px"></el-table-column>
|
|
|
- <el-table-column prop="BarCode" label="样本条码" min-width="120" align="center" show-overflow-tooltip>
|
|
|
+ <el-table :data="SamplesList"
|
|
|
+ border
|
|
|
+ style="width: 100%"
|
|
|
+ @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column type="selection"
|
|
|
+ width="35px"></el-table-column>
|
|
|
+ <el-table-column prop="BarCode"
|
|
|
+ label="样本条码"
|
|
|
+ min-width="120"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="SampleCode" label="样本编码" min-width="120" align="center" show-overflow-tooltip>
|
|
|
+ <el-table-column prop="SampleCode"
|
|
|
+ label="样本编码"
|
|
|
+ min-width="120"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="SampleTypeName" min-width="80" label="样本类型" align="center" show-overflow-tooltip>
|
|
|
+ <el-table-column prop="SampleTypeName"
|
|
|
+ min-width="80"
|
|
|
+ label="样本类型"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="可用容量" min-width="80" show-overflow-tooltip align="center" header-align="center">
|
|
|
+ <el-table-column label="可用容量"
|
|
|
+ min-width="80"
|
|
|
+ show-overflow-tooltip
|
|
|
+ align="center"
|
|
|
+ header-align="center">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.Capacity }} {{ scope.row.Unit }}
|
|
|
</template>
|
|
|
@@ -186,19 +333,30 @@
|
|
|
</router-link>
|
|
|
</template>
|
|
|
</el-table-column> -->
|
|
|
- <el-table-column label="存储位置" min-width="120" show-overflow-tooltip align="center"
|
|
|
- header-align="center">
|
|
|
+ <el-table-column label="存储位置"
|
|
|
+ min-width="120"
|
|
|
+ show-overflow-tooltip
|
|
|
+ align="center"
|
|
|
+ header-align="center">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.ECode + "-" + numtoupchar(scope.row.ShelfY) + scope.row.ShelfX + "-" +
|
|
|
numtoupchar(scope.row.BoxY) + scope.row.BoxX + "-" + postiontoupchar(scope.row.Position) }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="CHUserBy" min-width="80" label="提交人" align="center" show-overflow-tooltip>
|
|
|
+ <el-table-column prop="CHUserBy"
|
|
|
+ min-width="80"
|
|
|
+ label="提交人"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage" :page-sizes="[10, 15, 20]" :page-size="size"
|
|
|
- layout="total, sizes, prev, next, jumper" :total="currentItemCount">
|
|
|
+ <el-pagination @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="currentPage"
|
|
|
+ :page-sizes="[10, 15, 20]"
|
|
|
+ :page-size="size"
|
|
|
+ layout="total, sizes, prev, next, jumper"
|
|
|
+ :total="currentItemCount">
|
|
|
</el-pagination>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
@@ -206,499 +364,586 @@
|
|
|
</el-form>
|
|
|
</el-card>
|
|
|
|
|
|
- <el-dialog title="审核信息" :visible.sync="auditorShow" top="5vh">
|
|
|
- <el-form :model="shenheForm" label-width="130px" ref="shenheForm">
|
|
|
+ <el-dialog title="审核信息"
|
|
|
+ :visible.sync="auditorShow"
|
|
|
+ top="5vh">
|
|
|
+ <el-form :model="shenheForm"
|
|
|
+ label-width="130px"
|
|
|
+ ref="shenheForm">
|
|
|
<el-form-item label="审核状态">
|
|
|
<template>
|
|
|
- <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="0">审核通过</el-radio>
|
|
|
- <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1">审核异常</el-radio>
|
|
|
+ <el-radio class="radio"
|
|
|
+ v-model="shenheForm.SuccessStatus"
|
|
|
+ :label="0">审核通过</el-radio>
|
|
|
+ <el-radio class="radio"
|
|
|
+ v-model="shenheForm.SuccessStatus"
|
|
|
+ :label="1">审核异常</el-radio>
|
|
|
</template>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="审核说明">
|
|
|
- <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="请输入审核说明"></el-input>
|
|
|
+ <el-input type="textarea"
|
|
|
+ v-model="shenheForm.AuditorRemark"
|
|
|
+ placeholder="请输入审核说明"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <div slot="footer" class="dialog-footer" style="margin-top: -25px">
|
|
|
- <el-button size="small" @click="auditorShow = false">取 消</el-button>
|
|
|
- <el-button type="primary" size="small" @click="auditor()">确 定</el-button>
|
|
|
+ <div slot="footer"
|
|
|
+ class="dialog-footer"
|
|
|
+ style="margin-top: -25px">
|
|
|
+ <el-button size="small"
|
|
|
+ @click="auditorShow = false">取 消</el-button>
|
|
|
+ <el-button type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="auditor()">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 登陆验证 -->
|
|
|
- <el-dialog title="登录验证" width="80%" :visible.sync="loginDialogVisible" top="5vh" center @close="cancelLogin">
|
|
|
- <el-form class="login-form" auto-complete="off" ref="user" label-position="top">
|
|
|
+ <el-dialog title="登录验证"
|
|
|
+ width="80%"
|
|
|
+ :visible.sync="loginDialogVisible"
|
|
|
+ top="5vh"
|
|
|
+ center
|
|
|
+ @close="cancelLogin">
|
|
|
+ <el-form class="login-form"
|
|
|
+ auto-complete="off"
|
|
|
+ ref="user"
|
|
|
+ label-position="top">
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="用户" prop="username">
|
|
|
- <el-input type="text" v-model="GetterName" disabled placeholder="请输入用户名" />
|
|
|
+ <el-form-item label="用户"
|
|
|
+ prop="username">
|
|
|
+ <el-input type="text"
|
|
|
+ v-model="GetterName"
|
|
|
+ disabled
|
|
|
+ placeholder="请输入用户名" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="密码" prop="password">
|
|
|
- <el-input type="password" v-model="password" placeholder="请输入密码" @keyup.enter.native="confirmLogin" />
|
|
|
+ <el-form-item label="密码"
|
|
|
+ prop="password">
|
|
|
+ <el-input type="password"
|
|
|
+ v-model="password"
|
|
|
+ placeholder="请输入密码"
|
|
|
+ @keyup.enter.native="confirmLogin" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<div style="text-align:center;">
|
|
|
- <el-button size="small" @click="cancelLogin">取 消</el-button>
|
|
|
- <el-button size="small" type="primary" @click="confirmLogin">登录</el-button>
|
|
|
+ <el-button size="small"
|
|
|
+ @click="cancelLogin">取 消</el-button>
|
|
|
+ <el-button size="small"
|
|
|
+ type="primary"
|
|
|
+ @click="confirmLogin">登录</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {
|
|
|
- mapGetters
|
|
|
- } from 'vuex'
|
|
|
- import store from 'store'
|
|
|
- export default {
|
|
|
- name: 'materialdetect',
|
|
|
- components: {},
|
|
|
- components: {},
|
|
|
- data() {
|
|
|
- return {
|
|
|
- pagetitle: '', //面包屑标题
|
|
|
- service_flag: '', //页面新增或编辑标志位
|
|
|
- CurrentItemCount: 0, // 当前页显示数量
|
|
|
- CurrentPage: 1, // 当前页
|
|
|
- Size: 10,
|
|
|
- currentItemCount: 0, // 当前页显示数量
|
|
|
- currentPage: 1, // 当前页
|
|
|
- size: 10,
|
|
|
- SamplesList: [], //选择样本列表
|
|
|
- selectSamples: [],
|
|
|
- SampleCKform: {
|
|
|
- ApplyType: 2,
|
|
|
- EntryNo: '',
|
|
|
- OperationBy: '',
|
|
|
- Section: '',
|
|
|
- ConUserId: '', //负责人ID
|
|
|
- ConUserBy: '', //负责人
|
|
|
- EntryTime: new Date(),
|
|
|
- ConTime: new Date(),
|
|
|
- ApplyStatus: 0,
|
|
|
- Remark: '',
|
|
|
- SuccessStatus: 0,
|
|
|
- AuditorRemark: ''
|
|
|
- },
|
|
|
- auditor_flag: false,
|
|
|
- save_flag: false,
|
|
|
- add_flag: false,
|
|
|
- detail_flag: false,
|
|
|
- Id: 0,
|
|
|
- userlist: [],
|
|
|
- Equipment: '',
|
|
|
- samplesForm: {},
|
|
|
- ApplyList: [],
|
|
|
- applyForm: {},
|
|
|
- auditorShow: false,
|
|
|
- ParentId: 0,
|
|
|
- authorSamples: [], //要审核的样本列表
|
|
|
- shenheForm: {
|
|
|
- SuccessStatus: 0,
|
|
|
- AuditorRemark: ''
|
|
|
- },
|
|
|
- loginDialogVisible: false,
|
|
|
- username: '',
|
|
|
- password: '',
|
|
|
- isLoginSucceed: false,
|
|
|
- acceptUsers: [],
|
|
|
- Getter: '', //接收人
|
|
|
- GetterName: '', //接收人
|
|
|
- CreateOn: [],
|
|
|
- ServiceId: 0,
|
|
|
- permissionscode: {
|
|
|
- ckadd: 'biobank.sampleCK.add',
|
|
|
- ckedit: 'biobank.sampleCK.edit',
|
|
|
- ckdelete: 'biobank.sampleCK.delete',
|
|
|
- ckapprove: 'biobank.sampleCK.approve',
|
|
|
- },
|
|
|
- permissions: {
|
|
|
- 'biobank.sampleCK.add': false,
|
|
|
- 'biobank.sampleCK.edit': false,
|
|
|
- 'biobank.sampleCK.delete': false,
|
|
|
- 'biobank.sampleCK.approve': false,
|
|
|
- },
|
|
|
+import {
|
|
|
+ mapGetters
|
|
|
+} from 'vuex'
|
|
|
+import store from 'store'
|
|
|
+import axios from 'axios'
|
|
|
+export default {
|
|
|
+ name: 'materialdetect',
|
|
|
+ components: {},
|
|
|
+ components: {},
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ pagetitle: '', // 面包屑标题
|
|
|
+ service_flag: '', // 页面新增或编辑标志位
|
|
|
+ CurrentItemCount: 0, // 当前页显示数量
|
|
|
+ CurrentPage: 1, // 当前页
|
|
|
+ Size: 10,
|
|
|
+ currentItemCount: 0, // 当前页显示数量
|
|
|
+ currentPage: 1, // 当前页
|
|
|
+ size: 10,
|
|
|
+ SamplesList: [], // 选择样本列表
|
|
|
+ selectSamples: [],
|
|
|
+ SampleCKform: {
|
|
|
+ ApplyType: 2,
|
|
|
+ EntryNo: '',
|
|
|
+ OperationBy: '',
|
|
|
+ Section: '',
|
|
|
+ ConUserId: '', // 负责人ID
|
|
|
+ ConUserBy: '', // 负责人
|
|
|
+ EntryTime: new Date(),
|
|
|
+ ConTime: new Date(),
|
|
|
+ ApplyStatus: 0,
|
|
|
+ Remark: '',
|
|
|
+ SuccessStatus: 0,
|
|
|
+ AuditorRemark: ''
|
|
|
+ },
|
|
|
+ auditor_flag: false,
|
|
|
+ save_flag: false,
|
|
|
+ add_flag: false,
|
|
|
+ detail_flag: false,
|
|
|
+ Id: 0,
|
|
|
+ userlist: [],
|
|
|
+ Equipment: '',
|
|
|
+ samplesForm: {},
|
|
|
+ ApplyList: [],
|
|
|
+ applyForm: {},
|
|
|
+ auditorShow: false,
|
|
|
+ ParentId: 0,
|
|
|
+ authorSamples: [], // 要审核的样本列表
|
|
|
+ shenheForm: {
|
|
|
+ SuccessStatus: 0,
|
|
|
+ AuditorRemark: ''
|
|
|
+ },
|
|
|
+ loginDialogVisible: false,
|
|
|
+ username: '',
|
|
|
+ password: '',
|
|
|
+ isLoginSucceed: false,
|
|
|
+ acceptUsers: [],
|
|
|
+ Getter: '', // 接收人
|
|
|
+ GetterName: '', // 接收人
|
|
|
+ CreateOn: [],
|
|
|
+ ServiceId: 0,
|
|
|
+ permissionscode: {
|
|
|
+ ckadd: 'biobank.sampleCK.add',
|
|
|
+ ckedit: 'biobank.sampleCK.edit',
|
|
|
+ ckdelete: 'biobank.sampleCK.delete',
|
|
|
+ ckapprove: 'biobank.sampleCK.approve'
|
|
|
+ },
|
|
|
+ permissions: {
|
|
|
+ 'biobank.sampleCK.add': false,
|
|
|
+ 'biobank.sampleCK.edit': false,
|
|
|
+ 'biobank.sampleCK.delete': false,
|
|
|
+ 'biobank.sampleCK.approve': false
|
|
|
}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ this.filehost = process.env.imgserverhost
|
|
|
+ let _this = this
|
|
|
+ _this.ServiceId = _this.$route.params.opera // 主单id
|
|
|
+ console.log(_this.ServiceId)
|
|
|
+ if (_this.ServiceId && _this.ServiceId === 'addCK') {
|
|
|
+ _this.pagetitle = '新增样本出库'
|
|
|
+ _this.service_flag = 'addCK'
|
|
|
+ _this.getEntryNo()
|
|
|
+ } else if (_this.ServiceId != '0') {
|
|
|
+ _this.pagetitle = '编辑样本出库'
|
|
|
+ _this.service_flag = 'editCK'
|
|
|
+ _this.save_flag = true
|
|
|
+ _this.getApplyInfo()
|
|
|
+ _this.getdetaillist()
|
|
|
+ }
|
|
|
+ // _this.getEntryNo()
|
|
|
+ _this.getuserlist()
|
|
|
+ _this.getsamplelist() // 获取样本列表
|
|
|
+ _this.getuserlist()
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({
|
|
|
+ authUser: 'authUser'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ saveApply () {
|
|
|
+ let _this = this
|
|
|
+ _this.$axios.post('/samplesapply/saveapply/', _this.SampleCKform)
|
|
|
+ .then(res => {
|
|
|
+ // response
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ _this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ _this.add_flag = true
|
|
|
+ _this.ServiceId = res.data.item
|
|
|
+ _this.getApplyInfo()
|
|
|
+ } else {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ // handle error
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
},
|
|
|
- created() {
|
|
|
+ // 导出样本
|
|
|
+ handleExportsamplesCommand (command) {
|
|
|
let _this = this
|
|
|
- _this.ServiceId = _this.$route.params.opera //主单id
|
|
|
- if (_this.ServiceId && _this.ServiceId == 'addCK') {
|
|
|
- _this.pagetitle = '新增样本出库'
|
|
|
- _this.service_flag = 'addCK'
|
|
|
- _this.getEntryNo()
|
|
|
- } else if (_this.ServiceId != '0') {
|
|
|
- _this.pagetitle = '编辑样本出库'
|
|
|
- _this.service_flag = 'editCK'
|
|
|
- _this.save_flag = true
|
|
|
- _this.getApplyInfo()
|
|
|
- _this.getdetaillist()
|
|
|
+ if (_this.selectSamples.length < 1) {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择要导出的样本'
|
|
|
+ })
|
|
|
+ return
|
|
|
}
|
|
|
- _this.getEntryNo()
|
|
|
- _this.getuserlist()
|
|
|
- _this.getsamplelist() //获取样本列表
|
|
|
- _this.getuserlist()
|
|
|
+ _this.exportsamples()
|
|
|
},
|
|
|
- computed: {
|
|
|
- ...mapGetters({
|
|
|
- authUser: 'authUser'
|
|
|
+ exportsamples () {
|
|
|
+ let _this = this
|
|
|
+ let id = ''
|
|
|
+
|
|
|
+ let params = {
|
|
|
+ Entryno: this.SampleCKform.EntryNo
|
|
|
+ }
|
|
|
+
|
|
|
+ for (var i = 0; i < _this.selectSamples.length; i++) {
|
|
|
+ if (i === _this.selectSamples.length - 1) {
|
|
|
+ id += _this.selectSamples[i].Id
|
|
|
+ } else {
|
|
|
+ id += _this.selectSamples[i].Id + ','
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let paramsid = {
|
|
|
+ Id: id
|
|
|
+ }
|
|
|
+ params = Object.assign(params, paramsid)
|
|
|
+
|
|
|
+ _this.$axios.get('/sampleinput/exportexcelapply', {
|
|
|
+ params
|
|
|
})
|
|
|
+ .then(res => {
|
|
|
+ console.log(res, 'exportexcelapply')
|
|
|
+ window.location = 'http://' + res.data
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ // handle error
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
},
|
|
|
- methods: {
|
|
|
- saveApply() {
|
|
|
- let _this = this
|
|
|
- _this.$axios.post('/samplesapply/saveapply/', _this.SampleCKform)
|
|
|
- .then(res => {
|
|
|
- // response
|
|
|
- if (res.data.code === 0) {
|
|
|
- _this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.data.message,
|
|
|
- })
|
|
|
- _this.add_flag = true
|
|
|
- _this.ServiceId = res.data.item
|
|
|
- _this.getApplyInfo()
|
|
|
- } else {
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- // handle error
|
|
|
- console.error(err)
|
|
|
+ getApplyInfo () {
|
|
|
+ let _this = this // request
|
|
|
+ let params = {
|
|
|
+ Id: this.ServiceId
|
|
|
+ }
|
|
|
+ _this.$axios.get('/samplesapply/getapplyinfo', {
|
|
|
+ params
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ _this.SampleCKform = res.data.items
|
|
|
+ if (_this.SampleCKform.ApplyStatus == 0) {
|
|
|
+ _this.SampleCKform.ConUserId = ''
|
|
|
+ _this.SampleCKform.ConTime = new Date()
|
|
|
+ } else {
|
|
|
+ _this.SampleCKform.ConTime = new Date(res.data.items.ConTime)
|
|
|
+ }
|
|
|
+ if (_this.SampleCKform.ApplyStatus == 2 || _this.SampleCKform.ApplyStatus == 5) {
|
|
|
+ _this.auditor_flag = true
|
|
|
+ }
|
|
|
+ // if (_this.samplesForm.CreateUserId && _this.samplesForm.CreateUserId != 0) {
|
|
|
+ // for (var i = 0; i < _this.acceptUsers.length; i++) {
|
|
|
+ // if (_this.acceptUsers[i].id == _this.samplesForm.CreateUserId) {
|
|
|
+ // _this.AuthorUser = _this.samplesForm.CreateUserId
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ }).catch(err => {
|
|
|
+ // handle error
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取样本信息
|
|
|
+ getdetaillist () {
|
|
|
+ let _this = this // request
|
|
|
+ let params = {
|
|
|
+ ParentId: this.ServiceId,
|
|
|
+ _currentPage: this.CurrentPage,
|
|
|
+ _size: this.Size
|
|
|
+ }
|
|
|
+ _this.$axios.get('/samplesapply/applydetaillist', {
|
|
|
+ params
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ console.log(res, '/samplesapply/applydetaillist')
|
|
|
+ _this.ApplyList = res.data.items
|
|
|
+ _this.CurrentItemCount = res.data.currentItemCount
|
|
|
+ })
|
|
|
+ .catch(function (error) {
|
|
|
+ console.log(error)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 自动生成单品交付单编号
|
|
|
+ getEntryNo () {
|
|
|
+ let _this = this
|
|
|
+ if (_this.SampleCKform.EntryNo == '') {
|
|
|
+ _this.$axios.get('orderadd/getOrderNumgene')
|
|
|
+ .then(function (response) {
|
|
|
+ _this.SampleCKform.EntryNo = response.data.items + ''
|
|
|
})
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获取样本信息
|
|
|
+ getsamplelist () {
|
|
|
+ let _this = this // request
|
|
|
+ let params = {
|
|
|
+ _currentPage: this.currentPage,
|
|
|
+ _size: this.size
|
|
|
+ }
|
|
|
+ _this.$axios.get('/samplesapply/cklist', {
|
|
|
+ params
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ _this.SamplesList = res.data.items
|
|
|
+ _this.currentItemCount = res.data.currentItemCount
|
|
|
+ })
|
|
|
+ .catch(function (error) {
|
|
|
+ console.log(error)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 添加申请出库样本
|
|
|
+ AddDetail () {
|
|
|
+ let _this = this
|
|
|
+ if (_this.selectSamples.length < 1) {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请先选择要出库的样本'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ _this.detail_flag = true
|
|
|
+ let params = _this.SampleCKform
|
|
|
+ params = Object.assign(params, {
|
|
|
+ Detaillist: _this.selectSamples
|
|
|
+ })
|
|
|
+ _this.$axios.post('/samplesapply/savedetail', params)
|
|
|
+ .then(res => {
|
|
|
+ // response
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ _this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ _this.save_flag = true
|
|
|
+ _this.getdetaillist()
|
|
|
+ } else {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ // handle error
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 样本出库信息查询
|
|
|
+ searchSampleDetail () {
|
|
|
|
|
|
- },
|
|
|
- getApplyInfo() {
|
|
|
- let _this = this // request
|
|
|
- let params = {
|
|
|
- Id: this.ServiceId
|
|
|
- }
|
|
|
- _this.$axios.get('/samplesapply/getapplyinfo', {
|
|
|
- params
|
|
|
- })
|
|
|
- .then(res => {
|
|
|
- _this.SampleCKform = res.data.items
|
|
|
- if (_this.SampleCKform.ApplyStatus == 0) {
|
|
|
- _this.SampleCKform.ConUserId = ''
|
|
|
- _this.SampleCKform.ConTime = new Date()
|
|
|
- } else {
|
|
|
- _this.SampleCKform.ConTime = new Date(res.data.items.ConTime)
|
|
|
- }
|
|
|
- if (_this.SampleCKform.ApplyStatus == 2 || _this.SampleCKform.ApplyStatus == 5) {
|
|
|
- _this.auditor_flag = true
|
|
|
- }
|
|
|
- // if (_this.samplesForm.CreateUserId && _this.samplesForm.CreateUserId != 0) {
|
|
|
- // for (var i = 0; i < _this.acceptUsers.length; i++) {
|
|
|
- // if (_this.acceptUsers[i].id == _this.samplesForm.CreateUserId) {
|
|
|
- // _this.AuthorUser = _this.samplesForm.CreateUserId
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- }).catch(err => {
|
|
|
- // handle error
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
- },
|
|
|
- //获取样本信息
|
|
|
- getdetaillist() {
|
|
|
- let _this = this // request
|
|
|
- let params = {
|
|
|
- ParentId: this.ServiceId,
|
|
|
- _currentPage: this.CurrentPage,
|
|
|
- _size: this.Size,
|
|
|
- }
|
|
|
- _this.$axios.get("/samplesapply/applydetaillist", {
|
|
|
- params
|
|
|
- })
|
|
|
- .then(res => {
|
|
|
- _this.ApplyList = res.data.items
|
|
|
- _this.CurrentItemCount = res.data.currentItemCount
|
|
|
- })
|
|
|
- .catch(function (error) {
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
- },
|
|
|
- //自动生成单品交付单编号
|
|
|
- getEntryNo() {
|
|
|
- let _this = this
|
|
|
- if (_this.SampleCKform.EntryNo == '') {
|
|
|
- _this.$axios.get('orderadd/getOrderNumgene')
|
|
|
- .then(function (response) {
|
|
|
- _this.SampleCKform.EntryNo = response.data.items + ''
|
|
|
+ },
|
|
|
+ // 打开审核弹窗
|
|
|
+ auditorshow () {
|
|
|
+ let _this = this
|
|
|
+ if (_this.authorSamples.length < 1) {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请先选择要审核入库的样本'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ _this.SampleCKform.ConUserBy = _this.$refs.reflrrselect.selectedLabel
|
|
|
+ if (_this.authorSamples.length == _this.CurrentItemCount) {
|
|
|
+ _this.SampleCKform.ApplyStatus = 2
|
|
|
+ } else {
|
|
|
+ _this.SampleCKform.ApplyStatus = 1
|
|
|
+ }
|
|
|
+ _this.auditorShow = true
|
|
|
+ },
|
|
|
+ auditor () {
|
|
|
+ let _this = this
|
|
|
+ _this.$confirm('确定审核该出库申请单?审核后所有信息将不可修改!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ if (_this.shenheForm.SuccessStatus == 1) {
|
|
|
+ _this.SampleCKform.ApplyStatus = 3
|
|
|
+ }
|
|
|
+ _this.SampleCKform.AuditorRemark = _this.shenheForm.AuditorRemark
|
|
|
+ _this.auditorShow = false
|
|
|
+ _this.saveauditor('SampleCKform')
|
|
|
+ })
|
|
|
+ .catch(() => { })
|
|
|
+ },
|
|
|
+ saveauditor (SampleCKform) {
|
|
|
+ let _this = this
|
|
|
+ let params = _this.SampleCKform
|
|
|
+ params = Object.assign(params, {
|
|
|
+ Detaillist: _this.authorSamples
|
|
|
+ })
|
|
|
+ _this.$axios.put('/samplesapply/auditorckdetail/' + _this.ServiceId, params)
|
|
|
+ .then(res => {
|
|
|
+ // response
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ _this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
})
|
|
|
- }
|
|
|
- },
|
|
|
- //获取样本信息
|
|
|
- getsamplelist() {
|
|
|
- let _this = this // request
|
|
|
- let params = {
|
|
|
- _currentPage: this.currentPage,
|
|
|
- _size: this.size,
|
|
|
- }
|
|
|
- _this.$axios.get("/samplesapply/cklist", {
|
|
|
- params
|
|
|
- })
|
|
|
- .then(res => {
|
|
|
- _this.SamplesList = res.data.items
|
|
|
- _this.currentItemCount = res.data.currentItemCount
|
|
|
- })
|
|
|
- .catch(function (error) {
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
- },
|
|
|
- // 添加申请出库样本
|
|
|
- AddDetail() {
|
|
|
- let _this = this
|
|
|
- if (_this.selectSamples.length < 1) {
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '请先选择要出库的样本'
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- _this.detail_flag = true
|
|
|
- let params = _this.SampleCKform
|
|
|
- params = Object.assign(params, {
|
|
|
- Detaillist: _this.selectSamples
|
|
|
+ _this.getApplyInfo()
|
|
|
+ _this.getdetaillist()
|
|
|
+ } else {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
- _this.$axios.post('/samplesapply/savedetail', params)
|
|
|
- .then(res => {
|
|
|
- // response
|
|
|
- if (res.data.code === 0) {
|
|
|
- _this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
- _this.save_flag = true
|
|
|
- _this.getdetaillist()
|
|
|
- } else {
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- // handle error
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
- },
|
|
|
- // 打开审核弹窗
|
|
|
- auditorshow() {
|
|
|
- let _this = this
|
|
|
- if (_this.authorSamples.length < 1) {
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '请先选择要审核入库的样本'
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- _this.SampleCKform.ConUserBy = _this.$refs.reflrrselect.selectedLabel
|
|
|
- if (_this.authorSamples.length == _this.CurrentItemCount) {
|
|
|
- _this.SampleCKform.ApplyStatus = 2
|
|
|
- } else {
|
|
|
- _this.SampleCKform.ApplyStatus = 1
|
|
|
- }
|
|
|
- _this.auditorShow = true
|
|
|
- },
|
|
|
- auditor() {
|
|
|
- let _this = this
|
|
|
- _this.$confirm("确定审核该出库申请单?审核后所有信息将不可修改!", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- if (_this.shenheForm.SuccessStatus == 1) {
|
|
|
- _this.SampleCKform.ApplyStatus = 3
|
|
|
- }
|
|
|
- _this.SampleCKform.AuditorRemark = _this.shenheForm.AuditorRemark
|
|
|
- _this.auditorShow = false
|
|
|
- _this.saveauditor('SampleCKform')
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
- },
|
|
|
- saveauditor(SampleCKform) {
|
|
|
- let _this = this
|
|
|
- let params = _this.SampleCKform
|
|
|
- params = Object.assign(params, {
|
|
|
- Detaillist: _this.authorSamples
|
|
|
+ .catch(err => {
|
|
|
+ // handle error
|
|
|
+ console.error(err)
|
|
|
})
|
|
|
- _this.$axios.put('/samplesapply/auditorckdetail/' + _this.ServiceId, params)
|
|
|
- .then(res => {
|
|
|
- // response
|
|
|
- if (res.data.code === 0) {
|
|
|
- _this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
- _this.getApplyInfo()
|
|
|
- _this.getdetaillist()
|
|
|
- } else {
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- // handle error
|
|
|
- console.error(err)
|
|
|
+ },
|
|
|
+ authorSelectionChange (val) {
|
|
|
+ this.authorSamples = val
|
|
|
+ },
|
|
|
+ getuserlist () {
|
|
|
+ this.$axios.get('users/list', {})
|
|
|
+ .then(res => {
|
|
|
+ // response
|
|
|
+ this.userlist = res.data.items
|
|
|
+ this.userlist.unshift({
|
|
|
+ 'Id': this.authUser.Profile.Id,
|
|
|
+ 'Realname': this.authUser.Profile.Realname
|
|
|
})
|
|
|
- },
|
|
|
- authorSelectionChange(val) {
|
|
|
- this.authorSamples = val
|
|
|
- },
|
|
|
- getuserlist() {
|
|
|
- this.$axios.get('users/list', {})
|
|
|
- .then(res => {
|
|
|
- // response
|
|
|
- this.userlist = res.data.items
|
|
|
- this.userlist.unshift({
|
|
|
- 'Id': this.authUser.Profile.Id,
|
|
|
- 'Realname': this.authUser.Profile.Realname
|
|
|
+ if (this.service_flag == 'editCK') {
|
|
|
+ this.getApplyInfo()
|
|
|
+ this.getdetaillist()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ // handle error
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ numtoupchar (num) {
|
|
|
+ return String.fromCharCode(64 + parseInt(num))
|
|
|
+ },
|
|
|
+ postiontoupchar (postion) {
|
|
|
+ let pos = postion.split(';')
|
|
|
+ if (pos.length === 2) {
|
|
|
+ return this.numtoupchar(pos[1]) + pos[0]
|
|
|
+ } else {
|
|
|
+ return postion
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获取权限
|
|
|
+ getPermissions () {
|
|
|
+ let _this = this
|
|
|
+ // request
|
|
|
+ let params = {
|
|
|
+ percodes: `'${this.permissionscode.ckadd}','${this.permissionscode.ckedit}','${this.permissionscode.ckdelete}','${this.permissionscode.ckapprove}'`
|
|
|
+ }
|
|
|
+ this.$axios.get('/permissions/isauths', {
|
|
|
+ params
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ if (res.data instanceof Array && res.data.length > 0) {
|
|
|
+ console.log(res.data)
|
|
|
+ res.data.forEach(element => {
|
|
|
+ _this.permissions[element.Code] = element.Isperm
|
|
|
})
|
|
|
- if (this.service_flag == 'editCK') {
|
|
|
- this.getApplyInfo()
|
|
|
- this.getdetaillist()
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- // handle error
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
- },
|
|
|
- numtoupchar(num) {
|
|
|
- return String.fromCharCode(64 + parseInt(num));
|
|
|
- },
|
|
|
- postiontoupchar(postion) {
|
|
|
- let pos = postion.split(";");
|
|
|
- if (pos.length === 2) {
|
|
|
- return this.numtoupchar(pos[1]) + pos[0];
|
|
|
- } else {
|
|
|
- return postion;
|
|
|
- }
|
|
|
- },
|
|
|
- //获取权限
|
|
|
- getPermissions() {
|
|
|
- let _this = this
|
|
|
- // request
|
|
|
- let params = {
|
|
|
- percodes: `'${this.permissionscode.ckadd}','${this.permissionscode.ckedit}','${this.permissionscode.ckdelete}','${this.permissionscode.ckapprove}'`
|
|
|
- }
|
|
|
- this.$axios.get('/permissions/isauths', {
|
|
|
- params
|
|
|
- })
|
|
|
- .then(res => {
|
|
|
- if (res.data instanceof Array && res.data.length > 0) {
|
|
|
- console.log(res.data)
|
|
|
- res.data.forEach(element => {
|
|
|
- _this.permissions[element.Code] = element.Isperm
|
|
|
- });
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- // handle error
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
- },
|
|
|
- handleSelectionChange(val) {
|
|
|
- this.selectSamples = val
|
|
|
- },
|
|
|
- contains(strs, str) {
|
|
|
- let arrs = strs.split(',')
|
|
|
- for (let v in arrs) {
|
|
|
- if (arrs[v] === (str + '')) return true
|
|
|
- }
|
|
|
- return false
|
|
|
- },
|
|
|
- //登陆
|
|
|
- selectGetter() {
|
|
|
- if (this.Getter != this.authUser.Profile.Id) {
|
|
|
- this.loginDialogVisible = true
|
|
|
- }
|
|
|
- for (var i = 0; i < this.acceptUsers.length; i++) {
|
|
|
- if (this.acceptUsers[i].id === this.Getter) {
|
|
|
- this.GetterName = this.acceptUsers[i].name
|
|
|
}
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ // handle error
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleSelectionChange (val) {
|
|
|
+ this.selectSamples = val
|
|
|
+ },
|
|
|
+ contains (strs, str) {
|
|
|
+ let arrs = strs.split(',')
|
|
|
+ for (let v in arrs) {
|
|
|
+ if (arrs[v] === (str + '')) return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ },
|
|
|
+ // 登陆
|
|
|
+ selectGetter () {
|
|
|
+ if (this.Getter != this.authUser.Profile.Id) {
|
|
|
+ this.loginDialogVisible = true
|
|
|
+ }
|
|
|
+ for (var i = 0; i < this.acceptUsers.length; i++) {
|
|
|
+ if (this.acceptUsers[i].id === this.Getter) {
|
|
|
+ this.GetterName = this.acceptUsers[i].name
|
|
|
}
|
|
|
- },
|
|
|
- cancelLogin() {
|
|
|
- if (this.isLoginSucceed) {
|
|
|
- this.isLoginSucceed = false
|
|
|
- } else {
|
|
|
- this.Getter = ''
|
|
|
- }
|
|
|
- this.loginDialogVisible = false
|
|
|
- },
|
|
|
- confirmLogin() {
|
|
|
- let _this = this
|
|
|
- let fields = {
|
|
|
- username: this.username,
|
|
|
- password: this.password,
|
|
|
- }
|
|
|
- this.$axios.post("/users/checkUserPwd?RealName=" + this.GetterName, fields)
|
|
|
- .then(res => {
|
|
|
- if (res.data.code == 0) {
|
|
|
- _this.loginDialogVisible = false
|
|
|
- this.isLoginSucceed = true
|
|
|
- } else {
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
- }
|
|
|
- _this.password = ''
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- // handle error
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
- },
|
|
|
- HandleCurrentChange(value) {
|
|
|
- this.CurrentPage = value
|
|
|
- this.getdetaillist()
|
|
|
- },
|
|
|
- HandleSizeChange(value) {
|
|
|
- this.Size = value
|
|
|
- this.CurrentPage = 1
|
|
|
- this.getdetaillist()
|
|
|
- },
|
|
|
- handleCurrentChange(value) {
|
|
|
- this.currentPage = value
|
|
|
- this.getsamplelist()
|
|
|
- },
|
|
|
- handleSizeChange(value) {
|
|
|
- this.size = value
|
|
|
- this.currentPage = 1
|
|
|
- this.getsamplelist()
|
|
|
- },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ cancelLogin () {
|
|
|
+ if (this.isLoginSucceed) {
|
|
|
+ this.isLoginSucceed = false
|
|
|
+ } else {
|
|
|
+ this.Getter = ''
|
|
|
+ }
|
|
|
+ this.loginDialogVisible = false
|
|
|
+ },
|
|
|
+ confirmLogin () {
|
|
|
+ let _this = this
|
|
|
+ let fields = {
|
|
|
+ username: this.username,
|
|
|
+ password: this.password
|
|
|
+ }
|
|
|
+ this.$axios.post('/users/checkUserPwd?RealName=' + this.GetterName, fields)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == 0) {
|
|
|
+ _this.loginDialogVisible = false
|
|
|
+ this.isLoginSucceed = true
|
|
|
+ } else {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ _this.password = ''
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ // handle error
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ HandleCurrentChange (value) {
|
|
|
+ this.CurrentPage = value
|
|
|
+ this.getdetaillist()
|
|
|
+ },
|
|
|
+ HandleSizeChange (value) {
|
|
|
+ this.Size = value
|
|
|
+ this.CurrentPage = 1
|
|
|
+ this.getdetaillist()
|
|
|
+ },
|
|
|
+ handleCurrentChange (value) {
|
|
|
+ this.currentPage = value
|
|
|
+ this.getsamplelist()
|
|
|
+ },
|
|
|
+ handleSizeChange (value) {
|
|
|
+ this.size = value
|
|
|
+ this.currentPage = 1
|
|
|
+ this.getsamplelist()
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
- .equipmentdetail .el-card__header {
|
|
|
- padding: 5px 10px;
|
|
|
- font-size: 10px;
|
|
|
- }
|
|
|
+.equipmentdetail .el-card__header {
|
|
|
+ padding: 5px 10px;
|
|
|
+ font-size: 10px;
|
|
|
+}
|
|
|
|
|
|
- .adddetailcard .el-button--mini {
|
|
|
- padding: 2px
|
|
|
- }
|
|
|
+.adddetailcard .el-button--mini {
|
|
|
+ padding: 2px;
|
|
|
+}
|
|
|
|
|
|
- .el-pagination {
|
|
|
- margin: 1rem 0 2rem;
|
|
|
- text-align: right;
|
|
|
- }
|
|
|
+.el-pagination {
|
|
|
+ margin: 1rem 0 2rem;
|
|
|
+ text-align: right;
|
|
|
+}
|
|
|
|
|
|
+.adddetailcard .el-dropdown--mini {
|
|
|
+ padding: 2px;
|
|
|
+}
|
|
|
</style>
|