Commit f888ba0d by 王琦琳

Merge branch 'dev_v4.20.0' into 'develop'

Dev v4.20.0

See merge request !1
2 parents c14d5bb3 601f7ca6
{ {
"name": "ordermanage", "name": "finance",
"version": "1.0.0", "version": "1.0.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
...@@ -6510,9 +6510,9 @@ ...@@ -6510,9 +6510,9 @@
} }
}, },
"glsx-common": { "glsx-common": {
"version": "2.0.8", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/glsx-common/-/glsx-common-2.0.8.tgz", "resolved": "https://registry.npmjs.org/glsx-common/-/glsx-common-2.1.0.tgz",
"integrity": "sha512-hKt/SNFu+NslOHWvDLxmRwUkINBrnATTYIkOj+jmcx5RqfXIbMgEipzFGbCICWMlYYoecwRiJ6341sstPCCHLQ==", "integrity": "sha512-wlUFgrZkJODh5MNpnVaT2zswkep1BUnvRgyhUABp2mDrt7d8yemnrdDYCfuBSWT7LCn+httSEieOEtm2XSlc0Q==",
"requires": { "requires": {
"axios": "^0.21.3", "axios": "^0.21.3",
"md5": "^2.3.0", "md5": "^2.3.0",
......
{ {
"name": "ordermanage", "name": "finance",
"version": "1.0.0", "version": "1.0.0",
"description": "A Vue.js project", "description": "A Vue.js project",
"private": true, "private": true,
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"dayjs": "^1.10.7", "dayjs": "^1.10.7",
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^2.0.8", "glsx-common": "^2.1.0",
"glsx-components": "^1.2.5", "glsx-components": "^1.2.5",
"rfdc": "^1.3.0", "rfdc": "^1.3.0",
"vue": "^2.6.10", "vue": "^2.6.10",
......
import { http } from '@/main' import { http } from '@/main'
const path = 'dj.api.' const path = 'dj.api.smartcarlife.orderDivision.'
const path2 = 'dj.smartcarlife.api.' const pathServicer = 'dj.api.smartcarlife.sevicerOrderDivision.'
// 获取素材详情
const getProductInfo = (params) => { // 获取服务商关联的园区店信息
const getPartnerYqListApi = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}goodsinfo.get.byId` params.routerMethod = `dj.smartcarlife.api.partnerMerchant.listYq`
return http({ return http({
url: 'rop-scrm-boutiquecoupon/router', url: 'rop-scrm-boutiquecoupon/router',
method: 'POST', method: 'POST',
...@@ -14,10 +15,10 @@ const getProductInfo = (params) => { ...@@ -14,10 +15,10 @@ const getProductInfo = (params) => {
}) })
} }
// 获取场景下类目 // 分账-列表
const getProductTypeBySceneId = (params) => { const getListApi = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}goodsCategoryConfiguration.queryGoodsCategoryBySceneId` params.routerMethod = `${path}page`
return http({ return http({
url: 'rop-scrm-boutiquecoupon/router', url: 'rop-scrm-boutiquecoupon/router',
method: 'POST', method: 'POST',
...@@ -26,10 +27,10 @@ const getProductTypeBySceneId = (params) => { ...@@ -26,10 +27,10 @@ const getProductTypeBySceneId = (params) => {
}) })
} }
// 查询产品列表 // 分账-统计
const getGoodsList = (params) => { const getCountApi = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}goodsinfo.list` params.routerMethod = `${path}count`
return http({ return http({
url: 'rop-scrm-boutiquecoupon/router', url: 'rop-scrm-boutiquecoupon/router',
method: 'POST', method: 'POST',
...@@ -38,4 +39,15 @@ const getGoodsList = (params) => { ...@@ -38,4 +39,15 @@ const getGoodsList = (params) => {
}) })
} }
export default { getGoodsList,getProductInfo, getProductTypeBySceneId } //导出
export function exportExcel(params) {
params.method = `scrm.api.partner.orderdivision.export`
return http({
url: 'rop-scrm-partner/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getPartnerYqListApi, getListApi, getCountApi, exportExcel }
import { http } from '@/main' import { http } from '@/main'
const path = 'dj.api.smartcarlife.' const path = 'dj.api.smartcarlife.'
const path2 = 'scrm.api.shopmall.'
// 查询列表
const getList = params => { const getList = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}ordermanage.page` params.routerMethod = `${path}goodsOrderProfitAllocation.page.byOrder`
return http({ return http({
url: 'rop-scrm-boutiquecoupon/router', url: 'rop-scrm-boutiquecoupon/router',
method: 'POST', method: 'POST',
...@@ -14,9 +14,10 @@ const getList = params => { ...@@ -14,9 +14,10 @@ const getList = params => {
}) })
} }
const getOrderDetail = params => { // 统计
const getListTotal = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}advanceOrder.detail` params.routerMethod = `${path}goodsOrderProfitAllocation.page.count`
return http({ return http({
url: 'rop-scrm-boutiquecoupon/router', url: 'rop-scrm-boutiquecoupon/router',
method: 'POST', method: 'POST',
...@@ -25,9 +26,10 @@ const getOrderDetail = params => { ...@@ -25,9 +26,10 @@ const getOrderDetail = params => {
}) })
} }
const getOrderCount = params => { // 财务列表主订单明细
const mainOrderDetail = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}ordermanage.count` params.routerMethod = `${path}goodsOrderProfitAllocation.mainOrder.detail`
return http({ return http({
url: 'rop-scrm-boutiquecoupon/router', url: 'rop-scrm-boutiquecoupon/router',
method: 'POST', method: 'POST',
...@@ -36,10 +38,10 @@ const getOrderCount = params => { ...@@ -36,10 +38,10 @@ const getOrderCount = params => {
}) })
} }
// 众筹活动订单查询列表 // 财务列表子订单明细
const shopmallOrderList = params => { export function subOrderDetail(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}shopmallOrder.pageList` params.routerMethod = `${path}goodsOrderProfitAllocation.subOrder.detail`
return http({ return http({
url: 'rop-scrm-boutiquecoupon/router', url: 'rop-scrm-boutiquecoupon/router',
method: 'POST', method: 'POST',
...@@ -48,49 +50,14 @@ const shopmallOrderList = params => { ...@@ -48,49 +50,14 @@ const shopmallOrderList = params => {
}) })
} }
// 订单详情 export function exportExcel(params) {
const goodsOrderDetail = params => { params.method = `scrm.api.partner.orderProfitAllocation.export`
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}goodsOrder.detail`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
//根据园区店商户号获取4s列表
const getServiceStore = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.scenemerchantref.query4SRefByYqShop`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
//众筹订单列表
// const getListApi = params => {
// params.method = `${path2}order.noSessionPage`
// params.routerMethod = `${path2}order.noSessionPage`
// return http({
// url: 'rop-scrm-boutiquecoupon/router',
// method: 'POST',
// data: params,
// sign: true
// })
// }
const getListApi = params => {
params.method = `${path2}order.noSessionPage`
return http({ return http({
url: 'rop-scrm-shopmall/router', url: 'rop-scrm-partner/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
export default { getList, getOrderDetail, getOrderCount, shopmallOrderList, goodsOrderDetail, getServiceStore, getListApi } export default { getList, getListTotal, mainOrderDetail, subOrderDetail, exportExcel }
import { http } from '@/main' import { http } from '@/main'
// const path = 'dj.api.smartcarlife.' const path = 'dj.api.smartcarlife.'
const path2 = 'dj.api.' const path2 = 'dj.api.'
/** 获取园区店列表 - 园区店 */ /** 获取园区店列表 - 园区店 */
...@@ -15,6 +15,18 @@ const getParkStore = params => { ...@@ -15,6 +15,18 @@ const getParkStore = params => {
}) })
} }
// 获取当前登录账号可见的园区店列表
const getyqMerchantList = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}permission.yqMerchant.list`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
/** 获取园区店列表 - 流量来源 */ /** 获取园区店列表 - 流量来源 */
const getServiceStore = params => { const getServiceStore = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale` params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
...@@ -39,4 +51,4 @@ const getChannelType = params => { ...@@ -39,4 +51,4 @@ const getChannelType = params => {
}) })
} }
export default { getParkStore, getServiceStore, getChannelType } export default { getParkStore, getServiceStore, getChannelType, getyqMerchantList }
import { http } from '@/main'
const path = 'dj.api.smarcarlife.'
const path2 = 'dj.api.goodsInfo.'
const path3 = 'dj.api.smartcarlife.'
// 分页查询采购订单
const getPurchaseOrderList = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseOrder.page`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 采购订单取消/审核
const purchaseOrderCancelOrCheck = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseOrder.cancelOrCheck`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 查看采购订单
const purchaseOrderDetail = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseOrder.view`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 分页查询采购商城素材信息
const listWithPagePurchaseInfo = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path2}listWithPage.purchaseInfo`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取当前登录园区店商户收货地址
const addressGet = (params = {}) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}yqMerchantDeliveryAddress.get`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 保存园区店商户收货地址
const addressSave = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}yqMerchantDeliveryAddress.save`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 按商品类目分组获取购物车列表
const listGroupByGoodsType = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseShoppingCar.listGroupByGoodsType`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 更新购物车商品选中标识
const updateSelectedFlag = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseShoppingCar.updateSelectedFlag`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 移除购物车商品
const shoppingCarRemove = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseShoppingCar.remove`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 添加到购物车
const shoppingCarAdd = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseShoppingCar.add`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 修改购物车商品数量
export function shoppingCarUpdateNumber(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseShoppingCar.updateNumber`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params
})
}
// 添加采购订单
export function purchaseOrderAdd(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseOrder.add`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
export function exportExcel(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.smarcarlife.purchaseOrder.export`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 采购订单入库
export function purchaseOrderPutIn(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}purchaseOrder.putIn`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取下单/入库门店
export function getMerchantList(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path3}permission.yqMerchant.list`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 确认发货
// export function purchaseOrderConfirmDelivery(data) {
// params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
// data.routerMethod = `${path}purchaseOrder.confirmDelivery`
// return http(data)
// }
export default { getMerchantList,purchaseOrderPutIn, exportExcel, shoppingCarUpdateNumber, purchaseOrderAdd, shoppingCarAdd, shoppingCarRemove, updateSelectedFlag, listGroupByGoodsType, getPurchaseOrderList, purchaseOrderCancelOrCheck, purchaseOrderDetail, listWithPagePurchaseInfo, addressGet, addressSave }
\ No newline at end of file \ No newline at end of file
...@@ -182,7 +182,8 @@ function getExplorer() { ...@@ -182,7 +182,8 @@ function getExplorer() {
return browserType return browserType
} }
function exportFn(url) { export const exportFn = url => {
url = url + '?timestamp=' + new Date().getTime()
let browserType = getExplorer() let browserType = getExplorer()
if (browserType == 'QQ') { if (browserType == 'QQ') {
window.open(url) window.open(url)
...@@ -193,3 +194,116 @@ function exportFn(url) { ...@@ -193,3 +194,116 @@ function exportFn(url) {
iframe.src = url iframe.src = url
document.body.appendChild(iframe) document.body.appendChild(iframe)
} }
// 订单类型
export const orderTypeList = [
{
confId: '1',
confLabel: '正常'
},
{
confId: '2',
confLabel: '异常'
},
{
confId: '3',
confLabel: '正常测试'
},
{
confId: '4',
confLabel: '异常测试'
},
{
confId: '5',
confLabel: '未收款'
},
{
confId: '-1',
confLabel: '无'
}
]
// 分账状态
export const divisionStatusList = [
{
confId: '1',
confLabel: '待分账'
},
{
confId: '2',
confLabel: '分账中'
},
{
confId: '3',
confLabel: '分账成功'
},
{
confId: '4',
confLabel: '分账失败'
},
{
confId: '5',
confLabel: '异常'
}
]
// 分账方式
export const divisionTypeList = [
{
confId: '1',
confLabel: '线下对账'
},
{
confId: '2',
confLabel: '线上分账'
}
]
// 支付方式
export const payTypeList = [
{
confId: '1',
confLabel: '微信支付'
},
{
confId: '2',
confLabel: '4S店支付'
},
{
confId: '3',
confLabel: 'POS机收款'
},
{
confId: '4',
confLabel: '支付宝支付'
}
]
// 园区店模式/经营模式
export const manageTypeList = [
{ confId: 0, confLabel: '园区店' },
{ confId: 1, confLabel: '驻店' }
]
// 所属场景
export const sceneList = {
1: '精品升级',
2: '次新车转化',
3: '售后众筹',
0: '会员权益/升级'
}
export const proportionType = {
1: '(毛利)',
2: '(收入)',
3: '(固定金额)',
4: '(产值-流量成本)',
5: '(产值-流量成本-其他费用不包含产品成本)',
6: '(产值-流量成本-其他费用包含产品成本)'
}
export const targetType = {
1: '流量方',
2: '服务商',
3: '平台方'
}
// import Vue from 'vue' // import Vue from 'vue'
import { Message, MessageBox, Loading } from "element-ui" import { Message, MessageBox, Loading } from 'element-ui'
// import moment from 'moment' // import moment from 'moment'
import dayjs from "dayjs" import dayjs from 'dayjs'
let loadingInstance = "" let loadingInstance = ''
export const Util = { export const Util = {
/** /**
...@@ -16,20 +16,20 @@ export const Util = { ...@@ -16,20 +16,20 @@ export const Util = {
* confirmButtonColor 确认按钮颜色 * confirmButtonColor 确认按钮颜色
* cancelButtonColor 取消按钮颜色 * cancelButtonColor 取消按钮颜色
*/ */
msg: function (options) { msg: function(options) {
MessageBox({ MessageBox({
title: options.title || "", title: options.title || '',
type: options.type || "error", type: options.type || 'error',
message: options.message || "", message: options.message || '',
className: options.className || "", className: options.className || '',
showCancelButton: options.showCancelButton || false, showCancelButton: options.showCancelButton || false,
confirmButtonText: options.confirmButtonText || "确认", confirmButtonText: options.confirmButtonText || '确认',
cancelButtonText: options.cancelButtonText || "取消", cancelButtonText: options.cancelButtonText || '取消',
confirmButtonColor: options.confirmButtonColor || "#1989fa", confirmButtonColor: options.confirmButtonColor || '#1989fa',
cancelButtonColor: options.cancelButtonColor || "#000", cancelButtonColor: options.cancelButtonColor || '#000',
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
callback: function (action, done) { callback: function(action, done) {
if (action == "confirm") { if (action == 'confirm') {
if (options.success) { if (options.success) {
options.success(done) options.success(done)
} }
...@@ -55,56 +55,55 @@ export const Util = { ...@@ -55,56 +55,55 @@ export const Util = {
/** /**
* 提示框 * 提示框
*/ */
Info: function (options) { Info: function(options) {
Message({ Message({
message: options.message || "提示", message: options.message || '提示',
type: options.type || "error", type: options.type || 'error',
duration: options.time || 2000, duration: options.time || 2000,
onClose: options.onClose || "" onClose: options.onClose || ''
}) })
}, },
/** /**
* 轻提示 * 轻提示
*/ */
Tips: function (options) { Tips: function(options) {
Message({ Message({
message: options.message || "提示", message: options.message || '提示',
duration: options.duration || 3000, duration: options.duration || 3000,
type: options.type || "text", type: options.type || 'text',
icon: options.icon || "" icon: options.icon || ''
}) })
}, },
/** /**
* loading * loading
*/ */
loading: function (message) { loading: function(message) {
loadingInstance = Loading.service({ loadingInstance = Loading.service({
text: message || "加载中..." text: message || '加载中...'
}) })
}, },
/** /**
* 关闭loading * 关闭loading
*/ */
closeLoading: function () { closeLoading: function() {
loadingInstance.close() loadingInstance.close()
}, },
/** /**
* 校验手机号码格式 * 校验手机号码格式
*/ */
checkPhone: function (mobile) { checkPhone: function(mobile) {
const myreg = const myreg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
/^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
return myreg.test(mobile) return myreg.test(mobile)
}, },
/** /**
* 校验固定电话 * 校验固定电话
*/ */
validationTel: function (tel) { validationTel: function(tel) {
const reg = /^0[\d]{2,3}-[\d]{7,8}$/ const reg = /^0[\d]{2,3}-[\d]{7,8}$/
return reg.test(tel) return reg.test(tel)
}, },
...@@ -112,17 +111,15 @@ export const Util = { ...@@ -112,17 +111,15 @@ export const Util = {
/** /**
* 是否特殊字符 * 是否特殊字符
*/ */
isSpecialLetter: function (str) { isSpecialLetter: function(str) {
const reg = new RegExp( const reg = new RegExp("[`~!@#$^&*=|{}':;',\\[\\]<>?~!@#¥……&*——|{}【】‘;:”“'。,、? ]")
"[`~!@#$^&*=|{}':;',\\[\\]<>?~!@#¥……&*——|{}【】‘;:”“'。,、? ]"
)
return reg.test(str) return reg.test(str)
}, },
/** /**
* 只能输入英文字母和数字,不能输入中文 * 只能输入英文字母和数字,不能输入中文
*/ */
validationInput: function (str) { validationInput: function(str) {
const reg = /[^\w\.\/]/gi // eslint-disable-line const reg = /[^\w\.\/]/gi // eslint-disable-line
return reg.test(str) return reg.test(str)
}, },
...@@ -130,29 +127,27 @@ export const Util = { ...@@ -130,29 +127,27 @@ export const Util = {
/** /**
* 获取当前时间 * 获取当前时间
*/ */
getCurrentDate: function () { getCurrentDate: function() {
const time = new Date() const time = new Date()
const y = time.getFullYear() const y = time.getFullYear()
const m = time.getMonth() + 1 const m = time.getMonth() + 1
const d = time.getDate() const d = time.getDate()
return { return {
date: y + "/" + m + "/" + d date: y + '/' + m + '/' + d
} }
}, },
/** /**
* 获取浏览器参数 * 获取浏览器参数
*/ */
getUrlParams: function (name) { getUrlParams: function(name) {
const vars = [] const vars = []
let hash let hash
const oParams = {} const oParams = {}
const hashes = window.location.href const hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&')
.slice(window.location.href.indexOf("?") + 1)
.split("&")
for (let i = 0; i < hashes.length; i++) { for (let i = 0; i < hashes.length; i++) {
hash = hashes[i].split("=") hash = hashes[i].split('=')
vars.push(hash[0]) vars.push(hash[0])
oParams[hash[0]] = hash[1] oParams[hash[0]] = hash[1]
} }
...@@ -167,7 +162,7 @@ export const Util = { ...@@ -167,7 +162,7 @@ export const Util = {
/** /**
* 根据当前时间,计算往后30天的日期 * 根据当前时间,计算往后30天的日期
*/ */
getAfterDate: function (day) { getAfterDate: function(day) {
const date1 = new Date() const date1 = new Date()
const date2 = new Date(date1) const date2 = new Date(date1)
let time = 30 let time = 30
...@@ -176,8 +171,7 @@ export const Util = { ...@@ -176,8 +171,7 @@ export const Util = {
} }
date2.setDate(date1.getDate() + time) date2.setDate(date1.getDate() + time)
const _date = const _date = date2.getFullYear() + '-' + (date2.getMonth() + 1) + '-' + date2.getDate()
date2.getFullYear() + "-" + (date2.getMonth() + 1) + "-" + date2.getDate()
return { return {
date: _date, date: _date,
...@@ -190,8 +184,8 @@ export const Util = { ...@@ -190,8 +184,8 @@ export const Util = {
/** /**
* 日期格式转换 * 日期格式转换
*/ */
dateFormate: function (str, type) { dateFormate: function(str, type) {
let txt = "YYYY-MM-DD" let txt = 'YYYY-MM-DD'
if (type) { if (type) {
txt = type txt = type
} }
...@@ -202,9 +196,9 @@ export const Util = { ...@@ -202,9 +196,9 @@ export const Util = {
/** /**
* 字段截取 * 字段截取
*/ */
cutStr: function (str, num) { cutStr: function(str, num) {
if (!str) { if (!str) {
return "" return ''
} }
let m = 10 let m = 10
...@@ -213,7 +207,7 @@ export const Util = { ...@@ -213,7 +207,7 @@ export const Util = {
m = num m = num
} }
if (str.length > m) { if (str.length > m) {
n = str.slice(0, m) + "..." n = str.slice(0, m) + '...'
} }
return n return n
...@@ -225,8 +219,8 @@ export const Util = { ...@@ -225,8 +219,8 @@ export const Util = {
// * console.log(bar===foo) false // * console.log(bar===foo) false
// * @param {*} obj // * @param {*} obj
// */ // */
deepClone: function (obj) { deepClone: function(obj) {
const clone = require("rfdc")({ proto: false, circles: false }) const clone = require('rfdc')({ proto: false, circles: false })
return clone(obj) return clone(obj)
}, },
// deepClone: function (obj) { // deepClone: function (obj) {
...@@ -257,10 +251,10 @@ export const Util = { ...@@ -257,10 +251,10 @@ export const Util = {
* url下载文件 * url下载文件
* *
*/ */
downLoadFile: function (url) { downLoadFile: function(url) {
// console.log(row) // console.log(row)
// return // return
const Temp = document.createElement("a") const Temp = document.createElement('a')
// Temp.href = process.env.VUE_APP_BASE_URL + '/article/export.do?articleId=' + row.id // Temp.href = process.env.VUE_APP_BASE_URL + '/article/export.do?articleId=' + row.id
Temp.href = url Temp.href = url
// console.log(url) // console.log(url)
...@@ -275,8 +269,8 @@ export const Util = { ...@@ -275,8 +269,8 @@ export const Util = {
* @param {Object} type: 默认不传 ==>全部小写;传1 ==>全部大写;传2 ==>首字母大写 * @param {Object} type: 默认不传 ==>全部小写;传1 ==>全部大写;传2 ==>首字母大写
* 将json的key值进行大小写转换 * 将json的key值进行大小写转换
*/ */
jsonKeysToCase: function (json, type) { jsonKeysToCase: function(json, type) {
if (typeof json == "object") { if (typeof json == 'object') {
var tempJson = JSON.parse(JSON.stringify(json)) var tempJson = JSON.parse(JSON.stringify(json))
toCase(tempJson) toCase(tempJson)
return tempJson return tempJson
...@@ -285,15 +279,15 @@ export const Util = { ...@@ -285,15 +279,15 @@ export const Util = {
} }
function toCase(json) { function toCase(json) {
if (typeof json == "object") { if (typeof json == 'object') {
if (Array.isArray(json)) { if (Array.isArray(json)) {
json.forEach(function (item) { json.forEach(function(item) {
toCase(item) toCase(item)
}) })
} else { } else {
for (var key in json) { for (var key in json) {
var item = json[key] var item = json[key]
if (typeof item == "object") { if (typeof item == 'object') {
toCase(item) toCase(item)
} }
delete json[key] delete json[key]
...@@ -304,10 +298,7 @@ export const Util = { ...@@ -304,10 +298,7 @@ export const Util = {
break break
case 2: case 2:
// key值首字母大写,其余小写 // key值首字母大写,其余小写
json[ json[key.substring(0, 1).toLocaleUpperCase() + key.substring(1).toLocaleLowerCase()] = item
key.substring(0, 1).toLocaleUpperCase() +
key.substring(1).toLocaleLowerCase()
] = item
break break
default: default:
// 默认key值全部小写 // 默认key值全部小写
...@@ -321,21 +312,21 @@ export const Util = { ...@@ -321,21 +312,21 @@ export const Util = {
}, },
// 判断字段为空时显示 // 判断字段为空时显示
fieldShow: function (field, show) { fieldShow: function(field, show) {
return field || show return field || show
}, },
// 整数补零显示两位小数 // 整数补零显示两位小数
returnFloat: function (num) { returnFloat: function(num) {
num = num.toString() num = num.toString()
if (num.indexOf(".") != -1) { if (num.indexOf('.') != -1) {
let newVal = num.split(".") let newVal = num.split('.')
if (newVal[1].length == 1) { if (newVal[1].length == 1) {
newVal = newVal.join(".") newVal = newVal.join('.')
newVal += "0" newVal += '0'
num = newVal num = newVal
} }
} else { } else {
num += ".00" num += '.00'
} }
return num return num
} }
......
...@@ -17,7 +17,7 @@ export const fetchConfig = function(isEnv = true) { ...@@ -17,7 +17,7 @@ export const fetchConfig = function(isEnv = true) {
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
// return Promise.resolve(cfg) // return Promise.resolve(cfg)
// } // }
let params = { moduleName: 'ordermanage', mockUrl: 'https://oss-config.glsx.com.cn/mock/64423183e60bb539e414ec67/ordermanage/config', httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } } let params = { moduleName: 'finance', mockUrl: 'https://oss-config.glsx.com.cn/mock/64560af39bfdc8942feaa6f4/finance/config', httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } }
return utils.getConfig(params) return utils.getConfig(params)
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config') // return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
// return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=home').then(res => res) // return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=home').then(res => res)
......
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
*/ */
import Vue from 'vue' import Vue from 'vue'
import apis from './api' import apis from './api'
import {optionalChaining} from './utils/chaining' // 针对template模板中使用可选链操作符
// import chaining from '@/plugins/chaining'
import { optionalChaining } from './utils/chaining'
import './public-path' import './public-path'
import '@/assets/css/public.scss' import '@/assets/css/public.scss'
import '@/components' import '@/components'
...@@ -19,6 +21,7 @@ import { start } from '@/setup' ...@@ -19,6 +21,7 @@ import { start } from '@/setup'
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.prototype.$apis = apis Vue.prototype.$apis = apis
Vue.prototype.$$ = optionalChaining Vue.prototype.$$ = optionalChaining
// Vue.use(chaining)
Vue.prototype.size = 'small' Vue.prototype.size = 'small'
Vue.prototype.$EventBus = new Vue() Vue.prototype.$EventBus = new Vue()
start() start()
......
// 针对template模板中使用可选链操作符
const chaining = {
install(vue) {
const optionalChaining = (obj, ...rest) => {
let tmp = obj
for (const key in rest) {
const name = rest[key]
tmp = tmp?.[name]
}
return tmp || ""
}
// const test = (obj, ...rest) => {
// let tmp = obj
// for (const key in rest) {
// const name = rest[key]
// tmp = tmp?.[name]
// }
// return tmp || ''
// }
// 添加实例方法
vue.prototype.$$ = optionalChaining
// vue.prototype.$sy = test
}
}
export default chaining
...@@ -3,19 +3,30 @@ const staticRoutes = Object.freeze([ ...@@ -3,19 +3,30 @@ const staticRoutes = Object.freeze([
name: 'default', name: 'default',
path: '/' path: '/'
}, },
//财务列表
{ {
name: 'orderManage', name: 'financeManage',
path: '/orderManage/index', path: '/financeManage/index',
component: resolve => require([`@/views/orderManage/index.vue`], resolve), component: resolve => require([`@/views/financeManage/index.vue`], resolve),
meta: {} meta: {}
}, },
//精品升级订单详情 //财务-查看明细
{ {
name: 'orderDetail', name: 'financeDetail',
path: '/orderManage/orderDetail', path: '/financeManage/financeDetail',
component: resolve => require([`@/views/orderManage/orderDetail.vue`], resolve), component: resolve => require([`@/views/financeManage/financeDetail.vue`], resolve),
meta: {}
},
//我的分账
{
name: 'serviceAccount',
path: '/serviceAccount/index',
component: resolve => require([`@/views/serviceAccount/index.vue`], resolve),
meta: {} meta: {}
} }
......
export const optionalChaining = (obj, ...rest) => { export const optionalChaining = (obj, ...rest) => {
return rest.reduce((newObj, key) => newObj[key], obj)
}
\ No newline at end of file \ No newline at end of file
return rest.reduce((newObj, key) => newObj?.[key], obj) || ''
}
<!-- 专区管理 -->
<template>
<div class="marketing p-t-20">
<div class="m-b-20">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建</el-button>
</div>
<div class="container">
<el-form :inline="true">
<el-form-item label="专区名称">
<el-input style="width: 215px;" :size="size" v-model="searchForm.zoneName"></el-input>
</el-form-item>
<el-form-item class="search-btns">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="default" @click="handleReset">查询</el-button>
</el-form-item>
</el-form>
<!-- 表格区域 开始 -->
<GLTable
ref="zoneRef"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
export default {
name: 'zoneList',
data() {
return {
size: 'small',
url: url,
searchForm: {
zoneName: '',
createDate: []
},
tableSearchForm: {},
// 搜索
searchFormData: [
{
label: '专区名称',
name: 'zoneName',
type: 'input',
maxlength: 20
},
{
label: '创建日期',
name: 'createDate',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
}
],
// 表格
getListApi: this.$apis.zoneList.getZoneListApi,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '专区名称',
prop: 'zoneName'
},
{
label: '创建日期',
prop: 'createdDate',
width: '180',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }
}
},
mounted() {},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
params.zoneType = '2' //专区类型(1发现频道,2商城专区)
if (this.searchForm.createDate.length) {
params.startTime = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.endTime = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
delete params.createDate
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
delete this.tableSearchForm.createDate
resolve()
})
},
// 1-新增;2-编辑
handleEdit(addOrEdit, row) {
this.$message({
type: 'success',
message: addOrEdit == '1' ? '新增' : '编辑'
})
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.zoneRef.data.length ? (this.$refs.zoneRef.tableHeightValues = '') : this.$refs.zoneRef.setTableHeightFun()
},
handleSearch() {
this.$refs.zoneRef.refreshTable()
},
handleReset() {
this.searchForm = {
zoneName: ''
}
this.handleSearch()
}
}
}
</script>
<style scoped>
.marketing .search-btns {
float: right;
margin-right: 0;
}
</style>
<!-- 对账详情 -->
<template>
<d2-container class="finnance_detail">
<div class="finnance_table_wrap d2-container-content">
<p class="finnance_title">
对账详情
</p>
<table v-if="isSubOrder"
class="finnance_table">
<tr>
<td rowspan="3"
class="product_td">
<img class="product_img"
:src="$$(detail.subOrder,'upgradeThumbUrl')">
</td>
<td class="lb">
商品名称
</td>
<td class="lb">
{{ $$(detail.subOrder,'upgradeGoodsName') }}
</td>
<td class="lb">
商品别名
</td>
<td class="lb">
{{ $$(detail.subOrder,'upgradeGoodsAlias') }}
</td>
<td class="lb">
品牌商
</td>
<td>{{ $$(detail.subOrder,'upgradeBrandMerchantName') }}</td>
</tr>
<tr>
<td class="lb">
商品类别
</td>
<td>{{ $$(detail.subOrder,'upgradeGoodsTypeName') }}</td>
<td class="lb">
数量
</td>
<td>{{ $$(detail.subOrder,'number') }}件</td>
<td rowspan="2"
class="lb">
支付金额
</td>
<td rowspan="2">
{{ detail.totalPrice ? '¥ ' + detail.totalPrice : '' }}
</td>
</tr>
<tr>
<td class="lb">
商品零售价
</td>
<td>
{{ $$(detail.subOrder,'upgradeRetailPrice') ? '¥ '+$$(detail.subOrder,'upgradeRetailPrice') : '' }}
</td>
<td class="lb">
优惠折扣
</td>
<td>{{ $$(detail.subOrder,'upgradeDiscount') }}折</td>
</tr>
</table>
<table class="finnance_table">
<!-- 订单信息 -->
<tr>
<td colspan="4"
class="finnance_table_title">
订单信息
</td>
</tr>
<tr>
<td class="lb">
订单编号
</td>
<td class="sb">
{{ isSubOrder?detail.subOrderCode:detail.orderCode }}
</td>
<td class="lb">
支付方式
</td>
<td class="sb">
{{ payTypeOpts[$$(detail.goodsOrder,'payOrder','payType')] }}
</td>
</tr>
<tr>
<td class="lb">
下单时间
</td>
<td>
{{ $$(detail.goodsOrder,'orderTime') }}
</td>
<td class="lb">
{{ +$$(detail.goodsOrder,'payOrder','payType') === 2 ? '交易流水号' : '交易参考号' }}
</td>
<td>
{{ $$(detail.goodsOrder,'payOrder','tradeNo') }}
</td>
</tr>
<tr>
<td class="lb">
订单场景
</td>
<td>
{{ sceneTypeOpts[detail.sceneType] }}
</td>
<td class="lb">
支付时间
</td>
<td>
{{ $$(detail.goodsOrder,'payOrder','successDate') }}
</td>
</tr>
<tr v-show="isSubOrder">
<td class="lb">
主订单编号
</td>
<td colspan="3">
{{ detail.orderCode }}
</td>
</tr>
</table>
<table class="finnance_table">
<tr>
<td colspan="4"
class="finnance_table_title">
客户信息
</td>
</tr>
<tr>
<td class="lb">
客户姓名
</td>
<td class="sb">{{ $$(detail.goodsOrder,'customer','customerName') }}</td>
<td class="lb">
性别
</td>
<td class="sb">{{ customerSexOpts[$$(detail.goodsOrder,'customer','customerSex')] }}</td>
</tr>
<tr>
<td class="lb">
车架号
</td>
<td>{{ $$(detail.goodsOrder,'customer','standNo') }}</td>
<td class="lb">
车型
</td>
<td>
<!-- {{ $$(detail.goodsOrder,'customer','carBrand') + ' - ' + $$(detail.goodsOrder,'customer','carChildsBrandName') + ' - ' + $$(detail.goodsOrder,'customer','carSeriesName') }} -->
{{ detail.carInfo }}
</td>
</tr>
<tr>
<td class="lb">
流量来源
</td>
<td>{{ $$(detail.goodsOrder,'merchantName') }}</td>
<td class="lb">
销售顾问
</td>
<td>{{ $$(detail.goodsOrder,'employeeName') }}</td>
</tr>
<tr v-if="detail.sceneType == 1 || detail.sceneType == 2 || detail.sceneType == 3">
<td class="lb">
<!-- 园区店 -->
服务对接
</td>
<td>{{ $$(detail.goodsOrder,'sellerMerchantName') }}</td>
<td class="lb">
转化员
</td>
<td>{{ $$(detail.goodsOrder,'sellerName') }}</td>
</tr>
</table>
<table class="finnance_table">
<tr>
<td colspan="4"
class="finnance_table_title">
支付信息
</td>
</tr>
<tr>
<td class="lb">
支付金额
</td>
<td class="sb">{{ detail.totalPrice?('¥ '+detail.totalPrice):'¥0' }}</td>
<td class="lb">
入账手续费
</td>
<td class="sb">
{{ detail.serviceCharge?('¥ '+detail.serviceCharge):'¥0' }}
</td>
</tr>
<tr>
<td class="lb">
实收金额
</td>
<td>
{{ detail.actualIncomeMoney?('¥ '+detail.actualIncomeMoney):'¥0' }}
</td>
<td class="lb">
总分账金额
</td>
<td>{{ detail.actualIncomeMoney?('¥ '+detail.actualIncomeMoney):'¥0' }}</td>
</tr>
<tr>
<td class="lb">
商品成本
</td>
<td>{{ detail.goodsCost?('¥ '+detail.goodsCost):'¥0' }}</td>
<td class="lb">
回收成本
</td>
<td>{{ detail.recoveryCost?('¥ '+detail.recoveryCost):'¥0' }}</td>
</tr>
<tr>
<td class="lb">
虚拟对账成本
</td>
<td>{{ detail.virtualAccountCost?('¥ '+detail.virtualAccountCost):'¥0' }}</td>
<td class="lb">
</td>
<td></td>
</tr>
</table>
<table class="finnance_table"
v-if="ledgerData.length">
<tr>
<td colspan="5"
class="finnance_table_title">
分账信息
</td>
</tr>
<tr>
<td class="lb_respond sb">
分账类目
</td>
<td class="lb_respond sb">
分账主体
</td>
<td class="lb_respond">
商户编号
</td>
<td class="lb_respond">
分账比例
</td>
<td class="lb_respond">
分账金额
</td>
</tr>
<tr v-for="(item,index) in ledgerData"
:key="index">
<td>
{{ item.expenseCategoryName }}
</td>
<td>
{{ targetTypeOpts[item.targetType] }}:{{ item.targetMerchantName?(item.targetType == 2 ? '-' :item.targetMerchantName):'-' }}
</td>
<td>
{{ item.targetMerchantId?(item.targetType == 2 ? '-' :item.targetMerchantId):'-' }}
</td>
<td>
{{ proportionTypeOpts[item.expenseCategoryCalculateType]?(proportionTypeOpts[item.expenseCategoryCalculateType]+item.expenseCategoryValue+'%' ):'-' }}
</td>
<td>{{ item.expenseCategoryResult?('¥ '+item.expenseCategoryResult):'¥0' }}</td>
</tr>
</table>
<!-- 审计需求先屏蔽 -->
<!-- <table class="finnance_table"
v-if="reconciliationData.length">
<tr>
<td colspan="5"
class="finnance_table_title">
对账信息
</td>
</tr>
<tr>
<td class="lb_respond sb">
对账类目
</td>
<td class="lb_respond sb">
分账主体
</td>
<td class="lb_respond">
商户编号
</td>
<td class="lb_respond">
分账比例
</td>
<td class="lb_respond">
分账金额
</td>
</tr>
<tr v-for="item in reconciliationData">
<td>
{{ item.expenseCategoryName }}
</td>
<td>
{{ targetTypeOpts[item.targetType] }}:{{ item.targetMerchantName?item.targetMerchantName:'-' }}
</td>
<td>
{{ item.targetMerchantId?item.targetMerchantId:'-' }}
</td>
<td>
{{ proportionTypeOpts[item.expenseCategoryCalculateType]?(proportionTypeOpts[item.expenseCategoryCalculateType]+item.expenseCategoryValue ):'-' }}
</td>
<td>{{ item.expenseCategoryResult?('¥ '+item.expenseCategoryResult):'¥0' }}</td>
</tr>
</table> -->
</div>
</d2-container>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { payType, sceneList, proportionType, targetType } from '@/common/constant'
export default {
name: 'FinanceDetail',
data() {
return {
isSubOrder: false,
customerSexOpts: {
1: '男',
2: '女'
},
payTypeOpts: deepClone(payType),
sceneTypeOpts: deepClone(sceneList),
proportionTypeOpts: deepClone(proportionType),
targetTypeOpts: deepClone(targetType),
detail: {},
ledgerData: [], // 分账信息
reconciliationData: [], // 对账信息
carInfo: '' //车型信息
}
},
mounted() {
const row = this.$route.query
console.log(row)
this.isSubOrder = !row.hasOwnProperty('subOrderProfitAllocations')
this.getDetail(row)
},
methods: {
getDetail(row) {
if (this.isSubOrder) {
this.$apis.finance.subOrderDetail({ subOrderCode: row.orderCode }).then(res => {
this.pushData(res)
})
} else {
this.$apis.finance.mainOrderDetail({ orderCode: row.orderCode }).then(res => {
this.pushData(res)
})
}
},
pushData(res) {
if (res.goodsOrder?.orderTime) {
res.goodsOrder.orderTime = Util.dateFormate(res.goodsOrder.orderTime, 'YYYY-MM-DD HH:mm:ss')
}
if (res.goodsOrder?.payOrder?.successDate) {
res.goodsOrder.payOrder.successDate = Util.dateFormate(res.goodsOrder.payOrder.successDate, 'YYYY-MM-DD HH:mm:ss')
}
this.detail = res
this.carInfo = ''
if (this.detail.goodsOrder && this.detail.goodsOrder.customer) {
let cus = this.detail.goodsOrder.customer
if (cus.carBrand) {
this.carInfo += cus.carBrand + '-'
}
if (cus.carChildsBrandName) {
this.carInfo += cus.carChildsBrandName + '-'
}
if (cus.carSeriesName) {
this.carInfo += cus.carSeriesName
}
}
const calculateds = res.expenseCategoryCalculateds
if (calculateds && calculateds.length > 0) {
calculateds.forEach(item => {
// if (item.ruleType == 1) { // 分账
// 审计需求先加过滤
if (item.ruleType == 1 && item.expenseCategoryId == 1) { // 分账
this.ledgerData.push(item)
} else if (item.ruleType == 3) { // 对账
this.reconciliationData.push(item)
}
})
}
},
}
}
</script>
<style lang="scss" scoped>
.finnance_detail {
padding: 20px;
.d2-container-content {
margin-top: 0 !important;
background-color: #fff;
}
}
.finnance_table_wrap {
padding: 20px;
max-width: 1000px;
margin: 0 auto;
font-size: 14px;
color: #333333;
.finnance_title {
font-size: 24px;
color: #0947c6;
font-weight: bold;
text-align: center;
margin-bottom: 20px;
}
}
.finnance_table {
box-sizing: border-box;
width: 100%;
background: #fff;
border-collapse: collapse;
tr {
vertical-align: middle;
display: table-row;
border-color: inherit;
// vertical-align: inherit;
}
td {
vertical-align: inherit;
}
&:first-of-type {
& > tr > td {
border-top: 1px solid #ccc;
}
}
& > tr > td {
border-top: none;
}
td {
border: 1px solid #ccc;
text-align: center;
// padding: 10px;
padding: 6px;
vertical-align: inherit;
&.p-l-45 {
padding-left: 45px;
}
&.p-l-55 {
padding-left: 55px;
}
&.grey {
background-color: #fafafa;
}
&.lb {
width: 6em;
text-align: center;
background-color: #fafafa;
}
&.sb {
width: 18em;
}
&.lb_respond {
text-align: center;
background-color: #fafafa;
}
&.lb_total {
width: 6em;
text-align: center;
}
&.finnance_table_title {
// color: #666;
font-size: 20px;
font-weight: bold;
padding: 15px;
text-align: left;
}
}
}
.blue {
color: #005adc;
}
.product_td {
width: 110px;
height: 110px;
font-size: 0;
.product_img {
display: inline-block;
width: 100%;
height: 100%;
}
}
</style>
<template>
<div class="activity">
<GLTabs v-model="activeName"
:tabPaneList="tabPaneList"
@tab-click="handleClick"></GLTabs>
<div class="purchase">
<div class="container">
<GLCombiForm ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="showFormData"
:search-select-obj="searchSelectObj"
@handleOk="handleSearch"
@handleRest="handleReset(activeName)"></GLCombiForm>
<div class="table-header">
<span class="priceSpan">
<p>
合计: 收款:{{ totalObj.totalPrice }} 元, 毛利收益:{{
totalObj.totalYqGrossProfit
}}元
</p>
<p>
累计分账金额:导流方{{ totalObj.totalShopProfitMoney }} 元,
服务对接:{{ totalObj.totalYqProfitMoney }}元,平台方{{
totalObj.totalGlProfitMoney
}}
元,服务商{{ totalObj.totalFranchiseeProfitMoney }} 元
</p>
</span>
<el-button type="primary"
class="btn"
size="small"
@click="exportExcel">导出</el-button>
</div>
<!-- 表格区域 开始 -->
<el-table :data="tableData"
row-key="uniqueKey"
:tree-props="{ children: 'subOrderProfitAllocations' }">
<el-table-column label="序号"
prop="indexNum"
align="center"
minWidth="80" />
<el-table-column label="商品信息"
align="center">
<el-table-column prop="orderCode"
label="主订单编号"
minWidth="170"
align="center" />
<el-table-column prop="customerName"
label="客户姓名"
minWidth="90"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.customerName || '-' }}</span>
</template>
</el-table-column>
<el-table-column prop="sellerName"
label="转化员"
minWidth="90"
align="center"
v-if="sellerName_visible">
<template slot-scope="scope">
<span>{{ scope.row.sellerName || '-' }}</span>
</template>
</el-table-column>
<el-table-column prop="employeeName"
label="销售顾问"
minWidth="90"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.employeeName || '-' }}</span>
</template>
</el-table-column>
<el-table-column prop="tradeNo"
label="交易参考号"
align="center"
minWidth="150" />
<el-table-column prop="goodsName"
label="商品名称"
minWidth="90"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.goodsName || '-' }}</span>
</template>
</el-table-column>
<el-table-column prop="upgradeGoodsAlias"
label="商品别名"
minWidth="90"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.goodsAlias || '-' }}</span>
</template>
</el-table-column>
<el-table-column prop="goodsCost"
label="商品成本"
minWidth="90"
align="center" />
<el-table-column prop="recoveryCost"
label="回收成本"
minWidth="90"
align="center" />
<el-table-column prop="virtualAccountCost"
label="虚拟对账成本"
align="center"
minWidth="120" />
</el-table-column>
<el-table-column label="支付信息"
align="center">
<el-table-column prop="payTimeStr"
label="支付时间"
minWidth="180"
align="center" />
<el-table-column prop="payType"
label="支付方式"
align="center"
minWidth="90">
<template slot-scope="scope">
<span>{{ payTypeOpts[scope.row.payType] }}</span>
</template>
</el-table-column>
<el-table-column prop="paidMoney"
label="支付金额"
minWidth="90"
align="center" />
<el-table-column prop="serviceCharge"
label="入账手续费"
minWidth="110"
align="center">
</el-table-column>
<el-table-column prop="userActualIncomeMoney "
label="实收金额"
minWidth="90"
align="center">
<template slot-scope="scope">
<span>{{
scope.row.hasOwnProperty('subOrderProfitAllocations')
? scope.row.userActualIncomeMoney
: '-'
}}</span>
</template>
</el-table-column>
<el-table-column prop="distributeMoney"
label="总分账金额"
minWidth="110"
align="center">
<template slot-scope="scope">
<span>{{
scope.row.distributeMoney === '¥0'
? '-'
: scope.row.distributeMoney
}}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="
4S店分账"
align="center">
<el-table-column prop="shopMerchantName"
label="流量方"
width="170"
align="center" />
<el-table-column prop="shopProfitType"
label="流量方比例"
width="120"
align="center"
v-if="shopProfitType_visible">
<template slot-scope="scope">
<span v-if="scope.row.shopProfitType">按{{ shopProfitTypeOpts[scope.row.shopProfitType]
}}{{ scope.row.shopProfitPer }}%</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="shopProfitMoney"
label="流量费"
align="center">
<template slot-scope="scope">
<span>{{
scope.row.shopProfitMoney === '¥0'
? '-'
: scope.row.shopProfitMoney
}}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="服务对接"
align="center"
width="200"
prop="yqMerchantName"
v-if="yq_visible">
<!-- <el-table-column prop="yqMerchantName"
label="园区店名称"
width="170"
align="center" /> -->
<!-- 审计需求先屏蔽 -->
<!-- <el-table-column prop="yqProfitMoney"
label="园区店总金额"
align="center">
<template slot-scope="scope">
<span>{{
scope.row.yqProfitMoney === '¥0' ? '-' : scope.row.yqProfitMoney
}}</span>
</template>
</el-table-column>
<el-table-column prop="yqGrossProfit"
label="园区店毛利收益"
align="center" /> -->
</el-table-column>
<!-- <el-table-column prop="extraCost"
label="额外成本"
align="center">
</el-table-column> -->
<!-- <el-table-column label="服务商分账"
align="center"
v-show="userInfo.beSuper">
<el-table-column prop="franchiseeMerchantName"
label="分账对象"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.franchiseeMerchantName || '-' }}</span>
</template>
</el-table-column>
<el-table-column prop="franchiseeProfitPer"
label="分账比例"
align="center">
<template slot-scope="scope">
<span>{{
scope.row.franchiseeProfitPer
? scope.row.franchiseeProfitPer + '%'
: '-'
}}</span>
</template>
</el-table-column>
<el-table-column prop="franchiseeProfitMoney"
label="分账金额"
align="center">
<template slot-scope="scope">
<span>{{
scope.row.franchiseeProfitMoney === '¥0'
? '-'
: scope.row.franchiseeProfitMoney
}}</span>
</template>
</el-table-column>
</el-table-column> -->
<!-- v-show="userInfo.beSuper" -->
<!-- <el-table-column prop="franchiseeProfitPer"
label="服务商比例"
width="100"
align="center">
<template slot-scope="scope">
<span>{{
scope.row.franchiseeProfitPer
? scope.row.franchiseeProfitPer + '%'
: '-'
}}</span>
</template>
</el-table-column> -->
<!-- 审计需求先屏蔽 -->
<!-- <el-table-column label="服务商"
align="center">
<el-table-column prop="franchiseeProfitMoney"
label="服务商总金额"
width="110"
align="center">
<template slot-scope="scope">
<span>{{
scope.row.franchiseeProfitMoney === '¥0'
? '-'
: scope.row.franchiseeProfitMoney
}}</span>
</template>
</el-table-column>
<el-table-column prop="installCost"
label="安装费金额"
width="100"
align="center">
<template slot-scope="scope">
<span>{{
!scope.row.installCost || scope.row.installCost === '¥0'
? '-'
: scope.row.installCost
}}</span>
</template>
</el-table-column>
<el-table-column prop="marketingCost"
label="营销费金额"
width="100"
align="center">
<template slot-scope="scope">
<span>{{
!scope.row.marketingCost || scope.row.marketingCost === '¥0'
? '-'
: scope.row.marketingCost
}}</span>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="平台方"
width="200"
prop="platformMerchantName"
align="center">
<!-- 审计需求先屏蔽 -->
<!-- <el-table-column prop="glProfitMoney"
label="平台方金额"
width="100"
align="center" /> -->
<!-- <el-table-column prop="platformMerchantName"
label="平台方对象"
width="100"
align="center">
<template slot-scope="scope">
<span>{{ (scope.row.platformMerchantName || (scope.row.platformMerchantId && scope.row.platformMerchantId != '-1')) ? scope.row.platformMerchantName : '嘀加智慧云' }}</span>
</template>
</el-table-column> -->
</el-table-column>
<el-table-column label="订单类型"
align="center"
minWidth="90"
prop="orderType">
<span slot-scope="scope">{{
scope.row.orderType
? baseData.orderTypeList.find(
item => +item.confId === scope.row.orderType
).confLabel
: ''
}}</span>
</el-table-column>
<el-table-column align="center"
label="操作"
width="120"
fixed="right">
<template slot-scope="scope">
<el-button type="text"
size="mini"
style="margin-right: 10px;"
@click="handleDetail(scope.row)">
查看明细
</el-button>
<auth-button :data="scope" />
</template>
</el-table-column>
</el-table>
<el-pagination background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page.currentPage"
:page-sizes="[10,20,30,40]"
:page-size="page.pageSize"
:total="total"
layout="sizes,total,->,prev,pager,next,jumper" />
<!-- 表格区域 end -->
</div>
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { Util } from '@/common/util'
import { divisionTypeList, payTypeList, orderTypeList, manageTypeList, payType, sceneList, exportFn } from '@/common/constant.js'
export default {
components: {
// Order,
// Crowdfunding
},
data() {
return {
activeName: "1",
tabPaneList: [
{
label: "精品升级",
name: "1"
},
{
label: "售后众筹",
name: "3"
},
{
label: "车损升级",
name: "0"
}
],
sessionInfo: this.$globalState.session,
size: 'small',
url: url,
searchForm: {
sceneType: '1',
time: '',
yqMerchantId: '',
merchantId: '',
orderCode: '',
divisionType: '',
},
searchSelectObj: {
orderOrTrade: {
attr: 'orderCode',
value: ''
}
},
// tableData: tableData,
showFormData: [
{
label: '按时间',
name: 'time',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
},
{
label: '服务对接',
name: 'yqMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'parkServiceList',
changeAttr: (value, targetItem) => {
value
? this.getServiceStore(value)
: (this.baseData.storeIdList = [])
this.searchForm.merchantId = ''
this.getOptionsList()
}
}, {
label: '流量来源',
name: 'merchantId',
type: 'select',
noDataText: '请先选择服务对接',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'storeIdList'
}, {
label: '商户名称',
name: 'merchantNameKeyWord',
type: 'input',
placeholder: '请输入服务商/服务对接/导流方名称',
isClear: true
}, {
label: '分账方式',
name: 'divisionType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'divisionTypeList'
}, {
label: '支付方式',
name: 'payType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'payTypeList'
}, {
label: '订单类型',
name: 'orderType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'orderTypeList'
}, {
type: 'selectInput',
selectName: 'orderOrTrade',
isClear: true,
selectOption: [{
label: '主订单编号',
name: 'orderCode'
}, {
label: '交易参考号',
name: 'tradeNo'
}],
handleSelectChange: (value) => {
this.searchSelectObj.orderOrTrade.value = ''
}
}
],
// 表格
getListApi: this.$apis.account.getSeviceList,
// 表格
tableData: [],
// 基本数据
baseData: {
parkServiceList: [],
storeIdList: [],
divisionTypeList: Util.deepClone(divisionTypeList),
orderTypeList: Util.deepClone(orderTypeList),
payTypeList: Util.deepClone(payTypeList),
manageTypeList: Util.deepClone(manageTypeList),
},
page: {
pageSize: 10,
currentPage: 1
},
total: 0,
totalObj: {},
payTypeOpts: Util.deepClone(payType),
shopProfitTypeOpts: {
1: '毛利',
2: '收入'
},
sceneList: sceneList
}
},
mounted() {
this.$apis.public.getyqMerchantList({}).then(res => {
res.forEach(item => {
item.merchantId = item.merchantNo
})
this.baseData.parkServiceList = res
this.getOptionsList()
})
this.getServiceStore(this.sessionInfo.merchantId)
this.getBaseData()
this.handleSearch()
},
computed: {
},
watch: {
'activeName': {
handler(val) {
if (val == 0) {
/** 1.0场景(暂无业务支撑)
1)隐藏顶部统计区域部分;
2)隐藏园区店相关的筛选字段;
3)隐藏园区店相关字段及转化员;
4)隐藏流量方比例,流量费=流量方各项分账类目之和;
5)下载对账单隐藏园区店对账单入口 */
this.sellerName_visible = false
this.shopProfitType_visible = false
this.yq_visible = false
} else if (val == 1) {
/** 1.1场景
1)隐藏流量方比例,流量费=流量方各项分账类目之和 */
this.sellerName_visible = true
this.shopProfitType_visible = false
this.yq_visible = true
} else if (val == 2) {
/** 1.2场景(暂无业务支撑)
1)隐藏顶部统计区域部分;
2)隐藏流量方比例,流量费=流量方各项分账类目之和 */
this.sellerName_visible = true
this.shopProfitType_visible = false
} else if (val == 3) {
/** 1.3场景
1)隐藏顶部统计区域部分;
2)隐藏园区店相关的筛选字段;
3)隐藏园区店相关字段及转化员;
4)隐藏流量方比例,流量费=流量方各项分账类目之和;
5)下载对账单隐藏园区店对账单入口 */
this.sellerName_visible = false
this.shopProfitType_visible = false
this.yq_visible = false
}
this.handleReset(val)
// this.getList()
// this.getTotal()
},
immediate: true
}
},
methods: {
async getBaseData() {
this.getOptionsList()
},
getServiceStore(merchantId) {
this.$apis.public.getServiceStore({
yqMerchantId: merchantId
}).then(res => {
this.baseData.storeIdList = res || []
this.getOptionsList()
})
},
getOptionsList(formName = 'showFormData', hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName]?.length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
// handleClick() {
// this.handleReset(this.activeName)
// },
handleReset(sceneType) {
this.searchForm = {
time: '',
yqMerchantId: '',
merchantId: '',
orderCode: '',
divisionType: '',
sceneType: sceneType
}
this.searchSelectObj = {
orderOrTrade: {
attr: 'orderCode',
value: ''
},
typeSelect: {
attr: 'divisionType',
value: ''
}
}
this.getOptionsList()
this.handleSearch()
},
getSelectInputParams() {
const list = Object.keys(this.searchSelectObj)
var params = {}
list.forEach(i => {
const item = this.searchSelectObj[i]
item.value && (params[item.attr] = item.value)
})
return params
},
getParams() {
// var params = this.getSelectInputParams()
// if (this.searchForm.yqMerchantId) {
// params.yqMerchantId = this.searchForm.yqMerchantId
// }
// 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'
// }
// if (this.searchForm.merchantNameKeyWord) {
// params.merchantNameKeyWord = this.searchForm.merchantNameKeyWord
// }
// if (this.searchForm.sceneType) {
// params.sceneType = this.searchForm.sceneType
// }
var params = Util.deepClone(this.searchForm)
const tempParams = this.getSelectInputParams()
params = {
...params,
...tempParams
}
if (params.time && params.time.length) {
params.payStartDateStr = Util.dateFormate(this.searchForm.time[0], 'YYYY-MM-DD HH:mm:ss')
params.payEndDateStr = Util.dateFormate(this.searchForm.time[1], 'YYYY-MM-DD') + ' 23:59:59'
delete params.time
}
return params
},
getList() {
var params = this.getParams()
params = {
...this.page,
...params
}
this.tableData = []
this.$apis.finance.getList(params).then(res => {
if (params.sceneType == this.searchForm.sceneType) {
let temp = 1
this.tableData = res.list.map((item, index) => {
this.isSubOrder = !item.hasOwnProperty('subOrderProfitAllocations')
item.uniqueKey = temp++
if (
item.hasOwnProperty('subOrderProfitAllocations') &&
item.subOrderProfitAllocations
) {
item.subOrderProfitAllocations.forEach(subItem => {
subItem.uniqueKey = temp++
subItem = this.numAddPrefix(subItem)
})
}
item = this.numAddPrefix(item)
return item
})
this.page.currentPage = res.pageNum
this.page.pageSize = res.pageSize
this.total = res.total
}
})
},
numAddPrefix(item) {
const moneyLabels = [
'goodsCost',
'totalPrice',
'serviceCharge',
'userActualIncomeMoney',
'yqCost',
'distributeMoney',
'shopProfitMoney',
'yqProfitMoney',
'glProfitMoney',
'franchiseeProfitMoney',
'extraCost',
'yqGrossProfit',
'paidMoney',
'sellPrice',
'shopCost',
'installCost',
'marketingCost',
'rewardAndPenaltyCost',
'franchiseeProfitMoneyForAudit',
'glProfitMoneyForAudit'
]
const rateToFloat = [ // 分润比例整数补零字段
'franchiseeProfitPer',
'shopProfitPer',
'yqProfitPer',
'glProfitPer'
]
for (const key in item) {
if (moneyLabels.indexOf(key) > -1) {
item[key] = typeof item[key] === 'number' ? `¥${item[key]}` : '-'
}
if (rateToFloat.indexOf(key) > -1) {
item[key] = item[key] && Util.returnFloat(item[key])
}
}
return item
},
getTotal() {
this.$apis.finance.getListTotal(this.getParams()).then(res => {
this.totalObj = res
})
},
handleSearch() {
this.page.currentPage = 1
this.getList()
this.getTotal()
},
// 每页条数
handleSizeChange(value) {
this.page.pageSize = value
this.getList()
},
// 页码
handleCurrentChange(value) {
this.page.currentPage = value
this.getList()
},
// 查看明细
handleDetail(row) {
this.$router.push({
path: '/financeManage/financeDetail',
query: row
})
},
exportExcel() {
var params = this.getParams()
this.$apis.finance.exportExcel(params).then(res => {
// window.location.href = res
exportFn(res)
})
},
}
}
</script>
<style scoped lang="scss">
@import '@/assets/css/mixin.scss';
.activity {
/deep/ {
.el-select .el-tag {
max-width: 60% !important;
}
.el-form-item__content {
overflow: inherit !important;
}
}
.container {
margin-top: 16px;
.title {
height: 32px;
line-height: 32px;
margin-bottom: 10px;
.title-text {
font-weight: 600;
font-size: 16px;
color: #333333;
margin-left: 4px;
}
}
}
.empty-btn {
position: absolute;
right: -40px;
top: 0px;
font-size: 14px;
color: #5850ff;
}
.config-pannel {
background: #f9f9f9;
width: 520px;
height: 168px;
display: flex;
.config-item {
padding: 26px 20px;
}
.clear-btn {
cursor: pointer;
background: #f1f1f1;
width: 40px;
height: 100%;
line-height: 20px;
font-size: 14px;
color: #666666;
padding: 60px 13px;
box-sizing: border-box;
}
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
padding: 5px;
max-height: 68px;
overflow: auto;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 450px;
display: flex;
align-items: center;
margin-top: 6px;
font-size: 14px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
/deep/ .el-tag {
background-color: #fff !important;
margin-bottom: 4px;
}
}
.select-wrap {
.common {
margin: 4px 0;
height: 40px !important;
overflow: hidden;
/deep/ .el-input {
height: 40px !important;
line-height: 40px !important;
}
/deep/ .el-input__suffix {
height: 40px !important;
margin-top: -4px;
.is-reverse {
transform: rotate(180deg);
}
}
}
}
}
.purchase {
.table-header {
display: flex;
align-items: center;
margin-bottom: 25px;
margin-top: 20px;
h2 {
font-weight: 600;
font-size: 16px;
color: #333;
}
.glbtn {
left: 46px;
position: absolute;
}
.btn {
right: 47px;
position: absolute;
}
}
.greenSpot {
@include dot;
background: $color-green;
}
.yellowSpot {
@include dot;
background: $color-yellow;
}
.ashSpot {
@include dot;
background: $color-gray;
}
.table-btns /deep/.el-button--text {
min-width: 0 !important;
padding: 0;
}
.priceSpan {
font-size: 14px;
color: #909399;
}
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
}
</style>
<!-- 线下对账 -->
<template>
<div class="purchase">
<div class="container">
<GLCombiForm ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="showFormData"
:search-select-obj="searchSelectObj"
@handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="table-header">
<span class="priceSpan">共<span
class="count-txt">{{ countObj.orderCount }}</span>笔订单,累计线下分账金额<span
class="count-txt">{{ countObj.divisionMoneyCount }}</span>元。</span>
<el-button type="primary"
class="btn"
size="small"
@click="exportExcel">导出</el-button>
</div>
<!-- 表格区域 开始 -->
<el-table :data="tableList">
<el-table-column label="序号"
type="index"
width="60px"
:index="index=>index+(page.currentPage - 1) * page.pageSize + 1"
align="center" />
<el-table-column label="主订单编号"
prop="orderCode"
align="center"
width="150px" />
<el-table-column label="交易参考号"
prop="tradeNo"
align="center"
width="150px">
<span slot-scope="scope">{{ scope.row.payOrder ? scope.row.payOrder.tradeNo : '' }}</span>
</el-table-column>
<el-table-column label="分账类型"
width="90px"
align="center">
<span>线下对账</span>
</el-table-column>
<!-- <el-table-column label="园区店名" -->
<el-table-column label="服务对接"
prop="yqMerchantName"
align="center"
width="170" />
<el-table-column label="支付金额"
prop="payMoney"
width="90px"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.payMoney ? ('¥' + scope.row.payMoney) : '-' }}</span>
</template>
</el-table-column>
<el-table-column label="总分账金额"
prop=""
width="110px"
align="center">
<span slot-scope="scope">{{ '¥' + scope.row.divisionMoney }}</span>
</el-table-column>
<el-table-column prop="actualIncomeMoney "
label="实收金额"
width="90px"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.actualIncomeMoney ? ('¥' + scope.row.actualIncomeMoney) : '-' }}</span>
</template>
</el-table-column>
<el-table-column label="平台方"
align="center">
<el-table-column label="名称"
prop="actualDivisionPlatform"
align="center"
width="100px">
<!-- <span slot-scope="scope">{{scope.row.partnerMerchantName}}</span> -->
</el-table-column>
<el-table-column label="实际分账金额"
prop="glActualDivisionMoney"
width="120px"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.glActualDivisionMoney ? ('¥' + scope.row.glActualDivisionMoney) : '-' }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="服务商"
align="center">
<el-table-column label="名称"
prop="partnerMerchantName1"
align="center"
width="100px">
<template slot-scope="scope">
<span>{{ scope.row.serviceInfos[0] ? scope.row.serviceInfos[0].merchantName : '-' }}</span>
</template>
</el-table-column>
<el-table-column label="实际分账金额"
prop="partnerDivisionMoney1"
width="120px"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.serviceInfos[0] ? ('¥' + scope.row.serviceInfos[0].divisionMoney) : '-' }}</span>
</template>
</el-table-column>
<el-table-column label="名称"
prop="partnerMerchantName2"
align="center"
width="100px">
<template slot-scope="scope">
<span>{{ scope.row.serviceInfos[1] ? scope.row.serviceInfos[1].merchantName : '-' }}</span>
</template>
</el-table-column>
<el-table-column label="实际分账金额"
prop="partnerDivisionMoney2"
width="120px"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.serviceInfos[1] ? ('¥' + scope.row.serviceInfos[1].divisionMoney) : '-' }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="流量方"
align="center">
<el-table-column label="名称"
prop="realityShopMerchantName"
align="center"
width="100px" />
<el-table-column label="实际分账金额"
prop="shopDivisionMoney"
width="120px"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.shopDivisionMoney ? ('¥' + scope.row.shopDivisionMoney) : '-' }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="订单支付时间"
prop="successDateStr"
align="center"
width="180px" />
<el-table-column label="订单类型"
prop="orderType"
align="center">
<span
slot-scope="scope">{{ scope.row.goodsOrder ? baseData.orderTypeList.find(item => +item.confId === scope.row.goodsOrder.orderType).confLabel : '-' }}</span>
</el-table-column>
</el-table>
<el-pagination background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page.currentPage"
:page-sizes="[10,20,30,40]"
:page-size="page.pageSize"
:total="total"
layout="sizes,total,->,prev,pager,next,jumper" />
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { Util } from '@/common/util'
import { orderTypeList, exportFn } from '@/common/constant.js'
export default {
name: 'OfflineAccountList',
data() {
return {
sessionInfo: this.$globalState.session,
size: 'small',
url: url,
searchForm: {
// 线下
divisionType: '1',
successDate: '',
yqMerchantId: '',
merchantNameKeyWord: '',
orderCode: '',
},
searchSelectObj: {
orderOrTrade: {
attr: 'orderCode',
value: ''
}
},
// tableData: tableData,
showFormData: [
{
label: '支付时间',
name: 'successDate',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
},
{
label: '服务对接',
name: 'yqMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'parkServiceList'
}, {
label: '商户名称',
name: 'merchantNameKeyWord',
type: 'input',
placeholder: '请输入服务对接/服务商/导流方名称',
isClear: true
}, {
type: 'selectInput',
selectName: 'orderOrTrade',
isClear: true,
selectOption: [{
label: '主订单编号',
name: 'orderCode'
}, {
label: '交易参考号',
name: 'tradeNo'
}],
handleSelectChange: (value) => {
this.searchSelectObj.orderOrTrade.value = ''
}
}
],
// 表格
getListApi: this.$apis.account.getSeviceList,
// 表格
tableList: [],
// 基本数据
baseData: {
parkServiceList: [],
orderTypeList: Util.deepClone(orderTypeList)
},
countObj: {},
page: {
pageSize: 10,
currentPage: 1
},
total: 0,
}
},
created() {
},
mounted() {
this.$apis.public.getyqMerchantList({}).then(res => {
res.forEach(item => {
item.merchantId = item.merchantNo
})
this.baseData.parkServiceList = res
this.getOptionsList()
})
this.getList()
},
methods: {
getList() {
var params = this.getParams()
this.getCount()
this.$apis.account.getListApi({
...params,
...this.page
}).then(res => {
// console.log(res)
this.tableList = res.list
this.total = res.total
this.tableList.forEach(item => {
item.successDateStr = item.payOrder ? Util.dateFormate(item.payOrder.successDate, 'YYYY-MM-DD HH:mm:ss') : ''
let serviceInfos = []
if (item.merchantDistributions && item.merchantDistributions.length > 0) {
item.merchantDistributions.forEach(obj => {
if (obj.targetMerchantType == 2) {
if (serviceInfos.length < 2) {
serviceInfos.push(obj)
}
}
})
}
item.serviceInfos = serviceInfos
})
})
},
getCount() {
var params = this.getParams()
this.$apis.account.getCountApi(params).then(res => {
this.countObj = res
})
},
handleSearch() {
this.page.currentPage = 1
this.getList()
},
getSelectInputParams() {
const list = Object.keys(this.searchSelectObj)
var params = {}
list.forEach(i => {
const item = this.searchSelectObj[i]
item.value && (params[item.attr] = item.value)
})
return params
},
getParams() {
var params = Util.deepClone(this.searchForm)
const tempParams = this.getSelectInputParams()
params = {
...params,
...tempParams
}
if (params.successDate && params.successDate.length) {
params.successDateStartDate = Util.dateFormate(this.searchForm.successDate[0], 'YYYY-MM-DD HH:mm:ss')
params.successDateEndDate = Util.dateFormate(this.searchForm.successDate[1], 'YYYY-MM-DD') + ' 23:59:59'
delete params.successDate
}
return params
},
getOptionsList(formName = 'showFormData', hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
exportExcel() {
var params = this.getParams()
this.$apis.account.exportExcel(params).then(res => {
// window.location.href = res
exportFn(res)
})
},
handleReset() {
this.searchForm = {
// 线下
divisionType: '1',
divisionDate: '',
yqMerchantId: '',
merchantNameKeyWord: '',
orderCode: '',
}
this.searchSelectObj = {
orderOrTrade: {
attr: 'orderCode',
value: ''
}
}
this.handleSearch()
},
// 每页条数
handleSizeChange(value) {
this.page.pageSize = value
this.getList()
},
// 页码
handleCurrentChange(value) {
this.page.currentPage = value
this.getList()
},
}
}
</script>
<style scoped lang="scss">
@import '@/assets/css/mixin.scss';
.purchase {
.table-header {
display: flex;
align-items: center;
margin-bottom: 25px;
margin-top: 20px;
h2 {
font-weight: 600;
font-size: 16px;
color: #333;
}
.glbtn {
left: 46px;
position: absolute;
}
.btn {
right: 47px;
position: absolute;
}
}
.greenSpot {
@include dot;
background: $color-green;
}
.yellowSpot {
@include dot;
background: $color-yellow;
}
.ashSpot {
@include dot;
background: $color-gray;
}
.table-btns /deep/.el-button--text {
min-width: 0 !important;
padding: 0;
}
.priceSpan {
font-size: 14px;
color: #909399;
}
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
}
</style>
<!-- 线上分账 -->
<template>
<div class="purchase">
<div class="container">
<GLCombiForm ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="showFormData"
:search-select-obj="searchSelectObj"
@handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="table-header">
<span class="priceSpan">共<span
class="count-txt">{{ countObj.orderCount }}</span>笔订单,累计分账金额<span
class="count-txt">{{ countObj.divisionMoneyCount }}</span>元,分账成功金额<span
class="count-txt">{{ countObj.divisionSuccessMoneyCount }}</span>元,分账中金额<span
class="count-txt">{{ countObj.inDivisionMoneyCount }}</span>元,分账失败金额<span
class="count-txt">{{ countObj.divisionFailureMoneyCount }}</span>元,异常分账金额<span
class="count-txt">{{ countObj.divisionExceptionMoneyCount }}</span>元。</span>
<el-button type="primary"
class="btn"
size="small"
@click="exportExcel">导出</el-button>
</div>
<!-- 表格区域 开始 -->
<el-table :data="tableList">
<el-table-column label="序号"
type="index"
width="60px"
:index="index=>index+(page.currentPage - 1) * page.pageSize + 1"
align="center" />
<el-table-column label="主订单编号"
prop="orderCode"
align="center"
width="150px">
<template slot-scope="scope">
<span>{{ scope.row.orderCode || '-' }}</span>
</template>
</el-table-column>
<el-table-column label="交易参考号"
prop="tradeNo"
align="center"
width="150px">
<span
slot-scope="scope">{{ scope.row.payOrder ? scope.row.payOrder.tradeNo : '-' }}</span>
</el-table-column>
<el-table-column label="分账类型"
width="90px"
align="center">
<span>线上分账</span>
</el-table-column>
<!-- <el-table-column label="园区店名" -->
<el-table-column label="服务对接"
prop="yqMerchantName"
align="center"
width="170">
<span
slot-scope="scope">{{ scope.row.yqMerchantName ? scope.row.yqMerchantName : '-' }}</span>
</el-table-column>
<el-table-column label="支付金额"
prop="payMoney"
width="90px"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.payMoney ? ('¥' + scope.row.payMoney) : '-' }}</span>
</template>
</el-table-column>
<el-table-column label="总分账金额"
prop=""
width="110px"
align="center">
<span slot-scope="scope">{{ '¥' + scope.row.divisionMoney }}</span>
</el-table-column>
<el-table-column prop="actualIncomeMoney "
label="实收金额"
width="90px"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.actualIncomeMoney ? ('¥' + scope.row.actualIncomeMoney) : '-' }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="嘀加智慧云实际分账金额"
prop="glActualDivisionMoney"
align="center"
width="100px">
<template slot-scope="scope">
{{scope.row.glActualDivisionMoney ? ('¥' + scope.row.glActualDivisionMoney) : '-'}}
</template>
</el-table-column> -->
<el-table-column label="平台方"
align="center">
<el-table-column label="名称"
prop="actualDivisionPlatform"
align="center"
width="100px">
<!-- <span slot-scope="scope">{{scope.row.partnerMerchantName}}</span> -->
</el-table-column>
<el-table-column label="实际分账金额"
prop="glActualDivisionMoney"
width="120px"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.glActualDivisionMoney ? ('¥' + scope.row.glActualDivisionMoney) : '-' }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="服务商"
align="center">
<el-table-column label="名称"
prop="partnerMerchantName1"
align="center"
width="100px">
<template slot-scope="scope">
<span>{{ scope.row.serviceInfos[0] ? scope.row.serviceInfos[0].merchantName : '-' }}</span>
</template>
</el-table-column>
<el-table-column label="实际分账金额"
prop="partnerDivisionMoney1"
width="120px"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.serviceInfos[0] ? ('¥' + scope.row.serviceInfos[0].divisionMoney) : '-' }}</span>
</template>
</el-table-column>
<el-table-column label="名称"
prop="partnerMerchantName2"
align="center"
width="100px">
<template slot-scope="scope">
<span>{{ scope.row.serviceInfos[1] ? scope.row.serviceInfos[1].merchantName : '-' }}</span>
</template>
</el-table-column>
<el-table-column label="实际分账金额"
prop="partnerDivisionMoney2"
width="120px"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.serviceInfos[1] ? ('¥' + scope.row.serviceInfos[1].divisionMoney) : '-' }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="流量方"
align="center">
<el-table-column label="名称"
prop="realityShopMerchantName"
align="center"
width="100px">
<template slot-scope="scope">
<span>{{ scope.row.realityShopMerchantName || '-' }}</span>
</template>
</el-table-column>
<el-table-column label="实际分账金额"
prop="shopDivisionMoney"
width="120px"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.shopDivisionMoney ? ('¥' + scope.row.shopDivisionMoney) : '-' }}</span>
</template>
</el-table-column>
</el-table-column>
<!-- </el-table-column> -->
<el-table-column label="分账状态"
prop="divisionStatus"
width="90px"
align="center">
<template slot-scope="scope">
<span v-if="scope.row.divisionStatus"
:style="{ 'color': [4, 5].includes(+scope.row.divisionStatus) ? 'red' : '#606266' }">{{ baseData.divisionStatusList.find(item => +item.confId === scope.row.divisionStatus).confLabel }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="分账时间"
prop="divisionDateStr"
align="center"
width="180px" />
<el-table-column label="订单支付时间"
prop="successDateStr"
align="center"
width="180px" />
<el-table-column label="订单类型"
prop="orderType"
width="90px"
align="center">
<span
slot-scope="scope">{{ scope.row.goodsOrder ? baseData.orderTypeList.find(item => +item.confId === scope.row.goodsOrder.orderType).confLabel : '无' }}</span>
</el-table-column>
</el-table>
<el-pagination background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page.currentPage"
:page-sizes="[10,20,30,40]"
:page-size="page.pageSize"
:total="total"
layout="sizes,total,->,prev,pager,next,jumper" />
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { Util } from '@/common/util'
import { orderTypeList, divisionStatusList, exportFn } from '@/common/constant.js'
export default {
name: 'OnlineAccountList',
data() {
return {
sessionInfo: this.$globalState.session,
size: 'small',
url: url,
searchForm: {
// 线上
divisionType: '2',
divisionDate: '',
successDate: '',
divisionStatus: '',
yqMerchantId: '',
orderType: ''
},
searchSelectObj: {
orderOrTrade: {
attr: 'orderCode',
value: ''
},
// divisionOrPayDate: {
// attr: 'divisionDate',
// value: ''
// }
},
// tableData: tableData,
showFormData: [
{
label: '支付时间',
name: 'successDate',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
}, {
label: '分账时间',
name: 'divisionDate',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
},
{
type: 'selectInput',
selectName: 'orderOrTrade',
isClear: true,
selectOption: [{
label: '主订单编号',
name: 'orderCode'
}, {
label: '交易参考号',
name: 'tradeNo'
}],
handleSelectChange: (value) => {
this.searchSelectObj.orderOrTrade.value = ''
}
},
{
label: '分账状态',
name: 'divisionStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'divisionStatusList'
},
{
label: '服务对接',
name: 'yqMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'parkServiceList'
}, {
label: '商户名称',
name: 'merchantNameKeyWord',
type: 'input',
placeholder: '请输入服务对接/服务商/导流方名称',
isClear: true
}, {
label: '订单类型',
name: 'orderType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'orderTypeList'
}
],
// 表格
getListApi: this.$apis.account.getSeviceList,
// 表格
tableList: [],
// 基本数据
baseData: {
parkServiceList: [],
divisionStatusList: Util.deepClone(divisionStatusList),
orderTypeList: Util.deepClone(orderTypeList),
},
countObj: {},
page: {
pageSize: 10,
currentPage: 1
},
total: 0,
}
},
created() {
},
mounted() {
this.$apis.public.getyqMerchantList({}).then(res => {
res.forEach(item => {
item.merchantId = item.merchantNo
})
this.baseData.parkServiceList = res
this.getOptionsList()
})
this.getOptionsList()
this.getList()
},
methods: {
getList() {
var params = this.getParams()
this.getCount()
this.$apis.account.getListApi({
...params,
...this.page
}).then(res => {
// console.log(res)
this.tableList = res.list
this.total = res.total
this.tableList.forEach(item => {
item.divisionDateStr = item.divisionDate ? Util.dateFormate(item.divisionDate, 'YYYY-MM-DD HH:mm:ss') : ''
item.successDateStr = item.payOrder?.successDate ? Util.dateFormate(item.payOrder.successDate, 'YYYY-MM-DD HH:mm:ss') : '-'
let serviceInfos = []
if (item.merchantDistributions && item.merchantDistributions.length > 0) {
item.merchantDistributions.forEach(obj => {
if (obj.targetMerchantType == 2) {
if (serviceInfos.length < 2) {
serviceInfos.push(obj)
}
}
})
}
item.serviceInfos = serviceInfos
})
})
},
getCount() {
var params = this.getParams()
this.$apis.account.getCountApi(params).then(res => {
this.countObj = res
})
},
handleSearch() {
this.page.currentPage = 1
this.getList()
},
getSelectInputParams() {
const list = Object.keys(this.searchSelectObj)
var params = {}
list.forEach(i => {
const item = this.searchSelectObj[i]
item.value && (params[item.attr] = item.value)
})
return params
},
getParams() {
var params = Util.deepClone(this.searchForm)
const tempParams = this.getSelectInputParams()
params = {
...params,
...tempParams
}
if (params.successDate && params.successDate.length) {
params.successDateStartDate = Util.dateFormate(this.searchForm.successDate[0], 'YYYY-MM-DD HH:mm:ss')
params.successDateEndDate = Util.dateFormate(this.searchForm.successDate[1], 'YYYY-MM-DD') + ' 23:59:59'
delete params.successDate
}
if (params.divisionDate && params.divisionDate.length) {
params.divisionStartDate = Util.dateFormate(this.searchForm.divisionDate[0], 'YYYY-MM-DD HH:mm:ss')
params.divisionEndDate = Util.dateFormate(this.searchForm.divisionDate[1], 'YYYY-MM-DD') + ' 23:59:59'
delete params.divisionDate
}
return params
},
getOptionsList(formName = 'showFormData', hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
exportExcel() {
var params = this.getParams()
this.$apis.account.exportExcel(params).then(res => {
// window.location.href = res
exportFn(res)
})
},
handleReset() {
this.searchForm = {
// 线上
divisionType: '2',
divisionDate: '',
divisionStatus: '',
yqMerchantId: '',
}
this.searchSelectObj = {
orderOrTrade: {
attr: 'orderCode',
value: ''
},
// divisionOrPayDate: {
// attr: 'divisionDate',
// value: ''
// }
}
this.handleSearch()
},
// 每页条数
handleSizeChange(value) {
this.page.pageSize = value
this.getList()
},
// 页码
handleCurrentChange(value) {
this.page.currentPage = value
this.getList()
},
}
}
</script>
<style scoped lang="scss">
@import '@/assets/css/mixin.scss';
.purchase {
.table-header {
display: flex;
align-items: center;
margin-bottom: 25px;
margin-top: 20px;
h2 {
font-weight: 600;
font-size: 16px;
color: #333;
}
.glbtn {
left: 46px;
position: absolute;
}
.btn {
right: 47px;
position: absolute;
}
}
.greenSpot {
@include dot;
background: $color-green;
}
.yellowSpot {
@include dot;
background: $color-yellow;
}
.ashSpot {
@include dot;
background: $color-gray;
}
.table-btns /deep/.el-button--text {
min-width: 0 !important;
padding: 0;
}
.priceSpan {
font-size: 14px;
color: #909399;
}
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
}
</style>
<template>
<div class="activity">
<GLTabs v-model="activeName"
:tabPaneList="tabPaneList"
@tab-click="handleClick"></GLTabs>
<components :is="tabName"></components>
</div>
</template>
<script>
// import * as dayjs from 'dayjs'
// import url from '@/assets/empty.png'
// import { dateFormat } from '../../utils/index'
import OfflineAccount from "./components/offlineAccountList.vue"
import OnlineAccount from "./components/onlineAccountList.vue"
export default {
components: {
OfflineAccount,
OnlineAccount
},
data() {
return {
activeName: "offline",
tabPaneList: [
{
label: "线下对账",
name: "offline"
},
{
label: "线上分账",
name: "online"
}
],
tabName: "offlineAccount"
}
},
mounted() {
},
computed: {
},
watch: {
},
methods: {
handleClick() {
let arr = {
offline: "offlineAccount",
online: "onlineAccount"
}
this.tabName = arr[this.activeName]
console.log('this.tabName', this.tabName);
},
}
}
</script>
<style scoped lang="scss">
.activity {
/deep/ {
.el-select .el-tag {
max-width: 60% !important;
}
.el-form-item__content {
overflow: inherit !important;
}
}
.container {
margin-top: 16px;
.title {
height: 32px;
line-height: 32px;
margin-bottom: 10px;
.title-text {
font-weight: 600;
font-size: 16px;
color: #333333;
margin-left: 4px;
}
}
}
.empty-btn {
position: absolute;
right: -40px;
top: 0px;
font-size: 14px;
color: #5850ff;
}
.config-pannel {
background: #f9f9f9;
width: 520px;
height: 168px;
display: flex;
.config-item {
padding: 26px 20px;
}
.clear-btn {
cursor: pointer;
background: #f1f1f1;
width: 40px;
height: 100%;
line-height: 20px;
font-size: 14px;
color: #666666;
padding: 60px 13px;
box-sizing: border-box;
}
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
padding: 5px;
max-height: 68px;
overflow: auto;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 450px;
display: flex;
align-items: center;
margin-top: 6px;
font-size: 14px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
/deep/ .el-tag {
background-color: #fff !important;
margin-bottom: 4px;
}
}
.select-wrap {
.common {
margin: 4px 0;
height: 40px !important;
overflow: hidden;
/deep/ .el-input {
height: 40px !important;
line-height: 40px !important;
}
/deep/ .el-input__suffix {
height: 40px !important;
margin-top: -4px;
.is-reverse {
transform: rotate(180deg);
}
}
}
}
}
.search-groomname {
width: 252px;
margin: 12px 16px 0;
/deep/.el-input {
width: 252px;
}
}
.filter-tree {
padding: 0 16px;
}
.empty {
padding: 10px 0;
margin: 0;
text-align: center;
color: #999;
font-size: 13px;
}
.placeholder {
font-size: 14px;
color: #c0c6ce;
line-height: 20px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!