Commit 6e86040d by zhangquan

bug修复

2 parents 2000132b 1d781d8f
......@@ -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,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')">
......@@ -76,8 +80,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>
......@@ -504,6 +508,7 @@ export default {
}
}
.add-btn{
display: inline-block;
color: #5850FF;
cursor: pointer;
i{
......@@ -545,12 +550,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;
......
......@@ -18,25 +18,25 @@
<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('.', '$#$')
<td :key="index"><el-input :placeholder="placeholder" 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('.', '$#$')
<td :key="index"> <el-input :placeholder="placeholder" 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>
</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('.', '$#$')
<el-input :placeholder="placeholder" 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>
<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" 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" @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" onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{3}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" :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 +92,7 @@
},
data() {
return {
placeholder: '请输入',
overviewOption: {
placeholder: '请输入服务条款概述',
modules: {
......@@ -115,6 +116,17 @@
}
},
methods: {
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 = []
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!