Commit b1946a80 by lichengming

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

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