|
@@ -147,16 +147,16 @@
|
|
|
:prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
|
|
|
<el-table-column label="操作" align="center" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button style="margin:5px 0" type="primary" size="small" plain @click="input(scope.row.id)">填报抽样单
|
|
|
+ <el-button style="margin:5px 0" type="primary" size="small" plain @click="input(scope.row.id)" v-if="scope.row.task_profile_status!== '14'">填报抽样单
|
|
|
</el-button>
|
|
|
<el-button style="margin-bottom:5px" type="primary" size="small" @click="getCydlist(scope.row.id)">查看抽样单列表
|
|
|
</el-button>
|
|
|
- <!-- <el-button type="success" size="small" plain @click="sampleDetail(scope.row.sample_id)" @focus="getSampleListDialog = true">查看抽样单列表
|
|
|
- </el-button> -->
|
|
|
- <!-- <el-button type="primary" size="small" plain icon="el-icon-edit-outline" @click="appear">上报抽样信息
|
|
|
- </el-button> -->
|
|
|
+ <el-button style="margin:5px 5px" type="primary" size="small" plain icon="el-icon-edit-outline" @click="putCydStatus(scope.row.id)"
|
|
|
+ v-if="scope.row.task_profile_status == '已查看' || scope.row.task_profile_status == '抽样中'">上报抽样信息
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+
|
|
|
</el-table>
|
|
|
|
|
|
<!-- 抽样单列表对话框 -->
|
|
@@ -185,12 +185,12 @@
|
|
|
<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" 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-if="scope.row.cyd_status == 1" @click="putCydStatus(scope.row.id)">上报抽样信息
|
|
|
+ </el-button> -->
|
|
|
<el-button style="margin:5px 5px" type="success" size="small" plain v-if="scope.row.cyd_status == 1" @click="deleteCyd(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>
|
|
|
+ <!-- <el-button style="margin:5px 5px" type="primary" size="small" plain icon="el-icon-edit-outline" v-else>抽样信息已上报
|
|
|
+ </el-button> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -211,8 +211,13 @@
|
|
|
:prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
|
|
|
<el-table-column label="操作" align="center" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
+
|
|
|
<el-button style="margin:5px 0" type="primary" size="small" @click="getJcdList(scope.row.id)">查看检测单列表
|
|
|
</el-button>
|
|
|
+ <el-button style="margin:5px 5px" type="primary" size="small" plain @click="putJcdStatus(scope.row.id)"
|
|
|
+ v-if="scope.row.task_profile_status == '已查看'|| scope.row.task_profile_status == '抽样中' || scope.row.task_profile_status == '检测中'">上报检测单
|
|
|
+ </el-button>
|
|
|
+
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -268,8 +273,8 @@
|
|
|
<el-button style="margin:5px 5px" type="primary" size="mini" v-if="scope.row.jcd==null" plain
|
|
|
@click="getJcdObj(scope.row.id,scope.row.cyd_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="putJcdStatus(scope.row.jcd.id,scope.row.cyd_id)" v-else-if="scope.row.jcd.jcd_status == '1'">上报检测单
|
|
|
- </el-button>
|
|
|
+ <!-- <el-button style="margin:5px 5px" type="primary" size="mini" plain @click="putJcdStatus(scope.row.jcd.id,scope.row.cyd_id)" v-else-if="scope.row.jcd.jcd_status == '1'">上报检测单
|
|
|
+ </el-button> -->
|
|
|
<el-button style="margin:5px 5px" type="primary" size="mini" plain v-else-if="scope.row.jcd.jcd_status == '3'">检测单已上报
|
|
|
</el-button>
|
|
|
</el-col>
|
|
@@ -343,59 +348,15 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <!-- <el-table ref="multipleTable" :data="jcxItems" border stripe highlight-current-row style="margin:auto;width:100%;"
|
|
|
- :row-style="rowStyle" :cell-style="cellStyle">
|
|
|
- <el-table-column type="selection" width="50px"></el-table-column>
|
|
|
- <el-table-column label="序号" width="50px">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.$index+1 }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
|
|
|
- <el-table-column :key="table.label" v-for="table in jcxHeader" :label="table.label" :prop="table.prop"
|
|
|
- align="center" :width="table.width" :fixed="table.fixed" />
|
|
|
- <el-table-column label="操作" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-col style="margin-bottom: 5px;">
|
|
|
- <el-button type="success" size="mini" @click="delJcdItem(scope.row.id)">删除</el-button>
|
|
|
- </el-col>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table> -->
|
|
|
|
|
|
<!-- 分页器区域-->
|
|
|
<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 />
|
|
|
|
|
|
- </div>
|
|
|
-
|
|
|
-
|
|
|
-<!--
|
|
|
- <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="序号" align="center" style="width: auto;">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.$index+1 }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column :key="table.label" v-for="table in jcxHeader" :label="table.label"
|
|
|
- :prop="table.prop" align="center" :width="table.width" :fixed="table.fixed">
|
|
|
-
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-col style="margin: 5px auto">
|
|
|
- <el-button type="success" size="mini" @click="delJcdItem(scope.row.id)">删除</el-button>
|
|
|
- </el-col>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table> -->
|
|
|
-
|
|
|
-
|
|
|
+ </div>
|
|
|
|
|
|
-
|
|
|
<div class="footer">
|
|
|
<el-button type="primary" style="margin-bottom:30px;" size="small" @click="putJcd()">完成</el-button>
|
|
|
</div>
|
|
@@ -781,7 +742,7 @@
|
|
|
tableHeader2: [{
|
|
|
label: '抽样机构',
|
|
|
prop: 'sampleOrgId.name',
|
|
|
- width: 180,
|
|
|
+ // width: 180,
|
|
|
}, {
|
|
|
label: '检测机构',
|
|
|
prop: 'checkOrgId.name'
|
|
@@ -789,7 +750,11 @@
|
|
|
{
|
|
|
label: '抽样地区',
|
|
|
prop: 'sample_address'
|
|
|
- },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '状态',
|
|
|
+ prop: this.COMMON.changeStatus('task_profile_status')
|
|
|
+ },
|
|
|
// {
|
|
|
// label: '抽样数量',
|
|
|
// prop: 'sample_number',
|
|
@@ -1076,9 +1041,26 @@
|
|
|
// pageNum: that.queryInfo.pageNum,
|
|
|
// pageSize: that.queryInfo.pageSize
|
|
|
});
|
|
|
- console.log(res)
|
|
|
+ console.log(res.data.rows)
|
|
|
+ // this.changeStatus(res.data.rows[0].task_profile_status)
|
|
|
that.underTask = res.data.rows
|
|
|
- console.log(that.underTask)
|
|
|
+ // for(let i= 0; i < that.underTask.length; i++) {
|
|
|
+ // if(that.underTask[i].task_profile_status == '11') {
|
|
|
+ // that.underTask[i].task_profile_status = '已查看'
|
|
|
+ // }else if(that.underTask[i].task_profile_status == '13') {
|
|
|
+ // that.underTask[i].task_profile_status = '抽样单'
|
|
|
+ // }else if(that.underTask[i].task_profile_status == '14') {
|
|
|
+ // that.underTask[i].task_profile_status = '抽样完成'
|
|
|
+ // }else if(that.underTask[i].task_profile_status == '17') {
|
|
|
+ // that.underTask[i].task_profile_status = '检测中'
|
|
|
+ // }else if(that.underTask[i].task_profile_status == '18') {
|
|
|
+ // that.underTask[i].task_profile_status = '检测完成'
|
|
|
+ // }else if(that.underTask[i].task_profile_status == '21') {
|
|
|
+ // that.underTask[i].task_profile_status = '已完成'
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ // console.log(that.underTask)
|
|
|
},
|
|
|
|
|
|
// 上传成功
|
|
@@ -1191,22 +1173,24 @@
|
|
|
// console.log(that.cyd_id)
|
|
|
},
|
|
|
//检测单列表-上报
|
|
|
- async putJcdStatus(id,cyd_id){
|
|
|
+ async putJcdStatus(id){
|
|
|
var that = this
|
|
|
- console.log(cyd_id)
|
|
|
+ console.log(id)
|
|
|
const result = await this.$http.post('putJcdStatus', {
|
|
|
- jcd_id: id
|
|
|
+ task_profile_id: id,
|
|
|
+ task_id: that.task_id,
|
|
|
+ task_profile_status: 18
|
|
|
})
|
|
|
console.log(result.data.data)
|
|
|
// this.getCyds()
|
|
|
// 判断业务逻辑
|
|
|
- if (result.data.code == 0) {
|
|
|
+ if (result.data.data == 1) {
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
message: '上报抽样信息成功'
|
|
|
})
|
|
|
|
|
|
- this.getSamples(cyd_id)
|
|
|
+ this.getCheckTaskList(that.task_id)
|
|
|
}
|
|
|
},
|
|
|
handleClick(tab, event) {
|
|
@@ -1250,27 +1234,34 @@
|
|
|
async putCydStatus(id) {
|
|
|
let that = this
|
|
|
// that.orgs = that.multipleSelection
|
|
|
- // console.log(that.multipleSelection)
|
|
|
+ console.log(that.task_id)
|
|
|
+ console.log(id)
|
|
|
const result = await this.$http.post('putCydStatus', {
|
|
|
- cyd_id: id
|
|
|
+ task_profile_id: id,
|
|
|
+ task_profile_status: 14,
|
|
|
+ task_id: that.task_id
|
|
|
})
|
|
|
console.log(result.data.data)
|
|
|
// this.getCyds()
|
|
|
// 判断业务逻辑
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: '上报抽样信息成功'
|
|
|
- })
|
|
|
-
|
|
|
- this.getCyds(result.data.data)
|
|
|
- // if (result.data.code == 0) {
|
|
|
- // this.$message({
|
|
|
+ // this.$message({
|
|
|
// type: 'success',
|
|
|
// message: '上报抽样信息成功'
|
|
|
// })
|
|
|
|
|
|
- // this.getCyds(result.data.data)
|
|
|
- // }
|
|
|
+ // this.getCheckTaskList(that.task_id)
|
|
|
+ if (result.data.code == 1) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '上报抽样信息成功'
|
|
|
+ })
|
|
|
+
|
|
|
+ this.getCheckTaskList(that.task_id)
|
|
|
+ }else
|
|
|
+ {this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '上报抽样信息失败'
|
|
|
+ })}
|
|
|
},
|
|
|
|
|
|
/** 修复当用户在大于1的分页进行数据搜索没有返回值的问题 */
|