Commit 2ce4eb9e by lichengming

修改了备样管理

parent b0e69e3e
...@@ -27,36 +27,24 @@ ...@@ -27,36 +27,24 @@
<!--样品数量--> <!--样品数量-->
<!-- 表格 --> <!-- 表格 -->
<Col span="24"> <Col span="24">
<PTVXETableTemp <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 v-else-if="item.key==='quantity'" @click.stop="_handleIndex(scope)">
<div v-if="editIndex!==scope.rowIndex">
{{scope.row[item.key]}}
</div> </div>
<a v-else-if="item.key==='code'" @click.stop="_detailModal(scope.row)">{{scope.row[item.key]}}</a>
<a v-else-if="item.key==='sampleSn'"
@click.stop="_sampleDetailModal(scope.row)">{{scope.row[item.key]}}</a>
<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==='conditions'" @click.stop="_handleIndex(scope)"> <div v-else-if="item.key==='conditions'" @click.stop="_handleIndex(scope)">
...@@ -68,30 +56,6 @@ ...@@ -68,30 +56,6 @@
</el-select> </el-select>
</div> </div>
</div> </div>
<div v-else-if="item.key==='handleQuantity'" @click.stop="_handleIndex(scope)">
<div v-if="editIndex!==scope.rowIndex">
{{scope.row[item.key]}}{{scope.row['sampleUnit'] &&
scope.row['handleQuantity']?scope.row['sampleUnit']:''}}
</div>
<div v-else>
<Row>
<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 v-else-if="item.key==='quantity'" @click.stop="_handleIndex(scope)">
<div v-if="editIndex!==scope.rowIndex">
{{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==='backupLocation'" @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[item.key]}}
...@@ -100,9 +64,7 @@ ...@@ -100,9 +64,7 @@
<el-input v-model="scope.row.backupLocation" clearable></el-input> <el-input v-model="scope.row.backupLocation" clearable></el-input>
</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>
<vxe-table-column <vxe-table-column
...@@ -112,11 +74,10 @@ ...@@ -112,11 +74,10 @@
align="center" align="center"
fixed="right"> fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<VXEIconList :msg="editIndex===scope.rowIndex?iconMsgSave:iconMsg" @on-result-change="_iconClick" <VXEIconList :msg="editIndex===scope.rowIndex?iconMsgSave:iconMsg" @on-result-change="_iconClick" :rowData="scope.row" :rowIndex="scope.rowIndex"></VXEIconList>
:rowData="scope.row" :rowIndex="scope.rowIndex"></VXEIconList>
</template> </template>
</vxe-table-column> </vxe-table-column>
</PTVXETableTemp> </PTVXETableHeight>
</Col> </Col>
</Row> </Row>
</div> </div>
...@@ -126,7 +87,7 @@ ...@@ -126,7 +87,7 @@
</div> </div>
</template> </template>
<script> <script>
import AutoCompletes from '../../../../components/base/AutoCompletes' // import AutoCompletes from '../../../../components/base/AutoCompletes'
import SampleParpareApply from '../SampleParpareApply' import SampleParpareApply from '../SampleParpareApply'
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
import http from '../../../../api/http' import http from '../../../../api/http'
...@@ -134,7 +95,7 @@ import { soilEntrust, soilSample } from '../../../../api' ...@@ -134,7 +95,7 @@ import { soilEntrust, soilSample } from '../../../../api'
import Operation from '../../../../components/operation/Operation' import Operation from '../../../../components/operation/Operation'
export default { export default {
components: { components: {
AutoCompletes, // AutoCompletes,
SampleParpareApply, SampleParpareApply,
Operation Operation
}, },
...@@ -194,7 +155,7 @@ export default { ...@@ -194,7 +155,7 @@ export default {
{ title: '委托商', key: 'client', width: 180 }, { title: '委托商', key: 'client', width: 180 },
{ title: '委托编号', key: 'entrustCode', width: 180 }, { title: '委托编号', key: 'entrustCode', width: 180 },
{ title: '试样编号', key: 'sampleCode', width: 180 }, { title: '试样编号', key: 'sampleCode', width: 180 },
{ title: '状态', key: 'status', width: 160 }, { title: '状态', key: 'status', width: 160, status: true },
{ title: '试样深度', key: 'sampleDepth', width: 180 }, { title: '试样深度', key: 'sampleDepth', width: 180 },
{ title: '样品包装类型', key: 'samplePack', width: 180 }, { title: '样品包装类型', key: 'samplePack', width: 180 },
{ title: '现场编号', key: 'siteNo', width: 180 }, { title: '现场编号', key: 'siteNo', width: 180 },
......
...@@ -28,26 +28,19 @@ ...@@ -28,26 +28,19 @@
</Col> </Col>
<!-- 表格 --> <!-- 表格 -->
<Col span="24"> <Col span="24">
<PTVXETable id="perSampleQuery" ref="pageTable" <PTVXETable ref="pageTable" :table-height="tableHeight" :loading="true"
:tableHeight="tableHeight" :icon-msg="iconMsg" @on-result-change="_tableResultChange" :getPage="getPage" select-data> :get-page="getPage" :icon-msg="iconMsg" @on-result-change="_tableResultChange">
<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> <span v-else>{{scope.row[item.key]}}</span>
<div v-else-if="item.key==='status'">
{{scope.row[item.key]===undefined?'':scope.row[item.key].display}}
</div>
<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> </template>
</vxe-table-column> </vxe-table-column>
</PTVXETable> </PTVXETable>
...@@ -91,7 +84,7 @@ export default { ...@@ -91,7 +84,7 @@ export default {
{ title: '委托商', key: 'client', width: 180 }, { title: '委托商', key: 'client', width: 180 },
{ title: '委托编号', key: 'entrustCode', width: 180 }, { title: '委托编号', key: 'entrustCode', width: 180 },
{ title: '试样编号', key: 'sampleCode', width: 180 }, { title: '试样编号', key: 'sampleCode', width: 180 },
{ title: '状态', key: 'status', width: 160 }, { title: '状态', key: 'status', width: 160, status: true },
{ title: '试样深度', key: 'sampleDepth', width: 180 }, { title: '试样深度', key: 'sampleDepth', width: 180 },
{ title: '样品包装类型', key: 'samplePack', width: 180 }, { title: '样品包装类型', key: 'samplePack', width: 180 },
{ title: '现场编号', key: 'siteNo', width: 180 }, { title: '现场编号', key: 'siteNo', width: 180 },
......
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