Commit f92b0a5c by 杨北旺

同步我的分账

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