Commit f4811392 by wangweidong

Merge remote-tracking branch 'origin/dev' into dev

parents 5d48dd6f c4539306
......@@ -38,5 +38,7 @@ export default {
getStandardList: data =>
http.post('soil/v1/standard/list', data).then(res => res),
getGroupList: data =>
http.post('/res/v1/user_group/list', data).then(res => res)
http.post('/res/v1/user_group/list', data).then(res => res),
getBasisList: data =>
http.post('soil/v1/standard/list', data).then(res => res)
}
......@@ -127,5 +127,13 @@ export default {
'&reason=' +
data.remark
)
.then(res => res)
.then(res => res),
getDictList: data =>
http.post('res/v1/dict/dict_query?type=' + data).then(res => res),
editBackup: data =>
http.put('soil/v1/sample_backup/' + data.id, data.obj).then(res => res),
// 余样编辑
editPrepare: data =>
http.put('soil/v1/prepare/' + data.id, data.obj).then(res => res),
getUserList: data => http.post('/base/v1/user/page').then(res => res)
}
......@@ -32,5 +32,7 @@ export default {
pageCoordinateStatistics: data =>
http
.post('soil/v1/statistics/page_coordinate_statistics', data)
.then(res => res)
.then(res => res),
filePage: data =>
http.post('soil/v1/standard_annex/page', data).then(res => res)
}
......@@ -102,8 +102,8 @@ export default {
this.entrustId = id
this.urlData = {
msg: 'FoodContractAttachment',
pageUrl: '/soil/v1/standard_annex/page',
deleteUrl: '/soil/v1/standard_annex/?ids=',
pageUrl: 'soil/v1/entrust_annex/page',
deleteUrl: '/soil/v1/entrust_annex/?ids=',
uploadFileUrl: '/soil/v1/standard_annex/upload/',
downloadFileUrl: '/soil/v1/standard_annex/download/',
downloadBatch: '/food/v1/contract_attachment/download_batch',
......@@ -222,7 +222,7 @@ export default {
},
// 搜索
_search() {
this.$refs.fileModal._page()
this.$refs.fileModal._page(this.fileName)
}
}
}
......
......@@ -221,7 +221,12 @@ export default {
this._page()
})
},
_page: async function() {
_page: async function(fileName) {
if (fileName) {
this.formObj.fileName = fileName
} else {
this.formObj.fileName = undefined
}
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
const result = await meterEntrust.attachmentPage(
this.urlData.pageUrl,
......
......@@ -98,7 +98,7 @@ export default {
iconMsg: [
{ type: 'md-apps', id: '', name: '指标管理' },
{ type: 'md-create', id: '', name: '编辑' },
{ type: 'md-add', id: '', name: '附件' },
// { type: 'md-add', id: '', name: '附件' },
{ type: 'md-trash', id: '', name: '删除' }
// { type: 'md-add', id: '', name: '操作日志' }
],
......
......@@ -10,9 +10,8 @@
<Row>
<Col span="24">
<Form v-model="formObj" :label-width="90" inline onsubmit="return false">
<Form-item class="search-item" label="检测项目:" style="margin-left: -25px">
<Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入检测项目" clearable />
<input v-model="formObj.catalogueId" type="hidden">
<Form-item class="search-item" label="试验名称:" style="margin-left: -25px">
<Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入试验名称" clearable />
</Form-item>
<!-- <Form-item class="search-item" label="检测依据:">-->
<!-- <Input v-model="formObj.code" placeholder="请输入检测依据名称" clearable @on-enter="_formSearch" />-->
......@@ -30,27 +29,15 @@
</Col>
<!-- 表格 -->
<Col span="24">
<element-table
ref="pageTable"
:page-columns="pageColumns"
:table-height="350"
:get-page="getPage"
:icon-msg="iconMsg"
:opt-col-width="80"
@on-result-change="_tableResultChange"
select-data
show-check-box
>
<el-table-column
v-for="item in pageColumns"
:key="item.key"
:prop="item.key"
:label="item.title"
:width="item.width"
:min-width="200"
show-overflow-tooltip
sortable
>
<PTVXETable ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true"
:get-page="getPage" :icon-msg="iconMsg" @on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<span v-if="item.key==='judged'">
{{ scope.row[item.key]===1?'是':'否' }}
......@@ -86,8 +73,8 @@
{{ scope.row[item.key] }}
</span>
</template>
</el-table-column>
</element-table>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
<div slot="footer">
......@@ -236,6 +223,9 @@ export default {
case 'iconClick':
this._iconClick(data.name, data.rowData)
break
case 'changeSize':
this._page()
break
}
},
_ok() {
......
......@@ -12,7 +12,7 @@
<Form id="search-sample-company" v-show="searchOpen" :label-width="90" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="文件名称:" class="search-item">
<Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入检测项目" clearable />
<Input v-model="formObj.fileName" @on-enter="_formSearch" placeholder="请输入文件名" clearable />
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">
......@@ -56,7 +56,8 @@
</div>
</template>
<script>
import { soilEntrust } from '../../../api'
import { soilEntrust, soilStatistics } from '../../../api'
import global from '../../../api/config'
export default {
components: {},
data() {
......@@ -65,9 +66,9 @@ export default {
currentComponent: '',
btn: [],
iconMsg: [
{ type: 'pt-a-end', id: '', name: '预览' },
{ type: 'pt-a-end', id: '', name: '下载' },
{ type: 'pt-a-end', id: '', name: '删除' }
{ type: 'ios-book', id: '', name: '预览' },
{ type: 'ios-download', id: '', name: '下载' },
{ type: 'md-trash', id: '', name: '删除' }
],
sampleId: '', // 样品id
entrustId: '',
......@@ -93,7 +94,7 @@ export default {
],
dateList: [],
formObj: {
name: undefined
fileName: undefined
}
}
},
......@@ -162,22 +163,42 @@ export default {
this.currentComponent = componentName
this.$nextTick(function() {
switch (res) {
case '编辑':
this._editModal(true, data)
case '预览':
this._viewReport(data)
break
case '复制':
this._copy(data)
case '下载':
this._download(data)
break
case '删除':
console.log(index)
this._deleteById(data.id)
break
case '导出样品委托协议':
this._exportAgreement(data.id)
break
case '附件':
this.$refs.refModal._open(data.id, 'sampleId')
break
}
})
},
_viewReport(data) {
console.log(navigator.platform)
if (this.$platform()) {
// eslint-disable-next-line no-undef
POBrowser.openWindowModeless(
global.baseURL + '/print/v1/view_attachment?key=' + data.objectKey,
'width=1163px;height=850px;'
)
} else {
this.$Message.warning('暂不支持预览')
}
},
// 下载
_download(data) {
console.log(data)
this.$Modal.confirm({
title: '提示',
content: '确定要下载文件?',
onOk: () => {
window.open(
global.baseURL + '/soil/v1/standard_annex/download/' + data.id,
'_blank'
)
}
})
},
......@@ -213,9 +234,9 @@ export default {
this.selectIds = selectIds
this.selectData = data
break
// case 'iconClick':
// this._iconClick(data.name, data.rowData, data.componentName)
// break
case 'iconClick':
this._iconClick(data.name, data.rowData, data.componentName)
break
case 'page':
this._page()
break
......@@ -228,7 +249,7 @@ export default {
this.formObj = this.$resetFields(this.formObj)
this.dateList = []
this.showModal = true
this.sampleId = id // 委托id
this.entrustId = id // 委托id
this.$refs.pageTable._hideLoading()
this._page()
},
......@@ -268,8 +289,8 @@ export default {
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
this.formObj = this.$serializeForm(this.formObj)
this.formObj.sampleId = this.sampleId
const result = await soilEntrust.pageItem(
this.formObj.entrustId = this.entrustId
const result = await soilStatistics.filePage(
this.$serializeForm(this.formObj)
)
if (result) {
......
......@@ -85,7 +85,7 @@
<DownloadTemplateImport ref="importModal" @on-result-change="_page"></DownloadTemplateImport>
<SubstitutionalRelation ref="relationModal" @on-result-change="_page"></SubstitutionalRelation>
<UploadModal ref="uploadModal" @on-result-change="_page"></UploadModal>
<StanardFileManage ref="FileManage"></StanardFileManage>
<StanardFileManage ref="stanardFileManage"></StanardFileManage>
<!-- <component ref="refModal" :is="currentComponent" @on-result-change="_page"></component>-->
</div>
</template>
......@@ -250,7 +250,7 @@ export default {
})
},
_fileManage(id) {
this.$refs.FileManage._openByEntrustId(id)
this.$refs.stanardFileManage._open(id)
},
_upload(id) {
const obj = {
......
......@@ -78,10 +78,6 @@
<el-input v-model="scope.row.smallType" @change="inputSmallTypeChange(scope.row)" name="smallType" placeholder="请输入英文简写">
</el-input>
</div>
<div v-if="item.key==='testBasis'" @click="_handleRow(scope)">
<el-input v-model="scope.row.testBasis" @change="basisChange(scope.row)" name="testBasis" placeholder="请输入英文简写">
</el-input>
</div>
<div v-if="item.key==='testMethod'" @click="_handleRow(scope)">
<el-input v-model="scope.row.testMethod" @change="methodChange(scope.row)" name="testMethod" placeholder="请输入英文简写">
</el-input>
......@@ -95,10 +91,15 @@
<!-- :value="item.name"-->
<!-- />-->
<!-- </el-select>-->
<AutoCompletes style="editable:false" v-model="scope.row.groupName" :handle-obj="scope.row" :down-data="groupoptions"
@on-result-change="_selGroup" clearable
<AutoCompletes v-model="scope.row.groupName" :handle-obj="scope.row" :down-data="groupoptions" @on-result-change="_selGroup"
style="editable:false" clearable
placeholder="输入或选择试验室" show-key="name"></AutoCompletes>
</div>
<div v-if="item.key==='testBasis'" @click="_handleRow(scope)">
<AutoCompletes v-model="scope.row.testBasis" :handle-obj="scope.row" :down-data="testBasisList" @on-result-change="_selTestBasis"
style="editable:false" clearable
placeholder="输入或选择检测依据" show-key="name"></AutoCompletes>
</div>
</template>
</vxe-table-column>
</PTVXETable>
......@@ -135,6 +136,7 @@ export default {
selectData: {},
getPage: {},
groupoptions: [],
testBasisList: [],
currentRow: '',
currentIndex: '',
footerList: [
......@@ -234,6 +236,12 @@ export default {
this.groupoptions = result
}
},
_getTestBasisList: async function() {
const result = await soilAptitude.getBasisList()
if (result) {
this.testBasisList = result
}
},
_selGroup(msg, data, handleObj) {
console.log(handleObj)
if (msg === 'select') {
......@@ -245,6 +253,15 @@ export default {
this._editItem(handleObj.id, tempData)
}
},
_selTestBasis(msg, data, handleObj) {
console.log(handleObj)
if (msg === 'select') {
this.getPage.records[this.currentIndex].testBasis = data.name
const tempData = {}
tempData.testBasis = data.name
this._editItem(handleObj.id, tempData)
}
},
inputChange(data) {
const editData = {}
editData.shortName = data.shortName
......@@ -516,6 +533,7 @@ export default {
this.$refs.pageTable._hideLoading()
this._pageByEntrustId()
this._getGroupList()
this._getTestBasisList()
},
_openRecord(id) {
this.formObj = this.$resetFields(this.formObj)
......
......@@ -11,12 +11,12 @@
<Col span="24">
<Form id="search-sample-company" v-show="searchOpen" :label-width="80" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="试样编号:" class="search-item">
<Input v-model="formObj.sampleCode" @on-enter="_formSearch" placeholder="请输入样品编号" clearable />
</Form-item>
<Form-item label="现场编号:" class="search-item">
<Input v-model="formObj.siteNo" @on-enter="_formSearch" placeholder="请输入现场编号" clearable />
</Form-item>
<Form-item label="样品编号:" class="search-item">
<Input v-model="formObj.sampleCode" @on-enter="_formSearch" placeholder="请输入样品编号" clearable />
</Form-item>
<Form-item class="search-btn">
<Button @click="_page" type="primary">
搜索
......@@ -40,10 +40,7 @@
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<div v-if="item.detail">
<a @click.stop="_detailModal(scope.row)">{{ scope.row[item.key] }}</a>
</div>
<div v-else-if="item.status">
<div v-if="item.status">
{{ scope.row[item.key].display }}
</div>
<div v-else-if="item.date">
......@@ -117,12 +114,12 @@ export default {
selectData: {},
getPage: {},
pageColumns: [
{ title: '试样编号', key: 'sampleCode', width: 160, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 160 },
{ title: '现场编号', key: 'siteNo', width: 130 },
{ title: '试验项目', key: 'experimentNames', width: 330 },
{ title: '土质描述', key: 'sampleDescribe', width: 160 },
{ title: '样品包装类型', key: 'samplePack', width: 160 }
{ title: '试样编号', key: 'sampleCode', width: 100, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 100 },
{ title: '现场编号', key: 'siteNo', width: 100 },
{ title: '试验项目', key: 'experimentNames' },
{ title: '土质描述', key: 'sampleDescribe', width: 100 },
{ title: '样品包装类型', key: 'samplePack', width: 80 }
],
sampleId: '',
dateList: [],
......
......@@ -102,9 +102,7 @@
@on-result-change="_soilChange" name="sampleDescribe" placeholder="请输入或选择土质描述"
></AutoComplete>
</div>
<div v-else @click.stop="_handleRow(scope)">
<span> {{ scope.row[item.key] }}</span>
</div>
<span v-else> {{ scope.row[item.key] }}</span>
</template>
</vxe-table-column>
</PTVXETable>
......@@ -459,7 +457,6 @@ export default {
if (this.selectIds.length === 0) {
this.$Message.warning('请选择至少一条数据!')
} else {
console.log('导入检测项目')
this.$refs.sampleItemSelectModal._open()
this.allSelect(this.selectData)
}
......@@ -925,3 +922,8 @@ export default {
}
}
</script>
<style>
.vxe-table--tooltip-wrapper {
z-index: 2147483647 !important;
}
</style>
<template>
<div>
<Modal v-model="showModal" @on-visible-change="_visibleChange" width="1200" class="modal-footer-none">
<Modal v-model="showModal" @on-visible-change="_visibleChange" width="970" class="modal-footer-none">
<p slot="header">
{{ modalTitle }}
</p>
......@@ -14,18 +14,6 @@
<Form-item label="试样编号:" class="search-item">
<Input v-model="formObj.sampleCode" @on-enter="_formSearch" placeholder="请输入样品编号" clearable />
</Form-item>
<!-- <Form-item label="制单日期:" style="width: 25%">-->
<!-- <Date-picker-->
<!-- v-model="dateList"-->
<!-- type="daterange"-->
<!-- placeholder="制单日期"-->
<!-- format="yyyy-MM-dd"-->
<!-- :editable="false"-->
<!-- style="width:100%"-->
<!-- placement="bottom-end"-->
<!-- @on-change="_dateChange"-->
<!-- ></Date-picker>-->
<!-- </Form-item>-->
<Form-item class="search-btn">
<Button @click="_page" type="primary">
搜索
......@@ -39,14 +27,14 @@
</Col>
<!-- 表格 -->
<Col span="24">
<PTVXETable ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true"
<PTVXETableHeight ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true"
:get-page="getPage" :icon-msg="iconMsg" @on-result-change="_tableResultChange" select-data>
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<div v-if="item.detail">
......@@ -66,7 +54,7 @@
</div>
</template>
</vxe-table-column>
</PTVXETable>
</PTVXETableHeight>
</Col>
</Row>
</div>
......@@ -121,8 +109,7 @@ export default {
type: 'ios-beaker',
id: '',
name: '管理检测项目'
},
{ type: 'md-trash', id: '', name: '删除' }
}
],
contractId: '', // 委托id
showModal: false,
......@@ -133,12 +120,12 @@ export default {
selectData: {},
getPage: {},
pageColumns: [
{ title: '试样编号', key: 'sampleCode', width: 160, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 160 },
{ title: '土质描述详情', key: 'describeDetail', width: 160 },
{ title: '试样编号', key: 'sampleCode', width: 100, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 100 },
{ title: '现场编号', key: 'siteNo', width: 100 },
{ title: '土质描述', key: 'sampleDescribe', width: 160 },
{ title: '样品包装类型', key: 'samplePack', width: 160 },
{ title: '现场编号', key: 'siteNo', width: 130 }
{ title: '土质描述详情', key: 'describeDetail', width: 160 },
{ title: '样品包装类型', key: 'samplePack', width: 120 }
],
sampleId: '',
dateList: [],
......@@ -150,7 +137,11 @@ export default {
},
computed: {
tableHeight: function() {
return this.$tableHeight('tableModal')
if (this.searchOpen) {
return this.$tableHeight('search')
} else {
return this.$tableHeight('noSearch')
}
}
},
methods: {
......
<template>
<div>
<Modal v-model="showModal" width="1200" class="modal-footer-none">
<Modal v-model="showModal" width="980" class="modal-footer-none">
<p slot="header">
{{ modalTitle }}
</p>
......@@ -11,7 +11,7 @@
<Col span="24">
<Form id="search-sample-company" v-show="searchOpen" :label-width="80" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="样品编号:" class="search-item">
<Form-item label="试样编号:" class="search-item">
<Input v-model="formObj.sampleCode" @on-enter="_formSearch" placeholder="请输入样品编号" clearable />
</Form-item>
<Form-item class="search-btn">
......@@ -27,14 +27,14 @@
</Col>
<!-- 表格 -->
<Col span="24">
<PTVXETable ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true"
<PTVXETableHeight ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true"
:get-page="getPage" :icon-msg="iconMsg" @on-result-change="_tableResultChange" select-data>
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<div v-if="item.detail">
......@@ -51,7 +51,7 @@
</div>
</template>
</vxe-table-column>
</PTVXETable>
</PTVXETableHeight>
</Col>
</Row>
</div>
......@@ -117,12 +117,12 @@ export default {
selectData: {},
getPage: {},
pageColumns: [
{ title: '试样编号', key: 'sampleCode', width: 160, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 160 },
{ title: '土质描述详情', key: 'describeDetail', width: 160 },
{ title: '试样编号', key: 'sampleCode', width: 100, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 100 },
{ title: '现场编号', key: 'siteNo', width: 100 },
{ title: '土质描述', key: 'sampleDescribe', width: 160 },
{ title: '样品包装类型', key: 'samplePack', width: 160 },
{ title: '现场编号', key: 'siteNo', width: 130 }
{ title: '土质描述详情', key: 'describeDetail', width: 160 },
{ title: '样品包装类型', key: 'samplePack', width: 120 }
],
sampleId: '',
dateList: [],
......@@ -134,7 +134,11 @@ export default {
},
computed: {
tableHeight: function() {
return this.$tableHeight('tableModal')
if (this.searchOpen) {
return this.$tableHeight('search')
} else {
return this.$tableHeight('noSearch')
}
}
},
methods: {
......
......@@ -28,29 +28,22 @@
</Col>
<!-- 表格 -->
<Col span="24">
<PTVXETable id="perSampleQuery" ref="pageTable"
:tableHeight="tableHeight" :icon-msg="iconMsg" @on-result-change="_tableResultChange" :getPage="getPage" select-data>
<PTVXETableHeight ref="pageTable" :table-height="tableHeight" :loading="true"
:get-page="getPage" :icon-msg="iconMsg" @on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined"
v-for="item in pageColumns"
:key="item.key" sortable>
:fixed="item.fixed?item.fixed:undefined" sortable>
<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==='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>
<span v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</span>
<span v-else-if="item.status">{{scope.row[item.key].display}}</span>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
</PTVXETable>
</PTVXETableHeight>
</Col>
</Row>
</div>
......@@ -91,7 +84,7 @@ export default {
{ title: '委托商', key: 'client', width: 180 },
{ title: '委托编号', key: 'entrustCode', 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: 'samplePack', width: 180 },
{ title: '现场编号', key: 'siteNo', width: 180 },
......@@ -113,9 +106,9 @@ export default {
computed: {
tableHeight: function() {
if (this.searchOpen) {
return this.$tableHeight('tabSearchTwo')
return this.$tableHeight('', 250)
} else {
return this.$tableHeight('tabNoSearch')
return this.$tableHeight('', 210)
}
}
},
......
......@@ -27,81 +27,47 @@
<!--样品数量-->
<!-- 表格 -->
<Col span="24">
<PTVXETable
id="samplePreManage"
ref="pageTable"
:tableHeight="tableHeight"
:getPage="getPage"
@on-result-change="_tableResultChange"
select-data>
<PTVXETableHeight ref="pageTable" :table-height="tableHeight" :loading="true"
:get-page="getPage" @on-result-change="_tableResultChange" select-data>
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:width="item.width"
:min-width="200"
:fixed="item.fixed?item.fixed:undefined"
sortable
>
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<div v-if="item.key==='status'">
{{scope.row[item.key]===undefined?'':scope.row[item.key].display}}
</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>
<span v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</span>
<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 v-else>
<AutoCompletes :value="scope.row.backupPlace" :downData="locList" @on-result-change="_locChange"
name="backupPlace" placeholder="请输入或选择存储位置" focus
show-key="backupPlace"></AutoCompletes>
<el-input v-model="scope.row.quantity" clearable></el-input>
</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-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>
</el-select>
</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">
{{scope.row[item.key]}}{{scope.row['sampleUnit'] &&
scope.row['handleQuantity']?scope.row['sampleUnit']:''}}
{{scope.row[item.key]}}
</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>
<el-input v-model="scope.row.backupLocation" clearable></el-input>
</div>
</div>
<div v-else-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}
</div>
<div v-else>{{scope.row[item.key]}}</div>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
<template slot="col">
<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>
</PTVXETableHeight>
</Col>
</Row>
</div>
......@@ -110,14 +76,12 @@
</div>
</template>
<script>
import AutoCompletes from '../../../../components/base/AutoCompletes'
import Reason from '../../../../components/base/Reason'
// eslint-disable-next-line no-unused-vars
import http from '../../../../api/http'
import { soilSample } from '../../../../api'
export default {
components: {
AutoCompletes,
Reason
},
data() {
......@@ -170,19 +134,19 @@ export default {
iconMsgSave: [{ type: 'ios-checkmark', id: '', name: '保存' }],
pageColumns: [
{ title: '委托商', key: 'client', width: 180 },
{ title: '委托编号', key: 'entrustCode', width: 180 },
{ title: '试样编号', key: 'sampleCode', width: 180 },
{ title: '试样深度', key: 'sampleDepth', width: 180 },
{ title: '样品包装类型', key: 'samplePack', width: 180 },
{ title: '现场编号', key: 'siteNo', width: 180 },
{ title: '委托编号', key: 'entrustCode', width: 100 },
{ title: '试样编号', key: 'sampleCode', width: 100 },
{ title: '状态', key: 'status', width: 100, status: true },
{ title: '试样深度', key: 'sampleDepth', width: 100 },
{ 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: 'backupLocation', width: 180 },
{ title: '备样数量', key: 'quantity', width: 180 },
{ 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: 'backupUser', width: 140 }
/* {title: '处置方式', key: 'handleMethod', width: 120,}, */
],
conditionList: [],
......@@ -217,9 +181,9 @@ export default {
computed: {
tableHeight: function() {
if (this.searchOpen) {
return this.$tableHeight('', 385)
return this.$tableHeight('', 255)
} else {
return this.$tableHeight('', 300)
return this.$tableHeight('', 220)
}
},
colorComputed() {
......
......@@ -27,81 +27,47 @@
<!--样品数量-->
<!-- 表格 -->
<Col span="24">
<PTVXETable
id="samplePreManage"
ref="pageTable"
:table-height="tableHeight"
:get-page="getPage"
select-data
@on-result-change="_tableResultChange">
<PTVXETableHeight ref="pageTable" :table-height="tableHeight" :loading="true"
:get-page="getPage" @on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:width="item.width"
:min-width="200"
:fixed="item.fixed?item.fixed:undefined"
sortable
>
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<div v-if="item.key==='status'">
{{scope.row[item.key]===undefined?'':scope.row[item.key].display}}
</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>
<span v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</span>
<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 v-else>
<AutoCompletes :value="scope.row.backupPlace" :down-data="locList" name="backupPlace"
placeholder="请输入或选择存储位置" focus show-key="backupPlace"
@on-result-change="_locChange"></AutoCompletes>
<el-input v-model="scope.row.quantity" clearable></el-input>
</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-else>
<el-select v-model="scope.row.storageCondition" clearable style="width:100%" size="small">
<el-option v-for="item in conditionList" :key="item.name" :value="item.name">{{ item.name }}
<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==='handleQuantity'" @click.stop="_handleIndex(scope)">
<div v-else-if="item.key==='backupLocation'" @click.stop="_handleIndex(scope)">
<div v-if="editIndex!==scope.rowIndex">
{{scope.row[item.key]}}{{scope.row['sampleUnit'] &&
scope.row['handleQuantity']?scope.row['sampleUnit']:''}}
{{scope.row[item.key]}}
</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>
<el-input v-model="scope.row.backupLocation" clearable></el-input>
</div>
</div>
<div v-else-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}
</div>
<div v-else>{{scope.row[item.key]}}</div>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
<template slot="col">
<vxe-table-column
:width="80"
title="操作"
align="center"
fixed="right">
<template slot-scope="scope">
<VXEIconList :msg="editIndex===scope.rowIndex?iconMsgSave:iconMsg" :row-data="scope.row"
:row-index="scope.rowIndex" @on-result-change="_iconClick"></VXEIconList>
</template>
</vxe-table-column>
</template>
</PTVXETable>
</PTVXETableHeight>
</Col>
</Row>
</div>
......@@ -110,14 +76,12 @@
</div>
</template>
<script>
import AutoCompletes from '../../../../components/base/AutoCompletes'
import Reason from '../../../../components/base/Reason'
// eslint-disable-next-line no-unused-vars
import http from '../../../../api/http'
import { soilSample } from '../../../../api'
export default {
components: {
AutoCompletes,
Reason
},
data() {
......@@ -170,19 +134,19 @@ export default {
iconMsgSave: [{ type: 'ios-checkmark', id: '', name: '保存' }],
pageColumns: [
{ title: '委托商', key: 'client', width: 180 },
{ title: '委托编号', key: 'entrustCode', width: 180 },
{ title: '试样编号', key: 'sampleCode', width: 180 },
{ title: '试样深度', key: 'sampleDepth', width: 180 },
{ title: '样品包装类型', key: 'samplePack', width: 180 },
{ title: '现场编号', key: 'siteNo', width: 180 },
{ title: '委托编号', key: 'entrustCode', width: 100 },
{ title: '试样编号', key: 'sampleCode', width: 100 },
{ title: '状态', key: 'status', width: 100, status: true },
{ title: '试样深度', key: 'sampleDepth', width: 100 },
{ 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: 'backupLocation', width: 180 },
{ title: '备样数量', key: 'quantity', width: 180 },
{ 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: 'backupUser', width: 140 }
/* {title: '处置方式', key: 'handleMethod', width: 120,}, */
],
conditionList: [],
......@@ -217,9 +181,9 @@ export default {
computed: {
tableHeight: function() {
if (this.searchOpen) {
return this.$tableHeight('', 385)
return this.$tableHeight('', 255)
} else {
return this.$tableHeight('', 300)
return this.$tableHeight('', 220)
}
},
colorComputed() {
......
<template>
<div>
<Modal v-model="showModal" :mask-closable="false" width="100" class="zIndex-1000 full-screen">
<Modal v-model="showModal" :mask-closable="false" :fullscreen="true" width="100" class="zIndex-1000">
<p slot="header">制备</p>
<Row>
<!--操作-->
<Col span="24">
<btn-list :msg="btn" class="contHide" @on-result-change="_btnClick"></btn-list>
<btn-list :msg="btn" @on-result-change="_btnClick" class="contHide"></btn-list>
</Col>
<!--内容-->
<Col span="24">
<PTVXETable
<PTVXETableHeight
ref="pageTable"
:table-height="tableHeight"
:get-page="getPage"
:icon-msg="iconMsg"
:form-id="formId"
@on-result-change="_tableResultChange"
select-data
is-edit
hide-page
@on-result-change="_tableResultChange">
hide-page>
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
......@@ -33,8 +32,8 @@
<template v-slot:edit="scope">
<div v-if="item.key==='prepareWay'" @click="_handleRow(scope)">
<AutoComplete v-model="scope.row.prepareWay" :down-data="preparationWayData" :way-data="wayData"
:handle-obj="scope" clearable placeholder="输入或选择制备方式"
@on-result-change="_preparationChange"></AutoComplete>
:handle-obj="scope" @on-result-change="_preparationChange" clearable
placeholder="输入或选择制备方式"></AutoComplete>
</div>
<div v-else-if="item.key==='unit'" @click="_handleRow(scope)">
<el-input v-model="scope.row.unit" name="unit" placeholder="输入或选择单位">
......@@ -47,13 +46,13 @@
<span v-else-if="item.key==='type'">{{ scope.row[item.key]===0? '检样':'备样' }}</span>
<div v-else-if="item.key==='keepWay'" @click="_handleRow(scope)">
<AutoComplete v-model="scope.row.keepWay" :handle-obj="scope" :down-data="saveWayData"
clearable placeholder="输入或选择保存方式"
show-key="name" @on-result-change="_saveChange"></AutoComplete>
@on-result-change="_saveChange" clearable
placeholder="输入或选择保存方式" show-key="name"></AutoComplete>
</div>
<div v-else-if="item.key==='keepContainer'" @click="_handleRow(scope)">
<AutoComplete v-model="scope.row.keepContainer" :handle-obj="scope" :down-data="packList"
clearable placeholder="输入或选择保存容器"
show-key="name" @on-result-change="_packSaveChange"></AutoComplete>
@on-result-change="_packSaveChange" clearable
placeholder="输入或选择保存容器" show-key="name"></AutoComplete>
</div>
<!-- <div v-else-if="item.key==='prepareDate'" @click="_handleTimeRow(scope)">-->
<!-- <el-date-picker-->
......@@ -62,9 +61,9 @@
<!-- placeholder="选择日期时间">-->
<!-- </el-date-picker>-->
<!-- </div>-->
<div v-else-if="item.key==='prepareDate'">
<Date-picker v-model="scope.row.prepareDate" type="date" format="yyyy-MM-dd HH:mm" style="width:100%;"
placeholder="请选择日期"></Date-picker>
<div v-else-if="item.key==='prepareDate'" @click="_handleRow(scope)">
<el-date-picker @change="timeChange(scope.row)" v-model="scope.row.prepareDate" type="datetime" format="yyyy-MM-dd HH:mm" style="width:100%;"
placeholder="请选择日期"></el-date-picker>
</div>
<!-- <div v-else-if="item.key==='prepareDate' && isAccurate === '是'" @click="_handleRow(scope)">-->
<!-- <date-picker :editable="false" :transfer="true" v-model="scope.row.prepareDate" type="datetime"-->
......@@ -91,48 +90,32 @@
<!-- </el-date-picker>-->
<!-- </div>-->
<div v-else-if="item.key==='preparer'" @click="_handleRow(scope)">
<el-input v-model="scope.row.preparer" placeholder="制备人"
size="small" name="preparer" @focus="_handleRow(scope)"></el-input>
<el-input v-model="scope.row.preparer" @focus="_handleRow(scope)"
placeholder="制备人" size="small" name="preparer"></el-input>
</div>
<div v-else-if="item.key==='remark'" @click="_handleRow(scope)">
<el-input v-model="scope.row.remark" placeholder="备注" size="small"
@focus="_handleRow(scope)"></el-input>
<el-input v-model="scope.row.remark" @focus="_handleRow(scope)" placeholder="备注"
size="small"></el-input>
</div>
<span v-else>{{scope.row[item.key]}}</span>
</template>
<!--只读模板-->
<template v-slot="scope">
<!-- <div v-if="item.key==='prepareDate' && isAccurate === '是'">-->
<!-- <div>-->
<!-- {{scope.row.prepareDate?$dateformat(scope.row.preparationDate,'yyyy-mm-dd HH:MM'):''}}-->
<!-- </div>-->
<!-- </div>-->
<!-- <div v-else-if="item.key==='prepareDate' && isAccurate === '否'">-->
<!-- <div>-->
<!-- {{scope.row.prepareDate?$dateformat(scope.row.preparationDate,'yyyy-mm-dd'):''}}-->
<!-- </div>-->
<!-- </div>-->
<!-- <div v-else-if="item.key==='prepareDate' && !isAccurate">-->
<!-- <div>-->
<!-- {{scope.row.prepareDate?$dateformat(scope.row.preparationDate,'yyyy-mm-dd'):''}}-->
<!-- </div>-->
<!-- </div>-->
<div v-if="item.key==='num'">
<div v-if="scope.row.itemPreparation===0">{{scope.row[item.key]}}</div>
<div v-else-if="scope.row.itemPreparation===1" class="red-color">
{{scope.row[item.key]}}
</div>
</div>
<div v-else-if="item.key==='prepareDate'">
{{scope.row.prepareDate?$dateformat(scope.row.preparationDate,'yyyy-mm-dd HH:MM'):''}}
<div v-else-if="item.date">
{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd HH:MM'):''}}
</div>
<span v-else-if="item.key==='type'">{{ scope.row[item.key]===0? '检样':'余样' }}</span>
<span v-else-if="item.key==='status'">{{ scope.row[item.key].display }}</span>
<div v-else>{{scope.row[item.key]}}</div>
</template>
</vxe-table-column>
</PTVXETable>
</PTVXETableHeight>
</Col>
</Row>
<div slot="footer">
......@@ -171,8 +154,8 @@ export default {
{ type: 'error', id: '', name: '删除' }
],
iconMsg: [
{ type: 'md-create', id: '', name: '批量赋值' },
{ type: 'md-trash', id: '', name: '删除' }
// { type: 'md-create', id: '', name: '批量赋值' },
// { type: 'md-trash', id: '', name: '删除' }
],
getPage: {
records: []
......@@ -206,6 +189,7 @@ export default {
title: '制备时间',
key: 'prepareDate',
width: 200,
date: true,
editCell: true
},
{
......@@ -313,7 +297,9 @@ export default {
},
timeChange(data) {
console.log(data)
this.currentRow.prepareDate = data
this.$forceUpdate()
this.currentRow.prepareDate = data.prepareDate
console.log(this.getPage.records)
},
_packSaveChange(msg, data, handleObj) {
this._handleRow(handleObj)
......@@ -625,6 +611,8 @@ export default {
},
// 操作的序号
_handleRow(data) {
console.log(data)
this.currentIndex = data.index
this.currentRow = data.row
},
_handleTimeRow(data) {
......
......@@ -94,16 +94,6 @@ export default {
id: '',
name: '管理样品'
},
// {
// type: 'ios-list',
// id: '',
// name: '项目管理'
// },
// {
// type: 'md-create',
// id: '',
// name: '编辑协议'
// },
{ type: 'md-cloud', id: '', name: '附件' },
{
type: 'ios-clock',
......
......@@ -7,8 +7,8 @@
<Col span="24" style="padding-bottom: 5px">
<Form v-show="searchOpen" id="search-wait-scan" :label-width="90" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="样品编号:" class="search-item">
<Input v-model="formObj.sampleCode" name="sampleCode" placeholder="请输入样品编号" clearable @on-enter="_formSearch"></Input>
<Form-item label="试样编号:" class="search-item">
<Input v-model="formObj.sampleCode" name="sampleCode" placeholder="请输入试样编号" clearable @on-enter="_formSearch"></Input>
<input name="entrustId" type="hidden">
</Form-item>
<Form-item class="search-btn">
......@@ -18,15 +18,10 @@
</Col>
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" class="contHide" @on-result-change="_btnClick">
<!--<template slot="processTask">-->
<!--<div class="fr process-task">-->
<!--<Button @click="_exportReceiveRecord">导出交接记录</Button>-->
<!--</div>-->
<!--</template>-->
</btn-list>
</Col>
<Col span="24">
<PTVXETable
<PTVXETableHeight
ref="pageTable"
:table-height="tableHeight"
:get-page="getPage"
......@@ -50,7 +45,7 @@
<div v-else>{{scope.row[item.key]}}</div>
</template>
</vxe-table-column>
</PTVXETable>
</PTVXETableHeight>
</Col>
</Row>
</div>
......@@ -68,11 +63,11 @@ export default {
selectIds: [],
getPage: {},
pageColumns: [
{ title: '试样编号', key: 'sampleCode', width: 160, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 160 },
{ title: '土质描述', key: 'sampleDescribe', width: 160 },
{ title: '样品包装类型', key: 'samplePack', width: 160 },
{ title: '现场编号', key: 'siteNo', width: 130 }
{ title: '试样编号', key: 'sampleCode', width: 100, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 95 },
{ title: '现场编号', key: 'siteNo', width: 100 },
{ title: '土质描述', key: 'sampleDescribe', width: 185 },
{ title: '样品包装类型', key: 'samplePack', width: 120 }
],
iconMsg: [
{ type: 'md-create', id: '', name: '编辑' },
......@@ -159,6 +154,7 @@ export default {
},
_page: async function() {
const result = await soilEntrust.pageSendHis(this.formObj)
console.log(this.formObj)
if (result) {
this.$refs.pageTable._hideLoading()
this.getPage = result
......
<template>
<div>
<Modal v-model="showSampleModal" @on-visible-change="_visibleChange" width="1200"
<Modal v-model="showSampleModal" @on-visible-change="_visibleChange" width="818"
class="zIndex-900 modal-footer-none">
<p slot="header"> {{name}}--管理样品</p>
<div>
......
<template>
<div>
<Modal v-model="showSampleModal" @on-visible-change="_visibleChange" width="1200"
<Modal v-model="showSampleModal" @on-visible-change="_visibleChange" width="818"
class="zIndex-900 modal-footer-none">
<p slot="header"> {{name}}--管理样品</p>
<div>
......
......@@ -7,12 +7,8 @@
<Col span="24" style="padding-bottom: 5px">
<Form id="search-wait" :label-width="90" v-show="searchOpen" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="样品名称:" class="search-item">
<Input @on-enter="_formSearch" v-model="formObj.name" name="name" placeholder="请输入样品名称" clearable></Input>
</Form-item>
<Form-item label="样品编号:" class="search-item">
<Input @on-enter="_formSearch" v-model="formObj.num" name="num" placeholder="请输入样品编号" clearable></Input>
<input name="contractId" type="hidden">
<Form-item label="试样编号:" class="search-item">
<Input @on-enter="_formSearch" v-model="formObj.sampleCode" name="sampleCode" placeholder="请输入试样编号" clearable></Input>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
......@@ -21,15 +17,10 @@
</Col>
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" @on-result-change="_btnClick" :show-search-btn="true" class="contHide">
<!--<template slot="processTask">-->
<!--<div class="fr process-task">-->
<!--<Button @click="_exportReceiveRecord">导出交接记录</Button>-->
<!--</div>-->
<!--</template>-->
</btn-list>
</Col>
<Col span="24">
<PTVXETable
<PTVXETableHeight
ref="pageTable"
:tableHeight="tableHeight"
@on-result-change="_tableResultChange"
......@@ -41,7 +32,7 @@
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined"
sortable
>
......@@ -54,7 +45,7 @@
<div v-else>{{scope.row[item.key]}}</div>
</template>
</vxe-table-column>
</PTVXETable>
</PTVXETableHeight>
</Col>
</Row>
</div>
......@@ -75,11 +66,11 @@ export default {
selectIds: [],
getPage: {},
pageColumns: [
{ title: '试样编号', key: 'sampleCode', width: 160, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 160 },
{ title: '土质描述', key: 'sampleDescribe', width: 160 },
{ title: '样品包装类型', key: 'samplePack', width: 160 },
{ title: '现场编号', key: 'siteNo', width: 130 }
{ title: '试样编号', key: 'sampleCode', width: 100, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 95 },
{ title: '现场编号', key: 'siteNo', width: 100 },
{ title: '土质描述', key: 'sampleDescribe', width: 185 },
{ title: '样品包装类型', key: 'samplePack', width: 120 }
],
iconMsg: [{ type: 'ios-list', id: '', name: '试验项目' }],
type: '',
......
......@@ -7,11 +7,8 @@
<Col span="24" style="padding-bottom: 5px">
<Form v-show="searchOpen" id="search-wait" :label-width="90" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="样品名称:" class="search-item">
<Input v-model="formObj.name" name="name" placeholder="请输入样品名称" clearable @on-enter="_formSearch"></Input>
</Form-item>
<Form-item label="样品编号:" class="search-item">
<Input v-model="formObj.sampleCode" name="sampleCode" placeholder="请输入样品编号" clearable @on-enter="_formSearch"></Input>
<Form-item label="试样编号:" class="search-item">
<Input v-model="formObj.sampleCode" name="sampleCode" placeholder="请输入试样编号" clearable @on-enter="_formSearch"></Input>
<input name="entrustId" type="hidden">
</Form-item>
<Form-item class="search-btn">
......@@ -29,7 +26,7 @@
</btn-list>
</Col>
<Col span="24">
<PTVXETable
<PTVXETableHeight
ref="pageTable"
:table-height="tableHeight"
:get-page="getPage"
......@@ -54,7 +51,7 @@
<div v-else>{{scope.row[item.key]}}</div>
</template>
</vxe-table-column>
</PTVXETable>
</PTVXETableHeight>
</Col>
</Row>
</div>
......@@ -77,11 +74,11 @@ export default {
selectIds: [],
getPage: {},
pageColumns: [
{ title: '试样编号', key: 'sampleCode', width: 160, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 160 },
{ title: '土质描述', key: 'sampleDescribe', width: 160 },
{ title: '样品包装类型', key: 'samplePack', width: 160 },
{ title: '现场编号', key: 'siteNo', width: 130 }
{ title: '试样编号', key: 'sampleCode', width: 100, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 95 },
{ title: '现场编号', key: 'siteNo', width: 100 },
{ title: '土质描述', key: 'sampleDescribe', width: 185 },
{ title: '样品包装类型', key: 'samplePack', width: 120 }
],
iconMsg: [{ type: 'ios-list', id: '', name: '试验项目' }],
type: '',
......
......@@ -7,12 +7,8 @@
<Col span="24" style="padding-bottom: 5px">
<Form id="search-wait-scan" :label-width="90" v-show="searchOpen" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="样品名称:" class="search-item">
<Input @on-enter="_formSearch" v-model="formObj.name" name="name" placeholder="请输入样品名称" clearable></Input>
</Form-item>
<Form-item label="样品编号:" class="search-item">
<Input @on-enter="_formSearch" v-model="formObj.num" name="num" placeholder="请输入样品编号" clearable></Input>
<input name="contractId" type="hidden">
<Form-item label="试样编号:" class="search-item">
<Input @on-enter="_formSearch" v-model="formObj.sampleCode" name="sampleCode" placeholder="请输入样品编号" clearable></Input>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
......@@ -29,7 +25,7 @@
</btn-list>
</Col>
<Col span="24">
<PTVXETable
<PTVXETableHeight
ref="pageTable"
:tableHeight="tableHeight"
@on-result-change="_tableResultChange"
......@@ -53,7 +49,7 @@
<div v-else>{{scope.row[item.key]}}</div>
</template>
</vxe-table-column>
</PTVXETable>
</PTVXETableHeight>
</Col>
</Row>
</div>
......@@ -71,11 +67,11 @@ export default {
selectIds: [],
getPage: {},
pageColumns: [
{ title: '试样编号', key: 'sampleCode', width: 160, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 160 },
{ title: '土质描述', key: 'sampleDescribe', width: 160 },
{ title: '样品包装类型', key: 'samplePack', width: 160 },
{ title: '现场编号', key: 'siteNo', width: 130 }
{ title: '试样编号', key: 'sampleCode', width: 100, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 95 },
{ title: '现场编号', key: 'siteNo', width: 100 },
{ title: '土质描述', key: 'sampleDescribe', width: 185 },
{ title: '样品包装类型', key: 'samplePack', width: 120 }
],
iconMsg: [
{ type: 'md-create', id: '', name: '编辑' },
......
......@@ -27,81 +27,22 @@
<!--样品数量-->
<!-- 表格 -->
<Col span="24">
<PTVXETable
id="samplePreManage"
ref="pageTable"
:tableHeight="tableHeight"
:getPage="getPage"
@on-result-change="_tableResultChange"
select-data>
<PTVXETableHeight ref="pageTable" :table-height="tableHeight" :loading="true"
:get-page="getPage" @on-result-change="_tableResultChange" select-data>
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:width="item.width"
:min-width="200"
:fixed="item.fixed?item.fixed:undefined"
sortable
>
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<div v-if="item.key==='status'">
{{scope.row[item.key]===undefined?'':scope.row[item.key].display}}
</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>
<AutoCompletes :value="scope.row.backupPlace" :downData="locList" @on-result-change="_locChange"
name="backupPlace" placeholder="请输入或选择存储位置" focus
show-key="backupPlace"></AutoCompletes>
</div>
</div>
<div v-else-if="item.key==='storageCondition'" @click.stop="_handleIndex(scope)">
<div v-if="editIndex!==scope.rowIndex">{{scope.row[item.key]}}</div>
<div v-else>
<el-select v-model="scope.row.storageCondition" 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==='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.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}
</div>
<div v-else>{{scope.row[item.key]}}</div>
<span v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</span>
<span v-else-if="item.status">{{scope.row[item.key].display}}</span>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
<template slot="col">
<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>
</PTVXETableHeight>
</Col>
</Row>
</div>
......@@ -110,14 +51,12 @@
</div>
</template>
<script>
import AutoCompletes from '../../../../components/base/AutoCompletes'
import Reason from '../../../../components/base/Reason'
// eslint-disable-next-line no-unused-vars
import http from '../../../../api/http'
import { soilSample } from '../../../../api'
export default {
components: {
AutoCompletes,
Reason
},
data() {
......@@ -169,20 +108,14 @@ export default {
],
iconMsgSave: [{ type: 'ios-checkmark', id: '', name: '保存' }],
pageColumns: [
{ title: '委托商', key: 'client', width: 180 },
{ title: '委托编号', key: 'entrustCode', width: 180 },
{ title: '试样编号', key: 'sampleCode', width: 180 },
{ title: '试样深度', key: 'sampleDepth', width: 180 },
{ title: '样品包装类型', key: 'samplePack', width: 180 },
{ title: '现场编号', key: 'siteNo', width: 180 },
{ title: '存储条件', key: 'conditions', width: 180 },
{ title: '备样位置', key: 'backupLocation', width: 180 },
{ title: '备样数量', key: 'quantity', width: 180 },
{ 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: 'sampleCode', width: 150 },
{ title: '状态', key: 'status', status: true, width: 100 },
{ title: '包装类型', key: 'samplePack', width: 100 },
{ title: '保存容器', key: 'keepContainer', width: 100 },
{ title: '制备数量', key: 'quantity', width: 100 },
{ title: '单位', key: 'unit', width: 70 },
{ title: '制备人', key: 'preparer', width: 130 },
{ title: '制备时间', key: 'prepareDate', date: true, width: 130 }
/* {title: '处置方式', key: 'handleMethod', width: 120,}, */
],
conditionList: [],
......@@ -217,9 +150,9 @@ export default {
computed: {
tableHeight: function() {
if (this.searchOpen) {
return this.$tableHeight('', 385)
return this.$tableHeight('', 255)
} else {
return this.$tableHeight('', 300)
return this.$tableHeight('', 220)
}
},
colorComputed() {
......
......@@ -8,27 +8,9 @@
<Col span="24">
<Form id="search-form-query" :label-width="80" v-show="searchOpen" inline onsubmit="return false">
<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;">
<Input @on-enter="_formSearch" name="cname" placeholder="请输入委托单位" clearable/>
</Form-item>
<Form-item class="search-item" label="委托名称:">
<Input @on-enter="_formSearch" name="contractName" placeholder="请输入委托名称" clearable/>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
</Form-item>
......@@ -40,48 +22,22 @@
</Col>
<!-- 表格 -->
<Col span="24">
<!--<ElementTable :tableHeight="tableHeight" @on-result-change="_tableResultChange"-->
<!--ref="pageTable" :getPage="getPage" id="perSampleQuery" selectData>-->
<!--<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>
<PTVXETableHeight ref="pageTable" :table-height="tableHeight" :loading="true"
:get-page="getPage" @on-result-change="_tableResultChange" select-data>
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined"
v-for="item in pageColumns"
:key="item.key" sortable>
:fixed="item.fixed?item.fixed:undefined" sortable>
<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>
<span v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</span>
<span v-else-if="item.status">{{scope.row[item.key].display}}</span>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
</PTVXETable>
</PTVXETableHeight>
</Col>
</Row>
</div>
......@@ -107,23 +63,14 @@ export default {
}
],
pageColumns: [
{ title: '样品编号', key: 'sampleSn', width: 180 },
{ title: '样品名称', key: 'sampleName', width: 140 },
{ title: '状态', key: 'progress', width: 110, status: true },
{ title: '存储期限', key: 'endDate', width: 120, date: true },
{ title: '委托单位', key: 'cname', width: 140 },
{ title: '委托名称', key: 'contractName', width: 170 },
{ title: '处置方式', key: 'handleMethod', width: 120 },
{ title: '处理人', key: 'handlePerson', width: 100 },
{ title: '处理时间', key: 'handleTime', width: 120, date: true },
{ title: '处理申请人', key: 'applyer', width: 120 },
{ title: '申请时间', key: 'applyDate', width: 120, date: true },
{ title: '存储位置', key: 'backupPlace', width: 100 },
{ title: '存储条件', key: 'storageCondition', width: 120 },
{ title: '样品数量', key: 'quantity', width: 100 },
{ title: '备样数量', key: 'sampleQuantity', width: 100 },
{ title: '样品备注', key: 'sampleRemark' },
{ title: '委托备注', key: 'contractRemark' }
{ title: '试样编号', key: 'sampleCode', width: 150 },
{ title: '状态', key: 'status', status: true, width: 100 },
{ title: '包装类型', key: 'samplePack', width: 100 },
{ title: '保存容器', key: 'keepContainer', width: 100 },
{ title: '制备数量', key: 'quantity', width: 100 },
{ title: '单位', key: 'unit', width: 70 },
{ title: '制备人', key: 'preparer', width: 130 },
{ title: '制备时间', key: 'prepareDate', date: true, width: 130 }
],
searchOpen: false,
getPage: {},
......@@ -135,9 +82,9 @@ export default {
computed: {
tableHeight: function() {
if (this.searchOpen) {
return this.$tableHeight('tabSearchTwo')
return this.$tableHeight('', 255)
} else {
return this.$tableHeight('tabNoSearch')
return this.$tableHeight('', 220)
}
}
},
......
<template>
<div>
<Modal v-model="showSampleModal" width="1200"
<Modal v-model="showSampleModal" width="818"
class="zIndex-900 modal-footer-none">
<div>
<!--内容-->
......@@ -40,7 +40,7 @@
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined"
sortable
>
......@@ -73,11 +73,11 @@ export default {
selectIds: [],
getPage: {},
pageColumns: [
{ title: '试样编号', key: 'sampleCode', width: 160, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 160 },
{ title: '土质描述', key: 'sampleDescribe', width: 160 },
{ title: '样品包装类型', key: 'samplePack', width: 160 },
{ title: '现场编号', key: 'siteNo', width: 130 }
{ title: '试样编号', key: 'sampleCode', width: 100, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 95 },
{ title: '现场编号', key: 'siteNo', width: 100 },
{ title: '土质描述', key: 'sampleDescribe', width: 185 },
{ title: '样品包装类型', key: 'samplePack', width: 120 }
],
iconMsg: [{ type: 'ios-list', id: '', name: '试验项目' }],
type: '',
......
......@@ -87,8 +87,15 @@ export default {
},
mounted() {
// this._dicSearch()
this._getDisposeWay()
},
methods: {
_getDisposeWay: async function() {
const result = await soilSample.getDictList('土工处理方式')
if (result) {
this.handleWayList = result
}
},
_selectPerson() {
this.$refs.personModal._openGoup('申请人', 'itemTree')
},
......
......@@ -27,81 +27,41 @@
<!--样品数量-->
<!-- 表格 -->
<Col span="24">
<PTVXETable
id="samplePreManage"
ref="pageTable"
:tableHeight="tableHeight"
:getPage="getPage"
@on-result-change="_tableResultChange"
select-data>
<PTVXETableHeight ref="pageTable" :table-height="tableHeight" :loading="true"
:get-page="getPage" @on-result-change="_tableResultChange" select-data>
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:width="item.width"
:min-width="200"
:fixed="item.fixed?item.fixed:undefined"
sortable
>
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<div v-if="item.key==='status'">
{{scope.row[item.key]===undefined?'':scope.row[item.key].display}}
</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>
<AutoCompletes :value="scope.row.backupPlace" :downData="locList" @on-result-change="_locChange"
name="backupPlace" placeholder="请输入或选择存储位置" focus
show-key="backupPlace"></AutoCompletes>
</div>
</div>
<div v-else-if="item.key==='storageCondition'" @click.stop="_handleIndex(scope)">
<span v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</span>
<span v-else-if="item.status">{{scope.row[item.key].display}}</span>
<div v-else-if="item.key==='keepContainer'">
<div v-if="editIndex!==scope.rowIndex">{{scope.row[item.key]}}</div>
<div v-else>
<el-select v-model="scope.row.storageCondition" clearable style="width:100%" size="small">
<el-option v-for="item in conditionList" :value="item.name" :key="item.name">{{ item.name }}
<el-select v-model="scope.row.keepContainer" clearable style="width:100%" size="small">
<el-option v-for="item in containerList" :value="item.name" :key="item.name">{{ item.name }}
</el-option>
</el-select>
</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.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}
</div>
<div v-else>{{scope.row[item.key]}}</div>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
<vxe-table-column
slot="col"
: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 slot="col">
<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>
</PTVXETableHeight>
</Col>
</Row>
</div>
......@@ -112,14 +72,12 @@
</template>
<script>
import SampleParpareApply from '../SurplusParpareApply'
import AutoCompletes from '../../../../components/base/AutoCompletes'
// eslint-disable-next-line no-unused-vars
import http from '../../../../api/http'
import { soilSample } from '../../../../api'
import Operation from '../../../../components/operation/Operation'
export default {
components: {
AutoCompletes,
SampleParpareApply,
Operation
},
......@@ -174,16 +132,20 @@ export default {
],
iconMsgSave: [{ type: 'ios-checkmark', id: '', name: '保存' }],
pageColumns: [
{ title: '试样编号', key: 'sampleCode' },
{ title: '状态', key: 'status' },
{ title: '包装类型', key: 'samplePack' },
{ title: '制备数量', key: 'quantity' },
{ title: '单位', key: 'unit' }
{ title: '试样编号', key: 'sampleCode', width: 150 },
{ title: '状态', key: 'status', status: true, width: 100 },
{ title: '包装类型', key: 'samplePack', width: 100 },
{ title: '保存容器', key: 'keepContainer', width: 150 },
{ title: '制备数量', key: 'quantity', width: 100 },
{ title: '单位', key: 'unit', width: 70 },
{ title: '制备人', key: 'preparer', width: 130 },
{ title: '制备时间', key: 'prepareDate', date: true, width: 130 }
// { title: '备注', key: 'remark', width: 130 }
/* {title: '处置方式', key: 'handleMethod', width: 120,}, */
],
conditionList: [],
locList: [],
containerList: [],
currentIndex: -1,
editIndex: -1,
endDateBegin: '',
......@@ -214,9 +176,9 @@ export default {
computed: {
tableHeight: function() {
if (this.searchOpen) {
return this.$tableHeight('', 385)
return this.$tableHeight('', 255)
} else {
return this.$tableHeight('', 300)
return this.$tableHeight('', 220)
}
},
colorComputed() {
......@@ -239,6 +201,7 @@ export default {
// this._getLocList()
// this._getConditionList()
// this._getBackUpCount()
this._getContainerList()
},
methods: {
// 签发日期
......@@ -251,6 +214,12 @@ export default {
this._page()
// this._getBackUpCount()
},
_getContainerList: async function() {
const result = await soilSample.getDictList('保存容器')
if (result) {
this.containerList = result
}
},
// 查询卡片备样数量
_getBackUpCount() {
this.$store.dispatch('FoodSampleBackup/backUpCount').then(() => {
......@@ -272,23 +241,22 @@ export default {
},
_save() {
this.$nextTick(function() {
const data = {
ids: this.getPage.records[this.currentIndex].id,
backupPlace: this.getPage.records[this.currentIndex].backupPlace,
storageCondition: this.getPage.records[this.currentIndex]
.storageCondition,
endDate: this.getPage.records[this.currentIndex].endDate,
handleQuantity: this.getPage.records[this.currentIndex].handleQuantity
const tempData = {
keepContainer: this.getPage.records[this.currentIndex].keepContainer
}
this.$store.dispatch('FoodSampleBackup/batchEdit', data).then(() => {
if (this.$store.state.FoodSampleBackup.success) {
} else {
this.$msgTip('error', '保存失败!')
}
this._relPage()
this._saveOk({
id: this.getPage.records[this.currentIndex].id,
obj: tempData
})
})
},
_saveOk: async function(data) {
console.log(data)
const result = await soilSample.editPrepare(data)
if (result) {
this.$Message.success('编辑成功')
}
},
_iconClick(res, data, componentName, index) {
this.currentIndex = index
switch (res) {
......@@ -304,7 +272,7 @@ export default {
// // 非空情况下格式化赋值,如果不判断会格式化为当天的日期
// this._endDateChange(this.$dateformat(data.endDate, 'yyyy-mm-dd'))
// }
// this._save()
this._save()
this.editIndex = -1
break
}
......
......@@ -22,29 +22,32 @@
</Col>
<!-- 表格 -->
<Col span="24">
<PTVXETable id="perSampleQuery" ref="pageTable"
:tableHeight="tableHeight" :icon-msg="iconMsg" @on-result-change="_tableResultChange" :getPage="getPage" select-data>
<PTVXETableHeight ref="pageTable" :table-height="tableHeight" :loading="true"
:get-page="getPage" @on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined"
v-for="item in pageColumns"
:key="item.key" sortable>
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<span v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</span>
<span v-else-if="item.status">{{scope.row[item.key].display}}</span>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
<vxe-table-column
slot="col"
:width="80"
title="操作"
align="center"
fixed="right">
<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==='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>
<VXEIconList :msg="editIndex===scope.rowIndex?iconMsgSave:iconMsg" @on-result-change="_iconClick" :rowData="scope.row" :rowIndex="scope.rowIndex"></VXEIconList>
</template>
</vxe-table-column>
</PTVXETable>
</PTVXETableHeight>
</Col>
</Row>
</div>
......@@ -82,11 +85,14 @@ export default {
}
],
pageColumns: [
{ title: '试样编号', key: 'sampleCode' },
{ title: '状态', key: 'status' },
{ title: '包装类型', key: 'samplePack' },
{ title: '制备数量', key: 'quantity' },
{ title: '单位', key: 'unit' }
{ title: '试样编号', key: 'sampleCode', width: 150 },
{ title: '状态', key: 'status', status: true, width: 100 },
{ title: '包装类型', key: 'samplePack', width: 100 },
{ title: '保存容器', key: 'keepContainer', width: 100 },
{ title: '制备数量', key: 'quantity', width: 100 },
{ title: '单位', key: 'unit', width: 70 },
{ title: '制备人', key: 'preparer', width: 130 },
{ title: '制备时间', key: 'prepareDate', date: true, width: 130 }
],
searchOpen: false,
getPage: {},
......@@ -98,9 +104,9 @@ export default {
computed: {
tableHeight: function() {
if (this.searchOpen) {
return this.$tableHeight('tabSearchTwo')
return this.$tableHeight('', 255)
} else {
return this.$tableHeight('tabNoSearch')
return this.$tableHeight('', 220)
}
}
},
......
......@@ -8,11 +8,8 @@
<Col span="24">
<Form id="search-form-rel-sample" :label-width="80" v-show="searchOpen" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="样品编号:">
<Input @on-enter="_formSearch" v-model="formObj.num" name="num" placeholder="请输入样品编号" clearable></Input>
</Form-item>
<Form-item class="search-item" label="样品名称:">
<Input @on-enter="_formSearch" v-model="formObj.name" name="name" placeholder="请输入样品名称" clearable></Input>
<Form-item class="search-item" label="试样编号:">
<Input @on-enter="_formSearch" v-model="formObj.sampleCode" name="sampleCode" placeholder="请输入试样编号" clearable></Input>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
......@@ -135,7 +132,7 @@ export default {
getPage: {},
pageColumns: [
{ title: '委托商', key: 'client', width: 200 },
{ title: '试样编号', key: 'entrustCode', width: 120 },
{ title: '试样编号', key: 'sampleCode', width: 120 },
{ title: '委托日期', key: 'entrustDate', width: 120, date: true },
{ title: '钻孔位置', key: 'boreholeLocation', width: 120 },
{ title: '水深(米)', key: 'waterDepth', width: 120 },
......
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