Commit 98d9aef9 by 李伟康

fix(sales): 修复销售管理模块中的数据显示和表单验证问题

- 在可用门店页面中启用重新发起按钮的条件判断
- 修复Tiga上架销售合同中商户ID的数据类型转换问题
- 调整业务信息组件中的标签宽度和字段显示逻辑
- 为百分比字段添加单位显示功能
- 修复销售分类和流量提供商信息组件中的字段显示问题
- 优化表单验证规则以支持查看模式下的正确显示
1 parent a62b1edd
...@@ -83,8 +83,8 @@ ...@@ -83,8 +83,8 @@
@click="handleEdit(scope.scope)" @click="handleEdit(scope.scope)"
>编辑</el-button> >编辑</el-button>
<!--👇 仅审批状态=“已驳回”“已撤销”“通过后撤销”的记录可操作 --> <!--👇 仅审批状态=“已驳回”“已撤销”“通过后撤销”的记录可操作 -->
<!-- v-if="[3,4,5].includes(scope.scope.approveStatus)" -->
<el-button <el-button
v-if="[3,4,5].includes(scope.scope.approveStatus)"
type="text" type="text"
@click="handleEdit(scope.scope,'reapply')" @click="handleEdit(scope.scope,'reapply')"
>重新发起</el-button> >重新发起</el-button>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<el-form <el-form
ref="formRef" ref="formRef"
label-width="150px" label-width="155px"
:model="componentData" :model="componentData"
:size="size" :size="size"
:rules="rules" :rules="rules"
...@@ -24,9 +24,14 @@ ...@@ -24,9 +24,14 @@
class="business-information-item" class="business-information-item"
:label="i.label + ':'" :label="i.label + ':'"
:key="`businessInformation${index}`" :key="`businessInformation${index}`"
:prop="i.key" :prop="isViewMode ? '' : i.key"
> >
<template v-if="i.type == 'text' || isViewMode">{{ componentData[i.key] || '-' }}</template> <template v-if="i.type == 'text' || isViewMode">
<template v-if="componentData[i.key] != null">
{{ componentData[i.key] }}<template v-if="i.unit">{{ i.unit }}</template>
</template>
<template v-else></template>
</template>
<template v-else> <template v-else>
<el-input <el-input
v-model="componentData[i.key]" v-model="componentData[i.key]"
...@@ -140,7 +145,7 @@ export default { ...@@ -140,7 +145,7 @@ export default {
], ],
businessInformation: [ businessInformation: [
{ label: '预估交付数/月', key: 'deliveryCount', filterRule: 'integerRange', min: 0, max: 999999, maxlength: 6 }, { label: '预估交付数/月', key: 'deliveryCount', filterRule: 'integerRange', min: 0, max: 999999, maxlength: 6 },
{ label: '预估触客率', key: 'customerTouchRate', filterRule: 'decimalRange', min: 0, max: 100, precision: 2 }, { label: '预估触客率', key: 'customerTouchRate', unit: '%', filterRule: 'decimalRange', min: 0, max: 100, precision: 2 },
{ label: '人员成本', key: 'personnelCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 }, { label: '人员成本', key: 'personnelCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 },
{ label: '房租', key: 'rentCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 }, { label: '房租', key: 'rentCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 },
{ label: '折旧与摊销', key: 'depreciationCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 }, { label: '折旧与摊销', key: 'depreciationCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 },
......
...@@ -36,9 +36,11 @@ ...@@ -36,9 +36,11 @@
class="sales-category-item" class="sales-category-item"
:label="i.label + ':'" :label="i.label + ':'"
:key="ind" :key="ind"
:prop="i.key"
> >
{{ componentData[i.key] != null ? componentData[i.key] : '-' }} <template v-if="componentData[i.key] != null">
{{ componentData[i.key] }}<template v-if="i.unit">{{ i.unit }}</template>
</template>
<template v-else>-</template>
</el-form-item> </el-form-item>
</template> </template>
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
class="traffic-provider-information-item" class="traffic-provider-information-item"
:label="i.label + ':'" :label="i.label + ':'"
:key="`trafficProviderInformation${index}`" :key="`trafficProviderInformation${index}`"
:prop="i.key" :prop="isViewMode ? '' : i.key"
> >
<template v-if="editStatus"> <template v-if="editStatus">
<template v-if="i.type == 'input'"> <template v-if="i.type == 'input'">
......
const { util } = require("echarts")
const SALES_CATEGORY_LIST = [ const SALES_CATEGORY_LIST = [
{ {
title: '销售范围', list: [ title: '销售范围', list: [
...@@ -14,14 +16,14 @@ const SALES_CATEGORY_LIST = [ ...@@ -14,14 +16,14 @@ const SALES_CATEGORY_LIST = [
}, },
{ {
title: '兜底要求', list: [ title: '兜底要求', list: [
{ label: '渗透率', key: 'penetrationRate', type: 'input', filterRule: 'decimalRange', min: 0, max: 100, precision: 2 }, { label: '渗透率', key: 'penetrationRate', unit: '%', type: 'input', filterRule: 'decimalRange', min: 0, max: 100, precision: 2 },
{ label: '转化率', key: 'conversionRate', type: 'input', filterRule: 'decimalRange', min: 0, max: 100, precision: 2 }, { label: '转化率', key: 'conversionRate', unit: '%', type: 'input', filterRule: 'decimalRange', min: 0, max: 100, precision: 2 },
{ label: '单车采购产值', key: 'revenuePerCar', type: 'input', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 }, { label: '单车采购产值', key: 'revenuePerCar', type: 'input', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 },
] ]
}, },
{ {
title: '预估经营数据', list: [ title: '预估经营数据', list: [
{ label: '转化率', key: 'estimatedConversionRate', type: 'input', filterRule: 'decimalRange', min: 0, max: 100, precision: 2 }, { label: '转化率', key: 'estimatedConversionRate', unit: '%', type: 'input', filterRule: 'decimalRange', min: 0, max: 100, precision: 2 },
{ label: '升级客单价', key: 'upgradePrice', type: 'input', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 }, { label: '升级客单价', key: 'upgradePrice', type: 'input', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 },
{ label: '产值', key: 'revenue', type: 'input', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 }, { label: '产值', key: 'revenue', type: 'input', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 },
] ]
......
...@@ -195,8 +195,9 @@ export default { ...@@ -195,8 +195,9 @@ export default {
}) })
} else { } else {
this.pageComplete = true this.pageComplete = true
let { trafficPartyId } = trafficPartyDetails[0]
let infoForm = { let infoForm = {
merchantId: data.merchantId, merchantId: String(trafficPartyId),
shelfType: data.shelfType, shelfType: data.shelfType,
sceneType: data.sceneType, sceneType: data.sceneType,
baseSceneCode: data.baseSceneCode, baseSceneCode: data.baseSceneCode,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!