Commit 40476915 by cwq0219

财务管理-搜索

1 parent e621225d
......@@ -383,7 +383,7 @@ export default {
this.getOptionsList()
})
} 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)
}
console.log(this.$store.state.d2admin.user.info.detail.merchantId)
......@@ -463,6 +463,12 @@ export default {
getOptionsList() {
this.showFormData.forEach((item, index) => {
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])
}
})
......@@ -470,7 +476,7 @@ export default {
getSummary() {
getSummary({
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) => {
this.summayData = res
})
......@@ -482,22 +488,22 @@ export default {
...params
}
// console.log(params)
const moneyLabels = ['totalPrice',
'serviceCharge',
'actualIncomeMoney',
'shopProfitMoney',
'yqProfitMoney',
'glProfitMoney',
'franchiseeProfitMoney',
const moneyLabels = ['totalPrice',
'serviceCharge',
'actualIncomeMoney',
'shopProfitMoney',
'yqProfitMoney',
'glProfitMoney',
'franchiseeProfitMoney',
'goodsExtraCost',
'yqIncentiveTotal',
'yqGrossProfit',
'paidMoney','sellPrice', 'shopCost', 'allocationMoney']
'paidMoney', 'sellPrice', 'shopCost', 'allocationMoney']
getList(params).then(res => {
// console.log(res)
this.tableData = res.list.map((item) => {
for(let key in item) {
if(moneyLabels.indexOf(key) > -1 && typeof item[key] === 'number') {
for (const key in item) {
if (moneyLabels.indexOf(key) > -1 && typeof item[key] === 'number') {
item[key] = `¥${item[key]}`
}
}
......@@ -510,18 +516,18 @@ export default {
},
getParams() {
var params = {}
if(this.searchForm.yqMerchantId) {
if (this.searchForm.yqMerchantId) {
params.yqMerchantId = this.searchForm.yqMerchantId
}
if(this.searchForm.merchantId) {
if (this.searchForm.merchantId) {
params.merchantId = this.searchForm.merchantId
}
if (this.searchForm.time) {
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.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'
}
if(this.searchForm.subOrderCode) {
if (this.searchForm.subOrderCode) {
params.subOrderCode = this.searchForm.subOrderCode
}
return params
......@@ -544,7 +550,7 @@ export default {
handleCurrentChange(value) {
this.page.pageNum = value
this.getList()
},
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!