|
@@ -93,6 +93,7 @@
|
|
:dataSource="loadData"
|
|
:dataSource="loadData"
|
|
:scroll="{ x: 1600, y: 300 }"
|
|
:scroll="{ x: 1600, y: 300 }"
|
|
:pagination="paginationProps"
|
|
:pagination="paginationProps"
|
|
|
|
+ @change="onTableChange"
|
|
bordered>
|
|
bordered>
|
|
<!-- 成本价 -->
|
|
<!-- 成本价 -->
|
|
<template slot="putCost" slot-scope="text, record">
|
|
<template slot="putCost" slot-scope="text, record">
|
|
@@ -162,6 +163,7 @@
|
|
:dataSource="chooseLoadData"
|
|
:dataSource="chooseLoadData"
|
|
:scroll="{ x: 1700, y: 300 }"
|
|
:scroll="{ x: 1700, y: 300 }"
|
|
:pagination="choosePaginationProps"
|
|
:pagination="choosePaginationProps"
|
|
|
|
+ @change="onChooseTableChange"
|
|
bordered>
|
|
bordered>
|
|
<!-- 成本价 -->
|
|
<!-- 成本价 -->
|
|
<template slot="putCost" slot-scope="text, record">
|
|
<template slot="putCost" slot-scope="text, record">
|
|
@@ -511,12 +513,17 @@ export default {
|
|
this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
},
|
|
},
|
|
// 产品列表数据
|
|
// 产品列表数据
|
|
- getDealerProductList (pageNo) {
|
|
|
|
|
|
+ getDealerProductList (pageNo, sorter) {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.pageNo = pageNo || this.pageNo
|
|
this.pageNo = pageNo || this.pageNo
|
|
const params = Object.assign({ pageNo: this.pageNo, pageSize: this.pageSize }, this.queryParam)
|
|
const params = Object.assign({ pageNo: this.pageNo, pageSize: this.pageSize }, this.queryParam)
|
|
params.enabledFlag = 1
|
|
params.enabledFlag = 1
|
|
params.sysFlag = 0
|
|
params.sysFlag = 0
|
|
|
|
+ if (sorter) {
|
|
|
|
+ params.sortField = sorter.field
|
|
|
|
+ params.sortOrder = sorter.order
|
|
|
|
+ params.sortAlias = 'dp'
|
|
|
|
+ }
|
|
dealerProductList(params).then(res => {
|
|
dealerProductList(params).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
const data = res.data
|
|
const data = res.data
|
|
@@ -543,12 +550,18 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 已选产品列表数据
|
|
// 已选产品列表数据
|
|
- getChooseDealerProductList () {
|
|
|
|
|
|
+ getChooseDealerProductList (pageNo, sorter) {
|
|
|
|
+ this.choosePageNo = pageNo || this.choosePageNo
|
|
const params = {
|
|
const params = {
|
|
pageNo: this.choosePageNo,
|
|
pageNo: this.choosePageNo,
|
|
pageSize: this.choosePageSize,
|
|
pageSize: this.choosePageSize,
|
|
sparePartsPurchaseSn: this.$route.params.sn
|
|
sparePartsPurchaseSn: this.$route.params.sn
|
|
}
|
|
}
|
|
|
|
+ if (sorter) {
|
|
|
|
+ params.sortField = sorter.field == 'brandName' ? 'productBrandName' : 'productCode'
|
|
|
|
+ params.sortOrder = sorter.order
|
|
|
|
+ params.sortAlias = sorter.field == 'brandName' ? 'dp' : 'sppd'
|
|
|
|
+ }
|
|
sparePartsPurDetailList(params).then(res => {
|
|
sparePartsPurDetailList(params).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.getDetailCount(params)
|
|
this.getDetailCount(params)
|
|
@@ -638,6 +651,17 @@ export default {
|
|
return (
|
|
return (
|
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
)
|
|
)
|
|
|
|
+ },
|
|
|
|
+ // 选择产品 表格 change
|
|
|
|
+ onTableChange (pagination, filters, sorter) {
|
|
|
|
+ console.log('-------------------------------')
|
|
|
|
+ console.log('params', pagination, filters, sorter)
|
|
|
|
+ this.getDealerProductList(this.pageNo, sorter)
|
|
|
|
+ },
|
|
|
|
+ // 已选产品 表格 change
|
|
|
|
+ onChooseTableChange (pagination, filters, sorter) {
|
|
|
|
+ console.log('++++++++++++++++++++++++++++++++++')
|
|
|
|
+ this.getChooseDealerProductList(this.choosePageNo, sorter)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
beforeRouteEnter (to, from, next) {
|
|
beforeRouteEnter (to, from, next) {
|