Commit 40476915 by cwq0219

财务管理-搜索

1 parent e621225d
...@@ -383,7 +383,7 @@ export default { ...@@ -383,7 +383,7 @@ export default {
this.getOptionsList() this.getOptionsList()
}) })
} else { } else {
this.showFormData = this.showFormData.filter(item => item.name !== 'sellerMerchantId') this.showFormData = this.showFormData.filter(item => item.name !== 'yqMerchantId')
this.getServiceStore(this.userInfo.detail.merchantId) this.getServiceStore(this.userInfo.detail.merchantId)
} }
console.log(this.$store.state.d2admin.user.info.detail.merchantId) console.log(this.$store.state.d2admin.user.info.detail.merchantId)
...@@ -463,6 +463,12 @@ export default { ...@@ -463,6 +463,12 @@ export default {
getOptionsList() { getOptionsList() {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === 'select') { if (item.type === 'select') {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
const temp = {}
temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部'
this.baseData[item.optionsName].unshift(temp)
}
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName]) this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
} }
}) })
...@@ -470,7 +476,7 @@ export default { ...@@ -470,7 +476,7 @@ export default {
getSummary() { getSummary() {
getSummary({ getSummary({
beginDateStr: moment(this.summaryDate).startOf('month').format('YYYY-MM-DD'), beginDateStr: moment(this.summaryDate).startOf('month').format('YYYY-MM-DD'),
endDateStr : moment(this.summaryDate).endOf('month').format('YYYY-MM-DD'), endDateStr: moment(this.summaryDate).endOf('month').format('YYYY-MM-DD')
}).then((res) => { }).then((res) => {
this.summayData = res this.summayData = res
}) })
...@@ -492,12 +498,12 @@ export default { ...@@ -492,12 +498,12 @@ export default {
'goodsExtraCost', 'goodsExtraCost',
'yqIncentiveTotal', 'yqIncentiveTotal',
'yqGrossProfit', 'yqGrossProfit',
'paidMoney','sellPrice', 'shopCost', 'allocationMoney'] 'paidMoney', 'sellPrice', 'shopCost', 'allocationMoney']
getList(params).then(res => { getList(params).then(res => {
// console.log(res) // console.log(res)
this.tableData = res.list.map((item) => { this.tableData = res.list.map((item) => {
for(let key in item) { for (const key in item) {
if(moneyLabels.indexOf(key) > -1 && typeof item[key] === 'number') { if (moneyLabels.indexOf(key) > -1 && typeof item[key] === 'number') {
item[key] = `¥${item[key]}` item[key] = `¥${item[key]}`
} }
} }
...@@ -510,18 +516,18 @@ export default { ...@@ -510,18 +516,18 @@ export default {
}, },
getParams() { getParams() {
var params = {} var params = {}
if(this.searchForm.yqMerchantId) { if (this.searchForm.yqMerchantId) {
params.yqMerchantId = this.searchForm.yqMerchantId params.yqMerchantId = this.searchForm.yqMerchantId
} }
if(this.searchForm.merchantId) { if (this.searchForm.merchantId) {
params.merchantId = this.searchForm.merchantId params.merchantId = this.searchForm.merchantId
} }
if (this.searchForm.time) { if (this.searchForm.time) {
params.payStartDateStr = new Date(this.searchForm.time[0]).toLocaleDateString().replace(/\//g, '-')+' 00:00:00' params.payStartDateStr = new Date(this.searchForm.time[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.payEndDateStr = new Date(this.searchForm.time[1]).toLocaleDateString().replace(/\//g, '-')+' 23:59:59' params.payEndDateStr = new Date(this.searchForm.time[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
} }
if(this.searchForm.subOrderCode) { if (this.searchForm.subOrderCode) {
params.subOrderCode = this.searchForm.subOrderCode params.subOrderCode = this.searchForm.subOrderCode
} }
return params return params
...@@ -544,7 +550,7 @@ export default { ...@@ -544,7 +550,7 @@ export default {
handleCurrentChange(value) { handleCurrentChange(value) {
this.page.pageNum = value this.page.pageNum = value
this.getList() this.getList()
}, }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!