Commit 56ff28df by lichengming

修改了个人试验项目和待完成委托

parent 46c52321
...@@ -170,7 +170,7 @@ export default { ...@@ -170,7 +170,7 @@ export default {
this.formObj.outStocker = data.realname this.formObj.outStocker = data.realname
this.formObj.outStockerId = data.id this.formObj.outStockerId = data.id
} }
console.log(data, msg) console.log(this.formObj.outStocker, this.formObj.outStockerId)
}, },
_ctimeChange(data) { _ctimeChange(data) {
this.formObj.outStock = data this.formObj.outStock = data
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</div> </div>
<div style="width: 100%;"> <div style="width: 100%;">
<PTVXETableHeight ref="pageTable" :table-height="300" :loading="true" <PTVXETableHeight ref="pageTable" :table-height="300" :loading="true"
:get-page="getPage" hide-checkbox="true"> :get-page="getPage" @on-result-change="_tableResultChange" hide-checkbox="true">
<vxe-table-column <vxe-table-column
v-for="item in pageColumns" v-for="item in pageColumns"
:key="item.key" :key="item.key"
...@@ -45,6 +45,7 @@ export default { ...@@ -45,6 +45,7 @@ export default {
return { return {
tableData: { records: [] }, tableData: { records: [] },
getPage: {}, getPage: {},
formObj: {},
pageColumns: [ pageColumns: [
{ title: '委托单位', key: 'client' }, { title: '委托单位', key: 'client' },
{ title: '委托编号', key: 'entrustCode', width: 180 }, { title: '委托编号', key: 'entrustCode', width: 180 },
...@@ -64,35 +65,20 @@ export default { ...@@ -64,35 +65,20 @@ export default {
this.$refs.unfinishedDetail._open() this.$refs.unfinishedDetail._open()
}, },
_page: async function() { _page: async function() {
const result = await soilStatistics.pageWaitEnd() Object.assign(this.formObj, this.$refs.pageTable._searchParams())
const result = await soilStatistics.pageWaitEnd(this.formObj)
if (result) { if (result) {
console.log(result) console.log(result)
this.getPage = result this.getPage = result
}
},
_request() {
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
this.$store
.dispatch('FoodContract/unfinishedContract', { page: 1, rows: 7 })
.then(() => {
const tableData = this.$store.state.FoodContract.page.records
const total = this.$store.state.FoodContract.page.total
if (total === 0) {
this.total = ''
} else {
this.total = '(共 ' + total + ' 条)'
} }
let num = 0 },
if (tableData.length < 7) { _tableResultChange(msg, data) {
num = tableData.length switch (msg) {
} else { case 'changeSize':
num = 7 this._page()
} break
for (let i = 0; i < num; i++) {
this.tableData.records.push(tableData[i])
} }
})
} }
} }
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</div> </div>
<div style="width: 100%;"> <div style="width: 100%;">
<PTVXETableHeight ref="pageTable" :page-columns="pageColumns" <PTVXETableHeight ref="pageTable" :page-columns="pageColumns"
:get-page="getPage" :table-height="tableHeight"> :get-page="getPage" @on-result-change="_tableResultChange" :table-height="tableHeight">
<vxe-table-column <vxe-table-column
v-for="item in pageColumns" v-for="item in pageColumns"
:key="item.key" :key="item.key"
...@@ -43,6 +43,7 @@ export default { ...@@ -43,6 +43,7 @@ export default {
pageColumns: [ pageColumns: [
{ title: '委托编号', key: 'entrustCode', width: 150 }, { title: '委托编号', key: 'entrustCode', width: 150 },
{ title: '试验名称', key: 'name', width: 140 }, { title: '试验名称', key: 'name', width: 140 },
{ title: '状态', key: 'status', width: 140 },
{ title: '试样编号', key: 'sampleCode', width: 140 }, { title: '试样编号', key: 'sampleCode', width: 140 },
{ title: '试验项目英文简写', key: 'shortName', width: 180 }, { title: '试验项目英文简写', key: 'shortName', width: 180 },
{ title: '检测依据', key: 'testBasis', width: 100 } { title: '检测依据', key: 'testBasis', width: 100 }
...@@ -66,6 +67,13 @@ export default { ...@@ -66,6 +67,13 @@ export default {
} }
// const result = await // const result = await
// this.$refs.pageTable._page('search-form', 'SysFileTemplate/page') // this.$refs.pageTable._page('search-form', 'SysFileTemplate/page')
},
_tableResultChange(msg, data) {
switch (msg) {
case 'changeSize':
this._page()
break
}
} }
} }
} }
......
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