Commit b7fc0b53 by zhangxw

驻店管理/驻店工资绩效二月份需求开发

1 parent be1cfe38
...@@ -440,3 +440,45 @@ export function listGoodsType(data = {}) { ...@@ -440,3 +440,45 @@ export function listGoodsType(data = {}) {
data.method = 'dj.api.smartcarlife.staff.incomeCalculation.listGoodsType' data.method = 'dj.api.smartcarlife.staff.incomeCalculation.listGoodsType'
return request(data, 'post') return request(data, 'post')
} }
// 复制绩效方案
export function copyPerformanceApi(data) {
data.method = `${path2}merchantPerformanceConfig.copyConfig`
return request(data, 'post')
}
// 获取员工是否是可查看工资白名单
export function staffWhiteListFlagApi(data) {
data.method = `${path2}staffBaseInfo.whiteList.select`
return request(data, 'post')
}
// 根据员工手机号获取员工所在园区店
export function yqMerchantListByStaffPhoneApi(data) {
data.method = `${path2}staffBaseInfo.yqMerchantInfo.list`
return request(data, 'post')
}
// 根据园区店商户号获取1.1和2.1场景下4S店列表
export function merchantListByYqMerchantApi(data) {
data.method = `${path2}scene.shopMerchant.list`
return request(data, 'post')
}
// 员工调店分配新增
export function addStaffDailyReportConfigApi(data) {
data.method = `${path2}staffDailyReportConfig.add`
return request(data, 'post')
}
// 员工调店分配配置修改
export function updateStaffDailyReportConfigApi(data) {
data.method = `${path2}staffDailyReportConfig.update`
return request(data, 'post')
}
// 员工调店分配配置删除
export function deleteStaffDailyReportConfigApi(data) {
data.method = `${path2}staffDailyReportConfig.delete`
return request(data, 'post')
}
\ No newline at end of file \ No newline at end of file
...@@ -175,7 +175,7 @@ export const routerName = { ...@@ -175,7 +175,7 @@ export const routerName = {
{ {
authId: "9120510", authId: "9120510",
parentId: "91205", parentId: "91205",
label: "工资明细", label: "提成构成",
handle: "handleSalaryDetail" handle: "handleSalaryDetail"
} }
], ],
...@@ -708,6 +708,14 @@ export const routerName = { ...@@ -708,6 +708,14 @@ export const routerName = {
type: "primary", type: "primary",
handle: "handleImport" handle: "handleImport"
}, },
{
authId: "9121211",
parentId: "91212",
label: "复制绩效方案",
category: "Button",
type: "primary",
handle: "handleCopyConfig"
}
], ],
component: _import("residentManage/salaryPerformance/index") component: _import("residentManage/salaryPerformance/index")
}, },
......
...@@ -144,7 +144,7 @@ export default { ...@@ -144,7 +144,7 @@ export default {
suffixSlot: 'syncUnit' suffixSlot: 'syncUnit'
}, },
{ {
label: '适配业务', label: '业务标签',
name: 'staffSceneLabel', name: 'staffSceneLabel',
addHtml: 'staffSceneLabel' addHtml: 'staffSceneLabel'
}, },
......
...@@ -129,7 +129,7 @@ export default { ...@@ -129,7 +129,7 @@ export default {
], ],
customDeduction: [ customDeduction: [
{ required: false, message: '', trigger: 'blur' }, { required: false, message: '', trigger: 'blur' },
{ validator: validateCustomDeduction, trigger: ['blur', 'change']} { validator: validateCustomDeduction, trigger: ['blur']}
], ],
remark: [ remark: [
{ required: true, message: '请输入备注', trigger: 'blur' } { required: true, message: '请输入备注', trigger: 'blur' }
...@@ -170,6 +170,24 @@ export default { ...@@ -170,6 +170,24 @@ export default {
this.$set(this.infoForm, key, limitPrice(e, oldValue, maxlength, 2)) this.$set(this.infoForm, key, limitPrice(e, oldValue, maxlength, 2))
this.$set(this.infoForm, 'old' + key, this.infoForm[key]) this.$set(this.infoForm, 'old' + key, this.infoForm[key])
} }
// 清除与输入框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']},` : ''
let existingText = this.infoForm.remark
.replace(/退单冲减[^,]*/g, '')
.replace(/正负冲减[^,]*/g, '')
.trim()
// 添加新的输入框内容
if (refundOffsetText) {
existingText += refundOffsetText
}
if (customDeductionText) {
existingText += customDeductionText
}
// 更新备注的内容
this.infoForm.remark = existingText
}, },
limitPriceForNegative(newValue) { limitPriceForNegative(newValue) {
// 用来检索整数且不超过6位数 // 用来检索整数且不超过6位数
...@@ -217,6 +235,7 @@ export default { ...@@ -217,6 +235,7 @@ export default {
remark: this.infoForm.remark remark: this.infoForm.remark
} }
if (this.computedValue - 0 < 0) return this.$message.warning('实发工资不能小于0') if (this.computedValue - 0 < 0) return this.$message.warning('实发工资不能小于0')
if (isNaN(params.customDeduction)) return this.$message.warning('正负冲减值需为数字')
reviseSalaryApi(params).then(res => { reviseSalaryApi(params).then(res => {
this.$message.success('修订成功') this.$message.success('修订成功')
this.$emit('dialogClose', { flag: true, attrName: 'revisedSalaryVisible' }) this.$emit('dialogClose', { flag: true, attrName: 'revisedSalaryVisible' })
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<baseDialog :dialog-config="dialogConfig" :is-show.sync="visible" <baseDialog :dialog-config="dialogConfig" :is-show.sync="visible"
@handleClick="handleAddConfirm"> @handleClick="handleAddConfirm">
<div class="dialog-content"> <div class="dialog-content">
<d2-table :hasPage="false" :hasNum="false" <!-- <d2-table :hasPage="false" :hasNum="false"
:tableData="salaryList" :tableData="salaryList"
:table-params="salaryTableParams"> :table-params="salaryTableParams">
<template slot="deferredIncluded" slot-scope="scope"> <template slot="deferredIncluded" slot-scope="scope">
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<span>{{ `¥${scope.scope.deferIncome}` }}</span> <span>{{ `¥${scope.scope.deferIncome}` }}</span>
</el-tooltip> </el-tooltip>
</template> </template>
</d2-table> </d2-table> -->
<div class="header" v-if="detailInfo.clockingInOpenFlag == 'Y'"> <div class="header" v-if="detailInfo.clockingInOpenFlag == 'Y'">
员工本月应出勤天数{{ detailInfo.shouldWorkDay }}天,实际出勤天数{{ detailInfo.actualWorkDay }}天,基本工资收入=&nbsp; 员工本月应出勤天数{{ detailInfo.shouldWorkDay }}天,实际出勤天数{{ detailInfo.actualWorkDay }}天,基本工资收入=&nbsp;
<span>{{ detailInfo.basicSalary }}元</span>&nbsp;÷&nbsp; <span>{{ detailInfo.basicSalary }}元</span>&nbsp;÷&nbsp;
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<span>{{ subItem.merchantId }}</span> <span>{{ subItem.merchantId }}</span>
<span class="car-text" v-if="subItem.configCarType">{{ subItem.configCarType ==1 ? '单问界' : '其他车系' }}</span> <span class="car-text" v-if="subItem.configCarType">{{ subItem.configCarType ==1 ? '单问界' : '其他车系' }}</span>
</div> </div>
<div>门店总提成金额<span class="price-text">{{ (commissionPrice = [1, 2].includes(subItem.configType) ? subItem.grCommissionPrice : subItem.goodsCommissionPrice) || '-' }}元</span></div> <div>门店总提成金额<span class="price-text">{{ (commissionPrice = [2].includes(subItem.configType) ? subItem.grCommissionPrice : subItem.goodsCommissionPrice) || '-' }}元</span></div>
</div> </div>
<div class="content-item-body"> <div class="content-item-body">
<div class="left-line" :style="{ 'height': subItem.allocationDetailList.length ? (48 * (subItem.allocationDetailList.length) + 63) + 'px' : '117px'}"> <div class="left-line" :style="{ 'height': subItem.allocationDetailList.length ? (48 * (subItem.allocationDetailList.length) + 63) + 'px' : '117px'}">
...@@ -195,8 +195,8 @@ export default { ...@@ -195,8 +195,8 @@ export default {
prop: '', prop: '',
width: 100, width: 100,
formatter: (row) => { formatter: (row) => {
// allocationType:5售后 6非售后 售后比例为calculateValue系数默认为1 // allocationType:(5售后 新类型社招轻改7 比例取值calculateValue 无系数) (6非售后 比例取值outputCommissionRatio 系数取值calculateValue)
return row.allocationType == 6 ? `${!isEmpty(row.outputCommissionRatio) ? row.outputCommissionRatio : '-'}%×${row.calculateValue}` : row.allocationType == 5 ? `${row.calculateValue}%×1` : '-' return row.allocationType == 6 ? `${!isEmpty(row.outputCommissionRatio) ? row.outputCommissionRatio : '-'}%×${row.calculateValue}` : row.allocationType == 5 || row.allocationType == 7 ? `${row.calculateValue}%` : '-'
} }
}, },
{ {
...@@ -256,19 +256,19 @@ export default { ...@@ -256,19 +256,19 @@ export default {
data: res?.detailList[key] data: res?.detailList[key]
} }
}) })
const { actualBasicSalary, minimumSalary, mentorCommission, merchantCommission, padDeductMoney, dailyDeductMoney, refundOffset, deferExpenses, deferIncome, correctSalary } = res || {} // const { actualBasicSalary, minimumSalary, mentorCommission, merchantCommission, padDeductMoney, dailyDeductMoney, refundOffset, deferExpenses, deferIncome, correctSalary } = res || {}
this.salaryList = [{ // this.salaryList = [{
actualBasicSalary, // actualBasicSalary,
minimumSalary, // minimumSalary,
mentorCommission, // mentorCommission,
merchantCommission, // merchantCommission,
padDeductMoney, // padDeductMoney,
dailyDeductMoney, // dailyDeductMoney,
refundOffset, // refundOffset,
deferExpenses, // deferExpenses,
deferIncome, // deferIncome,
correctSalary // correctSalary
}] // }]
for (var j = 0; j < detailArray?.length; j++) { for (var j = 0; j < detailArray?.length; j++) {
const seen = new Set() const seen = new Set()
detailArray[j].data = detailArray[j]?.data?.map(item => { detailArray[j].data = detailArray[j]?.data?.map(item => {
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<span style="display: inline-block;margin-right: 10px;"> <span style="display: inline-block;margin-right: 10px;">
<auth-button category="Button" :show-btn-ids="['9120502']" /> <auth-button category="Button" :show-btn-ids="['9120502']" />
</span> </span>
<auth-button category="Button" :show-btn-ids="['9120507']" /> <!-- <auth-button category="Button" :show-btn-ids="['9120507']" /> -->
</d2-table-header> </d2-table-header>
<d2-table ref="recordTable" <d2-table ref="recordTable"
:get-list-api="getListApi" :get-list-api="getListApi"
...@@ -177,8 +177,8 @@ export default { ...@@ -177,8 +177,8 @@ export default {
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list", listName: "list",
// tableOption: { width: '200px' }, tableOption: { width: '130px' },
tableOption: true, // tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: "姓名", label: "姓名",
...@@ -255,6 +255,13 @@ export default { ...@@ -255,6 +255,13 @@ export default {
} }
}, },
{ {
label: "更新时间",
prop: "updatedDate",
formatter: (cellValue) => {
return cellValue.updatedDate ? Util.dateFormate(cellValue.updatedDate, 'YYYY-MM-DD') : '-'
}
},
{
label: "状态", label: "状态",
prop: "workingStatus", prop: "workingStatus",
width: "120px", width: "120px",
...@@ -271,7 +278,16 @@ export default { ...@@ -271,7 +278,16 @@ export default {
] ]
}, },
baseData: { baseData: {
staffSceneLabelList: deepClone(staffSceneLabelList), staffSceneLabelList: [{
confId: 1,
confValue: '轻改'
}, {
confId: 2,
confValue: '权益'
}, {
confId: 3,
confValue: '延保'
}],
shopMerchantIdList: [], shopMerchantIdList: [],
hireTypeList: [ hireTypeList: [
{ confId: '1', confValue: '校招管培生' }, { confId: '1', confValue: '校招管培生' },
......
<!-- 复制绩效方案弹窗 -->
<template>
<div>
<d2-dialog title="复制绩效方案"
:is-visible.sync="copyPerformanceVisible"
width="70%"
btn-ok-label="确定"
@confirmDialog="handleConfirm"
@closeDialog="handleCancel"
class="carSeries">
<slot />
<el-row class="tableCon">
<div class="tableBox">
<el-table ref="seletingTable"
:data="selectingData"
height="320px"
class="table"
border
@select="handleChange"
@select-all="handleAll">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号"
align="center"
type="index"
width="55" />
<el-table-column
prop="merchantName"
label="门店名称"
:show-overflow-tooltip="true"
align="center">
</el-table-column>
<el-table-column
prop="merchantId"
label="商户号"
:show-overflow-tooltip="true"
align="center">
</el-table-column>
</el-table>
<el-pagination small
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-size="pageSize"
layout="total, prev, pager, next"
:total="total" />
</div>
<div class="selectedBox">
<div class="title">
<div class="title_txt">已选</div>
<div class="title_btn" @click="clearSelect">清空</div>
</div>
<div class="content">
<div class="item" v-for="(subItem, subIdx) in selectedData" :key="subIdx">
<div class="item_txt"><span>{{ `${subItem.merchantName}${subItem.merchantId}` }}</span></div>
<div class="del_item" @click="delItem(subItem)"><i class="el-icon-error"></i></div>
</div>
</div>
</div>
</el-row>
</d2-dialog>
</div>
</template>
<script>
import { deepClone } from '@/common/util'
export default {
name: 'CarSeriesDialog',
data() {
return {
selectedData: [],
selectingData: [],
// 分页
total: 0,
currentPage: 1,
pageSize: 10,
curId: '',
isVisible: false
}
},
props: {
copyPerformanceVisible: {
type: Boolean,
default: false
},
performanceMerchantApi: {
type: Function,
default: () => { }
},
performanceMerchantSearchForm: {
type: Object,
default: () => { }
}
},
mounted() {
this.getSelectingList()
},
methods: {
getSelectingList() {
let params = deepClone(this.performanceMerchantSearchForm)
this.performanceMerchantApi({
...params,
currentPage: this.currentPage,
pageSize: this.pageSize
}).then(res => {
this.selectingData = res.list || []
this.total = res.total
this.$nextTick(() => {
this.recoverySelection()
})
})
},
recoverySelection() {
var exitIds = this.selectedData.map((item) => item.merchantId)
this.selectingData.forEach((item) => {
exitIds.includes(item.merchantId) &&
this.$refs.seletingTable.toggleRowSelection(item, true)
})
},
handleChange(selection, row) {
var addOrDelete = !!selection.find(
(item) => item.merchantId === row.merchantId
)
addOrDelete
? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter(
(item) => item.merchantId !== row.merchantId
))
},
handleAll(selection) {
this.selectingData.forEach((item) => {
var isExit = this.selectedData.findIndex(
(subItem) => subItem.merchantId === item.merchantId
)
if (selection.length && isExit === -1) {
this.selectedData.push(item)
} else if (!selection.length && isExit !== -1) {
this.selectedData.splice(isExit, 1)
}
})
},
clearSelect() {
this.selectedData = []
this.$refs.seletingTable.clearSelection()
},
delItem(row) {
this.selectedData = this.selectedData.filter(item => item.merchantId !== row.merchantId)
const obj = this.selectingData.find(v => v.merchantId == row.merchantId)
if (obj) this.$refs.seletingTable.toggleRowSelection(obj)
},
handleCurrentChange(val) {
this.currentPage = val
this.getSelectingList()
},
handleConfirm() {
if (!this.selectedData?.length) return this.$message.warning('请选择门店')
if (this.selectedData?.length > 10) return this.$message.warning('最多选择十家门店')
this.$emit('handleConfirm', this.selectedData)
},
handleCancel() {
this.$emit('handleCancel')
}
}
}
</script>
<style lang="scss" scoped>
.carSeries .table {
margin: 0 auto 20px !important;
width: 100%;
}
.carSeries .tableCon {
margin-top: 20px;
display: flex;
.tableBox {
flex: 2;
}
.selectedBox{
flex: 1;
height: 320px;
border: 1px solid #E5E5E5;
margin-left: 10px;
.title{
height: 38px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 8px 0 16px;
border-bottom: 1px solid #E5E5E5;
.title_txt{
font-size: 16px;
font-weight: 600;
color: #333333;
}
.title_btn{
cursor: pointer;
font-size: 14px;
color: #185EFE;
}
}
.content{
padding: 16px 10px;
height: calc(100% - 75px);
overflow-y: scroll;
.item{
display: flex;
align-items: center;
justify-content: space-between;
height: 32px;
color: #666666;
padding: 0 8px;
.del_item{
cursor: pointer;
}
}
.item:hover{
background: #F6F9FF;
}
}
}
}
.service-service .carSeries .el-table .cell,
.d2-form .carSeries .el-table .cell {
line-height: 26px !important;
}
.service-service .carSeries .el-table--medium td,
.d2-form .carSeries .el-table--medium td {
padding: 6px 8px !important;
}
.carSeries .red {
color: red;
}
.carSeries .tip-icon {
position: absolute;
display: inline-block;
height: 10px;
width: 10px;
line-height: 10px;
color: #ffffff;
background-color: red;
border: 1px solid red;
border-radius: 50%;
cursor: pointer;
font-size: 6px;
margin-left: 2px;
}
.text_hide{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .text_hide p{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin: 0;
}
::v-deep .el-radio__original {
display: none !important;
}
::v-deep .el-radio:focus:not(.is-focus):not(:active):not(.is-disabled)
.el-radio__inner {
box-shadow: none !important;
}
</style>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<span style="display: inline-block"> <!-- <span style="display: inline-block">
<auth-button category="Button" <auth-button category="Button"
style="display: inline-block" style="display: inline-block"
:show-btn-ids="['9121210']" /> :show-btn-ids="['9121210']" />
...@@ -32,6 +32,11 @@ ...@@ -32,6 +32,11 @@
<auth-button category="Button" <auth-button category="Button"
style="display: inline-block" style="display: inline-block"
:show-btn-ids="['9121205']" /> :show-btn-ids="['9121205']" />
</span> -->
<span style="display: inline-block;">
<auth-button category="Button"
style="display: inline-block"
:show-btn-ids="['9121211']" />
</span> </span>
</d2-table-header> </d2-table-header>
<d2-table ref="performanceTable" <d2-table ref="performanceTable"
...@@ -68,15 +73,41 @@ ...@@ -68,15 +73,41 @@
</div> </div>
</d2-table> </d2-table>
</div> </div>
<copy-performance-dialog
ref="copyPerformance"
v-if="copyPerformanceVisible"
:copy-performance-visible="copyPerformanceVisible"
:performance-merchant-api="getListApi"
:performance-merchant-search-form="performanceMerchantSearchForm"
@handleConfirm="handleConfirm"
@handleCancel="handleCancel">
<el-row slot>
<el-form :model="performanceMerchantSearchForm" ref="relate" :inline="true">
<el-form-item label="门店名称:">
<el-input v-model.trim="performanceMerchantSearchForm.merchantName" placeholder="门店名称"
clearable />
</el-form-item>
<el-form-item label="商户号:">
<el-input v-model.trim="performanceMerchantSearchForm.merchantId" placeholder="商户号"
clearable />
</el-form-item>
<el-button type="primary" @click="handleDialogSearch">搜索</el-button>
</el-form>
</el-row>
</copy-performance-dialog>
</d2-container> </d2-container>
</template> </template>
<script> <script>
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
import { getStoreSalaryListApi, editStoreSalaryStatusApi, deleteStoreSalaryApi } from '@api/resident' import { getStoreSalaryListApi, editStoreSalaryStatusApi, deleteStoreSalaryApi, copyPerformanceApi } from '@api/resident'
import { getCarBrandList } from "@api/commodity.js" import { getCarBrandList } from "@api/commodity.js"
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import copyPerformanceDialog from './copyPerformanceDialog.vue'
export default { export default {
name: "PerformanceList", name: "PerformanceList",
components: {
copyPerformanceDialog
},
data() { data() {
return { return {
getListApi: getStoreSalaryListApi, getListApi: getStoreSalaryListApi,
...@@ -120,7 +151,8 @@ export default { ...@@ -120,7 +151,8 @@ export default {
// 表格参数 // 表格参数
tableParams: { tableParams: {
needUnique: true, needUnique: true,
mutiSelectUniqueKey: 'uniqueVal', mutiSelectUniqueKey: 'id',
mutiSelectName: 'performanceIndex',
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: 'list',
tableOption: { tableOption: {
...@@ -206,7 +238,13 @@ export default { ...@@ -206,7 +238,13 @@ export default {
confLabel: '社会招聘' confLabel: '社会招聘'
}], }],
brandList: [] brandList: []
} },
performanceMerchantSearchForm: {
merchantName: '',
maerchantId: ''
},
copyPerformanceVisible: false,
copySelectedData: {}
} }
}, },
computed: { computed: {
...@@ -269,6 +307,33 @@ export default { ...@@ -269,6 +307,33 @@ export default {
} }
}) })
}, },
// 复制绩效方案
handleCopyConfig() {
var selectedData = []
if (this.$refs.performanceTable.mutiSelectArr.performanceIndex) {
selectedData = this.$refs.performanceTable.mutiSelectArr.performanceIndex
}
if (!selectedData?.length) return this.$message.warning('请选择要复制绩效方案的门店')
if (selectedData?.length > 1) return this.$message.warning('仅支持选择一个门店')
this.copyPerformanceVisible = true
this.copySelectedData = selectedData[0]
},
handleDialogSearch() {
this.$refs.copyPerformance.handleCurrentChange(1)
},
handleConfirm(data) {
copyPerformanceApi({
merchantId: this.copySelectedData?.merchantId,
targetMerchantList: data?.map(v => v.merchantId)
}).then(res => {
this.notice.okTips()
this.handleCancel()
this.$refs.performanceTable.refreshTable()
})
},
handleCancel() {
this.copyPerformanceVisible = false
},
// 导入绩效 // 导入绩效
handleImport() { handleImport() {
this.$alert('敬请期待', '提示', { this.$alert('敬请期待', '提示', {
......
...@@ -4,19 +4,20 @@ ...@@ -4,19 +4,20 @@
<el-tabs type="card" class="tabs_content" v-model="defaultActiveName"> <el-tabs type="card" class="tabs_content" v-model="defaultActiveName">
<el-tab-pane v-for="(subItem, subIndex) in levelData" :key="subItem.jobType" :name="subItem.jobType"> <el-tab-pane v-for="(subItem, subIndex) in levelData" :key="subItem.jobType" :name="subItem.jobType">
<span slot="label"><i v-if="subItem.validateErrFlag" class="el-icon-warning car-error-txt"></i>{{ subItem.jobTypeName }}</span> <span slot="label"><i v-if="subItem.validateErrFlag" class="el-icon-warning car-error-txt"></i>{{ subItem.jobTypeName }}</span>
<el-button class="copy_btn" type="primary" size="small" plain @click="copyConfig">复制该配置到{{ defaultActiveName == 4 ? '初级驻店' : jobTypeList[Number(defaultActiveName) + 1] }}</el-button>
<el-form :model="subItem.configInfo" :rules="rules" :ref="`configForm_${subIndex}`"> <el-form :model="subItem.configInfo" :rules="rules" :ref="`configForm_${subIndex}`">
<el-form-item :prop="`campusList`" label-width="0" > <el-form-item :prop="`campusList`" label-width="0" >
<div class="config-table"> <div class="config-table">
<el-button class="copy_btn" type="primary" size="small" plain @click="copyConfig">复制该配置到{{ defaultActiveName == 4 ? '初级驻店' : jobTypeList[Number(defaultActiveName) + 1] }}</el-button>
<template> <template>
<el-table :data="subItem.configInfo.campusList" :header-cell-style="rowClass"> <el-table :data="subItem.configInfo.campusList" :header-cell-style="rowClass">
<el-table-column label="序号" type="index" width="50"></el-table-column> <el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column prop="productType" label="产品名称" min-width="175"> <el-table-column prop="productType" label="产品名称" min-width="175">
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item :prop="`campusList[${scope.$index}].productType`" :rules="rules.productType" label-width="0"> <el-form-item :prop="`campusList[${scope.$index}].productType`" :rules="rules.productType" label-width="0">
<el-cascader style="width: 160px" :options="productGoodsTypeList" filterable <el-cascader style="width: 160px" :options="scope.row.productTypeFocus ? productGoodsTypeList : baseData.goodsTypeList" filterable
v-model="scope.row['productType']" v-model="scope.row['productType']"
@change="changeGoodsType($event, subIndex, scope.$index, 'productType')" aria-hidden="false" @change="changeGoodsType($event, subIndex, scope.$index, 'productType')" aria-hidden="false"
@visible-change="handleVisibleChange($event, subIndex, scope.$index, 'productType')"
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }" :show-all-levels="false"> :props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }" :show-all-levels="false">
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
...@@ -67,8 +68,9 @@ ...@@ -67,8 +68,9 @@
<template slot-scope="scope" v-if="scope.row['conditionFlag']"> <template slot-scope="scope" v-if="scope.row['conditionFlag']">
且 且
<el-form-item :prop="`campusList[${scope.$index}].conditionProductType`" :rules="rules.conditionProductType" label-width="0"> <el-form-item :prop="`campusList[${scope.$index}].conditionProductType`" :rules="rules.conditionProductType" label-width="0">
<el-cascader style="width: 160px" :options="conditionProductGoodsTypeList" filterable v-model="scope.row['conditionProductType']" <el-cascader style="width: 160px" :options="scope.row.conditionProductTypeFocus ? conditionProductGoodsTypeList : baseData.goodsTypeList" filterable v-model="scope.row['conditionProductType']"
@change="changeGoodsType($event, subIndex, scope.$index, 'conditionProductType')" aria-hidden="false" @change="changeGoodsType($event, subIndex, scope.$index, 'conditionProductType')" aria-hidden="false"
@visible-change="handleVisibleChange($event, subIndex, scope.$index, 'conditionProductType')"
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }" :show-all-levels="false"> :props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }" :show-all-levels="false">
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
...@@ -108,9 +110,9 @@ ...@@ -108,9 +110,9 @@
<template slot-scope="scope"> <template slot-scope="scope">
产品名称为 产品名称为
<el-form-item :prop="`customerList[${scope.$index}].productType`" :rules="rules.productType" label-width="0"> <el-form-item :prop="`customerList[${scope.$index}].productType`" :rules="rules.productType" label-width="0">
<el-cascader style="width: 160px" :options="customerGoodsTypeList" filterable v-model="scope.row['productType']" <el-cascader style="width: 160px" :options="scope.row.focusFlag ? customerGoodsTypeList : baseData.goodsTypeList" filterable v-model="scope.row['productType']"
@change="changeGoodsType($event, subIndex, scope.$index, 'productType', 'customerList')" aria-hidden="false" @change="changeGoodsType($event, subIndex, scope.$index, 'productType', 'customerList')" aria-hidden="false"
@focus="handleFocus('customer')" @visible-change="handleVisibleChange($event, subIndex, scope.$index, 'cusProductType')"
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }" :show-all-levels="false"> :props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }" :show-all-levels="false">
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
...@@ -258,6 +260,13 @@ export default { ...@@ -258,6 +260,13 @@ export default {
isEmpty(data) { isEmpty(data) {
return (data ?? '') === '' return (data ?? '') === ''
}, },
handleVisibleChange(e, index, subIdx, key) {
if (key == 'productType' || key == 'conditionProductType') {
this.$set(this.levelData[index]?.configInfo?.campusList[subIdx], `${key}Focus`, e)
} else {
this.$set(this.levelData[index]?.configInfo?.customerList[subIdx], 'focusFlag', e)
}
},
initGoodsTypeList() { initGoodsTypeList() {
let goodsTypeList = deepClone(this.baseData.goodsTypeList) let goodsTypeList = deepClone(this.baseData.goodsTypeList)
// 初始化disabled值 // 初始化disabled值
...@@ -316,9 +325,6 @@ export default { ...@@ -316,9 +325,6 @@ export default {
rowClass({ row, rowIndex }) { rowClass({ row, rowIndex }) {
return 'background:#F2F4F7;color:#333333;font-size:14px;font-weight:600;' return 'background:#F2F4F7;color:#333333;font-size:14px;font-weight:600;'
}, },
handleFocus(key) {
this.foucsGoodsType = key
},
addRow(subIndex) { addRow(subIndex) {
if (this.levelData[subIndex].configInfo.campusList.length >= 50) return if (this.levelData[subIndex].configInfo.campusList.length >= 50) return
let obj = { let obj = {
...@@ -425,7 +431,7 @@ export default { ...@@ -425,7 +431,7 @@ export default {
if (this.defaultActiveName == 4) { if (this.defaultActiveName == 4) {
this.$set(this.levelData[0].configInfo, 'campusList', deepClone(this.levelData[_index].configInfo.campusList)) this.$set(this.levelData[0].configInfo, 'campusList', deepClone(this.levelData[_index].configInfo.campusList))
this.$set(this.levelData[0].configInfo, 'customerList', deepClone(this.levelData[_index].configInfo.customerList)) this.$set(this.levelData[0].configInfo, 'customerList', deepClone(this.levelData[_index].configInfo.customerList))
this.$refs[`configForm_${_index}`]?.[0]?.clearValidate() this.$refs[`configForm_${0}`]?.[0]?.clearValidate()
} else { } else {
this.$set(this.levelData[_index + 1].configInfo, 'campusList', deepClone(this.levelData[_index].configInfo.campusList)) this.$set(this.levelData[_index + 1].configInfo, 'campusList', deepClone(this.levelData[_index].configInfo.campusList))
this.$set(this.levelData[_index + 1].configInfo, 'customerList', deepClone(this.levelData[_index].configInfo.customerList)) this.$set(this.levelData[_index + 1].configInfo, 'customerList', deepClone(this.levelData[_index].configInfo.customerList))
...@@ -561,13 +567,13 @@ export default { ...@@ -561,13 +567,13 @@ export default {
.add_btn{ .add_btn{
margin-top: 10px; margin-top: 10px;
} }
}
.copy_btn{ .copy_btn{
position: absolute; position: absolute;
top: 10px; transform: translate(0, -55px);
right: 20px; right: 0;
z-index: 2; z-index: 2;
} }
}
::v-deep.config-table { ::v-deep.config-table {
.el-table .cell { .el-table .cell {
padding: 0 10px; padding: 0 10px;
...@@ -597,4 +603,7 @@ export default { ...@@ -597,4 +603,7 @@ export default {
} }
} }
} }
::v-deep .el-tabs__content{
overflow: visible;
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -152,6 +152,13 @@ export default { ...@@ -152,6 +152,13 @@ export default {
type: "datePicker", type: "datePicker",
isClear: true, isClear: true,
pickerOptions: "rangePickerOptions" pickerOptions: "rangePickerOptions"
},
{
label: "支付时间",
name: "payTime",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
} }
], ],
getListApi: getList, getListApi: getList,
...@@ -166,6 +173,16 @@ export default { ...@@ -166,6 +173,16 @@ export default {
width: "160px" width: "160px"
}, },
{ {
label: "创建时间",
prop: "createdTime",
width: '150px'
},
{
label: "支付时间",
prop: "payTime",
width: '150px'
},
{
label: "客户姓名", label: "客户姓名",
prop: "customerName", prop: "customerName",
width: "250px" width: "250px"
...@@ -431,12 +448,24 @@ export default { ...@@ -431,12 +448,24 @@ export default {
.replace(/\//g, "-") + " 23:59:59" .replace(/\//g, "-") + " 23:59:59"
} }
delete params.createTime delete params.createTime
if (this.searchForm.payTime?.length) {
params.minPayTime =
new Date(this.searchForm.payTime[0])
.toLocaleDateString()
.replace(/\//g, "-") + " 00:00:00"
params.maxPayTime =
new Date(this.searchForm.payTime[1])
.toLocaleDateString()
.replace(/\//g, "-") + " 23:59:59"
}
delete params.payTime
return params return params
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = this.getParams() this.searchFormSearch = this.getParams()
delete this.searchFormSearch.createTime delete this.searchFormSearch.createTime
delete this.searchFormSearch.payTime
resolve() resolve()
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!