Commit 155c5da4 by 杨北旺

Merge branch 'v3.11.0' of 192.168.3.233:saas/scrm-micro-presale into v3.11.0

2 parents ebfafcd3 4d7f5365
......@@ -201,7 +201,6 @@ export default {
}
.extend-bar{
width: 100%;
height: 40px;
padding: 0 20px;
line-height: 40px;
margin-top: -1px;
......
......@@ -146,7 +146,7 @@
}
}
.operate{
display: block;
display: none;
position: absolute;
top: 0;
left: 0;
......
......@@ -4,12 +4,12 @@
<el-form :ref="formRef" :disabled="formDisable" :inline="isInline" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block">
<template v-for="(item, index) in formData">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '144px' : labelWidth" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span v-if="!item.isHide && item.tips" class="tips-wrap" slot="label">
<span class="tips-label">{{ item.label }}</span>
<el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'">
<span class="tips-icon"></span>
</el-tooltip>
{{ item.label }}
<el-popover :effect="item.effect ? item.effect : 'dark'" :placement="item.placement || 'top'" width="200" trigger="hover" :content="item.tips">
<img slot="reference" class="tips-icon" :src="require('@/assets/tip.png')" />
</el-popover>
:
</span>
<span v-else-if="!item.isHide && item.label" slot="label">
<span class="combi-form-label" :style="{ width: item.labelWidth ? item.labelWidth + labelPaddingRight + 'px' : '', 'padding-right': isEdit ? '12px' : labelPaddingRight + 'px' }">{{ item.label }}</span>
......@@ -326,7 +326,7 @@ export default {
background-color: #fff;
}
/* 提示图标 */
.glsx-combi-form .tips-block {
.glsx-combi-form .tips-wrap {
position: relative;
}
.glsx-combi-form .tips-label {
......@@ -335,16 +335,15 @@ export default {
.glsx-combi-form .tips-icon {
position: absolute;
display: inline-block;
width: 12px;
height: 12px;
width: 14px;
height: 14px;
top: 3px;
right: 14px;
margin-right: 4px;
cursor: pointer;
border: 1px dotted #7f7f7f;
border-radius: 50%;
}
.glsx-combi-form .tips-icon::before {
/* .glsx-combi-form .tips-icon::before {
content: '?';
position: absolute;
width: 8px;
......@@ -352,7 +351,7 @@ export default {
top: -8px;
left: 1px;
font-size: 10px;
}
} */
/* .glsx-combi-form .tips {
margin: 0;
} */
......
......@@ -4,8 +4,8 @@ const gradeObj = {
{
servicePeriod: '',
priceGrade: '0',
maxPrice: '',
minPrice: '',
maxPrice: '15',
minPrice: '0',
priceCoefficient: '',
standardShelfCost: '',
standardSalesCost: ''
......@@ -13,8 +13,8 @@ const gradeObj = {
{
servicePeriod: '',
priceGrade: '1',
maxPrice: '',
minPrice: '',
maxPrice: '30',
minPrice: '15',
priceCoefficient: '',
standardShelfCost: '',
standardSalesCost: ''
......@@ -22,8 +22,8 @@ const gradeObj = {
{
servicePeriod: '',
priceGrade: '2',
maxPrice: '',
minPrice: '',
maxPrice: '200',
minPrice: '30',
priceCoefficient: '',
standardShelfCost: '',
standardSalesCost: ''
......
......@@ -101,7 +101,6 @@
{
label: '合同编号',
prop: 'id',
width: 200
},
{
label: '商户名称',
......@@ -110,7 +109,6 @@
{
label: '创建时间',
prop: 'createdDate',
width: 200,
formatter: cellValue => {
return cellValue.createdDate ? dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss') : '--'
}
......@@ -118,7 +116,6 @@
{
label: '更新时间',
prop: 'updatedDate',
width: 200,
formatter: cellValue => {
return cellValue.updatedDate ? dayjs(cellValue.updatedDate).format('YYYY-MM-DD HH:mm:ss') : '--'
}
......
......@@ -25,9 +25,11 @@
<el-checkbox-group :disabled="disabled" v-model="formObj.buyConditions">
<el-checkbox v-for="(item,index) in conditionList" :label="item.id" :key="index">
<span class="sign">条件{{index+1}}</span>
<span v-if="!item.newItem" class="condition">{{item.contractContent}}</span>
<el-input v-focus v-else type="text" v-model="curEditCondition.value" @blur.stop="createConfig(0, item)"></el-input>
<div class="condition-text">
<span v-if="!item.newItem" class="condition">{{item.contractContent}}</span>
<el-input v-focus v-else type="text" v-model="curEditCondition.value" @blur.stop="createConfig(0, item)"></el-input>
<i v-if="!item.newItem && !disabled" class="el-icon-edit-outline edit" @click.prevent="editConditionFn(item, 'conditionList')"></i>
</div>
</el-checkbox>
</el-checkbox-group>
<div v-if="!disabled" class="add-btn" @click="addCondition('conditionList')">
......@@ -42,9 +44,11 @@
<el-checkbox-group :disabled="disabled" v-model="formObj.exclusionsResponsibility">
<el-checkbox v-for="(item,index) in responsibilityList" :label="item.id" :key="index">
<span class="sign">责任{{index+1}}</span>
<span v-if="!item.newItem" class="condition">{{item.contractContent}}</span>
<el-input v-focus v-else type="text" v-model="curEditCondition.value" @blur.stop="createConfig(1, item)"></el-input>
<i v-if="!item.newItem && !disabled" class="el-icon-edit-outline edit" @click.prevent="editConditionFn(item, 'responsibilityList')"></i>
<div class="condition-text">
<span v-if="!item.newItem" class="condition">{{item.contractContent}}</span>
<el-input v-focus v-else type="text" v-model="curEditCondition.value" @blur.stop="createConfig(1, item)"></el-input>
<i v-if="!item.newItem && !disabled" class="el-icon-edit-outline edit" @click.prevent="editConditionFn(item, 'responsibilityList')"></i>
</div>
</el-checkbox>
</el-checkbox-group>
<div v-if="!disabled" class="add-btn" @click="addCondition('responsibilityList')">
......@@ -64,6 +68,9 @@
<div class="global-title">规格和成本设置</div>
<div class="main-wrap">
<glsx-combi-form ref="editFormRefCar" labelWidth="154px" :isInline="false" :formObj.sync="gradeFormObj" :formData="settingformData" :formRules="gradeRule">
<div slot="costSlot">
<el-input class="cost-input" placeholder="请输入每月投保成本" @input="changePrice($event, gradeFormObj, 'monthlyInsuranceCost')" :disabled="disabled" v-model="gradeFormObj.monthlyInsuranceCost"></el-input>
</div>
<div slot="specConfigSlot">
<ServicesTable :disabled="disabled" class="services-table" v-for="item in gradeList" :key="item.serviceGrade" :tableData="item"></ServicesTable>
<div v-if="!disabled" class="add-btn" @click="handleAddGrade">
......@@ -76,8 +83,8 @@
</div>
</template>
<div class="footer-btn">
<el-button @click="jumpListPage">取消</el-button>
<template v-if="firstPage">
<el-button @click="jumpListPage">取消</el-button>
<el-button type="primary" @click="nextStep">下一步</el-button>
</template>
<template v-else>
......@@ -253,7 +260,7 @@ export default {
label: '每月投保成本/元:',
placeholder: '请输入每月投保成本',
name: 'monthlyInsuranceCost',
type: 'input'
addHtml: 'costSlot'
},
{
label: '规格配置:',
......@@ -293,6 +300,10 @@ export default {
},
methods: {
changePrice(value, item , key){
item[key] = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : ''
},
editConditionFn(row, key){
this.curEditCondition = {
id: row.id,
......@@ -504,6 +515,7 @@ export default {
}
}
.add-btn{
display: inline-block;
color: #5850FF;
cursor: pointer;
i{
......@@ -545,12 +557,27 @@ export default {
.buy-condition{
.el-checkbox{
width: fit-content;
margin-bottom: 10px;
}
/deep/ .el-checkbox__input{
}
/deep/ .el-checkbox__label{
// display: inline-flex;
// align-items: center;
}
.condition-text{
display: inline-flex;
align-items: center;
}
.sign{
margin-right: 8px;
}
.condition{
height: 32px;
display: inline-block;
vertical-align: text-top;
white-space: pre-wrap;
width: 592px;
line-height: 32px;
background: #F5F7FA;
border-radius: 4px;
......@@ -569,6 +596,9 @@ export default {
}
.setting-wrap{
background-color: #fff;
.cost-input{
width: 432px;
}
}
.footer-btn{
text-align: center;
......
......@@ -9,8 +9,16 @@
</tr>
<tr>
<template v-for="(item, index) in tableData.salePeriodData">
<th :key="index">上架成本</th>
<th :key="index">销售成本</th>
<th :key="index">上架成本
<el-tooltip class="item" effect="dark" content="提示待运营提供" placement="top">
<img class="tip" :src="require('@/assets/tip.png')" />
</el-tooltip>
</th>
<th :key="index">销售成本
<el-tooltip class="item" effect="dark" content="提示待运营提供" placement="top">
<img class="tip" :src="require('@/assets/tip.png')" />
</el-tooltip>
</th>
</template>
</tr>
<tr>
......@@ -18,25 +26,20 @@
<td>标准</td>
<td>-</td>
<template v-for="(item, index) in tableData.salePeriodData">
<td :key="index"><el-input onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" :disabled="disabled" v-model="item.standardShelfCost"></el-input></td>
<td :key="index"> <el-input onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" :disabled="disabled" v-model="item.standardSalesCost"></el-input></td>
<td :key="index"><el-input :placeholder="placeholder" @input="changePrice($event, item, 'standardShelfCost')" :disabled="disabled" v-model="item.standardShelfCost"></el-input></td>
<td :key="index"> <el-input :placeholder="placeholder" @input="changePrice($event, item, 'standardSalesCost')" :disabled="disabled" v-model="item.standardSalesCost"></el-input></td>
</template>
</tr>
<tr v-for="(item, index) in tableData.gradeConfigList" :key="index">
<td class="price">
<el-input onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" :disabled="disabled" v-model="item.minPrice"></el-input>
<el-input :placeholder="placeholder" @input="changePrice($event, item, 'minPrice')" @blur="formatPrice($event, item, 'minPrice', 200)" :disabled="disabled" v-model="item.minPrice"></el-input>
<span class="sign">-</span>
<el-input onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" :disabled="disabled" v-model="item.maxPrice"></el-input>
<el-input :placeholder="placeholder" @input="changePrice($event, item, 'maxPrice')" @blur="formatPrice($event, item, 'maxPrice', 200)" :disabled="disabled" v-model="item.maxPrice"></el-input>
</td>
<td><el-input onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" :disabled="disabled" v-model="item.priceCoefficient"></el-input></td>
<td><el-input :placeholder="placeholder" @input="changePrice($event, item, 'priceCoefficient')" :disabled="disabled" @blur="formatPrice($event, item, 'priceCoefficient', 100)" v-model="item.priceCoefficient"></el-input></td>
<template v-for="(ele, eIdx) in tableData.salePeriodData">
<td :key="eIdx">{{ Number((ele.standardShelfCost * item.priceCoefficient).toFixed(2))}}</td>
<td :key="eIdx">{{ Number((ele.standardSalesCost * item.priceCoefficient).toFixed(2))}}</td>
<td :key="eIdx">{{calcPrice(ele.standardShelfCost, item.priceCoefficient)}}</td>
<td :key="eIdx">{{calcPrice(ele.standardSalesCost, item.priceCoefficient)}}</td>
</template>
</tr>
<tr class="desc-wrap">
......@@ -92,6 +95,7 @@
},
data() {
return {
placeholder: '请输入',
overviewOption: {
placeholder: '请输入服务条款概述',
modules: {
......@@ -115,6 +119,21 @@
}
},
methods: {
changePrice(value, item , key){
item[key] = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : ''
},
formatPrice(e, item, key, maxNum){
let num = e.target.value
if(num>maxNum){
item[key] = maxNum
}
},
calcPrice(price1, price2){
price1 = price1 || 0
price2 = price2 || 0
return Number((price1 * price2).toFixed(2))
},
HandleCustomMatcher(node, Delta) {
// 文字、图片等,从别处复制而来,清除自带样式,转为纯文本
let ops = []
......@@ -133,6 +152,12 @@
</script>
<style lang="scss" scoped>
.table-wrap{
.tip{
width: 14px;
vertical-align: middle;
margin-bottom: 2px;
cursor: pointer;
}
/deep/ .el-input__inner{
padding: 0 2px;
text-align: center;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!