Commit cd466856 by wangzhihui

```

feat(recruitment): 增加门店新增功能和表单验证优化

- 添加门店新增功能,支持创建新门店信息
- 增加门店地址省市区选择组件
- 添加主营品牌多选功能
- 增加近一月新车销量输入验证
- 完善表单验证规则,包括动态验证逻辑
- 优化新增招聘页面布局和样式
- 在api文件中添加文件头注释
- 修复基础信息组件的属性绑定问题
```
1 parent 86b520c3
/*
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2026-03-30 17:36:59
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2026-03-31 14:27:00
* @FilePath: \dj-car-life-system\src\api\recruitment.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
// 招聘管理
import request from "./request";
......
......@@ -7,99 +7,101 @@
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="baseInfo">
<detailComp :configData="configData" :detailInfo="detailInfo"></detailComp>
</div>
<div class="baseInfo">
<DetailComp :config-data="configData" :detail-info="detailInfo"></DetailComp>
</div>
</template>
<script>
import detailComp from "./detailComp.vue"
import detailComp from "./detailComp.vue";
export default {
components: {
detailComp
},
components: {
DetailComp: detailComp,
},
props: {
detailInfo: {
type: Object,
default: () => { },
},
},
data() {
const contentStyle = {
width: "100%",
display: 'inline-block',
overflow: 'hidden',
'text-overflow': 'ellipsis',
'white-space': 'nowrap'
}
return {
configData: [
{
title: "基础信息",
infoData: [
{
title: "门店名称",
key: "merchantName"
},
{
title: "近一月新车销售",
key: "salesVolume"
},
{
title: "主营品牌",
key: "brand",
style: contentStyle,
hasTooltip: true
},
{
title: "门店地址",
key: "merchantAddress",
style: contentStyle,
hasTooltip: true
},
{
title: "业务类型",
key: "businessTypeName"
},
{
title: "招聘类型",
key: "recruitmentTypeName"
},
{
title: "招聘数量",
key: "recruitmentQuantity"
},
{
title: "区域运营",
key: "regionOperationName"
},
{
title: "创建人",
key: "createdBy"
},
{
title: "申请时间",
key: "createdDate"
},
{
title: "需求描述",
key: "requirementDescription",
col: 24
}
]
}
]
}
},
methods: {
getStatusItem(baseData, optKey, row, rowKey) {
if (!baseData || !baseData[optKey] || !row) return null
data() {
const contentStyle = {
"width": "100%",
"display": "inline-block",
"overflow": "hidden",
"text-overflow": "ellipsis",
"white-space": "nowrap",
};
return {
configData: [
{
title: "基础信息",
infoData: [
{
title: "门店名称",
key: "merchantName",
},
{
title: "近一月新车销售",
key: "salesVolume",
},
{
title: "主营品牌",
key: "brand",
style: contentStyle,
hasTooltip: true,
},
{
title: "门店地址",
key: "merchantAddress",
style: contentStyle,
hasTooltip: true,
},
{
title: "业务类型",
key: "businessTypeName",
},
{
title: "招聘类型",
key: "recruitmentTypeName",
},
{
title: "招聘数量",
key: "recruitmentQuantity",
},
{
title: "区域运营",
key: "regionOperationName",
},
{
title: "创建人",
key: "createdBy",
},
{
title: "申请时间",
key: "createdDate",
},
{
title: "需求描述",
key: "requirementDescription",
col: 24,
},
],
},
],
};
},
methods: {
getStatusItem(baseData, optKey, row, rowKey) {
if (!baseData || !baseData[optKey] || !row)
return null;
return baseData[optKey].find(
(item) => item.confId == row[rowKey] // 使用严格相等
)
}
},
props: {
detailInfo: {
type: Object,
default: () => { }
}
}
}
return baseData[optKey].find(
item => item.confId == row[rowKey], // 使用严格相等
);
},
},
};
</script>
......@@ -83,7 +83,8 @@
:show-btn-ids="['9122306', '9122307']" />
</span>
<!-- 关联 -->
<span v-if="scope.scope.relateStatus == 0" style="margin-right: 10px">
<!-- v-if="scope.scope.relateStatus == 0" -->
<span style="margin-right: 10px">
<auth-button :data="scope.scope"
:show-btn-ids="['9122309']" />
</span>
......@@ -130,25 +131,9 @@
:form-rules="isRelateRules"
label-width="150px"
:select-visible="isRelateVisible"
:slot-arr="['relateMerchantId']"
:slot-arr="[]"
@handleClose="handleRelateClose"
@handleConfirm="handleRelateConfirm">
<template #relateMerchantId="scope">
<el-select v-model="isRelateForm[scope.scope.name]"
v-el-select-loadmore="relateMerchantLoadmore"
filterable
:placeholder="scope.scope.placeholder || '请选择关联门店'"
remote
:remote-method="relateMerchantRemoteMethod"
reserve-keyword
style="width: 256px">
<el-option v-for="subItem in baseData.relateMerchantOpt"
:key="subItem.merchantId"
:label="subItem.merchantName"
:value="subItem.merchantId">
</el-option>
</el-select>
</template>
</glsk-form-dialog>
</d2-container>
</template>
......@@ -235,7 +220,11 @@ export default {
{
label: "关联门店",
name: "relateMerchantId",
placeholder: "请选择关联门店",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "relateMerchantOpt",
},
],
isRelateRules: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!