Commit b1946a80 by lichengming

修改了收样室根据试验室查询

parent 2251404f
...@@ -19,7 +19,14 @@ ...@@ -19,7 +19,14 @@
<Input @on-enter="_formSearch" v-model="formObj.experimentNames" name="experimentNames" placeholder="请输入试验项目" clearable></Input> <Input @on-enter="_formSearch" v-model="formObj.experimentNames" name="experimentNames" placeholder="请输入试验项目" clearable></Input>
</Form-item> </Form-item>
<Form-item label="试验科室:" class="search-item"> <Form-item label="试验科室:" class="search-item">
<Input @on-enter="_formSearch" v-model="formObj.groupName" name="groupName" placeholder="请输入试验科室" clearable></Input> <el-select @change="_selGroup" v-model="formObj.groupId" placeholder="请选择" clearable style="width: 100%">
<el-option
v-for="(item,index) in groupoptions"
:key="index"
:label="item.name"
:value="item.id"
/>
</el-select>
</Form-item> </Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button> <Button @click="_formSearch" type="primary">搜索</Button>
...@@ -68,7 +75,7 @@ ...@@ -68,7 +75,7 @@
</div> </div>
</template> </template>
<script> <script>
import { soilEntrust, soilSample } from '../../../../api' import { soilAptitude, soilEntrust, soilSample } from '../../../../api'
import SampleReceiveModal from '../SampleReceiveModal' import SampleReceiveModal from '../SampleReceiveModal'
import SampleItemSelect from './SampleItemSelect' import SampleItemSelect from './SampleItemSelect'
import SoilSampleItemManage from './SoilSampleItemManage' import SoilSampleItemManage from './SoilSampleItemManage'
...@@ -87,6 +94,7 @@ export default { ...@@ -87,6 +94,7 @@ export default {
{ type: 'primary', id: '', name: '样品留存' }, { type: 'primary', id: '', name: '样品留存' },
{ type: 'primary', id: '', name: '导入试验项目' } { type: 'primary', id: '', name: '导入试验项目' }
], ],
groupoptions: [],
selectIds: [], selectIds: [],
getPage: {}, getPage: {},
itemData: [ itemData: [
...@@ -122,7 +130,8 @@ export default { ...@@ -122,7 +130,8 @@ export default {
standard: '', standard: '',
samplingLinkList: [], samplingLinkList: [],
haveExp: undefined, haveExp: undefined,
groupName: undefined groupName: undefined,
groupId: undefined
}, },
stdList: [], stdList: [],
sampleLinkList: [ sampleLinkList: [
...@@ -179,6 +188,10 @@ export default { ...@@ -179,6 +188,10 @@ export default {
_selectSampleLink(data) { _selectSampleLink(data) {
console.log(data) console.log(data)
}, },
_selGroup(data) {
console.log(data)
this.formObj.groupId = data
},
// 组件返回值 // 组件返回值
_componentResult(data, msg) { _componentResult(data, msg) {
switch (this.currentComponent) { switch (this.currentComponent) {
...@@ -193,6 +206,12 @@ export default { ...@@ -193,6 +206,12 @@ export default {
this._search() this._search()
} }
}, },
_getGroupList: async function() {
const result = await soilAptitude.getGroupList()
if (result) {
this.groupoptions = result
}
},
_detailModal(id) { _detailModal(id) {
// 查看 // 查看
if (this.type === 0) { if (this.type === 0) {
...@@ -221,6 +240,7 @@ export default { ...@@ -221,6 +240,7 @@ export default {
this.selectIds = [] this.selectIds = []
this.saveWayList = [] this.saveWayList = []
this.saveWayString = '' this.saveWayString = ''
this._getGroupList()
this.$nextTick(() => { this.$nextTick(() => {
this._page() this._page()
}) })
......
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