Commit 6e86040d by zhangquan

bug修复

2 parents 2000132b 1d781d8f
...@@ -201,7 +201,6 @@ export default { ...@@ -201,7 +201,6 @@ export default {
} }
.extend-bar{ .extend-bar{
width: 100%; width: 100%;
height: 40px;
padding: 0 20px; padding: 0 20px;
line-height: 40px; line-height: 40px;
margin-top: -1px; margin-top: -1px;
......
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
} }
} }
.operate{ .operate{
display: block; display: none;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
......
...@@ -4,8 +4,8 @@ const gradeObj = { ...@@ -4,8 +4,8 @@ const gradeObj = {
{ {
servicePeriod: '', servicePeriod: '',
priceGrade: '0', priceGrade: '0',
maxPrice: '', maxPrice: '15',
minPrice: '', minPrice: '0',
priceCoefficient: '', priceCoefficient: '',
standardShelfCost: '', standardShelfCost: '',
standardSalesCost: '' standardSalesCost: ''
...@@ -13,8 +13,8 @@ const gradeObj = { ...@@ -13,8 +13,8 @@ const gradeObj = {
{ {
servicePeriod: '', servicePeriod: '',
priceGrade: '1', priceGrade: '1',
maxPrice: '', maxPrice: '30',
minPrice: '', minPrice: '15',
priceCoefficient: '', priceCoefficient: '',
standardShelfCost: '', standardShelfCost: '',
standardSalesCost: '' standardSalesCost: ''
...@@ -22,8 +22,8 @@ const gradeObj = { ...@@ -22,8 +22,8 @@ const gradeObj = {
{ {
servicePeriod: '', servicePeriod: '',
priceGrade: '2', priceGrade: '2',
maxPrice: '', maxPrice: '200',
minPrice: '', minPrice: '30',
priceCoefficient: '', priceCoefficient: '',
standardShelfCost: '', standardShelfCost: '',
standardSalesCost: '' standardSalesCost: ''
......
...@@ -101,7 +101,6 @@ ...@@ -101,7 +101,6 @@
{ {
label: '合同编号', label: '合同编号',
prop: 'id', prop: 'id',
width: 200
}, },
{ {
label: '商户名称', label: '商户名称',
...@@ -110,7 +109,6 @@ ...@@ -110,7 +109,6 @@
{ {
label: '创建时间', label: '创建时间',
prop: 'createdDate', prop: 'createdDate',
width: 200,
formatter: cellValue => { formatter: cellValue => {
return cellValue.createdDate ? dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss') : '--' return cellValue.createdDate ? dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss') : '--'
} }
...@@ -118,7 +116,6 @@ ...@@ -118,7 +116,6 @@
{ {
label: '更新时间', label: '更新时间',
prop: 'updatedDate', prop: 'updatedDate',
width: 200,
formatter: cellValue => { formatter: cellValue => {
return cellValue.updatedDate ? dayjs(cellValue.updatedDate).format('YYYY-MM-DD HH:mm:ss') : '--' return cellValue.updatedDate ? dayjs(cellValue.updatedDate).format('YYYY-MM-DD HH:mm:ss') : '--'
} }
......
...@@ -25,9 +25,11 @@ ...@@ -25,9 +25,11 @@
<el-checkbox-group :disabled="disabled" v-model="formObj.buyConditions"> <el-checkbox-group :disabled="disabled" v-model="formObj.buyConditions">
<el-checkbox v-for="(item,index) in conditionList" :label="item.id" :key="index"> <el-checkbox v-for="(item,index) in conditionList" :label="item.id" :key="index">
<span class="sign">条件{{index+1}}</span> <span class="sign">条件{{index+1}}</span>
<span v-if="!item.newItem" class="condition">{{item.contractContent}}</span> <div class="condition-text">
<el-input v-focus v-else type="text" v-model="curEditCondition.value" @blur.stop="createConfig(0, item)"></el-input> <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> <i v-if="!item.newItem && !disabled" class="el-icon-edit-outline edit" @click.prevent="editConditionFn(item, 'conditionList')"></i>
</div>
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<div v-if="!disabled" class="add-btn" @click="addCondition('conditionList')"> <div v-if="!disabled" class="add-btn" @click="addCondition('conditionList')">
...@@ -42,9 +44,11 @@ ...@@ -42,9 +44,11 @@
<el-checkbox-group :disabled="disabled" v-model="formObj.exclusionsResponsibility"> <el-checkbox-group :disabled="disabled" v-model="formObj.exclusionsResponsibility">
<el-checkbox v-for="(item,index) in responsibilityList" :label="item.id" :key="index"> <el-checkbox v-for="(item,index) in responsibilityList" :label="item.id" :key="index">
<span class="sign">责任{{index+1}}</span> <span class="sign">责任{{index+1}}</span>
<span v-if="!item.newItem" class="condition">{{item.contractContent}}</span> <div class="condition-text">
<el-input v-focus v-else type="text" v-model="curEditCondition.value" @blur.stop="createConfig(1, item)"></el-input> <span v-if="!item.newItem" class="condition">{{item.contractContent}}</span>
<i v-if="!item.newItem && !disabled" class="el-icon-edit-outline edit" @click.prevent="editConditionFn(item, 'responsibilityList')"></i> <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>
</el-checkbox-group> </el-checkbox-group>
<div v-if="!disabled" class="add-btn" @click="addCondition('responsibilityList')"> <div v-if="!disabled" class="add-btn" @click="addCondition('responsibilityList')">
...@@ -76,8 +80,8 @@ ...@@ -76,8 +80,8 @@
</div> </div>
</template> </template>
<div class="footer-btn"> <div class="footer-btn">
<el-button @click="jumpListPage">取消</el-button>
<template v-if="firstPage"> <template v-if="firstPage">
<el-button @click="jumpListPage">取消</el-button>
<el-button type="primary" @click="nextStep">下一步</el-button> <el-button type="primary" @click="nextStep">下一步</el-button>
</template> </template>
<template v-else> <template v-else>
...@@ -504,6 +508,7 @@ export default { ...@@ -504,6 +508,7 @@ export default {
} }
} }
.add-btn{ .add-btn{
display: inline-block;
color: #5850FF; color: #5850FF;
cursor: pointer; cursor: pointer;
i{ i{
...@@ -545,12 +550,27 @@ export default { ...@@ -545,12 +550,27 @@ export default {
.buy-condition{ .buy-condition{
.el-checkbox{ .el-checkbox{
width: fit-content; 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{ .sign{
margin-right: 8px; margin-right: 8px;
} }
.condition{ .condition{
height: 32px; display: inline-block;
vertical-align: text-top;
white-space: pre-wrap;
width: 592px;
line-height: 32px; line-height: 32px;
background: #F5F7FA; background: #F5F7FA;
border-radius: 4px; border-radius: 4px;
......
...@@ -18,25 +18,25 @@ ...@@ -18,25 +18,25 @@
<td>标准</td> <td>标准</td>
<td>-</td> <td>-</td>
<template v-for="(item, index) in tableData.salePeriodData"> <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> .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> .replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" :disabled="disabled" v-model="item.standardSalesCost"></el-input></td>
</template> </template>
</tr> </tr>
<tr v-for="(item, index) in tableData.gradeConfigList" :key="index"> <tr v-for="(item, index) in tableData.gradeConfigList" :key="index">
<td class="price"> <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> .replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" :disabled="disabled" v-model="item.minPrice"></el-input>
<span class="sign">-</span> <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('.', '$#$') <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.maxPrice"></el-input> .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>
<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('.', '$#$') <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" v-model="item.priceCoefficient"></el-input></td> .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"> <template v-for="(ele, eIdx) in tableData.salePeriodData">
<td :key="eIdx">{{ Number((ele.standardShelfCost * item.priceCoefficient).toFixed(2))}}</td> <td :key="eIdx">{{calcPrice(ele.standardShelfCost, item.priceCoefficient)}}</td>
<td :key="eIdx">{{ Number((ele.standardSalesCost * item.priceCoefficient).toFixed(2))}}</td> <td :key="eIdx">{{calcPrice(ele.standardSalesCost, item.priceCoefficient)}}</td>
</template> </template>
</tr> </tr>
<tr class="desc-wrap"> <tr class="desc-wrap">
...@@ -92,6 +92,7 @@ ...@@ -92,6 +92,7 @@
}, },
data() { data() {
return { return {
placeholder: '请输入',
overviewOption: { overviewOption: {
placeholder: '请输入服务条款概述', placeholder: '请输入服务条款概述',
modules: { modules: {
...@@ -115,6 +116,17 @@ ...@@ -115,6 +116,17 @@
} }
}, },
methods: { 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) { HandleCustomMatcher(node, Delta) {
// 文字、图片等,从别处复制而来,清除自带样式,转为纯文本 // 文字、图片等,从别处复制而来,清除自带样式,转为纯文本
let ops = [] let ops = []
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!