Commit 56ff28df by lichengming

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

parent 46c52321
......@@ -170,7 +170,7 @@ export default {
this.formObj.outStocker = data.realname
this.formObj.outStockerId = data.id
}
console.log(data, msg)
console.log(this.formObj.outStocker, this.formObj.outStockerId)
},
_ctimeChange(data) {
this.formObj.outStock = data
......
......@@ -15,7 +15,7 @@
</div>
<div style="width: 100%;">
<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
v-for="item in pageColumns"
:key="item.key"
......@@ -45,6 +45,7 @@ export default {
return {
tableData: { records: [] },
getPage: {},
formObj: {},
pageColumns: [
{ title: '委托单位', key: 'client' },
{ title: '委托编号', key: 'entrustCode', width: 180 },
......@@ -64,35 +65,20 @@ export default {
this.$refs.unfinishedDetail._open()
},
_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) {
console.log(result)
this.getPage = result
this.$refs.pageTable._hideLoading()
}
},
_request() {
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) {
num = tableData.length
} else {
num = 7
}
for (let i = 0; i < num; i++) {
this.tableData.records.push(tableData[i])
}
})
_tableResultChange(msg, data) {
switch (msg) {
case 'changeSize':
this._page()
break
}
}
}
}
......
......@@ -12,7 +12,7 @@
</div>
<div style="width: 100%;">
<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
v-for="item in pageColumns"
:key="item.key"
......@@ -43,6 +43,7 @@ export default {
pageColumns: [
{ title: '委托编号', key: 'entrustCode', width: 150 },
{ title: '试验名称', key: 'name', width: 140 },
{ title: '状态', key: 'status', width: 140 },
{ title: '试样编号', key: 'sampleCode', width: 140 },
{ title: '试验项目英文简写', key: 'shortName', width: 180 },
{ title: '检测依据', key: 'testBasis', width: 100 }
......@@ -66,6 +67,13 @@ export default {
}
// const result = await
// 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