|
@@ -185,7 +185,9 @@
|
|
|
<template slot-scope="scope">
|
|
|
<el-button style="margin:5px 5px" type="success" size="small" plain @click="sampleDetail(scope.row.id)">查看
|
|
|
</el-button>
|
|
|
- <el-button style="margin:5px 5px" type="primary" size="small" plain icon="el-icon-edit-outline" @click="putCydStatus(scope.row.id)">上报抽样信息
|
|
|
+ <el-button style="margin:5px 5px" type="primary" size="small" plain icon="el-icon-edit-outline" v-if="scope.row.cyd_status == 1" @click="putCydStatus(scope.row.id)">上报抽样信息
|
|
|
+ </el-button>
|
|
|
+ <el-button style="margin:5px 5px" type="primary" size="small" plain icon="el-icon-edit-outline" v-else>抽样信息已上报
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -231,7 +233,9 @@
|
|
|
<el-button style="margin:5px 5px" type="success" size="mini" v-if="scope.row.jc_value_id==null" plain
|
|
|
@click="getJcdObj(scope.row.id)">填报检测单</el-button>
|
|
|
<el-button style="margin:5px 5px" type="primary" v-else size="mini" plain @click="update(scope.row)">修改</el-button>
|
|
|
- <el-button style="margin:5px 5px" type="primary" size="mini" plain @click="upJcdItem(scope.row.sample_id)">上报
|
|
|
+ <el-button style="margin:5px 5px" type="primary" size="mini" plain @click="upJcdItem(scope.row.sample_id)" v-if="scope.row.cyd_status == 1">上报检测单
|
|
|
+ </el-button>
|
|
|
+ <el-button style="margin:5px 5px" type="primary" size="mini" plain @click="upJcdItem(scope.row.sample_id)" v-else>检测单已上报
|
|
|
</el-button>
|
|
|
<!-- <el-button style="margin:5px 5px" type="primary" size="mini" plain @click="creatpdf(scope.row.sample_id)">生成检测报告
|
|
|
</el-button> -->
|
|
@@ -251,17 +255,23 @@
|
|
|
class="dialogItem">
|
|
|
|
|
|
|
|
|
- <div id="" style="margin:10px auto; width:100%">
|
|
|
+ <div id="inputJcd" style="margin:10px 50px; width:100%">
|
|
|
<el-form :rules="rules" :model="jcd">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="10">
|
|
|
<el-form-item label="检测单编码:" prop="jcd_code" class="labelItem">
|
|
|
- <el-input v-model="jcd.jcd_code" placeholder="请输入检测单编码" style="width:26.5%;margin-left:5px;"></el-input>
|
|
|
+ <el-input v-model="jcd.jcd_code" placeholder="请输入检测单编码" style="width:50%;margin-left:5px;"></el-input>
|
|
|
</el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="检测结果:" prop="jcd_result" class="labelItem">
|
|
|
<el-radio-group v-model="jcd.jcd_result" @change="jcResult()">
|
|
|
<el-radio :label="1">合格</el-radio>
|
|
|
<el-radio :label="0">不合格</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
<!-- 上传检测报告 -->
|
|
|
<el-form-item label="检测单报告上传:" prop="jcd" class="labelItem">
|
|
|
<el-upload
|
|
@@ -278,14 +288,17 @@
|
|
|
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
+
|
|
|
</el-form>
|
|
|
</div>
|
|
|
- <div style="display: flex;flex-direction: row;float: right;margin-bottom: 10px;">
|
|
|
+ <!-- <div v-show="jcd.jcd_result==0"> -->
|
|
|
+ <div style="display: flex;flex-direction: row;float: right;margin-bottom: 10px;" v-show="jcd.jcd_result==0">
|
|
|
<el-button type="success" size="small" plain @click="addJcxItemDialog = true">新增不合格项</el-button>
|
|
|
</div>
|
|
|
<!-- 表格数据区域-->
|
|
|
- <el-table :data="jcxItems" border stripe highlight-current-row style="width: 100%"
|
|
|
- :row-style="rowStyle" :cell-style="cellStyle" align="center">
|
|
|
+ <el-table :data="jcxItems" border stripe highlight-current-row style="width: 100%;"
|
|
|
+ :row-style="rowStyle" :cell-style="cellStyle" align="center" v-show="jcd.jcd_result==0">
|
|
|
<el-table-column label="序号" width="50px">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.$index+1 }}
|
|
@@ -308,21 +321,23 @@
|
|
|
<!-- 分页器区域-->
|
|
|
<el-pagination @size-change="handleSizeChange2" @current-change="handleCurrentChange2"
|
|
|
:current-page="queryInfo2.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfo2.pageSize"
|
|
|
- layout="total, sizes, prev, pager, next, jumper" :total="jcxItemTotal" background />
|
|
|
-
|
|
|
+ layout="total, sizes, prev, pager, next, jumper" :total="jcxItemTotal" background v-show="jcd.jcd_result==0" />
|
|
|
+
|
|
|
+
|
|
|
<div class="footer">
|
|
|
<el-button type="success" style="margin-bottom:30px;" size="small" @click="putJcd()">完成</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog title="新增不合格检测项目" :visible.sync="addJcxItemDialog" width="70%" :close-on-click-modal="false"
|
|
|
+ <el-dialog title="新增不合格检测项目" :visible.sync="addJcxItemDialog" width="40%" :close-on-click-modal="false"
|
|
|
class="dialogItem">
|
|
|
+ <div id="addUnqualifiedJcx" style="margin:auto;">
|
|
|
<el-form :rules="rules" :model="jcxItem" style="margin:10px auto;">
|
|
|
<el-form-item label="检测项目:" prop="item_name" class="labelItem">
|
|
|
<el-input v-model="jcxItem.item_name" style="width:42%"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="标准指标:" prop="item_standard" class="labelItem">
|
|
|
- <el-input v-model="jcxItem.item_standard" style="width:42%;margin-left:5px;"></el-input>
|
|
|
+ <el-input v-model="jcxItem.item_standard" style="width:42%;"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="实测值:" prop="item_measured_value" class="labelItem">
|
|
|
<el-input v-model="jcxItem.item_measured_value" style="width:42%"></el-input>
|
|
@@ -337,7 +352,7 @@
|
|
|
<el-input v-model="jcxItem.item_log" style="width:42%"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
-
|
|
|
+ </div>
|
|
|
<div class="footer">
|
|
|
<el-button type="success" style="margin-bottom:30px;" size="small" @click="postJcdItem()">保存</el-button>
|
|
|
</div>
|
|
@@ -740,10 +755,10 @@
|
|
|
// console.log(res)
|
|
|
this.tableData1 = res.data.rows
|
|
|
for(let i= 0; i < this.tableData1.length; i++) {
|
|
|
- if(this.tableData1[i].cyd_status = 1) {
|
|
|
- this.tableData1[i].status = '未发布'
|
|
|
+ if(this.tableData1[i].cyd_status == 1) {
|
|
|
+ this.tableData1[i].status = '未上报'
|
|
|
}else {
|
|
|
- this.tableData1[i].status = '已发布'
|
|
|
+ this.tableData1[i].status = '已上报'
|
|
|
}
|
|
|
}
|
|
|
console.log(this.tableData1[0].cyd_status)
|
|
@@ -764,15 +779,14 @@
|
|
|
// console.log(res)
|
|
|
this.tableData = res.data.rows
|
|
|
for(let i= 0; i < this.tableData.length; i++) {
|
|
|
- if(this.tableData[i].cyd_status = 1) {
|
|
|
- this.tableData[i].status = '未发布'
|
|
|
+ if(this.tableData[i].cyd_status == 1) {
|
|
|
+ this.tableData[i].status = '未上报'
|
|
|
}else {
|
|
|
- this.tableData[i].status = '已发布'
|
|
|
+ this.tableData[i].status = '已上报'
|
|
|
}
|
|
|
}
|
|
|
- console.log(this.tableData[0].cyd_status)
|
|
|
- this.total = res.data.total
|
|
|
-
|
|
|
+ console.log(this.tableData[0].status)
|
|
|
+ this.total = res.data.total
|
|
|
},
|
|
|
|
|
|
// 删除不合格检测项目信息
|
|
@@ -809,7 +823,7 @@
|
|
|
const res = await this.$http.post('getJcdItems',that.queryInfo2)
|
|
|
console.log(res.data.data.rows)
|
|
|
this.jcxItems = res.data.data.rows
|
|
|
- this.jcxItemTotal = res.data.data.tatal
|
|
|
+ this.jcxItemTotal = res.data.data.total
|
|
|
},
|
|
|
//填报检测单完成
|
|
|
async putJcd() {
|
|
@@ -1239,4 +1253,17 @@
|
|
|
.el-descriptions-item__label.is-bordered-label{
|
|
|
width: 18.75rem;}
|
|
|
}
|
|
|
+ /deep/ #addUnqualifiedJcx{
|
|
|
+ .el-form-item__label{
|
|
|
+ width: 15%;
|
|
|
+ }
|
|
|
+ .el-form-item__error{
|
|
|
+ left: 6.875rem;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // /deep/ #inputJcd{
|
|
|
+ // .el-upload__tip{
|
|
|
+ // margin-left: 7.1875rem;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
</style>
|