Commit c5c2abe4 by 胡悦

Merge branch 'SAAS+V5.5.1' into SAAS+V5.5.2

2 parents 620dc200 a008fa3c
Showing 49 changed files with 3243 additions and 198 deletions
...@@ -80,3 +80,9 @@ export function trafficPage(data) { ...@@ -80,3 +80,9 @@ export function trafficPage(data) {
// /router/dj.api.smartcarlife.advancePayment.trafficPage.export.async/1.0.0 // /router/dj.api.smartcarlife.advancePayment.trafficPage.export.async/1.0.0
// 导出流量费/我司收益管理列表(异步) // 导出流量费/我司收益管理列表(异步)
// 分页查询银盛线上对账单管理记录
export function onlinestatementAccountPage(data) {
data.method = "dj.api.smartcarlife.onlineStatementAccount.page"
return request(data, "post")
}
...@@ -299,3 +299,21 @@ export function deleteShipWarehouse(data){ ...@@ -299,3 +299,21 @@ export function deleteShipWarehouse(data){
data.method = `dj.api.smartcarlife.shipWarehouse.remove` data.method = `dj.api.smartcarlife.shipWarehouse.remove`
return request(data,'post') return request(data,'post')
} }
// 总监审核分页查询
export function directorReviewPage(data) {
data.method = `dj.api.smarcarlife.directorreview.page`
return request(data)
}
// 总监审核
export function directorCheck(data) {
data.method = "dj.api.smarcarlife.directorreview.directorAudit"
return request(data, "post")
}
// 总监驳回
export function directorReject(data) {
data.method = "dj.api.smarcarlife.directorreview.directorReject"
return request(data, "post")
}
...@@ -348,6 +348,12 @@ export function getStaffList(data) { ...@@ -348,6 +348,12 @@ export function getStaffList(data) {
return request(data, "post") return request(data, "post")
} }
// 轻改 - 员工列表
export function getQGStaffList(data) {
data.method = "dj.api.smartcarlife.digital.management.staff.list"
return request(data, "post")
}
// 分页查询日报列表,表格数据 // 分页查询日报列表,表格数据
export function getRecordPage(data) { export function getRecordPage(data) {
data.method = "dj.api.smartcarlife.digital.management.record.page" data.method = "dj.api.smartcarlife.digital.management.record.page"
......
...@@ -286,3 +286,62 @@ export const exportContractImageZipAsync = (data = {}) => { ...@@ -286,3 +286,62 @@ export const exportContractImageZipAsync = (data = {}) => {
timeout: 30000 timeout: 30000
}) })
} }
/**
* 更改开户行
*/
export const updateRcvBankName = (data = {}) => {
data.method = "dj.smartcarlife.api.nbcb.batch.transfer.edit.acc"
return request(data, RequestMethods.POST)
}
/**
*
车辆台账分页列表
*/
export const getVehicleLedger = (data = {}) => {
return gscPost("/vehicleLedger/pageList", data, {
timeout: 30000
})
}
/**
* 离职交接分页列表
*/
export const getStaffHandover = (data = {}) => {
return gscPost("/staffHandover/page", data, {
timeout: 30000
})
}
/**
* 原责任人/新接收人下拉列表
*/
export const getStaffHandoverUserList = (data = {}) => {
return gscPost("/staffHandover/userList", data, {
timeout: 30000
})
}
/**
* 创建离职交接
*/
export const createStaffHandover = (data = {}) => {
return gscPost("/staffHandover/create", data, {
timeout: 30000
})
}
/**
* 查询待交接资产
*/
export const queryAssets = (data = {}) => {
return gscPost("/staffHandover/queryAssets", data, {
timeout: 30000
})
}
/**
* 离职交接详情
*/
export const getStaffHandoverDetail = (data = {}) => {
return gscPost("/staffHandover/detail", data, {
timeout: 30000
})
}
\ No newline at end of file \ No newline at end of file
...@@ -19,6 +19,12 @@ export default new Vue({ ...@@ -19,6 +19,12 @@ export default new Vue({
type: 'error', type: 'error',
title: message || '操作失败' title: message || '操作失败'
}) })
} },
infoTips(message) {
this.$notify({
type: 'info',
title: message
})
},
} }
}) })
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
> >
<slot /> <slot />
<div slot="footer" class="dialog-footer" v-if="config.isShowFooter"> <div slot="footer" class="dialog-footer" v-if="config.isShowFooter">
<el-button v-preventReClick @click="visible = false"> <slot name="footerCustom" />
<el-button v-preventReClick @click="cancelBtn">
{{ config.cancel_name }} {{ config.cancel_name }}
</el-button> </el-button>
<el-button <el-button
...@@ -70,7 +71,7 @@ export default { ...@@ -70,7 +71,7 @@ export default {
appendToBody: false, // 是否将自身插入至 body 元素,有嵌套的弹窗时一定要设置 appendToBody: false, // 是否将自身插入至 body 元素,有嵌套的弹窗时一定要设置
isShowFooter: true, isShowFooter: true,
cancel_name: "取 消", cancel_name: "取 消",
confirm_name: "确 定" confirm_name: "确 定",
} }
} }
}, },
...@@ -83,7 +84,8 @@ export default { ...@@ -83,7 +84,8 @@ export default {
// 手动设置确定按钮loding // 手动设置确定按钮loding
type: Boolean, type: Boolean,
default: false default: false
} },
customClose:Boolean, // 自定义关闭
// width: { // width: {
// //弹窗宽度 // //弹窗宽度
// type: String, // type: String,
...@@ -132,6 +134,11 @@ export default { ...@@ -132,6 +134,11 @@ export default {
confirmBtn() { confirmBtn() {
// 触发保存 // 触发保存
this.$emit("handleClick") this.$emit("handleClick")
},
cancelBtn() {
if(!this.customClose) this.visible = false
// 触发取消
this.$emit("cancelBtn")
} }
}, },
created() { created() {
...@@ -182,10 +189,14 @@ export default { ...@@ -182,10 +189,14 @@ export default {
} }
::v-deep .el-dialog__footer { ::v-deep .el-dialog__footer {
padding: 0; padding: 0;
.el-button{
min-width: 150px;
}
} }
.dialog-footer { .dialog-footer {
border-top: 1px solid #e5e5e5; border-top: 1px solid #e5e5e5;
padding-top: 14px; padding-top: 14px;
position: relative;
} }
} }
</style> </style>
...@@ -142,7 +142,7 @@ fetch( ...@@ -142,7 +142,7 @@ fetch(
window.$gscApi = new Request({ window.$gscApi = new Request({
...response.gsc, ...response.gsc,
// baseURL:'http://192.168.3.145:9898/gsc-vcp-web-facade', // baseURL:'http://192.168.3.145:9898/gsc-vcp-web-facade',
// baseURL: 'http://192.168.1.103:5006', // baseURL: 'http://gsc.test.glsx.com.cn/gsc-vcp-web-facade',
session: { session: {
requiresSession: true, requiresSession: true,
sessionId: (_) => util.cookies.get("token") sessionId: (_) => util.cookies.get("token")
...@@ -171,8 +171,7 @@ function init() { ...@@ -171,8 +171,7 @@ function init() {
store, store,
// i18n, // i18n,
render: (h) => { render: (h) => {
// data.axios.baseURL = // baseConfig.axios.baseURL = 'http://dj.test.glsx.com.cn/rop-dj-smartcarlife/router'
// 'http://dj.beta.glsx.com.cn/rop-dj-smartcarlife/router'
// data // data
// console.log(data) // console.log(data)
Vue.prototype.baseConfig = baseConfig Vue.prototype.baseConfig = baseConfig
......
...@@ -826,5 +826,26 @@ export const routerName = { ...@@ -826,5 +826,26 @@ export const routerName = {
} }
], ],
component: _import("financeManage/prepaymentManage/detail") component: _import("financeManage/prepaymentManage/detail")
},
90517: {
path: "/ysprepaymentManage",
name: "ysprepaymentManage",
meta: {
title: "银盛线上对账单",
authId: "90517",
parentId: "905",
cache: false
},
auth: [
{
authId: "9051701",
parentId: "90517",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
}
],
component: _import("financeManage/ysprepaymentManage/index")
} }
} }
...@@ -333,7 +333,7 @@ export const routerName = { ...@@ -333,7 +333,7 @@ export const routerName = {
ruleObj: { ruleObj: {
attr: "status", attr: "status",
rule: { rule: {
2: "审核" 8: "审核"
} }
}, },
handle: "handleCheck" handle: "handleCheck"
...@@ -345,7 +345,7 @@ export const routerName = { ...@@ -345,7 +345,7 @@ export const routerName = {
ruleObj: { ruleObj: {
attr: "status", attr: "status",
rule: { rule: {
2: "驳回" 8: "驳回"
} }
}, },
handle: "handleReject" handle: "handleReject"
...@@ -441,5 +441,95 @@ export const routerName = { ...@@ -441,5 +441,95 @@ export const routerName = {
// } // }
], ],
component: _import("purchase/factoryPurchaseAndDelivery") component: _import("purchase/factoryPurchaseAndDelivery")
},
90908: {
path: "/directorReview",
name: "directorReview",
role: "service",
meta: {
title: "总监审核",
authId: "90908",
parentId: "909",
cache: false
},
auth: [
{
authId: "9090801",
parentId: "90908",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9090802",
parentId: "90908",
label: "查看",
handle: "handleDetail"
},
{
authId: "9090803",
parentId: "90908",
label: "审核",
ruleObj: {
attr: "status",
rule: {
2: "审核"
}
},
handle: "handleCheck",
addRoutePath: [
{
authId: "909080301",
name: "审核",
parentId: "90908"
}
]
},
{
authId: "9090804",
parentId: "90908",
label: "驳回",
ruleObj: {
attr: "status",
rule: {
2: "驳回"
}
},
handle: "handleReject",
addRoutePath: [
{
authId: "909080401",
name: "驳回",
parentId: "90908"
}
]
}
],
component: _import("purchase/directorReview")
},
909080301: {
path: "/directorReview/singleCheck",
name: "singleCheck",
meta: {
title: "审核",
authId: "909080301",
parentId: "90908",
cache: false,
activePath: "/directorReview"
},
component: _import("purchase/singleReview")
},
909080401: {
path: "/directorReview/singleReject",
name: "singleReject",
meta: {
title: "驳回",
authId: "909080401",
parentId: "90908",
cache: false,
activePath: "/directorReview"
},
component: _import("purchase/singleReview")
} }
} }
...@@ -329,5 +329,55 @@ export const routerName = { ...@@ -329,5 +329,55 @@ export const routerName = {
}, },
auth: [], auth: [],
component: _import("usedCarManagement/deliveryOrderManagement/detail") component: _import("usedCarManagement/deliveryOrderManagement/detail")
} },
92006: {
path: "/vehicleLedger",
name: "vehicleLedger",
meta: {
title: "车辆台账",
authId: "92006",
parentId: "920",
cache: false
},
auth: [
{
authId: "9200601",
parentId: "92006",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
],
component: _import("usedCarManagement/vehicleLedger/index")
},
92007: {
path: "/quitAndHandover",
name: "quitAndHandover",
meta: {
title: "离职继承",
authId: "92007",
parentId: "920",
cache: false
},
auth: [
{
authId: "9200701",
parentId: "92007",
label: "新增人员交接",
category: "Button",
type: "primary",
handle: "handleAddHandover",
icon: 'plus'
},
{
authId: "9200702",
parentId: "92007",
label: "详情",
handle: "handleDetail"
},
],
component: _import("usedCarManagement/quitAndHandover/index")
},
} }
...@@ -5,7 +5,11 @@ ...@@ -5,7 +5,11 @@
:dialog-config="dialogConfig.config" :dialog-config="dialogConfig.config"
class="detail-content-warn" class="detail-content-warn"
> >
<div v-loading="loading" class="form_div" ref="form"> <div
v-loading="loading"
class="form_div"
ref="form"
>
<div class="tipsDiv"> <div class="tipsDiv">
<div class="labelCla">付款单推送状态:</div> <div class="labelCla">付款单推送状态:</div>
<div class="tipsText flex"> <div class="tipsText flex">
...@@ -22,19 +26,23 @@ ...@@ -22,19 +26,23 @@
原因:【{{ detailInfo.failReason || "-" }}】 原因:【{{ detailInfo.failReason || "-" }}】
</div> </div>
</template> </template>
<template v-if="detailInfo.pushStatus != 1"> <!--2025/12月大版本 冲账类型,详情页面不展示“重新推送”按钮 -->
<template v-if="detailInfo.showPushButton">
<div class="tipsBt"> <div class="tipsBt">
<el-button <el-button
size="small" size="small"
type="primary" type="primary"
@click="dataPush" @click="dataPush"
:loading="pushLoading" :loading="pushLoading"
>重推付款单</el-button >重推付款单</el-button>
>
</div> </div>
</template> </template>
</div> </div>
<el-form class="edit-sub-block" label-width="150px" :inline="true"> <el-form
class="edit-sub-block"
label-width="150px"
:inline="true"
>
<div class="itemDiv"> <div class="itemDiv">
<template v-for="(item, index) in formList"> <template v-for="(item, index) in formList">
<el-form-item <el-form-item
...@@ -47,15 +55,41 @@ ...@@ -47,15 +55,41 @@
</template> </template>
</div> </div>
<div class="itemDiv"> <div class="itemDiv">
<el-form-item label="回单状态:" class="halfItem"> <el-form-item
label="回单状态:"
class="halfItem"
>
{{ detailInfo.receiptStatusText || "-" }} {{ detailInfo.receiptStatusText || "-" }}
<el-button <el-button
type="text" type="text"
class="receiptBtn" class="receiptBtn"
@click="handleReceipt(detailInfo.receiptUrl)" @click="handleReceipt(detailInfo.receiptUrl)"
v-if="detailInfo.receiptUrl" v-if="detailInfo.receiptUrl"
>查看回单</el-button >查看回单</el-button>
</el-form-item>
<el-form-item
label="开户行:"
class="halfItem"
size="small"
> >
<div class="rcv-bank flex">
<el-input
type="text"
v-model="detailInfo.rcvBankName"
:readonly="!detailInfo.showPushButton"
class="rcv-input"
maxlength="50"
>
</el-input>
<template v-if="detailInfo.showPushButton">
<el-button
type="primary"
class="rcv-btn"
@click="updateRcvBankName"
:loading="rcvLoading"
>确定修改</el-button>
</template>
</div>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
...@@ -73,7 +107,7 @@ ...@@ -73,7 +107,7 @@
</template> </template>
<script> <script>
import { batchRepush, batchTransferDetail } from "@api/usedCarManagement" import { batchRepush, batchTransferDetail, updateRcvBankName } from "@api/usedCarManagement"
import { import {
RECEIPT_STATUS, RECEIPT_STATUS,
PUSH_STATUS, PUSH_STATUS,
...@@ -99,20 +133,21 @@ export default { ...@@ -99,20 +133,21 @@ export default {
}, },
computed: { computed: {
dialogShow: { dialogShow: {
get() { get () {
return this.visible return this.visible
}, },
set(val) { set (val) {
this.$emit("dialogClose", { flag: this.refreshFlag }) this.$emit("dialogClose", { flag: this.refreshFlag })
} }
} }
}, },
mounted() {}, mounted () { },
watch: { watch: {
visible: { visible: {
handler(val) { handler (val) {
if (val) { if (val) {
this.pushLoading = false this.pushLoading = false
this.rcvLoading = false
this.loading = true this.loading = true
this.getDetail() this.getDetail()
} else { } else {
...@@ -124,7 +159,7 @@ export default { ...@@ -124,7 +159,7 @@ export default {
deep: true deep: true
} }
}, },
data() { data () {
return { return {
PUSH_STATUS_COLOR, PUSH_STATUS_COLOR,
dialogConfig: { dialogConfig: {
...@@ -157,7 +192,8 @@ export default { ...@@ -157,7 +192,8 @@ export default {
{ {
0: "获取付款单", 0: "获取付款单",
1: "推送付款单", 1: "推送付款单",
2: "重推付款单" 2: "重推付款单",
5: '修改开户行'
}[cellValue.transferStatus] || "-" }[cellValue.transferStatus] || "-"
) )
} }
...@@ -246,21 +282,24 @@ export default { ...@@ -246,21 +282,24 @@ export default {
{ {
label: "付款方式", label: "付款方式",
value: "paymentMethod" value: "paymentMethod"
} },
], ],
pushLoading: false pushLoading: false,
showPushBtn: false,
rcvLoading: false
} }
}, },
methods: { methods: {
getDetail() { getDetail () {
const params = { id: this.paramsObj.id } const params = { id: this.paramsObj.id }
batchTransferDetail(params).then((res) => { batchTransferDetail(params).then((res) => {
res.showPushButton = res.pushStatus != 1 && res.paymentMethod != '冲账'
this.detailInfo = res this.detailInfo = res
this.dataProcess(this.detailInfo) this.dataProcess(this.detailInfo)
this.loading = false this.loading = false
}) })
}, },
dataProcess(info) { dataProcess (info) {
if (info) { if (info) {
info.pushStatusText = PUSH_STATUS[info.pushStatus] info.pushStatusText = PUSH_STATUS[info.pushStatus]
info.nbTransferStatusText = NB_TRANSFER_STATUS[info.nbTransferStatus] info.nbTransferStatusText = NB_TRANSFER_STATUS[info.nbTransferStatus]
...@@ -269,7 +308,7 @@ export default { ...@@ -269,7 +308,7 @@ export default {
if (this.$refs.form) this.$refs.form.parentNode.scrollTop = 0 if (this.$refs.form) this.$refs.form.parentNode.scrollTop = 0
} }
}, },
dataPush() { dataPush () {
this.setReportTrackData(0, "usedcar_payment_push", {}) this.setReportTrackData(0, "usedcar_payment_push", {})
this.pushLoading = true this.pushLoading = true
this.$confirm("请确认是否要执行当前操作?", "提示", { this.$confirm("请确认是否要执行当前操作?", "提示", {
...@@ -297,14 +336,40 @@ export default { ...@@ -297,14 +336,40 @@ export default {
}) })
}, },
handleReceipt(url) { handleReceipt (url) {
this.setReportTrackData(0, "usedcar_payment_receipt", {}) this.setReportTrackData(0, "usedcar_payment_receipt", {})
window.open(url) window.open(url)
}, },
addZero(num, hasThousands = true) { addZero (num, hasThousands = true) {
let numStr = parseFloat(num).toFixed(2) let numStr = parseFloat(num).toFixed(2)
if (hasThousands) numStr = numStr.replace(/\B(?=(\d{3})+(?!\d))/g, ",") if (hasThousands) numStr = numStr.replace(/\B(?=(\d{3})+(?!\d))/g, ",")
return numStr return numStr
},
updateRcvBankName () {
try {
const { rcvBankName, id } = this.detailInfo
if (!rcvBankName) throw '开户行不能为空'
this.rcvLoading = true
this.$confirm("是否确定修改开户行?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
closeOnClickModal: false
}).then(async () => {
const data = await updateRcvBankName({ id, rcvBankName })
if (data) {
this.rcvLoading = false
this.notice.okTips()
this.getDetail()
this.refreshFlag = true
}
}).catch(() => {
this.rcvLoading = false
})
} catch (error) {
this.rcvLoading = false
if (typeof error == 'string') this.$message.error(error)
}
} }
} }
} }
...@@ -319,11 +384,21 @@ export default { ...@@ -319,11 +384,21 @@ export default {
.detail-content-warn { .detail-content-warn {
::v-deep .el-dialog { ::v-deep .el-dialog {
height: 70vh; height: 70vh;
display: flex;
flex-direction: column;
.el-dialog__body { .el-dialog__body {
overflow-y: scroll; overflow-y: scroll;
// border-bottom: 1px solid #e5e5e5; // border-bottom: 1px solid #e5e5e5;
padding-bottom: 24px; padding-bottom: 24px;
max-height: calc(100% - 137px);
}
.el-dialog__footer {
margin-top: auto;
border-top: 1px solid #e5e5e5;
}
.dialog-footer {
border-top: none;
padding-top: 10px;
} }
} }
...@@ -359,7 +434,18 @@ export default { ...@@ -359,7 +434,18 @@ export default {
.el-icon-circle-close { .el-icon-circle-close {
color: #ffffff; color: #ffffff;
} }
.rcv-bank {
.rcv-input {
width: 274px;
}
.rcv-btn {
margin-left: 8px;
max-width: 80px !important;
min-width: 80px !important;
box-sizing: border-box;
padding: 9px 0;
}
}
.form_div { .form_div {
max-height: 80vh; max-height: 80vh;
color: #333333; color: #333333;
......
<!-- 门店预付款明细 -->
<template>
<d2-container class="container">
<div class="d2-container-content">
<d2-table-header>
<template #left>
<div class="account-info flex">
门店名称:
<div class="price">{{ routerInfo.merchantName }}</div>
</div>
<span data-event-code="prepaymentManage_detail_export">
<auth-button category="Button" :show-btn-ids="['9051604']" />
</span>
</template>
<div class="btns flex">
<!-- <span data-event-code="prepaymentManage_Export">
<auth-button category="Button" :show-btn-ids="['9051604']" />
</span> -->
<!-- <auth-button :show-btn-ids="['9040206', '9040201', '9040202', '9040203', '9040205']"
category="Button" /> -->
<span data-event-code="prepaymentManage_detail_export">
<auth-button category="Button" :show-btn-ids="['9051612']" />
</span>
</div>
</d2-table-header>
<d2-table ref="usedCarFundWarningManageTable" :search-form="searchFormSearch" :table-params="tableParams"
:get-list-api="getListApi" :before-search-fn="beforeSearchFn">
<div slot="postScriptHtml" slot-scope="scope">
<span>
<el-tooltip class="item" effect="dark" :content="scope.scope.remark" placement="right">
<span>
{{ scope.scope.remark ? (scope.scope.remark.length > 15 ? (scope.scope.remark.slice(0, 15) + '...') :
scope.scope.remark) : '' }}
</span>
</el-tooltip>
</span>
</div>
</d2-table>
</div>
<el-button class="go-back" type="primary" @click="goBack">返回</el-button>
</d2-container>
</template>
<script>
import { deepClone } from "@/common/util"
import { advancePaymentShopDetailPage } from "@api/prepaymentManage"
import { mapActions, mapState } from "vuex"
import dayjs from "dayjs"
import reportTrackPageMixin from "@/mixins/reportTrackPageMixin"
export default {
name: "usedCarPaymentManage",
mixins: [reportTrackPageMixin],
components: {
},
data() {
return {
getListApi: advancePaymentShopDetailPage,
searchFormSearch: {},
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
// mutiSelectUniqueKey: "id",
// mutiSelectName: "contentIndex",
tableOption: false,
tableColumns: [
{
label: "业务日期",
prop: "monthName",
minWidth: 160
},
{
label: "摘要",
prop: "summary",
minWidth: 130
},
{
label: "广联付款",
prop: "payAmount",
minWidth: 110
},
{
label: "广联收款",
prop: "receiveAmount",
minWidth: 110,
},
{
label: "应抵流量费",
prop: "trafficFee",
minWidth: 110,
},
{
label: "我司收益",
prop: "ourRevenue",
minWidth: 110,
},
{
label: "可抵扣我司收益",
prop: "deductibleOurRevenue",
minWidth: 110,
},
{
label: "应抵流量预付余额",
prop: "trafficFeeBalance",
minWidth: 90,
},
{
label: "可抵收益预付余额",
prop: "deductibleRevenueBalance",
minWidth: 90,
},
{
label: "日均流量费",
prop: "dayAvgTrafficFee",
minWidth: 90,
},
{
label: "备注",
prop: "remark",
minWidth: 120,
addHtml: 'postScriptHtml'
}
]
},
track_event_code: "prepaymentManage_detail",
detailInfo: {}
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
}),
routerInfo() {
return this.$route.query
}
},
provide() {
return {
userInfo: this.$store.state.d2admin.user.info
}
},
mounted() {
// this.getAccountBalance()
// this.onPageShow()
this.searchFormSearch = {
...this.routerInfo
}
},
methods: {
...mapActions({
get: "d2admin/base/get",
close: "d2admin/page/close"
}),
...mapActions("d2admin/user", ["actionSetDownloadList"]),
beforeSearchFn() {
return new Promise((resolve) => {
// this.searchFormSearch = this.getParams()
resolve()
})
},
goBack() {
this.close({
name: "prepaymentManage"
})
this.$router.push({
name: "prepaymentManage"
})
},
getParams() {
// let params = deepClone(this.searchForm)
// if (params.operationTime) {
// let [srart, end] = params.operationTime
// params.operationStartTime = dayjs(srart).format("YYYY-MM-DD HH:mm:ss")
// params.operationEndTime = dayjs(end).format("YYYY-MM-DD HH:mm:ss")
// }
// if (params.amtList.length) {
// params.minUsageLimit = params.amtList[0]
// params.maxUsageLimit = params.amtList[1]
// }
// delete params.amtList
// delete params.operationTime
// console.log(JSON.parse(JSON.stringify(params)))
return this.searchFormSearch
},
handleAddUsedQuota() {
this.authPhoneDialogVisible = true
},
handleDetail(row) {
this.detailVisible = true
this.detailInfo = row
},
handleExport() {
let params = {
// 导出门店预付款明细列表(异步)
method: "dj.api.smartcarlife.advancePayment.shopDetailPage.export.async",
...this.getParams()
}
Object.keys(params).forEach((key) => {
if (params[key] == null || params[key] == "") {
delete params[key]
}
})
const list = [
...this.dowloadList,
{
name: "门店预付款明细列表",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
},
// async getAccountBalance() {
// const data = await getAccountBalance()
// data.queryTime = dayjs(data.updatedDate).format("YYYY-MM-DD HH:mm:ss")
// this.accountInfo = data
// },
addZero(num) {
let numStr = parseFloat(num).toFixed(2)
return numStr
},
}
}
</script>
<style scoped lang="scss">
.flex {
display: flex;
align-items: center;
}
.btns {
margin-left: auto;
gap: 10px;
}
.account-info {
font-size: 14px;
color: #666666;
.price {
color: #333333;
}
}
.go-back {
display: flex;
align-items: center;
margin: 10px auto;
}
</style>
<!-- 二手车资金预警 -->
<template>
<d2-container class="container">
<div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :form-data="showFormData"
labelWidth="130px">
</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="d2-container-content">
<d2-table-header>
<div class="btns flex">
<span data-event-code="ysprepaymentManage_Export">
<auth-button category="Button" :show-btn-ids="['9051701']" />
</span>
</div>
</d2-table-header>
<d2-table ref="usedCarFundWarningManageTable" :search-form="searchFormSearch" :table-params="tableParams"
:get-list-api="getListApi" :before-search-fn="beforeSearchFn">
</d2-table>
</div>
<ManageReceiptDialog v-if="manageReceiptDialogVisible"
:manageReceiptDialogVisible.sync="manageReceiptDialogVisible" />
<TrafficFeeDialog v-if="trafficFeeDialogVisible" :trafficFeeDialogVisible.sync="trafficFeeDialogVisible" />
<PaymentDialog v-if="paymentDialogVisible" :paymentDialogVisible.sync="paymentDialogVisible" />
</d2-container>
</template>
<script>
import { deepClone } from "@/common/util"
import { onlinestatementAccountPage } from "@api/prepaymentManage"
import { mapActions, mapState } from "vuex"
import dayjs from "dayjs"
import reportTrackPageMixin from "@/mixins/reportTrackPageMixin"
// import ManageReceiptDialog from './components/ManageReceiptDialog/ManageReceiptDailog.vue'
// import TrafficFeeDialog from './components/TrafficFeeDialog/TrafficFeeDialog.vue'
// import PaymentDialog from './components/PaymentDialog/PaymentDialog.vue'
export default {
name: "ysprepaymentManage",
mixins: [reportTrackPageMixin],
components: {
// ManageReceiptDialog,
// TrafficFeeDialog,
// PaymentDialog
},
data() {
return {
// rangePickerOptions: {
// disabledDate(date) {
// if (date > new Date()) {
// return true
// }
// return false
// }
// },
searchForm: {
merchantName: '',
tradeTime: [new Date(), new Date()],
yqMerchantName: ''
},
// searchSelectObj: {
// divisionOrPayDate: {
// attr: 'daterange',
// value: [dayjs(), dayjs()]
// }
// },
showFormData: [
{
label: '时间范围',
name: 'tradeTime',
type: 'datePicker',
isClear: true,
pickerOptions: 'rangePickerOptions'
},
{
label: "园区店名称",
name: "yqMerchantName",
type: "input",
isClear: true,
maxlength: 50
}, {
label: "门店名称",
name: "merchantName",
type: "input",
isClear: true,
maxlength: 50
},
],
getListApi: onlinestatementAccountPage,
searchFormSearch: {},
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
// mutiSelectUniqueKey: "id",
// mutiSelectName: "contentIndex",
tableOption: false,
tableColumns: [
{
label: '日期',
prop: "queryDate",
width: "150"
},
{
label: "园区店",
prop: "yqMerchantName",
width: "130"
},
{
label: "门店名称",
prop: "merchantName",
minWidth: '130px',
},
{
label: "期初余额",
prop: "dayStartBalance",
minWidth: '90px',
},
{
label: "收款",
prop: "receiveAmount",
minWidth: '90px'
},
{
label: "分账",
children: [
{ label: '门店', prop: 'shopDivisionMoney', minWidth: '110px' },
{
label: '服务商',
prop: 'fwsDivisionMoney',
minWidth: '110px'
},
{
label: '我司',
prop: 'glDivisionMoney',
minWidth: '110px'
},
]
},
{
label: "手续费",
prop: "serviceCharge",
minWidth: '90px',
},
{
label: "期末余额",
prop: "dayEndBalance",
minWidth: '90px',
},
{
label: "待补录订单",
prop: "waitInputMoney",
minWidth: '90px'
}
]
},
track_event_code: "ysprepayment_manage_page",
// accountInfo: {},
manageReceiptDialogVisible: false,
paymentDialogVisible: false,
trafficFeeDialogVisible: false,
detailInfo: {}
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
provide() {
return {
userInfo: this.$store.state.d2admin.user.info
}
},
created() {
// 设置获得当天日期
// this.searchForm.daterange = [
// dayjs().format("YYYY-MM-DD"),
// dayjs().format("YYYY-MM-DD")
// ]
// this.searchSelectObj.divisionOrPayDate.value = [dayjs(), dayjs()]
},
mounted() {
},
methods: {
...mapActions({
get: "d2admin/base/get",
close: "d2admin/page/close"
}),
...mapActions("d2admin/user", ["actionSetDownloadList"]),
handleManageReceipt() {
this.manageReceiptDialogVisible = true
},
handleManagePayment() {
this.paymentDialogVisible = true
},
handleTrafficFee() {
this.trafficFeeDialogVisible = true
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.searchSelectObj = this.$options.data.call(this).searchSelectObj
this.$refs.usedCarFundWarningManageTable.refreshTable(true, true)
},
beforeSearchFn() {
console.log(this.searchForm)
return new Promise((resolve, reject) => {
// // 判断是否有日期,没有提示用户选择日期
// if (!this.searchSelectObj.divisionOrPayDate.value) {
// this.$message({
// message: '请选择日期',
// type: 'warning'
// })
// return reject(new Error('请选择日期'))
// } else {
this.searchFormSearch = this.getParams()
console.log(this.searchFormSearch)
resolve()
// }
})
},
getSelectInputParams() {
const list = Object.keys(this.searchSelectObj)
var params = {}
list.forEach(i => {
const item = this.searchSelectObj[i]
item.value && (params[item.attr] = item.value)
})
return params
},
getParams() {
let params = deepClone(this.searchForm)
// const tempParams = this.getSelectInputParams()
// console.log(tempParams)
params = {
...params,
// ...tempParams
}
console.log(params)
if (params.tradeTime) {
let [srart, end] = params.tradeTime
params.startTradeTime = dayjs(srart).format("YYYY-MM-DD")
params.endTradeTime = dayjs(end).format("YYYY-MM-DD")
// params.timeType = 1
}
delete params.tradeTime
// if (params.monthrange) {
// let [srart, end] = params.monthrange
// params.startTradeTime = dayjs(srart).format("YYYY-MM-DD 00:00:00")
// // 这个月的 最后一天
// params.endTradeTime = dayjs(end).endOf('month').format("YYYY-MM-DD 23:59:59")
// params.timeType = 2
// }
// delete params.monthrange
// console.log(JSON.parse(JSON.stringify(params)))
return params
},
handleAddUsedQuota() {
this.authPhoneDialogVisible = true
},
handleDetail(row) {
// this.detailVisible = true
this.detailInfo = row
this.$router.push({
name: "prepaymentDetail",
query: {
// id: row.id
merchantId: row.merchantId,
merchantName: row.merchantName
}
})
},
handleExport() {
const params = {
// 导出预付款管理记录列表(异步)
method: "dj.api.smartcarlife.onlineStatementAccount.page.export.async",
...this.getParams()
}
Object.keys(params).forEach((key) => {
if (params[key] == null || params[key] == "") {
delete params[key]
}
})
const list = [
...this.dowloadList,
{
name: "银盛线上对账单管理列表",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
},
getTableList() {
// this.$refs.usedCarFundWarningManageTable.refreshTable(true, true)
},
loginSuccess() {
this.authPhoneDialogVisible = false
this.usageLimitDialogVisible = true
},
addUsageLimitSuccess() {
this.usageLimitDialogVisible = false
this.$refs.usedCarFundWarningManageTable.refreshTable(true, true)
},
addZero(num) {
let numStr = parseFloat(num).toFixed(2)
return numStr
},
}
}
</script>
<style scoped lang="scss">
.flex {
display: flex;
align-items: center;
}
.btns {
margin-left: auto;
gap: 10px;
}
.account-info {
font-size: 14px;
color: #333333;
.price {
font-weight: 500;
color: #2a58ad;
}
}
</style>
...@@ -575,10 +575,11 @@ export default { ...@@ -575,10 +575,11 @@ export default {
this.$forceUpdate() this.$forceUpdate()
}, },
dateValueChange(val) { dateValueChange(val) {
// if (!val) { if (!val) {
// this.totalType = "today" this.totalType = "today"
// return this.handleSearch()
// } return
}
this.totalType = "" this.totalType = ""
this.handleSearch() this.handleSearch()
this.$forceUpdate() this.$forceUpdate()
......
...@@ -11,11 +11,11 @@ ...@@ -11,11 +11,11 @@
</el-cascader> </el-cascader>
</template> </template>
<template slot="sellerSelect"> <template slot="sellerSelect">
<el-select v-model="searchForm.sellerUserId" remote reserve-keyword <el-select v-model="searchForm.sellerNameVague" remote reserve-keyword placeholder="请选择转化人员"
placeholder="请选择转化人员" @visible-change="visibleChange" :remote-method="remoteSellerMethod" @visible-change="visibleChange" :remote-method="remoteSellerMethod" v-el-select-loadmore="interestsLoadmore"
v-el-select-loadmore="interestsLoadmore" style="width: 100%" filterable> style="width: 100%" filterable>
<el-option v-for="(subItem, subIndex) in sellerList" :key="subIndex" <el-option v-for="(subItem, subIndex) in sellerList" :key="subIndex" :label="subItem.staffName"
:label="subItem.staffName" :value="subItem.uuid" /> :value="subItem.staffName" />
</el-select> </el-select>
</template> </template>
</d2-search> </d2-search>
...@@ -554,7 +554,7 @@ export default { ...@@ -554,7 +554,7 @@ export default {
this.staffName = '' this.staffName = ''
this.getSellerList() this.getSellerList()
this.searchForm.merchantId = "" this.searchForm.merchantId = ""
this.searchForm.sellerUserId = "" this.searchForm.sellerNameVague = ""
this.getOptionsList() this.getOptionsList()
} }
}, },
...@@ -668,7 +668,7 @@ export default { ...@@ -668,7 +668,7 @@ export default {
}, },
{ {
label: "转化人员", label: "转化人员",
name: 'sellerUserId', name: 'staffName',
addHtml: "sellerSelect" addHtml: "sellerSelect"
}, },
{ {
...@@ -713,7 +713,7 @@ export default { ...@@ -713,7 +713,7 @@ export default {
goodsType: '', goodsType: '',
secondaryGoodsType: '', secondaryGoodsType: '',
thirdLevelGoodsType: '', thirdLevelGoodsType: '',
sellerUserId: '', sellerNameVague: '',
brandIdList: [], brandIdList: [],
directSalesFlag: '' directSalesFlag: ''
}, },
...@@ -1099,7 +1099,7 @@ export default { ...@@ -1099,7 +1099,7 @@ export default {
provinceId: "", provinceId: "",
invoiceStatus: "", invoiceStatus: "",
salesType: "", salesType: "",
sellerUserId: "", sellerNameVague: "",
brandIdList: [], brandIdList: [],
directSalesFlag: "" directSalesFlag: ""
} }
......
...@@ -63,9 +63,14 @@ ...@@ -63,9 +63,14 @@
<div class="record-div"> <div class="record-div">
<div class="record-div-d" v-for="(item, index) in detailInfo.auditDetaiList" :key="index"> <div class="record-div-d" v-for="(item, index) in detailInfo.auditDetaiList" :key="index">
<span class="dot"></span> <span class="dot"></span>
<span class="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</span><span class="span-txt-two"> <span class="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</span>
<span class="span-txt-two" style="display: inline-block; width: 116px;">
<span :class="item.status ? examineStatusClass[item.status] : ''"> <span :class="item.status ? examineStatusClass[item.status] : ''">
{{ item.status ? $$(statusForShow, [item.status], 'status') : '' }}</span> {{ item.status ? $$(statusForShow, [item.status], 'status') : '' }}</span>
<span v-if="item.rejectedStatus">
<span style="display: inline-block; margin: 0 8px;">至</span>
<span>{{ item.rejectedStatus ? $$(rejectedForShow, [item.rejectedStatus], 'rejectedStatus') : '' }}</span>
</span>
</span> </span>
<span class="span-txt-two reviewer ellipsis">审核人: <span class="span-txt-two reviewer ellipsis">审核人:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.reviewedBy" placement="right"> <el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.reviewedBy" placement="right">
...@@ -82,7 +87,7 @@ ...@@ -82,7 +87,7 @@
</el-button> </el-button>
</el-tooltip> </el-tooltip>
</span> </span>
<span class="span-txt-two" v-if="[4, 6, 7].includes(item.status)">驳回原因: <span class="span-txt-two" v-if="[4, 6, 7, 9].includes(item.status)">驳回原因:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.rejectCause" placement="right"> <el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.rejectCause" placement="right">
<el-button type="text"> <el-button type="text">
{{ item.rejectCause ? (item.rejectCause.length > 12 ? (item.rejectCause.slice(0, 12) + '...') : item.rejectCause) : '' }} {{ item.rejectCause ? (item.rejectCause.length > 12 ? (item.rejectCause.slice(0, 12) + '...') : item.rejectCause) : '' }}
...@@ -235,7 +240,9 @@ export default { ...@@ -235,7 +240,9 @@ export default {
4: 'redSp', 4: 'redSp',
5: 'greenSp', 5: 'greenSp',
6: 'redSp', 6: 'redSp',
7: 'redSp' 7: 'redSp',
8: 'greenSp',
9: 'redSp'
}, },
examineStatus: 1, examineStatus: 1,
statusForShow: { statusForShow: {
...@@ -243,7 +250,14 @@ export default { ...@@ -243,7 +250,14 @@ export default {
4: { text: '运营审核', status: '驳回' }, 4: { text: '运营审核', status: '驳回' },
5: { text: '商务审核', status: '通过' }, 5: { text: '商务审核', status: '通过' },
6: { text: '商务审核', status: '驳回' }, 6: { text: '商务审核', status: '驳回' },
7: { text: '采购驳回', status: '驳回' } 7: { text: '采购驳回', status: '驳回' },
8: { text: '总监审核', status: '通过' },
9: { text: '总监驳回', status: '驳回' }
},
rejectedForShow: {
1: { rejectedStatus: '采购商户' },
2: { rejectedStatus: '运营审核' },
3: { rejectedStatus: '商务审核' }
} }
} }
}, },
...@@ -441,7 +455,7 @@ export default { ...@@ -441,7 +455,7 @@ export default {
} }
.span-txt-two { .span-txt-two {
margin-left: 40px; margin-left: 20px;
} }
.greenSp { .greenSp {
......
...@@ -5,10 +5,14 @@ export const defaultStatusOptions = [ ...@@ -5,10 +5,14 @@ export const defaultStatusOptions = [
label: "运营审核" label: "运营审核"
}, },
{ {
id: 2, id: 8,
label: "商务审核" label: "商务审核"
}, },
{ {
id: 2,
label: "总监审核"
},
{
id: 3, id: 3,
label: "已取消" label: "已取消"
}, },
...@@ -36,10 +40,14 @@ export const defaultStatusOptionsForTable = [ ...@@ -36,10 +40,14 @@ export const defaultStatusOptionsForTable = [
label: "运营审核" label: "运营审核"
}, },
{ {
id: 2, id: 8,
label: "商务审核" label: "商务审核"
}, },
{ {
id: 2,
label: "总监审核"
},
{
id: 3, id: 3,
label: "已取消" label: "已取消"
}, },
...@@ -58,6 +66,10 @@ export const defaultStatusOptionsForTable = [ ...@@ -58,6 +66,10 @@ export const defaultStatusOptionsForTable = [
{ {
id: 7, id: 7,
label: "已驳回" label: "已驳回"
},
{
id: 9,
label: "已驳回"
} }
] ]
...@@ -101,13 +113,21 @@ export const operate_statusOptions_table = [ ...@@ -101,13 +113,21 @@ export const operate_statusOptions_table = [
{ {
id: 7, id: 7,
label: "已驳回" label: "已驳回"
},
{
id: 8,
label: "已审核"
},
{
id: 9,
label: "已驳回"
} }
] ]
// 商务审核筛选条件 // 商务审核筛选条件
export const business_statusOptions = [ export const business_statusOptions = [
{ {
id: 2, id: 8,
label: "待审核" label: "待审核"
}, },
{ {
...@@ -122,6 +142,41 @@ export const business_statusOptions = [ ...@@ -122,6 +142,41 @@ export const business_statusOptions = [
// 商务审核列表展示 // 商务审核列表展示
export const business_statusOptions_table = [ export const business_statusOptions_table = [
{ {
id: 8,
label: "待审核"
},
{
id: 5,
label: "已审核"
},
{
id: 6,
label: "已驳回"
},
{
id: 7,
label: "已驳回"
}
]
// 总监审核筛选条件
export const director_statusOptions = [
{
id: 2,
label: "待审核"
},
{
id: 5,
label: "已审核"
},
{
id: 6,
label: "已驳回"
}
]
// 总监审核列表展示
export const director_statusOptions_table = [
{
id: 2, id: 2,
label: "待审核" label: "待审核"
}, },
...@@ -136,6 +191,14 @@ export const business_statusOptions_table = [ ...@@ -136,6 +191,14 @@ export const business_statusOptions_table = [
{ {
id: 7, id: 7,
label: "已驳回" label: "已驳回"
},
{
id: 8,
label: "已审核"
},
{
id: 9,
label: "已驳回"
} }
] ]
......
...@@ -215,7 +215,7 @@ export default { ...@@ -215,7 +215,7 @@ export default {
}, },
className: (cellValue) => { className: (cellValue) => {
return { return {
2: 'yellowSpot', 8: 'yellowSpot',
5: 'greenSpot', 5: 'greenSpot',
6: 'redSpot', 6: 'redSpot',
7: 'redSpot' 7: 'redSpot'
...@@ -290,7 +290,7 @@ export default { ...@@ -290,7 +290,7 @@ export default {
}) })
}, },
selectableFn(row, index) { selectableFn(row, index) {
return row.status == 2 return row.status == 8
}, },
beforeSearchFn() { beforeSearchFn() {
...@@ -328,9 +328,11 @@ export default { ...@@ -328,9 +328,11 @@ export default {
// 处理查询条件时间 // 处理查询条件时间
for (const key in params) { for (const key in params) {
if (key == 'orderTimeStr' || key == 'statuses') { if (key == 'orderTimeStr' || key == 'statuses') {
if (params[key]) {
params[key].forEach((v, index) => { params[key].forEach((v, index) => {
params[`${key}[${index}]`] = v params[`${key}[${index}]`] = v
}) })
}
delete params[key] delete params[key]
} }
} }
......
...@@ -224,7 +224,9 @@ export default { ...@@ -224,7 +224,9 @@ export default {
4: 'redSpot', 4: 'redSpot',
5: 'greenSpot', 5: 'greenSpot',
6: 'redSpot', 6: 'redSpot',
7: 'redSpot' 7: 'redSpot',
8: 'greenSpot',
9: 'redSpot'
}[cellValue.status] }[cellValue.status]
} }
} }
...@@ -314,9 +316,9 @@ export default { ...@@ -314,9 +316,9 @@ export default {
delete this.tableSearchForm.placeOrderTimeStr delete this.tableSearchForm.placeOrderTimeStr
if (this.tableSearchForm.statuses) { if (this.tableSearchForm.statuses) {
if (this.tableSearchForm.statuses == 2) { if (this.tableSearchForm.statuses == 2) {
this.tableSearchForm.statuses = [2, 5] this.tableSearchForm.statuses = [2, 5, 8]
} else if (this.tableSearchForm.statuses == 4) { } else if (this.tableSearchForm.statuses == 4) {
this.tableSearchForm.statuses = [4, 6, 7] this.tableSearchForm.statuses = [4, 6, 7, 9]
} else { } else {
this.tableSearchForm.statuses = [this.tableSearchForm.statuses] this.tableSearchForm.statuses = [this.tableSearchForm.statuses]
} }
...@@ -336,9 +338,11 @@ export default { ...@@ -336,9 +338,11 @@ export default {
// 处理查询条件时间 // 处理查询条件时间
for (const key in params) { for (const key in params) {
if (key == 'orderTimeStr' || key == 'statuses') { if (key == 'orderTimeStr' || key == 'statuses') {
if (params[key]) {
params[key].forEach((v, index) => { params[key].forEach((v, index) => {
params[`${key}[${index}]`] = v params[`${key}[${index}]`] = v
}) })
}
delete params[key] delete params[key]
} }
} }
......
...@@ -303,7 +303,9 @@ export default { ...@@ -303,7 +303,9 @@ export default {
4: 'redSpot', 4: 'redSpot',
5: 'greenSpot', 5: 'greenSpot',
6: 'redSpot', 6: 'redSpot',
7: 'redSpot' 7: 'redSpot',
8: 'yellowSpot',
9: 'redSpot'
}[cellValue.status] }[cellValue.status]
} }
} }
...@@ -375,11 +377,11 @@ export default { ...@@ -375,11 +377,11 @@ export default {
if (this.tableSearchForm.placeOrderTimeStr) { if (this.tableSearchForm.placeOrderTimeStr) {
this.tableSearchForm.orderTimeStr[0] = new Date(this.tableSearchForm.placeOrderTimeStr[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00' this.tableSearchForm.orderTimeStr[0] = new Date(this.tableSearchForm.placeOrderTimeStr[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
this.tableSearchForm.orderTimeStr[1] = new Date(this.tableSearchForm.placeOrderTimeStr[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59' this.tableSearchForm.orderTimeStr[1] = new Date(this.tableSearchForm.placeOrderTimeStr[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
delete this.tableSearchForm.placeOrderTimeStr
} }
delete this.tableSearchForm.placeOrderTimeStr
if (this.tableSearchForm.statuses) { if (this.tableSearchForm.statuses) {
if (this.tableSearchForm.statuses == 4) { if (this.tableSearchForm.statuses == 4) {
this.tableSearchForm.statuses = [4, 6, 7] this.tableSearchForm.statuses = [4, 6, 7, 9]
} else { } else {
this.tableSearchForm.statuses = [this.tableSearchForm.statuses] this.tableSearchForm.statuses = [this.tableSearchForm.statuses]
} }
...@@ -407,9 +409,11 @@ export default { ...@@ -407,9 +409,11 @@ export default {
// 处理查询条件时间 // 处理查询条件时间
for (const key in params) { for (const key in params) {
if (key == 'orderTimeStr' || key == 'putTimeStr' || key == 'statuses') { if (key == 'orderTimeStr' || key == 'putTimeStr' || key == 'statuses') {
if (params[key]) {
params[key].forEach((v, index) => { params[key].forEach((v, index) => {
params[`${key}[${index}]`] = v params[`${key}[${index}]`] = v
}) })
}
delete params[key] delete params[key]
} }
} }
......
<!-- 关联门店弹窗 -->
<template>
<d2-dialog :title="title" :is-visible.sync="relateStoreVisible" width="70%" btn-ok-label="确定" @confirmDialog="handleRelateStoreConfirm" @closeDialog="handleRelateStoreClose" class="relateStore">
<slot />
<el-row class="tableCon">
<div class="tableBox">
<el-table ref="seletingTable" :data="selectingData" height="464px" class="table" border @select="handleChange" @select-all="handleAll">
<el-table-column type="selection" width="55" align="center" />
<el-table-column prop="staffName" label="员工姓名" align="center">
</el-table-column>
<el-table-column prop="staffPhone" label="手机号" align="center">
</el-table-column>
<el-table-column prop="merchantName" label="所属商户" align="center">
</el-table-column>
<!-- <el-table-column prop="yqMerchantName" label="商户类型" align="center">
<template slot-scope="scope">
<span>{{merchantClassifyList.find(item => item.confId == scope.row.merchantType).confLabel}}</span>
</template>
</el-table-column> -->
</el-table>
<el-pagination small background @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="pageSize" layout="total, prev, pager, next" :total="total" />
</div>
<el-table class="tableBox table" :data="selectedData" border height="464px">
<el-table-column prop="staffName" label="员工姓名" align="center">
<template slot-scope="scope">
<span>{{ scope.row.staffName }}</span>
</template>
</el-table-column>
<el-table-column prop="staffPhone" label="手机号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.staffPhone }}</span>
</template>
</el-table-column>
<el-table-column prop="merchantName" label="所属商户" align="center">
<template slot-scope="scope">
<span>{{ scope.row.merchantName }}</span>
</template>
</el-table-column>
<el-table-column label="删除" align="center" width="50px">
<template slot-scope="scope">
<el-button class="el-icon-delete" @click="handleDelete(scope.row)" type="text" />
</template>
</el-table-column>
</el-table>
</el-row>
</d2-dialog>
</template>
<script>
// import { merchantClassifyList } from '@/common/constants.js'
export default {
name: "SelectStaffDialog",
data() {
return {
// merchantClassifyList,
selectedData: [],
selectingData: [],
// 分页
total: 0,
currentPage: 1,
pageSize: 15
}
},
props: {
title: {
type: String,
default: "修改名单"
},
relateStoreVisible: {
type: Boolean,
default: false
},
storeApi: {
type: Function,
default: () => { }
},
storeSelected: {
type: Array,
default: () => []
},
storeSearchForm: {
type: Object,
default: () => { }
}
},
mounted() {
this.selectedData = this.storeSelected
this.getSelectingList()
},
methods: {
recoverySelection() {
var exitIds = this.selectedData.map((item) => item.staffUuid)
this.selectingData.forEach((item) => {
exitIds.includes(item.staffUuid) &&
this.$refs.seletingTable.toggleRowSelection(item, true)
})
},
getSelectingList() {
const _storeSearchForm = this.storeSearchForm
this.storeApi({
...this.storeSearchForm,
currentPage: this.currentPage,
pageSize: this.pageSize
}).then((res) => {
this.selectingData = res.list
this.total = res.total
this.$nextTick(() => {
this.recoverySelection()
})
})
},
handleChange(selection, row) {
var addOrDelete = !!selection.find(
(item) => item.staffUuid === row.staffUuid
)
addOrDelete
? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter(
(item) => item.staffUuid !== row.staffUuid
))
},
handleAll(selection) {
this.selectingData.forEach((item) => {
var isExit = this.selectedData.findIndex(
(subItem) => subItem.staffUuid === item.staffUuid
)
if (selection.length && isExit === -1) {
this.selectedData.push(item)
} else if (!selection.length && isExit !== -1) {
this.selectedData.splice(isExit, 1)
}
})
},
handleDelete(row) {
this.selectedData = this.selectedData.filter(
(item) => item.staffUuid !== row.staffUuid
)
const obj = this.selectingData.find((v) => v.staffUuid == row.staffUuid)
this.$refs.seletingTable.toggleRowSelection(obj)
},
handleCurrentChange(val) {
this.currentPage = val
this.getSelectingList()
},
handleRelateStoreConfirm() {
this.$emit("handleRelateStoreConfirm", this.selectedData)
},
handleRelateStoreClose() {
this.$emit("handleRelateStoreClose")
}
}
}
</script>
<style lang="scss">
.relateStore .table {
margin: 0 auto 20px !important;
width: 98%;
}
.relateStore .tableCon {
margin-top: 20px;
display: flex;
.tableBox {
flex: 1;
}
}
.service-store .relateStore .el-table .cell,
.d2-form .relateStore .el-table .cell {
line-height: 26px !important;
}
.service-store .relateStore .el-table--medium td,
.d2-form .relateStore .el-table--medium td {
padding: 6px 8px !important;
}
.relateStore .red {
color: red;
}
.relateStore .tip-icon {
position: absolute;
display: inline-block;
height: 10px;
width: 10px;
line-height: 10px;
color: #ffffff;
background-color: red;
border: 1px solid red;
border-radius: 50%;
cursor: pointer;
font-size: 6px;
margin-left: 2px;
}
</style>
...@@ -20,6 +20,13 @@ export default { ...@@ -20,6 +20,13 @@ export default {
}, },
data() { data() {
const contentStyle = {
width: "100%",
display: 'inline-block',
overflow: 'hidden',
'text-overflow': 'ellipsis',
'white-space': 'nowrap'
}
return { return {
configData: [ configData: [
{ {
...@@ -34,6 +41,18 @@ export default { ...@@ -34,6 +41,18 @@ export default {
key: "salesVolume" key: "salesVolume"
}, },
{ {
title: "主营品牌",
key: "brand",
style: contentStyle,
hasTooltip: true
},
{
title: "门店地址",
key: "merchantAddress",
style: contentStyle,
hasTooltip: true
},
{
title: "业务类型", title: "业务类型",
key: "businessTypeName" key: "businessTypeName"
}, },
...@@ -79,7 +98,7 @@ export default { ...@@ -79,7 +98,7 @@ export default {
props: { props: {
detailInfo: { detailInfo: {
type: Object, type: Object,
default: () => {} default: () => { }
} }
} }
} }
......
...@@ -96,6 +96,8 @@ ...@@ -96,6 +96,8 @@
}" }"
:class="'dot'" :class="'dot'"
></div> ></div>
<el-tooltip v-if="item.hasTooltip" effect="dark" placement="top-start">
<div slot="content" class="tooltip-content">
{{ {{
item.formatter item.formatter
? item.formatter(detailInfo) || "-" ? item.formatter(detailInfo) || "-"
...@@ -103,6 +105,25 @@ ...@@ -103,6 +105,25 @@
? detailInfo[item.key] ? detailInfo[item.key]
: "-" : "-"
}} }}
</div>
<span :style="{ ...item.style }">
{{
item.formatter
? item.formatter(detailInfo) || "-"
: detailInfo[item.key]
? detailInfo[item.key]
: "-"
}}
</span>
</el-tooltip>
<span v-else :style="{ ...item.style }">{{
item.formatter
? item.formatter(detailInfo) || "-"
: detailInfo[item.key]
? detailInfo[item.key]
: "-"
}}
</span>
<template v-if="item.suffixText"> <template v-if="item.suffixText">
<div class="unit"> <div class="unit">
{{ item.suffixText }} {{ item.suffixText }}
...@@ -188,4 +209,8 @@ export default { ...@@ -188,4 +209,8 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import "./detail.scss"; @import "./detail.scss";
.tooltip-content {
max-height: 300px;
overflow-y: scroll !important;
}
</style> </style>
...@@ -3,22 +3,11 @@ ...@@ -3,22 +3,11 @@
<div class="entry-info"> <div class="entry-info">
<div class="header"> <div class="header">
<div class="title">入职计划</div> <div class="title">入职计划</div>
<el-button <el-button type="primary" plain icon="el-icon-plus" @click="handleEntry" v-if="isBtn">新增入职</el-button>
type="primary"
plain
icon="el-icon-plus"
@click="handleEntry"
v-if="isBtn"
>新增入职</el-button
>
</div> </div>
<div class="box"> <div class="box">
<template v-if="onboardingPlans.length > 0"> <template v-if="onboardingPlans.length > 0">
<div <div class="content" v-for="(item, index) in onboardingPlans" :key="index">
class="content"
v-for="(item, index) in onboardingPlans"
:key="index"
>
<div class="entry-item"> <div class="entry-item">
<img class="profile" src="@/assets/profile.png" alt="" /> <img class="profile" src="@/assets/profile.png" alt="" />
<div class="info"> <div class="info">
...@@ -32,15 +21,15 @@ ...@@ -32,15 +21,15 @@
<span class="label">入职时间:</span> <span class="label">入职时间:</span>
<span class="value">{{ item.onboardingDate }}</span> <span class="value">{{ item.onboardingDate }}</span>
</div> </div>
<div class="item">
<span class="label">招聘渠道:</span>
<span class="value">{{ item.channelName || "-" }}</span>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="comprehensive"> <div class="comprehensive">
<div <div class="item" v-for="(ability, index) in abilitieList" :key="index">
class="item"
v-for="(ability, index) in abilitieList"
:key="index"
>
<div class="label"> <div class="label">
{{ ability.name }}{{ item[ability.value] }} {{ ability.name }}{{ item[ability.value] }}
</div> </div>
...@@ -49,12 +38,8 @@ ...@@ -49,12 +38,8 @@
</div> </div>
<div class="btns"> <div class="btns">
<template v-if="isBtn"> <template v-if="isBtn">
<el-button type="text" @click="handleEdit(item, index)" <el-button type="text" @click="handleEdit(item, index)">编辑</el-button>
>编辑</el-button <el-button type="text" @click="handleDelete(index)">删除</el-button>
>
<el-button type="text" @click="handleDelete(index)"
>删除</el-button
>
</template> </template>
</div> </div>
</div> </div>
...@@ -66,22 +51,7 @@ ...@@ -66,22 +51,7 @@
</div> </div>
<!-- 新增入职 --> <!-- 新增入职 -->
<glsk-form-dialog <glsk-form-dialog ref="addEntryDialog" v-if="isEntryVisible" :selectVisible="isEntryVisible" :dialogConfig="isEntryDialogConfig" label-width="150px" defaultWidth="406px" :formRules="isEntryRules" :editData="isEntryForm" :editFormData="isEntryFormData" :baseData="baseData" @handleClose="handleEntryClose" @handleConfirm="handleEntryConfirm" @handleAddSelectTypeConfirm="handleAddSelectTypeConfirm" @handleEditSelectTypeConfirm="handleEditSelectTypeConfirm">
ref="addEntryDialog"
v-if="isEntryVisible"
:selectVisible="isEntryVisible"
:dialogConfig="isEntryDialogConfig"
label-width="150px"
defaultWidth="406px"
:formRules="isEntryRules"
:editData="isEntryForm"
:editFormData="isEntryFormData"
:baseData="baseData"
@handleClose="handleEntryClose"
@handleConfirm="handleEntryConfirm"
@handleAddSelectTypeConfirm="handleAddSelectTypeConfirm"
@handleEditSelectTypeConfirm="handleEditSelectTypeConfirm"
>
</glsk-form-dialog> </glsk-form-dialog>
</div> </div>
</template> </template>
...@@ -130,6 +100,9 @@ export default { ...@@ -130,6 +100,9 @@ export default {
onboardingDate: [ onboardingDate: [
{ required: true, message: "请选择入职时间", trigger: "change" } { required: true, message: "请选择入职时间", trigger: "change" }
], ],
channelType: [
{ required: true, message: "请选择招聘渠道", trigger: "change" }
],
personalityType: [ personalityType: [
{ required: true, message: "请选择性格", trigger: "change" } { required: true, message: "请选择性格", trigger: "change" }
], ],
...@@ -163,6 +136,26 @@ export default { ...@@ -163,6 +136,26 @@ export default {
isClear: true isClear: true
}, },
{ {
label: "招聘渠道",
name: "channelType",
isRequired: true,
type: "special-select",
isClear: true,
typeCode: "recruitment_channel",
typeName: "channelName",
optionId: "itemValue",
optionLabel: "itemName",
optionsName: "channelData",
changeAttr: (value, targetItem) => {
this.isEntryForm.channelName = this.filterAttribute(
targetItem.optionsName,
targetItem.optionId,
targetItem.optionLabel,
value
)
}
},
{
label: "入职时间", label: "入职时间",
name: "onboardingDate", name: "onboardingDate",
type: "datePicker", type: "datePicker",
...@@ -270,6 +263,7 @@ export default { ...@@ -270,6 +263,7 @@ export default {
} }
], ],
abilitieList: [ abilitieList: [
// { name: "招聘渠道:", value: "channelName" },
{ name: "性格:", value: "personalityName" }, { name: "性格:", value: "personalityName" },
{ name: "能力表现:", value: "abilityPerformanceName" }, { name: "能力表现:", value: "abilityPerformanceName" },
{ name: "学历:", value: "educationLevelName" }, { name: "学历:", value: "educationLevelName" },
...@@ -277,6 +271,7 @@ export default { ...@@ -277,6 +271,7 @@ export default {
{ name: "岗位匹配度:", value: "positionMatchDegreeName" } { name: "岗位匹配度:", value: "positionMatchDegreeName" }
], ],
baseData: { baseData: {
channelData: [],
characterData: [], characterData: [],
abilityData: [], abilityData: [],
educationData: [], educationData: [],
...@@ -306,12 +301,14 @@ export default { ...@@ -306,12 +301,14 @@ export default {
{ typeKey: "positionMatchDegreeType", dataKey: "matchdegreeData" }, { typeKey: "positionMatchDegreeType", dataKey: "matchdegreeData" },
{ typeKey: "educationLevelType", dataKey: "educationData" }, { typeKey: "educationLevelType", dataKey: "educationData" },
{ typeKey: "abilityPerformanceType", dataKey: "abilityData" }, { typeKey: "abilityPerformanceType", dataKey: "abilityData" },
{ typeKey: "personalityType", dataKey: "characterData" } { typeKey: "personalityType", dataKey: "characterData" },
{ typeKey: "channelType", dataKey: "channelData" }
] ]
fields.forEach((field) => { fields.forEach((field) => {
const { typeKey, dataKey } = field const { typeKey, dataKey } = field
const value = data[typeKey] const value = data[typeKey]
if (value) {
const isValid = this.filterAttribute( const isValid = this.filterAttribute(
dataKey, dataKey,
"itemValue", "itemValue",
...@@ -319,6 +316,7 @@ export default { ...@@ -319,6 +316,7 @@ export default {
value value
) )
data[typeKey] = isValid ? value : "" data[typeKey] = isValid ? value : ""
}
}) })
}, },
updateParams(data) { updateParams(data) {
...@@ -329,7 +327,8 @@ export default { ...@@ -329,7 +327,8 @@ export default {
positionMatchDegreeType: "positionMatchDegreeName", positionMatchDegreeType: "positionMatchDegreeName",
educationLevelType: "educationLevelName", educationLevelType: "educationLevelName",
abilityPerformanceType: "abilityPerformanceName", abilityPerformanceType: "abilityPerformanceName",
personalityType: "personalityName" personalityType: "personalityName",
channelType: "channelName"
} }
Object.keys(fieldMap).forEach((typeKey) => { Object.keys(fieldMap).forEach((typeKey) => {
...@@ -351,7 +350,8 @@ export default { ...@@ -351,7 +350,8 @@ export default {
positionMatchDegreeType: "matchdegreeData", positionMatchDegreeType: "matchdegreeData",
educationLevelType: "educationData", educationLevelType: "educationData",
abilityPerformanceType: "abilityData", abilityPerformanceType: "abilityData",
personalityType: "characterData" personalityType: "characterData",
channelType: "channelData"
} }
return mapping[typeKey] || "" return mapping[typeKey] || ""
}, },
...@@ -373,7 +373,8 @@ export default { ...@@ -373,7 +373,8 @@ export default {
abilityData, abilityData,
educationData, educationData,
appearanceData, appearanceData,
matchdegreeData matchdegreeData,
channelData
] = await Promise.all([ ] = await Promise.all([
getDictList({ getDictList({
businessCode: "recruitment", businessCode: "recruitment",
...@@ -394,6 +395,10 @@ export default { ...@@ -394,6 +395,10 @@ export default {
getDictList({ getDictList({
businessCode: "recruitment", businessCode: "recruitment",
typeCode: "position_match_degree" typeCode: "position_match_degree"
}),
getDictList({
businessCode: "recruitment",
typeCode: "recruitment_channel"
}) })
]) ])
// 处理返回的数据 // 处理返回的数据
...@@ -402,6 +407,7 @@ export default { ...@@ -402,6 +407,7 @@ export default {
this.baseData.educationData = educationData.list this.baseData.educationData = educationData.list
this.baseData.appearanceData = appearanceData.list this.baseData.appearanceData = appearanceData.list
this.baseData.matchdegreeData = matchdegreeData.list this.baseData.matchdegreeData = matchdegreeData.list
this.baseData.channelData = channelData.list
this.getOptionsList(this, "isEntryFormData", false) this.getOptionsList(this, "isEntryFormData", false)
} catch (error) { } catch (error) {
console.error("获取入职计划数据失败:", error) console.error("获取入职计划数据失败:", error)
...@@ -459,10 +465,14 @@ export default { ...@@ -459,10 +465,14 @@ export default {
this.isEntryVisible = !this.isEntryVisible this.isEntryVisible = !this.isEntryVisible
this.isEntryForm = {} this.isEntryForm = {}
}, },
handleEntry() { async handleEntry(isCheck = false) {
this.isAdd = true this.isAdd = true
await this.fetchOnboardingPlans()
this.isEntryVisible = !this.isEntryVisible this.isEntryVisible = !this.isEntryVisible
this.fetchOnboardingPlans() if (isCheck) {
this.checkParams(this.isEntryForm)
this.updateParams(this.isEntryForm)
}
}, },
//新增入职 //新增入职
handleEntryConfirm(data) { handleEntryConfirm(data) {
......
...@@ -3,31 +3,14 @@ ...@@ -3,31 +3,14 @@
<div class="look-recruitment" v-loading="loading"> <div class="look-recruitment" v-loading="loading">
<div class="layout"> <div class="layout">
<baseInfo :detailInfo="detailInfo"></baseInfo> <baseInfo :detailInfo="detailInfo"></baseInfo>
<recruitInfo <recruitInfo :resumes="detailInfo.resumes" @handleAddConfirm="handleAddConfirm" @handleWorking="handleWorking" :isBtn="isBtn"></recruitInfo>
:resumes="detailInfo.resumes" <entryInfo :onboardingPlans="detailInfo.onboardingPlans" ref="entryInfo" @handleEntryConfirm="handleEntryConfirm" :isBtn="isBtn"></entryInfo>
@handleAddConfirm="handleAddConfirm"
@handleWorking="handleWorking"
:isBtn="isBtn"
></recruitInfo>
<entryInfo
:onboardingPlans="detailInfo.onboardingPlans"
ref="entryInfo"
@handleEntryConfirm="handleEntryConfirm"
:isBtn="isBtn"
></entryInfo>
</div> </div>
<div class="footer"> <div class="footer">
<el-button <el-button size="small" :loading="btnLoding" class="save-btn" @click="handleSave">
size="small"
:loading="btnLoding"
class="save-btn"
@click="handleSave"
>
提交 提交
</el-button> </el-button>
<el-button class="cancel-btn" size="small" @click="handleCancel" <el-button class="cancel-btn" size="small" @click="handleCancel">取消</el-button>
>取消</el-button
>
</div> </div>
</div> </div>
</template> </template>
...@@ -49,9 +32,18 @@ export default { ...@@ -49,9 +32,18 @@ export default {
this.btnLoding = true this.btnLoding = true
let params = { let params = {
id: this.id, id: this.id,
resumes: this.detailInfo.resumes, resumes: deepClone(this.detailInfo.resumes),
onboardingPlans: this.detailInfo.onboardingPlans onboardingPlans: this.detailInfo.onboardingPlans
} }
console.log(params.resumes)
const detAttr = ['channelType', 'channelName', 'recommendedReason']
params.resumes.forEach((item, index) => {
detAttr.forEach((attr) => {
if (!item[attr]) {
delete params.resumes[index][attr]
}
})
})
handleRecruitment(params) handleRecruitment(params)
.then((res) => { .then((res) => {
if (res) { if (res) {
...@@ -66,7 +58,7 @@ export default { ...@@ -66,7 +58,7 @@ export default {
//转入职 //转入职
handleWorking(data) { handleWorking(data) {
delete data.id delete data.id
this.$refs.entryInfo.handleEntry?.() this.$refs.entryInfo.handleEntry?.(true)
this.$refs.entryInfo.isEntryForm = deepClone(data) this.$refs.entryInfo.isEntryForm = deepClone(data)
}, },
//转入职确认 //转入职确认
......
...@@ -2,13 +2,7 @@ ...@@ -2,13 +2,7 @@
<template> <template>
<d2-container class="evaluation-wrap"> <d2-container class="evaluation-wrap">
<div class="header" slot="header"> <div class="header" slot="header">
<d2-search <d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'120px'" :form-data="showFormData">
ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'120px'"
:form-data="showFormData"
>
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button size="small" type="primary" @click="handleSearch"> <el-button size="small" type="primary" @click="handleSearch">
...@@ -21,38 +15,21 @@ ...@@ -21,38 +15,21 @@
<d2-table-header :leftSpan="18"> <d2-table-header :leftSpan="18">
<template #left> <template #left>
<div class="summary"> <div class="summary">
需求总人数:<span>{{ summaryObj.allOfDemand }}</span 需求总人数:<span>{{ summaryObj.allOfDemand }}</span>,投递简历总数:<span>{{ summaryObj.allOfResume }}</span>,处理简历总数:<span>{{ summaryObj.processedOfResume }}</span>,入职人数:<span>{{ summaryObj.allOfOnboarding }}</span>
>,投递简历总数:<span>{{ summaryObj.allOfResume }}</span
>,处理简历总数:<span>{{ summaryObj.processedOfResume }}</span
>,入职人数:<span>{{ summaryObj.allOfOnboarding }}</span>
</div> </div>
</template> </template>
<span> <span>
<auth-button <auth-button category="Button" :show-btn-ids="['9122301', '9122302']" />
category="Button"
:show-btn-ids="['9122301', '9122302']"
/>
</span> </span>
</d2-table-header> </d2-table-header>
<d2-table <d2-table ref="table" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" :before-search-fn="beforeSearchFn">
ref="table"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<!-- 门店名称 --> <!-- 门店名称 -->
<div slot="merchantName" slot-scope="scope"> <div slot="merchantName" slot-scope="scope">
<span v-if="scope.scope.merchantName.length < 14">{{ <span v-if="scope.scope.merchantName.length < 14">{{
scope.scope.merchantName.slice(0, 14) scope.scope.merchantName.slice(0, 14)
}}</span> }}</span>
<div v-else> <div v-else>
<el-tooltip <el-tooltip class="item" effect="dark" :content="scope.scope.merchantName" placement="top-start">
class="item"
effect="dark"
:content="scope.scope.merchantName"
placement="top-start"
>
<span> {{ scope.scope.merchantName.slice(0, 14) }}...</span> <span> {{ scope.scope.merchantName.slice(0, 14) }}...</span>
</el-tooltip> </el-tooltip>
</div> </div>
...@@ -60,12 +37,9 @@ ...@@ -60,12 +37,9 @@
<!-- 评估单状态 --> <!-- 评估单状态 -->
<div slot="statusHtml" slot-scope="scope"> <div slot="statusHtml" slot-scope="scope">
<div class="online-status"> <div class="online-status">
<span <span class="dot" :style="{
class="dot"
:style="{
background: baseData.inviteStatusOptMap[scope.scope.status] background: baseData.inviteStatusOptMap[scope.scope.status]
}" }"></span>
></span>
{{ {{
baseData.inviteStatusOpt.find( baseData.inviteStatusOpt.find(
(item) => item.confId == scope.scope.status (item) => item.confId == scope.scope.status
...@@ -80,35 +54,17 @@ ...@@ -80,35 +54,17 @@
</span> </span>
<!-- 确认/驳回--> <!-- 确认/驳回-->
<span style="margin-right: 10px" v-if="scope.scope.status == 0"> <span style="margin-right: 10px" v-if="scope.scope.status == 0">
<auth-button <auth-button :data="scope.scope" :show-btn-ids="['9122304', '9122305']" />
:data="scope.scope"
:show-btn-ids="['9122304', '9122305']"
/>
</span> </span>
<!-- 处理 \完成 --> <!-- 处理 \完成 -->
<span style="margin-right: 10px" v-if="scope.scope.status == 1"> <span style="margin-right: 10px" v-if="scope.scope.status == 1">
<auth-button <auth-button :data="scope.scope" :show-btn-ids="['9122306', '9122307']" />
:data="scope.scope"
:show-btn-ids="['9122306', '9122307']"
/>
</span> </span>
</div> </div>
</d2-table> </d2-table>
</div> </div>
<!-- 驳回 --> <!-- 驳回 -->
<glsk-form-dialog <glsk-form-dialog v-if="isRejectVisible" :selectVisible="isRejectVisible" :dialogConfig="isRejectDialogConfig" label-width="150px" defaultWidth="406px" :formRules="isRejectRules" :editData="isRejectForm" :editFormData="isRejectFormData" :baseData="baseData" @handleClose="handleReject" @handleConfirm="handleRejectConfirm">
v-if="isRejectVisible"
:selectVisible="isRejectVisible"
:dialogConfig="isRejectDialogConfig"
label-width="150px"
defaultWidth="406px"
:formRules="isRejectRules"
:editData="isRejectForm"
:editFormData="isRejectFormData"
:baseData="baseData"
@handleClose="handleReject"
@handleConfirm="handleRejectConfirm"
>
</glsk-form-dialog> </glsk-form-dialog>
</d2-container> </d2-container>
</template> </template>
...@@ -171,9 +127,14 @@ export default { ...@@ -171,9 +127,14 @@ export default {
width: 160 width: 160
}, },
{ {
label: "创建人", label: "招聘负责人",
prop: "createdBy", prop: "recruiterName",
width: 120 width: 160
},
{
label: "所属省市",
prop: "provinceCity",
width: 160
}, },
{ {
label: "投递简历数", label: "投递简历数",
...@@ -209,14 +170,15 @@ export default { ...@@ -209,14 +170,15 @@ export default {
addHtml: "statusHtml" addHtml: "statusHtml"
}, },
{ {
label: "招聘负责人", label: "创建人",
prop: "recruiterName", prop: "createdBy",
width: 160 width: 120
} }
] ]
}, },
searchFormSearch: {}, searchFormSearch: {},
searchForm: { searchForm: {
dataScope: '1',
merchantName: "", merchantName: "",
businessType: "", businessType: "",
recruitmentType: "", recruitmentType: "",
...@@ -224,10 +186,21 @@ export default { ...@@ -224,10 +186,21 @@ export default {
status: "", status: "",
recruiterName: "", recruiterName: "",
regionOperationName: "", regionOperationName: "",
createdBy: "" createdBy: "",
provinceCity: ''
}, },
showFormData: [ showFormData: [
{ {
label: "筛选",
name: "dataScope",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "dataScopeOpt"
},
{
label: "门店名称", label: "门店名称",
name: "merchantName", name: "merchantName",
type: "input", type: "input",
...@@ -290,10 +263,21 @@ export default { ...@@ -290,10 +263,21 @@ export default {
type: "input", type: "input",
isClear: true, isClear: true,
maxlength: 20 maxlength: 20
},
{
label: "所属省市",
name: "provinceCity",
type: "input",
isClear: true,
maxlength: 10
} }
], ],
baseData: { baseData: {
inviteStatusOpt: deepClone(inviteStatusOpt), inviteStatusOpt: deepClone(inviteStatusOpt),
dataScopeOpt: [{
confId: '1',
confValue: "与我相关"
}],
bussinessTypeOpt: [], bussinessTypeOpt: [],
recruitmentTypeOpt: [], recruitmentTypeOpt: [],
inviteStatusOptMap: deepClone(inviteStatusOptMap) inviteStatusOptMap: deepClone(inviteStatusOptMap)
......
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
<img <img
class="video-poster" class="video-poster"
:src=" :src="
videoImg videoImg && isAliyunOssUrl(item)
? item + videoStr ? item + videoStr
: '../../../../assets/video-default.png' : 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/usedCar/video_default.png'
" "
/> />
<div class="mask"> <div class="mask">
...@@ -250,6 +250,19 @@ export default { ...@@ -250,6 +250,19 @@ export default {
}) })
}, },
methods: { methods: {
// 判断是否是阿里云OSS链接
isAliyunOssUrl(url) {
if (!url || typeof url !== "string") {
return false
}
// 检查是否包含阿里云OSS的特征域名
// 常见的OSS域名格式:oss-cn-xxx.aliyuncs.com 或包含 oss- 的域名
return (
url.includes("aliyuncs.com") ||
url.includes("oss-") ||
/oss-cn-[a-z0-9-]+\.aliyuncs\.com/.test(url)
)
},
dragEnd(e) { dragEnd(e) {
if (e.oldIndex != e.newIndex) { if (e.oldIndex != e.newIndex) {
const url = this.imageUrlArr[e.newIndex] const url = this.imageUrlArr[e.newIndex]
...@@ -266,9 +279,9 @@ export default { ...@@ -266,9 +279,9 @@ export default {
handleUpload(e) { handleUpload(e) {
console.log(e.srcElement.files[0].type, this.picOptions.noLimitType) console.log(e.srcElement.files[0].type, this.picOptions.noLimitType)
if (this.picOptions.noLimitType) { if (this.picOptions.noLimitType) {
if (e.srcElement.files[0].type.indexOf("mp4") > -1) if (e.srcElement.files[0].type.indexOf("mp4") > -1) {
this.$set(this.picOptions, "type", "video") this.$set(this.picOptions, "type", "video")
else { } else {
this.$set(this.picOptions, "type", "jpg") this.$set(this.picOptions, "type", "jpg")
} }
} }
......
...@@ -235,7 +235,7 @@ ...@@ -235,7 +235,7 @@
type="file" type="file"
:id="'fileUpload' + item.key" :id="'fileUpload' + item.key"
class="import-input" class="import-input"
accept=".pdf,image/jpeg,image/png,image/bmp" accept=".pdf,image/jpeg,image/png,image/bmp,image/jpg,image/webp"
:disabled="isUploadDisabled(item.key, 'fileForm1')" :disabled="isUploadDisabled(item.key, 'fileForm1')"
@change="importFile($event, item.key,'fileForm1')" /> @change="importFile($event, item.key,'fileForm1')" />
</el-button> </el-button>
......
<template>
<div :class="['tips-box',{finish: step == 3}, {hide:hideTips}]">
<div class="text flex">
<img
:src="info.icon"
class="icon"
>
{{info.text}}
</div>
<template v-if="info.description">
<div class="description">{{info.description}}</div>
</template>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'TipsBox',
props: {
step: [Number, String],
tableData: {
type: Array,
default: () => []
}
},
data () {
return {
step_1: {
icon: require('./images/info-1.png'),
text: '请选择离职员工与接手员工,系统将自动扫描名下资产。'
},
step_2: {
icon: require('./images/info-2.png'),
text: '注意:涉及实物交接',
description: '检测到部分车辆已签署代保管协议。请点击表格右侧的 [上传凭证] 按钮,针对每一辆高风险车辆上传对应的交接单或合影。'
},
step_3: {
icon: require('./images/info-3.png'),
text: '交接成功',
description: '本地权限已变更。'
},
}
},
computed: {
info () {
return this[`step_${this.step}`]
},
hideTips () {
const { tableData, step } = this
let flag = false
if (step == 2) {
let len = tableData.findIndex(item => item.signCustodyStatus)
console.log(len)
if (len == -1) flag = true
}
return flag
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.flex {
display: flex;
align-items: center;
}
.tips-box {
border-radius: 4px;
background: #fafafa;
padding: 16px 20px;
color: #333333;
.text {
font-size: 16px;
font-weight: 700;
.icon {
width: 24px;
height: 24px;
margin-right: 8px;
}
}
.description {
font-size: 14px;
margin-top: 20px;
line-height: 20px;
}
}
.hide{
display: none;
}
.finish {
.text {
justify-content: center;
}
.description {
margin-top: 8px;
color: #999999;
text-align: center;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<baseDialog
:is-show.sync="dialogShow"
:config="setting"
:dialog-config="dialogConfig.config"
class="detail-content"
customClose
@handleClick="handleClick"
@cancelBtn="handleDetailClose"
:btnLoding="btnLoding"
>
<div
v-loading="loading"
class="content"
>
<img
:src="stepImg"
class="step-img"
>
<tips-box
:step="step"
:tableData="tableData"
/>
<div :class="['step-content',{step2:step == 2}, {hide:step == 3}]">
<div :class="['step-box',{show:step == 1}]">
<Step1
ref="step1"
:loading.sync="loading"
/>
</div>
<div :class="['step-box',{show:step == 2}]">
<Step2
ref="step2"
:tableData="tableData"
/>
</div>
</div>
</div>
<template #footerCustom>
<template v-if="step == 2 && showAgree">
<div class="agree-box">
<el-checkbox v-model="agree">我确认以上已上传的凭证真实有效,并知晓系统将同步变更拍卖平台上的交付人信息。</el-checkbox>
</div>
</template>
</template>
</baseDialog>
</template>
<script>
import dayjs from "dayjs"
// import reportTrackPageMixin from "@/mixins/reportTrackPageMixin"
import TipsBox from "./TipsBox"
import Step1 from "./step-1"
import Step2 from "./step-2"
import { createStaffHandover, queryAssets } from "@api/usedCarManagement"
export default {
// mixins: [reportTrackPageMixin],
name: "addHandover",
components: {
TipsBox,
Step1,
Step2
},
props: {
visible: {
type: Boolean,
default: false
},
},
computed: {
dialogShow: {
get () {
return this.visible
},
set (val) {
this.$emit('update:visible', false)
}
},
setting () {
const { step } = this
return {
isShowFooter: true,
showClose: true,
appendToBody: false,
btnList: [],
hideConfirmBtn: step == 3,
cancel_name: step == 2 ? '上一步' : '返回',
confirm_name: {
1: '下一步:扫描资产',
2: '提交变更'
}[step]
}
},
stepImg () {
const { step } = this
return require(`./images/step-${step}.webp`)
},
componentName () {
return {
1: 'Step1',
2: 'Step2'
}[this.step]
},
step1Ref () {
return this.$refs.step1
},
step2Ref () {
return this.$refs.step2
},
showAgree () {
const { tableData } = this
let flag = false
let len = tableData.findIndex(item => item.signCustodyStatus)
if (len != -1) flag = true
return flag
}
},
mounted () { },
watch: {
visible: {
handler (val) {
if (val) {
this.step = 1
this.loading = true
this.agree = false
this.$nextTick(() => {
this.step1Ref.init()
})
// setTimeout(() => this.loading = false, 1e3)
} else {
this.step = 1
this.loading = false
}
},
immediate: true,
deep: true
}
},
data () {
return {
step: 1,
dialogConfig: {
config: {
title: "发起业务交接",
width: "1200px"
}
},
loading: true,
tableData: [],
btnLoding: false,
agree: false
}
},
methods: {
handleDetailClose () {
this.btnLoding = false
const { step } = this
if (step != 2) return this.$emit('update:visible', false)
else this.step = 1
},
handleClick () {
const { step } = this
if (step == 1) this.queryAssets()
if (step == 2) this.createStaffHandover()
},
async queryAssets () {
try {
const { formObj } = this.step1Ref,
{ originalUserId, newUserId } = formObj
if (!originalUserId) throw '请原责任人'
if (!newUserId) throw '请选择新接收人'
this.btnLoding = true
const data = await queryAssets({
originalUserId
})
this.btnLoding = false
if (data) {
console.log(data)
data.evalOrders.map(e => e.proofUrls = [])
this.step = 2
this.tableData = data.evalOrders || []
}
} catch (error) {
this.btnLoding = false
if (error) this.notice.warningTips(error)
}
},
async createStaffHandover () {
try {
this.btnLoding = true
const { formObj } = this.step1Ref,
{ filterArr } = this.step2Ref,
{ showAgree, agree } = this
let num = 0
const assets = filterArr()
let agreeFlag = false
if (assets.length) {
assets.map(i => {
if (i.signCustodyStatus && !i.proofUrls.length) num += 1
if (i.signCustodyStatus) agreeFlag = true
})
if (num > 0) throw `有${num}辆“已签协议”的车辆未上传交接凭证。\n请在列表中点击“上传凭证”按钮补充材料`
} else throw {
text: '至少选择一个资产',
type: 'infoTips'
}
if (showAgree && !agree && agreeFlag) throw {
text: '请勾选底部的确认协议复选框',
type: 'infoTips'
}
const params = {
...formObj,
assets
},
data = await createStaffHandover(params)
if (data) {
this.notice.okTips('操作成功')
this.btnLoding = false
this.step = 3
this.$emit("refresh")
}
} catch (error) {
console.log(error)
this.btnLoding = false
if (error && error.type) {
const { text, type } = error
this.notice[type](text || '未知错误')
}
if (typeof error == 'string') this.notice.errorTips(error || '未知错误')
}
}
}
}
</script>
<style lang="scss" scoped>
.flex {
display: flex;
align-items: center;
}
.detail-content {
::v-deep .el-dialog {
max-height: 70vh;
display: flex;
flex-direction: column;
.el-dialog__body {
overflow-y: scroll;
padding-bottom: 24px;
max-height: calc(100% - 137px);
}
.el-dialog__footer {
margin-top: auto;
border-top: 1px solid #e5e5e5;
}
.dialog-footer {
border-top: none;
padding-top: 10px;
}
}
.content {
.step-img {
display: block;
width: 1040px;
height: 103px;
margin: 0 auto;
}
}
.circle {
display: inline-block;
border-radius: 50%;
width: 6px;
height: 6px;
margin-right: 8px;
vertical-align: middle;
}
.div-title {
display: flex;
align-items: center;
height: 50px;
font-size: 16px;
font-weight: 600;
color: #333333;
// margin: 10px 0 20px 0;
}
.block {
height: 24px;
}
.step-content {
position: relative;
width: 100%;
min-height: 82px;
.step-box {
position: absolute;
top: 0;
left: 0;
width: 100%;
visibility: hidden;
height: 0;
overflow: hidden;
}
.show {
visibility: visible;
height: auto;
}
}
.step2 {
min-height: 264px;
// min-height: 298px;
}
.hide {
min-height: 0 !important;
}
.agree-box {
position: absolute;
top: 10px;
left: 0;
display: flex;
align-items: center;
height: 36px;
color: #666666;
font-size: 14px;
::v-deep.el-checkbox__label {
color: #666666;
}
}
}
</style>
<template>
<el-form
label-width="150px"
size="small"
>
<div class="flex">
<template v-for="(i,index) in formList">
<el-form-item
:label="`${i.label}:`"
:key="index"
>
<el-select
v-model="formObj[i.key]"
:placeholder="placeholder(i.key)"
@change="changeSelect($event,i.options ,i.key)"
class="select"
filterable
:disabled="i.disabled"
>
<el-option
v-for="(subItem, subIndex) in i.options"
:key="subIndex"
:label="subItem.label"
:value="subItem.userId"
:disabled="subItem.disabled"
/>
</el-select>
</el-form-item>
</template>
</div>
</el-form>
</template>
<script type='text/ecmascript-6'>
import { getStaffHandoverUserList } from "@api/usedCarManagement"
export default {
name: 'Step-1',
props: {
loading: Boolean
},
data () {
return {
formObj: {
originalUserId: '',
newUserId: ''
},
formList: [
{
label: '原责任人(离职)',
key: 'originalUserId',
options: [],
disabled: false
},
{
label: '新接收人(接手)',
key: 'newUserId',
options: [],
disabled: true
}
],
}
},
computed: {
},
mounted () {
},
methods: {
init () {
this.formObj = this.$options.data.call(this).formObj
this.formList = this.$options.data.call(this).formList
this.getStaffHandoverUserList()
},
placeholder (key) {
let text = '请选择员工'
if (key == 'newUserId' && !this.formObj[key] && !this.formObj.originalUserId) text = '请先选择原责任人'
return text
},
async getStaffHandoverUserList (merchantNo = '') {
try {
let params = {}
if (merchantNo) params.merchantNo = merchantNo
const data = await getStaffHandoverUserList(params)
this.$emit('update:loading', false)
if (data && data.length) {
console.log('触发了')
data.map(e => {
e.label = `${e.userName}/${e.merchantName}`
if (merchantNo) e.disabled = e.userId == this.formObj.originalUserId
})
let index = merchantNo ? 1 : 0
this.$set(this.formList[index], 'options', data)
this.$set(this.formList[index], 'disabled', false)
}
} catch (error) {
console.log(error)
}
},
changeSelect (val, options, key) {
try {
const item = options.find(k => k.userId === val)
if (key === 'originalUserId') {
this.formObj.newUserId = ''
if (!item) throw '获取门店号失败'
this.$emit('update:loading', true)
this.getStaffHandoverUserList(item.merchantNo)
}
const keyName = key == 'originalUserId' ? 'original' : 'new'
Object.assign(this.formObj, {
[`${keyName}UserName`]: item.userName,
[`${keyName}MerchantId`]: item.merchantNo,
[`${keyName}MerchantName`]: item.merchantName,
})
console.log(this.formObj)
} catch (error) {
if (error) this.$message.error(error)
}
}
}
}
</script>
<style scoped lang='scss'>
.flex {
display: flex;
align-items: center;
justify-content: space-between;
padding-top: 20px;
padding-bottom: 11px;
}
// .form-item {
// margin-right: 0 !important;
// }
// .marginRight {
// margin-right: 64px !important;
// }
.select {
width: 338px;
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="step-2-box">
<div class="title">待交接资产列表</div>
<d2-table
ref="table"
:table-data="listData"
:table-params="tableParams"
:hasPage="false"
>
<template #statusHtml="scope">
<span
class="circle"
:style="{
background:CODE_STATUS_COLOR[scope.scope[scope.prop]]
}"
></span>
{{CODE_STATUS[scope.scope[scope.prop]] || "-" }}
</template>
<template #auth-button="scope">
<template v-if="scope.scope.signCustodyStatus">
<template v-if="scope.scope.proofUrls.length < 5">
<el-button
type="text"
class="upload"
>上传凭证
<input
type="file"
:id="'fileUpload' + scope.index"
class="import-input"
accept=".pdf,image/jpeg,image/png,image/bmp"
@change="(e) => importFile(e, scope.index)"
/>
</el-button>
</template>
<template v-for="(i,index) in scope.scope.proofUrls">
<div
class="btn-list"
:key="index"
>
<template v-if="i">
<el-button
type="text"
@click="view(scope.scope.proofUrls, i)"
>查看凭证</el-button>
<el-button
type="text"
@click="del(scope.index, index)"
>删除</el-button>
</template>
</div>
</template>
</template>
<template v-else>
-
</template>
</template>
</d2-table>
<div class="block"></div>
<el-image-viewer
v-if="imgViewerVisible"
:on-close="closeImgViewer"
:url-list="currentImgUrls"
:initial-index="currentIndex"
/>
</div>
</template>
<script type='text/ecmascript-6'>
import GlOssApi from "glsk-oss-jssdk"
import { baseConfig } from "@/main"
export default {
name: 'Step-2',
props: {
tableData: {
type: Array,
default: () => []
}
},
components: {
"el-image-viewer": () => import("element-ui/packages/image/src/image-viewer")
},
data () {
return {
currentImgUrl: '',
imgViewerVisible: false,
GlOssApi: null,
CODE_STATUS_COLOR: {
true: "#2CCA74",
false: "#EB4E4E"
},
CODE_STATUS: {
true: "已签协议",
false: "未签署"
},
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "records",
mutiSelectUniqueKey: "evalOrderNo",
mutiSelectName: "contentIndex",
tableOption: {
width: "150"
},
tableColumns: [
{
label: "评估单号",
prop: "evalOrderNo",
minWidth: 157
},
{
label: "门店",
prop: "sellerMerchantName",
minWidth: 157
},
{
label: "车型",
prop: "carModel",
minWidth: 261
},
{
label: "车牌",
prop: "licensePlate",
minWidth: 110
},
{
label: "协议状态",
prop: "signCustodyStatus",
minWidth: 110,
addHtml: 'statusHtml'
},
]
},
listData: [],
currentIndex: 0,
currentImgUrls: []
}
},
watch: {
tableData: {
handler (val) {
this.imgViewerVisible = false
this.currentImgUrls = []
this.listData = val || []
this.GlOssApi = new GlOssApi({
baseConfig
})
},
immediate: true,
deep: true
}
},
mounted () {
},
methods: {
filterArr () {
const arr = []
if (this.$refs.table.mutiSelectArr.contentIndex?.length) this.$refs.table.mutiSelectArr.contentIndex.forEach(item => arr.push({
evalOrderNo: item.evalOrderNo,
proofUrls: item.proofUrls,
signCustodyStatus: item.signCustodyStatus
}))
return arr
},
handleOssUpload (file, fileName, success, fail) {
const bucketName = "jinrong-huidan-test" // 桶名
const fileType = fileName.substr(fileName.lastIndexOf(".") + 1)
this.GlOssApi.multipartUpload(file, success, fail, bucketName, fileType)
},
importFile (e, index) {
const fileInfo = e.srcElement.files[0],
fileName = fileInfo.name,
size = e.target.files[0].size / 1024 / 1024,
extension = fileName.split('.').pop().toLowerCase()
if (!['jpg', 'jpeg', 'png', 'bmp', 'webp', 'pdf'].includes(extension)) {
return this.notice.errorTips("只允许上传图片/PDF")
}
console.log(fileInfo)
if (size < 10) {
const success = (res) => {
console.log(res, '===')
console.log("上传文件成功")
this.notice.okTips("上传文件成功")
let { proofUrls } = this.listData[index]
proofUrls.push(res.aliyunAddress)
console.log(proofUrls, '===')
this.$set(this.listData[index], proofUrls, proofUrls)
}
const fail = (res) => {
this.notice.errorTips("上传文件失败")
}
this.handleOssUpload(
fileInfo,
fileName,
success,
fail
)
} else {
this.notice.errorTips("上传文件不可超过10M")
}
e.target.value = ""
},
del (index, subIndex) {
console.log(index, subIndex)
this.listData[index].proofUrls.splice(subIndex, 1)
},
view (list, url) {
let type = this.getFileTypeFromUrl(url)
if (type === 'image') {
const urls = list.filter(i => this.getFileTypeFromUrl(i) == 'image'),
index = urls.findIndex(i => i === url)
this.currentImgUrls = urls
this.currentIndex = index
this.imgViewerVisible = true
} else window.open(url)
},
getFileTypeFromUrl (url) {
if (!url) return 'file'
const extension = url.split('.').pop().toLowerCase()
const imageExtensions = ['jpg', 'jpeg', 'png', 'bmp', 'webp']
return imageExtensions.includes(extension) ? 'image' : 'file'
},
closeImgViewer () {
this.imgViewerVisible = false
},
}
}
</script>
<style scoped lang='scss'>
.step-2-box {
.title {
height: 50px;
color: #333333;
font-size: 16px;
font-weight: 500;
line-height: 50px;
}
.upload {
position: relative;
.import-input {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
}
}
.btn-list {
margin-top: 2px;
}
}
.circle {
display: inline-block;
border-radius: 50%;
width: 6px;
height: 6px;
margin-right: 8px;
vertical-align: middle;
}
::v-deep .el-image-viewer__wrapper {
width: 100vw;
height: 100vh;
.el-image-viewer__close {
color: #fff;
}
}
.block {
height: 24px;
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<baseDialog
:is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
class="detail-content-warn"
>
<div
v-loading="loading"
class="form_div"
ref="form"
>
<div class="info flex">
<template v-for="(i,index) in infoList">
<div
:key="index"
class="info-item"
>
<div class="info-label">{{i.label}}</div>
<div class="info-value">{{detailInfo[i.key] || '-'}}</div>
</div>
</template>
</div>
<div class="div-title">待交接资产列表</div>
<d2-table
:has-page="false"
:table-data="detailInfo.details"
:table-params="tableParams"
>
<template #statusHtml="scope">
<span
class="circle"
:style="{
background:
CODE_STATUS_COLOR[scope.scope[scope.prop]]
}"
></span>
<!-- baseData[scope.columnsObj.colorKey][scope.scope[scope.prop]] -->
{{CODE_STATUS[scope.scope[scope.prop]] || "-" }}
<!-- baseData[scope.columnsObj.enumKey][scope.scope[scope.prop]] || "-" -->
</template>
<template #auth-button="scope">
<template v-if="scope.scope.signCustodyStatus && scope.scope.proofUrls && scope.scope.proofUrls.length">
<template v-for="(i, index) in scope.scope.proofUrls">
<div :key="index">
<el-button
size="mini"
type="text"
@click="handleView(scope.scope.proofUrls,i)"
>查看凭证</el-button>
</div>
</template>
</template>
<template v-else>
-
</template>
</template>
</d2-table>
<div class="block"></div>
</div>
<el-image-viewer
v-if="imgViewerVisible"
:on-close="closeImgViewer"
:url-list="currentImgUrls"
:initial-index="currentIndex"
/>
</baseDialog>
</template>
<script>
import { getStaffHandoverDetail } from "@api/usedCarManagement"
// import reportTrackPageMixin from "@/mixins/reportTrackPageMixin"
export default {
// mixins: [reportTrackPageMixin],
name: "Detail",
components: {
"el-image-viewer": () => import("element-ui/packages/image/src/image-viewer")
},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
dialogShow: {
get () {
return this.visible
},
set (val) {
this.$emit('update:visible', false)
}
}
},
mounted () { },
watch: {
visible: {
handler (val) {
if (val) {
this.currentImgUrls = []
this.loading = true
this.getDetail()
} else {
this.detailInfo = {}
}
},
immediate: true,
deep: true
}
},
data () {
return {
CODE_STATUS: {
true: '已签署',
false: '未签署'
},
CODE_STATUS_COLOR: {
true: '#2CCA74',
false: '#EB4E4E'
},
imgViewerVisible: false,
currentIndex: 0,
currentImgUrls: [],
dialogConfig: {
setting: {
isShowFooter: true,
showClose: true,
appendToBody: false,
btnList: [],
hideConfirmBtn: true,
cancel_name: "返回"
},
config: {
title: "详情",
width: "1080px"
}
},
detailInfo: {},
loading: false,
tableData: [],
infoList: [
{
label: '交接批次号',
key: 'handoverBatchNo'
},
{
label: '操作时间',
key: 'handoverTime'
},
{
label: '操作人',
key: 'createdBy'
}
],
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableOption: false,
tableOption: {
width: "150"
},
tableColumns: [
{
label: "评估单号",
prop: "evalOrderNo",
minWidth: 157,
},
{
label: "门店",
prop: "sellerMerchantName",
minWidth: 157
},
{
label: "车型",
prop: "carModel",
minWidth: 261,
},
{
label: "车牌",
prop: "licensePlate",
minWidth: 110,
},
{
label: "当时协议状态",
minWidth: 110,
addHtml: 'statusHtml',
prop: 'signCustodyStatus'
}
]
},
}
},
methods: {
getDetail () {
const params = { id: this.paramsObj.id }
getStaffHandoverDetail(params).then((res) => {
this.detailInfo = res
this.loading = false
})
},
handleView (list, url) {
let type = this.getFileTypeFromUrl(url)
if (type === 'image') {
const urls = list.filter(i => this.getFileTypeFromUrl(i) == 'image'),
index = urls.findIndex(i => i === url)
this.currentImgUrls = urls
this.currentIndex = index
this.imgViewerVisible = true
} else window.open(url)
},
getFileTypeFromUrl (url) {
if (!url) return 'file'
const extension = url.split('.').pop().toLowerCase()
const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']
return imageExtensions.includes(extension) ? 'image' : 'file'
},
closeImgViewer () {
this.imgViewerVisible = false
},
}
}
</script>
<style lang="scss" scoped>
.flex {
display: flex;
align-items: center;
}
.detail-content-warn {
::v-deep .el-dialog {
max-height: 70vh;
display: flex;
flex-direction: column;
.el-dialog__body {
overflow-y: scroll;
padding-bottom: 24px;
max-height: calc(100% - 137px);
}
.el-dialog__footer {
margin-top: auto;
border-top: 1px solid #e5e5e5;
}
.dialog-footer {
border-top: none;
padding-top: 10px;
}
}
.info {
border-radius: 4px;
background: #fafafa;
padding: 16px 20px;
color: #333333;
gap: 0 80px;
&-item {
flex-shrink: 0;
}
&-label {
font-size: 16px;
font-weight: 600;
line-height: 23px;
margin-bottom: 8px;
}
&-value {
font-size: 14px;
line-height: 20px;
}
}
.circle {
display: inline-block;
border-radius: 50%;
width: 6px;
height: 6px;
margin-right: 8px;
vertical-align: middle;
}
.div-title {
display: flex;
align-items: center;
height: 50px;
font-size: 16px;
font-weight: 600;
color: #333333;
// margin: 10px 0 20px 0;
}
.block {
height: 24px;
}
::v-deep .el-image-viewer__wrapper {
width: 100vw;
height: 100vh;
.el-image-viewer__close {
color: #fff;
}
}
}
</style>
<!-- 车辆台账 -->
<template>
<d2-container class="container">
<div
class="header"
slot="header"
>
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData"
label-width="150px"
>
</d2-search>
<div class="up-btns">
<el-button
:id="tableParams.btnId"
size="small"
type="primary"
handle
>
查询
</el-button>
<el-button
size="small"
@click="handleReset"
> 重置 </el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<auth-button
category="Button"
:show-btn-ids="['9200701']"
/>
</d2-table-header>
<d2-table
ref="quitAndHandoverTable"
:search-form="{
t: searchFormSearch
}"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
:hasNum="false"
>
<template #auth-button="scope">
<auth-button
:data="scope.scope"
:show-btn-ids="['9200702']"
/>
</template>
</d2-table>
</div>
<detail
:visible.sync="detailVisible"
:params-obj="detailParams"
/>
<addHandover
:visible.sync="addHandoverVisible"
@refresh="refreshTable"
/>
</d2-container>
</template>
<script>
import { deepClone } from "@/common/util"
import { getStaffHandover } from "@api/usedCarManagement"
import detail from './components/detail.vue'
import addHandover from './components/addHandover/index.vue'
// import {
// } from "./contant"
import dayjs from "dayjs"
// import reportTrackPageMixin from "@/mixins/reportTrackPageMixin"
export default {
name: "quitAndHandover",
components: {
detail,
addHandover
},
// mixins: [reportTrackPageMixin],
data () {
return {
noDataUrl: require("@/assets/noData.png"),
statusEnum: {},
searchForm: {
name: "",
dateValue: ''
},
showFormData: [
{
label: "原责任人/新接收人",
name: "name",
type: "input",
isClear: true,
maxlength: 20
},
{
label: "交接时间",
name: "dateValue",
type: "datePicker",
dateType: "datetimerange",
isClear: true,
defaultTime: ["00:00:00", "23:59:59"]
},
],
tableSearchForm: {},
getListApi: getStaffHandover,
searchFormSearch: {},
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "records",
tableOption: {
width: "96"
},
tableColumns: [
{
label: "交接批次号",
prop: "handoverBatchNo",
minWidth: 156
},
{
label: "交接时间",
prop: "handoverTime",
minWidth: 121
},
{
label: "原责任人 (离职)",
prop: "originalUserName",
minWidth: 176,
formatter: (cellValue) => {
return `${cellValue.originalUserName || '-'}/${cellValue.originalMerchantName || '-'}`
}
},
{
label: "新接收人",
prop: "newUserName",
minWidth: 176,
formatter: (cellValue) => {
return `${cellValue.newUserName || '-'}/${cellValue.newMerchantName || '-'}`
}
},
{
label: "交接资产数/辆",
prop: "assetCount",
minWidth: 176
},
{
label: "交接类型",
prop: "handoverType",
minWidth: 168,
formatter: (cellValue) => {
return {
1: "普通交接",
2: "实物交接"
}[cellValue.handoverType] || '-'
}
},
]
},
detailVisible: false,
detailParams: {},
addHandoverVisible: false
}
},
computed: {
},
mounted () {
},
methods: {
handleReset () {
this.searchForm = this.$options.data.call(this).searchForm
this.$refs.quitAndHandoverTable.refreshTable(true, true)
},
beforeSearchFn () {
return new Promise((resolve) => {
this.searchFormSearch = this.getParams()
resolve()
})
},
getParams () {
const params = deepClone(this.searchForm)
if (params.dateValue) {
const [srart, end] = params.dateValue
params.startTime = dayjs(srart).format("YYYY-MM-DD HH:mm:ss")
params.endTime = dayjs(end).format("YYYY-MM-DD HH:mm:ss")
}
delete params.dateValue
return params
},
handleDetail (e) {
this.detailVisible = true
this.detailParams = e
},
handleAddHandover () {
this.addHandoverVisible = true
},
refreshTable () {
this.$refs.quitAndHandoverTable.refreshTable(true, true)
}
}
}
</script>
<style scoped lang="scss">
.merchant-num {
color: #185efe;
}
.circle {
display: inline-block;
border-radius: 50%;
width: 6px;
height: 6px;
margin-right: 8px;
vertical-align: middle;
}
.merchant-wrap {
max-height: 400px;
overflow-y: auto;
}
.img-block {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
// ::v-deep .el-image__preview {
// cursor: zoom-in;
// }
.img {
width: 100%;
height: 100%;
}
.mask {
background: #00000066;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
opacity: 0;
transition: all 0.1s;
z-index: 2;
pointer-events: none;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 16px;
}
&:hover {
.mask {
opacity: 1;
}
}
}
.select-date-picker {
display: flex;
align-items: center;
.select {
height: 32px !important;
width: 130px !important;
::v-deep .el-input__inner {
border-radius: 4px 0 0 4px !important;
}
}
.date-picker {
width: calc(100% - 130px) !important;
border-left-color: transparent;
border-radius: 0 4px 4px 0 !important;
}
::v-deep .el-range-editor.is-active,
::v-deep .el-range-editor.is-active:hover {
border-left-color: #2a58ad;
}
}
</style>
const CODE_STATUS = {
1: '审核中',
2: '已通过',
3: '已驳回',
4: '已撤销'
}
const CODE_STATUS_COLOR = {
1: "#FDB757",
2: "#2CCA74",
3: "#EB4E4E",
4: '#B8B8B8'
}
const PAYMENT_TYPE = {
2: '是',
1: '否'
}
const WHETHER = {
1: '是',
0: '否'
}
const PAYMENT_TYPE_OPTIONS = Object.keys(PAYMENT_TYPE).map((key) => {
return {
label: PAYMENT_TYPE[key],
value: +key
}
}).sort((a, b) => b.value - a.value)
const IS_IN_STOCK_OPTIONS = Object.keys(WHETHER).map((key) => {
return {
label: WHETHER[key],
value: +key
}
}).sort((a, b) => b.value - a.value)
const formatterPrice = (cellValue) => {
return cellValue != null ? `¥${cellValue.toFixed(2)}` : '-'
}
const TABLECOLUMNS = [
{
label: "评估单编号",
prop: "evalOrderNo",
minWidth: 176
},
{
label: "评估单时间",
prop: "orderCreatedTime",
minWidth: 176
},
{
label: "评估单来源",
prop: "source",
minWidth: 96,
formatter: (cellValue) => {
return {
1: 'APP',
2: '小程序',
3: '人工导入'
}[cellValue.source] || '-'
}
},
{
label: "总部定价师",
prop: "evalOperatorName",
minWidth: 120
},
{
label: "转让协议签署",
minWidth: 120,
formatter: (cellValue) => {
return WHETHER[cellValue.transferAgreementSigned] || '-'
}
},
{
label: "交接确认单签署",
minWidth: 120,
formatter: (cellValue) => {
return WHETHER[cellValue.handoverConfirmSigned] || '-'
}
},
{
label: "补充协议签署",
minWidth: 120,
formatter: (cellValue) => {
return WHETHER[cellValue.supplementaryAgreementSigned] || '-'
}
},
{
label: "代保管协议签署",
minWidth: 120,
formatter: (cellValue) => {
return WHETHER[cellValue.custodyAgreementSigned] || '-'
}
},
{
label: "企微审批单号(定金)",
prop: "depositOaFlowCode",
minWidth: 172
},
{
label: "企微审批状态(定金)",
minWidth: 172,
prop: 'depositOaFlowStatus',
addHtml: 'statusHtml'
},
{
label: "企微审批单号(尾款/全款)",
prop: "finalPaymentOaFlowCode",
minWidth: 206
},
{
label: "企微审批状态(尾款/全款)",
minWidth: 206,
prop: 'finalPaymentOaFlowStatus',
addHtml: 'statusHtml'
},
{
label: "门店",
prop: "sellerMerchantName",
minWidth: 152
},
{
label: "销售顾问",
prop: "sellerName",
minWidth: 120
},
{
label: "驻店人员",
prop: "conversionName",
minWidth: 120
},
{
label: "签约人",
prop: "previousOwnerName",
minWidth: 120
},
{
label: "收款方",
prop: "payeeName",
minWidth: 120
},
{
label: "车牌号",
prop: "licensePlate",
minWidth: 120
},
{
label: "类别",
minWidth: 120,
formatter: (cellValue) => {
return {
1: '置换车',
2: '报废车'
}[cellValue.vehicleCategory] || '-'
}
},
{
label: "品牌",
prop: "carBrand",
minWidth: 120
},
{
label: "车架号",
prop: "vin",
minWidth: 176
},
{
label: "收购时间(付款)",
prop: "purchaseTime",
minWidth: 176
},
{
label: "收购价格/元(包含对公流量费)",
minWidth: 240,
formatter: (cellValue) => {
return formatterPrice(cellValue.contractPrice)
}
},
{
label: "是否全款",
minWidth: 120,
formatter: (cellValue) => {
return PAYMENT_TYPE[cellValue.paymentType] || '-'
}
},
{
label: "定金时间",
prop: "depositTime",
minWidth: 176
},
{
label: "定金金额",
minWidth: 120,
formatter: (cellValue) => {
return formatterPrice(cellValue.depositAmount)
}
},
{
label: "尾款时间",
prop: "finalPaymentTime",
minWidth: 176
},
{
label: "尾款金额",
minWidth: 120,
formatter: (cellValue) => {
return formatterPrice(cellValue.finalPaymentAmount)
}
},
{
label: "入库时间",
prop: "storageTime",
minWidth: 176
},
{
label: "是否交付",
minWidth: 120,
formatter: (cellValue) => {
return WHETHER[cellValue.isDelivered] || '-'
}
},
{
label: "是否在库",
minWidth: 120,
formatter: (cellValue) => {
return WHETHER[cellValue.isInStock] || '-'
}
},
{
label: "在库时长/天",
prop: "daysInStock",
minWidth: 120
},
{
label: "是否拍卖",
minWidth: 120,
formatter: (cellValue) => {
return WHETHER[cellValue.isAuctioned] || '-'
}
},
{
label: "拍卖价格",
minWidth: 120,
formatter: (cellValue) => {
return formatterPrice(cellValue.sellingPrice)
}
},
{
label: "拍卖时间",
prop: "auctionTime",
minWidth: 176
},
{
label: "收款时间",
prop: "sellingTime",
minWidth: 176
},
{
label: "付款方",
prop: "seller",
minWidth: 120
},
{
label: "收拍利润",
minWidth: 120,
formatter: (cellValue) => {
return formatterPrice(cellValue.profit)
}
},
{
label: "拍卖平台",
prop: "auctionPlatform",
minWidth: 120
},
{
label: "备注",
prop: "sellingNotes",
minWidth: 120
},
{
label: "车主身份证号码",
prop: "partAIdentityCode",
minWidth: 150
},
{
label: "电话",
prop: "partAContactMobile",
minWidth: 120
},
{
label: "卖方单位/个人地址",
prop: "partAAddress",
minWidth: 150
},
{
label: "登记证号",
prop: "registrationNo",
minWidth: 120
},
{
label: "厂牌(品牌)型号",
prop: "brandModel",
minWidth: 144
},
{
label: "车辆类型",
prop: "vehicleType",
minWidth: 120
},
{
label: "是否对账",
prop: "isReconciled",
minWidth: 120
},
]
module.exports = {
TABLECOLUMNS,
CODE_STATUS,
CODE_STATUS_COLOR,
PAYMENT_TYPE_OPTIONS,
IS_IN_STOCK_OPTIONS
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!