Commit 31f84c8f by huyue

修复收入测算查询

1 parent 38ff8cbf
...@@ -234,15 +234,15 @@ export default { ...@@ -234,15 +234,15 @@ export default {
if (item.thirdLevelGoodsTypeName) { if (item.thirdLevelGoodsTypeName) {
_shop.goodsName = item.thirdLevelGoodsTypeName _shop.goodsName = item.thirdLevelGoodsTypeName
_shop.goodsId = item.thirdLevelGoodsType _shop.goodsId = item.thirdLevelGoodsType
// _shop.type = 3 _shop.type = 3
} else if (item.secondaryGoodsTypeName) { } else if (item.secondaryGoodsTypeName) {
_shop.goodsName = item.secondaryGoodsTypeName _shop.goodsName = item.secondaryGoodsTypeName
_shop.goodsId = item.secondaryGoodsType _shop.goodsId = item.secondaryGoodsType
// _shop.type = 2 _shop.type = 2
} else { } else {
_shop.goodsName = item.goodsTypeName _shop.goodsName = item.goodsTypeName
_shop.goodsId = item.goodsType _shop.goodsId = item.goodsType
// _shop.type = 1 _shop.type = 1
} }
list.push(_shop) list.push(_shop)
console.log(_shop); console.log(_shop);
...@@ -260,17 +260,30 @@ export default { ...@@ -260,17 +260,30 @@ export default {
}) })
}, },
handleSearch() { handleSearch() {
// const params = this.getParams() const params = this.getParams()
console.log(params, '-==-=');
this.$refs.measurementTable.refreshTable(true, true) this.$refs.measurementTable.refreshTable(true, true)
}, },
getParams() { getParams() {
let params = deepClone(this.searchForm) let params = deepClone(this.searchForm)
const { showGoodsTypeName, calculationDay } = this.searchForm const { showGoodsTypeName, calculationDay } = this.searchForm
if (showGoodsTypeName) { if (showGoodsTypeName) {
const _goods = this.showFormData[4].optionList.find(item => item.goodsId == showGoodsTypeName) const _goods = this.showFormData[4].optionList.find(item => item.goodsId == showGoodsTypeName)
// delete _goods.goodsId // delete _goods.goodsId
// delete _goods.goodsName // delete _goods.goodsName
params = Object.assign({}, _goods) delete params.showGoodsTypeName
const { type } = _goods
if (type == 1) {
params.goodsType = _goods.goodsType
params.goodsTypeName = _goods.goodsTypeName
} else if (type == 2) {
params.secondaryGoodsType = _goods.secondaryGoodsType
params.secondaryGoodsTypeName = _goods.secondaryGoodsTypeName
} else if (type ==3 ) {
params.thirdLevelGoodsType = _goods.thirdLevelGoodsType
params.thirdLevelGoodsTypeName = _goods.thirdLevelGoodsTypeName
}
// params = Object.assign({}, _goods)
} }
if (calculationDay) { if (calculationDay) {
params.calculationDayBegin = dayjs(calculationDay).format('YYYY-MM-DD') params.calculationDayBegin = dayjs(calculationDay).format('YYYY-MM-DD')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!