Commit e6de0647 by 前端

Merge branch 'SAAS+V4.54.0-0630' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.54.0-0630
2 parents a7e086ee da03f99b
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<el-form-item label-width="120px" label="类型:" prop="type"> <el-form-item label-width="120px" label="类型:" prop="type">
<el-radio-group :disabled="disabledFn" v-model="formData.contentType" @change="changeFileType()"> <el-radio-group :disabled="disabledFn" v-model="formData.contentType" @change="changeFileType()">
<el-radio v-for="(item, index) in contentTypeList" :key="index" :label="item.value">{{ item.label <el-radio v-for="(item, index) in contentTypeList" :key="index" :label="item.value">{{ item.label
}}</el-radio> }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<!-- 学习任务 --> <!-- 学习任务 -->
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
<div> <div>
<span class="empTypeBtn" <span class="empTypeBtn"
:class="[item.selectStaffValue.length ? 'select' : '', activeBtnIndex == item.selectStaffType ? 'activeBtn' : '']" :class="[item.selectStaffValue.length ? 'select' : '', activeBtnIndex == item.selectStaffType ? 'activeBtn' : '']"
v-for="(item, index) in empTypeList" :key="index" effect="dark" v-for="(item, index) in empTypeListFilter" :key="index" effect="dark"
@click="activeBtnIndex = item.selectStaffType"> @click="activeBtnIndex = item.selectStaffType">
{{ item.label }} {{ item.label }}
</span> </span>
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
<span class="radio-box empTypeBtn" @click="addEmp">选择标签</span> <span class="radio-box empTypeBtn" @click="addEmp">选择标签</span>
<div v-loading="customerLoading"> <div v-loading="customerLoading">
<div class="customer-box m-t-10"> <div class="customer-box m-t-10">
<div class="itemLabel" v-for="(item, iemSubIdx) in empTypeList" :key="iemSubIdx"> <div class="itemLabel" v-for="(item, iemSubIdx) in empTypeListFilter" :key="iemSubIdx">
<span v-if="item.selectStaffValue.length"> <span v-if="item.selectStaffValue.length">
{{ item.label }} {{ item.label }}
<div class="el-input-tag input-tag-wrapper"> <div class="el-input-tag input-tag-wrapper">
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
<span v-if="item.selectStaffType == 1">{{ subItem.labelGroup.name }}:{{ k.name }}{{ <span v-if="item.selectStaffType == 1">{{ subItem.labelGroup.name }}:{{ k.name }}{{
k.tagName ? ':' + k.tagName : '' }}</span> k.tagName ? ':' + k.tagName : '' }}</span>
<span v-else>{{ subItem.name || subItem.labelGroup.name }}:{{ k.name || k.tagName <span v-else>{{ subItem.name || subItem.labelGroup.name }}:{{ k.name || k.tagName
}}</span> }}</span>
</el-tag> </el-tag>
</div> </div>
</span> </span>
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
<div class="publish-channel-form"> <div class="publish-channel-form">
<div class="title"> <div class="title">
<div class="line"></div> <div class="line"></div>
<span>群送设置</span> <span>群发设置</span>
</div> </div>
<div class="publish-info"> <div class="publish-info">
<el-form :model="formData" :rules="rules" ref="sendTypeForm"> <el-form :model="formData" :rules="rules" ref="sendTypeForm">
...@@ -745,13 +745,7 @@ export default { ...@@ -745,13 +745,7 @@ export default {
this.$refs.ruleForm.validateField("imageList") this.$refs.ruleForm.validateField("imageList")
}, },
"formData.contentType"(val) { "formData.contentType"(val) {
this.empTypeList = this.empTypeList.map(item => {
item.selectStaffValue = []
return item
})
this.groupVisible = false
this.getCustomerByTagList("filtrate")
// this
if (val == 4 || val == 5) { if (val == 4 || val == 5) {
this.formData.sendChannelType = 2 this.formData.sendChannelType = 2
} }
...@@ -772,9 +766,29 @@ export default { ...@@ -772,9 +766,29 @@ export default {
return this.sendStatus == 3 return this.sendStatus == 3
}, },
filterSopType() { filterSopType() {
return this.configList.map(item => item.selectStaffType) return this.empTypeList.reduce((pre, i) => {
if (i.selectStaffType == 1) {
i.selectStaffValue.forEach(item => {
item.labelList.forEach(el => {
pre.push(el.id)
})
})
}
return pre
}, [])
},
empTypeListFilter(type) {
const list = deepClone(this.empTypeList)
const filterList = this.empTypeList.filter((i) => i.selectStaffType != 10)
// this.$forceUpdate()
return this.formData.contentType == 5 ? list : filterList
} }
}, },
// filters: {
// empTypeListFilter(type) {
// return this.formData.contentType == 5 ? this.empTypeList.filter((i) => i.selectStaffType != 10) : this.empTypeList
// }
// },
mounted() { mounted() {
const { id, contentType, selectStaffType } = this.$route.query const { id, contentType, selectStaffType } = this.$route.query
this.routeInfo = this.$route.query this.routeInfo = this.$route.query
...@@ -999,6 +1013,12 @@ export default { ...@@ -999,6 +1013,12 @@ export default {
this.formData.imageList = [] this.formData.imageList = []
this.formData.content = "" this.formData.content = ""
this.uploading = false this.uploading = false
this.empTypeList = this.empTypeList.map(item => {
item.selectStaffValue = []
return item
})
this.groupVisible = false
this.getCustomerByTagList("filtrate")
}, },
getTaskRecord(taskId) { getTaskRecord(taskId) {
contentManagerTaskRecordPage({ contentManagerTaskRecordPage({
...@@ -1048,6 +1068,7 @@ export default { ...@@ -1048,6 +1068,7 @@ export default {
) )
} else if (key == "extendConfig" && res.extendConfig.deadline) { } else if (key == "extendConfig" && res.extendConfig.deadline) {
// [res.extendConfig.deadline] // [res.extendConfig.deadline]
this.formData.extendConfig = res.extendConfig
this.formData.extendConfig.deadline = Util.dateFormate( this.formData.extendConfig.deadline = Util.dateFormate(
res.extendConfig.deadline, res.extendConfig.deadline,
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD HH:mm:ss"
...@@ -1334,6 +1355,12 @@ export default { ...@@ -1334,6 +1355,12 @@ export default {
if (!params.content) { if (!params.content) {
delete params.content delete params.content
} }
// 不是学习任务去掉群发送设置
if (this.formData.contentType != 5) {
delete params.extendConfig
}
insertOrUpdate(params).then((res) => { insertOrUpdate(params).then((res) => {
if (res) { if (res) {
this.$message.success( this.$message.success(
......
<!-- 关联门店弹窗 --> <!-- 关联门店弹窗 -->
<template> <template>
<d2-dialog <d2-dialog title="选择员工" :is-visible.sync="relateStoreVisible" width="1280px" btn-ok-label="确定"
title="选择员工" @confirmDialog="handleRelateStoreConfirm" @closeDialog="handleRelateStoreClose" class="relateEmp">
:is-visible.sync="relateStoreVisible"
width="1280px"
btn-ok-label="确定"
@confirmDialog="handleRelateStoreConfirm"
@closeDialog="handleRelateStoreClose"
class="relateEmp"
>
<el-row class="tableCon"> <el-row class="tableCon">
<div class="tableBox"> <div class="tableBox">
<div class="tableHeader">选择员工</div> <div class="tableHeader">选择员工</div>
<div class="tableBody"> <div class="tableBody">
<el-form :model="storeSearchForm" ref="relate" :inline="true"> <el-form :model="storeSearchForm" ref="relate" :inline="true">
<el-form-item label="员工名称:"> <el-form-item label="员工名称:">
<el-input <el-input v-model.trim="storeSearchForm.staffName" placeholder="请输入员工名称" max-length="20" clearable />
v-model.trim="storeSearchForm.staffName"
placeholder="请输入员工名称"
max-length="20"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item label="员工手机号:"> <el-form-item label="员工手机号:">
<el-input <el-input v-model.trim="storeSearchForm.staffPhone" placeholder="请输入手机号" max-length="11" type="number"
v-model.trim="storeSearchForm.staffPhone" clearable />
placeholder="请输入手机号"
max-length="20"
clearable
/>
</el-form-item> </el-form-item>
<div class="text-align: right;"> <div class="text-align: right;">
<el-button type="primary" @click="handleCurrentChange(1)" <el-button type="primary" @click="handleCurrentChange(1)">搜索</el-button>
>搜索</el-button
>
</div> </div>
</el-form> </el-form>
</div> </div>
<el-table <el-table ref="seletingTable" :data="selectingData" height="264px" class="table" border @select="handleChange"
ref="seletingTable" @select-all="handleAll">
:data="selectingData"
height="264px"
class="table"
border
@select="handleChange"
@select-all="handleAll"
>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column prop="staffName" label="员工名称" align="center"> <el-table-column prop="staffName" label="员工名称" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="staffPhone" label="手机号" align="center"> <el-table-column prop="staffPhone" label="手机号" align="center">
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination small background @current-change="handleCurrentChange" :current-page.sync="currentPage"
small :page-size="pageSize" layout="total, prev, pager, next" :total="total" />
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-size="pageSize"
layout="total, prev, pager, next"
:total="total"
/>
</div> </div>
<div class="tableBox"> <div class="tableBox">
<div class="tableHeader"> <div class="tableHeader">
...@@ -116,7 +84,7 @@ export default { ...@@ -116,7 +84,7 @@ export default {
} }
}, },
mounted() {}, mounted() { },
watch: { watch: {
relateStoreVisible: { relateStoreVisible: {
handler(val) { handler(val) {
...@@ -165,8 +133,8 @@ export default { ...@@ -165,8 +133,8 @@ export default {
addOrDelete addOrDelete
? this.selectedData.push(row) ? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter( : (this.selectedData = this.selectedData.filter(
(item) => item.id !== row.id (item) => item.id !== row.id
)) ))
}, },
handleAll(selection) { handleAll(selection) {
this.selectingData.forEach((item) => { this.selectingData.forEach((item) => {
...@@ -202,9 +170,11 @@ export default { ...@@ -202,9 +170,11 @@ export default {
.relateEmp .tableCon { .relateEmp .tableCon {
display: flex; display: flex;
gap: 10px; gap: 10px;
.tableBox { .tableBox {
width: calc(50% - 10px); width: calc(50% - 10px);
border: 1px solid #e5e5e5; border: 1px solid #e5e5e5;
.tableHeader { .tableHeader {
opacity: 1; opacity: 1;
background: #f5f5f5; background: #f5f5f5;
...@@ -213,41 +183,51 @@ export default { ...@@ -213,41 +183,51 @@ export default {
display: flex; display: flex;
font-size: 14px; font-size: 14px;
justify-content: space-between; justify-content: space-between;
.clear-btn { .clear-btn {
color: #409eff; color: #409eff;
cursor: pointer; cursor: pointer;
} }
} }
.tableBody { .tableBody {
padding: 16px; padding: 16px;
.tab-box { .tab-box {
margin-bottom: -20px; margin-bottom: -20px;
.el-tabs__nav-wrap { .el-tabs__nav-wrap {
&::after { &::after {
display: none; display: none;
} }
} }
} }
.el-input { .el-input {
width: 170px; width: 170px;
} }
.el-range-editor--medium.el-input__inner { .el-range-editor--medium.el-input__inner {
width: 300px !important; width: 300px !important;
} }
} }
} }
} }
.service-store .relateEmp .el-table .cell, .service-store .relateEmp .el-table .cell,
.d2-form .relateEmp .el-table .cell { .d2-form .relateEmp .el-table .cell {
line-height: 26px !important; line-height: 26px !important;
} }
.service-store .relateEmp .el-table--medium td, .service-store .relateEmp .el-table--medium td,
.d2-form .relateEmp .el-table--medium td { .d2-form .relateEmp .el-table--medium td {
padding: 6px 8px !important; padding: 6px 8px !important;
} }
.relateEmp .red { .relateEmp .red {
color: red; color: red;
} }
.relateEmp .tip-icon { .relateEmp .tip-icon {
position: absolute; position: absolute;
display: inline-block; display: inline-block;
......
<template> <template>
<d2-dialog title="选择区域" :appendToBody="true" :is-visible="dialogVisible" class="brand-dialog" width="50%" <d2-dialog title="选择区域" :appendToBody="true" :is-visible="dialogVisible" class="brand-dialog" width="30%"
@closeDialog="handleClose" @confirmDialog="handleConfirm"> @closeDialog="handleClose" @confirmDialog="handleConfirm">
<el-form :inline="true" size="mini" class="demo-form-inline"> <el-form :inline="true" size="mini" class="demo-form-inline">
<el-form-item label="区域名称:"> <el-form-item label="区域名称:">
...@@ -8,6 +8,10 @@ ...@@ -8,6 +8,10 @@
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSearch">查询</el-button> <el-button type="primary" @click="onSearch">查询</el-button>
</el-form-item> </el-form-item>
<el-form-item>
<el-button type="primary" @click="resetChecked">清空</el-button>
<!-- <el-button type="primary" @click="onSearch">查询</el-button> -->
</el-form-item>
</el-form> </el-form>
<div class="content"> <div class="content">
<div class="tree-box"> <div class="tree-box">
...@@ -15,20 +19,20 @@ ...@@ -15,20 +19,20 @@
<el-tree ref="tree" node-key="id" :filter-node-method="filterNode" :data="brandData" :props="defaultProps" <el-tree ref="tree" node-key="id" :filter-node-method="filterNode" :data="brandData" :props="defaultProps"
show-checkbox @check-change="handleNodeClick"></el-tree> show-checkbox @check-change="handleNodeClick"></el-tree>
</div> </div>
<div class="check-box"> <!-- <div class="check-box">
<div class="title">已选区域 <div class="title">已选区域
<el-button type="text" @click="resetChecked">清空</el-button> <el-button type="text" @click="resetChecked">清空</el-button>
</div> </div>
<template v-if="checkList.length == 0"> <template v-if="checkList.length == 0">
<div class="no-data">暂无数据</div> <div class="no-data">暂无数据</div>
</template> </template>
<template v-else> <template v-else>
<div class="check-list"> <div class="check-list">
<div class="check-item" v-for="item in checkList" :key="item.id">{{ item.name }}<i class="el-icon-close" <div class="check-item" v-for="item in checkList" :key="item.id">{{ item.name }}<i class="el-icon-close"
@click="closeChecked(item)"></i></div> @click="closeChecked(item)"></i></div>
</div> </div>
</template> </template>
</div> </div> -->
</div> </div>
</d2-dialog> </d2-dialog>
...@@ -195,7 +199,7 @@ export default { ...@@ -195,7 +199,7 @@ export default {
background: #ffffff; background: #ffffff;
height: 324px; height: 324px;
overflow-y: auto; overflow-y: auto;
width: 50%; width: 100%;
margin-right: 20px; margin-right: 20px;
.tree-title { .tree-title {
......
<template> <template>
<d2-dialog title="选择品牌" :appendToBody="true" :is-visible="dialogVisible" class="brand-dialog" width="50%" <d2-dialog title="选择品牌" :appendToBody="true" :is-visible="dialogVisible" class="brand-dialog" width="30%"
@closeDialog="handleClose" @confirmDialog="handleConfirm"> @closeDialog="handleClose" @confirmDialog="handleConfirm">
<el-form :inline="true" size="mini" class="demo-form-inline"> <el-form :inline="true" size="mini" class="demo-form-inline">
<el-form-item label="品牌名称:"> <el-form-item label="品牌名称:">
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSearch">查询</el-button> <el-button type="primary" @click="onSearch">查询</el-button>
</el-form-item> </el-form-item>
<el-form-item>
<el-button type="primary" @click="resetChecked">清空</el-button>
</el-form-item>
</el-form> </el-form>
<div class="content"> <div class="content">
<div class="tree-box"> <div class="tree-box">
...@@ -15,20 +18,20 @@ ...@@ -15,20 +18,20 @@
<el-tree ref="tree" node-key="id" :filter-node-method="filterNode" :data="brandData" :props="defaultProps" <el-tree ref="tree" node-key="id" :filter-node-method="filterNode" :data="brandData" :props="defaultProps"
show-checkbox @check-change="handleNodeClick"></el-tree> show-checkbox @check-change="handleNodeClick"></el-tree>
</div> </div>
<div class="check-box"> <!-- <div class="check-box">
<div class="title">已选品牌 <div class="title">已选品牌
<el-button type="text" @click="resetChecked">清空</el-button> <el-button type="text" @click="resetChecked">清空</el-button>
</div> </div>
<template v-if="checkList.length == 0"> <template v-if="checkList.length == 0">
<div class="no-data">暂无数据</div> <div class="no-data">暂无数据</div>
</template> </template>
<template v-else> <template v-else>
<div class="check-list"> <div class="check-list">
<div class="check-item" v-for="item in checkList" :key="item.id">{{ item.name }}<i class="el-icon-close" <div class="check-item" v-for="item in checkList" :key="item.id">{{ item.name }}<i class="el-icon-close"
@click="closeChecked(item)"></i></div> @click="closeChecked(item)"></i></div>
</div> </div>
</template> </template>
</div> </div> -->
</div> </div>
</d2-dialog> </d2-dialog>
...@@ -198,7 +201,7 @@ export default { ...@@ -198,7 +201,7 @@ export default {
background: #ffffff; background: #ffffff;
height: 324px; height: 324px;
overflow-y: auto; overflow-y: auto;
width: 50%; width: 100%;
margin-right: 20px; margin-right: 20px;
......
...@@ -161,7 +161,7 @@ export const PUNISH_OPTIONS = [ ...@@ -161,7 +161,7 @@ export const PUNISH_OPTIONS = [
{ {
label: "未触发", label: "未触发",
id: "1", id: "1",
backgroundColor: "##FDB757" backgroundColor: "#FDB757"
}, },
{ {
label: "处罚中", label: "处罚中",
......
...@@ -21,9 +21,18 @@ ...@@ -21,9 +21,18 @@
<d2-table ref="table" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" <d2-table ref="table" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn">
<template slot="tagName" scope="scope"> <template slot="tagName" scope="scope">
<div v-for="(item, index) in scope.scope.tagList.split(',')" :key="index"> <!-- <div v-for="(item, index) in scope.scope.tagList.split(',')" :key="index">
{{ item }} {{ item }}
</div> </div> -->
<el-tooltip class="item" effect="dark" placement="top">
<div slot="content" class="tag-name">
<div v-for="(item, index) in scope.scope.tagList.split(',')" :key="index">{{ item }}</div>
</div>
<div>
{{ scope.scope.tagList.split(',')[0] + (scope.scope.tagList.split(',').length == 1 ? '' : '...') + ' ' +
`(${scope.scope.tagList.split(',').length}条)` }}
</div>
</el-tooltip>
</template> </template>
<template slot="courseList" scope="scope"> <template slot="courseList" scope="scope">
<el-tooltip v-for="(item, index) in scope.scope.courseList.split(',')" :key="index" class="item" effect="dark" <el-tooltip v-for="(item, index) in scope.scope.courseList.split(',')" :key="index" class="item" effect="dark"
...@@ -316,4 +325,9 @@ export default { ...@@ -316,4 +325,9 @@ export default {
} }
} }
} }
.tag-name {
max-height: 300px;
overflow-y: scroll;
}
</style> </style>
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
</div> </div>
</div> </div>
<div slot="punishStatus" slot-scope="scope"> <div slot="punishStatus" slot-scope="scope">
<!-- PUNISH_OPTIONS -->
<div class="online-status"> <div class="online-status">
<span class="dot" <span class="dot"
:style="{ background: PUNISH_OPTIONS.find(item => item.id == scope.scope.punishStatus).backgroundColor }"></span> :style="{ background: PUNISH_OPTIONS.find(item => item.id == scope.scope.punishStatus).backgroundColor }"></span>
...@@ -136,7 +135,18 @@ export default { ...@@ -136,7 +135,18 @@ export default {
label: "全部", label: "全部",
id: "" id: ""
}, },
...PUNISH_OPTIONS {
label: "未触发",
id: "1"
},
{
label: "处罚中",
id: "2"
},
{
label: "已结束",
id: "3"
}
], ],
optionId: "id", optionId: "id",
optionLabel: "label" optionLabel: "label"
...@@ -278,9 +288,7 @@ export default { ...@@ -278,9 +288,7 @@ export default {
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD HH:mm:ss"
) )
this.searchFormSearch.sendEndTime = Util.dateFormate( this.searchFormSearch.sendEndTime = Util.dateFormate(
searchEndDate, searchEndDate, "YYYY-MM-DD") + " 23:59:59"
"YYYY-MM-DD HH:mm:ss"
)
} }
if (this.searchForm?.finishStartData?.length) { if (this.searchForm?.finishStartData?.length) {
let [searchStartDate, searchEndDate] = this.searchForm.finishStartData let [searchStartDate, searchEndDate] = this.searchForm.finishStartData
...@@ -289,9 +297,7 @@ export default { ...@@ -289,9 +297,7 @@ export default {
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD HH:mm:ss"
) )
this.searchFormSearch.finishEndTime = Util.dateFormate( this.searchFormSearch.finishEndTime = Util.dateFormate(
searchEndDate, searchEndDate, "YYYY-MM-DD") + " 23:59:59"
"YYYY-MM-DD HH:mm:ss"
)
} }
delete this.searchFormSearch.sendStartData delete this.searchFormSearch.sendStartData
delete this.searchFormSearch.finishStartData delete this.searchFormSearch.finishStartData
......
<template> <template>
<d2-dialog :is-visible="show" class="accountDailog" title="学习任务情况" btnOkLabel="确认" :noCancel="true" width="720px" <d2-dialog :is-visible="show" class="accountDailog" :title="`学习任务情况 | ${detailInfo.staffName}`" :isShowFooter="false"
@confirmDialog="handleAddConfirm" @closeDialog="handleClose"> :noCancel="true" width="720px" @confirmDialog="handleAddConfirm" @closeDialog="handleClose">
<div class="d2-container-content"> <!-- <div class="d2-container-content"> -->
<!-- :before-search-fn="beforeSearchFn" --> <!-- :before-search-fn="beforeSearchFn" -->
<d2-table ref="recordTable" :search-form="searchFormSearch" :get-list-api="getListApi" <d2-table ref="recordTable" :search-form="searchFormSearch" :get-list-api="getListApi" :table-params="tableParams">
:table-params="tableParams"> <div slot="other" slot-scope="scope">
<div slot="other" slot-scope="scope"> <div class="online-status">
<div class="online-status"> <span class="dot"
<span class="dot" :style="{ background: LEARN_PROGRESS_OPTIONS.find(item => item.id === scope.scope.status).backgroundColor }"></span>
:style="{ background: LEARN_PROGRESS_OPTIONS.find(item => item.id === scope.scope.status).backgroundColor }"></span> {{LEARN_PROGRESS_OPTIONS.find(item => item.id === scope.scope.status).label}}
{{LEARN_PROGRESS_OPTIONS.find(item => item.id === scope.scope.status).label}}
</div>
</div> </div>
</d2-table> </div>
</div> </d2-table>
<!-- </div> -->
</d2-dialog> </d2-dialog>
</template> </template>
......
...@@ -215,7 +215,7 @@ ...@@ -215,7 +215,7 @@
<el-row slot> <el-row slot>
<el-form :model="storeSearchForm" ref="relate" :inline="true"> <el-form :model="storeSearchForm" ref="relate" :inline="true">
<el-form-item label="关键字:"> <el-form-item label="关键字:">
<el-input v-model.trim="storeSearchForm.keyWord" placeholder="请输入员工名称/手机号进行搜索" <el-input v-model.trim="storeSearchForm.keyword" placeholder="请输入员工名称/手机号进行搜索"
@keydown.native="handleStoreInput" clearable /> @keydown.native="handleStoreInput" clearable />
</el-form-item> </el-form-item>
<el-button type="primary" @click="handleSearchStore">搜索</el-button> <el-button type="primary" @click="handleSearchStore">搜索</el-button>
...@@ -506,7 +506,7 @@ export default { ...@@ -506,7 +506,7 @@ export default {
getList: contentManagerTaskListStaffPage, getList: contentManagerTaskListStaffPage,
customerDataList: [], customerDataList: [],
storeSearchForm: { storeSearchForm: {
keyWord: "" keyword: ""
} }
} }
}, },
...@@ -568,7 +568,7 @@ export default { ...@@ -568,7 +568,7 @@ export default {
// }, 3000) // }, 3000)
}, },
handleRelateStoreClose() { handleRelateStoreClose() {
this.storeSearchForm.keyWord = "" this.storeSearchForm.keyword = ""
this.relateStoreVisible = false this.relateStoreVisible = false
}, },
handlePopStaff() { handlePopStaff() {
......
...@@ -390,7 +390,12 @@ export default { ...@@ -390,7 +390,12 @@ export default {
}, },
handleDetail(row) { handleDetail(row) {
billDetailPage({ id: row.id }).then(res => { const params = {
id: row.id,
orderCurrentPage: 1,
orderPageSize: 10
}
billDetailPage(params).then(res => {
this.billTmplInfo = deepClone(res) this.billTmplInfo = deepClone(res)
this.handleChangeDetailVisible() this.handleChangeDetailVisible()
}) })
......
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
{ {
label: "字段说明", label: "字段说明",
prop: "remark", prop: "remark",
width: "414px" minWidth: "414px"
} }
] ]
} }
...@@ -141,7 +141,6 @@ export default { ...@@ -141,7 +141,6 @@ export default {
// 获取已选元素,并调整元素顺序 // 获取已选元素,并调整元素顺序
getSelected() { getSelected() {
// console.log(this.$refs?.tmplTable?.$refs?.tmplTableMutiTable.selection, 'this.$refs.tmplTable.$refs.tmplTableMutiTable---')
var selectedList = this.$refs?.tmplTable?.$refs?.tmplTableMutiTable.selection var selectedList = this.$refs?.tmplTable?.$refs?.tmplTableMutiTable.selection
var selectOrderList = [] var selectOrderList = []
this.tmplList.forEach(item => { this.tmplList.forEach(item => {
...@@ -155,4 +154,7 @@ export default { ...@@ -155,4 +154,7 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
::v-deep .el-table--border td:first-child .cell {
padding-left: 0 !important;
}
</style> </style>
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
<script> <script>
import { deepClone } from "@/common/util" import { deepClone } from "@/common/util"
import { limitPrice } from "@/common/format"
import { tmplTypeList, localTmplList } from "../constant/baseData" import { tmplTypeList, localTmplList } from "../constant/baseData"
import { tmplAddOrEdit, getTmplById } from '@api/accountManage' import { tmplAddOrEdit, getTmplById } from '@api/accountManage'
import AccountTmpl from "./components/AccountTmpl" import AccountTmpl from "./components/AccountTmpl"
...@@ -185,4 +184,7 @@ export default { ...@@ -185,4 +184,7 @@ export default {
margin-left: 12px; margin-left: 12px;
} }
} }
.footer {
text-align: center;
}
</style> </style>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<el-table-column prop="adjustAmount" label="调整金额" width="180"> <el-table-column prop="adjustAmount" label="调整金额" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item :prop="'tableData.' + scope.$index + '.adjustAmount'" :rules="adjustAmountRules"> <el-form-item :prop="'tableData.' + scope.$index + '.adjustAmount'" :rules="adjustAmountRules">
<el-input v-model="scope.row.adjustAmount" :disabled="!isEdit" placeholder="请输入金额" type="number" @blur="handleInputBlur"></el-input> <el-input v-model="scope.row.adjustAmount" :disabled="!isEdit" placeholder="请输入金额" type="number" @input="handleInput(scope.$index, 'adjustAmount')" @blur="handleInputBlur"></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
</template> </template>
<script> <script>
import { deepClone, Util } from '@/common/util'
import { limitPrice } from '@/common/format'
export default { export default {
name: 'DynamicAdjustmentTable', name: 'DynamicAdjustmentTable',
props: { props: {
...@@ -59,12 +61,14 @@ export default { ...@@ -59,12 +61,14 @@ export default {
data() { data() {
return { return {
dynamicForm: { dynamicForm: {
tableData: [] tableData: [],
tableOldData: []
}, },
adjustAmountRules: [ adjustAmountRules: [
{ required: true, message: '请输入调整金额', trigger: 'blur' }, { required: true, message: '请输入调整金额', trigger: 'blur' },
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
const decimalPart = String(value).split('.')[1]
if (value && isNaN(Number(value))) { if (value && isNaN(Number(value))) {
callback(new Error('请输入有效的数字')); callback(new Error('请输入有效的数字'));
} else { } else {
...@@ -96,6 +100,7 @@ export default { ...@@ -96,6 +100,7 @@ export default {
}, },
mounted() { mounted() {
this.dynamicForm.tableData = this.adjustments this.dynamicForm.tableData = this.adjustments
this.tableOldData = deepClone(this.adjustments)
}, },
methods: { methods: {
addRow() { addRow() {
...@@ -103,35 +108,29 @@ export default { ...@@ -103,35 +108,29 @@ export default {
adjustAmount: '', adjustAmount: '',
adjustReason: '' adjustReason: ''
}); });
this.tableOldData = deepClone(this.tableData)
}, },
deleteRow(index) { deleteRow(index) {
// if (this.tableData.length <= 1) {
// this.$message.warning('至少保留一行数据');
// return;
// }
this.tableData.splice(index, 1); this.tableData.splice(index, 1);
this.tableOldData = deepClone(this.tableData)
},
handleInput(rowIdx, attr) {
const val = this.tableData[rowIdx][attr]
const oldVal = this.tableOldData[rowIdx][attr]
this.tableData[rowIdx][attr] = limitPrice(val, oldVal, 9, 2)
this.tableOldData[rowIdx][attr] = this.tableData[rowIdx][attr]
}, },
handleInputBlur() { handleInputBlur() {
this.$emit('handleInputBlur') this.$emit('handleInputBlur')
}, },
showTableData() {
const formattedData = this.tableData.map((row, index) => ({
'序号': index + 1,
'调整金额': row.adjustAmount,
'调整事由': row.adjustReason
}));
console.log('当前表格数据:', formattedData);
},
validateForm() { validateForm() {
var flag = true
this.$refs.dynamicForm.validate(valid => { this.$refs.dynamicForm.validate(valid => {
if (valid) { if (!valid) {
this.$message.success('验证通过,表单数据有效'); flag = false
this.showTableData();
} else {
this.$message.error('请检查表单,确保所有必填项已填写');
return false;
} }
}); });
return flag
} }
} }
} }
......
...@@ -71,4 +71,8 @@ export default { ...@@ -71,4 +71,8 @@ export default {
padding: 20px; padding: 20px;
} }
} }
.footer {
text-align: right;
margin-right: 30px;
}
</style> </style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<template> <template>
<d2-dialog title="下载对账单" :is-visible="accountVisible" class="accountDailog" width="688px" btn-ok-label="下载" @closeDialog="handleClose" @confirmDialog="handleAddConfirm"> <d2-dialog title="下载对账单" :is-visible="accountVisible" class="accountDailog" width="688px" btn-ok-label="下载" @closeDialog="handleClose" @confirmDialog="handleAddConfirm">
<el-button v-if="isTmpl" slot="btn-start" type="primary" @click="handleSystemBill">系统对账</el-button> <el-button v-if="isTmpl" slot="btn-start" type="primary" @click="handleSystemBill">系统对账</el-button>
<el-form ref="accountForm" :model="infoForm" :rules="formRules" label-width="120px"> <el-form ref="accountForm" :model="infoForm" :rules="formRules" label-width="120px" v-loading="loading">
<el-form-item label="商户类型:" prop="merchantType"> <el-form-item label="商户类型:" prop="merchantType">
<el-radio-group v-model="infoForm.merchantType" @change="changeType"> <el-radio-group v-model="infoForm.merchantType" @change="changeType">
<el-radio label="2"> <el-radio label="2">
...@@ -87,7 +87,6 @@ import { getMerchantPageSearch } from '@api/publicAccount' ...@@ -87,7 +87,6 @@ import { getMerchantPageSearch } from '@api/publicAccount'
import { getTmplList, getMetaTmpl, getBillTmplAdapter, getShopList } from '@api/accountManage' import { getTmplList, getMetaTmpl, getBillTmplAdapter, getShopList } from '@api/accountManage'
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
import { localTmplList } from "./constant/baseData" import { localTmplList } from "./constant/baseData"
import { resData } from "./resData"
export default { export default {
name: 'DownloadAccountDialog', name: 'DownloadAccountDialog',
data() { data() {
...@@ -103,6 +102,7 @@ export default { ...@@ -103,6 +102,7 @@ export default {
} }
} }
return { return {
loading: false,
// 判断是否是模版模式 // 判断是否是模版模式
isTmpl: false, isTmpl: false,
localTmplList: deepClone(localTmplList), localTmplList: deepClone(localTmplList),
...@@ -258,6 +258,7 @@ export default { ...@@ -258,6 +258,7 @@ export default {
...mapActions('d2admin/user', ['actionSetDownloadList']), ...mapActions('d2admin/user', ['actionSetDownloadList']),
selectMerchant() { selectMerchant() {
var params = {} var params = {}
this.loading = true
params.currentPage = 1 params.currentPage = 1
params.pageSize = 10000 params.pageSize = 10000
var merchantTypeList = [] var merchantTypeList = []
...@@ -271,6 +272,9 @@ export default { ...@@ -271,6 +272,9 @@ export default {
params.merchantTypeList = merchantTypeList params.merchantTypeList = merchantTypeList
getMerchantPageSearch(params).then(res => { getMerchantPageSearch(params).then(res => {
this.baseData.merchantList = res.list this.baseData.merchantList = res.list
this.infoForm.merchant = []
}).finally(() => {
this.loading = false
}) })
}, },
...@@ -298,7 +302,6 @@ export default { ...@@ -298,7 +302,6 @@ export default {
changeType(e) { changeType(e) {
// 对账单是否有模版 // 对账单是否有模版
this.judgeTmpl() this.judgeTmpl()
this.infoForm.merchant = []
this.selectMerchant() this.selectMerchant()
}, },
...@@ -488,7 +491,6 @@ export default { ...@@ -488,7 +491,6 @@ export default {
// 系统对账 // 系统对账
handleSystemBill() { handleSystemBill() {
// this.$emit('handleBill', { billTmplInfo: resData.data })
this.$refs.accountForm.validate(valid => { this.$refs.accountForm.validate(valid => {
if (valid) { if (valid) {
var params = this.getParams() var params = this.getParams()
......
...@@ -327,6 +327,12 @@ export default { ...@@ -327,6 +327,12 @@ export default {
confirmStaff(val) { confirmStaff(val) {
this.selectingList = [] this.selectingList = []
this.form.configList[this.configIndex].staffList = val this.form.configList[this.configIndex].staffList = val
if (val.length > 0) {
this.$refs.formRef.clearValidate(
`configList.${this.configIndex}.staffList`
)
}
this.groupVisible = false this.groupVisible = false
}, },
removeStaff(index, staffIndex) { removeStaff(index, staffIndex) {
...@@ -473,10 +479,9 @@ export default { ...@@ -473,10 +479,9 @@ export default {
}, },
// 验证数字输入 // 验证数字输入
validateNumber(item, field, maxLimit = 31) { validateNumber(item, field, maxLimit = 31) {
// console.log(item, field)
let value = item[field] let value = item[field]
value = parseInt(value) || "" value = parseInt(value)
value = isNaN(value) || "" if (isNaN(value)) value = ""
// 限制最大值 // 限制最大值
if (parseInt(value) > maxLimit) { if (parseInt(value) > maxLimit) {
value = "" value = ""
......
...@@ -229,19 +229,22 @@ export default { ...@@ -229,19 +229,22 @@ export default {
} }
// 清除与输入框1和输入框2相关的内容 // 清除与输入框1和输入框2相关的内容
const refundOffsetText = !this.isEmpty(this.infoForm['refundOffset']) && !isNaN(this.infoForm['refundOffset']) ? `退单冲减:${this.infoForm['refundOffset']}元,` : '' const refundOffsetText = !this.isEmpty(this.infoForm['refundOffset']) && !isNaN(this.infoForm['refundOffset']) ? `退单冲减:${this.infoForm['refundOffset']}元,` : ''
let flag = this.infoForm.remark.includes('其他应发/应扣') && !this.infoForm.remark.includes('退单冲减')
let existingText = this.infoForm.remark let existingText = this.infoForm.remark
.replace(/退单冲减:[^,]*/g, '') .replace(/退单冲减:[^,]*/g, '')
.trim() .trim()
if (flag) existingText = `${existingText},`
// 添加新的输入框内容 // 添加新的输入框内容
if (refundOffsetText) { if (refundOffsetText) {
existingText += refundOffsetText existingText += refundOffsetText
} }
// 更新备注的内容 // 更新备注的内容
existingText = existingText.replace(/[,,]$/, '')
this.infoForm.remark = existingText this.infoForm.remark = existingText
}, },
updateDynamicItemsRemark() { updateDynamicItemsRemark() {
console.log('123123')
let existingText = this.infoForm.remark let existingText = this.infoForm.remark
.replace(/退单冲减:[^,]*/g, '') .replace(/退单冲减:[^,]*/g, '')
.replace(/其他应发\/应扣:[^,]*/g, '') .replace(/其他应发\/应扣:[^,]*/g, '')
...@@ -254,6 +257,7 @@ export default { ...@@ -254,6 +257,7 @@ export default {
if (refundOffsetText) { if (refundOffsetText) {
existingText += refundOffsetText existingText += refundOffsetText
} }
existingText = existingText.replace(/[,,]$/, '')
this.infoForm.remark = existingText this.infoForm.remark = existingText
}, },
generateDynamicItemsText() { generateDynamicItemsText() {
......
...@@ -208,7 +208,7 @@ export default { ...@@ -208,7 +208,7 @@ export default {
type: "select", type: "select",
isClear: true, isClear: true,
optionList: [], optionList: [],
optionId: "adcode", optionId: "code",
optionLabel: "name", optionLabel: "name",
optionsName: "provinceInfoList", optionsName: "provinceInfoList",
changeAttr: (value, targetItem) => { changeAttr: (value, targetItem) => {
...@@ -216,7 +216,7 @@ export default { ...@@ -216,7 +216,7 @@ export default {
this.baseData.cityList = [] this.baseData.cityList = []
this.getOptionsList() this.getOptionsList()
if (value) { if (value) {
const params = { districtName: this.baseData.provinceInfoList.find(item => item.adcode == value).name } const params = { districtName: this.baseData.provinceInfoList.find(item => item.code == value).name }
getDistrictDetail(params).then(res => { getDistrictDetail(params).then(res => {
if (res && res.length) { if (res && res.length) {
this.baseData.cityList = res[0].districts this.baseData.cityList = res[0].districts
...@@ -1002,69 +1002,29 @@ export default { ...@@ -1002,69 +1002,29 @@ export default {
// 省市区 // 省市区
getProvinceList() { getProvinceList() {
var map = new AMap.Map("district", { const params = { districtName: '中国' }
resizeEnable: true getDistrictDetail(params).then(res => {
}) console.log(res)
AMap.plugin(["AMap.DistrictSearch"], () => { if (res && res.length) {
var opts = { this.baseData.provinceInfoList = res[0].districts
subdistrict: 1, // 返回下一级行政区
level: "city", // 查询的范围
showbiz: true // 查询行政级别为 市
}
var districtSearch = new AMap.DistrictSearch(opts)
districtSearch.search("中国", (status, result) => {
this.baseData.provinceInfoList = result.districtList[0].districtList
this.getOptionsList() this.getOptionsList()
// com.getSelect({ }
// id: 'startp',
// name: 'provinceName',
// url: '/area/list',
// // value: 'provinceId',
// data: provinceInfoList,
// value: 'name',
// text: 'name',
// param: {},
// select: function (data) {
// const { value } = data
// if (value) {
// // var province = provinceInfoList.find(item => item.provinceId == value)
// var province = provinceInfoList.find(item => item.name == value)
// cityInfo = province.districtList
// merchantForm.provinceCode = province.adcode
// merchantForm.provinceName = province.name
// $('#addrEl').val('')
// } else {
// cityInfo = []
// merchantForm.provinceCode = ''
// merchantForm.provinceName = ''
// }
// merchantForm.cityCode = ''
// merchantForm.cityName = ''
// com.getSelect({
// id: 'startc',
// name: 'cityName',
// url: '/area/list',
// value: 'name',
// text: 'name',
// data: cityInfo,
// link: 'startp',
// select: function (data) {
// const { value } = data
// if (value) {
// // var city = cityInfo.find(item => item.cityId == value)
// var city = cityInfo.find(item => item.name == value)
// merchantForm.cityCode = city.adcode
// merchantForm.cityName = city.name
// } else {
// merchantForm.cityCode = ''
// merchantForm.cityName = ''
// }
// }
// })
// }
// })
})
}) })
// var map = new AMap.Map("district", {
// resizeEnable: true
// })
// AMap.plugin(["AMap.DistrictSearch"], () => {
// var opts = {
// subdistrict: 1, // 返回下一级行政区
// level: "city", // 查询的范围
// showbiz: true // 查询行政级别为 市
// }
// var districtSearch = new AMap.DistrictSearch(opts)
// districtSearch.search("中国", (status, result) => {
// this.baseData.provinceInfoList = result.districtList[0].districtList
// this.getOptionsList()
// })
// })
}, },
handleSearch() { handleSearch() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!