Commit e42e7591 by wangzhihui

```

feat(residentManage): 员工信息显示优化及字段调整

- 优化员工姓名和手机号显示,添加文本溢出省略和提示功能
- 将业务场景字段名更改为适配业务
- 修复入职门店分配弹窗样式问题

feat(closeStore): 关店流程界面优化

- 优化主营品牌字段显示,支持多行文本和省略提示
- 增加关店原因备注最大长度限制至100字符
- 调整表格列宽度以适应日期格式显示
- 移除不必要的控制台日志

refactor(closeStore): 代码逻辑简化

- 注释掉重复的验证规则定义
- 优化关店原因处理逻辑,避免空字符串拼接
```
1 parent dda626d2
......@@ -6,11 +6,17 @@
<div style="background: #f8f8f8; padding: 15px; margin-bottom: 20px; border-radius: 4px;">
<h4 style="margin-top: 0; margin-bottom: 15px; font-size: 14px;">基本信息</h4>
<el-row>
<el-col :span="12">
<span style="color: #666;">员工姓名:</span><span>{{ detail.staffName }}</span>
<el-col :span="12" style="display: flex; align-items: center;">
<span style="color: #666; white-space: nowrap;">员工姓名:</span>
<span
style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 200px;"
:title="detail.staffName">{{ detail.staffName }}</span>
</el-col>
<el-col :span="12">
<span style="color: #666;">手机号:</span><span>{{ detail.staffPhone }}</span>
<el-col :span="12" style="display: flex; align-items: center;">
<span style="color: #666; white-space: nowrap;">手机号:</span>
<span
style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 200px;"
:title="detail.staffPhone">{{ detail.staffPhone }}</span>
</el-col>
</el-row>
</div>
......@@ -78,7 +84,7 @@ export default {
{ required: true, message: "请选择入职门店", trigger: ["blur", "change"] },
],
sceneCodeList: [
{ type: "array", required: true, message: "请选择业务场景", trigger: ["blur", "change"] },
{ type: "array", required: true, message: "请选择适配业务", trigger: ["blur", "change"] },
],
},
merchantList: [],
......
......@@ -295,7 +295,7 @@ export default {
return filterStr(
cellValue.createdSource,
this.baseData.createdSourceList,
);
) || "-";
},
},
......
......@@ -16,6 +16,20 @@
<div class="section-body">
<glsx-combi-form class="show-form-container" ref="showFormRef" :label-width="labelWidth" :form-obj="detailInfo"
:form-data="showFormData">
<template slot="brandList" slot-scope="scope">
<div v-if="detailInfo.mainBrands">
<el-tooltip effect="dark" placement="top" v-if="detailInfo.mainBrands.length > 30">
<div slot="content" class="tooltip-content-max">
<div>{{ detailInfo.mainBrands }}</div>
</div>
<span class="one-line-ellipsis info-text">{{ formatMainBrands(detailInfo.mainBrands)
}}</span>
</el-tooltip>
<span v-else class="info-text">{{ detailInfo.mainBrands }}</span>
</div>
<div v-else>-</div>
</template>
</glsx-combi-form>
</div>
......@@ -121,8 +135,18 @@ export default {
label: '主营品牌',
name: 'mainBrands',
type: 'showTxt',
addHtml: "brandList",
style: editItemStyle,
txtStyle: contentStyle
txtStyle: {
...contentStyle,
// width: '500px',
display: '-webkit-box',
'-webkit-box-orient': 'vertical',
'-webkit-line-clamp': 2,
overflow: 'hidden',
'text-overflow': 'ellipsis',
'white-space': 'normal'
}
},
{
label: '关联商户',
......@@ -180,7 +204,6 @@ export default {
this.loading = false
if (res) {
this.detailInfo = res
console.log(this.detailInfo)
}
}).catch(() => {
this.loading = false
......@@ -193,6 +216,13 @@ export default {
}
})
},
formatMainBrands(brands) {
if (!brands) return ''
if (brands.length > 35) {
return brands.slice(0, 35) + '...'
}
return brands
}
}
}
</script>
......@@ -301,4 +331,12 @@ export default {
}
}
}
.info-text {
width: 180px;
display: inline-block;
word-break: break-all;
white-space: pre-wrap;
color: #333;
}
</style>
......@@ -85,7 +85,7 @@ export default {
type: "textarea",
showLimit: true,
isClear: true,
maxlength: 50,
maxlength: 100,
rows: 4,
isHide: true
}
......@@ -105,17 +105,17 @@ export default {
}, trigger: 'change'
}
],
confirmRemark: [
{
required: true, validator: (rule, value, callback) => {
if (this.addForm.confirmResult === 1 && this.addForm.confirmReason === '其他' && !value) {
callback(new Error('请输入关店原因'));
} else {
callback();
}
}, trigger: 'blur'
}
]
// confirmRemark: [
// {
// required: true, validator: (rule, value, callback) => {
// if (this.addForm.confirmResult === 1 && this.addForm.confirmReason === '其他' && !value) {
// callback(new Error('请输入关店原因'));
// } else {
// callback();
// }
// }, trigger: 'blur'
// }
// ]
}
}
},
......@@ -184,7 +184,7 @@ export default {
if (this.addForm.confirmResult === 1) {
params.confirmReason = this.addForm.confirmReason
if (this.addForm.confirmReason === '其他') {
if (this.addForm.confirmReason === '其他' && this.addForm.confirmRemark !== '') {
params.confirmReason = '其他-' + this.addForm.confirmRemark
// params.confirmRemark = this.addForm.confirmRemark
}
......
......@@ -25,6 +25,20 @@
<d2-table ref="customerTable" :get-list-api="getListApi" :search-form="searchFormSearch"
:table-params="tableParams" :noLoading="noLoading" :before-search-fn="beforeSearchFn"
@apiFinish="apiFinish">
<template slot="brandList" slot-scope="scope">
<div v-if="scope.scope.mainBrands">
<el-tooltip effect="dark" placement="top" v-if="scope.scope.mainBrands.length > 30">
<div slot="content" class="tooltip-content-max">
<div>{{ scope.scope.mainBrands }}</div>
</div>
<span>{{ formatMainBrands(scope.scope.mainBrands) }}</span>
</el-tooltip>
<span v-else>{{ scope.scope.mainBrands }}</span>
</div>
<div v-else>-</div>
</template>
<div slot="auth-button" slot-scope="scope" width="400">
<!-- 关店确认 -->
<span v-if="scope.scope.status == 1" style="margin-right: 10px">
......@@ -214,7 +228,7 @@ export default {
tableColumns: [{
label: '创建时间',
prop: 'createdDate',
width: '100px'
width: '140px'
}, {
label: '门店名称',
prop: 'shopMerchantName',
......@@ -225,15 +239,15 @@ export default {
}, {
label: '签约时间',
prop: 'signedTime',
width: '128px'
width: '140px'
}, {
label: '展业时间',
prop: 'expectedOperationDate',
width: '128px'
width: '140px'
}, {
label: '关店时间',
prop: 'closeTime',
width: '128px'
width: '140px'
}, {
label: '关联商户',
prop: 'relatedMerchant', // 关联商户名称和商户号
......@@ -250,7 +264,8 @@ export default {
prop: 'cooperationModeName'
}, {
label: '主营品牌',
prop: 'mainBrands',
// prop: 'mainBrands',
addHtml: 'brandList',
width: '150px',
}, {
......@@ -430,6 +445,13 @@ export default {
handleDetail(row) {
this.recordInfo = deepClone(row)
this.detailVisible = true
},
formatMainBrands(brands) {
if (!brands) return ''
if (brands.length > 30) {
return brands.slice(0, 30) + '...'
}
return brands
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!