Commit bfc44237 by lichengming

添加了实验室领样管理样品科室筛选查询条件

parent d44943bf
...@@ -16,6 +16,16 @@ ...@@ -16,6 +16,16 @@
<Input v-model="formObj.sampleCode" @on-enter="_formSearch" name="sampleCode" placeholder="请输入样品编号" clearable></Input> <Input v-model="formObj.sampleCode" @on-enter="_formSearch" name="sampleCode" placeholder="请输入样品编号" clearable></Input>
<input name="contractId" type="hidden"> <input name="contractId" type="hidden">
</Form-item> </Form-item>
<Form-item label="试验科室:" class="search-item">
<el-select v-model="formObj.groupId" @change="_selGroup" 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"> <Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button> <Button @click="_formSearch" type="primary">搜索</Button>
</Form-item> </Form-item>
...@@ -66,7 +76,7 @@ ...@@ -66,7 +76,7 @@
</div> </div>
</template> </template>
<script> <script>
import { soilEntrust, soilSample } from '../../../api' import { soilAptitude, soilEntrust, soilSample } from '../../../api'
import ItemManage from './ItemManage' import ItemManage from './ItemManage'
export default { export default {
components: { ItemManage }, components: { ItemManage },
...@@ -75,6 +85,7 @@ export default { ...@@ -75,6 +85,7 @@ export default {
btn: [{ type: 'primary', id: '', name: '领样' }], btn: [{ type: 'primary', id: '', name: '领样' }],
selectIds: [], selectIds: [],
getPage: {}, getPage: {},
groupoptions: [],
pageColumns: [ pageColumns: [
{ title: '试样编号', key: 'sampleCode', width: 100, fixed: 'left' }, { title: '试样编号', key: 'sampleCode', width: 100, fixed: 'left' },
{ title: '试样深度', key: 'sampleDepth', width: 95 }, { title: '试样深度', key: 'sampleDepth', width: 95 },
...@@ -109,6 +120,16 @@ export default { ...@@ -109,6 +120,16 @@ export default {
_selectSampleLink(data) { _selectSampleLink(data) {
console.log(data) console.log(data)
}, },
_getGroupList: async function() {
const result = await soilAptitude.getGroupList()
if (result) {
this.groupoptions = result
}
},
_selGroup(data) {
console.log(data)
this.formObj.groupId = data
},
// 组件返回值 // 组件返回值
_componentResult(data, msg) { _componentResult(data, msg) {
switch (this.currentComponent) { switch (this.currentComponent) {
...@@ -133,6 +154,7 @@ export default { ...@@ -133,6 +154,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this._page() this._page()
}) })
this._getGroupList()
}, },
_page: async function() { _page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
......
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