Commit 78306451 by 李伟康

commit 修复BUG

1 parent 3beeba04
......@@ -46,7 +46,6 @@
ref="qualityTable"
:searchForm="searchFormSearch"
:tableParams="tableParams"
:beforeSearchFn="beforeSearchFn"
:pageConf="pageConf"
:noDataImg="url"
:border="true"
......@@ -54,7 +53,7 @@
:span-method="arraySpanMethod"
:tableData="tableList"
:tableTotal="tableTotal"
@refreshTable="jumpPage"
@refreshTable="refreshTable"
>
<div
slot="store"
......@@ -171,7 +170,7 @@ export default {
url: url,
tableList: [],
tableTotal: 0,
page: {
pageConfig: {
pageSize: 10,
pageNum: 1
},
......@@ -405,22 +404,13 @@ export default {
}
},
created () {
this.getList()
this.refreshTable()
},
mounted () {
this.getServiceStore()
},
methods: {
async getList () {
await this.beforeSearchFn()
const { total, list } = await this.$apis.quality.getReclistWithPage({
...this.page,
...this.searchFormSearch
})
this.restructureData(list)
this.tableTotal = total
},
getServiceStore () {
this.$apis.quality
.listShop4sByRef({
......@@ -517,25 +507,36 @@ export default {
if (this.searchForm.phoneNumber && this.searchForm.phoneNumber.length < 4) {
return
}
this.getList()
this.refreshTable()
},
handleReset () {
this.searchForm = this.$options.data.call(this).searchForm
this.getList()
this.refreshTable()
},
jumpPage (page) {
this.page = page
this.getList()
async refreshTable (pageCon) {
if (pageCon) this.pageConfig = pageCon
else this.pageConfig = {
pageSize: 10,
pageNum: 1,
}
await this.beforeSearchFn()
const { total, list } = await this.$apis.quality.getReclistWithPage({
...this.pageConfig,
...this.searchFormSearch
})
this.$refs.qualityTable.page = this.pageConfig
this.restructureData(list)
this.tableTotal = total
},
restructureData (data) {
this.tableList = []
let dataList = this.setTableFinishFun(data),
{ page } = this
{ pageConfig } = this
if (dataList && dataList.length > 0) {
dataList = dataList.map((item, index) => {
if (item.batchNum != null) item.batchNum = String(item.batchNum)
if (item.enterReceptionBatch != null) item.enterReceptionBatch = String(item.enterReceptionBatch)
item.num = (index + 1) + (page.pageSize * (page.pageNum - 1))
item.num = (index + 1) + (pageConfig.pageSize * (pageConfig.pageNum - 1))
return item
})
this.tableList = dataList.reduce((prev, cur, index, arr) => {
......
......@@ -384,6 +384,9 @@ export default {
margin-bottom: 8px;
}
}
/deep/.el-table tbody tr:last-child td{
border-bottom: 1px solid #ebeef5;
}
}
.theader {
width: 100%;
......
......@@ -141,7 +141,10 @@ export default {
mounted () {
const { key } = this.$route.query
if (key) {
const quality_detail_object = JSON.parse(sessionStorage.getItem(key) || {})
const quality_detail_object = JSON.parse(sessionStorage.getItem(key) || '{}')
if (!quality_detail_object?.list) return this.$router.push({
path: '/qualityManage/index'
})
this.currentNum = quality_detail_object.currentNum || 0
this.qualityDetailList = quality_detail_object.list || []
} else this.$router.go(-1)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!