Commit f92b0a5c by 杨北旺

同步我的分账

1 parent 76e35a21
...@@ -86,11 +86,11 @@ export default { ...@@ -86,11 +86,11 @@ export default {
prop: 'orderCode', prop: 'orderCode',
width: '200px' width: '200px'
}, },
{ // {
label: '子订单编号', // label: '子订单编号',
prop: 'subOrderCode', // prop: 'subOrderCode',
width: '200px' // width: '200px'
}, // },
{ {
label: '客户姓名', label: '客户姓名',
prop: 'customerName', prop: 'customerName',
...@@ -119,7 +119,7 @@ export default { ...@@ -119,7 +119,7 @@ export default {
}, },
{ {
label: '园区店名', label: '园区店名',
prop: 'sellerMerchantName', prop: 'yqMerchantName',
width: '200px' width: '200px'
}, },
{ {
...@@ -163,11 +163,11 @@ export default { ...@@ -163,11 +163,11 @@ export default {
prop: 'orderCode', prop: 'orderCode',
width: '200px' width: '200px'
}, },
{ // {
label: '子订单编号', // label: '子订单编号',
prop: 'subOrderCode', // prop: 'subOrderCode',
width: '200px' // width: '200px'
}, // },
{ {
label: '客户姓名', label: '客户姓名',
prop: 'customerName', prop: 'customerName',
...@@ -196,7 +196,7 @@ export default { ...@@ -196,7 +196,7 @@ export default {
}, },
{ {
label: '园区店名', label: '园区店名',
prop: 'sellerMerchantName', prop: 'yqMerchantName',
width: '200px' width: '200px'
}, },
{ {
...@@ -355,7 +355,7 @@ export default { ...@@ -355,7 +355,7 @@ export default {
label: levelName[accountLevel + 1], label: levelName[accountLevel + 1],
name: 'merchantIdss', name: 'merchantIdss',
type: 'select', type: 'select',
optionList: child[0]&&child[0].children?child[0].children:[], optionList: child[0] && child[0].children ? child[0].children : [],
optionId: 'id', optionId: 'id',
optionLabel: 'merchantName', optionLabel: 'merchantName',
isClear: true isClear: true
...@@ -367,17 +367,17 @@ export default { ...@@ -367,17 +367,17 @@ export default {
label: levelName[accountLevel + 2], label: levelName[accountLevel + 2],
name: 'merchantIdsss', name: 'merchantIdsss',
type: 'select', type: 'select',
optionList: child2[0]&&child2[0].children?child2[0].children:[], optionList: child2[0] && child2[0].children ? child2[0].children : [],
optionId: 'id', optionId: 'id',
optionLabel: 'merchantName', optionLabel: 'merchantName',
isClear: true isClear: true
} }
const isAdd1 = this.judgeAdd(newForm2,this.searchFormData1,'name') const isAdd1 = this.judgeAdd(newForm2, this.searchFormData1, 'name')
const isAdd2 = this.judgeAdd(newForm2,this.searchFormData2,'name') const isAdd2 = this.judgeAdd(newForm2, this.searchFormData2, 'name')
if(!isAdd1){ if (!isAdd1) {
this.searchFormData1.push(newForm2) this.searchFormData1.push(newForm2)
} }
if(!isAdd2){ if (!isAdd2) {
this.searchFormData2.push(newForm2) this.searchFormData2.push(newForm2)
} }
// this.searchFormData1.push(newForm2) // this.searchFormData1.push(newForm2)
...@@ -386,12 +386,12 @@ export default { ...@@ -386,12 +386,12 @@ export default {
} }
} }
this.rowNumber = 3 this.rowNumber = 3
const isAdd1 = this.judgeAdd(newForm,this.searchFormData1,'name') const isAdd1 = this.judgeAdd(newForm, this.searchFormData1, 'name')
const isAdd2 = this.judgeAdd(newForm,this.searchFormData2,'name') const isAdd2 = this.judgeAdd(newForm, this.searchFormData2, 'name')
if(!isAdd1){ if (!isAdd1) {
this.searchFormData1.push(newForm) this.searchFormData1.push(newForm)
} }
if(!isAdd2){ if (!isAdd2) {
this.searchFormData2.push(newForm) this.searchFormData2.push(newForm)
} }
// this.searchFormData1.push(newForm) // this.searchFormData1.push(newForm)
...@@ -409,10 +409,10 @@ export default { ...@@ -409,10 +409,10 @@ export default {
this.refreshKey2 = Date.now() + 1 this.refreshKey2 = Date.now() + 1
}, },
// 判断是否需要添加下拉框 // 判断是否需要添加下拉框
judgeAdd(obj,objList,tag){ judgeAdd(obj, objList, tag) {
let flag = false let flag = false
objList.forEach(item=>{ objList.forEach(item => {
if(item[tag]==obj[tag]){ if (item[tag] == obj[tag]) {
flag = true flag = true
} }
}) })
...@@ -442,8 +442,8 @@ export default { ...@@ -442,8 +442,8 @@ export default {
let openInfo = JSON.parse(localStorage.getItem('openInfo')) let openInfo = JSON.parse(localStorage.getItem('openInfo'))
let startdate = utils.dateFormat(openInfo.openDate, 'YYYY-MM-DD 00:00:00') let startdate = utils.dateFormat(openInfo.openDate, 'YYYY-MM-DD 00:00:00')
let endDate = utils.dateFormat(new Date(), 'YYYY-MM-DD 23:59:59') let endDate = utils.dateFormat(new Date(), 'YYYY-MM-DD 23:59:59')
params.successDateStartDate = startdate params.paySuccessDateStartDate = startdate
params.successDateEndDate = endDate params.paySuccessDateEndDate = endDate
return params return params
}, },
getCurStoreId(e) { getCurStoreId(e) {
...@@ -479,11 +479,11 @@ export default { ...@@ -479,11 +479,11 @@ export default {
if (this.searchForm.payTime) { if (this.searchForm.payTime) {
let startDate = utils.dateFormat(this.searchForm.payTime[0], 'YYYY-MM-DD 00:00:00') let startDate = utils.dateFormat(this.searchForm.payTime[0], 'YYYY-MM-DD 00:00:00')
let endDate = utils.dateFormat(this.searchForm.payTime[1], 'YYYY-MM-DD 23:59:59') let endDate = utils.dateFormat(this.searchForm.payTime[1], 'YYYY-MM-DD 23:59:59')
params.successDateStartDate = startDate params.paySuccessDateStartDate = startDate
params.successDateEndDate = endDate params.paySuccessDateEndDate = endDate
} else { } else {
delete params.successDateStartDate delete params.paySuccessDateStartDate
delete params.successDateEndDate delete params.paySuccessDateEndDate
} }
if (!this.searchForm.divisionTime && !this.searchForm.payTime) { if (!this.searchForm.divisionTime && !this.searchForm.payTime) {
params = this.resetTime() params = this.resetTime()
...@@ -534,13 +534,12 @@ export default { ...@@ -534,13 +534,12 @@ export default {
} }
converterApi(para).then(res => { converterApi(para).then(res => {
res.list.map(item => { res.list.map(item => {
item.sellerMerchantName = item.goodsOrder.sellerMerchantName
item.divisionTypeName = item.divisionType == 1 ? '线下对账' : '线上分账' item.divisionTypeName = item.divisionType == 1 ? '线下对账' : '线上分账'
item.successDate = item.payOrder.successDate ? utils.dateFormat(item.payOrder.successDate, 'YYYY-MM-DD HH:mm:ss') : '--' item.successDate = item.paySuccessDate ? utils.dateFormat(item.paySuccessDate, 'YYYY-MM-DD HH:mm:ss') : '--'
item.divisionDate = item.orderDivision.divisionDate ? utils.dateFormat(item.orderDivision.divisionDate, 'YYYY-MM-DD HH:mm:ss') : '--' item.divisionDate = item.divisionDate ? utils.dateFormat(item.divisionDate, 'YYYY-MM-DD HH:mm:ss') : '--'
item.upgradeGoodsCommodityCode = item.goodsSubOrder.upgradeGoodsCommodityCode item.upgradeGoodsCommodityCode = this.toJoinString(item.goods, 'code')
item.upgradeGoodsName = item.goodsSubOrder.upgradeGoodsName item.upgradeGoodsName = this.toJoinString(item.goods, 'name')
item.divisionStatusName = divistionStatus[item.orderDivision.divisionStatus - 1] item.divisionStatusName = divistionStatus[item.divisionStatus - 1]
item.customerName = item.customerName || '--' item.customerName = item.customerName || '--'
item.standNo = item.standNo || '--' item.standNo = item.standNo || '--'
item.divisionMoney = item.divisionMoney || '--' item.divisionMoney = item.divisionMoney || '--'
...@@ -557,6 +556,17 @@ export default { ...@@ -557,6 +556,17 @@ export default {
this.getMyTotalData(this.httpParam) this.getMyTotalData(this.httpParam)
}) })
}, },
toJoinString(arr, type) {
if (!arr) return ''
let temp1 = [],
temp2 = []
arr.forEach(item => {
temp1.push(item.upgradeGoodsName)
temp2.push(item.upgradeGoodsCommodityCode)
})
if (type == 'code') return temp2.join(',')
if (type == 'name') return temp1.join(',')
},
// 表格分页获取数据 // 表格分页获取数据
tableRefreshData() { tableRefreshData() {
let temp = this.httpParam let temp = this.httpParam
......
...@@ -104,11 +104,11 @@ ...@@ -104,11 +104,11 @@
</div> </div>
<div class="box_bg_wrap mini_margin"> <div class="box_bg_wrap mini_margin">
<div class="tab_wrap"> <div class="tab_wrap">
<!-- <div class="tab_line flex_sc" :style="accountLevel == 4 ? 'width:48%' : 'width:32%'"> --> <div class="tab_line flex_sc" :style="accountLevel == 4 ? 'width:48%' : 'width:32%'">
<div class="tab_line flex_sc" :style="accountLevel == 4 ? 'width:32%' : 'width:16%'"> <!-- <div class="tab_line flex_sc" :style="accountLevel == 4 ? 'width:32%' : 'width:16%'"> -->
<template v-for="(item, index) in tabList"> <template v-for="(item, index) in tabList">
<!-- <div :key="index" class="tab_element_wrap" :style="accountLevel == 4 ? 'width:33.33%' : 'width:50%'" @click="changeTab(index)"> --> <div :key="index" class="tab_element_wrap" :style="accountLevel == 4 ? 'width:33.33%' : 'width:50%'" @click="changeTab(index)">
<div :key="index" class="tab_element_wrap" :style="accountLevel == 4 ? 'width:50%' : 'width:100%'" @click="changeTab(index)"> <!-- <div :key="index" class="tab_element_wrap" :style="accountLevel == 4 ? 'width:50%' : 'width:100%'" @click="changeTab(index)"> -->
<div class="tab_item h13_title flex_cc" :class="curTabIndex == index ? 'tab_item_active' : ''">{{ item }}</div> <div class="tab_item h13_title flex_cc" :class="curTabIndex == index ? 'tab_item_active' : ''">{{ item }}</div>
</div> </div>
</template> </template>
...@@ -121,17 +121,17 @@ ...@@ -121,17 +121,17 @@
<template v-if="curTabIndex == 1"> <template v-if="curTabIndex == 1">
<upgrade-order></upgrade-order> <upgrade-order></upgrade-order>
</template> </template>
<!-- <template v-if="curTabIndex == 2"> <template v-if="curTabIndex == 2">
<my-fashionable-order></my-fashionable-order> <my-fashionable-order></my-fashionable-order>
</template> --> </template>
</template> </template>
<template v-if="accountLevel != 4"> <template v-if="accountLevel != 4">
<template v-if="curTabIndex == 0"> <template v-if="curTabIndex == 0">
<upgrade-order :list="storeList"></upgrade-order> <upgrade-order :list="storeList"></upgrade-order>
</template> </template>
<!-- <template v-if="curTabIndex == 1"> <template v-if="curTabIndex == 1">
<my-fashionable-order :list="storeList"></my-fashionable-order> <my-fashionable-order :list="storeList"></my-fashionable-order>
</template> --> </template>
</template> </template>
</div> </div>
</div> </div>
...@@ -172,8 +172,8 @@ export default { ...@@ -172,8 +172,8 @@ export default {
dateType: 'date', dateType: 'date',
dateplaceholder: '选择日期', dateplaceholder: '选择日期',
showMore: true, showMore: true,
// tabList: ['精品礼券领取订单', '精品升级订单', '我的分账'], tabList: ['精品礼券领取订单', '精品升级订单', '我的分账'],
tabList: ['精品礼券领取订单', '精品升级订单'], // tabList: ['精品礼券领取订单', '精品升级订单'],
curTabIndex: 0, curTabIndex: 0,
customName: '', customName: '',
hxstatus: '', hxstatus: '',
...@@ -198,8 +198,8 @@ export default { ...@@ -198,8 +198,8 @@ export default {
const { session } = this.$globalState const { session } = this.$globalState
this.accountLevel = session.accountLevel this.accountLevel = session.accountLevel
if (session.accountLevel != 4) { if (session.accountLevel != 4) {
// this.tabList = ['订单明细', '分账明细'] this.tabList = ['订单明细', '分账明细']
this.tabList = ['订单明细'] // this.tabList = ['订单明细']
this.toGet4SStore() this.toGet4SStore()
} }
// 获取上一次打开的状态 // 获取上一次打开的状态
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!