Commit f3c10eaf by lichengming

修改了试验委托评审

parent a11084b0
...@@ -8,6 +8,8 @@ import { https } from '../https' ...@@ -8,6 +8,8 @@ import { https } from '../https'
export default { export default {
// page // page
page: data => http.post('soil/v1/entrust/page', data).then(res => res), page: data => http.post('soil/v1/entrust/page', data).then(res => res),
pageReview: data =>
http.post('soil/v1/entrust/page_review', data).then(res => res),
getById: data => http.get('soil/v1/entrust/' + data).then(res => res), getById: data => http.get('soil/v1/entrust/' + data).then(res => res),
getVOById: data => http.get('soil/v1/entrust/vo/' + data).then(res => res), getVOById: data => http.get('soil/v1/entrust/vo/' + data).then(res => res),
deleteById: data => deleteById: data =>
......
...@@ -4,21 +4,21 @@ ...@@ -4,21 +4,21 @@
<Modal <Modal
v-model="showModal" v-model="showModal"
:mask-closable="false" :mask-closable="false"
:width="690"
title="检测项目管理" title="检测项目管理"
:width="1200"
> >
<Row> <Row>
<Col span="24"> <Col span="24">
<Form v-model="formObj" inline onsubmit="return false" :label-width="90"> <Form v-model="formObj" :label-width="90" inline onsubmit="return false">
<Form-item class="search-item" label="检测项目:" style="margin-left: -25px"> <Form-item class="search-item" label="检测项目:" style="margin-left: -25px">
<Input v-model="formObj.name" placeholder="请输入检测项目" clearable @on-enter="_formSearch" /> <Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入检测项目" clearable />
<input v-model="formObj.catalogueId" type="hidden"> <input v-model="formObj.catalogueId" type="hidden">
</Form-item> </Form-item>
<!-- <Form-item class="search-item" label="检测依据:">--> <!-- <Form-item class="search-item" label="检测依据:">-->
<!-- <Input v-model="formObj.code" placeholder="请输入检测依据名称" clearable @on-enter="_formSearch" />--> <!-- <Input v-model="formObj.code" placeholder="请输入检测依据名称" clearable @on-enter="_formSearch" />-->
<!-- </Form-item>--> <!-- </Form-item>-->
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button type="primary" @click="_formSearch"> <Button @click="_formSearch" type="primary">
搜索 搜索
</Button> </Button>
</Form-item> </Form-item>
...@@ -33,23 +33,23 @@ ...@@ -33,23 +33,23 @@
<element-table <element-table
ref="pageTable" ref="pageTable"
:page-columns="pageColumns" :page-columns="pageColumns"
select-data
:table-height="350" :table-height="350"
:get-page="getPage" :get-page="getPage"
:icon-msg="iconMsg" :icon-msg="iconMsg"
:opt-col-width="80" :opt-col-width="80"
show-check-box
@on-result-change="_tableResultChange" @on-result-change="_tableResultChange"
select-data
show-check-box
> >
<el-table-column <el-table-column
v-for="item in pageColumns" v-for="item in pageColumns"
:key="item.key" :key="item.key"
show-overflow-tooltip
sortable
:prop="item.key" :prop="item.key"
:label="item.title" :label="item.title"
:width="item.width" :width="item.width"
:min-width="200" :min-width="200"
show-overflow-tooltip
sortable
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="item.key==='judged'"> <span v-if="item.key==='judged'">
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
blur blur
placeholder="请选择检测依据" placeholder="请选择检测依据"
/> />
<i style="cursor: pointer;font-size: 14px;" class="icons iconfont pt-search icon-search" @click.stop="_selectjudgeBasis(scope.$index)"></i> <i @click.stop="_selectjudgeBasis(scope.$index)" style="cursor: pointer;font-size: 14px;" class="icons iconfont pt-search icon-search"></i>
</div> </div>
<span v-else> <span v-else>
{{ scope.row[item.key] }} {{ scope.row[item.key] }}
...@@ -97,6 +97,8 @@ ...@@ -97,6 +97,8 @@
</div> </div>
</template> </template>
<script> <script>
import { soilAptitude } from '../../../api'
export default { export default {
components: {}, components: {},
data() { data() {
...@@ -118,18 +120,18 @@ export default { ...@@ -118,18 +120,18 @@ export default {
{ id: '', name: '保存', type: 'primary' } { id: '', name: '保存', type: 'primary' }
], ],
pageColumns: [ pageColumns: [
{ title: '项目类别', key: 'type', width: 140 }, { title: '试验名称', key: 'name', width: 140 },
{ title: '检测项目', key: 'name', width: 140 }, { title: '大类', key: 'mainType', width: 140 },
{ title: '子项目', key: 'sonItem', width: 140 }, { title: '小类', key: 'smallType', width: 140 },
{ title: '方法', key: 'method', width: 180 }, { title: '方法', key: 'testMethod', width: 180 }
{ title: '设备', key: 'device', width: 180 }, // { title: '设备', key: 'device', width: 180 },
{ title: '检测依据', key: 'code', width: 180 }, // { title: '检测依据', key: 'code', width: 180 },
{ title: '检测科室', key: 'groupName', width: 110 }, // { title: '检测科室', key: 'groupName', width: 110 },
{ title: '比较符', key: 'compareSymbol', width: 120 }, // { title: '比较符', key: 'compareSymbol', width: 120 },
{ title: '限值', key: 'limitValue' }, // { title: '限值', key: 'limitValue' },
{ title: '单位', key: 'unit' }, // { title: '单位', key: 'unit' },
{ title: '是否系统判定', key: 'judged', width: 120, judged: true }, // { title: '是否系统判定', key: 'judged', width: 120, judged: true },
{ title: '备注', key: 'remark' } // { title: '备注', key: 'remark' }
], ],
catalogueId: '', catalogueId: '',
getPage: {}, getPage: {},
...@@ -144,7 +146,7 @@ export default { ...@@ -144,7 +146,7 @@ export default {
this.formObj.catalogueId = catalogueId this.formObj.catalogueId = catalogueId
this.getPage.records = [] this.getPage.records = []
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
// this._page() this._page()
// if (catalogueId) { // if (catalogueId) {
// this._page() // this._page()
// } // }
...@@ -180,16 +182,16 @@ export default { ...@@ -180,16 +182,16 @@ export default {
break break
} }
}, },
// _page: async function() { _page: async function() {
// Object.assign(this.formObj, this.$refs.pageTable._searchParams()) // this.$refs.pageTable._page('search-form-package', 'FoodJudgeBasis/page')
// const result = await aptitudeItem.pageAptitudeItem( Object.assign(this.formObj, this.$refs.pageTable._searchParams())
// this.$serializeForm(this.formObj) const result = await soilAptitude.page(this.$serializeForm(this.formObj))
// ) if (result) {
// if (result) { console.log(result)
// this.getPage = result this.getPage = result
// this.$refs.pageTable._initTable() this.$refs.pageTable._hideLoading()
// } }
// }, },
_btnClick(msg) { _btnClick(msg) {
switch (msg) { switch (msg) {
case '导入检测项目': case '导入检测项目':
......
...@@ -87,6 +87,11 @@ export default { ...@@ -87,6 +87,11 @@ export default {
id: '', id: '',
name: '编辑' name: '编辑'
}, },
{
type: 'ios-list',
id: '',
name: '试验列表'
},
// { // {
// type: 'ios-beaker', // type: 'ios-beaker',
// id: '', // id: '',
......
...@@ -79,6 +79,14 @@ ...@@ -79,6 +79,14 @@
<el-input v-model="scope.row.sampleDescribe" blur placeholder="请输入土质描述" <el-input v-model="scope.row.sampleDescribe" blur placeholder="请输入土质描述"
></el-input> ></el-input>
</div> </div>
<div v-else-if="item.key==='itemNames'" @click.stop="_handleRow(scope)">
<el-input
v-model="scope.row.itemNames"
blur
placeholder="试验项目"
readonly
/>
</div>
<div v-else @click.stop="_handleRow(scope)"> <div v-else @click.stop="_handleRow(scope)">
<span> {{ scope.row[item.key] }}</span> <span> {{ scope.row[item.key] }}</span>
</div> </div>
...@@ -166,6 +174,7 @@ export default { ...@@ -166,6 +174,7 @@ export default {
pageColumns: [ pageColumns: [
{ title: '试样编号', key: 'sampleCode', width: 140 }, { title: '试样编号', key: 'sampleCode', width: 140 },
{ title: '现场编号', key: 'siteNo', width: 140 }, { title: '现场编号', key: 'siteNo', width: 140 },
{ title: '试验项目', key: 'itemNames', width: 140 },
{ title: '试样深度', key: 'sampleDepth', width: 140 }, { title: '试样深度', key: 'sampleDepth', width: 140 },
{ title: '样品包装类型', key: 'samplePack', width: 150 }, { title: '样品包装类型', key: 'samplePack', width: 150 },
{ title: '土质描述', key: 'sampleDescribe' } { title: '土质描述', key: 'sampleDescribe' }
...@@ -205,6 +214,7 @@ export default { ...@@ -205,6 +214,7 @@ export default {
formObj: {}, formObj: {},
selectIds: [], selectIds: [],
indexList: [], indexList: [],
itemList: [],
ruleValidate: { ruleValidate: {
client: [ client: [
{ {
...@@ -267,38 +277,38 @@ export default { ...@@ -267,38 +277,38 @@ export default {
methods: { methods: {
_itemImportBack(data) { _itemImportBack(data) {
console.log('传过来的数据', data) console.log('传过来的数据', data)
// for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
// data[i].id = undefined data[i].id = undefined
// } }
// const info = data const info = data
// console.log('去掉id后的data', info) console.log('去掉id后的data', info)
// for (let i = 0; i < this.indexList.length; i++) { for (let i = 0; i < this.indexList.length; i++) {
// const index = this.indexList[i] const index = this.indexList[i]
// if (this.getPage.records[index].drugItemList !== undefined) { if (this.getPage.records[index].experimentList !== undefined) {
// const name = [] const name = []
// this.itemList = this.getPage.records[index].drugItemList this.itemList = this.getPage.records[index].experimentList
// name.push(this.getPage.records[index].itemNames) name.push(this.getPage.records[index].itemNames)
// for (let i = 0; i < info.length; i++) { for (let i = 0; i < info.length; i++) {
// console.log(this.getPage.records[index].itemNames[i]) console.log(this.getPage.records[index].itemNames[i])
// this.itemList.push(info[i]) this.itemList.push(info[i])
// name.push(info[i].name) name.push(info[i].name)
// } }
// this.getPage.records[index].itemNames = name.join('、') this.getPage.records[index].itemNames = name.join('、')
// this.getPage.records[index].drugItemList = this.itemList this.getPage.records[index].experimentList = this.itemList
// this.$set(this.getPage.records, index, this.getPage.records[index]) this.$set(this.getPage.records, index, this.getPage.records[index])
// } else { } else {
// const name = [] const name = []
// this.itemList = [] this.itemList = []
// for (let i = 0; i < info.length; i++) { for (let i = 0; i < info.length; i++) {
// this.itemList.push(info[i]) this.itemList.push(info[i])
// name.push(info[i].name) name.push(info[i].name)
// } }
// this.getPage.records[index].itemNames = name.join('、') this.getPage.records[index].itemNames = name.join('、')
// this.getPage.records[index].drugItemList = this.itemList this.getPage.records[index].experimentList = this.itemList
// this.$set(this.getPage.records, index, this.getPage.records[index]) this.$set(this.getPage.records, index, this.getPage.records[index])
// } }
// } }
// console.log(this.getPage.records) console.log(this.getPage.records)
}, },
_cusNameChange(msg, data) { _cusNameChange(msg, data) {
// this.financeObj = {} // 清空维护发票信息的数据 // this.financeObj = {} // 清空维护发票信息的数据
...@@ -477,7 +487,8 @@ export default { ...@@ -477,7 +487,8 @@ export default {
sampleDepth: '', sampleDepth: '',
samplePack: '', samplePack: '',
sampleDescribe: '', sampleDescribe: '',
siteNo: '' siteNo: '',
itemNames: ''
} }
this.getPage.records.unshift(data) this.getPage.records.unshift(data)
}, },
...@@ -634,6 +645,7 @@ export default { ...@@ -634,6 +645,7 @@ export default {
// 添加 // 添加
// const saveData = this.formObj // const saveData = this.formObj
data.sampleList = this.getPage.records data.sampleList = this.getPage.records
console.log(data)
this._save(data) this._save(data)
} else { } else {
// const saveData = this.formObj // const saveData = this.formObj
......
...@@ -252,8 +252,9 @@ export default { ...@@ -252,8 +252,9 @@ export default {
}, },
_page: async function() { _page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj) const result = await soilEntrust.pageReview(
const result = await soilEntrust.page(this.formObj) this.$serializeForm(this.formObj)
)
if (result) { if (result) {
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
this.getPage = result this.getPage = result
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment