Commit 74165c8f by lichengming

修改了试样管理

parent 1ac67907
...@@ -27,81 +27,47 @@ ...@@ -27,81 +27,47 @@
<!--样品数量--> <!--样品数量-->
<!-- 表格 --> <!-- 表格 -->
<Col span="24"> <Col span="24">
<PTVXETable <PTVXETableHeight ref="pageTable" :table-height="tableHeight" :loading="true"
id="samplePreManage" :get-page="getPage" @on-result-change="_tableResultChange">
ref="pageTable"
:tableHeight="tableHeight"
:getPage="getPage"
@on-result-change="_tableResultChange"
select-data>
<vxe-table-column <vxe-table-column
v-for="item in pageColumns" v-for="item in pageColumns"
:key="item.key" :key="item.key"
:field="item.key" :field="item.key"
:title="item.title" :title="item.title"
:width="item.width" :min-width="item.width?item.width:200"
:min-width="200" :fixed="item.fixed?item.fixed:undefined" sortable>
:fixed="item.fixed?item.fixed:undefined"
sortable
>
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="item.key==='status'"> <span v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</span>
{{scope.row[item.key]===undefined?'':scope.row[item.key].display}} <span v-else-if="item.status">{{scope.row[item.key].display}}</span>
</div> <div v-else-if="item.key==='quantity'" @click.stop="_handleIndex(scope)">
<a v-else-if="item.key==='code'" @click.stop="_detailModal(scope.row)">{{scope.row[item.key]}}</a> <div v-if="editIndex!==scope.rowIndex">
<a v-else-if="item.key==='sampleSn'" {{scope.row[item.key]}}
@click.stop="_sampleDetailModal(scope.row)">{{scope.row[item.key]}}</a> </div>
<div v-else-if="item.key==='backupPlace'" @click.stop="_handleIndex(scope)">
<div v-if="editIndex!==scope.rowIndex">{{scope.row[item.key]}}</div>
<div v-else> <div v-else>
<AutoCompletes :value="scope.row.backupPlace" :downData="locList" @on-result-change="_locChange" <el-input v-model="scope.row.quantity" clearable></el-input>
name="backupPlace" placeholder="请输入或选择存储位置" focus
show-key="backupPlace"></AutoCompletes>
</div> </div>
</div> </div>
<div v-else-if="item.key==='storageCondition'" @click.stop="_handleIndex(scope)"> <div v-else-if="item.key==='conditions'" @click.stop="_handleIndex(scope)">
<div v-if="editIndex!==scope.rowIndex">{{scope.row[item.key]}}</div> <div v-if="editIndex!==scope.rowIndex">{{scope.row[item.key]}}</div>
<div v-else> <div v-else>
<el-select v-model="scope.row.storageCondition" clearable style="width:100%" size="small"> <el-select v-model="scope.row.conditionList" clearable style="width:100%" size="small">
<el-option v-for="item in conditionList" :value="item.name" :key="item.name">{{ item.name }} <el-option v-for="item in conditionList" :value="item.name" :key="item.name">{{ item.name }}
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
<div v-else-if="item.key==='handleQuantity'" @click.stop="_handleIndex(scope)"> <div v-else-if="item.key==='backupLocation'" @click.stop="_handleIndex(scope)">
<div v-if="editIndex!==scope.rowIndex"> <div v-if="editIndex!==scope.rowIndex">
{{scope.row[item.key]}}{{scope.row['sampleUnit'] && {{scope.row[item.key]}}
scope.row['handleQuantity']?scope.row['sampleUnit']:''}}
</div> </div>
<div v-else> <div v-else>
<Row> <el-input v-model="scope.row.backupLocation" clearable></el-input>
<Col span="18">
<el-input v-model="scope.row.handleQuantity" placeholder="处理数量" clearable size="small"/>
</Col>
<Col span="6">
<div style="line-height: 32px">{{scope.row['sampleUnit']?scope.row['sampleUnit']:''}}</div>
</Col>
</Row>
</div> </div>
</div> </div>
<div v-else-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}} <span v-else>{{scope.row[item.key]}}</span>
</div>
<div v-else>{{scope.row[item.key]}}</div>
</template> </template>
</vxe-table-column> </vxe-table-column>
<template slot="col"> </PTVXETableHeight>
<vxe-table-column
:width="80"
title="操作"
align="center"
fixed="right">
<template slot-scope="scope">
<VXEIconList :msg="editIndex===scope.rowIndex?iconMsgSave:iconMsg" @on-result-change="_iconClick"
:rowData="scope.row" :rowIndex="scope.rowIndex"></VXEIconList>
</template>
</vxe-table-column>
</template>
</PTVXETable>
</Col> </Col>
</Row> </Row>
</div> </div>
...@@ -110,14 +76,12 @@ ...@@ -110,14 +76,12 @@
</div> </div>
</template> </template>
<script> <script>
import AutoCompletes from '../../../../components/base/AutoCompletes'
import Reason from '../../../../components/base/Reason' import Reason from '../../../../components/base/Reason'
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
import http from '../../../../api/http' import http from '../../../../api/http'
import { soilSample } from '../../../../api' import { soilSample } from '../../../../api'
export default { export default {
components: { components: {
AutoCompletes,
Reason Reason
}, },
data() { data() {
...@@ -170,19 +134,19 @@ export default { ...@@ -170,19 +134,19 @@ export default {
iconMsgSave: [{ type: 'ios-checkmark', id: '', name: '保存' }], iconMsgSave: [{ type: 'ios-checkmark', id: '', name: '保存' }],
pageColumns: [ pageColumns: [
{ title: '委托商', key: 'client', width: 180 }, { title: '委托商', key: 'client', width: 180 },
{ title: '委托编号', key: 'entrustCode', width: 180 }, { title: '委托编号', key: 'entrustCode', width: 100 },
{ title: '试样编号', key: 'sampleCode', width: 180 }, { title: '试样编号', key: 'sampleCode', width: 100 },
{ title: '试样深度', key: 'sampleDepth', width: 180 }, { title: '状态', key: 'status', width: 100, status: true },
{ title: '样品包装类型', key: 'samplePack', width: 180 }, { title: '试样深度', key: 'sampleDepth', width: 100 },
{ title: '现场编号', key: 'siteNo', width: 180 }, { title: '样品包装类型', key: 'samplePack', width: 120 },
{ title: '现场编号', key: 'siteNo', width: 100 },
{ title: '钻孔位置', key: 'boreholeLocation', width: 110 },
{ title: '钻孔名称', key: 'boreholeName', width: 160 },
{ title: '水深(米)', key: 'waterDepth', width: 100 },
{ title: '存储条件', key: 'conditions', width: 180 }, { title: '存储条件', key: 'conditions', width: 180 },
{ title: '备样位置', key: 'backupLocation', width: 180 }, { title: '备样位置', key: 'backupLocation', width: 180 },
{ title: '备样数量', key: 'quantity', width: 180 }, { title: '备样数量', key: 'quantity', width: 180 },
{ title: '备样人', key: 'backupUser', width: 140 }, { title: '备样人', key: 'backupUser', width: 140 }
{ title: '钻孔位置', key: 'boreholeLocation', width: 110 },
{ title: '钻孔名称', key: 'boreholeName', width: 160 },
{ title: '水深(米)', key: 'waterDepth', width: 160 },
{ title: '状态', key: 'status', width: 160 }
/* {title: '处置方式', key: 'handleMethod', width: 120,}, */ /* {title: '处置方式', key: 'handleMethod', width: 120,}, */
], ],
conditionList: [], conditionList: [],
...@@ -217,9 +181,9 @@ export default { ...@@ -217,9 +181,9 @@ export default {
computed: { computed: {
tableHeight: function() { tableHeight: function() {
if (this.searchOpen) { if (this.searchOpen) {
return this.$tableHeight('', 385) return this.$tableHeight('', 255)
} else { } else {
return this.$tableHeight('', 300) return this.$tableHeight('', 220)
} }
}, },
colorComputed() { colorComputed() {
......
...@@ -8,27 +8,9 @@ ...@@ -8,27 +8,9 @@
<Col span="24"> <Col span="24">
<Form id="search-form-query" :label-width="80" v-show="searchOpen" inline onsubmit="return false"> <Form id="search-form-query" :label-width="80" v-show="searchOpen" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item class="search-item" label="样品编号:">
<Input @on-enter="_formSearch" name="sampleSn" placeholder="请输入样品编号" clearable/>
</Form-item>
<Form-item class="search-item" label="样品名称:">
<Input @on-enter="_formSearch" name="sampleName" placeholder="请输入样品名称" clearable/>
</Form-item>
<Form-item class="search-item" label="存储位置:">
<Input @on-enter="_formSearch" name="backupPlace" placeholder="请输入存储位置" clearable/>
</Form-item>
<Form-item class="search-item" label="存储期限:">
<Date-picker @on-change="_dateChange" :editable="false" type="daterange" split-panels
style="width:100%;" placeholder="请选择存储期限"></Date-picker>
<input v-model="endDateBegin" type="hidden" name="endDateBegin">
<input v-model="endDateEnd" type="hidden" name="endDateEnd">
</Form-item>
<Form-item class="search-item" label="委托单位:" style="margin-left: 8px;"> <Form-item class="search-item" label="委托单位:" style="margin-left: 8px;">
<Input @on-enter="_formSearch" name="cname" placeholder="请输入委托单位" clearable/> <Input @on-enter="_formSearch" name="cname" placeholder="请输入委托单位" clearable/>
</Form-item> </Form-item>
<Form-item class="search-item" label="委托名称:">
<Input @on-enter="_formSearch" name="contractName" placeholder="请输入委托名称" clearable/>
</Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button> <Button @click="_formSearch" type="primary">搜索</Button>
</Form-item> </Form-item>
...@@ -40,48 +22,47 @@ ...@@ -40,48 +22,47 @@
</Col> </Col>
<!-- 表格 --> <!-- 表格 -->
<Col span="24"> <Col span="24">
<!--<ElementTable :tableHeight="tableHeight" @on-result-change="_tableResultChange"--> <PTVXETableHeight ref="pageTable" :table-height="tableHeight" :loading="true"
<!--ref="pageTable" :getPage="getPage" id="perSampleQuery" selectData>--> :get-page="getPage" @on-result-change="_tableResultChange">
<!--<el-table-column-->
<!--show-overflow-tooltip-->
<!--sortable-->
<!--:prop="item.key"-->
<!--:label="item.title"-->
<!--:width="item.width"-->
<!--:min-width="200"-->
<!--:fixed="item.fixed?item.fixed:undefined"-->
<!--v-for="item in pageColumns" :key="item.key">-->
<!--<template slot-scope="scope">-->
<!--<div v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</div>-->
<!--<a v-else-if="item.key==='sampleSn'"-->
<!--@click.stop="_sampleDetailModal(scope.row)">{{scope.row[item.key]}}</a>-->
<!--<div v-else-if="item.key==='progress'">-->
<!--{{scope.row[item.key]===undefined?'':scope.row[item.key].display}}-->
<!--</div>-->
<!--<div v-else>{{scope.row[item.key]}}</div>-->
<!--</template>-->
<!--</el-table-column>-->
<!--</ElementTable>-->
<PTVXETable id="perSampleQuery" ref="pageTable"
:tableHeight="tableHeight" @on-result-change="_tableResultChange" :getPage="getPage" select-data>
<vxe-table-column <vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key" :field="item.key"
:title="item.title" :title="item.title"
:min-width="item.width?item.width:200" :min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" :fixed="item.fixed?item.fixed:undefined" sortable>
v-for="item in pageColumns"
:key="item.key" sortable>
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</div> <span v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</span>
<a v-else-if="item.key==='sampleSn'" <span v-else-if="item.status">{{scope.row[item.key].display}}</span>
@click.stop="_sampleDetailModal(scope.row)">{{scope.row[item.key]}}</a> <div v-else-if="item.key==='quantity'" @click.stop="_handleIndex(scope)">
<div v-else-if="item.key==='progress'"> <div v-if="editIndex!==scope.rowIndex">
{{scope.row[item.key]===undefined?'':scope.row[item.key].display}} {{scope.row[item.key]}}
</div>
<div v-else>
<el-input v-model="scope.row.quantity" clearable></el-input>
</div>
</div>
<div v-else-if="item.key==='conditions'" @click.stop="_handleIndex(scope)">
<div v-if="editIndex!==scope.rowIndex">{{scope.row[item.key]}}</div>
<div v-else>
<el-select v-model="scope.row.conditionList" clearable style="width:100%" size="small">
<el-option v-for="item in conditionList" :value="item.name" :key="item.name">{{ item.name }}
</el-option>
</el-select>
</div>
</div>
<div v-else-if="item.key==='backupLocation'" @click.stop="_handleIndex(scope)">
<div v-if="editIndex!==scope.rowIndex">
{{scope.row[item.key]}}
</div>
<div v-else>
<el-input v-model="scope.row.backupLocation" clearable></el-input>
</div>
</div> </div>
<div v-else>{{scope.row[item.key]}}</div> <span v-else>{{scope.row[item.key]}}</span>
</template> </template>
</vxe-table-column> </vxe-table-column>
</PTVXETable> </PTVXETableHeight>
</Col> </Col>
</Row> </Row>
</div> </div>
...@@ -107,23 +88,20 @@ export default { ...@@ -107,23 +88,20 @@ export default {
} }
], ],
pageColumns: [ pageColumns: [
{ title: '样品编号', key: 'sampleSn', width: 180 }, { title: '委托商', key: 'client', width: 180 },
{ title: '样品名称', key: 'sampleName', width: 140 }, { title: '委托编号', key: 'entrustCode', width: 100 },
{ title: '状态', key: 'progress', width: 110, status: true }, { title: '试样编号', key: 'sampleCode', width: 100 },
{ title: '存储期限', key: 'endDate', width: 120, date: true }, { title: '状态', key: 'status', width: 100, status: true },
{ title: '委托单位', key: 'cname', width: 140 }, { title: '试样深度', key: 'sampleDepth', width: 100 },
{ title: '委托名称', key: 'contractName', width: 170 }, { title: '样品包装类型', key: 'samplePack', width: 120 },
{ title: '处置方式', key: 'handleMethod', width: 120 }, { title: '现场编号', key: 'siteNo', width: 100 },
{ title: '处理人', key: 'handlePerson', width: 100 }, { title: '钻孔位置', key: 'boreholeLocation', width: 110 },
{ title: '处理时间', key: 'handleTime', width: 120, date: true }, { title: '钻孔名称', key: 'boreholeName', width: 160 },
{ title: '处理申请人', key: 'applyer', width: 120 }, { title: '水深(米)', key: 'waterDepth', width: 100 },
{ title: '申请时间', key: 'applyDate', width: 120, date: true }, { title: '存储条件', key: 'conditions', width: 180 },
{ title: '存储位置', key: 'backupPlace', width: 100 }, { title: '备样位置', key: 'backupLocation', width: 180 },
{ title: '存储条件', key: 'storageCondition', width: 120 }, { title: '备样数量', key: 'quantity', width: 180 },
{ title: '样品数量', key: 'quantity', width: 100 }, { title: '备样人', key: 'backupUser', width: 140 }
{ title: '备样数量', key: 'sampleQuantity', width: 100 },
{ title: '样品备注', key: 'sampleRemark' },
{ title: '委托备注', key: 'contractRemark' }
], ],
searchOpen: false, searchOpen: false,
getPage: {}, getPage: {},
...@@ -135,9 +113,9 @@ export default { ...@@ -135,9 +113,9 @@ export default {
computed: { computed: {
tableHeight: function() { tableHeight: function() {
if (this.searchOpen) { if (this.searchOpen) {
return this.$tableHeight('tabSearchTwo') return this.$tableHeight('', 255)
} else { } else {
return this.$tableHeight('tabNoSearch') return this.$tableHeight('', 220)
} }
} }
}, },
......
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