Commit ad142f26 by lichengming

修改了出检委托单的页码和查询

parent 947afe13
...@@ -9,20 +9,20 @@ ...@@ -9,20 +9,20 @@
<Col span="24"> <Col span="24">
<Form id="test-item-form" :label-width="90" inline onsubmit="return false"> <Form id="test-item-form" :label-width="90" inline onsubmit="return false">
<label class="label-sign" /> <label class="label-sign" />
<Form-item :label-width="70" label="授权资质仪器名称" > <Form-item :label-width="70" label="委托单位" >
<Input <Input
v-model="code" v-model="client"
placeholder="授权资质仪器名称"
style="width: 100%"
@on-enter="_pageChange(1)" @on-enter="_pageChange(1)"
placeholder="委托单位"
style="width: 100%"
/> />
</Form-item> </Form-item>
<Form-item label="检测依据名称"> <Form-item label="合同编号">
<Input <Input
v-model="name" v-model="salesCode"
placeholder="请输入检测依据名称"
style="width: 100%"
@on-enter="_pageChange(1)" @on-enter="_pageChange(1)"
placeholder="合同编号"
style="width: 100%"
/> />
</Form-item> </Form-item>
</Form> </Form>
...@@ -30,12 +30,13 @@ ...@@ -30,12 +30,13 @@
<Col span="24" style="margin-bottom: 10px"> <Col span="24" style="margin-bottom: 10px">
<el-table <el-table
:data="getPage" :data="getPage"
:height="tableHeight"
@row-click="_rowChange"
@row-dblclick="_dbClick"
border border
size="small" size="small"
highlight-current-row highlight-current-row
style="width: 100%" style="width: 100%"
@row-click="_rowChange"
@row-dblclick="_dbClick"
> >
<el-table-column <el-table-column
v-for="item in pageColumns" v-for="item in pageColumns"
...@@ -56,23 +57,23 @@ ...@@ -56,23 +57,23 @@
</Col> </Col>
<Col span="24"> <Col span="24">
<Page <Page
:total="getPage.total" :total="total"
:page-size="getPage.size" :page-size="size"
@on-change="_pageChange"
@on-page-size-change="_pageRows"
placement="top" placement="top"
show-total show-total
show-elevator show-elevator
show-sizer show-sizer
@on-change="_pageChange"
@on-page-size-change="_pageRows"
/> />
<div style="clear: both" /> <div style="clear: both" />
</Col> </Col>
</Row> </Row>
<div slot="footer" class="btn-width"> <div slot="footer" class="btn-width">
<Button style="margin-left: 8px" @click="_cancel"> <Button @click="_cancel" style="margin-left: 8px">
取消 取消
</Button> </Button>
<Button type="primary" @click="_ok"> <Button @click="_ok" type="primary">
确定 确定
</Button> </Button>
</div> </div>
...@@ -93,6 +94,8 @@ export default { ...@@ -93,6 +94,8 @@ export default {
}, },
loading: true, loading: true,
pageParams: { rows: 20 }, pageParams: { rows: 20 },
total: 0,
size: 0,
pageColumns: [ pageColumns: [
{ title: '合同编号', key: 'salesCode', width: 120 }, { title: '合同编号', key: 'salesCode', width: 120 },
{ title: '委托单位', key: 'client' }, { title: '委托单位', key: 'client' },
...@@ -113,7 +116,14 @@ export default { ...@@ -113,7 +116,14 @@ export default {
modalTitle: '', modalTitle: '',
currentRowData: {}, currentRowData: {},
name: '', name: '',
code: '' code: '',
client: '',
salesCode: ''
}
},
computed: {
tableHeight: function() {
return this.$tableHeight('tableModal')
} }
}, },
methods: { methods: {
...@@ -136,9 +146,13 @@ export default { ...@@ -136,9 +146,13 @@ export default {
// } // }
// }, // },
_page: async function() { _page: async function() {
const result = await meterContract.pageContractForEntrust(this.formObj) const result = await meterContract.pageContractForEntrust(
this._searchParams()
)
if (result) { if (result) {
this.getPage = result.records this.getPage = result.records
this.total = result.total
this.size = result.size
console.log(this.getPage) console.log(this.getPage)
this.loading = false this.loading = false
} }
...@@ -159,6 +173,12 @@ export default { ...@@ -159,6 +173,12 @@ export default {
if (this.code) { if (this.code) {
data.code = this.code data.code = this.code
} }
if (this.client) {
data.client = this.client
}
if (this.salesCode) {
data.salesCode = this.salesCode
}
return this.$extend(data, this.pageParams) return this.$extend(data, this.pageParams)
}, },
_search() { _search() {
......
...@@ -9,17 +9,17 @@ ...@@ -9,17 +9,17 @@
<Col span="24"> <Col span="24">
<Form id="test-item-form" :label-width="90" inline onsubmit="return false"> <Form id="test-item-form" :label-width="90" inline onsubmit="return false">
<label class="label-sign" /> <label class="label-sign" />
<Form-item :label-width="70" label="授权资质仪器名称" > <Form-item :label-width="70" label="样品名称" >
<Input <Input
v-model="code" v-model="name"
placeholder="授权资质仪器名称" placeholder="样品名称"
style="width: 100%" style="width: 100%"
@on-enter="_pageChange(1)" @on-enter="_pageChange(1)"
/> />
</Form-item> </Form-item>
<Form-item label="检测依据名称"> <Form-item label="检测依据名称">
<Input <Input
v-model="name" v-model="basis"
placeholder="请输入检测依据名称" placeholder="请输入检测依据名称"
style="width: 100%" style="width: 100%"
@on-enter="_pageChange(1)" @on-enter="_pageChange(1)"
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
</Col> </Col>
<Col span="24"> <Col span="24">
<Page <Page
:total="getPage.total" :total="total"
:page-size="getPage.size" :page-size="size"
placement="top" placement="top"
show-total show-total
show-elevator show-elevator
...@@ -90,6 +90,8 @@ export default { ...@@ -90,6 +90,8 @@ export default {
return { return {
loading: true, loading: true,
pageParams: { rows: 20 }, pageParams: { rows: 20 },
total: 0,
size: 0,
pageColumns: [ pageColumns: [
{ title: '样品名称', key: 'name' }, { title: '样品名称', key: 'name' },
{ title: '检定依据', key: 'code' }, { title: '检定依据', key: 'code' },
...@@ -100,7 +102,8 @@ export default { ...@@ -100,7 +102,8 @@ export default {
modalTitle: '', modalTitle: '',
currentRowData: {}, currentRowData: {},
name: '', name: '',
code: '' code: '',
basis: ''
} }
}, },
methods: { methods: {
...@@ -108,6 +111,7 @@ export default { ...@@ -108,6 +111,7 @@ export default {
this.modalTitle = '选择检测依据' this.modalTitle = '选择检测依据'
this.name = '' this.name = ''
this.code = '' this.code = ''
this.basis = ''
this._judge() this._judge()
}, },
_judge() { _judge() {
...@@ -119,6 +123,8 @@ export default { ...@@ -119,6 +123,8 @@ export default {
const result = await meterManage.page(this._searchParams()) const result = await meterManage.page(this._searchParams())
if (result) { if (result) {
this.getPage = result.records this.getPage = result.records
this.total = result.total
this.size = result.size
this.loading = false this.loading = false
} }
}, },
...@@ -138,6 +144,9 @@ export default { ...@@ -138,6 +144,9 @@ export default {
if (this.code) { if (this.code) {
data.code = this.code data.code = this.code
} }
if (this.basis) {
data.basis = this.basis
}
return this.$extend(data, this.pageParams) return this.$extend(data, this.pageParams)
}, },
_search() { _search() {
......
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