Commit eff157d2 by 李伟康

```

feat(baseDialog): 修改取消按钮点击事件并新增自定义关闭属性

- 将取消按钮的 click 事件由直接修改 visible 改为调用 cancelBtn 方法
- 新增 customClose 属性用于控制是否自定义关闭行为
- 在 cancelBtn 方法中根据 customClose 判断是否自动关闭弹窗,并触发 cancelBtn 事件

feat(router): 更新二手车管理路由配置

- 修改“新增人员交接”按钮 handle 名称为 handleAddHandover
- 增加“详情”按钮权限及对应处理方法 handleDetail

feat(detailDialog): 优化收款银行名称输入框与样式布局

- 给 rcvBankName 输入框添加 maxlength="50" 限制长度
- 调整 dialog 样式结构,使用 flex 布局使页脚始终位于底部
- 修复 catch 回调函数箭头语法错误
- 修正 CSS 类名 rcv-btn 的拼写问题

feat(quitAndHandover): 重构页面组件并增加查询功能

- 使用 d2-container、d2-search 和 d2-table 等组件重构整体页面结构
- 添加搜索表单支持原责任人/接收人和交接时间筛选
- 实现 handleReset 方法重置搜索条件
- 引入详情弹窗和新增交接弹窗组件
- 新增 handleDetail 和 handleAddHandover 按钮事件处理逻辑

refactor(contant): 合并常量枚举并统一格式化方式

- 将多个是否类型的枚举合并为一个 WHETHER 枚举对象
- 更新表格列 formatter 函数引用新的 WHETHER 枚举
- 移除冗余的枚举定义和重复代码

feat(vehicleLedger): 增强 VIN 输入校验和导出按钮结构调整

- 在搜索区域增加 VIN 输入框并绑定 filterSourceNo 过滤方法
- 增加中文输入法兼容处理 compositionstart/compositionend 事件
- 移除外层 span 包裹的 auth-button 导出按钮
- 替换 statusHtml 插槽为 template 写法提升可读性
- 在请求参数中过滤掉空值字段避免无效请求
```
1 parent 8c645210
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
> >
<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"> <el-button v-preventReClick @click="cancelBtn">
{{ config.cancel_name }} {{ config.cancel_name }}
</el-button> </el-button>
<el-button <el-button
...@@ -70,7 +70,7 @@ export default { ...@@ -70,7 +70,7 @@ export default {
appendToBody: false, // 是否将自身插入至 body 元素,有嵌套的弹窗时一定要设置 appendToBody: false, // 是否将自身插入至 body 元素,有嵌套的弹窗时一定要设置
isShowFooter: true, isShowFooter: true,
cancel_name: "取 消", cancel_name: "取 消",
confirm_name: "确 定" confirm_name: "确 定",
} }
} }
}, },
...@@ -83,7 +83,8 @@ export default { ...@@ -83,7 +83,8 @@ export default {
// 手动设置确定按钮loding // 手动设置确定按钮loding
type: Boolean, type: Boolean,
default: false default: false
} },
customClose:Boolean, // 自定义关闭
// width: { // width: {
// //弹窗宽度 // //弹窗宽度
// type: String, // type: String,
...@@ -132,6 +133,11 @@ export default { ...@@ -132,6 +133,11 @@ export default {
confirmBtn() { confirmBtn() {
// 触发保存 // 触发保存
this.$emit("handleClick") this.$emit("handleClick")
},
cancelBtn() {
if(!this.customClose) this.visible = false
// 触发取消
this.$emit("cancelBtn")
} }
}, },
created() { created() {
......
...@@ -367,9 +367,15 @@ export const routerName = { ...@@ -367,9 +367,15 @@ export const routerName = {
label: "新增人员交接", label: "新增人员交接",
category: "Button", category: "Button",
type: "primary", type: "primary",
handle: "handleExport", handle: "handleAddHandover",
icon: 'plus' icon: 'plus'
}, },
{
authId: "9200702",
parentId: "92007",
label: "详情",
handle: "handleDetail"
},
], ],
component: _import("usedCarManagement/quitAndHandover/index") component: _import("usedCarManagement/quitAndHandover/index")
}, },
......
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
v-model="detailInfo.rcvBankName" v-model="detailInfo.rcvBankName"
:readonly="detailInfo.pushStatus != 2" :readonly="detailInfo.pushStatus != 2"
class="rcv-input" class="rcv-input"
maxlength="50"
> >
</el-input> </el-input>
<template v-if="detailInfo.pushStatus == 2"> <template v-if="detailInfo.pushStatus == 2">
...@@ -363,7 +364,7 @@ export default { ...@@ -363,7 +364,7 @@ export default {
this.getDetail() this.getDetail()
this.refreshFlag = true this.refreshFlag = true
} }
}).catch(()=>{ }).catch(() => {
this.rcvLoading = false this.rcvLoading = false
}) })
} catch (error) { } catch (error) {
...@@ -384,13 +385,18 @@ export default { ...@@ -384,13 +385,18 @@ 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); max-height: calc(100% - 137px);
} }
.el-dialog__footer {
margin-top: auto;
border-top: 1px solid #e5e5e5;
}
.dialog-footer { .dialog-footer {
border-top: none; border-top: none;
padding-top: 10px; padding-top: 10px;
...@@ -433,7 +439,7 @@ export default { ...@@ -433,7 +439,7 @@ export default {
.rcv-input { .rcv-input {
width: 274px; width: 274px;
} }
.rcv-btn{ .rcv-btn {
margin-left: 8px; margin-left: 8px;
max-width: 80px !important; max-width: 80px !important;
min-width: 80px !important; min-width: 80px !important;
......
<template>
<div :class="['tips-box',{finish: step == 3}]">
<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]
},
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}`]
}
},
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;
}
}
.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-warn"
customClose
@handleClick="handleClick"
@cancelBtn="handleDetailClose"
>
<div
v-loading="loading"
class="content"
>
<img
:src="stepImg"
class="step-img"
>
<tips-box :step="step" />
<template v-if="step != 3">
<div :class="['step-box',{show:step == 1}]">
<Step1 />
</div>
<div :class="['step-box',{show:step == 2}]">
<Step2 />
</div>
</template>
<div class="block"></div>
</div>
</baseDialog>
</template>
<script>
import { getVehicleLedger } from "@api/usedCarManagement"
import dayjs from "dayjs"
// import reportTrackPageMixin from "@/mixins/reportTrackPageMixin"
import TipsBox from "./TipsBox"
import Step1 from "./step-1"
import Step2 from "./step-2"
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]
}
},
mounted () { },
watch: {
visible: {
handler (val) {
if (val) {
this.step = 1
// this.loading = true
// this.getDetail()
} else {
this.detailInfo = {}
}
},
immediate: true,
deep: true
}
},
data () {
return {
step: 1,
CODE_STATUS: {},
CODE_STATUS_COLOR: {},
dialogConfig: {
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: "314"
},
tableColumns: [
{
label: "评估单号",
prop: "evalOrderNo",
minWidth: 157,
},
{
label: "车型",
prop: "carModel",
minWidth: 261,
},
{
label: "车牌",
prop: "licensePlate",
minWidth: 110,
},
{
label: "当时协议状态",
minWidth: 110,
addHtml: 'statusHtml'
}
]
},
}
},
methods: {
getDetail () {
getVehicleLedger({}).then((res) => {
this.detailInfo = res
this.loading = false
})
},
handleDetailClose () {
const { step } = this
console.log(step)
if (step != 2) return this.$emit('update:visible', false)
else this.step = 1
},
handleClick () {
const { step } = this
this.step = step + 1
}
}
}
</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;
}
}
.content {
.step-img {
width: 1040px;
height: 103px;
}
}
.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;
}
}
</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"
>
<!-- :class="['form-item',{marginRight:index == 0}]" -->
<el-select
v-model="formObj[i.key]"
placeholder="请选择"
@change="changeSelect($event,i.key)"
class="select"
filterable
>
<el-option
v-for="(subItem, subIndex) in i.options"
:key="subIndex"
:label="subItem.label"
:value="subItem.value"
/>
</el-select>
</el-form-item>
</template>
</div>
</el-form>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'Step-1',
data () {
return {
formObj: {},
formList: [
{
label: '原责任人(离职)',
key: 'originalUserId',
options: []
},
{
label: '新接收人(接手)',
key: 'newUserId',
options: []
}
]
}
},
computed: {
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.flex{
display: flex;
align-items: center;
justify-content: space-between;
padding-top: 20px;
}
// .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>
123
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
</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.proofUrls">
<el-button
size="mini"
type="text"
>查看凭证</el-button>
</template>
<template v-else>
-
</template>
</template>
</d2-table>
<div class="block"></div>
</div>
</baseDialog>
</template>
<script>
import { getVehicleLedger } from "@api/usedCarManagement"
import dayjs from "dayjs"
// import reportTrackPageMixin from "@/mixins/reportTrackPageMixin"
export default {
// mixins: [reportTrackPageMixin],
name: "Detail",
components: {},
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.loading = true
this.getDetail()
} else {
this.detailInfo = {}
}
},
immediate: true,
deep: true
}
},
data () {
return {
CODE_STATUS: {},
CODE_STATUS_COLOR: {},
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: "314"
},
tableColumns: [
{
label: "评估单号",
prop: "evalOrderNo",
minWidth: 157,
},
{
label: "车型",
prop: "carModel",
minWidth: 261,
},
{
label: "车牌",
prop: "licensePlate",
minWidth: 110,
},
{
label: "当时协议状态",
minWidth: 110,
addHtml: 'statusHtml'
}
]
},
}
},
methods: {
getDetail () {
// const params = { id: this.paramsObj.id }
getVehicleLedger({}).then((res) => {
this.detailInfo = res
this.loading = false
})
},
}
}
</script>
<style lang="scss" scoped>
.flex {
display: flex;
align-items: center;
}
.detail-content-warn {
::v-deep .el-dialog {
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;
}
.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;
}
}
</style>
<!-- 车辆台账 -->
<template> <template>
<div> <d2-container class="container">
<div
class="header"
slot="header"
>
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData"
label-width="130px"
>
</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 <auth-button
category="Button" category="Button"
:show-btn-ids="['9200701']" :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> </div>
<detail
:visible.sync="detailVisible"
:params-obj="detailParams"
/>
<addHandover :visible.sync="addHandoverVisible" />
</d2-container>
</template> </template>
<script type='text/ecmascript-6'> <script>
export default { import { deepClone } from "@/common/util"
name: '', import { getVehicleLedger } 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 () { data () {
return { 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: getVehicleLedger,
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
},
{
label: "新接收人",
prop: "newUserName",
minWidth: 176
},
{
label: "交接资产数/辆",
prop: "assetCount",
minWidth: 176
},
{
label: "交接类型",
prop: "handoverType",
minWidth: 168,
formatter: (cellValue) => {
return {
1: "普通交接",
2: "实物交接"
}[cellValue.handoverType] || '-'
}
},
]
},
detailVisible: false,
detailParams: {},
addHandoverVisible: false
} }
}, },
computed: {
},
mounted () { mounted () {
}, },
methods: { 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) {
console.log(e)
this.detailVisible = true
this.detailParams = {}
},
handleAddHandover(){
this.addHandoverVisible = true
} }
} }
}
</script> </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;
}
<style scoped lang='scss'> .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> </style>
...@@ -14,22 +14,22 @@ const PAYMENT_TYPE = { ...@@ -14,22 +14,22 @@ const PAYMENT_TYPE = {
2: '是', 2: '是',
1: '否' 1: '否'
} }
const IS_IN_STOCK = { const WHETHER = {
1: '是', 1: '是',
0: '否' 0: '否'
} }
const PAYMENT_TYPE_OPTIONS = Object.keys(PAYMENT_TYPE).map((key) => { const PAYMENT_TYPE_OPTIONS = Object.keys(PAYMENT_TYPE).map((key) => {
return { return {
label: PAYMENT_TYPE[key], label: PAYMENT_TYPE[key],
value: key value: +key
} }
}) }).sort((a, b) => b.value - a.value)
const IS_IN_STOCK_OPTIONS = Object.keys(IS_IN_STOCK).map((key) => { const IS_IN_STOCK_OPTIONS = Object.keys(WHETHER).map((key) => {
return { return {
label: IS_IN_STOCK[key], label: WHETHER[key],
value: key value: +key
} }
}) }).sort((a, b) => b.value - a.value)
const formatterPrice = (cellValue) => { const formatterPrice = (cellValue) => {
return cellValue != null ? `¥${cellValue.toFixed(2)}` : '-' return cellValue != null ? `¥${cellValue.toFixed(2)}` : '-'
} }
...@@ -60,40 +60,28 @@ const TABLECOLUMNS = [ ...@@ -60,40 +60,28 @@ const TABLECOLUMNS = [
label: "转让协议签署", label: "转让协议签署",
minWidth: 120, minWidth: 120,
formatter: (cellValue) => { formatter: (cellValue) => {
return { return WHETHER[cellValue.transferAgreementSigned] || '-'
1: '是',
0: '否'
}[cellValue.transferAgreementSigned] || '-'
} }
}, },
{ {
label: "交接确认单签署", label: "交接确认单签署",
minWidth: 120, minWidth: 120,
formatter: (cellValue) => { formatter: (cellValue) => {
return { return WHETHER[cellValue.handoverConfirmSigned] || '-'
1: '是',
0: '否'
}[cellValue.handoverConfirmSigned] || '-'
} }
}, },
{ {
label: "补充协议签署", label: "补充协议签署",
minWidth: 120, minWidth: 120,
formatter: (cellValue) => { formatter: (cellValue) => {
return { return WHETHER[cellValue.supplementaryAgreementSigned] || '-'
1: '是',
0: '否'
}[cellValue.supplementaryAgreementSigned] || '-'
} }
}, },
{ {
label: "代保管协议签署", label: "代保管协议签署",
minWidth: 120, minWidth: 120,
formatter: (cellValue) => { formatter: (cellValue) => {
return { return WHETHER[cellValue.custodyAgreementSigned] || '-'
1: '是',
0: '否'
}[cellValue.custodyAgreementSigned] || '-'
} }
}, },
{ {
...@@ -220,17 +208,14 @@ const TABLECOLUMNS = [ ...@@ -220,17 +208,14 @@ const TABLECOLUMNS = [
label: "是否交付", label: "是否交付",
minWidth: 120, minWidth: 120,
formatter: (cellValue) => { formatter: (cellValue) => {
return { return WHETHER[cellValue.isDelivered] || '-'
1: '是',
0: '否'
}[cellValue.isDelivered] || '-'
} }
}, },
{ {
label: "是否在库", label: "是否在库",
minWidth: 120, minWidth: 120,
formatter: (cellValue) => { formatter: (cellValue) => {
return IS_IN_STOCK[cellValue.isInStock] || '-' return WHETHER[cellValue.isInStock] || '-'
} }
}, },
...@@ -243,10 +228,7 @@ const TABLECOLUMNS = [ ...@@ -243,10 +228,7 @@ const TABLECOLUMNS = [
label: "是否拍卖", label: "是否拍卖",
minWidth: 120, minWidth: 120,
formatter: (cellValue) => { formatter: (cellValue) => {
return { return WHETHER[cellValue.isAuctioned] || '-'
1: '是',
0: '否'
}[cellValue.isAuctioned] || '-'
} }
}, },
......
...@@ -12,6 +12,18 @@ ...@@ -12,6 +12,18 @@
:form-data="showFormData" :form-data="showFormData"
label-width="130px" label-width="130px"
> >
<template #filterInput>
<el-input
clear
v-model="searchForm.vin"
placeholder="请输入车架号"
clearable
:maxlength="20"
@input="filterSourceNo"
@compositionstart="isComposing = true"
@compositionend="handleCompositionEnd"
></el-input>
</template>
<template #selectDatePickerHtml> <template #selectDatePickerHtml>
<div class="select-date-picker"> <div class="select-date-picker">
<el-select <el-select
...@@ -58,15 +70,13 @@ ...@@ -58,15 +70,13 @@
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<span data-event-code="vehicle_management_list_export">
<auth-button <auth-button
category="Button" category="Button"
:show-btn-ids="['9200601']" :show-btn-ids="['9200601']"
/> />
</span>
</d2-table-header> </d2-table-header>
<d2-table <d2-table
ref="vehicleManagementTable" ref="vehicleLedgerTable"
:search-form="{ :search-form="{
t: searchFormSearch t: searchFormSearch
}" }"
...@@ -74,10 +84,7 @@ ...@@ -74,10 +84,7 @@
:get-list-api="getListApi" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn" :before-search-fn="beforeSearchFn"
> >
<div <template #statusHtml="scope">
slot="statusHtml"
slot-scope="scope"
>
<span <span
class="circle" class="circle"
:style="{ :style="{
...@@ -88,7 +95,7 @@ ...@@ -88,7 +95,7 @@
<!-- baseData[scope.columnsObj.colorKey][scope.scope[scope.prop]] --> <!-- baseData[scope.columnsObj.colorKey][scope.scope[scope.prop]] -->
{{CODE_STATUS[scope.scope[scope.prop]] || "-" }} {{CODE_STATUS[scope.scope[scope.prop]] || "-" }}
<!-- baseData[scope.columnsObj.enumKey][scope.scope[scope.prop]] || "-" --> <!-- baseData[scope.columnsObj.enumKey][scope.scope[scope.prop]] || "-" -->
</div> </template>
</d2-table> </d2-table>
</div> </div>
</d2-container> </d2-container>
...@@ -169,10 +176,11 @@ export default { ...@@ -169,10 +176,11 @@ export default {
}, },
{ {
label: "车架号", label: "车架号",
name: "vin", // name: "vin",
type: "input", // type: "input",
isClear: true, // isClear: true,
maxlength: 20 // maxlength: 20,
addHtml: 'filterInput'
}, },
{ {
label: "门店", label: "门店",
...@@ -240,9 +248,29 @@ export default { ...@@ -240,9 +248,29 @@ export default {
close: "d2admin/page/close" close: "d2admin/page/close"
}), }),
...mapActions("d2admin/user", ["actionSetDownloadList"]), ...mapActions("d2admin/user", ["actionSetDownloadList"]),
// 只允许英文字母/数字/ASCII 可见特殊字符(过滤中文及非 ASCII)
filterSourceNo (val) {
if (this.isComposing) return
const sanitized = (val || "").replace(/[^\x20-\x7E]/g, "")
const limited = sanitized.slice(0, 20)
if (val !== limited) {
this.searchForm.vin = limited
}
},
// 处理中文输入法组合输入结束后统一过滤
handleCompositionEnd () {
this.isComposing = false
const val = this.searchForm.vin || ""
const limited = val.replace(/[^\x20-\x7E]/g, "").slice(0, 20)
if (val !== limited) {
this.$nextTick(() => {
this.searchForm.vin = limited
})
}
},
handleReset () { handleReset () {
this.searchForm = this.$options.data.call(this).searchForm this.searchForm = this.$options.data.call(this).searchForm
this.$refs.vehicleManagementTable.refreshTable(true, true) this.$refs.vehicleLedgerTable.refreshTable(true, true)
}, },
getOptionsList () { getOptionsList () {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
...@@ -294,6 +322,11 @@ export default { ...@@ -294,6 +322,11 @@ export default {
server_provider_name: "gsc-vcp-web-facade", server_provider_name: "gsc-vcp-web-facade",
...this.getParams() ...this.getParams()
} }
Object.keys(params).forEach((key) => {
if (params[key] == null || params[key] == "") {
delete params[key]
}
})
const list = [ const list = [
...this.dowloadList, ...this.dowloadList,
{ {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!