Commit b665f9e1 by lichengming

修改了委托单管理的页码和查询

parent ad142f26
......@@ -9,14 +9,6 @@
<Col span="24">
<Form id="test-item-form" :label-width="90" inline onsubmit="return false">
<label class="label-sign" />
<Form-item :label-width="70" label="授权资质仪器名称" >
<Input
v-model="code"
@on-enter="_pageChange(1)"
placeholder="授权资质仪器名称"
style="width: 100%"
/>
</Form-item>
<Form-item label="检测依据名称">
<Input
v-model="name"
......@@ -56,8 +48,8 @@
</Col>
<Col span="24">
<Page
:total="getPage.total"
:page-size="getPage.size"
:total="total"
:page-size="size"
@on-change="_pageChange"
@on-page-size-change="_pageRows"
placement="top"
......@@ -93,6 +85,8 @@ export default {
},
loading: true,
pageParams: { rows: 20 },
total: 0,
size: 0,
pageColumns: [
{ title: '检定依据', key: 'verification', width: 120 },
{ title: '检定依据名称', key: 'name', width: 140 }
......@@ -110,7 +104,8 @@ export default {
modalTitle: '',
currentRowData: {},
name: '',
code: ''
code: '',
verification: ''
}
},
methods: {
......@@ -118,6 +113,7 @@ export default {
this.modalTitle = '选择检测依据'
this.name = ''
this.code = ''
this.verification = ''
this._judge()
},
_judge() {
......@@ -126,7 +122,7 @@ export default {
this._page()
},
_page: async function() {
const result = await meterAptitude.page(this.formObj)
const result = await meterAptitude.page(this._searchParams())
if (result) {
this.getPage = result.records
console.log(this.getPage)
......@@ -134,6 +130,8 @@ export default {
this.getPage[i].verification =
this.getPage[i].code + this.getPage[i].name
}
this.total = result.total
this.size = result.size
this.loading = false
}
},
......@@ -153,6 +151,9 @@ export default {
if (this.code) {
data.code = this.code
}
if (this.verification) {
data.verification = this.verification
}
return this.$extend(data, this.pageParams)
},
_search() {
......
......@@ -9,17 +9,17 @@
<Col span="24">
<Form id="test-item-form" :label-width="90" inline onsubmit="return false">
<label class="label-sign" />
<Form-item :label-width="70" label="授权资质仪器名称" >
<Form-item :label-width="70" label="样品名称" >
<Input
v-model="code"
placeholder="授权资质仪器名称"
v-model="name"
placeholder="请输入样品名称"
style="width: 100%"
@on-enter="_pageChange(1)"
/>
</Form-item>
<Form-item label="检测依据名称">
<Input
v-model="name"
v-model="basis"
placeholder="请输入检测依据名称"
style="width: 100%"
@on-enter="_pageChange(1)"
......@@ -57,8 +57,8 @@
</Col>
<Col span="24">
<Page
:total="getPage.total"
:page-size="getPage.size"
:total="total"
:page-size="size"
placement="top"
show-total
show-elevator
......@@ -90,6 +90,8 @@ export default {
return {
loading: true,
pageParams: { rows: 20 },
total: 0,
size: 0,
pageColumns: [
{ title: '样品名称', key: 'name' },
{ title: '检定依据', key: 'code' },
......@@ -100,7 +102,8 @@ export default {
modalTitle: '',
currentRowData: {},
name: '',
code: ''
code: '',
basis: ''
}
},
methods: {
......@@ -108,6 +111,7 @@ export default {
this.modalTitle = '选择检测依据'
this.name = ''
this.code = ''
this.basis = ''
this._judge()
},
_judge() {
......@@ -121,6 +125,8 @@ export default {
console.log('查询结果')
console.log(result)
this.getPage = result.records
this.total = result.total
this.size = result.size
this.loading = false
console.log(this.getPage)
}
......@@ -141,6 +147,9 @@ export default {
if (this.code) {
data.code = this.code
}
if (this.basis) {
data.basis = this.basis
}
return this.$extend(data, this.pageParams)
},
_search() {
......
......@@ -25,6 +25,9 @@
style="width: 100%"
/>
</Form-item>
<Form-item class="search-btn">
<Button @click="_pageChange(1)" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
<Col span="24" style="margin-bottom: 10px">
......
......@@ -9,14 +9,6 @@
<Col span="24">
<Form id="test-item-form" :label-width="90" inline onsubmit="return false">
<label class="label-sign" />
<Form-item :label-width="70" label="授权资质仪器名称" >
<Input
v-model="code"
@on-enter="_pageChange(1)"
placeholder="授权资质仪器名称"
style="width: 100%"
/>
</Form-item>
<Form-item label="检测依据名称">
<Input
v-model="name"
......@@ -25,6 +17,9 @@
style="width: 100%"
/>
</Form-item>
<Form-item class="search-btn">
<Button @click="_pageChange(1)" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
<Col span="24" style="margin-bottom: 10px">
......@@ -56,8 +51,8 @@
</Col>
<Col span="24">
<Page
:total="getPage.total"
:page-size="getPage.size"
:total="total"
:page-size="size"
@on-change="_pageChange"
@on-page-size-change="_pageRows"
placement="top"
......@@ -93,6 +88,8 @@ export default {
},
loading: true,
pageParams: { rows: 20 },
total: 0,
size: 0,
pageColumns: [
{ title: '检定依据', key: 'verification', width: 120 },
{ title: '检定依据名称', key: 'name', width: 140 }
......@@ -126,9 +123,11 @@ export default {
this._page()
},
_page: async function() {
const result = await meterAptitude.page(this.formObj)
const result = await meterAptitude.page(this._searchParams())
if (result) {
this.getPage = result.records
this.total = result.total
this.size = result.size
console.log(this.getPage)
for (let i = 0; i < this.getPage.length; i++) {
this.getPage[i].verification =
......
......@@ -25,6 +25,9 @@
style="width: 100%"
/>
</Form-item>
<Form-item class="search-btn">
<Button @click="_pageChange(1)" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
<Col span="24" style="margin-bottom: 10px">
......
......@@ -9,14 +9,6 @@
<Col span="24">
<Form id="test-item-form" :label-width="90" inline onsubmit="return false">
<label class="label-sign" />
<Form-item :label-width="70" label="授权资质仪器名称" >
<Input
v-model="code"
@on-enter="_pageChange(1)"
placeholder="授权资质仪器名称"
style="width: 100%"
/>
</Form-item>
<Form-item label="检测依据名称">
<Input
v-model="name"
......@@ -25,6 +17,9 @@
style="width: 100%"
/>
</Form-item>
<Form-item class="search-btn">
<Button @click="_pageChange(1)" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
<Col span="24" style="margin-bottom: 10px">
......@@ -56,8 +51,8 @@
</Col>
<Col span="24">
<Page
:total="getPage.total"
:page-size="getPage.size"
:total="total"
:page-size="size"
@on-change="_pageChange"
@on-page-size-change="_pageRows"
placement="top"
......@@ -93,6 +88,8 @@ export default {
},
loading: true,
pageParams: { rows: 20 },
total: 0,
size: 0,
pageColumns: [
{ title: '检定依据', key: 'verification', width: 120 },
{ title: '检定依据名称', key: 'name', width: 140 }
......@@ -126,9 +123,11 @@ export default {
this._page()
},
_page: async function() {
const result = await meterAptitude.page(this.formObj)
const result = await meterAptitude.page(this._searchParams())
if (result) {
this.getPage = result.records
this.total = result.total
this.size = result.size
console.log(this.getPage)
for (let i = 0; i < this.getPage.length; i++) {
this.getPage[i].verification =
......
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