Commit be747969 by 李伟康

众筹

1 parent 9eef2941
...@@ -132,6 +132,7 @@ ...@@ -132,6 +132,7 @@
:data-index="index" :data-index="index"
style="width: 150px" style="width: 150px"
type="number" type="number"
@input="formatAppend('crowdFundingPrice',index)"
><span slot="append">元</span></el-input> ><span slot="append">元</span></el-input>
<span class="balancePayment">尾款: <span class="balancePayment">尾款:
{{ editForm.crowdFundingPrice[index] | filterBalancePayment(editForm.activityPrice[index]) }}</span> {{ editForm.crowdFundingPrice[index] | filterBalancePayment(editForm.activityPrice[index]) }}</span>
...@@ -146,6 +147,7 @@ ...@@ -146,6 +147,7 @@
:data-index="index" :data-index="index"
style="width: 150px" style="width: 150px"
type="number" type="number"
@input="formatAppend('activityPrice',index)"
><span slot="append">元</span></el-input> ><span slot="append">元</span></el-input>
</el-form-item> </el-form-item>
...@@ -160,6 +162,7 @@ ...@@ -160,6 +162,7 @@
style="width: 150px" style="width: 150px"
:disabled="isDisabled" :disabled="isDisabled"
type="number" type="number"
@input="formatAppend('goodsStock',index, true)"
><span slot="append">件</span></el-input> ><span slot="append">件</span></el-input>
</el-form-item> </el-form-item>
</div> </div>
...@@ -2265,18 +2268,28 @@ export default { ...@@ -2265,18 +2268,28 @@ export default {
//多选 this.selectedProInfo = this.editForm.goodsId ? { id: this.editForm.goodsId } : {} //多选 this.selectedProInfo = this.editForm.goodsId ? { id: this.editForm.goodsId } : {}
this.handleSingleSelectClose() this.handleSingleSelectClose()
}, },
handleSingleSelectConfirm (selectedProInfo) { formatAppend (target, index, isInt) {
const val = this.editForm[target][index]
let str = String(val)
if (isInt) this.editForm[target][index] = Math.floor(val)
if (str.indexOf('.') > 0) this.editForm[target][index] = Number(str.slice(0, str.indexOf('.') + 3))
},
handleSingleSelectConfirm (list) {
// this.editForm.activityPrice = '' // this.editForm.activityPrice = ''
// this.editForm.goodsStock = '' // this.editForm.goodsStock = ''
let { selectedProInfo } = this
this.handleSingleSelectClose() this.handleSingleSelectClose()
if (selectedProInfo) { if (list) {
selectedProInfo.map((e, index) => { list.map((e, index) => {
this.editForm.activityPrice[index] = '' if (!selectedProInfo.length) {
this.editForm.goodsStock[index] = '' this.editForm.activityPrice[index] = ''
this.editForm.crowdFundingPrice[index] = ''
this.editForm.goodsStock[index] = ''
}
}) })
// 多选 this.editForm.goodsId = selectedProInfo.id // 多选 this.editForm.goodsId = selectedProInfo.id
// this.getGoodInfo(selectedProInfo.id) // this.getGoodInfo(selectedProInfo.id)
this.selectedProInfo = selectedProInfo || [] this.selectedProInfo = list || []
} }
}, },
handleSingleSelectClose (isCancel = false) { handleSingleSelectClose (isCancel = false) {
...@@ -3433,4 +3446,14 @@ export default { ...@@ -3433,4 +3446,14 @@ export default {
margin-top: 10px; margin-top: 10px;
} }
} }
.el-input input::-webkit-outer-spin-button,
.el-input input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
.el-input input[type='number'] {
-moz-appearance: textfield;
}
.el-input .el-input__inner {
line-height: 1 !important;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!