Commit fc2ecdef by lichengming

添加了开土制备制备页面按制备类型查询下拉

parent 2f1de5de
......@@ -3,6 +3,19 @@
<Modal v-model="showModal" :mask-closable="false" :fullscreen="true" width="100" class="zIndex-1000">
<p slot="header">制备</p>
<Row>
<Col span="24">
<Form id="search-form" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="制备类型:" class="search-item">
<Select v-model="formObj.type" clearable name="type" style="width:150px" placeholder="请选择制备类型">
<Option v-for="(item,index) in typeData" :value="item.value" :key="index">{{item.name}}</Option>
</Select>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col span="24">
<btn-list :msg="btn" @on-result-change="_btnClick" class="contHide"></btn-list>
......@@ -141,6 +154,16 @@ export default {
formObj: {},
tableHeight: document.documentElement.clientHeight - 215,
footerList: [],
typeData: [
{
name: '检样',
value: 0
},
{
name: '余样',
value: 1
}
],
list: [
{ name: '取消', type: '', id: '' },
{ name: '制备完成', type: 'primary', id: '' }
......@@ -229,14 +252,15 @@ export default {
this.$refs.pageTable._showLoading()
},
methods: {
_formSearch() {
this.$refs.pageTable._pageChange(1)
},
inputChange(data) {
this.$forceUpdate()
this.getPage.records[data.$rowIndex].printNum = data.row.printNum
},
_printResult(data) {
console.log(data)
if (data) {
console.log('data.printerVal')
this.printerVal = data.printerVal
this._getLabelInfo()
}
......@@ -272,17 +296,13 @@ export default {
_getUserList: async function() {
const result = await soilSample.getUserList()
if (result) {
console.log('result==============', result)
for (let i = 0; i < result.records.length; i++) {
this.preparerList.push(result.records[i].realname)
}
console.log(this.preparerList)
}
},
backData(data) {
this.$forceUpdate()
console.log(data)
console.log(this.selectData)
for (let i = 0; i < this.selectData.length; i++) {
Object.assign(this.selectData[i], data)
}
......@@ -340,7 +360,12 @@ export default {
this._getUserList()
},
_page: async function() {
const result = await soilEntrust.preparePage({ ids: this.sampleIds })
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
this.formObj.ids = this.sampleIds
// const result = await soilEntrust.preparePage({ ids: this.sampleIds })
const result = await soilEntrust.preparePage(
this.$serializeForm(this.formObj)
)
if (result) {
this.getPage.records = result
for (let j = 0; j < result.length; j++) {
......@@ -348,6 +373,17 @@ export default {
this.getPage.records[j].printNum = 1
}
this.$refs.pageTable._hideLoading()
console.log('this.formObj.type', this.formObj.type)
if (this.formObj.type !== undefined && this.formObj.type !== '') {
console.log('调了')
const arr = []
for (let i = 0; i < this.getPage.records.length; i++) {
if (this.getPage.records[i].type === Number(this.formObj.type)) {
arr.push(this.getPage.records[i])
}
}
this.getPage.records = arr
}
}
},
_getPrepareWay: async function() {
......@@ -444,6 +480,9 @@ export default {
data.rowIndex
)
break
case 'changeSize':
this._page()
break
}
},
_getLabelInfo: async function() {
......
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