Commit 3a34de6b by 前端

Merge branch 'develop' into 'master'

上线合并

See merge request !387
2 parents c04e8f58 13340b52
Showing 55 changed files with 3928 additions and 347 deletions
......@@ -85,7 +85,7 @@
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
},
......@@ -1357,7 +1357,7 @@
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
}
......@@ -3928,11 +3928,7 @@
"dependencies": {
"hash-sum": {
"version": "1.0.2",
<<<<<<< HEAD
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
=======
"resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz",
>>>>>>> SAAS+V4.43.1-0819
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
}
......@@ -5726,7 +5722,7 @@
},
"is-buffer": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
"resolved": "https://registry.npmmirror.com/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
"dev": true
},
......@@ -13587,7 +13583,7 @@
},
"postcss": {
"version": "8.4.16",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.16.tgz",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz",
"integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==",
"dev": true,
"requires": {
......@@ -17109,6 +17105,11 @@
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==",
"dev": true
},
"vue-lazyload": {
"version": "1.2.3",
"resolved": "https://registry.npmmirror.com/vue-lazyload/-/vue-lazyload-1.2.3.tgz",
"integrity": "sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g=="
},
"vue-loader": {
"version": "17.0.0",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-17.0.0.tgz",
......@@ -18018,7 +18019,7 @@
},
"yarn": {
"version": "1.22.19",
"resolved": "https://registry.npmjs.org/yarn/-/yarn-1.22.19.tgz",
"resolved": "https://registry.npmmirror.com/yarn/-/yarn-1.22.19.tgz",
"integrity": "sha512-/0V5q0WbslqnwP91tirOvldvYISzaqhClxzyUKXYxs07yUILIs5jx/k6CFe8bvKSkds5w+eiOqta39Wk3WxdcQ=="
},
"yorkie": {
......
......@@ -52,6 +52,7 @@
"svg-sprite-loader": "^6.0.11",
"ua-parser-js": "^0.7.19",
"vue": "^2.6.10",
"vue-lazyload": "^1.2.3",
"vue-router": "3.0.5",
"vuedraggable": "^2.24.3",
"vuex": "^3.0.1",
......
......@@ -3,244 +3,250 @@ import request from "./request"
const path = "dj.api."
// 内容管理列表查询条件可见门店列表
export function getMerchantList (data) {
export function getMerchantList(data) {
data.method = `dj.smartcarlife.api.shopMerchant.list`
return request(data)
}
// 内容管理列表查询
export function getContenttList (data) {
export function getContenttList(data) {
data.method = `${path}material.record.page`
return request(data)
}
// 内容管理详情
export function getContentDetail (data) {
export function getContentDetail(data) {
data.method = `${path}material.record.detail`
return request(data)
}
// 批量启停用内容
export function batchOperaterContent (data) {
export function batchOperaterContent(data) {
data.method = `${path}material.record.batch.operate`
return request(data)
}
// 删除内容
export function delContent (data) {
export function delContent(data) {
data.method = `${path}material.record.delete`
return request(data)
}
// 统计列表
export function getStatisticsList (data) {
export function getStatisticsList(data) {
data.method = `dj.api.customer.dynamic.record.page`
return request(data)
}
// 导出统计列表
export function exportStatisticsList (data) {
export function exportStatisticsList(data) {
data.method = `dj.api.customer.dynamic.record.page.export`
return request(data)
}
// 新增内容
export function addContent (data) {
export function addContent(data) {
data.method = `${path}material.record.add`
return request(data, "post")
}
// 编辑内容
export function updateContent (data) {
export function updateContent(data) {
data.method = `${path}material.record.update`
return request(data, "post")
}
// 获取会员权益/升级和积分商城 门店
export function getAllMerchantList (data) {
export function getAllMerchantList(data) {
data.method = `dj.api.merchant.page`
return request(data, "POST")
}
// 获取精品升级/次新车转化/售后众筹 门店
export function getMerchantListByScene (data) {
export function getMerchantListByScene(data) {
data.method = `dj.api.scenemerchantref.listShop4sByRef.page`
return request(data)
}
// 获取精品升级/次新车转化/售后众筹 门店
export function getListShop4sByRef (data) {
export function getListShop4sByRef(data) {
data.method = `dj.api.scenemerchantref.listShop4sByRef`
return request(data)
}
// 获取品牌列表
export function getBrandList (data) {
export function getBrandList(data) {
data.method = `dj.api.smartcarlife.common.car.brand.page`
return request(data)
}
// 分页查询标签员工
export function getListLabelStaffPage (data) {
export function getListLabelStaffPage(data) {
data.method = `dj.api.smartcarlife.contentManagerTask.listLabelStaffPage`
return request(data)
}
// 员工群发-分页查询列表
export function contentManagerTaskPage (data) {
export function contentManagerTaskPage(data) {
data.method = `dj.api.smartcarlife.contentManagerTask.page`
return request(data, "POST")
}
// 员工群发-删除记录
export function deleteTaskById (data) {
export function deleteTaskById(data) {
data.method = `dj.api.smartcarlife.contentManagerTask.deleteById`
return request(data, "POST")
}
// 员工群发-分页查询内容管理统计信息
export function getStatisticPage (data) {
export function getStatisticPage(data) {
data.method = `dj.api.smartcarlife.contentManagerTask.statistic.page`
return request(data, "POST")
}
// 员工群发-添加/修改记录
export function insertOrUpdate (data) {
export function insertOrUpdate(data) {
data.method = `dj.api.smartcarlife.contentManagerTask.insertOrUpdate`
return request(data, "POST")
}
// 根据ID查询详细信息
export function contentManagerTaskById (data) {
export function contentManagerTaskById(data) {
data.method = `dj.api.smartcarlife.contentManagerTask.getById`
return request(data, "POST")
}
// 获取接待场景
export function receptionSceneList (data) {
export function receptionSceneList(data) {
data.method = "dj.api.material.reception.scene.list"
return request(data, "POST")
}
// 获取客户标签树
export function getLabelList (data) {
export function getLabelList(data) {
data.method = "dj.api.material.customer.label.list"
return request(data, "POST")
}
// 单一商品
export function listAllInWithPage (data) {
export function listAllInWithPage(data) {
data.method = "dj.api.smartcarlife.upgradeGoods.listAllInWithPage"
return request(data, "POST")
}
// 套餐商品
export function allInPage (data) {
export function allInPage(data) {
data.method = "dj.api.smartcarlife.merchantPackageGoodsInfo.allInPage"
return request(data, "POST")
}
// 获取产品词条列表
export function productTextPage (data) {
export function productTextPage(data) {
data.method = "dj.api.material.product.text.page"
return request(data, "POST")
}
// 分页获取产品词条列表
export function productPage (data) {
export function productPage(data) {
data.method = `dj.api.material.product.text.page`
return request(data, "POST")
}
// 获取产品词条详情
export function productDetail (data) {
export function productDetail(data) {
data.method = `dj.api.material.product.text.detail`
return request(data, "POST")
}
// 删除产品词条
export function productDelete (data) {
export function productDelete(data) {
data.method = `dj.api.material.product.text.delete`
return request(data, "POST")
}
// 保存产品词条
export function productSave (data) {
export function productSave(data) {
data.method = `dj.api.material.product.text.save`
return request(data, "POST")
}
// 更新产品词条
export function productUpdate (data) {
export function productUpdate(data) {
data.method = `dj.api.material.product.text.update`
return request(data, "POST")
}
// 查询接待素材商户配置
export function materialPage (data) {
export function materialPage(data) {
data.method = `dj.api.smartcarlife.recepiton.material.page`
return request(data, "post", [], "", "/rop-dj-car-boutique/router")
}
// 查询门店接待素材详情
export function materialDetail (data) {
export function materialDetail(data) {
data.method = `dj.api.smartcarlife.recepiton.material.merchant.detail`
return request(data, "post", [], "", "/rop-dj-car-boutique/router")
}
// 获取车系列表
export function listBrandWithSeries(data) {
data.method = `dj.api.smartcarlife.merchantbrandmodel.listBrandWithSeries`
return request(data, "post")
}
// 保存更新门店接待素材
export function recepitonUpdate (data) {
export function recepitonUpdate(data) {
data.method = `dj.api.smartcarlife.recepiton.material.merchant.saveOrUpdate`
return request(data, "post", [], "", "/rop-dj-car-boutique/router")
}
// 保存更新门店接待素材
export function findDictData (data) {
export function findDictData(data) {
data.method = `merchants.api.menu.findDictData`
return request(data, "post")
}
// 保存更新门店接待素材
export function deleteDictData (data) {
export function deleteDictData(data) {
data.method = `merchants.api.menu.deleteDictData`
return request(data, "post")
}
// 保存更新门店接待素材
export function updateDictData (data) {
export function updateDictData(data) {
data.method = `merchants.api.menu.updateDictData`
return request(data, "post")
}
// 保存更新门店接待素材
export function saveDictData (data) {
export function saveDictData(data) {
data.method = `merchants.api.menu.saveDictData`
return request(data, "post")
}
/**客户标签列表 */
export function getCustomerLabelPage (data) {
export function getCustomerLabelPage(data) {
data.method = `dj.api.material.customer.label.page`
return request(data, "post")
}
/**新增客户标签 */
export function addCustomerLabel (data) {
export function addCustomerLabel(data) {
data.method = `dj.api.material.customer.label.add`
return request(data, "post")
}
/**修改客户标签 */
export function updateCustomerLabel (data) {
export function updateCustomerLabel(data) {
data.method = `dj.api.material.customer.label.update`
return request(data, "post")
}
/**分页查询客户档案信息(管理后台) */
export function getCustomerFilePage (data) {
export function getCustomerFilePage(data) {
data.method = `dj.api.mindworkplate.customervisit.customerInfoListPage`
return request(data, "post")
}
/**客户档案信息(管理后台)导出 */
export function exportCustomerFile (data) {
export function exportCustomerFile(data) {
data.method = `dj.api.mindworkplate.customervisit.customerInfoListExport`
return request(data, "post")
}
/** 客户档案统计信息(管理后台) */
export function getCustomerFileStatic (data) {
export function getCustomerFileStatic(data) {
data.method = `dj.api.mindworkplate.customervisit.customerInfoListStatic`
return request(data, "post")
}
/** 客户档案话术浏览记录 */
export function getCustomerVisitScriptsListPage (data) {
export function getCustomerVisitScriptsListPage(data) {
data.method = `dj.api.mindworkplate.customervisit.CustomerVisitScriptsListPage`
return request(data, "post")
}
/**客户档案标签 */
export function getCustomerInfoDetail (data) {
export function getCustomerInfoDetail(data) {
data.method = `dj.api.mindworkplate.customervisit.getCustomerInfoDetail`
return request(data, "post")
}
......@@ -124,3 +124,189 @@ export function reportTrack(data) {
data.method = "clue.api.burial.point.record.batch.insert"
return request(data, "post")
}
// 获取门店工资绩效列表
export function getStoreSalaryListApi(data) {
data.method = `${path2}merchantPerformanceConfig.page`
return request(data, "post")
}
// 禁用/启用门店工资绩效
export function editStoreSalaryStatusApi(data) {
data.method = `${path2}merchantPerformanceConfig.updateStatus`
return request(data, "post")
}
// 删除门店工资绩效
export function deleteStoreSalaryApi(data) {
data.method = `${path2}merchantPerformanceConfig.delete`
return request(data, "post")
}
// 新增/编辑绩效方案
export function configPerformancePlanApi(data) {
data.method = `${path2}merchantPerformanceConfig.batchConfig`
return request(data, "post")
}
// 获取绩效方案详情
export function getPerformancePlanDetailApi(data) {
data.method = `${path2}merchantPerformanceConfig.getLatestConfigDetail`
return request(data, "post")
}
// 获取分发门店列表
export function getDistributeStoreListApi(data) {
data.method = `${path2}merchantPerformanceConfig.pageDistributeMerchant`
return request(data, "post")
}
// 获取应用商品
export function getAppGoodsApi(data) {
data.method = `${path2}merchantPerformanceConfig.pageMerchantGoods`
return request(data, "post")
}
// 获取激励池存入列表
export function getIncentivePoolDepositListApi(data) {
data.method = `${path2}incentivePool.pageIncome`
return request(data, "post")
}
// 获取激励池支出列表
export function getIncentivePoolExpendListApi(data) {
data.method = `${path2}incentivePool.pageExpenses`
return request(data, "post")
}
// 获取激励池统计信息
export function getIncentivePoolStatisticsApi(data) {
data.method = `${path2}incentivePool.total`
return request(data, "post")
}
// 获取激励池存入明细
export function getIncentivePoolDetailApi(data) {
data.method = `${path2}incentivePool.getIncomeById`
return request(data, "post")
}
// 激励池新增支出
export function addIncentivePoolApi(data) {
data.method = `${path2}incentivePool.addExpenses`
return request(data, "post")
}
// 获取已配置职级的所有员工数据
export function getLevelStaffListApi(data) {
data.method = `${path2}incentivePool.hasJobStaffPage`
return request(data, "post")
}
// 获取激励池支出详情(备注记录)
export function getIncentivePoolRemarkRecordApi(data) {
data.method = `${path2}incentivePool.getExpensesById`
return request(data, "post")
}
// 激励池支出修改备注
export function editIncentivePoolRemarkApi(data) {
data.method = `${path2}incentivePool.updateExpensesRemark`
return request(data, "post")
}
// 获取驻店管理列表
export function getResidentListApi(data) {
data.method = `${path2}staffBaseInfo.pageList`
return request(data, "post")
}
// 导入员工修订工资
export function importStaffSalaryApi(data) {
data.method = `${path2}staffMonthSalary.correctSalary.byImport`
return request(data, "post", ["file"])
}
// 获取帮带导师数据
export function getResidentTeacherListApi(data) {
data.method = `${path2}staffBaseInfo.Mentor.list`
return request(data, "post")
}
// 根据场景获取门店列表
export function getStoreListBySceneApi(data) {
data.method = `dj.smartcarlife.api.scene.shopMerchant.pageList`
return request(data, "post")
}
// 根据门店反查管理的园区店列表
export function getStoreParkListApi(data) {
data.method = `dj.smartcarlife.api.scene.yqMerchant.pageList`
return request(data, "post")
}
// 创建员工
export function createStaffApi(data) {
data.method = `${path2}staffBaseInfo.account.add`
return request(data, "post")
}
// 编辑员工
export function editStaffApi(data) {
data.method = `${path2}staffBaseInfo.staffDetailInfo.update`
return request(data, "post")
}
// 员工分配门店账号
export function assignStoreAccountApi(data) {
data.method = `${path2}staffBaseInfo.account.other.add`
return request(data, "post")
}
// 获取员工详情信息
export function getStaffDetailApi(data) {
data.method = `${path2}staffBaseInfo.selectStaffDetailInfo`
return request(data, "post")
}
// 获取员工历史业绩
export function getStaffHistoryApi(data) {
data.method = `${path2}staffMonthSalary.page`
return request(data, "post")
}
// 获取员工工资统计数据
export function getStaffSalaryStatisticsApi(data) {
data.method = `${path2}staffMonthSalary.stat`
return request(data, "post")
}
// 获取提成门店数据
export function getCommissionLogicApi(data) {
data.method = `${path2}staffBaseInfo.listStaffOrderMerchant`
return request(data, "post")
}
// 获取员工历史订单列表
export function getStaffHistoryOrderListApi(data) {
data.method = `${path2}staffBaseInfo.listStaffDailyPerformancePage`
return request(data, "post")
}
// 修订应发工资
export function reviseSalaryApi(data) {
data.method = `${path2}staffMonthSalary.correctSalary`
return request(data, "post")
}
// 修订工资操作记录
export function getSalaryRecordApi(data) {
data.method = `${path2}staffSalaryCorrectRecord.page`
return request(data, "post")
}
// 获取工资明细
export function getSalaryDetailApi(data) {
data.method = `${path2}staffMonthSalary.detail`
return request(data, "post")
}
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.smartcarlife.api."
// 交易明细列表
export function nbcbAccDetailPage(data) {
data.method = `${path}nbcb.acc.detail.page`
return request(data, RequestMethods.POST)
}
// 财资数据筛选项列表
export function nbcbAccDetailConfig(data) {
data.method = `${path}nbcb.acc.detail.config`
return request(data, RequestMethods.POST)
}
// 交易明细重取
export function nbcbAccDetailRefetch(data) {
data.method = `${path}nbcb.acc.detail.refetch`
return request(data, RequestMethods.POST)
}
// 批量同步交易明细
export function nbcbAccDetailBatchSync(data) {
data.method = `${path}nbcb.acc.detail.batch.sync`
return request(data, RequestMethods.POST)
}
// 交易明细详情
export function nbcbAccDetail(data) {
data.method = `${path}nbcb.acc.detail`
return request(data, RequestMethods.POST)
}
// 交易明细关联回单pdf
export function nbcbReceiptPdfUrl(data) {
data.method = `${path}nbcb.receipt.pdf.url`
return request(data, RequestMethods.POST)
}
......@@ -970,3 +970,48 @@ export const statusOpt = [
{ confId: 3, confValue: "已完成" },
{ confId: 0, confValue: "无需处理" }
]
// 员工职级
export const staffLevelList = [
{ confId: 0, confValue: "实习生(理论)" },
{ confId: 1, confValue: "实习生(实践)" },
{ confId: 2, confValue: "初级驻店" },
{ confId: 3, confValue: "中级驻店" },
{ confId: 4, confValue: "高级驻店" },
{ confId: 5, confValue: "小店长" },
{ confId: 6, confValue: "大店长" },
{ confId: 7, confValue: "初级区域督导" },
{ confId: 8, confValue: "中级区域督导" },
{ confId: 9, confValue: "高级区域督导" }
]
// 所属业务
export const staffSceneLabelList = [
{ confId: "1", confValue: "轻改" },
{ confId: "0", confValue: "会员权益/升级" }
]
// 财资数据 收支标志
export const cdSignOpt = [
{ confId: 0, confValue: "收入" },
{ confId: 1, confValue: "支出" }
]
// 财资数据 同步状态
export const jdSyncOpt = [
{ confId: 0, confValue: "失败" },
{ confId: 1, confValue: "成功" }
]
// 财资数据 操作项
export const operationTypeOpt = [
{ confId: 1, confValue: "重推财资数据" },
{ confId: 2, confValue: "推送财资数据" },
{ confId: 3, confValue: "获取财资数据" }
]
// 财资数据 操作项
export const operationResultOpt = [
{ confId: "Y", confValue: "成功" },
{ confId: "N", confValue: "失败" }
]
......@@ -21,13 +21,13 @@ export const routerName = {
},
auth: [
{
authId: '9050103',
parentId: '90501',
label: '下载对账单',
icon: 'download',
category: 'Button',
type: 'primary',
handle: 'downloadAccount'
authId: "9050103",
parentId: "90501",
label: "下载对账单",
icon: "download",
category: "Button",
type: "primary",
handle: "downloadAccount"
},
{
authId: "9050101",
......@@ -292,5 +292,54 @@ export const routerName = {
}
],
component: _import("financeManage/balanceStatistics/index")
},
90509: {
path: "/theAssetData",
name: "theAssetData",
meta: {
title: "财资数据",
authId: "90509",
parentId: "905",
cache: false
},
auth: [
{
authId: "9050901",
parentId: "90509",
label: "重取明细",
category: "Button",
type: "primary",
handle: "handleRefetchDetail"
},
{
authId: "9050902",
parentId: "90509",
label: "批量重推",
category: "Button",
type: "primary",
handle: "handleBatchRepush"
},
{
authId: "9050903",
parentId: "90509",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9050904",
parentId: "90509",
label: "详情",
handle: "handleDetail"
},
{
authId: "9050905",
parentId: "90509",
label: "回单",
handle: "handleReceipt"
}
],
component: _import("financeManage/theAssetData/index")
}
}
......@@ -105,7 +105,7 @@ export const routerName = {
parentId: "91205",
label: "设备登录历史",
category: "Button",
type: "primary",
type: "default",
handle: "handleLoginHistory"
},
{
......@@ -113,7 +113,7 @@ export const routerName = {
parentId: "91205",
label: "导出人员",
category: "Button",
type: "primary",
type: "default",
handle: "handleExportPerson"
},
{
......@@ -121,110 +121,151 @@ export const routerName = {
parentId: "91205",
label: "导出标签",
category: "Button",
type: "primary",
type: "default",
handle: "handleExportLabel"
},
{
authId: "9120505",
parentId: "91205",
label: "编辑",
label: "编辑员工",
handle: "handleEdit",
addRoutePath: [
{
authId: "912050501",
name: "员工编辑",
name: "编辑员工",
parentId: "9120505"
}
]
}
],
component: _import("systemConfig/inStoreManage/inStoreControlList")
},
912050501: {
path: "/editStaff",
name: "editStaff",
meta: {
title: "员工编辑",
authId: "912050501",
parentId: "9120505",
cache: false,
activePath: "/inStoreManage"
},
component: _import("systemConfig/inStoreManage/editStaff")
},
91206: {
path: "/staffManage",
name: "staffManage",
meta: {
title: "驻店工资绩效",
authId: "91206",
parentId: "912",
cache: false
},
auth: [
},
{
authId: "9120601",
parentId: "91206",
label: "导出工资绩效",
authId: "9120506",
parentId: "91205",
label: "创建员工",
category: "Button",
type: "primary",
handle: "handleExport"
handle: "handleCreateStaff"
},
{
authId: "9120602",
parentId: "91206",
label: "导入员工",
authId: "9120507",
parentId: "91205",
label: "导出员工业绩",
category: "Button",
handle: "handleImport"
type: "default",
handle: "handleExportPerformance"
},
{
authId: "9120603",
parentId: "91206",
label: "绩效配置",
handle: "handlePerformance",
addRoutePath: [
{
authId: "912060301",
name: "绩效配置",
parentId: "91206"
}
]
},
{
authId: "9120604",
parentId: "91206",
label: "导师配置",
handle: "handleMentor",
authId: "9120508",
parentId: "91205",
label: "历史业绩",
handle: "handleHistoryPerformance",
addRoutePath: [
{
authId: "912060401",
name: "导师配置",
parentId: "91206"
authId: "912050501",
name: "历史业绩",
parentId: "9120505"
}
]
},
{
authId: "9120605",
parentId: "91206",
label: "启用工资绩效",
handle: "handleEnableOrDisable",
ruleObj: {
attr: "performanceFlag",
rule: {
N: "启用工资绩效",
Y: "禁用工资绩效"
}
}
authId: "9120509",
parentId: "91205",
label: "修订工资",
handle: "handleEditSalary"
},
{
authId: "9120606",
parentId: "91206",
label: "业绩详情",
handle: "handleDetail"
authId: "9120510",
parentId: "91205",
label: "工资明细",
handle: "handleSalaryDetail",
}
],
component: _import("systemConfig/businessSchoolManage/index")
component: _import("residentManage/inStoreManage/inStoreControlList")
},
912050501: {
path: "/staffInfo",
name: "staffInfo",
meta: {
title: "员工信息",
authId: "912050501",
parentId: "9120505",
cache: false,
activePath: "/inStoreManage"
},
component: _import("residentManage/inStoreManage/staffInfo")
},
// 91206: {
// path: "/staffManage",
// name: "staffManage",
// meta: {
// title: "驻店工资绩效",
// authId: "91206",
// parentId: "912",
// cache: false
// },
// auth: [
// {
// authId: "9120601",
// parentId: "91206",
// label: "导出工资绩效",
// category: "Button",
// type: "primary",
// handle: "handleExport"
// },
// {
// authId: "9120602",
// parentId: "91206",
// label: "导入员工",
// category: "Button",
// handle: "handleImport"
// },
// {
// authId: "9120603",
// parentId: "91206",
// label: "绩效配置",
// handle: "handlePerformance",
// addRoutePath: [
// {
// authId: "912060301",
// name: "绩效配置",
// parentId: "91206"
// }
// ]
// },
// {
// authId: "9120604",
// parentId: "91206",
// label: "导师配置",
// handle: "handleMentor",
// addRoutePath: [
// {
// authId: "912060401",
// name: "导师配置",
// parentId: "91206"
// }
// ]
// },
// {
// authId: "9120605",
// parentId: "91206",
// label: "启用工资绩效",
// handle: "handleEnableOrDisable",
// ruleObj: {
// attr: "performanceFlag",
// rule: {
// N: "启用工资绩效",
// Y: "禁用工资绩效"
// }
// }
// },
// {
// authId: "9120606",
// parentId: "91206",
// label: "业绩详情",
// handle: "handleDetail"
// }
// ],
// component: _import("systemConfig/businessSchoolManage/index")
// },
91208: {
path: "/exercise",
name: "exercise",
......@@ -346,30 +387,30 @@ export const routerName = {
},
component: _import("residentManage/exercise/add")
},
912060301: {
path: "/performanceConfig",
name: "performanceConfig",
meta: {
title: "绩效配置",
authId: "912060301",
parentId: "91206",
sideHidden: true,
activePath: "/staffManage"
},
component: _import("systemConfig/businessSchoolManage/performanceConfig")
},
912060401: {
path: "/mentorConfig",
name: "mentorConfig",
meta: {
title: "导师配置",
authId: "912060401",
parentId: "91206",
sideHidden: true,
activePath: "/staffManage"
},
component: _import("systemConfig/businessSchoolManage/mentorConfig")
},
// 912060301: {
// path: "/performanceConfig",
// name: "performanceConfig",
// meta: {
// title: "绩效配置",
// authId: "912060301",
// parentId: "91206",
// sideHidden: true,
// activePath: "/staffManage"
// },
// component: _import("systemConfig/businessSchoolManage/performanceConfig")
// },
// 912060401: {
// path: "/mentorConfig",
// name: "mentorConfig",
// meta: {
// title: "导师配置",
// authId: "912060401",
// parentId: "91206",
// sideHidden: true,
// activePath: "/staffManage"
// },
// component: _import("systemConfig/businessSchoolManage/mentorConfig")
// },
91207: {
path: "/inStoreGoalsConfig",
name: "inStoreGoalsConfig",
......@@ -563,5 +604,113 @@ export const routerName = {
}
],
component: _import("residentManage/tabletManagement")
},
91212: {
path: "/salaryPerformance",
name: "salaryPerformance",
meta: {
title: "驻店工资绩效",
authId: "91212",
parentId: "912",
cache: false
},
auth: [
{
authId: "9121201",
parentId: "91212",
label: "新增绩效方案",
category: "Button",
type: "primary",
handle: "handleToAdd",
addRoutePath: [
{
authId: "912120101",
name: "新增绩效方案",
parentId: "91212"
}
]
},
{
authId: "9121202",
parentId: "91212",
label: "编辑",
handle: "handleToEdit",
addRoutePath: [
{
authId: "912070101",
name: "编辑",
parentId: "91207"
}
]
},
{
authId: "9121203",
parentId: "91212",
label: "删除",
handle: "handleDelete"
},
{
authId: "9121204",
parentId: "91212",
label: "启用",
handle: "handleEnableOrDisable",
ruleObj: {
attr: "status",
rule: {
2: "启用",
1: "禁用"
}
}
},
{
authId: "9121205",
parentId: "91212",
label: "导出", // 门店工资绩效导出
category: "Button",
type: "default",
handle: "handleExport"
},
{
authId: "9121206",
parentId: "91212",
label: "新增支出",
category: "Button",
type: "primary",
handle: "handleAddExpenditure"
},
{
authId: "9121207",
parentId: "91212",
label: "导出", // 激励池导出
category: "Button",
type: "default",
handle: "handleExport"
},
{
authId: "9121208",
parentId: "91212",
label: "修改备注",
handle: "handleToNote"
},
{
authId: "9121209",
parentId: "91212",
label: "明细",
handle: "handleDetail"
}
],
component: _import("residentManage/salaryPerformance/index")
},
912120101: {
path: "/performanceScheme",
name: "performanceScheme",
meta: {
title: "新增绩效方案",
authId: "912120101",
parentId: "91212",
sideHidden: true,
activePath: "/salaryPerformance"
},
component: _import("residentManage/salaryPerformance/performanceScheme")
}
}
......@@ -37,23 +37,41 @@
:style="{ width: picOptions.width, height: picOptions.height }"
v-else
>
<img class="photo-activity" :src="item" alt="" />
<div
class="mask"
:style="{ width: picOptions.width, height: picOptions.height }"
>
<template v-if="picOptions.style == 'button'">
<div class="view-box">
<i class="el-icon-picture-outline"></i>
<div class="img-name">{{ getName(item) }}</div>
<div
class="view-btn"
@click="handleEnlarge(item, 'img', index)"
>
预览
</div>
<i class="el-icon-close" @click="close('img', index)"></i>
</div>
</template>
<template v-else>
<img class="photo-activity" v-lazy="item" alt="" />
<div
class="pic-pane-close"
@click="handleEnlarge(item, 'img', index)"
class="mask"
:style="{
width: picOptions.width,
height: picOptions.height
}"
>
<img :src="require('@/assets/view.png')" alt="" />
</div>
<template v-if="picOptions.isClose">
<div class="pic-pane-close" @click="close('img', index)">
<img :src="require('@/assets/icon-delete.png')" alt="" />
<div
class="pic-pane-close"
@click="handleEnlarge(item, 'img', index)"
>
<img :src="require('@/assets/view.png')" alt="" />
</div>
</template>
</div>
<template v-if="picOptions.isClose">
<div class="pic-pane-close" @click="close('img', index)">
<img :src="require('@/assets/icon-delete.png')" alt="" />
</div>
</template>
</div>
</template>
</div>
</div>
</template>
......@@ -65,37 +83,61 @@
(imageUrlArr && imageUrlArr.length == 0 && limit == 1)
"
>
<div
class="upload-img"
:style="{ width: picOptions.width, height: picOptions.height }"
@click="selectFile()"
>
<i class="el-icon-plus avatar-uploader-desc-icon"></i>
<div class="avatar-uploader-desc-word">
上传{{
picOptions.noLimitType
? ""
: picOptions.type == "video"
? "视频"
: "图片"
}}
<template v-if="picOptions.style == 'button'">
<div class="upload-box">
<el-button size="small" icon="el-icon-plus" @click="selectFile()">
上传图片
</el-button>
<input
type="file"
ref="uploadImgRef"
class="upload-img"
:style="{ width: '100%', height: '100%' }"
style="opacity: 0; z-index: -1"
:accept="
picOptions.noLimitType
? '*'
: picOptions.type == 'video'
? '.mp4'
: '.jpg, .jpeg, .png,.webp'
"
@change="(e) => handleUpload(e)"
/>
</div>
<input
type="file"
ref="uploadImgRef"
</template>
<template v-else>
<div
@click="selectFile()"
class="upload-img"
:style="{ width: picOptions.width, height: picOptions.height }"
style="opacity: 0; z-index: -1"
:accept="
picOptions.noLimitType
? '*'
: picOptions.type == 'video'
? '.mp4'
: '.jpg, .jpeg, .png,.webp'
"
@change="(e) => handleUpload(e)"
/>
</div>
>
<i class="el-icon-plus avatar-uploader-desc-icon"></i>
<div class="avatar-uploader-desc-word">
上传{{
picOptions.noLimitType
? ""
: picOptions.type == "video"
? "视频"
: "图片"
}}
</div>
<input
type="file"
ref="uploadImgRef"
class="upload-img"
:style="{ width: picOptions.width, height: picOptions.height }"
style="opacity: 0; z-index: -1"
:accept="
picOptions.noLimitType
? '*'
: picOptions.type == 'video'
? '.mp4'
: '.jpg, .jpeg, .png,.webp'
"
@change="(e) => handleUpload(e)"
/>
</div>
</template>
</template>
<el-dialog
class="image-dialog"
......@@ -275,6 +317,9 @@ export default {
})
}
},
getName(name) {
return name.split("/").pop()
},
uploadVideoFn(e) {
this.uploadInfo = new upload({
showprocess: true,
......@@ -334,6 +379,40 @@ export default {
}
</script>
<style scoped lang="scss">
.view-box {
width: 240px;
height: 32px;
border-radius: 4px;
opacity: 1;
background: #f4f6f7;
align-items: center;
display: flex;
padding: 0px 8px;
box-sizing: border-box;
font-size: 14px;
.el-icon-picture-outline {
color: #185efe;
}
.img-name {
width: 77px;
margin: 0px 4px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.view-btn {
color: #185efe;
cursor: pointer;
}
.el-icon-close {
margin-left: auto;
cursor: pointer;
}
}
.upload-box {
width: 95px;
height: 30px;
}
.activity-img-box {
display: flex;
flex-wrap: wrap;
......
<template>
<d2-dialog
title="新增门店车型配置"
:is-visible="dialogVisible"
class="dailog-box"
width="36%"
@closeDialog="handleClose"
@confirmDialog="handleConfirm"
>
<el-form :model="form" :rules="rules" ref="ruleForm" v-loading="loading">
<el-form-item
label="请选择主营品牌"
:label-width="formLabelWidth"
prop="brandId"
>
<el-select
filterable
class="form-select"
v-model="form.brandId"
placeholder="请选择"
@change="changeBrand"
>
<el-option
v-for="(i, indx) in brandList"
:key="i.id"
:label="i.name"
:value="i.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label="请选择车系"
:label-width="formLabelWidth"
prop="carId"
v-if="form.brandId"
>
<el-select
filterable
class="form-select"
v-model="form.carId"
@change="changeCar"
placeholder="请选择"
>
<el-option
v-for="(i, indx) in brandList[brandIndex].childs"
:key="i.id"
:label="i.name"
:value="i.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label="请选择车型"
:label-width="formLabelWidth"
prop="carModelId"
v-if="form.carId"
>
<el-select
filterable
class="form-select"
v-model="form.carModelId"
placeholder="请选择"
@change="changeCarModel"
>
<el-option
v-for="(i, indx) in brandList[brandIndex].childs[carIndex].childs"
:key="i.id"
:label="i.name"
:value="i.id"
></el-option>
</el-select>
</el-form-item>
</el-form>
</d2-dialog>
</template>
<script>
import { listBrandWithSeries } from "@api/contentManager"
export default {
name: "addBrandDialog",
data() {
return {
form: { carModelId: "", brandId: "", carId: "" },
brandList: [],
formLabelWidth: "120px",
brandIndex: 0,
carIndex: 0,
selectCar: null,
loading: false,
rules: {
brandId: [
{ required: true, message: "请选择主营品牌", trigger: ["change"] }
],
carId: [{ required: true, message: "请选择车系", trigger: ["change"] }],
carModelId: [
{ required: true, message: "请选择车型", trigger: ["change"] }
]
}
}
},
props: {
dialogVisible: Boolean,
merchantId: [String, Number]
},
async mounted() {
this.loading = true
listBrandWithSeries({ merchantId: this.merchantId }).then((res) => {
this.brandList = res
this.loading = false
})
},
methods: {
changeBrand(val) {
this.brandIndex = this.brandList.findIndex((e) => e.id === val)
this.form.carModelId = ""
this.form.carId = ""
},
changeCar(val) {
this.carIndex = this.brandList[this.brandIndex].childs.findIndex(
(e) => e.id === val
)
this.form.carModelId = ""
},
changeCarModel(val, v) {
const index = this.brandList[this.brandIndex].childs[
this.carIndex
].childs.findIndex((e) => e.id === val)
const { id: carModelId, name: carModelName } =
this.brandList[this.brandIndex].childs[this.carIndex].childs[index]
const { id: brandId, name: brandName } = this.brandList[this.brandIndex]
const { id: seriesId, name: seriesName } =
this.brandList[this.brandIndex].childs[this.carIndex]
this.selectCar = {
brandId,
brandName,
carModelId,
carModelName,
seriesId,
seriesName
}
},
handleConfirm() {
this.$refs.ruleForm.validate((valid) => {
if (valid) {
this.handleClose(this.selectCar)
}
})
},
handleClose(val) {
this.$emit("dialogClose", val)
}
}
}
</script>
<style lang="scss">
.dialog-title {
font-size: 14px;
line-height: 30px;
margin-bottom: 15px;
}
.form-select {
width: 50%;
}
</style>
......@@ -2,14 +2,14 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-09-06 09:49:46
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-09-24 10:18:44
* @LastEditTime: 2024-12-04 13:42:32
* @FilePath: \dj-car-life-system\src\views\contentManager\packageConfig\components\addDialog.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 月度库存结算单弹窗 -->
<template>
<d2-dialog
title="新增门店"
:title="cloneId ? '复制全套素材到指定门店' : '新增门店'"
:is-visible="dialogVisible"
class="dailog-box"
width="36%"
......@@ -18,7 +18,11 @@
>
<div v-loading="loading">
<div class="dialog-title">
请选择新增门店,新增门店的素材会复用默认门店的素材,可自定义修改
{{
cloneId
? "将该门店下所有车型的所有素材数据(不包含客户案例),复制或替换到指定门店"
: "请选择新增门店,新增门店的素材会复用默认门店的素材,可自定义修改"
}}
</div>
<el-select
filterable
......@@ -38,18 +42,22 @@
</template>
<script>
import { recepitonUpdate } from "@api/contentManager"
import { recepitonUpdate, materialPage } from "@api/contentManager"
import { mapState, mapActions } from "vuex"
export default {
name: "addDialog",
data() {
return {
formData: {},
formData: { merchantId: "" },
merchantIdBrandList: [],
loading: false
}
},
props: {
dialogVisible: Boolean
dialogVisible: Boolean,
cloneId: {
type: Number
}
},
computed: {
...mapState("d2admin/merchant", ["merchantIdList"])
......@@ -58,6 +66,12 @@ export default {
this.loading = true
await this.getMerchantIdList()
this.loading = false
console.log(this.cloneId, "cloneId")
if (this.cloneId) {
materialPage({ pageSize: 1000, currentPage: 1 }).then((res) => {
this.merchantIdBrandList = res.list.map((i) => i.merchantId)
})
}
},
methods: {
...mapActions("d2admin/merchant", ["getMerchantIdList"]),
......@@ -66,17 +80,45 @@ export default {
if (!merchantId) {
return this.$message.error("请选择门店")
}
const merchantName = this.merchantIdList.find(
(i) => i.merchantId === merchantId
).merchantName
recepitonUpdate({ merchantId, configType: 0, merchantName }).then(
(res) => {
if (res) {
this.handleClose()
this.$message.success("新增成功")
}
let params = { merchantId, configType: 0, merchantName }
if (this.cloneId) {
params = {
merchantId: merchantId,
merchantName,
copyMerchantId: this.cloneId
}
if (this.merchantIdBrandList.includes(merchantId)) {
this.$confirm("该门店下已包含素材,是否复制替换?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
closeOnClickModal: false
})
.then(() => {
recepitonUpdate(params).then((res) => {
if (res) {
this.handleClose()
this.$message.success("操作成功")
}
})
})
.catch((err) => {
console.log(err)
})
return
}
}
recepitonUpdate(params).then((res) => {
if (res) {
this.handleClose()
this.$message.success("操作成功")
}
)
})
},
handleClose() {
this.$emit("dialogClose")
......
......@@ -11,13 +11,47 @@
<span>素材配置</span>
</div>
<div class="info-form-main">
<el-tabs v-model="packageName" class="tab-main">
<el-tab-pane
<div class="add-brand">
<el-button
size="small"
icon="el-icon-plus"
v-if="merchantId && configInfo.length != 10"
@click="bandleAddBrand"
>
新增
</el-button>
</div>
<Tabs
:closable="configInfo.length > 1"
v-model="packageName"
type="card"
@tab-remove="removeBrandTab"
class="tab-main"
:tab-list-item="configInfo"
>
<Tab-pane
v-for="(item, index) in configInfo"
:label="item.carModelName"
:name="item.carModelName"
:key="index"
:key="item.carModelName"
>
<div class="brand-header">
<div class="brand-header-left">
<div class="brand-label">
<label>*</label>
首页车型大图:
</div>
<glsx-preview
@change="({ arr }) => (item.modelDisplayPicurl = arr[0])"
:pic-options="brandImgOptions"
:image-url-arr="
item.modelDisplayPicurl ? [item.modelDisplayPicurl] : []
"
limit="1"
></glsx-preview>
<div class="tips">推荐尺寸:840*420,单个文件不超过10M</div>
</div>
</div>
<div
class="tab-content"
v-for="(sItem, sIndex) in item.subItem"
......@@ -386,8 +420,8 @@
</Tabs>
</div>
</div>
</el-tab-pane>
</el-tabs>
</Tab-pane>
</Tabs>
</div>
</div>
</div>
......@@ -465,6 +499,12 @@
新增
</div>
</el-dialog>
<add-brand
:dialogVisible="dialogBrandVisible"
v-if="dialogBrandVisible"
:merchantId="merchantId"
@dialogClose="addDialogClose"
/>
</d2-container>
</template>
<script>
......@@ -480,6 +520,7 @@ import preview from "../components/preview"
import Tabs from "../components/tabs/tabs"
import TabPane from "../components/tabs/tab-pane"
import draggable from "vuedraggable"
import addBrand from "./components/addBrand"
import { deepClone } from "@/common/util"
const PACKAGE = {
1: {
......@@ -513,6 +554,7 @@ export default {
glsxPreview: preview,
TabPane,
Tabs,
addBrand,
draggable
},
data() {
......@@ -520,6 +562,7 @@ export default {
imgSrc:
"https://img02.glsx.com.cn/weapp/resource/saas/app/material/case.jpg",
dialogVisible: false,
dialogBrandVisible: false,
brandLoading: false,
inputVal: "",
caseVisible: false,
......@@ -527,6 +570,7 @@ export default {
loading: false,
isUpStatus: true,
query: "",
merchantId: "",
brandOptions: [],
configInfo: [],
caseInfo: [
......@@ -561,6 +605,14 @@ export default {
limitSize: 100,
noLimitType: true
},
brandImgOptions: {
width: "240px",
height: "32px",
style: "button",
isClose: true,
limitSize: 10,
type: "img"
},
brandList: [],
brandCheckedList: [],
brandFormList: [],
......@@ -576,6 +628,7 @@ export default {
mounted() {
const { merchantId, configType } = this.$route.query
this.configType = configType
this.merchantId = merchantId
this.query = this.$route.query
this.materialDetail(merchantId)
this.getBrand()
......@@ -618,8 +671,88 @@ export default {
this.brandList = res.data
})
},
handleSureBrand() {
this.brandVisible = false
bandleAddBrand() {
this.dialogBrandVisible = true
},
addDialogClose(val) {
this.dialogBrandVisible = false
if (val) {
console.log(this.configInfo)
const idx = this.configInfo.find(
(i) => i.carModelName == val.carModelName
)
if (idx) {
return this.$message.error("该车型已存在")
}
const brandIndex = this.configInfo.findIndex(
(i) => i.carModelName == this.packageName
)
let { packages, films, optionals, products } = deepClone(
this.configInfo[brandIndex]
)
console.log(
packages,
films,
optionals,
products,
"packages, films, optionals, product"
)
packages.forEach((i) => {
const obj = Object.keys(i.infoList[0]).reduce((acc, key) => {
if (key == "category") {
acc[key] = i.infoList[0][key]
} else {
acc[key] = ""
}
return acc
}, {})
i.infoList = [{ ...obj, ...val }]
})
packages = packages.filter((i) => i)
packages = [packages[0]]
films.forEach((i) => {
console.log(i)
const obj = Object.keys(i.infoList[0]).reduce((acc, key) => {
if (key == "category") {
acc[key] = i.infoList[0][key]
} else {
acc[key] = ""
}
return acc
}, {})
i.infoList = [{ ...obj, ...val }]
})
films = films.filter((i) => i)
films = [films[0]]
const obj = Object.keys(optionals[0]).reduce((acc, key) => {
acc[key] = ""
return acc
}, {})
optionals = [{ ...obj, ...val }]
products.forEach((i) => {
const obj = Object.keys(i.infoList[0]).reduce((acc, key) => {
if (key == "category") {
acc[key] = i.infoList[0][key]
} else {
acc[key] = ""
}
return acc
}, {})
i.infoList = [{ ...obj, ...val }]
})
products = products.filter((i) => i)
products = [products[0]]
this.configInfo.push({
...val,
packages,
modelDisplayPicurl: "",
films,
optionals,
products,
subItem: [packages, films, products, optionals]
})
this.packageName = val.carModelName
}
},
handleEditBrand(val) {
this.brandVisible = true
......@@ -744,6 +877,7 @@ export default {
})
this.caseName = this.caseInfo[0].category
this.packageName = this.configInfo[0].carModelName
console.log(this.configInfo, "this.configInfo")
},
//设置置灰状态
getDisabled(i) {
......@@ -829,6 +963,25 @@ export default {
this.caseVisible = false
},
removeBrandTab(name) {
this.$confirm("该车型下包含素材,是否清空删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
closeOnClickModal: false
})
.then(() => {
const index = this.configInfo.findIndex((i) => i.carModelName == name)
this.configInfo.splice(index, 1)
if (name == this.packageName) {
const len = this.configInfo.length - 1
this.packageName = this.configInfo[len].carModelName
}
})
.catch((err) => {
console.log(err)
})
},
removeTab(targetName, tab) {
if (targetName == "窗膜") {
return this.$message.warning("无法删除")
......@@ -924,11 +1077,26 @@ export default {
productInfoList: [],
optionalInfoList: []
}
const carModelInfoList = []
/**
* infoList[]转为packageInfoList:[],productInfoList:[],filmInfoList:[]
*/
const keys = Object.keys(packageList)
this.configInfo.forEach((i) => {
if (!i.modelDisplayPicurl) {
this.$message.error("请校验并输入素材信息必填项")
throw new Error("请完善信息")
}
carModelInfoList.push({
id: i.id,
brandId: i.brandId,
brandName: i.brandName,
carModelId: i.carModelId,
carModelName: i.carModelName,
modelDisplayPicurl: i.modelDisplayPicurl,
seriesId: i.seriesId,
seriesName: i.seriesName
})
i.subItem.forEach((sub, k) => {
console.log(sub)
if (!sub) return
......@@ -966,6 +1134,7 @@ export default {
configType: 1,
merchantName,
caseInfoList,
carModelInfoList,
...packageList
}
},
......@@ -1087,11 +1256,38 @@ export default {
}
.info-form-main {
padding: 20px;
position: relative;
.add-brand {
position: absolute;
right: 20px;
top: 24px;
cursor: pointer;
z-index: 100;
}
.tab-main {
::v-deep.el-tabs__item {
min-width: 100px;
text-align: center;
}
.brand-header {
display: flex;
justify-content: space-between;
margin: 20px;
.brand-label {
color: #666666;
label {
color: #eb4e4e;
}
}
.tips {
color: #999999;
margin-left: 10px;
}
&-left {
display: flex;
align-items: center;
}
}
}
.tab-content {
border: 1px solid #ebeef5;
......
......@@ -20,7 +20,7 @@
<d2-container> -->
<div class="d2-container-content">
<d2-table-header>
<el-button size="small" type="primary" @click="handleAdd">
<el-button size="small" type="primary" @click="handleDialog">
新增门店
</el-button>
</d2-table-header>
......@@ -35,6 +35,13 @@
<el-button type="text" @click="handleEdit(scope.scope)">
编辑
</el-button>
<el-button
type="text"
@click="handleClone(scope.scope)"
v-if="scope.scope.merchantId"
>
复制素材
</el-button>
</div>
</d2-table>
</div>
......@@ -43,6 +50,7 @@
<add-dialog
:dialogVisible="dialogVisible"
v-if="dialogVisible"
:cloneId="cloneId"
@dialogClose="addDialogClose"
/>
</div>
......@@ -61,6 +69,8 @@ export default {
return {
dialogVisible: false,
labelWidth: "100px",
cloneId: null,
dialogType: "",
searchForm: {
merchantId: "",
merchantName: ""
......@@ -129,12 +139,18 @@ export default {
resolve()
})
},
handleAdd() {
handleDialog(val) {
if (!val) this.cloneId = null
this.dialogVisible = true
},
handleSearch() {
this.$refs.recordTable.refreshTable(false, true)
},
handleClone(row) {
const { merchantId } = row
this.cloneId = merchantId
this.handleDialog(true)
},
handleEdit(row) {
const { id, merchantId, merchantName, configType } = row
this.$router.push({
......
......@@ -44,7 +44,6 @@ import { saveFollowRecord } from '@api/earlyWarningManager'
import { deepClone } from '@/common/util'
import { findMerchantStaffList } from '@api/index'
import { afterPickerOptions_timeChoose } from '@/common/format'
// import { baseConfig } from '@/main'
export default {
name: 'HandleDialog',
data() {
......@@ -65,10 +64,8 @@ export default {
},
handleFormRef: 'handleFormRef',
formRules: {
// followStatus: [{ required: true, message: '请选择处理结果', trigger: 'change' }],
followNotes: [{ required: true, message: '请输入跟进内容', trigger: 'blur' }],
nextFollowerId: [{ required: true, message: '请选择下次跟进人', trigger: 'change' }]
// nextFollowerTime: [{ required: true, message: '请选择下次跟进时间', trigger: 'change' }]
},
editFormData: [{
label: '处理结果',
......@@ -161,11 +158,6 @@ export default {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', deepClone(this.baseData[item.optionsName]))
if (this[formName][index].label == '业务场景') { // 业务场景默认选中第一项
console.log(this.baseData[item.optionsName])
this.infoForm.sceneType = this.baseData[item.optionsName][0].confId
}
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
......@@ -184,13 +176,6 @@ export default {
this[formName][idx].isHide = isHide
},
// showOrHideAttr_transferType(formName, addHtml, isHide) {
// const idx = this[formName].findIndex(item => item.addHtml == addHtml)
// console.log('idx', idx)
// console.log('this[formName][idx].isHide', this[formName][idx].isHide)
// this[formName][idx].isHide = isHide
// },
// 获取全部员工 过滤出服务商负责人可选数据
findMerchantStaffList() {
return new Promise((resolve, reject) => {
......@@ -198,13 +183,11 @@ export default {
// 服务商负责人(根据角色名过滤)
const arr = []
res?.map(val => {
// if (val.roleName == baseConfig.roleName) {
arr.push({
userId: val.uuid,
userName: val.staffName,
userPhone: val.staffPhone
})
// }
})
this.baseData.followUpPersonOpt = arr
this.getOptionsList('editFormData', false)
......
......@@ -496,28 +496,6 @@ export default {
handleExport() {
var params = this.searchForm
// if (params.statuses.length > 0) {
// const statuses = `statuses[0]`
// params[statuses] = params.statuses[0]
// delete params.statuses
// }
// 去除为null的值
// for (const key in params) {
// if (params[key] === null || params[key] === '') {
// delete params[key]
// }
// }
// params.method = 'dj.api.smartcarlife.warningmsg.warningMsgDetailListWithPageExport'
// const list = [
// ...this.dowloadList,
// {
// name: '员工预警明细',
// exportParam: JSON.stringify(params),
// status: 'waiting',
// timeid: new Date().getTime()
// }
// ]
// this.actionSetDownloadList({ list, type: 'dowloadList' })
warningMsgDetailListWithPageExport(params).then((res) => {
res && downLoadFile(res)
......@@ -529,13 +507,6 @@ export default {
this.detailVisible = true
},
// dialogClose(flag) {
// this.categoryVisible = !this.categoryVisible
// if (flag) {
// this.$refs.detailListTable.refreshTable()
// }
// },
handleDeal(row) {
this.recordInfo = row
this.handleVisible = true
......
......@@ -44,7 +44,6 @@ import { saveFollowRecord } from '@api/earlyWarningManager'
import { deepClone } from '@/common/util'
import { findMerchantStaffList } from '@api/index'
import { afterPickerOptions_timeChoose } from '@/common/format'
// import { baseConfig } from '@/main'
export default {
name: 'HandleDialog',
data() {
......@@ -65,10 +64,8 @@ export default {
},
handleFormRef: 'handleFormRef',
formRules: {
// followStatus: [{ required: true, message: '请选择处理结果', trigger: 'change' }],
followNotes: [{ required: true, message: '请输入跟进内容', trigger: 'blur' }],
nextFollowerId: [{ required: true, message: '请选择下次跟进人', trigger: 'change' }]
// nextFollowerTime: [{ required: true, message: '请选择下次跟进时间', trigger: 'change' }]
},
editFormData: [{
label: '处理结果',
......@@ -160,11 +157,6 @@ export default {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', deepClone(this.baseData[item.optionsName]))
if (this[formName][index].label == '业务场景') { // 业务场景默认选中第一项
console.log(this.baseData[item.optionsName])
this.infoForm.sceneType = this.baseData[item.optionsName][0].confId
}
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
......@@ -183,13 +175,6 @@ export default {
this[formName][idx].isHide = isHide
},
// showOrHideAttr_transferType(formName, addHtml, isHide) {
// const idx = this[formName].findIndex(item => item.addHtml == addHtml)
// console.log('idx', idx)
// console.log('this[formName][idx].isHide', this[formName][idx].isHide)
// this[formName][idx].isHide = isHide
// },
// 获取全部员工 过滤出服务商负责人可选数据
findMerchantStaffList() {
return new Promise((resolve, reject) => {
......@@ -197,13 +182,11 @@ export default {
// 服务商负责人(根据角色名过滤)
const arr = []
res?.map(val => {
// if (val.roleName == baseConfig.roleName) {
arr.push({
userId: val.uuid,
userName: val.staffName,
userPhone: val.staffPhone
})
// }
})
this.baseData.followUpPersonOpt = arr
this.getOptionsList('editFormData', false)
......
......@@ -80,7 +80,6 @@
</template>
<script>
// import { mapActions, mapState } from 'vuex'
import { Util, deepClone, downLoadFile } from '@/common/util'
import detailDialog from './components/detailDialog'
import handleDialog from './components/handleDialog'
......@@ -352,9 +351,6 @@ export default {
handleDialog
},
computed: {
// ...mapState({
// dowloadList: (state) => state.d2admin.user.dowloadList
// })
},
mounted() {
console.log('this.paramsObj', this.paramsObj)
......@@ -368,11 +364,6 @@ export default {
},
methods: {
// ...mapActions({
// get: 'd2admin/base/get',
// close: 'd2admin/page/close'
// }),
// ...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() {
this.findAllData(2)
......@@ -386,7 +377,6 @@ export default {
if (this.searchForm.warnCycle) {
this.searchForm.warningStartDate = Util.dateFormate(this.searchForm.warnCycle[0], 'YYYY-MM-DD')
this.searchForm.warningEndDate = Util.dateFormate(this.searchForm.warnCycle[1], 'YYYY-MM-DD')
// delete this.searchForm.warnCycle
} else {
delete this.searchForm.warningStartDate
delete this.searchForm.warningEndDate
......@@ -394,7 +384,6 @@ export default {
if (this.searchForm.createTime) {
this.searchForm.startDate = Util.dateFormate(this.searchForm.createTime[0], 'YYYY-MM-DD')
this.searchForm.endDate = Util.dateFormate(this.searchForm.createTime[1], 'YYYY-MM-DD')
// delete this.searchForm.createTime
} else {
delete this.searchForm.startDate
delete this.searchForm.endDate
......@@ -474,29 +463,6 @@ export default {
handleExport() {
var params = this.searchForm
// if (params.statuses.length > 0) {
// const statuses = `statuses[0]`
// params[statuses] = params.statuses[0]
// delete params.statuses
// }
// 去除为null的值
// for (const key in params) {
// if (params[key] === null || params[key] === '') {
// delete params[key]
// }
// }
// params.method = 'dj.api.smartcarlife.warningmsg.warningMsgDetailListWithPageExport'
// const list = [
// ...this.dowloadList,
// {
// name: '员工预警明细',
// exportParam: JSON.stringify(params),
// status: 'waiting',
// timeid: new Date().getTime()
// }
// ]
// this.actionSetDownloadList({ list, type: 'dowloadList' })
warningMsgDetailListWithPageExport(params).then((res) => {
res && downLoadFile(res)
})
......@@ -507,13 +473,6 @@ export default {
this.detailVisible = true
},
// dialogClose(flag) {
// this.categoryVisible = !this.categoryVisible
// if (flag) {
// this.$refs.detailListTable.refreshTable()
// }
// },
handleDeal(row) {
this.recordInfo = row
this.handleVisible = true
......
<template>
<div class="range">
<div :class="[
' el-date-editor',
'el-range-editor',
'el-input__inner',
'el-date-editor--daterange',
'el-range-editor--small',
pickerVisible ? 'is-active' : ''
]"
@click="handleRangeClick"
@mouseleave="showClose = false"
@mousemove="handleMove"
ref="reference">
<template v-if="infinity">
<el-input-number class="el-range-input hide-btn"
:placeholder="startPlaceholder"
v-model="userInput[0]"
@blur="handleBlur(0)"></el-input-number>
<span class="el-range-separator">至</span>
<el-input-number class="el-range-input hide-btn"
:placeholder="endPlaceholder"
v-model="userInput[1]"
@blur="handleBlur(1)"></el-input-number>
</template>
<template v-else>
<el-input v-model="userInput[0]"
:placeholder="startPlaceholder"
@blur="handleBlur(0)"
@input="handleStartInput"
class="el-range-input"></el-input>
<span class="el-range-separator">至</span>
<el-input v-model="userInput[1]"
:placeholder="endPlaceholder"
@input="handleEndInput"
@focus="handleFocus"
@blur="handleBlur(1)"
class="el-range-input"></el-input>
</template>
<i v-show="showClose"
@click="handleClickIcon"
class="el-icon-circle-close"></i>
</div>
<!----><!---->
</div>
</template>
<script>
import { limitPrice } from '@/common/format'
export default {
data() {
return {
pickerVisible: false,
showClose: false,
userInput: this.displayValue,
oldVal: {
startInput: '',
endInput: ''
}
}
},
props: {
displayValue: Array,
placeholder: String,
startPlaceholder: String,
endPlaceholder: String,
infinity: Boolean
},
watch: {
displayValue(val) {
if (val) {
this.userInput = val
}
}
},
methods: {
handleStartInput(event) {
// const isNumber = /^\d+$/.test(event)
// if (!isNumber) {
// event = null
// }
// if (event > 100) event = 100
// this.userInput[0] = event
this.userInput[0] = limitPrice(event, this.oldVal.startInput, 20, 2)
this.oldVal.startInput = this.userInput[0]
},
handleEndInput(event) {
// const isNumber = /^\d+$/.test(event)
// if (!isNumber) {
// event = null
// }
// if (event > 100) event = 100
// this.userInput[1] = event
this.userInput[1] = limitPrice(event, this.oldVal.endInput, 20, 2)
this.oldVal.endInput = this.userInput[1]
},
handleClickIcon(event) {
this.userInput[0] = null
this.userInput[1] = null
},
valueIsEmpty() {
const val = this.userInput
if (Array.isArray(val)) {
for (let i = 0, len = val.length; i < len; i++) {
if (val[i]) {
return false
}
}
}
return true
},
handleRangeClick() {
this.pickerVisible = true
},
handleMove() {
if (this.valueIsEmpty()) {
this.showClose = false
} else {
this.showClose = true
}
},
handleFocus() {
if (!this.pickerVisible) {
this.pickerVisible = true
this.$emit("focus", this)
}
},
handleBlur(index) {
this.pickerVisible = false
this.contrastValue()
},
contrastValue() {
const val = this.userInput
if (Array.isArray(val)) {
if (+val[0] > +val[1]) {
val[1] = null
}
}
}
}
}
</script>
<style scoped lang="scss">
.range {
.el-range-input {
::v-deep {
input {
border: 0;
margin-top: -2px;
height: 28px;
}
}
}
.el-icon-circle-close {
color: #dcdfe6;
margin-left: 10px;
}
.hide-btn {
::v-deep {
span {
display: none;
}
input {
padding: 0;
}
}
}
}
</style>
<!-- 重取明细 -->
<template>
<baseDialog :dialog-config="dialogConfig"
:is-show.sync="dialogShow"
class="accountDailog"
@handleClick="handleAddConfirm">
<div class="tipFont">重新获取银行明细与回单,需等待15分钟,且接口限制单次获取上限1000条,请谨慎选择筛选条件!</div>
<div class="add-dialog">
<glsx-combi-form class="edit-form-container"
ref="editFormRef"
label-width="150px"
default-width="400px"
:form-ref="handleFormRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules">
</glsx-combi-form>
</div>
<!-- <span class="dialog-footer">
<el-button size="small"
@click="dialogShow = false">取 消</el-button>
<el-button size="small"
type="primary"
@click="handleSelect">确 定</el-button>
</span> -->
</baseDialog>
</template>
<script>
import { nbcbAccDetailConfig, nbcbAccDetailRefetch } from '@api/theAssetData'
import { Util, deepClone } from '@/common/util'
export default {
name: 'RefetchDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
infoForm: {
accNameList: [],
bankType: '',
bankAcc: '',
transactionTime: ''
},
dialogConfig: {
title: '重取明细',
width: '720px'
// isShowFooter: false
},
config: {
// isShowFooter: false
},
handleFormRef: 'handleFormRef',
formRules: {
transactionTime: [{ required: true, message: '请选择交易时间', trigger: 'change' }],
},
editFormData: [{
label: '单位名称',
name: 'accNameList',
type: 'select',
isClear: true,
multiple: true,
collapseTags: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'accNameList'
}, {
label: '银行类别',
name: 'bankType',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'bankTypeList'
}, {
label: '本方账号',
name: 'bankAcc',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'bankAccList'
}, {
label: '交易时间',
name: 'transactionTime',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
}],
baseData: {
accNameList: [],
bankTypeList: [],
bankAccList: []
}
}
},
props: {
visible: {
type: Boolean,
default: false
}
// paramsObj: {
// type: Object,
// default: {}
// }
},
watch: {
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'visible' })
}
}
},
mounted() {
this.nbcbAccDetailConfig()
// this.getOptionsList()
},
methods: {
getOptionsList() {
this.editFormData.forEach((item, index) => {
if (item.type === 'select') {
// if (
// this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部' && item.label != '单位名称'
// ) {
// const temp = {}
// temp[this.showFormData[index].optionId] = ''
// temp[this.showFormData[index].optionLabel] = '全部'
// this.baseData[item.optionsName].unshift(temp)
// }
this.$set(
this.editFormData[index],
'optionList',
this.baseData[item.optionsName]
)
}
})
},
// 财资数据筛选项列表
nbcbAccDetailConfig() {
nbcbAccDetailConfig({}).then(res => {
for (var key in res) {
if (this.baseData[key]) {
this.baseData[key] = res[key]
this.baseData[key] = this.baseData[key].map(item => {
return {
confId: item,
confValue: item
}
})
}
}
this.getOptionsList()
})
},
handleAddConfirm() {
this.$refs.editFormRef.$refs[this.handleFormRef].validate(valid => {
if (valid) {
var params = deepClone(this.infoForm)
if (params.accNameList.length == 0 && params.bankType == '' && params.bankAcc == '') {
// this.notice.warningTips('请选择除日期外的任意一个或多个条件!')
this.$message({
message: "请选择除日期外的任意一个或多个条件!",
type: "warning",
showClose: true
})
return
}
if (params.transactionTime) {
params.transTimeStart = Util.dateFormate(params.transactionTime[0], 'YYYY-MM-DD')
params.transTimeEnd = Util.dateFormate(params.transactionTime[1], 'YYYY-MM-DD')
} else {
delete params.transTimeStart
delete params.transTimeEnd
}
this.$confirm('请确认是否要执行当前操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
nbcbAccDetailRefetch(params).then(res => {
this.notice.okTips()
this.dialogShow = true
})
}).catch(err => {
console.log(err)
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.add-dialog {
margin: 20px 0;
.reject-input {
::v-deep .el-textarea__inner {
height: 70px;
}
}
.el-textarea .el-input__count {
right: 90px;
bottom: -10px;
font-size: 12px;
color: #999999;
}
.tips {
color: #999999;
}
.down-cla {
width: 56px;
height: 32px;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #185efe;
text-align: right;
line-height: 32px;
padding-left: 8px;
// cursor: pointer;
}
.upload-file {
::v-deep .el-upload-dragger {
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
width: 300px;
height: 160px;
background: #f7f7f7;
.el-icon-upload {
margin: 0;
}
.el-upload__text {
font-size: 14px;
color: #000000;
}
.item-tips {
font-size: 12px;
color: #999999;
height: 22px;
line-height: 22px;
}
.text-tips {
font-size: 14px;
}
}
}
.file-box {
width: 350px;
.file-item {
margin-top: 6px;
position: relative;
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
::v-deep .el-progress-bar {
width: 320px;
background: #ffffff;
border: 1px solid #f4f6fc;
border-radius: 4px;
.el-progress-bar__outer {
background: transparent;
border-radius: 4px;
.el-progress-bar__inner {
background: #f5f7fa;
border-radius: 4px;
}
}
}
::v-deep .el-image-viewer__wrapper {
width: 100vw;
height: 100vh;
}
.file-name {
position: absolute;
left: 12px;
top: 6px;
transform: translateY(-50%);
color: #333333;
font-size: 14px;
max-width: 300px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.image-file {
z-index: -1;
}
}
.file-item:first-child {
margin-top: 15px;
.file-name {
position: absolute;
left: 12px;
top: 15px;
transform: translateY(-50%);
color: #333333;
font-size: 14px;
}
}
}
}
.tipFont {
margin: 10px 0 0 60px;
width: 535px;
height: 22px;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 12px;
color: #eb4e4e;
}
</style>
......@@ -94,7 +94,7 @@
</el-input>
</template>
<template v-if="item.name == 'minSellPrice'">
<el-checkbox @change="$event => changeCheckMinprice($event, eleIndex)" v-model="ele['validMinSellPriceFlag']" class="check-min-price"></el-checkbox>
<el-checkbox v-model="ele['validMinSellPriceFlag']" class="check-min-price"></el-checkbox>
<span class="tips-text">勾选时提单校验最低价</span>
</template>
<el-select v-else-if="item.type === 'select'" v-model="ele[item.name]" :clearable="item.isClear"
......@@ -557,7 +557,8 @@ export default {
warrantyType: '', // 质保卡类型
upgradeSupplyMode: '', // 升级/产品供货模式
djCost: '', // 嘀加成本
thirdPartyCost: '' // 第三方成本
thirdPartyCost: '', // 第三方成本
validMinSellPriceFlag: false
})
let arr = this.formList[1].formBlock
arr?.unshift(packageGoodsForm)
......@@ -755,10 +756,6 @@ export default {
if (this.filterEmpty(num)) return '-'
return (Math.round(num * pow) / pow).toFixed(2)
},
// 商品是否校验最低价
changeCheckMinprice(e, index) {
this.$set(this.formData?.groundingGoodsList[index], 'validMinSellPrice', e ? 'Y' : 'N')
},
handleUp(e) {
console.log(this.formData)
this.$refs[this.formRef + 'd2FormRuleForm'].validate((valid, options) => {
......
......@@ -140,8 +140,7 @@ export default {
sellPrice: '', // 套餐售价总价
minSellPrice: '', // 套餐最低售价
djCost: '', // 嘀加成本
thirdPartyCost: '', // 第三方成本
validMinSellPriceFlag: false, // 是否校验最低价
thirdPartyCost: '', // 第三方成本
groundingGoodsList: [{ // 上架商品集合
upgradeGoodsId: '', // 商品id
goodsAlias: '', // 商品别名
......@@ -154,7 +153,8 @@ export default {
recoveryCost: '', // 回收成本
virtualAccountCost: '', // 虚拟对账成本
djCost: '', // 嘀加成本
thirdPartyCost: '' // 第三方成本
thirdPartyCost: '', // 第三方成本
validMinSellPriceFlag: false // 是否校验最低价
}],
voucherList: [] // 上架凭证
},
......@@ -335,7 +335,6 @@ export default {
confTypeNameValue: `(${val?.goodsTypeName} / ${val?.goodsName} / ${val?.upgradeCommodityCode})`
})
})
res.validMinSellPriceFlag = res?.validMinSellPrice == 'Y'
res.voucherList.forEach(val => { // 处理上传进度 默认进度100%
if (val.voucherFileUrl) val.uploadProgress = 100
})
......@@ -391,7 +390,7 @@ export default {
goodsAlias: val?.goodsAlias,
sellPrice: val?.sellPrice,
minSellPrice: val?.minSellPrice,
validMinSellPrice: val.validMinSellPrice,
validMinSellPrice: val.validMinSellPriceFlag ? 'Y' : 'N',
djCost: val?.djCost,
goodsType: val?.goodsType,
thirdPartyCost: val?.thirdPartyCost,
......
......@@ -258,7 +258,7 @@ export default {
if (this.infoForm.status == 4) {
let idx = this.editFormData.findIndex(item => item.label == '结算凭证')
this.editFormData[idx].isHide = false
this.formRules.attachmentList[0].required = true
// this.formRules.attachmentList[0].required = true
}
},
......
......@@ -81,14 +81,14 @@ export default {
},
data() {
var checkPhoto = (rule, value, callback) => {
if (this.infoForm.attachmentList.length === 0) {
this.$message({
message: '请上传结算凭证',
type: 'error'
})
} else {
// if (this.infoForm.attachmentList.length === 0) {
// this.$message({
// message: '请上传结算凭证',
// type: 'error'
// })
// } else {
callback()
}
// }
}
return {
userInfo: this.$store.state.d2admin.user.info,
......@@ -103,7 +103,7 @@ export default {
editChildRef: 'editChildRef',
formRules: {
// attachmentList: [{ required: true, message: '请上传结算凭证', trigger: 'change' }]
attachmentList: [{ required: true, validator: checkPhoto, trigger: 'change' }]
attachmentList: [{ required: false, validator: checkPhoto, trigger: 'change' }]
},
editFormData: [{
label: '结算凭证',
......
<!-- 导出员工业绩 -->
<template>
<baseDialog :dialog-config="dialogConfig" :is-show.sync="visible"
@handleClick="handleAddConfirm">
<div class="detail-dialog">
<glsx-combi-form class="edit-form-container"
ref="editFormRef"
label-width="154px"
:is-block="true"
form-ref="editChildRef"
:form-obj="infoForm"
:form-data="formData"
:form-rules="formRules">
<template slot="monthPicker">
<el-date-picker
v-model="infoForm.month"
type="month"
style="width: 432px;"
:picker-options="monthPickerOptions"
popper-class="statement-of-export-performance-month-picker">
</el-date-picker>
</template>
<template slot="sceneType">
<el-checkbox-group v-model="infoForm.sceneType" class="sceneTypes_check">
<el-checkbox v-for="item in baseData.sceneTypesList" :key="item.confId" :label="item.confId">{{item.confValue}}</el-checkbox>
</el-checkbox-group>
</template>
<template slot="exportBtn">
<el-button type="primary" class="export_btn" size="small" plain @click="exportData">导出</el-button>
</template>
<template slot="titleBox2">
<div class="title_box">修正业绩</div>
</template>
<template slot="importSalary">
<el-button size="small" class="import_btn">
<input type="file"
id="fileUpload"
class="import_input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)" />
<i class="el-icon-plus"></i>上传文件</el-button>
<el-button type="text" size="small" @click="downloadTemplate">模板下载</el-button>
<div class="file_box" v-if="fileName">
<div class="file_name">{{fileName}}</div>
<i class="el-icon-delete"
@click="handleFileDelete"></i>
</div>
<el-button class="handle_import" size="small" type="primary" plain @click="importData">导入更新</el-button>
</template>
</glsx-combi-form>
</div>
</baseDialog>
</template>
<script>
import { getLevelStaffListApi } from '@api/resident'
import { staffSceneLabelList } from '@/common/constants'
import { deepClone } from '@/common/util'
export default {
name: 'exportPerformanceDialog',
data() {
return {
formData: [
{
label: '选择员工',
name: 'staffPhoneList',
type: 'select',
optionList: [],
multiple: true,
collapseTags: true,
optionId: 'staffPhone',
optionLabel: 'staffName',
optionsName: 'staffList'
},
{
label: '选择时间',
name: 'month',
addHtml: 'monthPicker',
rules: [{ required: true, message: '请选择时间', trigger: 'change' }]
},
{
label: '',
addHtml: 'exportBtn'
},
{
label: '',
addHtml: 'titleBox2'
},
{
label: '导入修正实发工资',
name: '',
addHtml: 'importSalary'
}
],
formRules: {
staffPhoneList: [
{ required: true, message: '请选择员工', trigger: 'change' }
]
},
monthPickerOptions: {
disabledDate(time) {
const today = new Date()
const currentYear = today.getFullYear()
const currentMonth = today.getMonth()
const month = time.getMonth()
const year = time.getFullYear()
if (year === currentYear) {
return month >= currentMonth || month < currentMonth - 3
}
return year !== currentYear
}
},
infoForm: {
staffPhoneList: [],
sceneType: [],
month: ''
},
baseData: {
sceneTypesList: deepClone(staffSceneLabelList),
staffList: []
},
dialogConfig: {
title: '导出员工业绩',
width: '720px'
},
fileName: ''
}
},
props: {
exportPerformanceVisible: {
type: Boolean,
default: false
},
},
computed: {
visible: {
get() {
return this.exportPerformanceVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'exportPerformanceVisible' })
}
}
},
mounted() {
this.getStaffList()
this.getOptions()
},
methods: {
// 获取员工下拉框数据
getStaffList() {
getLevelStaffListApi({pageSize: 9999, currentPage: 1}).then(res => {
this.baseData.staffList = res?.list || []
this.getOptions()
})
},
// 导出
exportData() {
this.$refs.editFormRef?.$refs?.editChildRef?.validate((valid) => {
if (valid) {
this.$emit('handleExport', this.infoForm)
}
})
},
// 下载模板
downloadTemplate() {
this.$refs.editFormRef?.$refs?.editChildRef?.validate((valid) => {
if (valid) {
this.$emit('handleDownloadTemplate', this.infoForm)
}
})
},
// 上传文件
importFile(e) {
const size = e.target.files[0].size / 1024 / 1024
if (size < 9) {
this.fileName = e.target.files[0].name
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = (event) => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(",")
this.fileInfo =
e.target.files[0].name.split(".")[1] + "@" + arrBase64[1]
document.getElementById("fileUpload").value = ""
}
} else {
this.notice.errorTips("上传文件不可超过9M")
}
},
// 删除文件
handleFileDelete() {
this.fileInfo = null
this.fileName = ''
},
// 导入更新
importData() {
if (!this.fileInfo) return this.$message.warning('请上传导入文件')
this.$emit('handleImport', this.fileInfo, this.fileName)
},
getOptions() {
this.formData.forEach((item, index) => {
if (item.type === "select") {
this.$set(
this.formData[index],
"optionList",
this.baseData[item.optionsName]
)
}
})
this.$nextTick(() => {
this.$refs.editFormRef?.$refs?.editChildRef?.clearValidate()
})
},
handleAddConfirm() {
this.$emit('dialogClose')
}
}
}
</script>
<style lang="scss" scoped>
.sceneTypes_check{
margin-right: 20px;
}
.export_btn{
margin-left: 154px;
}
.title_box{
font-size: 15px;
color: #1D1D1D;
font-weight: 600;
border-bottom: 1px solid #E5E5E5;
padding: 8px;
margin-bottom: 16px;
}
.import_btn{
position: relative;
margin-bottom: 10px;
.import_input{
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
}
.file_box{
display: flex;
align-items: center;
margin-bottom: 10px;
.file_name{
border-radius: 4px;
width: 320px;
height: 26px;
line-height: 26px;
background: #F5F7FA;
color: #333333;
padding: 0 12px;
margin-right: 10px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.handle_import{
display: block;
margin: 0 !important;
}
</style>
<style lang="scss">
.statement-of-export-performance-month-picker {
.el-month-table .in-range .cell:hover {
color: #FFFFFF;
}
.el-month-table td.today .cell {
color: #C0C4CC;
}
}
.el-tag.el-tag--info{
border-color: #2A58AD !important;
}
.detail-dialog{
.glsx-combi-form .el-tag.el-tag--info .el-tag__close{
background: #C0C4CC !important;
color: #2A58AD !important;
}
}
</style>
\ No newline at end of file
<!-- 员工标签 -->
<template>
<baseDialog :dialog-config="dialogConfig" :is-show.sync="visible" class="accountDailog"
@handleClick="handleAddConfirm">
<div class="detail-dialog">
<el-form ref="flagFrom" class="flagFrom d2-container-content" :model="infoForm" label-width="250px"
v-loading="$store.state.d2admin.loading.value">
<el-form-item label="员工姓名:" class="flag-div">
{{ info.staffName }}
</el-form-item>
<el-form-item label="服务门店:" class="flag-div">
<el-select v-model="shopMerchant" placeholder="请选择" class="el_select itd" @change="staffLabelDetail">
<el-option v-for="item in info.shopMerchantList" :key="item.merchantId" :value="item.merchantId"
:label="item.merchantName + ' ' + item.merchantId" />
</el-select>
</el-form-item>
<el-form-item label="" v-for="(item, index1) in commLabelUnitList" class="flag-div" :key="index1">
<span class="tips-block" slot="label">
<span class="tips-label">{{ item.commLabelGroupInfo.groupName }}</span>
<el-tooltip popper-class="tooltip-class" effect="dark" placement="right">
<div slot="content">{{ item.commLabelGroupInfo.groupDesc }}</div>
<span class="tips-icon" />
</el-tooltip>:
</span>
<span v-for="(obj, index2) in item.commLabelList" class="label-span" :key="index2">{{ obj.labelName }}</span>
</el-form-item>
</el-form>
</div>
</baseDialog>
</template>
<script>
// import { sceneCodeList, transferTypeList } from '@/common/constants.js'
import { Util, deepClone } from '@/common/util'
import { staffLabelDetail } from '@/api/inStoreManage.js'
export default {
name: 'FlagDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
infoForm: {
},
dialogConfig: {
title: '员工标签',
width: '1080px'
},
editChildRef: 'editChildRef',
baseData: {
},
commLabelUnitList: [],
shopMerchant: ''
}
},
props: {
flagVisible: {
type: Boolean,
default: false
},
info: {
type: Object,
default: null
}
},
watch: {
},
computed: {
visible: {
get() {
return this.flagVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'flagVisible' })
}
}
},
mounted() {
if (this.info.shopMerchantList) {
this.shopMerchant = this.info.shopMerchantList[0].merchantId
}
this.staffLabelDetail()
},
methods: {
staffLabelDetail() {
var params = {}
params.staffUuid = this.info.staffUuid
params.merchantId = this.shopMerchant
staffLabelDetail(params).then(res => {
this.commLabelUnitList = deepClone(res.commLabelUnitList)
})
},
handleAddConfirm() {
this.visible = true
}
}
}
</script>
<style lang="scss" scoped>
.flagFrom.d2-container-content {
margin-top: 0 !important;
}
.detail-dialog {
.itd {
width: 400px;
}
.flag-div {
// height: 40rpx;
// font-family: PingFangSC-Regular;
// font-weight: 400;
// font-size: 28rpx;
// line-height: 40rpx;
.label-span {
margin-right: 10px;
max-width: 250px;
height: 26px;
background: #fafbfe;
border: 1px solid #e8e8ea;
border-radius: 4px;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #666666;
padding: 4px 8px;
}
}
}
</style>
<!-- 设备登录历史 -->
<template>
<baseDialog :dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
@handleClick="handleAddConfirm">
<div>
<div class="header"
slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="labelWidth"
:form-data="showFormData" />
<div class="up-btns">
<el-button @click="handleSearch"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
</d2-table>
</div>
</div>
</baseDialog>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { merchantShopGoodsStockPage } from '@api/stockManage'
import { queryloginLog } from '@api/inStoreManage'
export default {
name: 'LoginHistoryDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
labelWidth: '100px',
dialogConfig: {
title: '设备登录历史',
width: '1500px'
},
// editChildRef: 'editChildRef',
searchForm: {
userName: '',
loginTime: '',
loginDeviceType: ''
},
searchFormSearch: {},
showFormData: [{
label: '员工姓名',
name: 'userName',
type: 'input',
maxlength: '50',
isClear: true
}, {
label: '日期',
name: 'loginTime',
type: 'datePicker',
isClear: true,
pickerOptions: 'rangePickerOptions'
}, {
label: '登录设备',
name: 'loginDeviceType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'loginDeviceTypeList'
}],
getListApi: queryloginLog,
tableData: [],
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
// tableOption: false,
tableColumns: [
{
label: '登录员工',
prop: 'userName'
},
{
label: '日期',
prop: 'loginTime',
formatter: (cellValue) => {
return cellValue.loginTime ? Util.dateFormate(cellValue.loginTime, 'YYYY-MM-DD') : ''
}
},
{
label: '时间',
prop: 'loginTime',
formatter: (cellValue) => {
return cellValue.loginTime ? Util.dateFormate(cellValue.loginTime, 'HH:ss') : ''
}
},
{
label: '登录设备',
prop: 'loginDeviceType',
formatter: (cellValue) => {
return this.baseData.loginDeviceTypeList.find(item => item.confId == cellValue.loginDeviceType)?.confValue
}
}]
},
baseData: {
loginDeviceTypeList: [
{ confId: '1', confValue: "pad端" },
{ confId: '2', confValue: "手机端" }
]
},
}
},
props: {
loginHistoryVisible: {
type: Boolean,
default: false
}
},
watch: {
},
computed: {
visible: {
get() {
return this.loginHistoryVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'loginHistoryVisible' })
}
}
},
mounted() {
this.getOptionsList()
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.loginTime) {
this.searchFormSearch.startLoginTime = Util.dateFormate(this.searchFormSearch.loginTime[0], 'YYYY-MM-DD 00:00:00')
this.searchFormSearch.endLoginTime = Util.dateFormate(this.searchFormSearch.loginTime[1], 'YYYY-MM-DD 23:59:59')
delete this.searchFormSearch.loginTime
}
resolve()
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
const temp = {}
temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部'
this.baseData[item.optionsName].unshift(temp)
}
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
handleSearch() {
this.$refs.recordTable.refreshTable(false, true)
},
handleReset() {
this.searchForm = {
userName: '',
loginTime: '',
loginDeviceType: ''
}
this.$refs.recordTable.refreshTable(false, true)
},
handleAddConfirm() {
this.visible = true
}
}
}
</script>
<style lang="scss" scoped>
.flagFrom.d2-container-content {
margin-top: 0 !important;
}
.detail-dialog {
}
</style>
<!-- 修订应发工资 -->
<template>
<baseDialog :dialog-config="dialogConfig" :is-show.sync="visible"
@handleClick="handleAddConfirm">
<div class="detail-dialog">
<glsx-combi-form class="edit-form-container"
ref="editFormRef"
label-width="140px"
:is-block="true"
form-ref="editChildRef"
:form-obj="infoForm"
:form-data="formData"
:form-rules="formRules">
<template slot="syncUnit"><span class="unit">元</span></template>
</glsx-combi-form>
<div class="history-box" v-if="infoForm['historyRemark'].length">
<div class="line">
<span class="text">历史备注以及备注时间</span>
</div>
<el-timeline>
<el-timeline-item v-for="(reviewInfo, infoId) in infoForm['historyRemark']"
:color="infoId == 0 ? '#2A58AD' : '#999999'"
:key="infoId"
:timestamp="reviewInfo.updatedDateStr">
{{ reviewInfo.reviewMessage }}
</el-timeline-item>
</el-timeline>
</div>
</div>
</baseDialog>
</template>
<script>
import { reviseSalaryApi, getSalaryRecordApi } from '@api/resident'
import { Util,} from '@/common/util'
import { limitPrice } from '@/common/format'
export default {
name: 'RevisedSalaryDialog',
props: {
revisedSalaryVisible: {
type: Boolean,
default: false
},
revisedSalaryRow: {
type: Object,
default: () => ({})
}
},
data() {
return {
dialogConfig: {
title: '修订合计应发工资',
width: '720px'
},
formData: [
{
label: '当前月份合计应发',
name: 'currentSalary',
type: 'input',
isDisabled: true
},
{
label: '修订为',
name: 'correctSalary',
type: 'input',
width: '136px',
inputFn: (e) => {
e = e.replace(/[^\d.]/g, '')
let oldValue = `${this.infoForm['oldcorrectSalary']}`
this.$set(this.infoForm, 'correctSalary', limitPrice(e, oldValue, 6, 2, 0))
this.$set(this.infoForm, 'oldcorrectSalary', this.infoForm['correctSalary'])
},
suffixSlot: 'syncUnit'
},
{
label: '备注',
name: 'remark',
type: 'input',
inputType: 'textarea',
rows: 5,
maxlength: 500,
showLimit: true
}
],
infoForm: {
correctSalary: '',
remark: '',
historyRemark: []
},
formRules: {
correctSalary: [
{ required: true, message: '请输入修订后的应发工资', trigger: 'blur' }
],
remark: [
{ required: true, message: '请输入备注', trigger: 'blur' }
]
}
}
},
computed: {
visible: {
get() {
return this.revisedSalaryVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'revisedSalaryVisible' })
}
}
},
mounted() {
// 获取修订工资备注记录
this.getRecord()
},
methods: {
getRecord() {
getSalaryRecordApi({ staffPhone: this.revisedSalaryRow.staffPhone, salaryMonth: this.revisedSalaryRow.salaryMonth, pageSize: 10, currentPage: 1 }).then(res => {
res?.list?.forEach(item => {
item.reviewMessage = item.remark
item.updatedDateStr = Util.dateFormate(item.createdDate, 'YYYY-MM-DD HH:mm:ss')
})
this.infoForm.historyRemark = res?.list || []
this.$set(this.infoForm, 'currentSalary', this.revisedSalaryRow.correctSalary || this.revisedSalaryRow.salary)
})
},
handleAddConfirm() {
this.$refs.editFormRef?.$refs?.editChildRef?.validate((valid) => {
if (valid) {
reviseSalaryApi({id: this.revisedSalaryRow.id, correctSalary: this.infoForm['correctSalary'], remark: this.infoForm['remark']}).then(res => {
this.$message.success('修订成功')
this.$emit('dialogClose', { flag: true, attrName: 'revisedSalaryVisible' })
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.detail-dialog{
.unit{
margin-left: 4px;
}
.line{
width: 100%;
height: 1px;
background: #E6E6E6;
position: relative;
margin: 32px 0;
.text{
position: absolute;
left: 50%;
top: -10px;
transform: translateX(-50%);
background: #fff;
padding: 0 16px;
font-size: 14px;
color: #00000066;
}
}
::v-deep .el-timeline-item__node--normal{
width: 8px;
height: 8px;
}
::v-deep .el-timeline-item__tail{
left: 2px
}
}
</style>
\ No newline at end of file
<!-- 工资明细 -->
<template>
<baseDialog :dialog-config="dialogConfig" :is-show.sync="visible"
@handleClick="handleAddConfirm">
<div class="dialog-content">
<div class="header">
<div class="header-item">
<label>个人基本工资:</label>
<span class="value">{{ isEmpty(detailInfo.basicSalary) ? '-' : detailInfo.basicSalary }}元</span>
</div>
<div class="header-item">
<label>保底工资:</label>
<span class="value">{{ isEmpty(detailInfo.minimumSalary) ? '-' : detailInfo.minimumSalary }}元</span>
</div>
<div class="header-item">
<label>导师收入:</label>
<span class="value">{{ isEmpty(detailInfo.mentorCommission) ? '-' : detailInfo.mentorCommission}}元</span>
</div>
<div class="header-item">
<label>导师收入来源:</label>
<span class="value">{{ detailInfo.studentNameList && detailInfo.studentNameList.length ? detailInfo.studentNameList.join('、') : '-' }}</span>
</div>
</div>
<div class="content" v-if="detailInfo && detailInfo.detailArray && detailInfo.detailArray.length">
<div class="title">{{ detailRow.month }}月提成构成:</div>
<el-tabs v-model="activeName" type="card">
<el-tab-pane v-for="(item, index) in detailInfo.detailArray" :key="index" :label="item.key" :name="`${index}`">
<div v-for="(subItem, subIdx) in item.data" :key="subIdx" class="content-item">
<div class="content-item-header">
<span>{{ subItem.merchantName }}</span>
<span>{{ subItem.merchantId }}</span>
</div>
<div class="content-item-body">
<div class="left-line">
<div class="line" :style="{'top': (48 * (idx + 1) + 63) + 'px'}" v-for="(v, idx) in subItem.allocationDetailList" :key="idx"></div>
</div>
<div class="content-item-body-title">
<span>{{ subItem.staffName || '-' }} | </span>
<span>{{ filterStr(subItem.sceneType, staffSceneLabelList) || '-' }} | </span>
<span>产值贡献{{ isEmpty(subItem.orderTotalPrice) ? '-' : `¥${subItem.orderTotalPrice}` }} | </span>
<span>{{ filterStr(subItem.jobType, staffLevelList, detailRow.hireType) || '-' }} | </span>
<span>周期渗透率{{ !isEmpty(subItem.penetrationRate) ? `${subItem.penetrationRate}%` : '-'}} | </span>
<span>提成系数{{ !isEmpty(subItem.calculateValue) ? `${subItem.calculateValue}%` : '-'}}</span>
</div>
<d2-table :hasPage="false"
:tableData="subItem.allocationDetailList"
:table-params="tableParams">
</d2-table>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
<div class="footer">
<span>个人工资=基本工资</span>
<span class="amount">{{ isEmpty(detailInfo.basicSalary) ? '-' : detailInfo.basicSalary }}元</span>
<span>+总提成</span>
<span class="amount">{{ isEmpty(detailInfo.commissionPrice) ? '-' : detailInfo.commissionPrice }}元</span>
</div>
</div>
</baseDialog>
</template>
<script>
import { getSalaryDetailApi } from '@api/resident'
import { staffLevelList, staffSceneLabelList } from '@/common/constants.js'
import { Util } from "@/common/util"
import { isEmpty, filterStr } from '../util.js'
export default {
name: 'SalaryDetailsDialog',
data() {
return {
isEmpty,
filterStr,
staffLevelList,
staffSceneLabelList,
dialogConfig: {
title: '工资明细',
width: '1080px'
},
detailInfo: {},
activeName: '',
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableColumns: [
{
label: '分配实体',
prop: 'allocationType',
formatter: (row) => {
return ['个人', '导师', '督导', '激励池'][row.allocationType - 1] || '-'
}
},
{
label: '姓名',
prop: 'staffName'
},
{
label: '比例',
prop: 'commissionRatio',
width: 80,
formatter: (row) => {
return row.commissionRatio ? `${row.commissionRatio}%` : '-'
}
},
{
label: '关联时间',
prop: '',
formatter: (row) => {
return row.startTime && row.endTime ? Util.dateFormate(row.startTime, 'MM月DD日') + '至' + Util.dateFormate(row.endTime, 'MM月DD日') : '-'
}
},
{
label: '应分金额',
prop: 'commissionPrice',
width: 100,
formatter: (row) => {
return row.commissionPrice ? `¥${row.commissionPrice}` : '-'
}
}
]
}
}
},
props: {
salaryDetailsVisible: {
type: Boolean,
default: false
},
detailRow: {
type: Object,
default: () => {}
}
},
computed: {
visible: {
get() {
return this.salaryDetailsVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'salaryDetailsVisible' })
}
},
firstHalf() {
const monthStr = this.detailRow?.month.toString().padStart(2, '0');
return `${monthStr}月01日至${monthStr}月15日`;
},
secondHalf() {
const monthStr = this.detailRow?.month.toString().padStart(2, '0');
const daysInMonth = new Date(this.detailRow?.currentYear, this.detailRow?.month, 0).getDate();
return `${monthStr}月16日至${monthStr}月${daysInMonth}日`;
}
},
mounted() {
this.getSalaryDetail()
},
methods: {
handleAddConfirm() {
this.$emit('dialogClose')
},
getSalaryDetail() {
getSalaryDetailApi({ id: this.detailRow.id }).then(res => {
if (res) {
const detailArray = res?.detailList && Object.keys(res?.detailList)?.map(key => {
return {
key: key,
data: res?.detailList[key]
}
})
res.detailArray = detailArray
this.activeName = detailArray?.length ? '0' : ''
}
this.detailInfo = res || {}
})
}
}
}
</script>
<style lang="scss" scoped>
.dialog-content {
max-height: calc(68vh - 60px);
overflow: auto;
.header {
display: flex;
flex-wrap: wrap;
align-items: center;
.header-item{
flex: 33% 0 0;
margin-bottom: 16px;
label {
display: inline-block;
width: 124px;
color: #666666;
text-align: right;
}
.value {
color: #1D1D1D;
}
}
}
.content{
.title {
color: #333333;
font-weight: bold;
}
::v-deep .el-tabs__header {
margin-bottom: 0;
.el-tabs__nav-scroll{
background: #ffffff;
padding: 16px 0 0;
.el-tabs__nav{
height: 38px;
background: #E8E8E8;
border-radius: 4px;
margin-left: 2px;
padding: 2px;
.el-tabs__active-bar {
display: none !important;
}
.el-tabs__item {
height: 32px;
line-height: 32px;
width: 170px;
color: #666666;
padding: 0 24px;
}
.el-tabs__item.is-active {
color: #2A58AD;
font-weight: 600;
background: #ffffff;
border-radius: 3px;
border: none;
}
}
}
}
.content-item{
.content-item-header{
height: 42px;
line-height: 42px;
background: #F5F7FA;
color: #000000;
padding: 0 16px;
margin-top: 20px;
font-weight: bold;
border-bottom: 1px solid #E7E7E7;
}
.content-item-body{
padding: 0 36px;
position: relative;
.left-line{
position: absolute;
left: 15px;
width: 1px;
height: calc(100% - 24px);
background: #E7E7E7;
.line{
width: 21px;
height: 1px;
background: #E7E7E7;
position: absolute;
left: 0;
}
}
.content-item-body-title{
color: #1D1D1D;
padding: 12px 0;
}
::v-deep .el-table th {
background: #F5F7FA;
}
::v-deep .el-table__row{
height: 48px;
}
}
}
}
.footer{
color: #333333;
font-weight: 500;
padding: 16px;
.amount{
font-size: 16px;
font-weight: 600;
color: #2A58AD;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="layout">
<div class="tab"
ref="tabbox">
<div :class="['tab-item', { 'item-active': windowId == -1 }]"
@click="windowId = -1">
驻店管理
</div>
<template v-for="(i, index) in tab">
<template>
<div :key="i.id"
:class="['tab-item', { 'item-active': windowId == i.id }]"
@click="windowId = i.id"
:ref="`tab-${index}`">
{{ i.text }}
<div class="close"
@click.stop="close(index)">
<i class="el-icon-close"></i>
</div>
</div>
</template>
</template>
<template v-if="dropdownList.length">
<div class="arrow-box">
<el-dropdown trigger="click"
@command="windowId = $event">
<div class="dropdown-link">
<i class="el-icon-arrow-down"></i>
</div>
<el-dropdown-menu slot="dropdown">
<template v-for="(i, index) in dropdownList">
<el-dropdown-item :class="{ 'dropdown-item-active': windowId == i.id }"
:key="i.id"
:command="i.id">
<div class="dropdown-item">
{{ i.text }}
<div class="close"
@click.stop="closeDrop(index)">
<i class="el-icon-close"></i>
</div>
</div>
</el-dropdown-item>
</template>
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
</div>
<div class="content">
<InStoreManageIndex v-show="windowId == -1"
ref="inStoreManageIndex"
@openWindow="openWindow" />
<template v-for="i in [...tab, ...dropdownList]">
<staffInfo :ref="`recep-${i.id}`"
:key="i.id"
v-show="windowId == i.id"
:query-data="i.data"
@backIndex="backIndex" />
</template>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
import InStoreManageIndex from "./index"
import staffInfo from "./staffInfo"
export default {
name: "",
components: {
InStoreManageIndex,
staffInfo
},
data() {
return {
tab: [],
dropdownList: [],
windowId: -1,
tabboxWidth: 0
}
},
// 在beforeDestroy钩子中移除事件监听
beforeDestroy() {
window.removeEventListener('popstate', this.preventBack)
},
// 在你的Vue组件的mounted钩子中添加事件监听
mounted() {
history.pushState(null, null, document.URL)
window.addEventListener('popstate', this.preventBack)
if (this.tabboxWidth == 0) this.tabboxWidth = this.$refs.tabbox.offsetWidth
},
methods: {
preventBack() {
if (this.windowId !== -1) {
const [recep] = this.$refs[`recep-${this.windowId}`]
if (recep && recep.isQualityVisible) recep.isQualityVisible = false
else this.windowId = -1
history.pushState(null, null, document.URL)
} else this.$router.go(-1)
},
openWindow(data) {
const id = `${data.staffName}_${data.phoneNumber}`
const windowList = [...this.tab, ...this.dropdownList]
const windowItem = windowList.find((e) => e.id == id)
if (windowItem) {
this.$refs[`recep-${id}`]?.[0]?.setActiveName(data)
return this.windowId = id
}
if (windowList.length == 20) return this.$message.error("最多同时打开20个tabs")
const item = {
text: data.staffName || '-',
data,
id
}
if (this.dropdownList.length) this.dropdownList.push(item)
else {
this.tab.push(item)
this.checkEl()
}
this.windowId = id
},
close(index) {
this.tab.splice(index, 1)
if (this.dropdownList.length) {
this.tab.push(this.dropdownList[0])
this.closeDrop(0)
}
this.windowId = -1
this.checkEl()
},
closeDrop(index) {
this.dropdownList.splice(index, 1)
},
checkEl() {
const { tab, tabboxWidth } = this
const len = tab.length - 1
this.$nextTick(() => {
const [el] = this.$refs[`tab-${len}`]
if (el) {
const { offsetWidth, offsetLeft } = el
if (offsetLeft + offsetWidth / 2 > tabboxWidth - 54) {
this.dropdownList.push(tab[len])
this.tab.splice(len, 1)
}
}
})
},
backIndex() {
this.windowId = -1
this.$refs['inStoreManageIndex']?.handleSearch()
}
}
}
</script>
<style scoped lang='scss'>
.layout {
height: 100%;
.tab {
display: flex;
align-items: center;
margin-left: 20px;
width: calc(100% - 54px);
box-sizing: border-box;
&-item {
width: fit-content;
height: 40px;
padding: 0 20px;
background: #fafafa;
border-radius: 4px 4px 0 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
color: #666666;
cursor: pointer;
line-height: 40px;
margin-right: 1px;
flex-shrink: 0;
.close {
border-radius: 100%;
padding: 4px;
margin-left: 4px;
display: flex;
align-items: center;
justify-content: center;
&:hover {
background-color: #666;
.el-icon-close {
color: #fff;
}
}
}
.el-icon-close {
font-size: 12px;
display: flex;
align-items: center;
justify-content: center;
color: #666666;
transform: translateY(1px);
}
}
.item-active {
font-weight: 500;
color: #2a58ad;
background: #ffffff;
}
.arrow-box {
width: 32px;
height: 40px;
line-height: 40px;
text-align: center;
background: #fafafa;
cursor: pointer;
flex-shrink: 0;
.el-dropdown {
width: 100%;
}
}
}
.content {
position: relative;
width: 100%;
height: calc(100% - 40px);
// overflow-y: scroll;
box-sizing: border-box;
// padding-bottom: 70px;
}
}
::v-deep.dropdown-item {
display: flex;
align-items: center;
justify-content: center;
.close {
border-radius: 100%;
padding: 4px;
margin-left: 4px;
display: flex;
align-items: center;
justify-content: center;
&:hover {
background-color: #666;
.el-icon-close {
color: #fff;
}
}
i {
margin-right: 0;
}
}
.el-icon-close {
font-size: 12px;
color: #666666;
}
}
.dropdown-item-active {
background-color: #eaeef7;
color: #5579bd;
}
</style>
<!-- 员工编辑 -->
<template>
<d2-container ref="staffInfoWrap">
<div class="staffInfo-wrap" >
<el-tabs v-model="activeName" type="card" @tab-click="tabClick">
<el-tab-pane label="员工信息" name="staffInfo" v-if="editPermissionFlag">
<edit-staff ref="editStaff" v-if="activeName == 'staffInfo'" :queryData="queryData"></edit-staff>
</el-tab-pane>
<el-tab-pane label="历史业绩" name="historyPerformance" v-if="historyPerformanceFlag">
<historical-performance ref="historicalPerformance" v-if="activeName == 'historyPerformance'" :queryData="queryData"></historical-performance>
</el-tab-pane>
</el-tabs>
<div class="btnCon">
<el-button v-if="activeName == 'staffInfo'" type="primary" @click="handleConfirm">提交</el-button>
<el-button v-if="activeName != 'staffInfo'" type="primary" @click="handleCancel">返回</el-button>
<el-button v-if="activeName == 'staffInfo'" @click="handleCancel">返回</el-button>
</div>
</div>
</d2-container>
</template>
<script>
import { mapActions } from "vuex"
import historicalPerformance from "./components/historicalPerformance.vue"
import editStaff from "./components/editStaff.vue"
export default {
name: "StaffInfo",
props: {
queryData: Object
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
activeName: 'staffInfo',
editPermissionFlag: false,
historyPerformanceFlag: false
}
},
components: {
editStaff,
historicalPerformance
},
computed: {},
async mounted() {
this.setActiveName(this.queryData)
this.$nextTick(() => {
const $store = this.$store.getters['d2admin/auth/curBtns']
const btnId = '9120505' // 员工编辑权限
const btnId2 = '9120508' // 历史业绩权限
const _item = $store?.find(i => (i.authId === btnId))
const _item2 = $store?.find(i => (i.authId === btnId2))
if (_item) {
this.editPermissionFlag = true
}
if (_item2) {
this.historyPerformanceFlag = true
}
})
},
methods: {
...mapActions({
get: "d2admin/base/get",
close: "d2admin/page/close"
}),
async getBaseData() { },
// tab选中项
setActiveName(data) {
this.activeName = data.activeName
setTimeout(() => {
// 将页面滚动回顶部
if (this.$refs['staffInfoWrap'] && this.$refs['staffInfoWrap'].$refs['component'] && this.$refs['staffInfoWrap'].$refs['component'].$el) {
this.$refs['staffInfoWrap'].$refs['component'].$el.scrollTop = 0
// 重新请求页面接口
let refs = data.activeName == 'staffInfo' ? 'editStaff' : 'historicalPerformance'
this.$refs[refs].resetData()
}
})
},
tabClick() {
this.setActiveName({ activeName: this.activeName })
},
handleCancel() {
this.$emit("backIndex")
},
handleConfirm() {
this.$refs.editStaff.handleConfirm().then(() => {
this.$emit("backIndex")
})
}
}
}
</script>
<style scoped lang="scss" >
.btnCon {
width: 100%;
margin-top: 40px;
text-align: center;
}
.staffInfo-wrap {
height: 100%;
// margin-left: 20px;
// overflow-y: scroll;
// height: calc(100vh - 40px);
::v-deep .el-tabs__header {
position: sticky;
top: 0;
margin-bottom: 0;
z-index: 10;
.el-tabs__nav-scroll{
background: #ffffff;
padding: 16px 0;
.el-tabs__nav{
height: 38px;
background: #E8E8E8;
border-radius: 4px;
margin-left: 22px;
padding: 2px;
.el-tabs__active-bar {
display: none !important;
}
.el-tabs__item {
height: 32px;
line-height: 32px;
width: 104px;
color: #666666;
padding: 0 24px;
}
.el-tabs__item.is-active {
color: #2A58AD;
font-weight: 600;
background: #ffffff;
border-radius: 3px;
border: none;
}
}
}
}
}
</style>
export function isEmpty(data) {
return (data ?? '') === ''
}
export function filterStr(val, dataList, hireType) {
if (isEmpty(val)) return '-'
if (hireType == 2 && val == 9) return '区域督导'
const staffStr = `${val}`?.split(',')
let result = staffStr?.map(v => {
const found = dataList?.find(item => item.confId == v)
return found?.confValue
})
return result?.length ? result.join('、') : '-'
}
\ No newline at end of file
<!-- 新增支出 -->
<template>
<div>
<d2-dialog
:title="'新增支出'"
:is-visible="expenseVisible"
width="700px"
@closeDialog="handleAdd"
@confirmDialog="handleAddConfirm"
>
<glsx-combi-form class="edit-form-container"
ref="editFormRef"
label-width="110px"
:is-block="true"
form-ref="editChildRef"
:form-obj="expenseForm"
:form-data="formData"
:form-rules="formRules">
<template slot="staff">
<el-select v-model="expenseForm.staffPhone" placeholder="请选择员工"
style="width: 432px" remote reserve-keyword @visible-change="visibleChange"
:remote-method="remoteMethod" v-el-select-loadmore="interestsLoadmore" @change="handleStaffChange" filterable>
<el-option v-for="item in baseData.staffList" :key="item.staffPhone" :label="item.staffName" :value="item.staffPhone"></el-option>
</el-select>
</template>
<template slot="syncUnit"><span class="unit">元</span></template>
</glsx-combi-form>
</d2-dialog>
</div>
</template>
<script>
import { mapActions } from "vuex"
import { limitPrice } from '@/common/format'
import { addIncentivePoolApi, getLevelStaffListApi } from '@/api/resident'
import { staffLevelList } from '@/common/constants.js'
import { filterStr } from '../../inStoreManage/util.js'
export default {
name: "AddExpenseDialog",
data() {
return {
expenseForm: {
staffPhone: "",
jobType: "",
merchantName: "",
amount: "",
remark: ""
},
formData: [
{
label: '员工',
name: 'staffName',
addHtml: 'staff',
rules: [{ required: true, message: '请选择员工', trigger: 'change' }]
},
{
label: '员工手机号',
name: 'staffPhone',
type: 'input',
isDisabled: true
},
{
label: '员工职级',
name: 'jobTypeStr',
type: 'input',
isDisabled: true
},
{
label: '归属门店',
name: 'merchantName',
type: 'input',
isDisabled: true
},
{
label: '支出金额',
name: 'amount',
type: 'input',
width: '136px',
inputFn: (e) => {
e = e.replace(/[^\d.]/g, '')
let oldValue = this.expenseForm['oldamount'] || ''
this.$set(this.expenseForm, 'amount', limitPrice(e, oldValue, 6, 2, 0))
this.$set(this.expenseForm, 'oldamount', this.expenseForm['amount'])
},
suffixSlot: 'syncUnit'
},
{
label: '备注',
name: 'remark',
type: 'input',
inputType: 'textarea',
rows: 4,
maxlength: 100,
showLimit: true
}
],
formRules: {
amount: [
{ required: true, message: "请输入支出金额", trigger: "change" },
{
required: true,
trigger: 'blur',
validator: (rule, value, callback) => {
(+value > +this.expensePoolInfo.totalBalance) ? callback(new Error('不得超过激励池总额')) : callback()
}
}
],
},
// 基本数据
baseData: {
staffList: []
},
staffName: "",
currentPage: 1,
pageSize: 20
}
},
props: {
expenseVisible: {
type: Boolean,
default: false
},
expensePoolInfo: {
type: Object,
default: () => {}
}
},
watch: {
expenseVisible(val) {
if (val) {
this.$nextTick(() => {
this.$refs.addExpenseForm?.resetFields()
})
}
}
},
directives: {
"el-select-loadmore": {
bind(el, binding) {
setTimeout(() => {
const SELECTWRAP_DOM = el.querySelector(
'.el-select-dropdown .el-select-dropdown__wrap'
)
if (SELECTWRAP_DOM) {
SELECTWRAP_DOM.addEventListener('scroll', function () {
const condition =
this.scrollHeight - this.scrollTop <= this.clientHeight
if (condition) {
binding.value()
}
})
}
}, 500)
}
}
},
mounted() {
},
methods: {
...mapActions({
get: "d2admin/base/get"
}),
visibleChange(data) {
// 获取焦点重新渲染下拉框数据
if (data) {
this.staffName = ""
this.currentPage = 1
this.baseData.staffList = []
this.getSelectingList()
}
},
// 获取配置职级的员工
remoteMethod(query) {
this.staffName = query
this.currentPage = 1
this.baseData.staffList = []
this.getSelectingList()
},
// 获取更多员工
interestsLoadmore() {
setTimeout(() => {
this.currentPage = this.currentPage + 1
if (this.allPages < this.currentPage) {
this.currentPage = this.allPages
return
}
this.getSelectingList()
}, 10)
},
// 获取员工列表
getSelectingList() {
let params = {
currentPage: this.currentPage,
pageSize: this.pageSize,
staffName: this.staffName
}
getLevelStaffListApi(params).then(res => {
this.baseData.staffList = this.baseData.staffList.concat(res.list || [])
this.allPages = res.pages
})
},
// 选择员工 将附带信息赋值到输入框
handleStaffChange(val) {
this.baseData.staffList.forEach(item => {
if (item.staffPhone === val) {
this.$set(this.expenseForm, 'staffPhone', item.staffPhone)
this.$set(this.expenseForm, 'jobTypeStr', filterStr(item.jobType, staffLevelList, item.hireType))
this.$set(this.expenseForm, 'merchantName', item.merchantName)
this.$set(this.expenseForm, 'staffName', item.staffName)
this.$set(this.expenseForm, 'jobType', item.jobType)
}
})
},
handleAdd() {
this.$emit("expenseClose")
},
handleAddConfirm() {
this.$refs.editFormRef?.$refs.editChildRef?.validate((valid) => {
if (valid) {
let params = {
staffPhone: this.expenseForm?.staffPhone,
staffName: this.expenseForm?.staffName,
jobType: this.expenseForm?.jobType,
expensePrice: this.expenseForm?.amount,
remark: this.expenseForm?.remark
}
addIncentivePoolApi(params).then(res => {
this.$message.success('添加成功')
this.$emit("expenseClose", true)
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.unit{
margin-left: 4px;
}
</style>
<!-- 应用商品弹窗 -->
<template>
<d2-dialog
:title="title"
:is-visible.sync="appliedGoodsVisible"
width="50%"
btn-ok-label="确定"
@confirmDialog="handleAppliedGoodsConfirm"
@closeDialog="handleAppliedGoodsClose"
class="appliedGoods">
<slot />
<el-row class="tableCon">
<div class="tableBox">
<el-table
ref="seletingTable"
:data="selectingData"
height="464px"
class="table"
border
@select="handleChange"
@select-all="handleAll">
<el-table-column type="selection"
width="55"
align="center" />
<el-table-column prop="upgradeGoodsName" label="商品名称" align="center">
</el-table-column>
</el-table>
<el-pagination
small
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-size="pageSize"
layout="total, prev, pager, next"
:total="total" />
</div>
<el-table
class="tableBox table"
:data="selectedData"
border
height="464px">
<el-table-column prop="upgradeGoodsName" label="商品名称" align="center">
<template slot-scope="scope">
<span :class="{'gray': scope.row.merchantGoodsStatus != 1}">{{ scope.row.upgradeGoodsName }}</span>
</template>
</el-table-column>
<el-table-column label="删除" align="center" width="50px">
<template slot-scope="scope">
<el-button
class="el-icon-delete"
@click="handleDelete(scope.row)"
type="text" />
</template>
</el-table-column>
</el-table>
</el-row>
</d2-dialog>
</template>
<script>
import { deepClone } from '@/common/util'
export default {
name: "RelateStoreDialog",
data() {
return {
selectedData: [],
selectingData: [],
// 分页
total: 0,
currentPage: 1,
pageSize: 20
}
},
props: {
title: {
type: String,
default: ""
},
appliedGoodsVisible: {
type: Boolean,
default: false
},
goodsApi: {
type: Function,
default: () => {}
},
goodsSearchForm: {
type: Object,
default: () => {}
},
addGoodsRow: {
type: Object,
default: () => {}
}
},
mounted() {
this.selectedData = deepClone(this.addGoodsRow?.goodsData)
console.log(this.selectedData)
this.getSelectingList()
},
methods: {
recoverySelection() {
var exitIds = this.selectedData.map((item) => item.merchantGoodsCode)
this.selectingData.forEach((item) => {
if (exitIds.includes(item.merchantGoodsCode)) {
this.$nextTick(() => {
this.$refs.seletingTable.toggleRowSelection(item, true)
})
}
})
},
getSelectingList() {
this.goodsApi({
...this.goodsSearchForm,
currentPage: this.currentPage,
pageSize: this.pageSize,
merchantId: this.addGoodsRow?.merchantId
}).then((res) => {
res.list?.forEach(v => {
v.merchantGoodsStatus = v.status
})
this.selectingData = res.list
this.total = res.total
this.$nextTick(() => {
this.recoverySelection()
})
})
},
handleChange(selection, row) {
var addOrDelete = !!selection.find(
(item) => item.merchantGoodsCode === row.merchantGoodsCode
)
addOrDelete
? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter(
(item) => item.merchantGoodsCode !== row.merchantGoodsCode
))
},
handleAll(selection) {
this.selectingData.forEach((item) => {
var isExit = this.selectedData.findIndex(
(subItem) => subItem.merchantGoodsCode === item.merchantGoodsCode
)
if (selection.length && isExit === -1) {
this.selectedData.push(item)
} else if (!selection.length && isExit !== -1) {
this.selectedData.splice(isExit, 1)
}
})
},
handleDelete(row) {
this.selectedData = this.selectedData.filter(
(item) => item.merchantGoodsCode !== row.merchantGoodsCode
)
const obj = this.selectingData.find((v) => v.merchantGoodsCode == row.merchantGoodsCode)
this.$nextTick(() => {
this.$refs.seletingTable.toggleRowSelection(obj)
})
},
handleCurrentChange(val) {
this.currentPage = val
this.getSelectingList()
},
handleAppliedGoodsConfirm() {
this.selectedData.forEach((val) => {
if (!val.goodsData) val.goodsData = []
})
this.$emit("handleAppliedGoodsConfirm", this.selectedData)
},
handleAppliedGoodsClose() {
this.$emit("handleAppliedGoodsClose")
}
}
}
</script>
<style lang="scss">
.appliedGoods .table {
margin: 0 auto 20px !important;
width: 98%;
}
.appliedGoods .tableCon {
margin-top: 20px;
display: flex;
.tableBox {
flex: 1;
.gray{
color: #66666642;
}
}
}
.service-store .appliedGoods .el-table .cell,
.d2-form .appliedGoods .el-table .cell {
line-height: 26px !important;
}
.service-store .appliedGoods .el-table--medium td,
.d2-form .appliedGoods .el-table--medium td {
padding: 6px 8px !important;
}
.appliedGoods .red {
color: red;
}
.appliedGoods .tip-icon {
position: absolute;
display: inline-block;
height: 10px;
width: 10px;
line-height: 10px;
color: #ffffff;
background-color: red;
border: 1px solid red;
border-radius: 50%;
cursor: pointer;
font-size: 6px;
margin-left: 2px;
}
</style>
<!-- 激励池明细 -->
<template>
<baseDialog :dialog-config="dialogConfig" :is-show.sync="visible"
@handleClick="handleAddConfirm">
<div class="dialog-content">
<div class="header">
<div class="header-right">
<span>{{ detailInfo.commissionMonthStr }}月提成构成:</span>
<span class="cycle">{{ detailRow.cycle }}</span>
</div>
</div>
<div class="content">
<div class="content-item">
<div class="content-item-header">
<span>{{ detailInfo.merchantName }}</span>
<span>{{ detailInfo.merchantId }}</span>
</div>
<div class="content-item-body" v-if="detailInfo.commissionRecord">
<div class="left-line">
<div class="line" :style="{'top': (48 * (idx + 1) + 63) + 'px'}" v-for="(v, idx) in detailInfo.commissionRecord.allocationDetailList" :key="idx"></div>
</div>
<div class="content-item-body-title">
<span>{{ detailInfo.staffName }} | </span>
<span>{{ detailInfo.sceneType == 1 ? '轻改' : detailInfo.sceneType == 2 ? '会员权益/升级' : '-'}} | </span>
<span>产值贡献{{ detailInfo.totalPrice }}元 | </span>
<span>{{ detailInfo.jobTypeStr }} | </span>
<span>周期渗透率{{ !isEmpty(detailInfo.commissionRecord.penetrationRate) ? `${detailInfo.commissionRecord.penetrationRate}%` : '-' }} | </span>
<span>提成系数{{ !isEmpty(detailInfo.commissionRecord.calculateValue) ? `${detailInfo.commissionRecord.calculateValue}%` : '-' }} | </span>
</div>
<d2-table :hasPage="false"
:tableData="detailInfo.commissionRecord.allocationDetailList"
:table-params="tableParams">
</d2-table>
</div>
<div class="content-item-footer">
<span>激励池实存:</span>
<span class="amount">{{ detailInfo.actualJlcPrice }}元</span>
</div>
</div>
</div>
</div>
</baseDialog>
</template>
<script>
import { getIncentivePoolDetailApi } from '@api/resident'
import { Util } from '@/common/util'
import { staffLevelList } from '@/common/constants'
import { filterStr } from '../../inStoreManage/util.js'
export default {
name: 'DepositDetailDialog',
data() {
return {
dialogConfig: {
title: '激励池明细',
width: '1080px'
},
detailInfo: {
},
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableColumns: [
{
label: '分配实体',
prop: 'allocationType',
formatter: (row) => {
return ['个人', '导师', '督导', '激励池'][row.allocationType - 1] || '-'
}
},
{
label: '分配人',
prop: 'staffName'
},
{
label: '比例',
prop: 'commissionRatio',
width: 80,
formatter: (row) => {
return row.commissionRatio ? `${row.commissionRatio}%` : '-'
}
},
{
label: '关联时间',
prop: '',
formatter: (row) => {
return row.startTime && row.endTime ? Util.dateFormate(row.startTime, 'MM月DD日') + '至' + Util.dateFormate(row.endTime, 'MM月DD日') : '-'
}
},
{
label: '应分金额',
prop: 'commissionPrice',
width: 100,
formatter: (row) => {
return row.commissionPrice ? `¥${row.commissionPrice}` : '-'
}
}
]
}
}
},
props: {
depositDetailVisible: {
type: Boolean,
default: false
},
detailRow: {
type: Object,
default: () => ({})
}
},
computed: {
visible: {
get() {
return this.depositDetailVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'depositDetailVisible' })
}
}
},
mounted() {
this.getIncentivePoolDetail()
},
methods: {
handleAddConfirm() {
this.$emit('dialogClose')
},
isEmpty(data) {
return (data ?? '') === ''
},
getIncentivePoolDetail() {
getIncentivePoolDetailApi({ id: this.detailRow.id }).then(res => {
if (res) {
res.commissionMonthStr = res?.commissionMonth ? res?.commissionMonth.split('-')[1] : '-'
res.jobTypeStr = filterStr(res?.jobType, staffLevelList, res?.hireType)
}
this.detailInfo = res || {}
})
}
}
}
</script>
<style lang="scss" scoped>
.dialog-content{
max-height: calc(68vh - 60px);
overflow: auto;
.header{
height: 40px;
display: flex;
align-items: center;
.header-left{
color: #333333;
font-weight: bold;
margin-right: 24px;
}
.header-right{
color: #333333;
font-weight: 600;
font-size: 14px;
.cycle{
color: #2A58AD;
}
}
}
.content{
.content-item{
.content-item-header{
height: 42px;
line-height: 42px;
background: #F5F7FA;
color: #000000;
padding: 0 16px;
font-weight: bold;
border-bottom: 1px solid #E7E7E7;
}
.content-item-body{
padding: 0 36px;
position: relative;
.left-line{
position: absolute;
left: 15px;
width: 1px;
height: calc(100% - 24px);
background: #E7E7E7;
.line{
width: 21px;
height: 1px;
background: #E7E7E7;
position: absolute;
left: 0;
}
}
.content-item-body-title{
color: #1D1D1D;
padding: 12px 0;
}
::v-deep .el-table th {
background: #F5F7FA;
}
::v-deep .el-table__row{
height: 48px;
}
}
.content-item-footer{
color: #333333;
font-weight: bold;
padding: 16px;
.amount{
font-size: 16px;
color: #2A58AD;
}
}
}
}
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!