Commit 6a4db1f9 by 前端

Merge branch 'develop' of http://192.168.3.233:8090/saas_plus/dj-car-life-system…

… into SAAS+V4.46.1-1107
2 parents e9252b02 e2118446
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-08-29 18:04:06
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-10-22 16:51:41
* @FilePath: \dj-car-life-system\src\views\contentManager\components\AddDrawer\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template> <template>
<el-drawer <el-drawer
:title="form.id ? '编辑产品词条' : '新增产品词条'" :title="form.id ? '编辑产品词条' : '新增产品词条'"
......
...@@ -135,7 +135,8 @@ export default { ...@@ -135,7 +135,8 @@ export default {
<style scoped lang='scss'> <style scoped lang='scss'>
.el-input, .el-input,
.el-input--small { .el-input--small ,
width: 215px; .el-select--small{
max-width: 215px;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -48,12 +48,12 @@ ...@@ -48,12 +48,12 @@
> >
<template v-for="(item, index) in tableParams.tableColumns"> <template v-for="(item, index) in tableParams.tableColumns">
<el-table-column <el-table-column
:key="index"
:label="item.label" :label="item.label"
:prop="item.prop" :prop="item.prop"
:width="item.width" :width="item.width"
:min-width="item.minWidth" :min-width="item.minWidth"
align="center" align="center"
:key="index"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div <div
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
fixed="right" fixed="right"
:align="tableParams.tableOption.align || 'center'" :align="tableParams.tableOption.align || 'center'"
:width="tableParams.tableOption.width || 'auto'" :width="tableParams.tableOption.width || 'auto'"
:key="tableKey"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="showBtn(scope.row)"> <template v-if="showBtn(scope.row)">
...@@ -108,14 +109,17 @@ ...@@ -108,14 +109,17 @@
{{scope.row.status == 0 ?'停用':'启用'}} {{scope.row.status == 0 ?'停用':'启用'}}
</el-button> </el-button>
<el-button <el-button
:class="[{'is-disabled':isEditStatus && scope.row.level == 2}]"
type="text" type="text"
@click="edit(scope)" @click="edit(scope)"
:disabled="isEditStatus && scope.row.level == 2"
>编辑</el-button> >编辑</el-button>
</template> </template>
<el-button <el-button
v-if="scope.row.level == 1" v-if="scope.row.level == 1"
type="text" type="text"
@click="handleCreateChild(scope.row)" @click="handleCreateChild(scope.row)"
:disabled="isEditStatus"
>创建下级</el-button> >创建下级</el-button>
<template v-if="scope.row.isEdit"> <template v-if="scope.row.isEdit">
...@@ -129,6 +133,7 @@ ...@@ -129,6 +133,7 @@
>取消</el-button> >取消</el-button>
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
<div <div
slot="empty" slot="empty"
...@@ -261,7 +266,8 @@ export default { ...@@ -261,7 +266,8 @@ export default {
} }
] ]
}, },
tableKey: Date.now() tableKey: Date.now(),
isEditStatus: false
} }
}, },
created () { created () {
...@@ -288,6 +294,7 @@ export default { ...@@ -288,6 +294,7 @@ export default {
list?.map((e, index) => e.num = this.indexNum(index)) list?.map((e, index) => e.num = this.indexNum(index))
this.tableTotal = total || 0 this.tableTotal = total || 0
this.tableData = list || [] this.tableData = list || []
this.isEditStatus = false
} catch (error) { } catch (error) {
if (error) this.$message.error(error) if (error) this.$message.error(error)
} }
...@@ -321,6 +328,7 @@ export default { ...@@ -321,6 +328,7 @@ export default {
} }
if (item.nextList && item.nextList.length) item.nextList.unshift(childrenItem) if (item.nextList && item.nextList.length) item.nextList.unshift(childrenItem)
else item.nextList = [childrenItem] else item.nextList = [childrenItem]
this.isEditStatus = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.table.toggleRowExpansion(row, true) this.$refs.table.toggleRowExpansion(row, true)
setTimeout(() => { setTimeout(() => {
...@@ -336,8 +344,10 @@ export default { ...@@ -336,8 +344,10 @@ export default {
this.currentItem = row this.currentItem = row
} }
else { else {
if(this.isEditStatus) return
row.originLabel = row.labelName row.originLabel = row.labelName
row.isEdit = true row.isEdit = true
this.isEditStatus = true
this.tableKey = Date.now() this.tableKey = Date.now()
setTimeout(() => { setTimeout(() => {
this.$refs[row.id][0].focus() this.$refs[row.id][0].focus()
...@@ -375,12 +385,13 @@ export default { ...@@ -375,12 +385,13 @@ export default {
let index = this.tableData.findIndex(i => i.id == row.parentId), let index = this.tableData.findIndex(i => i.id == row.parentId),
item = this.tableData[index], item = this.tableData[index],
childrenIndex = item.nextList.findIndex(i => i.id == row.id) childrenIndex = item.nextList.findIndex(i => i.id == row.id)
this.isEditStatus = false
if (row.editId) item.nextList.splice(childrenIndex, 1) if (row.editId) item.nextList.splice(childrenIndex, 1)
else { else {
row.isEdit = false row.isEdit = false
row.labelName = row.originLabel row.labelName = row.originLabel
this.tableKey = Date.now()
} }
this.tableKey = Date.now()
}, },
async save (row) { async save (row) {
try { try {
...@@ -409,6 +420,12 @@ export default { ...@@ -409,6 +420,12 @@ export default {
} catch (error) { } catch (error) {
this.$message.error(error) this.$message.error(error)
} }
},
checkChildIsEdit (row) {
let { nextList } = row
if (nextList && nextList.length) {
return nextList.some(e => e.isEdit)
}
} }
} }
} }
...@@ -430,7 +447,7 @@ export default { ...@@ -430,7 +447,7 @@ export default {
border-color: red; border-color: red;
} }
} }
.label-name{ .label-name {
padding: 4px 10px; padding: 4px 10px;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -250,8 +250,8 @@ ...@@ -250,8 +250,8 @@
<td> <td>
<el-input <el-input
v-model="pItem.price" v-model="pItem.price"
maxlength="6" maxlength="9"
onkeyup="value = value.replace(/[^\d\.]/g,'')" @input="handleInput(pItem, 'price')"
placeholder="请输入售价" placeholder="请输入售价"
></el-input> ></el-input>
</td> </td>
...@@ -596,6 +596,19 @@ export default { ...@@ -596,6 +596,19 @@ export default {
} }
}, },
methods: { methods: {
handleInput(row, val) {
var reg = /^(\.*)(\d+)(\.?)(\d{0,2}).*$/g
if (reg.test(row[val])) {
//正则匹配通过,提取有效文本
row[val] = row[val].replace(reg, "$2$3$4")
} else {
//正则匹配不通过,直接清空
row[val] = ""
}
if (+row[val] > 999999) {
row[val] = 999999
}
},
getBrand() { getBrand() {
findDictData({ findDictData({
pageSize: 1000, pageSize: 1000,
......
...@@ -89,7 +89,7 @@ export default { ...@@ -89,7 +89,7 @@ export default {
payReason: [ payReason: [
{ {
required: true, required: true,
message: "请输入付款事由", message: "请输入付款事由,最大不超过500个字",
trigger: "blur" trigger: "blur"
} }
], ],
...@@ -152,10 +152,10 @@ export default { ...@@ -152,10 +152,10 @@ export default {
label: "付款事由", label: "付款事由",
name: "payReason", name: "payReason",
type: "input", type: "input",
maxlength: 50, maxlength: 500,
inputType: "textarea", inputType: "textarea",
showLimit: true, showLimit: true,
rows: 2, rows: 4,
width: "370px" width: "370px"
}, { }, {
label: "结算凭证", label: "结算凭证",
......
...@@ -298,7 +298,7 @@ export default { ...@@ -298,7 +298,7 @@ export default {
const arr = time.split(":") const arr = time.split(":")
let second = let second =
arr.length == 3 arr.length == 3
? arr[0] * 60 * 60 + arr[1] * 60 + arr[2] ? arr[0] * 60 * 60 + arr[1] * 60 + arr[2] * 1
: arr[0] * 60 + arr[1] * 1 : arr[0] * 60 + arr[1] * 1
return second return second
}, },
......
...@@ -43,7 +43,9 @@ ...@@ -43,7 +43,9 @@
<div class="view-item" v-for="(item, index) in viewList" :key="index"> <div class="view-item" v-for="(item, index) in viewList" :key="index">
<div class="view-item-label">{{ item.label }}</div> <div class="view-item-label">{{ item.label }}</div>
<div class="view-item-value" :style="{ color: item.color }"> <div class="view-item-value" :style="{ color: item.color }">
{{ staffStatic[item.value] || "-" }} {{
staffStatic[item.value] === null ? "-" : staffStatic[item.value]
}}
</div> </div>
</div> </div>
</div> </div>
...@@ -332,38 +334,78 @@ export default { ...@@ -332,38 +334,78 @@ export default {
width: "50px" width: "50px"
}, },
{ label: "成交数", name: "successfulConversions", width: "80px" }, {
label: "成交数",
name: "successfulConversions",
width: "80px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.successfulConversions
}
},
{ {
label: "转化率", label: "转化率",
name: "conversionRate", name: "conversionRate",
width: "80px" width: "80px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.conversionRate
}
}, },
{ {
label: "转化率(非企业)", label: "转化率(非企业)",
name: "nonCorporateConversionRate", name: "nonCorporateConversionRate",
width: "120px" width: "120px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.nonCorporateConversionRate
}
}, },
{ {
label: "转化率(企业)", label: "转化率(企业)",
name: "corporateConversionRate", name: "corporateConversionRate",
width: "120px" width: "120px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.corporateConversionRate
}
},
{
label: "安心包开口数",
name: "mentionedPackages",
width: "120px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.mentionedPackages
}
},
{
label: "安心包开口率",
name: "packageMentionRate",
width: "120px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.packageMentionRate
}
}, },
{ label: "安心包开口数", name: "mentionedPackages", width: "120px" },
{ label: "安心包开口率", name: "packageMentionRate", width: "120px" },
{ {
label: "安心包成交率", label: "安心包成交率",
name: "packageConversionRate", name: "packageConversionRate",
width: "120px" width: "120px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.packageConversionRate
}
}, },
{ {
label: "安心包成交率(非企业)", label: "安心包成交率(非企业)",
name: "nonCorporatePackageConversionRate", name: "nonCorporatePackageConversionRate",
width: "160px" width: "160px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO
.nonCorporatePackageConversionRate
}
}, },
{ {
label: "安心包成交率(企业)", label: "安心包成交率(企业)",
name: "corporatePackageConversionRate", name: "corporatePackageConversionRate",
width: "150px" width: "150px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.corporatePackageConversionRate
}
}, },
{ {
label: "接待日期", label: "接待日期",
......
...@@ -1038,7 +1038,7 @@ export default { ...@@ -1038,7 +1038,7 @@ export default {
let dataList = data.list let dataList = data.list
if (dataList && dataList.length > 0) { if (dataList && dataList.length > 0) {
dataList = dataList.map((item, index) => { dataList = dataList.map((item, index) => {
item.num = index + 1 item.num = index + (data.pageNum - 1) * data.pageSize + 1
return item return item
}) })
this.restructureList = dataList.reduce((prev, cur, index, arr) => { this.restructureList = dataList.reduce((prev, cur, index, arr) => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!