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>
<el-drawer
:title="form.id ? '编辑产品词条' : '新增产品词条'"
......
......@@ -135,7 +135,8 @@ export default {
<style scoped lang='scss'>
.el-input,
.el-input--small {
width: 215px;
.el-input--small ,
.el-select--small{
max-width: 215px;
}
</style>
\ No newline at end of file
......@@ -48,12 +48,12 @@
>
<template v-for="(item, index) in tableParams.tableColumns">
<el-table-column
:key="index"
:label="item.label"
:prop="item.prop"
:width="item.width"
:min-width="item.minWidth"
align="center"
:key="index"
>
<template slot-scope="scope">
<div
......@@ -97,6 +97,7 @@
fixed="right"
:align="tableParams.tableOption.align || 'center'"
:width="tableParams.tableOption.width || 'auto'"
:key="tableKey"
>
<template slot-scope="scope">
<template v-if="showBtn(scope.row)">
......@@ -108,14 +109,17 @@
{{scope.row.status == 0 ?'停用':'启用'}}
</el-button>
<el-button
:class="[{'is-disabled':isEditStatus && scope.row.level == 2}]"
type="text"
@click="edit(scope)"
:disabled="isEditStatus && scope.row.level == 2"
>编辑</el-button>
</template>
<el-button
v-if="scope.row.level == 1"
type="text"
@click="handleCreateChild(scope.row)"
:disabled="isEditStatus"
>创建下级</el-button>
<template v-if="scope.row.isEdit">
......@@ -129,6 +133,7 @@
>取消</el-button>
</template>
</template>
</el-table-column>
<div
slot="empty"
......@@ -261,7 +266,8 @@ export default {
}
]
},
tableKey: Date.now()
tableKey: Date.now(),
isEditStatus: false
}
},
created () {
......@@ -288,6 +294,7 @@ export default {
list?.map((e, index) => e.num = this.indexNum(index))
this.tableTotal = total || 0
this.tableData = list || []
this.isEditStatus = false
} catch (error) {
if (error) this.$message.error(error)
}
......@@ -321,6 +328,7 @@ export default {
}
if (item.nextList && item.nextList.length) item.nextList.unshift(childrenItem)
else item.nextList = [childrenItem]
this.isEditStatus = true
this.$nextTick(() => {
this.$refs.table.toggleRowExpansion(row, true)
setTimeout(() => {
......@@ -336,8 +344,10 @@ export default {
this.currentItem = row
}
else {
if(this.isEditStatus) return
row.originLabel = row.labelName
row.isEdit = true
this.isEditStatus = true
this.tableKey = Date.now()
setTimeout(() => {
this.$refs[row.id][0].focus()
......@@ -375,12 +385,13 @@ export default {
let index = this.tableData.findIndex(i => i.id == row.parentId),
item = this.tableData[index],
childrenIndex = item.nextList.findIndex(i => i.id == row.id)
this.isEditStatus = false
if (row.editId) item.nextList.splice(childrenIndex, 1)
else {
row.isEdit = false
row.labelName = row.originLabel
this.tableKey = Date.now()
}
this.tableKey = Date.now()
},
async save (row) {
try {
......@@ -409,6 +420,12 @@ export default {
} catch (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 {
border-color: red;
}
}
.label-name{
.label-name {
padding: 4px 10px;
}
</style>
\ No newline at end of file
......@@ -250,8 +250,8 @@
<td>
<el-input
v-model="pItem.price"
maxlength="6"
onkeyup="value = value.replace(/[^\d\.]/g,'')"
maxlength="9"
@input="handleInput(pItem, 'price')"
placeholder="请输入售价"
></el-input>
</td>
......@@ -596,6 +596,19 @@ export default {
}
},
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() {
findDictData({
pageSize: 1000,
......
......@@ -89,7 +89,7 @@ export default {
payReason: [
{
required: true,
message: "请输入付款事由",
message: "请输入付款事由,最大不超过500个字",
trigger: "blur"
}
],
......@@ -152,10 +152,10 @@ export default {
label: "付款事由",
name: "payReason",
type: "input",
maxlength: 50,
maxlength: 500,
inputType: "textarea",
showLimit: true,
rows: 2,
rows: 4,
width: "370px"
}, {
label: "结算凭证",
......
......@@ -298,7 +298,7 @@ export default {
const arr = time.split(":")
let second =
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
return second
},
......
......@@ -43,7 +43,9 @@
<div class="view-item" v-for="(item, index) in viewList" :key="index">
<div class="view-item-label">{{ item.label }}</div>
<div class="view-item-value" :style="{ color: item.color }">
{{ staffStatic[item.value] || "-" }}
{{
staffStatic[item.value] === null ? "-" : staffStatic[item.value]
}}
</div>
</div>
</div>
......@@ -332,38 +334,78 @@ export default {
width: "50px"
},
{ label: "成交数", name: "successfulConversions", width: "80px" },
{
label: "成交数",
name: "successfulConversions",
width: "80px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.successfulConversions
}
},
{
label: "转化率",
name: "conversionRate",
width: "80px"
width: "80px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.conversionRate
}
},
{
label: "转化率(非企业)",
name: "nonCorporateConversionRate",
width: "120px"
width: "120px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.nonCorporateConversionRate
}
},
{
label: "转化率(企业)",
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: "安心包成交率",
name: "packageConversionRate",
width: "120px"
width: "120px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.packageConversionRate
}
},
{
label: "安心包成交率(非企业)",
name: "nonCorporatePackageConversionRate",
width: "160px"
width: "160px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO
.nonCorporatePackageConversionRate
}
},
{
label: "安心包成交率(企业)",
name: "corporatePackageConversionRate",
width: "150px"
width: "150px",
formatter: (cell) => {
return cell.receptionStaffStaticDTO.corporatePackageConversionRate
}
},
{
label: "接待日期",
......
......@@ -1038,7 +1038,7 @@ export default {
let dataList = data.list
if (dataList && dataList.length > 0) {
dataList = dataList.map((item, index) => {
item.num = index + 1
item.num = index + (data.pageNum - 1) * data.pageSize + 1
return item
})
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!