Commit 49702743 by 王志慧

Merge branch 'SAAS+V4.52.0-0429' into 'SAAS+V4.52.1'

Saas+v4.52.0 0429

See merge request !435
2 parents 5bf2ed2d 292a7e4d
Showing 56 changed files with 2595 additions and 415 deletions
......@@ -3915,7 +3915,7 @@
},
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.11.1",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.11.1.tgz",
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
"dev": true,
"requires": {
......@@ -3928,7 +3928,7 @@
"dependencies": {
"hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz",
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
}
......@@ -14370,6 +14370,11 @@
}
}
},
"print-js": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz",
"integrity": "sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg=="
},
"printj": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz",
......@@ -17106,7 +17111,7 @@
},
"vue-hot-reload-api": {
"version": "2.3.4",
"resolved": "https://registry.npmmirror.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz",
"resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz",
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==",
"dev": true
},
......
......@@ -44,6 +44,7 @@
"lowdb": "^1.0.0",
"nprogress": "^0.2.0",
"number-precision": "^1.6.0",
"print-js": "^1.6.0",
"qrcodejs2": "^0.0.2",
"qs": "^6.8.0",
"rfdc": "^1.3.0",
......
......@@ -32,7 +32,6 @@ const pictureUpload = (data) => {
// 导入对账单
const orderEndExportApi = (data) => {
console.log(data, "data")
data.method = `${defaultPath}order.orderEndExport`
return request(data)
}
......@@ -48,7 +47,21 @@ const addDeliveryApi = (data) => {
data.method = "dj.api.smartcarlife.configUpgradeOrder.addDelivery"
return request(data)
}
// 待补录订单批量关联-主订单列表
const waitOrderListApi = (data) => {
data.method = "dj.api.smartcarlife.order.pageForBatchRef"
return request(data)
}
// 待补录订单批量关联-交易参考号列表
const waitOrderTradeListApi = (data) => {
data.method = "dj.api.smartcarlife.waitinputorder.pageForBatchRef"
return request(data)
}
// 批量关联流水与订单
const batchWaitOrderApi = (data) => {
data.method = "dj.api.smartcarlife.waitinputorder.batchRef"
return request(data, "post")
}
export default {
pictureUpload,
getCrowdfundingParams,
......@@ -58,5 +71,8 @@ export default {
getOrderDetailApi,
orderExportApi,
finishOrderStatus,
addDeliveryApi
addDeliveryApi,
waitOrderListApi,
waitOrderTradeListApi,
batchWaitOrderApi
}
......@@ -231,7 +231,7 @@ export function getResidentListApi(data) {
// 导入员工修订工资
export function importStaffSalaryApi(data) {
data.method = `${path2}staffMonthSalary.correctSalary.byImport`
data.method = `${path2}staffMonthSalary.staffSalary.import`
return request(data, "post", ["file"])
}
......@@ -488,3 +488,33 @@ export function updateTmlpStaffItem(data) {
data.method = `${path2}digital.management.staff.item.update`
return request(data, 'post')
}
/**
* 打卡申诉列表
*/
export function getClockSalaryList(data = {}) {
data.method = 'dj.api.smartcarlife.clock.in.staff.appeal.list'
return request(data, 'post')
}
/**
* 打卡申诉列表导出
*/
export function exportClockSalaryList(data = {}) {
data.method = 'dj.api.smartcarlife.clock.in.staff.appeal.list.export'
return request(data, 'post')
}
// 获取员工月度扣款明细
export function getStaffDeductDetailAPI(data) {
data.method = `${path2}staffMonthSalary.deductDetail`
return request(data, 'post')
}
// 获取员工考勤明细
export function getStaffAttendanceDetailAPI(data) {
data.method = `${path2}clock.in.staff.attendance.detail`
return request(data, "post")
}
\ No newline at end of file
......@@ -228,3 +228,19 @@ export function findWarningConfig(data) {
data.method = `dj.api.smartcarlife.warningmsg.WarningThreshold.findByMerchantNo`
return request(data)
}
// 获取店铺阳光激励积分分润配置
export function getShopMerchantPointConfig(data) {
data.method = `dj.api.smartcarlife.shopMerchantPointConfig.get`
return request(data)
}
// 设置店铺阳光激励积分分润配置
export function setShopMerchantPointConfig(data) {
data.method = `dj.api.smartcarlife.shopMerchantPointConfig.save`
return request(data)
}
//获取阳光激励积分类目配置
export function getSunshineIncentivePoint(data) {
data.method = `dj.api.smartcarlife.sunshineIncentivePoint.get`
return request(data)
}
......@@ -38,3 +38,9 @@ export function nbcbReceiptPdfUrl(data) {
data.method = `${path}nbcb.receipt.pdf.url`
return request(data, RequestMethods.POST)
}
// 批量同步电子回单到金蝶
export function receiptBatchSync(data) {
data.method = `${path}nbcb.acc.receipt.batch.sync`
return request(data, RequestMethods.POST)
}
/*
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-04-01 11:30:56
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-04-07 14:05:35
* @FilePath: \dj-car-life-system\src\api\verbal.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.api.smartcarlife."
// 查询分类列表
export function getClassLabelList(data) {
......@@ -20,9 +11,9 @@ export function getClassLabelList(data) {
// 话术统计列表
export function geRecordSummaryList(data) {
data.method = `dj.api.script.extract.record.summary`
return request(data, RequestMethods.POST)
}
data.method = `dj.api.script.extract.record.summary`
return request(data, RequestMethods.POST)
}
// 查询场景标签列表
export function getSceceLabelList(data) {
data.method = `dj.api.script.extract.scene.label.list`
......@@ -48,18 +39,35 @@ export function getRecordDetail(data) {
}
//话术操作记录
export function getOperateList(data) {
data.method = `dj.api.script.extract.record.log`
return request(data, RequestMethods.POST)
}
data.method = `dj.api.script.extract.record.log`
return request(data, RequestMethods.POST)
}
// 话术埋点列表
// 话术埋点列表
export function getRecordBrowseList(data) {
data.method = `dj.api.script.extract.record.browse.list`
return request(data, RequestMethods.POST)
}
// 话术埋点导出
export function recordBrowseExport(data) {
data.method = `dj.api.script.extract.record.browse.list.export`
return request(data, RequestMethods.POST)
}
\ No newline at end of file
data.method = `dj.api.script.extract.record.browse.list`
return request(data, RequestMethods.POST)
}
// 话术埋点导出
export function recordBrowseExport(data) {
data.method = `dj.api.script.extract.record.browse.list.export`
return request(data, RequestMethods.POST)
}
//话术违规列表
export function findViolationReceptionByConditionPage(data) {
data.method = `dj.api.mindworkplate.violation.findViolationReceptionByConditionPage`
return request(data, RequestMethods.POST)
}
// 违规录音列表导出
export function findViolationReceptionByConditionExport(data) {
data.method = `dj.api.mindworkplate.violation.findViolationReceptionByConditionExport`
return request(data, RequestMethods.POST)
}
// 查询违规录音详情
export function findViolationByBatchId(data) {
data.method = `dj.api.mindworkplate.violation.findViolationByBatchId`
return request(data, RequestMethods.POST)
}
......@@ -325,13 +325,13 @@ $prefix: d2;
color: #666;
}
.el-tooltip__popper.is-light[x-placement^=top] .popper__arrow {
.el-tooltip__popper.is-light[x-placement^="top"] .popper__arrow {
border-color: #e4e7ed !important;
}
.el-tooltip__popper.is-dark {
white-space:wrap;
width:400px;
height:auto;
white-space: wrap;
width: 400px;
height: auto;
padding: 8px 10px;
}
.el-textarea {
......@@ -341,7 +341,7 @@ $prefix: d2;
}
}
.remark-popper-class{
.remark-popper-class {
width: 50%;
}
......@@ -352,4 +352,8 @@ $prefix: d2;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
\ No newline at end of file
}
.el-popover {
height: 200px;
overflow: scroll;
}
......@@ -1063,11 +1063,23 @@ export const receiptStatusOpt = [
{ confId: 1, confValue: "是" }
]
// 财资数据 数据来源
export const dataSourceOpt = [
{ confId: 1, confValue: "宁波财资" },
{ confId: 2, confValue: "人工导入" }
]
// 财资数据 操作项
export const operationTypeOpt = [
{ confId: 1, confValue: "重推财资数据" },
{ confId: 2, confValue: "推送财资数据" },
{ confId: 3, confValue: "获取财资数据" }
{ confId: 3, confValue: "获取财资数据" },
{ confId: 4, confValue: "获取流水明细" },
{ confId: 5, confValue: "获取回单" },
{ confId: 6, confValue: "推送流水明细" },
{ confId: 7, confValue: "推送回单" },
{ confId: 8, confValue: "重推流水明细" },
{ confId: 9, confValue: "重推回单" }
]
// 财资数据 操作项
......
......@@ -40,11 +40,13 @@
"
v-model.trim="searchSelectObj[item.selectName].value"
:clearable="item.isClear || false"
:maxlength="item.maxlength || ''"
class="input-with-select"
>
<el-select
v-model="searchSelectObj[item.selectName].attr"
style="width: 130px"
:popper-append-to-body="false"
slot="prepend"
placeholder="请选择"
@change="item.handleSelectChange"
......
......@@ -455,8 +455,10 @@ export default {
}
})
v.listShowSpecificationData = specificationValueSequenceArr?.join('/')
} else {
} else if (v?.specificationData?.includes(";~;")) {
v.listShowSpecificationData = v?.specificationData?.replace(RegExp(';~;', 'g'), '/')
} else {
v.listShowSpecificationData = "-"
}
// v.listShowSpecificationData =
// val.goodsSpecificationNameList?.length > 1
......@@ -474,6 +476,8 @@ export default {
val.goodsSpecificationNameList
v.createdDate = val.createdDate
v.updatedDate = val.updatedDate
v.goodsInfo.brandMerchantName = val.goodsInfo?.brandMerchantName || '-'
v.goodsInfo.supplierName = val.goodsInfo?.supplierName || '-'
})
const minPrice = shopPriceArr.length
? Math.min(...shopPriceArr)
......
......@@ -383,6 +383,9 @@ import Province from "./provinceCity.vue"
import mapView from "./mapView.vue"
import GLDialog from "../glsx-dialog/index.vue"
import { beforeRangePickerOptions, afterRangePickerOptions } from "./common"
import {
rangePickerOptions_30day2
} from "@/common/format"
export default {
name: "GlsxCombiForm",
components: {
......@@ -395,7 +398,8 @@ export default {
return {
pickerOption: {
beforeRangePickerOptions: beforeRangePickerOptions,
afterRangePickerOptions: afterRangePickerOptions
afterRangePickerOptions: afterRangePickerOptions,
rangePickerOptions_30day2: rangePickerOptions_30day2
},
subdistrict: 2,
dialogMapVisible: false,
......
......@@ -384,6 +384,21 @@ export const routerName = {
},
auth: [
{
authId: "9040206",
parentId: "90402",
label: "交易号与订单批量关联",
category: "Button",
type: "primary",
handle: "batchOrderRelate",
addRoutePath: [
{
authId: "9040207",
name: "交易号与订单号批量关联",
parentId: "90402"
}
]
},
{
authId: "9040201",
parentId: "90402",
label: "批量修改所属服务对接",
......@@ -603,6 +618,18 @@ export const routerName = {
},
component: _import("vehicleDamage/vehicleDamageOderImportDetail")
},
9040207: {
path: "/orderRelate",
name: "orderRelate",
meta: {
title: "交易号与订单批量关联",
authId: "9040207",
parentId: "90402",
cache: false,
activePath: "/orderRelate"
},
component: _import("orderManage/orderRelate")
},
90407: {
path: "/configUpgradationDetail",
name: "configUpgradationDetail",
......
......@@ -346,6 +346,14 @@ export const routerName = {
parentId: "90509",
label: "回单",
handle: "handleReceipt"
},
{
authId: "9050907",
parentId: "90509",
label: "下载资金日报",
category: "Button",
type: "primary",
handle: "handleFundExport"
}
],
component: _import("financeManage/theAssetData/index")
......
......@@ -148,7 +148,7 @@ export const routerName = {
{
authId: "9120507",
parentId: "91205",
label: "导出员工业绩",
label: "工资导入导出",
category: "Button",
type: "default",
handle: "handleExportPerformance"
......@@ -156,12 +156,12 @@ export const routerName = {
{
authId: "9120508",
parentId: "91205",
label: "历史业绩",
label: "工资提成",
handle: "handleHistoryPerformance",
addRoutePath: [
{
authId: "912050501",
name: "历史业绩",
name: "工资提成",
parentId: "9120505"
}
]
......@@ -177,7 +177,15 @@ export const routerName = {
parentId: "91205",
label: "提成构成",
handle: "handleSalaryDetail"
}
},
{
authId: "9120511",
parentId: "91205",
category: "Button",
type: "default",
label: "考勤/工资申诉",
handle: "handleClockSalaryIndex"
},
],
component: _import("residentManage/inStoreManage/inStoreControlList")
},
......@@ -1022,5 +1030,31 @@ export const routerName = {
activePath: "/inVerbalConfigView"
},
component: _import("residentManage/verbalTrickManagement/detailView")
},
91221: {
path: "/getOutverbalTrickManagement",
name: "getOutverbalTrickManagement",
meta: {
title: "话术违规管理",
authId: "91221",
parentId: "912",
cache: false
},
auth: [
{
authId: "9122101",
parentId: "91221",
label: "导出",
category: "Button",
handle: "handleExport"
},
{
authId: "9122102",
parentId: "91221",
label: "详情",
handle: "handleDetail"
}
],
component: _import("residentManage/getOutverbalTrickManagement/index")
}
}
<template>
<d2-container class="customer-tags">
<div
class="header"
slot="header"
>
<div class="header" slot="header">
<d2-search
ref="showSearch"
class="show-search"
......@@ -13,53 +10,34 @@
>
</d2-search>
<div class="up-btns">
<el-button
size="small"
type="primary"
@click="handleSearch"
>
<el-button size="small" type="primary" @click="handleSearch">
查询
</el-button>
<el-button
size="small"
@click="handleReset"
>
重置
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</div>
<div class="d2-container-content">
<div class="static-box">
<template v-for="(i,index) in staticList">
<div
:key="index"
class="static-item"
>
<div class="static-title">{{i.title}}</div>
<template v-for="(i, index) in staticList">
<div :key="index" class="static-item">
<div class="static-title">{{ i.title }}</div>
<template v-if="i.formatter">
<div
class="static-value"
:style="{color:i.color}"
:style="{ color: i.color }"
v-html="i.formatter(staticData)"
></div>
</template>
<template v-else>
<div
class="static-value"
:style="{color:i.color}"
>
{{staticData[i.key] || 0}}
<div class="static-value" :style="{ color: i.color }">
{{ staticData[i.key] || 0 }}
</div>
</template>
</div>
</template>
</div>
<d2-table-header title="档案列表">
<el-button
size="small"
type="primary"
@click="exportTable"
>
<el-button size="small" type="primary" @click="exportTable">
导出
</el-button>
</d2-table-header>
......@@ -70,40 +48,37 @@
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<template
slot="customerTagName"
slot-scope="scope"
>
<template v-if="scope.scope.customerVisitsLabelInfoDTOList && scope.scope.customerVisitsLabelInfoDTOList.length > 1">
<template slot="customerTagName" slot-scope="scope">
<template
v-if="
scope.scope.customerVisitsLabelInfoDTOList &&
scope.scope.customerVisitsLabelInfoDTOList.length > 1
"
>
<div class="tag-item">
<span class="tag">{{ customerTagName(scope.scope.customerVisitsLabelInfoDTOList) }}</span>
<el-popover
placement="top"
width="fit-content"
trigger="hover"
>
<span class="tag">{{
customerTagName(scope.scope.customerVisitsLabelInfoDTOList)
}}</span>
<el-popover placement="top" width="fit-content" trigger="hover">
<div class="tags-popover">
{{ customerTagName(scope.scope.customerVisitsLabelInfoDTOList) }}
{{
customerTagName(scope.scope.customerVisitsLabelInfoDTOList)
}}
</div>
<span
class="more-info"
slot="reference"
>({{ scope.scope.customerVisitsLabelInfoDTOList.length }})</span>
<span class="more-info" slot="reference"
>({{
scope.scope.customerVisitsLabelInfoDTOList.length
}})</span
>
</el-popover>
</div>
</template>
<template v-else>
<span>{{ scope.scope.customerTagName || '-' }}</span>
<span>{{ scope.scope.customerTagName || "-" }}</span>
</template>
</template>
<template
slot="auth-button"
slot-scope="scope"
>
<el-button
type="text"
@click="jumpDetail(scope.scope)"
>
<template slot="auth-button" slot-scope="scope">
<el-button type="text" @click="jumpDetail(scope.scope)">
话术管理
</el-button>
</template>
......@@ -112,7 +87,7 @@
</d2-container>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
import { Util, deepClone } from '@/common/util'
import { SCENE_OPTIONS } from "../constant"
import { getCustomerFilePage, exportCustomerFile, getCustomerFileStatic } from '@api/contentManager'
......@@ -405,7 +380,7 @@ export default {
}
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
.emptyBg {
display: flex;
flex-direction: column;
......@@ -468,9 +443,9 @@ export default {
::v-deep.static-unit {
font-weight: 600;
font-size: 14px;
margin:0 2px;
margin: 0 2px;
}
}
}
}
</style>
\ No newline at end of file
</style>
......@@ -6,18 +6,63 @@
class="detail-content-warn">
<div v-loading="loading">
<div class="form_div">
<div class="tipsDiv"
v-if="detailInfo.jdSync == 1">
<div class="tipsText">
<img src="../image/info-circle-fill.png"
class="imgCla">财资数据推送金蝶系统成功
<div>
财资数据同步金蝶系统状态
</div>
<div class="tipsDiv">
<div class="labelCla">流水明细状态:</div>
<div v-if="detailInfo.jdSync == 1">
<div class="tipsText">
<img src="../image/info-circle-fill.png"
class="imgCla">成功
</div>
</div>
<div v-else-if="detailInfo.jdSync == 0">
<div class="tipsText">
<img src="../image/icon.png"
class="imgCla">失败
<div class="tipsError"
:title="detailInfo.failReason">
原因:【{{ detailInfo.failReason ? (detailInfo.failReason.length > 40 ? (detailInfo.failReason.slice(0, 40) + '...') : detailInfo.failReason) : '-' }}】
</div>
<div class="tipsBt">
<el-button size="small"
type="primary"
@click="dataPush">明细重推</el-button>
</div>
</div>
</div>
<div v-else>--</div>
</div>
<div class="tipsDiv"
<div class="tipsDiv">
<div class="labelCla">回单状态:</div>
<div v-if="detailInfo.receiptJdSync == 1">
<div class="tipsText">
<img src="../image/info-circle-fill.png"
class="imgCla">成功
</div>
</div>
<div v-else-if="detailInfo.receiptJdSync == 0">
<div class="tipsText">
<img src="../image/icon.png"
class="imgCla">失败
<div class="tipsError">
原因:【{{ detailInfo.receiptFailReason ? (detailInfo.receiptFailReason.length > 40 ? (detailInfo.receiptFailReason.slice(0, 40) + '...') : detailInfo.receiptFailReason) : '-' }}】
</div>
<div class="tipsBt">
<el-button size="small"
type="primary"
@click="receiptBatchSync">回单重推</el-button>
</div>
</div>
</div>
<div v-else>--</div>
</div>
<!-- <div class="tipsDiv"
v-if="detailInfo.jdSync == 0">
<div class="tipsText">
<img src="../image/icon.png"
class="imgCla">财资数据推送金蝶系统失败
class="imgCla">失败
</div>
<div class="tipsError">原因:【{{ detailInfo.failReason ? detailInfo.failReason : "-" }}】
</div>
......@@ -26,7 +71,7 @@
type="primary"
@click="dataPush">数据重推</el-button>
</div>
</div>
</div> -->
<el-form class="edit-sub-block"
label-width="150px"
:inline="true">
......@@ -159,7 +204,7 @@
</template>
<script>
import { nbcbAccDetail, nbcbAccDetailBatchSync } from '@api/theAssetData'
import { nbcbAccDetail, nbcbAccDetailBatchSync, receiptBatchSync } from '@api/theAssetData'
import { Util, deepClone } from "@/common/util"
import { cdSignOpt, operationResultOpt, operationTypeOpt } from '@/common/constants.js'
export default {
......@@ -294,6 +339,24 @@ export default {
}).catch(err => {
console.log(err)
})
},
receiptBatchSync() {
this.$confirm('请确认是否要执行当前操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
const ids = [this.paramsObj.id]
receiptBatchSync({ ids: ids }).then(res => {
this.notice.okTips()
this.getDetail()
this.refreshFlag = true
})
}).catch(err => {
console.log(err)
})
}
}
}
......@@ -413,16 +476,20 @@ export default {
.tipsDiv {
display: flex;
justify-content: center; /* 水平居中 */
// justify-content: center; /* 水平居中 */
align-items: center; /* 垂直居中 */
flex-direction: column;
// flex-direction: column;
margin: 20px 0 34px 0;
.labelCla {
width: 200px;
text-align: right;
}
.tipsText {
display: flex;
justify-content: center; /* 水平居中 */
// justify-content: center; /* 水平居中 */
align-items: center; /* 垂直居中 */
font-weight: 600;
font-size: 16px;
font-size: 14px;
color: #000000e6;
}
.imgCla {
......@@ -431,10 +498,12 @@ export default {
.tipsError {
font-size: 12px;
color: #eb4e4e;
margin-top: 8px;
// margin-top: 8px;
margin-left: 20px;
}
.tipsBt {
margin-top: 10px;
// margin-top: 10px;
margin-left: 20px;
}
}
......
......@@ -42,7 +42,8 @@
@click="handleClickIcon"
class="el-icon-circle-close"></i>
</div>
<!----><!---->
<div class="errorTips"
v-if="tipsShow">最大金额需大于最小金额</div>
</div>
</template>
<script>
......@@ -56,7 +57,8 @@ export default {
oldVal: {
startInput: '',
endInput: ''
}
},
tipsShow: false
}
},
......@@ -71,6 +73,9 @@ export default {
displayValue(val) {
if (val) {
this.userInput = val
if (val.length == 0) {
this.tipsShow = false
}
}
}
},
......@@ -101,6 +106,7 @@ export default {
handleClickIcon(event) {
this.userInput[0] = null
this.userInput[1] = null
this.tipsShow = false
},
valueIsEmpty() {
const val = this.userInput
......@@ -138,6 +144,9 @@ export default {
if (Array.isArray(val)) {
if (+val[0] > +val[1]) {
val[1] = null
this.tipsShow = true
} else {
this.tipsShow = false
}
}
}
......@@ -169,5 +178,10 @@ export default {
}
}
}
.errorTips {
color: red;
// text-align: center;
font-size: 12px;
}
}
</style>
......@@ -14,6 +14,23 @@
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules">
<div slot="accHtml">
<el-select v-model="infoForm.accNameList"
clearable
:style="{ width: '400px'}"
placeholder="请选择单位名称"
multiple
collapse-tags>
<span class="select-all">
<el-checkbox v-model="allSelected"
@change="toggleAll">全选</el-checkbox>
</span>
<el-option v-for="item in baseData.accNameList"
:key="item.confId"
:label="item.confValue"
:value="item.confId"></el-option>
</el-select>
</div>
</glsx-combi-form>
</div>
<!-- <span class="dialog-footer">
......@@ -50,49 +67,57 @@ export default {
},
handleFormRef: 'handleFormRef',
formRules: {
transactionTime: [{ required: true, message: '请选择交易时间', trigger: 'change' }],
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'
}],
editFormData: [
{
label: '单位名称',
addHtml: 'accHtml'
},
// {
// 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'
pickerOptions: "rangePickerOptions_30day2"
}],
baseData: {
accNameList: [],
bankTypeList: [],
bankAccList: []
}
},
allSelected: false
}
},
......@@ -163,6 +188,18 @@ export default {
})
},
// 实现全选功能的方法
toggleAll() {
console.log('this.allSelected', this.allSelected)
if (this.allSelected) {
this.infoForm.accNameList = this.baseData.accNameList.map(option => option.confId)
} else {
this.infoForm.accNameList = []
}
// 更新allSelected状态,确保下一次操作时状态正确
// this.allSelected = !this.allSelected
},
handleAddConfirm() {
this.$refs.editFormRef.$refs[this.handleFormRef].validate(valid => {
if (valid) {
......@@ -344,4 +381,7 @@ export default {
font-size: 12px;
color: #eb4e4e;
}
.select-all {
margin: 0 0 20px 20px;
}
</style>
......@@ -4,12 +4,38 @@
<d2-container>
<div class="header"
slot="header"
style="padding: 10px 20px;">
style="padding: 10px 20px 20px 0;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="labelWidth"
:form-data="showFormData">
<!-- 同步状态 -->
<div slot="jdSyncStatusHtml">
<el-select v-model="searchForm.jdSyncType"
placeholder="请选择"
clearable
style="width: 45%;margin-right: 10px;">
<el-option label="全部"
value=""></el-option>
<el-option label="流水明细"
value="1"></el-option>
<el-option label="回单"
value="2"></el-option>
</el-select>
<el-select v-model="searchForm.jdSyncStatus"
placeholder="请选择"
clearable
style="width: 45%;">
<el-option label="全部"
value=""></el-option>
<el-option v-for="(item, index) in baseData.jdSyncOpt"
:key="index"
:label="item.confValue"
:value="item.confId">
</el-option>
</el-select>
</div>
<!-- 交易金额 -->
<div slot="transactionMoneyHtml">
<input-range start-placeholder="最小金额"
......@@ -84,7 +110,7 @@
import { Util, deepClone } from '@/common/util'
// import { rangePickerOptions } from '@/common/format'
import { mapActions, mapState } from 'vuex'
import { cdSignOpt, jdSyncOpt, receiptStatusOpt } from '@/common/constants.js'
import { cdSignOpt, jdSyncOpt, receiptStatusOpt, dataSourceOpt } from '@/common/constants.js'
import { nbcbAccDetailPage, nbcbAccDetailConfig, nbcbAccDetailBatchSync, nbcbReceiptPdfUrl } from '@api/theAssetData'
import inputRange from './components/inputRange'
import refetchDialog from './components/refetchDialog'
......@@ -116,7 +142,11 @@ export default {
postScript: '',
jdSync: '',
transactionTime: '',
receiptStatus: ''
receiptStatus: '',
receiptJdSync: '',
jdSyncType: '',
jdSyncStatus: '',
dataSource: ''
},
searchFormSearch: {},
showFormData: [{
......@@ -179,10 +209,6 @@ export default {
optionLabel: 'curName',
optionsName: 'curCodeList'
}, {
label: '交易金额',
name: 'transactionMoney',
addHtml: "transactionMoneyHtml"
}, {
label: '收支标志',
name: 'cdSign',
type: 'select',
......@@ -197,15 +223,21 @@ export default {
type: 'input',
maxlength: '20',
isClear: true
}, {
},
// {
// label: '同步状态',
// name: 'jdSync',
// type: 'select',
// isClear: true,
// optionList: [],
// optionId: 'confId',
// optionLabel: 'confValue',
// optionsName: 'jdSyncOpt'
// },
{
label: '同步状态',
name: 'jdSync',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'jdSyncOpt'
name: 'jdSyncStatus',
addHtml: "jdSyncStatusHtml"
}, {
label: '交易时间',
name: 'transactionTime',
......@@ -222,6 +254,19 @@ export default {
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'receiptStatusOpt'
}, {
label: '数据来源',
name: 'dataSource',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'dataSourceOpt'
}, {
label: '交易金额',
name: 'transactionMoney',
addHtml: "transactionMoneyHtml"
}],
getListApi: nbcbAccDetailPage,
tableParams: {
......@@ -299,9 +344,9 @@ export default {
return this.baseData.receiptStatusOpt.find(item => item.confId === cellValue.receiptStatus)?.confValue
}
}, {
label: '同步状态',
label: '同步状态(流水明细)',
prop: 'jdSync',
width: '100px',
width: '150px',
formatter: (cellValue) => {
return this.baseData.jdSyncOpt.find(item => item.confId === cellValue.jdSync)?.confValue
},
......@@ -311,6 +356,26 @@ export default {
1: 'greenSpot'
}[cellValue.jdSync]
}
}, {
label: '同步状态(回单)',
prop: 'receiptJdSync',
width: '150px',
formatter: (cellValue) => {
return this.baseData.jdSyncOpt.find(item => item.confId === cellValue.receiptJdSync)?.confValue
},
className: (cellValue) => {
return {
0: 'redSpot',
1: 'greenSpot'
}[cellValue.receiptJdSync]
}
}, {
label: '数据来源',
prop: 'dataSource',
width: '100px',
formatter: (cellValue) => {
return this.baseData.dataSourceOpt.find(item => item.confId === cellValue.dataSource)?.confValue
}
}
]
},
......@@ -323,6 +388,7 @@ export default {
cdSignOpt: deepClone(cdSignOpt),
jdSyncOpt: deepClone(jdSyncOpt),
receiptStatusOpt: deepClone(receiptStatusOpt),
dataSourceOpt: deepClone(dataSourceOpt)
},
recordInfo: null,
......@@ -368,6 +434,21 @@ export default {
delete this.searchFormSearch.amtMin
delete this.searchFormSearch.amtMax
}
if (this.searchFormSearch.jdSyncType == '1') {
this.searchFormSearch.jdSync = this.searchFormSearch.jdSyncStatus
} else if (this.searchFormSearch.jdSyncType == '2') {
this.searchFormSearch.receiptJdSync = this.searchFormSearch.jdSyncStatus
} else {
if (this.searchFormSearch.jdSyncStatus == 0 || this.searchFormSearch.jdSyncStatus == 1) {
this.searchFormSearch.jdSync = this.searchFormSearch.jdSyncStatus
this.searchFormSearch.receiptJdSync = this.searchFormSearch.jdSyncStatus
} else {
delete this.searchFormSearch.jdSync
delete this.searchFormSearch.receiptJdSync
}
}
delete this.searchFormSearch.jdSyncType
delete this.searchFormSearch.jdSyncStatus
resolve()
})
},
......@@ -394,9 +475,9 @@ export default {
selectableFn(row, index) {
var isSelect = true
if (row.jdSync == 1) { // 已同步不可勾选
isSelect = false
}
// if (row.jdSync == 1) { // 已同步不可勾选
// isSelect = false
// }
return isSelect
},
......@@ -417,7 +498,11 @@ export default {
postScript: '',
jdSync: '',
transactionTime: '',
receiptStatus: ''
receiptStatus: '',
receiptJdSync: '',
jdSyncType: '',
jdSyncStatus: '',
dataSource: ''
}
this.$refs.recordTable.refreshTable(false, true)
},
......@@ -545,7 +630,37 @@ export default {
})
}
})
// window.open('http://qcimg01.glsx.com.cn:7060/group1/M00/07/46/wKgD3mdD9oaARUE4AABxS-wgZWk991.pdf')
},
// 资金日报导出
handleFundExport() {
var params = deepClone(this.searchFormSearch)
if (params.accNameList.length > 0) {
params.accNameList.forEach((item, index) => {
const name = `accNameList[${index}]`
params[name] = item
})
delete params.accNameList
}
// console.log(params)
// 去除为null的值
for (const key in params) {
// console.log(params[key])
if (params[key] === null || params[key] === '' || params[key].length == 0) {
delete params[key]
}
}
params.method = 'dj.smartcarlife.api.nbcb.acc.financial.report.download'
const list = [
...this.dowloadList,
{
name: '资金日报导出',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
}
}
......
......@@ -589,7 +589,7 @@ export default {
this.$set(this.formList[0].formBlock[this.formList[0].formBlock.findIndex(subItem => subItem.name == 'position')], 'radioGroupList', this.formData?.positionNamesArr || [])
}
// 当商品信息自带嘀加成本时,将输入框置灰
if (!this.filterEmpty(formData?.upgradeGoods?.djCost)) {
if (!this.filterEmpty(formData?.upgradeGoods?.djCost) && this.formList[0].formBlock?.find(v => v.name == 'djCost')) {
this.$set(this.formList[0].formBlock?.find(v => v.name == 'djCost'), 'isDisabled', true)
}
this.show = true
......
......@@ -354,6 +354,13 @@ export default {
return cellValue.upgradeGoodsName || '-'
}
}, {
label: '规格',
prop: 'thirdPartyCode',
width: 140,
formatter: (cellValue) => {
return cellValue?.specificationData || '-'
}
}, {
label: '售价/元',
prop: 'sellPrice',
formatter: (cellValue) => {
......
......@@ -119,7 +119,7 @@
<script>
import { Util } from '@/common/util'
import { getProductManageList, productImport } from '@api/productManage'
import { getAllCategory } from '@api/product'
import { getAllCategory, getBrandSupplyMerchant } from '@api/product'
import { mapActions, mapState, mapMutations } from 'vuex'
import { baseGoodsDelete } from '@api/commodity'
import drawerDetail from './components/drawerDetail.vue'
......@@ -137,7 +137,9 @@ export default {
secondaryGoodsType: '',
thirdLevelGoodsType: '',
baseGoodsStatus: '',
type: ''
type: '',
supplierCode: '',
brandMerchantCode: ''
},
tempGoodsType: [],
showFormData: [{
......@@ -170,9 +172,23 @@ export default {
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'statusList'
}
],
}, {
label: '供应方',
name: 'supplierCode',
type: 'select',
optionList: [],
optionId: 'id',
optionLabel: 'relatedPartyName',
optionsName: 'supplierCodeList'
}, {
label: '品牌方',
name: 'brandMerchantCode',
type: 'select',
optionList: [],
optionId: 'id',
optionLabel: 'relatedPartyName',
optionsName: 'brandMerchantCodeList'
}],
getListApi: getProductManageList,
// 表格参数
tableParams: {
......@@ -216,6 +232,14 @@ export default {
return result
}
}, {
label: '供应方',
parentProp: 'goodsInfo',
prop: 'supplierName'
}, {
label: '品牌方',
parentProp: 'goodsInfo',
prop: 'brandMerchantName'
}, {
label: '规格',
prop: 'listShowSpecificationData',
width: '160'
......@@ -277,7 +301,9 @@ export default {
}, {
confId: 3,
confValue: '草稿'
}]
}],
supplierCodeList: [], // 供应方
brandMerchantCodeList: [] // 品牌方
},
selfBuildGoodsType: baseConfig.selfBuildGoodsType || '', // 服务商自建类目值
positionTypeList: [], // 太阳膜类商品部位
......@@ -318,6 +344,9 @@ export default {
getAllCategory({ categoryTypeList: this.selfBuildGoodsType, pageSize: 9999, currentPage: 1 }).then(res => {
this.baseData.productTypeList = res?.list || []
})
// 获取品牌方/供应方数据 1品牌商 2供应方
this.getBrandSupplyList(1)
this.getBrandSupplyList(2)
},
methods: {
......@@ -327,6 +356,18 @@ export default {
}),
...mapMutations('d2admin/user', ['setUpdateRefesh']),
...mapActions('d2admin/user', ['actionSetDownloadList']),
getBrandSupplyList(num) {
getBrandSupplyMerchant({
partitionFlag: num
}).then(res => {
if (num == 1) {
this.baseData.brandMerchantCodeList = res
} else {
this.baseData.supplierCodeList = res
}
this.getBaseData()
})
},
selectAddAttr(value) {
this.searchForm.goodsType = value?.[0]
this.searchForm.secondaryGoodsType = value?.[1]
......@@ -336,6 +377,17 @@ export default {
this.positionTypeList = await this.get(BaseData.positionTypeList)
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])
}
})
......@@ -422,7 +474,9 @@ export default {
secondaryGoodsType: '',
thirdLevelGoodsType: '',
baseGoodsStatus: '',
type: ''
type: '',
supplierCode: '',
brandMerchantCode: ''
}
this.tempGoodsType = []
this.$refs.productManageTable.refreshTable(true, true)
......
......@@ -476,8 +476,8 @@ export default {
const { provinceName, provinceCode, cityCode, cityName, fullAddress, lat, lng } = val
this.editData.merchantAddress = fullAddress
this.editData.provinceName = provinceName
this.editData.provinceCode = provinceCode
this.editData.cityCode = cityCode
this.editData.provinceCode = provinceCode || this.editData.provinceCode
this.editData.cityCode = cityCode || this.editData.cityCode
this.editData.cityName = cityName
this.editData.lat = lat
this.editData.lng = lng
......
......@@ -11,10 +11,15 @@
<p class="title">业务信息</p>
<el-form class="edit-sub-block" label-width="150px" :inline="true">
<template v-for="item in orderInfoList">
<el-form-item :label="orderType == 2 ? '交易参考号:' : '订单编码:'">
<el-form-item
:label="orderType == 2 ? '交易参考号:' : '订单编码:'"
:key="item.orderCode"
>
{{ item.orderCode }}
</el-form-item>
<el-form-item label="订单金额:"> {{ item.price }}元 </el-form-item>
<el-form-item label="订单金额:" :key="item.orderCode">
{{ item.price }}元
</el-form-item>
</template>
</el-form>
<glsx-combi-form
......@@ -35,7 +40,6 @@
:style="{ width: formDefaultObj.defaultWidth }"
clearable
:disabled="scope.scope.isDisabled"
@input="handleUpgradeNum"
>
</el-input>
<div class="tips">
......@@ -46,6 +50,23 @@
}}
</div>
</template>
<template slot="refundPoints2" slot-scope="scope">
<el-input
placeholder="请输入退款金额"
v-model="infoForm.refundPoints2"
:style="{ width: formDefaultObj.defaultWidth }"
clearable
:disabled="scope.scope.isDisabled"
>
</el-input>
<div class="tips">
剩余积分:{{
infoForm.remnantPoints2 === 0
? infoForm.remnantPoints2
: infoForm.remnantPoints2 || "-"
}}
</div>
</template>
</glsx-combi-form>
<p class="title">退款信息</p>
<glsx-combi-form
......@@ -191,6 +212,7 @@ export default {
orderType: null, // 订单类型(1.订单,2.待补录订单)
title: "",
refundPoints: "",
refundPoints2: "",
platformMerchantId: "",
payAmount: "",
payReason: "",
......@@ -280,6 +302,16 @@ export default {
isDisabled: true,
addHtml: "refundPoints"
}
],
refund2: [
{
label: "退还积分",
name: "refundPoints2",
type: "input",
isClear: true,
isDisabled: true,
addHtml: "refundPoints2"
}
]
},
// 业务信息
......@@ -332,6 +364,13 @@ export default {
trigger: "blur"
}
],
refundPoints2: [
{
required: true,
message: "请输入退还积分",
trigger: "blur"
}
],
yqMerchantId: [
{
required: true,
......@@ -549,7 +588,12 @@ export default {
watch: {
"infoForm.refundType"(newValue) {
// immediate: true
this.judgeRefundPoints(newValue)
//开启分润
if (this.infoForm.deliveryUserId) {
this.judgeRefundPoints(newValue, "refundPoints2")
}
this.judgeRefundPoints(newValue, "refundPoints")
this.judgeRefundPointsValue()
},
"infoForm.attachmentList": {
handler(newVal) {
......@@ -664,16 +708,19 @@ export default {
methods: {
...mapActions("d2admin/user", ["actionSetDownloadList"]),
judgeRefundPoints(newValue) {
if (this.infoEditFormData[this.findAttrIdx("refundPoints")]) {
judgeRefundPointsValue() {
if (this.infoForm.deliveryUserId) {
this.infoForm.refundPoints2 = this.infoForm.remnantPoints2
}
this.infoForm.refundPoints = this.infoForm.remnantPoints
},
judgeRefundPoints(newValue, key) {
if (this.infoEditFormData[this.findAttrIdx(key)]) {
if (newValue == 2) {
this.infoEditFormData[
this.findAttrIdx("refundPoints")
].isDisabled = false
this.infoEditFormData[this.findAttrIdx(key)].isDisabled = false
} else {
this.infoEditFormData[
this.findAttrIdx("refundPoints")
].isDisabled = true
this.infoEditFormData[this.findAttrIdx(key)].isDisabled = true
}
this.infoEditFormData = deepClone(this.infoEditFormData)
}
......@@ -728,10 +775,39 @@ export default {
this.infoForm.shopMerchantName = res.shopMerchantName
this.infoForm.remnantPoints = res.remnantPoints
this.infoForm.refundPoints = res.remnantPoints
if (this.infoForm.refundPoints === 0 || this.infoForm.refundPoints) {
this.infoForm.remnantPoints2 = res.remnantPoints2
this.infoForm.refundPoints2 = res.remnantPoints2
this.infoForm.employeeUserId = res.userId
this.infoForm.employeeName = res.employeeName
this.infoForm.deliveryUserId = res.deliveryUserId
? res.deliveryUserId
: ""
this.infoForm.deliveryEmployeeName = res.deliveryEmployeeName
if (!this.infoForm.deliveryUserId) {
//没用开启分润保持之前逻辑
if (this.infoForm.refundPoints === 0 || this.infoForm.refundPoints) {
this.infoEditFormData.push(...deepClone(this.attrObj.refund))
}
this.judgeRefundPoints(this.detail.refundType, "refundPoints")
} else {
//开启分润
this.infoEditFormData.push(...deepClone(this.attrObj.refund))
this.infoEditFormData[
this.findAttrIdx("refundPoints")
].label = `退还积分(${this.infoForm.employeeName})`
this.infoEditFormData.push(...deepClone(this.attrObj.refund2))
this.infoEditFormData[
this.findAttrIdx("refundPoints2")
].label = `退还积分(${this.infoForm.deliveryEmployeeName})`
this.judgeRefundPoints(this.detail.refundType, "refundPoints")
this.judgeRefundPoints(this.detail.refundType, "refundPoints2")
}
this.judgeRefundPoints(this.detail.refundType)
// if (this.infoForm.refundPoints2 === 0 || this.infoForm.refundPoints2) {
// }/
/** refundType:1-全额退款,2-部分退款
* 部分退款时,除了“所属服务对接”和“所属流量方”,其他不写入
* */
......@@ -978,10 +1054,28 @@ export default {
this.okParams.hasOwnProperty(item) && delete this.okParams[item]
})
},
clearValid(key) {
this.$refs.infoEditFormRef.$refs[this.editChildRef].clearValidate(key)
},
isValid(key) {
return (
this.infoForm.deliveryUserId &&
!this.infoForm[key] &&
this.infoForm[key] !== 0
)
},
handleAddConfirm() {
this.$refs.infoEditFormRef.$refs[this.editChildRef].validate(
(infoValid) => {
//开启分润
if (this.isValid("remnantPoints")) {
infoValid = true
this.clearValid("refundPoints")
}
if (this.isValid("remnantPoints2")) {
infoValid = true
this.clearValid("refundPoints2")
}
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => {
if (infoValid && valid) {
this.okParams = deepClone(this.infoForm)
......
<template>
<div class="relate-two-step">
<div class="box">
<div class="container">
<div class="title">数据校验结果</div>
<div class="content">
<div class="row">
<div class="m-b-16">
<div class="m-b-2" v-for="(item, index) in checkedList.trade" :key="index">
<span class="label">交易参考号:</span>
{{item.tradeNo}}
</div>
</div>
<div class="m-b-16">
<div class="m-b-2" v-for="(item, index) in checkedList.order" :key="index">
<span class="label">主订单号:</span>
{{item.orderCode}}
</div>
</div>
<div class="success-txt">校验通过,请点击“完成”进行关联!</div>
</div>
</div>
</div>
</div>
<div class="flex">
<div class="footer">
<el-button @click="handlePreStep" :loading="isConfirm">上一步</el-button>
<el-button type="primary" @click="handleConfirm" :loading="isConfirm">完成</el-button>
</div>
</div>
</div>
</template>
<script>
import orderManage from "@api/orderManage"
export default {
name: "relateTwoStep",
props: {
checkedList: {
type: Object,
default: () => {
return {
trade: [],
order: []
}
}
}
},
data() {
return {
isConfirm: false
}
},
mounted() {
},
watch: {},
methods: {
handlePreStep() {
if (this.isConfirm) {
return true
}
this.$emit('handlePreStep')
},
handleConfirm() {
if (this.isConfirm) {
return true
}
const params = {
tradeNos: this.checkedList.trade.map(item => item.tradeNo),
orderCodes: this.checkedList.order.map(item => item.orderCode),
}
this.isConfirm = true
orderManage.batchWaitOrderApi(params).then(res => {
console.log(res)
if (res) {
this.$message.success("关联成功")
this.$router.push({
name: "orderSupplement"
})
}
}).finally(() => {
this.isConfirm = false
})
},
}
}
</script>
<style lang="scss" scoped>
.relate-two-step {
.flex {
display: flex;
justify-content: center;
}
.m-b-16 {
margin-bottom: 16px;
}
.m-b-2 {
margin-bottom: 2px;
}
.box {
display: flex;
justify-content: center;
.container {
width: 416px;
height: 544px;
border-radius: 2px;
opacity: 1;
border: 1px solid #e5e5e5;
}
.title {
box-sizing: border-box;
width: 100%;
height: 40px;
line-height: 40px;
color: #333333;
font-size: 16px;
text-align: center;
border-bottom: 1px solid #e5e5e5;
background: #f8faff;
}
.content {
box-sizing: border-box;
height: 456px;
overflow: scroll;
padding: 16px;
}
.row {
color: #333333;
font-size: 14px;
.label {
color: #666666;
}
}
}
.success-txt {
color: #2cca74;
font-size: 14px;
}
.footer {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20px;
}
}
</style>
......@@ -66,6 +66,9 @@
<el-form-item label="施工状态:">
{{ constructioOpts[detail.constructionFlag] }}
</el-form-item>
<el-form-item label="交易参考号:" style="word-break: break-all">
{{ detail.tradeNo || $$(detail.payOrder, "tradeNo")}}
</el-form-item>
<el-form-item label="支付状态:">
{{
detail.upgradeFlag == "N"
......@@ -690,6 +693,7 @@ export default {
.el-form-item {
// width: 300px;
min-width: 31%;
width: 31%;
margin-bottom: 0px;
}
......
<template>
<div class="order-relate">
<d2-container>
<div class="d2-container-content" style="margin-top: 0;">
<div class="step-box">
<img v-show="stepActive == 'one'" class="step-img" src="@/assets/order-step-one.png">
<img v-show="stepActive == 'two'" class="step-img" src="@/assets/order-step-two.png">
</div>
<relateOneStep v-show="stepActive == 'one'" @handleNext="handleOneNext"></relateOneStep>
<relateTwoStep v-if="stepActive == 'two'" :checkedList="checkedList" @handlePreStep="handlePreStep"></relateTwoStep>
<div class="explain">
<div class="title">说明</div>
<div class="txt">交易流水与主订单关联</div>
<div class="tip">支持多对多,一对多,多对一,一对一,不同条件进行匹配,所选交易金额与主订单金额会进行匹配校验,若两者不一致会导致关联失败。</div>
</div>
</div>
</d2-container>
</div>
</template>
<script>
import relateOneStep from './components/relateOneStep'
import relateTwoStep from './components/relateTwoStep'
export default {
name: "orderRelate",
components: {
relateOneStep,
relateTwoStep
},
data() {
return {
stepActive: 'one',
checkedList: {
trade: [],
order: []
}
}
},
mounted() {
},
watch: {},
methods: {
handlePreStep() {
this.stepActive = 'one'
},
handleOneNext(checkedList) {
this.checkedList = checkedList
this.stepActive = 'two'
},
}
}
</script>
<style lang="scss" scoped>
.order-relate {
.step-box {
text-align: center;
}
.step-img {
width: 660px;
height: 103px;
}
.explain {
border-radius: 4px;
background: #fafafa;
padding: 16px 20px;
margin-top: 20px;
.title {
height: 23px;
line-height: 23px;
color: #333333;
font-size: 16px;
margin-bottom: 16px;
font-weight: 600;
}
.txt {
height: 20px;
color: #333333;
font-size: 14px;
margin-bottom: 8px;
}
.tip {
height: 20px;
color: #666666;
font-size: 14px;
}
}
}
</style>
......@@ -72,7 +72,7 @@
>
{{
detailInfo.integralIncome
? "¥" + detailInfo.integralIncome || 0
? detailInfo.integralIncome || 0
: "-"
}}
</el-form-item></el-col
......@@ -147,7 +147,7 @@
<el-col
:span="8"
v-if="
detailInfo.status == '已审核' || detailInfo.failType == '退款'
detailInfo.status == '已审核' || detailInfo.failType == '退款'
"
>
<el-form-item label="订单总积分:" class="halfItem">
......@@ -240,6 +240,10 @@ export default {
type: Number,
default: ""
},
staffUuid: {
type: Number,
default: ""
}
},
computed: {
dialogShow: {
......@@ -272,9 +276,8 @@ export default {
width: "1080px"
}
},
addScore:0,
detailInfo: {
},
addScore: 0,
detailInfo: {},
operationList: [],
loading: false,
imgVisible: false,
......@@ -287,7 +290,7 @@ export default {
this.dialogShow = false
},
getDetail() {
getPointDetail({ id: this.id }).then((res) => {
getPointDetail({ id: this.id, staffUuid: this.staffUuid }).then((res) => {
if (res) {
res.payTime = res.payTime
? Util.dateFormate(res.payTime, "YYYY-MM-DD HH:mm:ss")
......@@ -310,7 +313,7 @@ export default {
if (
this.detailInfo.status == "已审核" ||
this.detailInfo.failType == '退款'
this.detailInfo.failType == "退款"
) {
this.getScore()
this.getOrderOperateData()
......@@ -320,20 +323,15 @@ export default {
},
getScore() {
getOrderByScore({
orderCode: this.detailInfo.orderCode
orderCode: this.detailInfo.orderCode,
staffUuid: this.staffUuid
}).then((res) => {
this.addScore = res.addScore
// this.$set(this.detailInfo, "addScore", res.addScore)
})
},
getOrderOperateData() {
let params = { operationType: 1}
if(this.detailInfo.status=='已失效'){
params.id=this.id
}else{
params.orderCode=this.detailInfo.orderCode
}
let params = { operationType: 1, id: this.id }
getOperationRecord(params).then((res) => {
console.log(res)
this.operationList = res
......@@ -515,7 +513,7 @@ export default {
}
</style>
<style >
<style>
.detailDialog-tooltip-width {
max-width: 500px;
}
......
......@@ -79,6 +79,7 @@
:visible.sync="detailVisible"
v-if="detailVisible"
:id="id"
:staffUuid="staffUuid"
/>
<d2-dialog
......@@ -165,11 +166,11 @@ export default {
if (isNaN(value) || value <= 0) {
callback(new Error("输入大于0的数字"))
} else {
callback()
}
callback()
}
}
return {
isRefund:true,
isRefund: true,
show: true,
handleFormRef: "handleFormRef",
refundVisible: false,
......@@ -346,7 +347,7 @@ export default {
refundType: "",
refundPoints: "",
firstInto: true,
refundAmount:''
refundAmount: ""
},
formRules: {
refundType: [
......@@ -460,7 +461,7 @@ export default {
width: "100px",
prop: "integralIncome",
formatter: (cell) => {
return "¥" + cell.integralIncome || 0
return cell.integralIncome || 0
}
},
{
......@@ -652,16 +653,20 @@ export default {
//标记退款
handleRefund(data) {
this.refundVisible = true
this.refundForm.employeeUserId = data.staffUuid
this.refundForm.employeeName = data.staffName
this.refundForm.orderCode = data.orderCode
this.refundForm.tempPoints = data.integralIncome
this.refundForm.refundPoints = data.integralIncome //退还积分
this.refundForm.refundAmount = data.orderMoney //退还金额
this.refundForm.staffUuid = data.staffUuid
//当前积分能抵扣的最大值
this.getScore()
},
getScore() {
getOrderByScore({
orderCode: this.refundForm.orderCode
orderCode: this.refundForm.orderCode,
staffUuid: this.refundForm.staffUuid
}).then((res) => {
this.refundForm.integralIncome = res.addScore
//最大积分
......@@ -670,13 +675,17 @@ export default {
// this.refundForm.remainAmount = res.remainAmount //剩余金额
this.refundForm.firstInto = true
this.refundForm.refundType = 1 //退款类型(1:全退,2:部分退),
this.refundFormData[this.findAttrIdx("refundType")].optionList[0].isDisabled = false
this.refundFormData[
this.findAttrIdx("refundType")
].optionList[0].isDisabled = false
} else {
this.refundForm.remainingScore = res.remainingScore
// this.refundForm.remainAmount = res.remainAmount //剩余金额
this.refundForm.firstInto = false
this.refundForm.refundType = 2
this.refundFormData[this.findAttrIdx("refundType")].optionList[0].isDisabled = true
this.refundFormData[
this.findAttrIdx("refundType")
].optionList[0].isDisabled = true
}
this.updateDisable()
})
......@@ -686,8 +695,10 @@ export default {
if (this.refundForm.refundType == 1) {
this.refundForm.refundPoints = this.refundForm.tempPoints
}
this.refundFormData[this.findAttrIdx("refundPoints")].isDisabled = disabled
this.refundFormData[this.findAttrIdx("refundAmount")].isDisabled = disabled
this.refundFormData[this.findAttrIdx("refundPoints")].isDisabled =
disabled
this.refundFormData[this.findAttrIdx("refundAmount")].isDisabled =
disabled
this.refundFormData = deepClone(this.refundFormData)
},
findAttrIdx(attrName) {
......@@ -700,29 +711,32 @@ export default {
},
// 确定标记退款
handleRefundConfirm() {
if(this.isRefund){
if (this.isRefund) {
this.$refs.refundFormRef.$refs[this.handleFormRef].validate((valid) => {
if (valid) {
this.isRefund=false
markAsRefunded({
orderCode: this.refundForm.orderCode,
refundType: this.refundForm.refundType,
refundPoints: this.refundForm.refundPoints,
refundAmount:this.refundForm.refundAmount
}).then((res) => {
if (res) {
this.$message.success("退款成功!")
this.refundVisible = false
this.refundForm.id = ""
this.handleSearch()
}
}).finally(()=>{
this.isRefund=true
})
}
})
if (valid) {
this.isRefund = false
markAsRefunded({
orderCode: this.refundForm.orderCode,
refundType: this.refundForm.refundType,
refundPoints: this.refundForm.refundPoints,
refundAmount: this.refundForm.refundAmount,
employeeUserId: this.refundForm.employeeUserId,
employeeName: this.refundForm.employeeName
})
.then((res) => {
if (res) {
this.$message.success("退款成功!")
this.refundVisible = false
this.refundForm.id = ""
this.handleSearch()
}
})
.finally(() => {
this.isRefund = true
})
}
})
}
},
//刷新
handleRefresh() {
......@@ -788,6 +802,7 @@ export default {
// 查看详情
handleDetail(data) {
this.id = data.id
this.staffUuid = data.staffUuid
this.detailVisible = true
}
}
......@@ -829,4 +844,4 @@ export default {
border-top: 1px solid #e5e5e5;
}
}
</style>
\ No newline at end of file
</style>
<template>
<baseDialog
:is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose"
>
<div class="detail-content">
<div class="form_div">
<el-form class="edit-sub-block" label-width="110px" :inline="true">
<el-row :gutter="20">
<template v-for="(item, index) in configData">
<el-col :span="item.col ? item.col : 12" :key="index">
<el-form-item :label="item.title">
<div v-if="item.addHtml">
<template v-if="item.addHtml == 'resultTempArr'">
<template v-if="detailInfo[item.addHtml]">
<div
v-for="(item, index) in detailInfo[item.addHtml]"
:key="index"
>
{{ item.str }}
</div>
</template>
<span v-else>-</span>
</template>
</div>
<div v-else>
<div
v-if="item.className"
:class="[item.className(detailInfo)]"
></div>
{{
item.formatter
? item.formatter(detailInfo)
: detailInfo[item.key]
? detailInfo[item.key]
: "-"
}}
</div>
</el-form-item></el-col
>
</template>
</el-row>
</el-form>
</div>
<div class="operate-wrap">
<div class="title">操作记录</div>
<div class="operate-list" v-if="detailInfo.recordingBatchModelCallWghs">
<div class="operate-item">
<div class="confirm">违规确认</div>
<div class="result m40">
{{
detailInfo.recordingBatchModelCallWghs.wghsStatus == 1
? ""
: "已确认"
}}
</div>
<div class="operate m40">
操作人:{{
detailInfo.recordingBatchModelCallWghs.wghsStatus == 1
? "-"
: detailInfo.recordingBatchModelCallWghs
.violationReasonPersionName || "-"
}}
</div>
<div class="time m40">
操作时间:{{
detailInfo.recordingBatchModelCallWghs.wghsStatus == 1
? "-"
: detailInfo.recordingBatchModelCallWghs
.violationReasonConfimTime || "-"
}}
</div>
<div class="reason m40">
<div style="white-space: nowrap">处理意见:</div>
<div>
{{
detailInfo.recordingBatchModelCallWghs.wghsStatus == 1
? "-"
: detailInfo.recordingBatchModelCallWghs.violationReason ||
"-"
}}
</div>
</div>
</div>
</div>
<div v-else class="empty">暂无记录</div>
</div>
</div>
</baseDialog>
</template>
<script>
import { Util, deepClone } from "@/common/util"
import { findViolationByBatchId } from "@api/verbal"
export default {
name: "DetailDialog",
props: {
visible: {
type: Boolean,
default: false
},
id: {
type: Number,
default: ""
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit("update:visible", val)
}
}
},
watch: {
id(val) {
if (val) this.getDetail()
}
},
mounted() {
this.getDetail()
},
data() {
return {
operateData: [],
configData: [
{
title: "员工:",
key: "employeeName",
formatter(cellValue) {
return cellValue.employeeName + cellValue.employeePhone
}
},
{
title: "客户:",
key: "customerName",
formatter(cellValue) {
return cellValue.customerName + cellValue.phoneNumber
}
},
{
title: "门店名称:",
key: "merchantName"
},
{
title: "业务场景:",
key: "bussinessTypeName",
formatter(cellValue) {
let result = {
1: "会员权益/升级",
2: "精品升级"
}[cellValue.bussinessTypeName]
return result || "-"
}
},
{
title: "录音链接:",
key: "fileUrl"
},
{
title: "客户车型:",
key: "carModel"
},
{
title: "app接待结果:",
key: "receptionStatus",
formatter(cellValue) {
let result = {
1: "成交",
0: "战败"
}[cellValue.receptionStatus]
return result || "-"
}
},
{
title: "录音时长:",
key: "totalDuration"
},
{
title: "录音开始时间:",
formatter: (cellValue) => {
return cellValue.startTime
? Util.dateFormate(cellValue.startTime, "YYYY-MM-DD HH:mm:ss")
: "-"
}
},
{
title: "录音结束时间:",
formatter: (cellValue) => {
return cellValue.endTime
? Util.dateFormate(cellValue.endTime, "YYYY-MM-DD HH:mm:ss")
: "-"
}
},
{
title: "区域运营:",
key: "areaOperations"
},
{
title: "状态:",
key: "violationStatus",
formatter: (cellValue) => {
return {
1: "疑似违规",
2: "已违规",
0: "未违规"
}[cellValue.violationStatus]
}
},
{
title: "命中违规时间:",
formatter: (cellValue) => {
return cellValue.violationReasonConfimTime
? Util.dateFormate(
cellValue.violationReasonConfimTime,
"YYYY-MM-DD HH:mm:ss"
)
: "-"
},
col: 24
},
{
title: "违规判断依据:",
key: "resultArr",
col: 24,
addHtml: "resultTempArr"
}
],
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: []
},
config: {
title: "查看详情",
width: "1080px"
}
},
detailInfo: {}
}
},
methods: {
handleDetailClose() {
this.dialogShow = false
},
getDetail() {
findViolationByBatchId({ batchId: this.id }).then((res) => {
if (res) {
res.recordingBatchModelCallWghs.violationReasonConfimTime = res
.recordingBatchModelCallWghs.violationReasonConfimTime
? Util.dateFormate(
res.recordingBatchModelCallWghs.violationReasonConfimTime,
"YYYY-MM-DD HH:mm:ss"
)
: "-"
let resultArr = res.recordingBatchModelCallWghs.resultJson
? JSON.parse(res.recordingBatchModelCallWghs.resultJson)
: ""
if (resultArr.rules) {
resultArr.rules.filter((item) => {
return item.rule != "R104"
})
resultArr.rules.forEach((item, index) => {
let str = ""
str += `${item.sentence}(${item.reason}${
item.g1_reason ? "&" + item.g1_reason : ""
}${item.g2_reason ? "&" + item.g2_reason : ""})`
item.str = str
})
res.resultTempArr = resultArr.rules
}
this.detailInfo = res
}
})
}
}
}
</script>
<style lang="scss" scoped>
.form_div {
color: #333333;
padding: 20px 30px;
.edit-sub-block {
.el-form-item {
width: 100%;
margin-bottom: 0px;
}
.itemDiv {
display: flex;
.halfItem {
width: 50%;
}
}
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
}
.edit-sub-block-two {
.el-form-item {
margin-bottom: 0px;
}
}
}
.operate-wrap {
.title {
padding: 10px 0;
color: #333333;
font-size: 16px;
font-weight: 500;
border-bottom: 1px solid #e5e5e5;
}
.operate-list {
margin: 20px;
.operate-item {
display: flex;
color: #333333;
font-size: 14px;
// align-items: center;
.m40 {
margin: 0 40px;
white-space: nowrap;
}
.confirm {
color: #333333;
font-size: 14px;
font-weight: bold;
white-space: nowrap;
}
.confirm:before {
content: "";
display: inline-block;
width: 6px;
height: 6px;
border-radius: 4px;
background: #2cca74;
margin-right: 8px;
white-space: nowrap;
}
.reason {
display: flex;
white-space: wrap;
}
}
}
}
.empty {
display: flex;
align-items: center;
justify-content: center;
margin-top: 20px;
}
.audio {
color: #2a58ad;
}
</style>
<!-- 基本工资明细 -->
<template>
<div class="basic-dialog">
<d2-dialog
title="考勤明细"
:is-visible="visible"
noCancel
:isShowFooter="false"
width="720px"
@closeDialog="handleConfirm"
@confirmDialog="handleConfirm"
>
<div class="top-box">
<div class="item">本月应出勤天数:{{ staticData.requiredAttendanceDays }}天</div>
<div class="item">实际出勤天数:{{ staticData.actualAttendanceDays }}</div>
</div>
<div class="content">
<el-tabs v-model="activeName">
<el-tab-pane
v-for="item in tabList"
:key="item.id"
:label="item.label"
:name="item.id"
>
<el-table
v-if="item.tableData.length"
:data="item.tableData"
max-height="470px"
class="table_class"
border
:header-cell-style="{
'text-align': 'center',
'background-color': '#fafafa'
}"
show-summary
:summary-method="getSummaries"
style="width: 100%"
>
<el-table-column
type="index"
align="center"
label="序号"
width="80"
/>
<el-table-column
:prop="'attendanceType'"
align="center"
label="考勤类型"
>
<template slot-scope="scope">
<span>{{ scope.row.attendanceType || '-' }}</span>
</template>
</el-table-column>
<el-table-column
:prop="'clockInDate'"
align="center"
label="考勤日期"
/>
<el-table-column
:prop="'deductionDays'"
align="center"
:label="activeName != '2' ? '扣减天数' : '考勤天数'"
/>
</el-table>
<div class="empty-box" v-else>
<img src="@/assets/empty.png">
<div class="empty-text">暂无记录</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</d2-dialog>
</div>
</template>
<script>
import BigNumber from 'bignumber.js'
import { getStaffAttendanceDetailAPI } from '@api/resident.js'
import { isEmpty } from '../util.js'
export default {
name: 'BasicSalaryDialog',
data() {
return {
isEmpty,
activeName: '0',
tabList: [{
label: '扣减天数',
id: '0',
tableData: []
}, {
label: '着装异常',
id: '1',
tableData: []
}, {
label: '法定节假日加班',
id: '2',
tableData: []
}],
staticData: {}
}
},
props: {
basicVisible: {
type: Boolean,
default: false
},
detailInfo: {
type: Object,
default: () => {}
}
},
computed: {
visible: {
get() {
return this.basicVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'basicVisible' })
}
}
},
mounted() {
this.getDetail()
},
methods: {
// 处理请求接口日期传参
getMonthStartEndWithTime(monthStr) {
const [year, month] = monthStr.split('-').map(Number)
const firstDay = new Date(year, month - 1, 1, 0, 0, 0)
const firstDayStr = this.formatDateTime(firstDay)
const lastDay = new Date(year, month, 0, 23, 59, 59)
const lastDayStr = this.formatDateTime(lastDay)
return {
firstDay: firstDayStr,
lastDay: lastDayStr
}
},
formatDateTime(date) {
const y = date.getFullYear();
const m = String(date.getMonth() + 1).padStart(2, '0');
const d = String(date.getDate()).padStart(2, '0');
const hh = String(date.getHours()).padStart(2, '0');
const mm = String(date.getMinutes()).padStart(2, '0');
const ss = String(date.getSeconds()).padStart(2, '0');
return `${y}-${m}-${d} ${hh}:${mm}:${ss}`;
},
getDetail() {
let { firstDay, lastDay } = this.getMonthStartEndWithTime(this.detailInfo?.salaryMonth)
let params = {
pageSize: 9999,
currentPage: 1,
staffPhone: this.detailInfo?.staffPhone,
commitTimeStart: firstDay,
commitTimeEnd: lastDay
}
getStaffAttendanceDetailAPI(params).then(res => {
res?.exceptionInfoList?.forEach(val => {
val?.exceptionDetailList?.forEach(v => {
v.attendanceType = `${!this.isEmpty(v.attendanceType) ? v.attendanceType : ''}${!this.isEmpty(v.exceptionState) ? v.exceptionState : ''}`
})
})
// 实际出勤天数大于等于应出勤天数,显示满勤
if (Number(res?.actualAttendanceDays) >= Number(res?.requiredAttendanceDays)) {
res.actualAttendanceDays = '满勤'
} else {
res.actualAttendanceDays = `${res?.actualAttendanceDays}天`
}
this.tabList = this.categorizeData(res?.exceptionInfoList, [1, 2, 3, 4])
this.staticData = res || {}
})
},
// 处理返回数据
categorizeData(originalData, typeGroups) {
const result = this.tabList
originalData?.forEach(item => {
const detailList = item?.exceptionDetailList || []
// 扣减天数
if (typeGroups?.includes(item.exceptionType)) {
this.processAndPushData(detailList, result[0].tableData, '-')
// 着装异常
} else if (item.exceptionType === 5) {
this.processAndPushData(detailList, result[1].tableData, '-')
// 加班
} else if (item.exceptionType === 6) {
this.processAndPushData(detailList, result[2].tableData, '+')
}
})
return result
},
processAndPushData(sourceData, targetArray, prefix) {
sourceData.forEach(item => {
const days = Number(item.deductionDays)
targetArray.push({
...item,
deductionDays: isNaN(days) ? item.deductionDays : `${prefix}${Math.abs(days)}`
})
})
},
// 表格底部累加
getSummaries(param) {
const { columns } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = this.activeName == '2' ? '加班天数合计' : '扣减天数合计'
column.align = "is-left"
column.colSpan = 3
return
}
if (index === 1) {
const numberList = this.tabList[Number(this.activeName)]?.tableData.map((item) => !isNaN(item.deductionDays) ? item.deductionDays : 0)
const total = (numberList.length
? numberList.reduce((preVal, curVal) => {
return `${new BigNumber(preVal || 0).plus(new BigNumber(curVal || 0)).toNumber()}`
})
: "0")
sums[index] = `${this.activeName == '2' && total > 0 ? '+' : ''}${Number(total)}天`
}
})
return sums
},
handleConfirm() {
this.$emit('dialogClose')
}
}
}
</script>
<style lang="scss" scoped>
.basic-dialog{
::v-deep .el-dialog__header {
color: #333333;
font-family: PingFangSC-Medium;
font-size: 20px;
font-weight: 600;
border-bottom: 1px solid #e6e6e6;
}
::v-deep .el-dialog__headerbtn .el-dialog__close {
color: #666;
font-weight: 600;
font-size: 20px;
}
.top-box {
display: flex;
align-items: center;
margin-bottom: 8px;
.item {
width: 50%;
}
}
.content {
::v-deep .el-tabs__header {
position: relative;
.el-tabs__nav-scroll{
background: transparent;
padding: 0;
overflow: hidden;
.el-tabs__nav {
background: transparent;
height: auto;
border-radius: 0;
margin-left: 0;
padding: 0;
.el-tabs__active-bar {
display: inline-block !important;
}
.el-tabs__item {
height: 40px;
line-height: 40px;
padding: 0 10px;
}
.el-tabs__item.is-active {
color: #2A58AD;
font-weight: 600;
background: transparent;
border: none;
}
}
}
}
}
.table_class {
margin-top: 10px !important;
max-height: calc(68vh - 130px);
overflow-y: auto;
::v-deep .el-table__row{
height: 48px;
td {
text-align: center;
}
}
::v-deep .el-table__footer-wrapper .has-gutter{
height: 48px;
}
}
.empty-box {
text-align: center;
padding-bottom: 80px;
img {
width: 64px;
height: 40px;
margin-top: 100px;
}
.empty-text {
font-size: 14px;
color: #999999;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="layout">
<div class="header">
<d2-search
ref="showSearch"
:search-form="searchForm"
:form-data="showFormData"
label-width="100px"
:selectPopperAppendToBody="false"
class="d2-search"
>
<template slot="dateMonth">
<el-date-picker
v-model="searchForm.commitTime"
type="month"
placeholder="选择月份"
:picker-options="monthPickerOptions"
size="small"
:clearable="false"
value-format="yyyy-MM"
>
</el-date-picker>
</template>
</d2-search>
<div class="up-btns">
<el-button
:id="tableParams.btnId"
size="small"
type="primary"
>
查询
</el-button>
<el-button
size="small"
@click="handleReset"
>
重置
</el-button>
</div>
</div>
<div class="content">
<div class="top">
<div class="title">申诉记录</div>
<el-button
size="small"
type="primary"
@click="handleExport"
class="exprot"
>
导出
</el-button>
</div>
<d2-table
ref="tableRef"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
>
<div
slot="merchant"
slot-scope="scope"
>
{{scope.scope.serviceMerchantName || '-'}}
<div>{{scope.scope.merchantId || '-'}}</div>
</div>
<template
slot="appealDesc"
slot-scope="scope"
>
<el-popover
placement="top"
width="fit-content"
trigger="hover"
>
<div class="tags-popover">
{{scope.scope.appealDesc || '-'}}
</div>
<span
class="tag"
slot="reference"
>{{scope.scope.appealDesc || '-'}}</span>
</el-popover>
</template>
</d2-table>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
import { Util, deepClone, downLoadFile } from '@/common/util'
import { getClockSalaryList, exportClockSalaryList } from '@api/resident'
import dayjs from 'dayjs'
export default {
name: '',
components: {
},
data () {
return {
monthPickerOptions: {
disabledDate: date => {
let prev = dayjs().subtract(1, 'month').valueOf(),
now = dayjs().valueOf()
return date != now && (date > now || date < prev)
}
},
searchForm: {
appealType: '',
commitTime: dayjs().toDate()
},
searchFormSearch: {},
showFormData: [
{
label: '申诉类型',
name: 'appealType',
type: 'select',
optionList: [
{ value: '', name: '全部' },
{ value: 1, name: '考勤申诉' },
{ value: 2, name: '工资申诉' },
],
optionId: 'value',
optionLabel: 'name',
},
{
label: "提交时间",
name: "commitTime",
addHtml: 'dateMonth'
}
],
getListApi: getClockSalaryList,
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '姓名',
prop: 'staffName',
minWidth: '150'
}, {
label: '手机号',
prop: 'staffPhone',
minWidth: '100'
}, {
label: '适配业务',
prop: 'business',
minWidth: '100'
}, {
label: '服务门店',
minWidth: '180',
addHtml: 'merchant',
formatter: (cellValue) => {
var dataHtml = `${cellValue.serviceMerchantName || '-'}<br>恒河猴`
return dataHtml
}
}, {
label: '申诉类型',
minWidth: '150',
formatter: (cellValue) => {
return {
1: '考勤',
2: '工资'
}[cellValue.appealType] || '-'
}
}, {
label: '申诉时间',
prop: 'createdTime',
minWidth: '150',
formatter: (cellValue) => {
return cellValue.appealDate ? dayjs(cellValue.appealDate).format("YYYY-MM-DD") : '-'
}
}, {
label: '申诉说明',
minWidth: '150',
addHtml: 'appealDesc'
}, {
label: '提交时间',
prop: 'nextFollowTime',
minWidth: '150',
formatter: (cellValue) => {
return cellValue.commitTime ? dayjs(cellValue.commitTime).format("YYYY-MM-DD HH:mm:ss") : '-'
}
}
]
},
}
},
mounted () {
},
methods: {
initDate () {
},
beforeSearchFn () {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.commitTime) {
let nowMonth = dayjs().month(),
searchMonth = dayjs(this.searchFormSearch.commitTime).month(),
commitTimeStart = dayjs().startOf('month'),
commitTimeEnd = dayjs().toDate()
if (nowMonth != searchMonth) {
commitTimeStart = dayjs(this.searchFormSearch.commitTime).startOf('month')
commitTimeEnd = dayjs(this.searchFormSearch.commitTime).endOf('month')
}
this.searchFormSearch.commitTimeStart = `${this.formatDate(commitTimeStart)} 00:00:00`
this.searchFormSearch.commitTimeEnd = `${this.formatDate(commitTimeEnd)} 23:59:59`
delete this.searchFormSearch.commitTime
}
resolve()
})
},
formatDate (date) {
return dayjs(date).format("YYYY-MM-DD")
},
handleReset () {
this.searchForm = this.$options.data.call(this).searchForm
this.search()
},
handleExport () {
var params = this.searchFormSearch
exportClockSalaryList(params).then((res) => {
res && downLoadFile(res)
})
},
search () {
this.$refs.tableRef.refreshTable(false, true)
}
}
}
</script>
<style scoped lang='scss'>
.layout {
padding: 0 20px;
position: relative;
box-sizing: border-box;
.header {
background: #fff;
position: sticky;
top: 0;
z-index: 9;
}
.up-btns {
padding-bottom: 22px;
}
.d2-search {
::v-deep.el-select-dropdown,
.el-popper {
width: 300px !important;
}
}
.content {
position: absolute;
left: 20px;
width: calc(100% - 40px);
padding: 0 20px 36px;
background: #fff;
margin-top: 14px;
height: calc(100% - 110px);
box-sizing: border-box;
overflow-y: auto;
.top {
height: 52px;
color: #333333;
font-size: 32rpx;
font-weight: 500;
display: flex;
align-items: center;
.exprot {
margin-left: auto;
}
}
}
.tag {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
padding: 0 10px;
display: block;
}
}
::v-deep.tags-popover {
max-width: 50vw;
}
</style>
\ No newline at end of file
<!-- 扣款明细 -->
<template>
<div class="deduction-dialog">
<d2-dialog
:is-visible="visible"
noCancel
:isShowFooter="false"
width="720px"
@closeDialog="handleConfirm"
@confirmDialog="handleConfirm"
>
<div slot="sub-title" class="title">扣款明细
<el-tooltip class="item" effect="light" popper-class="sub-title-tooltip" placement="right">
<template slot="content">
<img style="width: 800px;" :src="`https://img02.glsx.com.cn/weapp/resource/saas/dj/images/deduction_tips_img.png?v=${new Date().getTime()}`" />
</template>
<i class="el-icon-info"></i>
</el-tooltip>
</div>
<div class="content" v-if="show">
<div class="item" v-for="item in formData" :key="item.value">
<div class="label">{{ item.label }}:</div>
<div class="value">
<el-input :value="formatMoney(infoData[item.value], item)" disabled></el-input>
<div v-if="item.tipsKey && infoData[item.value]" class="value-tips">
月度总提成的<span style="color: #2A58AD;">{{infoData[item.tipsKey]}}%</span>延迟6个月发放
</div>
<div v-if="item.hasDetail" class="value-tips">
<template v-if="item.value === 'dailyDeductMoney'">
<div class="deduct-item" v-if="infoData.dailyDeductDetailData1.length">精品升级 本月扣
<span v-for="(subItem, subIndex) in infoData.dailyDeductDetailData1" :key="subIndex" class="tips-text">{{ subItem }}日
<span v-if="subIndex !== infoData.dailyDeductDetailData1.length - 1">、</span>
</span>
</div>
<div class="deduct-item" v-if="infoData.dailyDeductDetailData2.length">会员权益/升级 本月扣
<span v-for="(subItem, subIndex) in infoData.dailyDeductDetailData2" :key="subIndex" class="tips-text">{{ subItem }}日
<span v-if="subIndex !== infoData.dailyDeductDetailData2.length - 1">、</span>
</span>
</div>
</template>
<template v-else-if="item.value === 'padDeductMoney'">
<div>
本月录音数<span class="tips-text">{{ infoData.recordingCount || 0 }}</span>条 本月总触客数<span class="tips-text">{{ infoData.toShopFilmCount || 0 }}</span>人
</div>
</template>
</div>
</div>
</div>
</div>
</d2-dialog>
</div>
</template>
<script>
import { getStaffDeductDetailAPI } from '@api/resident'
import { isEmpty, filterStr } from '../util.js'
export default {
name: 'BasicSalaryDialog',
data() {
return {
isEmpty,
dialogConfig: {
title: '',
width: '720px'
},
formData: [
{
label: '日报扣款',
value: 'dailyDeductMoney',
hasDetail: true
},
{
label: '平板扣款',
value: 'padDeductMoney',
hasDetail: true
},
{
label: '递延金扣款',
value: 'deferExpenses',
tipsKey: 'deferredRatio'
},
{
label: '递延金纳入',
value: 'deferIncome',
tipsKey: 'deferredRatio2'
},
{
label: '退单冲减',
value: 'refundOffset'
},
{
label: '其它应发/应扣',
value: 'otherDeduction'
}
],
infoData: {},
show: false
}
},
props: {
deductionVisible: {
type: Boolean,
default: false
},
detailRow: {
type: Object,
default: () => {}
},
detailInfo: {
type: Object,
default: () => {}
}
},
computed: {
visible: {
get() {
return this.deductionVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'deductionVisible' })
}
}
},
mounted() {
this.getDeductDetail()
},
methods: {
formatMoney(value, item) {
const num = Number(value);
return isNaN(num) ? '0元' : `${num}元`;
},
handleConfirm() {
this.$emit('dialogClose')
},
getDeductDetail() {
getStaffDeductDetailAPI({ id: this.detailRow?.id }).then(res => {
this.infoData = {
...res,
refundOffset: !this.isEmpty(res?.refundOffset) ? `-${Math.abs(res?.refundOffset)}` : 0,
dailyDeductDetailData1: res?.dailyDeductDetailData1?.length ? this.getSortedDays(res?.dailyDeductDetailData1) : [],
dailyDeductDetailData2: res?.dailyDeductDetailData2?.length ? this.getSortedDays(res?.dailyDeductDetailData2) : []
}
this.show = true
})
},
getSortedDays(dateArray, ascending = true) {
// 1. 按日期排序
const sortedDates = dateArray.sort((a, b) => {
return ascending ? new Date(a) - new Date(b) : new Date(b) - new Date(a)
})
return sortedDates.map(date => {
const day = date.split("-")[2]
return parseInt(day, 10).toString()
})
}
}
}
</script>
<style lang="scss" scoped>
.deduction-dialog {
::v-deep .el-dialog__header {
border-bottom: 1px solid #e6e6e6;
}
::v-deep .el-dialog__headerbtn .el-dialog__close {
color: #666;
font-weight: 600;
font-size: 20px;
}
::v-deep .dialog-sub-title {
color: #333333;
font-family: PingFangSC-Medium;
font-size: 20px;
font-weight: 600;
}
.content{
padding: 0 30px;
max-height: calc(68vh - 70px);
overflow-y: auto;
.item {
display: flex;
// align-items: center;
margin-bottom: 20px;
.label {
width: 110px;
text-align: right;
margin-top: 8px;
color: #333333;
}
.value {
width: 432px;
.value-tips {
margin-top: 8px;
color: #666666;
.tips-text {
color: #5579bd;
}
}
.deduct-item{
margin-top: 5px;
&:first-child {
margin: 0;
}
}
}
}
}
}
</style>
<style>
.sub-title-tooltip {
max-width: 810px !important;
width: 810px !important;
}
</style>
\ No newline at end of file
<!-- 导出员工业绩 -->
<!-- 工资导入导出 -->
<template>
<baseDialog :dialog-config="dialogConfig" :is-show.sync="visible"
@handleClick="handleAddConfirm">
......@@ -11,25 +11,41 @@
:form-obj="infoForm"
:form-data="formData"
:form-rules="formRules">
<template slot="titleBox1">
<div class="title_box">工资导出</div>
</template>
<template slot="staffPhoneList">
<el-select
class="select"
style="width: 432px;"
filterable
v-model="infoForm.staffPhoneList"
multiple
collapse-tags
:multiple-limit="10"
>
<el-option
v-for="item in baseData.staffList"
:key="item.staffPhone"
:label="item.staffName"
:value="item.staffPhone"
/>
</el-select>
</template>
<template slot="monthPicker">
<el-date-picker
v-model="infoForm.month"
type="month"
type="monthrange"
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>
<div class="title_box">导入更新</div>
</template>
<template slot="importSalary">
<el-button size="small" class="import_btn">
......@@ -39,13 +55,16 @@
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>
<el-button type="text" size="small" @click="downloadTemplate">模板下载</el-button>
<div class="tips-text">选择员工在近3个月内的工资导出文件,批量修订后导入更新</div>
<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>
<div>
<el-button class="handle_import" size="small" type="primary" plain @click="importData">导入更新</el-button>
</div>
</template>
</glsx-combi-form>
</div>
......@@ -54,23 +73,19 @@
<script>
import { getLevelStaffListApi } from '@api/resident'
import { staffSceneLabelList } from '@/common/constants'
import { deepClone } from '@/common/util'
export default {
name: 'exportPerformanceDialog',
data() {
return {
formData: [
{
label: '',
addHtml: 'titleBox1'
},
{
label: '选择员工',
name: 'staffPhoneList',
type: 'select',
optionList: [],
multiple: true,
collapseTags: true,
optionId: 'staffPhone',
optionLabel: 'staffName',
optionsName: 'staffList'
addHtml: 'staffPhoneList'
},
{
label: '选择时间',
......@@ -87,7 +102,7 @@ export default {
addHtml: 'titleBox2'
},
{
label: '导入修正实发工资',
label: '导入更新',
name: '',
addHtml: 'importSalary'
}
......@@ -104,27 +119,28 @@ export default {
const currentMonth = today.getMonth()
const month = date.getMonth()
const year = date.getFullYear()
// 当前年份
// 计算过去12个月的起始日期
const twelveMonthsAgo = new Date(today)
twelveMonthsAgo.setMonth(currentMonth - 11)
// 允许选择过去12个月的日期,不包含当前月份
if (year === currentYear) {
return month >= currentMonth || month < currentMonth - 3
return month >= currentMonth || date > today || date < twelveMonthsAgo;
} else if (year === currentYear - 1) {
return month > 11 || month < 9
return month > 11 || month < currentMonth
} else {
return year >= currentYear
return year < currentYear - 1 || year > currentYear
}
}
},
infoForm: {
staffPhoneList: [],
sceneType: [],
month: ''
month: []
},
baseData: {
sceneTypesList: deepClone(staffSceneLabelList),
staffList: []
},
dialogConfig: {
title: '导出员工业绩',
title: '工资导入导出',
width: '720px'
},
fileName: ''
......@@ -148,20 +164,22 @@ export default {
},
mounted() {
this.getStaffList()
this.getOptions()
this.$nextTick(() => {
this.$refs.editFormRef?.$refs?.editChildRef?.clearValidate()
})
},
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) {
if (this.infoForm?.staffPhoneList?.length > 10) return this.$message.warning('最大不超过10个员工')
this.$emit('handleExport', this.infoForm)
}
})
......@@ -169,11 +187,7 @@ export default {
// 下载模板
downloadTemplate() {
this.$refs.editFormRef?.$refs?.editChildRef?.validate((valid) => {
if (valid) {
this.$emit('handleDownloadTemplate', this.infoForm)
}
})
this.$emit('handleDownloadTemplate')
},
// 上传文件
......@@ -206,20 +220,6 @@ export default {
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')
}
......@@ -228,9 +228,6 @@ export default {
</script>
<style lang="scss" scoped>
.sceneTypes_check{
margin-right: 20px;
}
.export_btn{
margin-left: 154px;
}
......@@ -239,12 +236,10 @@ export default {
color: #1D1D1D;
font-weight: 600;
border-bottom: 1px solid #E5E5E5;
padding: 8px;
margin-bottom: 16px;
padding: 0 8px;
}
.import_btn{
position: relative;
margin-bottom: 10px;
.import_input{
opacity: 0;
position: absolute;
......@@ -256,6 +251,13 @@ export default {
font-size: 0;
}
}
.tips-text {
height: 20px;
line-height: 20px;
color: #999;
font-size: 12px;
margin: 8px 0;
}
.file_box{
display: flex;
align-items: center;
......
<!-- 员工历史业绩 -->
<!-- 员工工资提成 -->
<template>
<div class="historicalPerformance">
<div class="content">
<div class="tips-header">
<i class="el-icon-warning custom-icon"></i>
<span class="log-text">请先到员工信息中配置员工基本工资,并设置员工职级以及入职日期,配置调店分配周期以判断日报扣款规则(当前员工所在门店请到驻店工资绩效配置方案)</span>
</div>
<div class="header">
<div class="name">{{ performanceData.staffName }}</div>
<div><span>|</span>{{ performanceData.staffPhone }}<span>|</span>{{ performanceData.hireType == 1 ? '校招管培生' : performanceData.hireType == 2 ? '社会招聘' : '-' }}</div>
......@@ -32,7 +36,7 @@
</el-table-column>
<el-table-column align="center">
<template slot="header">
<span>作为导师收入</span>
<span>导师激励</span>
</template>
<template slot-scope="scope">
<span>{{ !isEmpty(scope.row.mentorCommission) ? `¥${scope.row.mentorCommission}` : '-' }}</span>
......@@ -40,7 +44,7 @@
</el-table-column>
<el-table-column align="center">
<template slot="header">
<span>门店提成</span>
<span>业务提成</span>
</template>
<template slot-scope="scope">
<span>{{ !isEmpty(scope.row.merchantCommission) ? `¥${scope.row.merchantCommission}` : '-' }}</span>
......@@ -62,6 +66,11 @@
<span>{{ !isEmpty(scope.row.dailyDeductMoney) ? `- ¥${Math.abs(scope.row.dailyDeductMoney)}` : '-' }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="递延金">
<template slot-scope="scope">
<span>{{ !isEmpty(scope.row.deferredPayment) ? `${scope.row.deferredPayment > 0 ? '+' : '-'} ¥${Math.abs(scope.row.deferredPayment)}` : '-' }}</span>
</template>
</el-table-column>
<el-table-column align="center">
<template slot="header">
<span>退单冲减</span>
......@@ -72,26 +81,10 @@
</el-table-column>
<el-table-column align="center">
<template slot="header">
<span>正负冲减</span>
</template>
<template slot-scope="scope">
<span>{{ !isEmpty(scope.row.otherDeduction) ? `¥${scope.row.otherDeduction}` : '-' }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="递延金扣款">
<template slot-scope="scope">
<span>{{ scope.row.deferExpenses ? `- ¥${Math.abs(scope.row.deferExpenses)}` : '-' }}</span>
<span>其他应发/应扣</span>
</template>
</el-table-column>
<el-table-column align="center" label="递延金纳入">
<template slot-scope="scope">
<span v-if="isEmpty(scope.row.deferIncome)">-</span>
<el-tooltip class="item" effect="dark" v-else placement="top">
<template slot="content">
<p>{{ getMonthSixMonthsBack(scope.row) }}月递延金</p>
</template>
<span>{{ `¥${scope.row.deferIncome}` }}</span>
</el-tooltip>
<span>{{ !isEmpty(scope.row.otherDeduction) ? `${scope.row.otherDeduction < 0 ? '-' : ''} ¥${Math.abs(scope.row.otherDeduction)}` : '-' }}</span>
</template>
</el-table-column>
<el-table-column align="center">
......@@ -239,7 +232,7 @@
</div>
<!-- 修订合计应发工资 -->
<revised-salary-dialog :revised-salary-visible="revisedSalaryVisible" v-if="revisedSalaryVisible" :revised-salary-row="revisedSalaryRow" @dialogClose="handleSalaryCloseDialog"></revised-salary-dialog>
<!-- 工资明细 -->
<!-- 提成构成 -->
<salary-details-dialog :salary-details-visible="salaryDetailsVisible" v-if="salaryDetailsVisible" @dialogClose="handleSalaryDetailsColseDialog" :detail-row="detailRow"></salary-details-dialog>
</div>
</template>
......@@ -378,6 +371,7 @@ export default {
row.staffSceneLabelStr = filterStr(row.staffSceneLabel, this.staffSceneLabelList)
row.jobTypeStr = filterStr(row.jobTypes, staffLevelList, this.performanceData?.hireType)
row.personalSalary = basicSalary.plus(commissionPrice).toNumber() < minimumSalary.toNumber() ? minimumSalary.toNumber() : basicSalary.plus(commissionPrice).toNumber() // 基本工资+提成<保底工资,则取保底工资
row.deferredPayment = !this.isEmpty(row.deferExpenses) && !this.isEmpty(row.deferIncome) ? new BigNumber((0 - row.deferExpenses) || 0).plus(new BigNumber(row.deferIncome) || 0).toNumber() : ''
})
this.performanceTableData = (this.whiteFlag ? res?.list : []) || []
})
......@@ -431,6 +425,24 @@ export default {
.historicalPerformance {
background: #fff;
.content {
.tips-header {
padding: 3px 12px;
display: flex;
background: #f47f131a;
margin-left: 20px;
margin-bottom: 8px;
width: fit-content;
.custom-icon{
color: #F47F13;
width: 16px;
height: 16px;
margin: 1px 8px 0 0;
}
.log-text {
font-size: 14px;
color: #F47F13;
}
}
.header{
padding: 0 20px;
height: 48px;
......
......@@ -77,7 +77,7 @@ export default {
return {
isEmpty,
dialogConfig: {
title: '修订合计应发工资',
title: '修订工资',
width: '720px'
},
formData: [
......@@ -93,7 +93,7 @@ export default {
addHtml: 'refundOffset'
},
{
label: '正负冲减',
label: '其他应发/应扣',
name: 'customDeduction',
addHtml: 'customDeduction'
},
......@@ -107,6 +107,7 @@ export default {
name: 'remark',
type: 'input',
inputType: 'textarea',
placeholder: '描述补充应发和应扣项目明细',
rows: 5,
maxlength: 500,
showLimit: true
......@@ -174,10 +175,10 @@ export default {
}
// 清除与输入框1和输入框2相关的内容
const refundOffsetText = !this.isEmpty(this.infoForm['refundOffset']) && !isNaN(this.infoForm['refundOffset']) ? `退单冲减${this.infoForm['refundOffset']},` : ''
const customDeductionText = !this.isEmpty(this.infoForm['customDeduction']) && !isNaN(this.infoForm['customDeduction']) ? `正负冲减${this.infoForm['customDeduction']},` : ''
const customDeductionText = !this.isEmpty(this.infoForm['customDeduction']) && !isNaN(this.infoForm['customDeduction']) ? `其他应发/应扣${this.infoForm['customDeduction']},` : ''
let existingText = this.infoForm.remark
.replace(/退单冲减[^,]*/g, '')
.replace(/正负冲减[^,]*/g, '')
.replace(/其他应发\/应扣[^,]*/g, '')
.trim()
// 添加新的输入框内容
......@@ -236,8 +237,8 @@ export default {
correctSalary: this.computedValue,
remark: this.infoForm.remark
}
if (this.computedValue - 0 < 0) return this.$message.warning('实发工资不能小于0')
if (isNaN(params.customDeduction)) return this.$message.warning('正负冲减值需为数字')
// if (this.computedValue - 0 < 0) return this.$message.warning('实发工资不能小于0')
if (isNaN(params.customDeduction)) return this.$message.warning('其他应发/应扣值需为数字')
reviseSalaryApi(params).then(res => {
this.$message.success('修订成功')
this.$emit('dialogClose', { flag: true, attrName: 'revisedSalaryVisible' })
......
<template>
<div class="layout">
<div class="tab"
ref="tabbox">
<div :class="['tab-item', { 'item-active': windowId == -1 }]"
@click="windowId = -1">
<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}`">
<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)">
<div
class="close"
@click.stop="close(index)"
>
<i class="el-icon-close"></i>
</div>
</div>
......@@ -22,20 +30,26 @@
</template>
<template v-if="dropdownList.length">
<div class="arrow-box">
<el-dropdown trigger="click"
@command="windowId = $event">
<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">
<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)">
<div
class="close"
@click.stop="closeDrop(index)"
>
<i class="el-icon-close"></i>
</div>
</div>
......@@ -47,30 +61,38 @@
</template>
</div>
<div class="content">
<InStoreManageIndex v-show="windowId == -1"
ref="inStoreManageIndex"
@openWindow="openWindow" />
<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" />
<component
:ref="`page-${i.id}`"
:key="i.id"
:is="i.component"
v-show="windowId == i.id"
:show="windowId == i.id"
:query-data="i.data"
@backIndex="backIndex"
/>
</template>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
import clockSalaryIndex from './components/clockSalaryIndex/index'
import InStoreManageIndex from "./index"
import staffInfo from "./staffInfo"
export default {
name: "",
components: {
InStoreManageIndex,
staffInfo
staffInfo,
clockSalaryIndex
},
data() {
data () {
return {
tab: [],
dropdownList: [],
......@@ -79,37 +101,42 @@ export default {
}
},
// 在beforeDestroy钩子中移除事件监听
beforeDestroy() {
beforeDestroy () {
window.removeEventListener('popstate', this.preventBack)
},
// 在你的Vue组件的mounted钩子中添加事件监听
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() {
preventBack () {
if (this.windowId !== -1) {
const [recep] = this.$refs[`recep-${this.windowId}`]
const [recep] = this.$refs[`page-${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}`
openWindow (data) {
const id = data.pageId ? data.pageId : `${data.staffName}_${data.phoneNumber}`
const windowList = [...this.tab, ...this.dropdownList]
const windowItem = windowList.find((e) => e.id == id)
let component = 'staffInfo',
title = data.staffName || '-'
if (data.componentName) component = data.componentName
if (data.title) title = data.title
if (windowItem) {
this.$refs[`recep-${id}`]?.[0]?.setActiveName(data)
this.$refs[`page-${id}`]?.[0]?.setActiveName && this.$refs[`page-${id}`]?.[0]?.setActiveName(data)
return this.windowId = id
}
if (windowList.length == 20) return this.$message.error("最多同时打开20个tabs")
const item = {
text: data.staffName || '-',
text: title,
data,
id
id,
component
}
if (this.dropdownList.length) this.dropdownList.push(item)
else {
......@@ -118,7 +145,7 @@ export default {
}
this.windowId = id
},
close(index) {
close (index) {
this.tab.splice(index, 1)
if (this.dropdownList.length) {
this.tab.push(this.dropdownList[0])
......@@ -127,10 +154,10 @@ export default {
this.windowId = -1
this.checkEl()
},
closeDrop(index) {
closeDrop (index) {
this.dropdownList.splice(index, 1)
},
checkEl() {
checkEl () {
const { tab, tabboxWidth } = this
const len = tab.length - 1
this.$nextTick(() => {
......@@ -145,7 +172,7 @@ export default {
})
},
backIndex() {
backIndex () {
this.windowId = -1
this.$refs['inStoreManageIndex']?.handleSearch()
}
......
......@@ -26,6 +26,9 @@
<auth-button category="Button" :show-btn-ids="['9120506']" />
<span class="tips_text">仅展示「深圳嘀加」服务商的驻店员工,以及「广联数科」商户下员工</span>
</span>
<span style="display: inline-block;margin-right: 10px;">
<auth-button category="Button" :show-btn-ids="['9120511']" />
</span>
<span style="display: inline-block;margin-right: 10px;">
<auth-button category="Button" :show-btn-ids="['9120504']" />
</span>
......@@ -35,7 +38,7 @@
<span style="display: inline-block;margin-right: 10px;">
<auth-button category="Button" :show-btn-ids="['9120502']" />
</span>
<!-- <auth-button category="Button" :show-btn-ids="['9120507']" /> -->
<auth-button category="Button" :show-btn-ids="['9120507']" />
</d2-table-header>
<d2-table ref="recordTable"
class="inStoreTable"
......@@ -63,7 +66,7 @@
@dialogClose="flagDialogClose" />
<!-- 创建员工 -->
<creat-staff-dialog :creat-staff-visible="creatStaffVisible" v-if="creatStaffVisible" @dialogClose="creatStaffDialogClose" />
<!-- 导出员工业绩 -->
<!-- 工资导入导出 -->
<export-performance-dialog :export-performance-visible="exportVisible" v-if="exportVisible" @handleDownloadTemplate="handleDownloadTemplate" @dialogClose="exportDialogClose" @handleExport="handleExport" @handleImport="handleImport" />
</div>
</template>
......@@ -416,7 +419,7 @@ export default {
this.creatStaffVisible = !this.creatStaffVisible
},
// 导出员工业绩
// 工资导入导出
handleExportPerformance() {
this.exportDialogClose()
},
......@@ -436,17 +439,17 @@ export default {
})
}
if (params.month) {
params.startMonth = Util.dateFormate(params.month, 'YYYY-MM')
params.endMonth = Util.dateFormate(params.month, 'YYYY-MM')
params.startMonth = Util.dateFormate(params.month[0], 'YYYY-MM')
params.endMonth = Util.dateFormate(params.month[1], 'YYYY-MM')
}
delete params.month
delete params.staffPhoneList
delete params.sceneType
params.method = 'dj.api.smartcarlife.staffCommission.exportAsync'
params.method = 'dj.api.smartcarlife.staffMonthSalary.staffSalary.exportAsync'
const list = [
...this.dowloadList,
{
name: '员工业绩列表',
name: '员工工资列表',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
......@@ -456,8 +459,12 @@ export default {
},
// 导入修订工资模板下载
handleDownloadTemplate(infoForm) {
var params = deepClone(infoForm)
handleDownloadTemplate() {
// 下载模板按员工传-1,月份随便传,用导出员工工资接口
var params = {
staffPhoneList: [-1],
month: new Date()
}
if (params.staffPhoneList?.length) {
params.staffPhoneList?.forEach((item, index) => {
const staffPhone = `staffPhones[${index}]`
......@@ -465,16 +472,16 @@ export default {
})
}
if (params.month) {
params.salaryMonth = Util.dateFormate(params.month, 'YYYY-MM')
params.startMonth = Util.dateFormate(params.month, 'YYYY-MM')
params.endMonth = Util.dateFormate(params.month, 'YYYY-MM')
}
delete params.month
delete params.staffPhoneList
delete params.sceneType
params.method = "dj.api.smartcarlife.staffMonthSalary.correctSalary.template.exportAsync"
params.method = "dj.api.smartcarlife.staffMonthSalary.staffSalary.exportAsync"
const list = [
...this.dowloadList,
{
name: "修订工资模板",
name: "导入更新模板",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
......@@ -582,6 +589,16 @@ export default {
handleHistoryPerformance(row) {
row.activeName = 'historyPerformance'
this.$emit("openWindow", row)
},
/**
* 考勤/工资申诉
*/
handleClockSalaryIndex(){
this.$emit("openWindow", {
pageId:'clockSalaryIndex',
componentName:'clockSalaryIndex',
title:'考勤/工资申诉'
})
}
}
}
......
......@@ -6,7 +6,7 @@
<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">
<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>
......
......@@ -229,7 +229,7 @@ export default {
item1?.children?.forEach((item2) => {
if (item[1] === item2?.categoryType) item2.disabled = true
item2?.children?.forEach((item3) => {
if (item[0] === item1?.categoryType) {
if (item[1] === item2?.categoryType) {
item3.disabled = true
}
})
......@@ -238,7 +238,7 @@ export default {
if (item.length === 3) {
if (item[0] === item1?.categoryType) item1.disabled = true
item1?.children?.forEach((item2) => {
if (item[0] === item1.categoryType) item2.disabled = true
if (item[1] === item2.categoryType) item2.disabled = true
item2?.children?.forEach(item3 => {
if (item[2] == item3?.categoryType) item3.disabled = true
})
......
......@@ -180,7 +180,8 @@ export default {
jobTypeName: '初级驻店',
configInfo: {
campusList: [],
customerList: []
customerList: [],
fixedList: []
}
},
{
......@@ -188,7 +189,8 @@ export default {
jobTypeName: '中级驻店',
configInfo: {
campusList: [],
customerList: []
customerList: [],
fixedList: []
}
},
{
......@@ -196,7 +198,8 @@ export default {
jobTypeName: '高级驻店',
configInfo: {
campusList: [],
customerList: []
customerList: [],
fixedList: []
}
}]
let brandIds = this.routerQuery?.brandIds || []
......@@ -358,10 +361,12 @@ export default {
if (item.configCarType == val.carType) {
val.performanceInfo?.forEach(v => {
if (v.jobType == item.jobType) {
if (item.performanceType != 5) {
v.configInfo.campusList.push(item)
} else {
if (item.performanceType == 5) {
v.configInfo.customerList.push(item)
} else if (item.performanceType == 6) {
v.configInfo.fixedList.push(item)
} else {
v.configInfo.campusList.push(item)
}
}
})
......@@ -618,6 +623,27 @@ export default {
})
})
})
// 处理固定提成
res?.forEach(item => {
item?.performanceInfo?.forEach(it => {
it?.configInfo?.fixedList?.forEach(v => {
configItemList.push({
jobType: it.jobType,
configCarType: item.carType,
goodsType: v.goodsType,
goodsTypeName: v.goodsTypeName,
secondaryGoodsType: v.secondaryGoodsType,
secondaryGoodsTypeName: v.secondaryGoodsTypeName,
thirdLevelGoodsType: v.thirdLevelGoodsType,
thirdLevelGoodsTypeName: v.thirdLevelGoodsTypeName,
performanceType: 6, // 绩效类型(1:渗透率,2:高产值,3:成交率,4:均客单,5:售后提成,6:固定提成)
startValue: v.startValue,
endValue: v.endValue,
calculateValue: v.calculateValue
})
})
})
})
// 再处理售后(为保证与后端数据顺序相同)
res?.forEach(item => {
item?.performanceInfo?.forEach(it => {
......@@ -721,7 +747,7 @@ export default {
let arr = []
this.carTypeData?.forEach(item => {
item.performanceInfo?.forEach(item2 => {
if (item2?.configInfo?.campusList?.length || item2?.configInfo?.customerList?.length) arr.push(item2)
if (item2?.configInfo?.campusList?.length || item2?.configInfo?.customerList?.length || item2?.configInfo?.fixedList?.length) arr.push(item2)
})
})
if (!arr.length) {
......
......@@ -32,7 +32,7 @@
</div>
<div class="operate-wrap">
<div class="title">操作记录</div>
<div class="operate-list" v-if="operateData.length>0">
<div class="operate-list" v-if="operateData.length > 0">
<div
v-for="(item, index) in operateData"
:key="index"
......@@ -45,7 +45,12 @@
}}</span>
<span class="result">通过</span>
</div>
<div :class="['content',operateData.length==index+1?'last':'']">
<div
:class="[
'content',
operateData.length == index + 1 ? 'last' : ''
]"
>
{{ item.staffName }}<span>{{ item.createdTime }}</span>
</div>
</div>
......@@ -55,8 +60,8 @@
</div>
</baseDialog>
</template>
<script>
<script>
import { Util, deepClone } from "@/common/util"
import { getRecordDetail, getOperateList } from "@api/verbal"
export default {
......@@ -133,7 +138,7 @@ export default {
},
{
title: "话术内容:",
key: "sourceContent",
key: "polishContent",
col: 24
}
],
......@@ -182,8 +187,8 @@ export default {
}
}
</script>
<style lang="scss" scoped>
<style lang="scss" scoped>
.form_div {
color: #333333;
padding: 20px 30px;
......@@ -265,7 +270,7 @@ export default {
margin-left: 16px;
}
}
.last{
.last {
border-left: 0px solid #e4e8ee;
}
}
......@@ -278,5 +283,3 @@ export default {
margin-top: 20px;
}
</style>
\ No newline at end of file
......@@ -301,6 +301,15 @@
</el-switch>
<span class="flag-text">查看订单商品成本</span>
</el-form-item>
<el-form-item label="捆绑轻改门店:">
<el-select v-model="form.bindMerchantId" remote reserve-keyword class="el_select itd"
placeholder="请选择" @visible-change="visibleChange" :remote-method="remoteMethod" clearable
v-el-select-loadmore="interestsLoadmore" filterable @change="bindMerchantChange">
<el-option v-for="item in upgradeMerchantList" :key="item.merchantId"
:label="item.merchantName" :value="item.merchantId" />
</el-select>
<span class="item-tips">注:单选1.1场景的门店,当前门店权益/延保录单后,会给客户赠送该门店1.1太阳膜礼券</span>
</el-form-item>
<!-- <el-form-item label="阳光激励费:" prop="sunlightIncentiveCost">
<div>
<span class="rateInput_s">精品升级</span>
......@@ -366,7 +375,7 @@ import {
findSellerMerchantStaffList,
getResidentStaffList
} from "@/api/shopConfig.js"
import { serviceGetMerchantList } from "@api/merchant"
import { serviceGetMerchantList, getList } from "@api/merchant"
import { findMerchantStaffList, merchantStaffByRoleList } from "@api/index"
import { businessNature, sceneForShop } from "@/common/constants.js"
......@@ -397,7 +406,8 @@ export default {
currentMonthOutputValue: "",
nextMonthOutputValue: "",
serviceMerchantServiceChargeConfig: {},
shopMerchantConfig: {}
shopMerchantConfig: {},
bindMerchantId: ''
// boutiqueSunshineInspiration: '',
// quotationSunshineInspiration: '',
// boutiqueMarketInspiration: '',
......@@ -455,6 +465,26 @@ export default {
serviceBossList: [],
storePersonList: [], // 盯防负责人列表
flySuperList: [], // 飞行督导列表
currentPage: 1,
upgradeMerchantList: []
}
},
directives: {
"el-select-loadmore": {
bind(el, binding) {
setTimeout(() => {
const SELECTWRAP_DOM = el.querySelector(
".el-select-dropdown .el-select-dropdown__wrap"
)
SELECTWRAP_DOM.addEventListener("scroll", function () {
const condition =
this.scrollHeight - this.scrollTop <= this.clientHeight
if (condition) {
binding.value()
}
})
}, 1000)
}
}
},
......@@ -524,6 +554,8 @@ export default {
}
})
res.costPrivacyShowFlag = res?.shopMerchantConfig?.costPrivacyShowFlag || ''
res.bindMerchantId = res?.shopMerchantConfig?.bindMerchantId || ''
res.bindMerchantName = res?.shopMerchantConfig?.bindMerchantName || ''
this.form = deepClone(res)
if (!this.form.serviceMerchantServiceChargeConfig) {
// 未设置过时,手续费默认为打开并且费率为2
......@@ -561,6 +593,11 @@ export default {
return item_new
})
}
const defaultSelect = res?.bindMerchantId ? [{ // 捆绑轻改门店 默认选中项 用于回显
merchantId: res?.bindMerchantId,
merchantName: res?.bindMerchantName
}] : []
this.getUpgradeMerchantList(defaultSelect)
resolve()
})
})
......@@ -790,6 +827,62 @@ export default {
}
},
remoteMethod(query) {
this.merchantNameKeyword = query
this.currentPage = 1
this.upgradeMerchantList = []
this.getUpgradeMerchantList() // 请求接口
},
visibleChange(data) {
// 获取焦点重新渲染下拉框数据
if (data) {
if (this.merchantNameKeyword) {
this.merchantNameKeyword = ""
this.currentPage = 1
this.upgradeMerchantList = []
this.getUpgradeMerchantList()
}
}
},
interestsLoadmore() {
setTimeout(() => {
this.currentPage = this.currentPage + 1
if (this.allPages < this.currentPage) {
this.currentPage = this.allPages
return
}
this.getUpgradeMerchantList()
}, 10)
},
// 获取1.1场景门店列表
getUpgradeMerchantList(defaultSelect) {
getList({merchantName: this.merchantNameKeyword, scene: 1, currentPage: this.currentPage, pageSize: 20}).then(res => {
this.allPages = res.pages
let arr = this.upgradeMerchantList.concat(res?.list || [])
if (defaultSelect?.length) arr = arr.concat(defaultSelect)
this.upgradeMerchantList = this.unique(arr)
})
.catch(() => { })
},
unique(arr) {
const res = new Map()
return arr.filter((a) => !res.has(a.merchantId) && res.set(a.merchantId, 1))
},
bindMerchantChange(e) {
console.log(e)
let name = this.upgradeMerchantList?.find(val => val.merchantId == e)?.merchantName
this.form = {
...this.form,
bindMerchantId: e,
bindMerchantName: name
}
},
/**
* 保存信息
*/
......@@ -912,6 +1005,7 @@ export default {
// _params.quotationMarketInspiration =
// shopMerchantConfig.quotationMarketInspiration
console.log(_params)
if (!_params.bindMerchantId) _params.bindMerchantName = ''
shopSetting({ dataString: JSON.stringify(_params) }).then((res) => {
this.notice.okTips()
this.handleCancel()
......
......@@ -8862,6 +8862,11 @@ pretty@2.0.0:
extend-shallow "^2.0.1"
js-beautify "^1.6.12"
print-js@^1.6.0:
version "1.6.0"
resolved "https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz#692b046cf31992b46afa6c6d8a9db1c69d431d1f"
integrity sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg==
printj@~1.1.0:
version "1.1.2"
resolved "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!