Commit c31dc623 by zhangquan

样式修改和保留一位小数

1 parent 185aa4e4
...@@ -152,7 +152,7 @@ export default { ...@@ -152,7 +152,7 @@ export default {
.replace('.', '$#$') .replace('.', '$#$')
.replace(/\./g, '') .replace(/\./g, '')
.replace('$#$', '.') .replace('$#$', '.')
temp = temp.replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') //只能输入两个小数 temp = temp.replace(/^(-)*(\d+)\.(\d).*$/, '$1$2.$3') //只能输入1个小数
this.$nextTick(() => { this.$nextTick(() => {
const target = this.couponFormObj.selectedGoodsList.find(item => item.id == id) const target = this.couponFormObj.selectedGoodsList.find(item => item.id == id)
target.newCost = temp target.newCost = temp
...@@ -212,7 +212,7 @@ export default { ...@@ -212,7 +212,7 @@ export default {
.container { .container {
background-color: #fff; background-color: #fff;
padding: 32px 30px; padding: 32px 30px;
min-height: 600px; min-height: calc(100vh - 150px);
position: relative; position: relative;
/deep/ .glsx-combi-form { /deep/ .glsx-combi-form {
padding-bottom: 30px; padding-bottom: 30px;
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
{{ scope.scope.productName }} {{ scope.scope.productName }}
</div> </div>
<div slot="spreadPrice" slot-scope="scope"> <div slot="spreadPrice" slot-scope="scope">
<span :style="{ color: Number(scope.scope.lineationPrice - scope.scope.costPrice) <= 0 ? '#eb4e4e' : '#666666' }">{{ Number(Number(scope.scope.lineationPrice - scope.scope.costPrice).toFixed(2)) }}</span> <span :style="{ color: Number(scope.scope.lineationPrice - scope.scope.costPrice) <= 0 ? '#eb4e4e' : '#666666' }">{{ Number(Number(scope.scope.lineationPrice - scope.scope.costPrice).toFixed(1)) }}</span>
</div> </div>
</GLTable> </GLTable>
</div> </div>
...@@ -216,7 +216,7 @@ export default { ...@@ -216,7 +216,7 @@ export default {
list.splice(idx, 1) list.splice(idx, 1)
} }
} }
list.map(item => this.$set(item, 'newCost', Number((item.lineationPrice - item.costPrice).toFixed(2)))) list.map(item => this.$set(item, 'newCost', Number((item.lineationPrice - item.costPrice).toFixed(1))))
this.$emit('confirmDialog', [...list, ...this.selectedGoodsList]) this.$emit('confirmDialog', [...list, ...this.selectedGoodsList])
this.handleClose() this.handleClose()
}, },
......
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
}, },
{ {
label: '商品名称', label: '商品名称',
width: 280, minWidth: 280,
line: 1, line: 1,
addHtml: 'goodsName' addHtml: 'goodsName'
}, },
...@@ -307,6 +307,7 @@ export default { ...@@ -307,6 +307,7 @@ export default {
.container { .container {
background-color: #fff; background-color: #fff;
padding: 20px; padding: 20px;
height: calc(100vh - 120px);
.good_name { .good_name {
.coupon_type { .coupon_type {
width: 40px; width: 40px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!