bug 修复
This commit is contained in:
parent
57505f9d03
commit
1944aa9ca3
|
|
@ -52,7 +52,7 @@
|
|||
{{ formatCurrency(row.costIndicators || '') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属工程" align="center" prop="proName" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="所属工程" align="center" prop="proName" show-overflow-tooltip /> -->
|
||||
<el-table-column label="所属上级" align="center" prop="deptName" show-overflow-tooltip />
|
||||
<el-table-column label="联系人" align="center" prop="linkMan" show-overflow-tooltip />
|
||||
<el-table-column label="联系电话" align="center" prop="telphone" show-overflow-tooltip />
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@
|
|||
v-model="row.deviceNum"
|
||||
style="width: 180px"
|
||||
placeholder="请输入数量"
|
||||
@change="deviceNumChange"
|
||||
@change="deviceNumChange(row)"
|
||||
maxlength="9"
|
||||
/>
|
||||
</template>
|
||||
|
|
@ -332,6 +332,7 @@ export default {
|
|||
this.title = '成套设备编辑'
|
||||
this.addCompleteForm.completeSetName = row.wholeTypeName
|
||||
this.addCompleteForm.mainDevice = row.deviceTypeId
|
||||
this.addCompleteForm.assortDevice = ''
|
||||
this.saveParams.id = row.id
|
||||
this.mainDeviceDisabled = true
|
||||
this.isEdit = true
|
||||
|
|
@ -481,10 +482,11 @@ export default {
|
|||
}
|
||||
},
|
||||
// 数量输入框校验
|
||||
deviceNumChange(val) {
|
||||
deviceNumChange(row) {
|
||||
let reg = /^[1-9]\d*$/
|
||||
if (!reg.test(val)) {
|
||||
if (!reg.test(row.deviceNum)) {
|
||||
this.$message.error('请输入大于0的正整数!')
|
||||
row.deviceNum = 1
|
||||
}
|
||||
},
|
||||
// 保存按钮
|
||||
|
|
|
|||
|
|
@ -339,12 +339,13 @@
|
|||
type="number"
|
||||
placeholder="请输入租赁价格"
|
||||
maxlength="10"
|
||||
@input="changeNum(form)"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="原值" prop="buyPrice">
|
||||
<el-input v-model="form.buyPrice" type="number" placeholder="请输入原值" maxlength="30" />
|
||||
<el-input v-model="form.buyPrice" type="number" placeholder="请输入原值" maxlength="30" @input="changeNum(form)"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
|
@ -683,14 +684,14 @@ export default {
|
|||
leasePrice: [
|
||||
{
|
||||
required: true,
|
||||
message: '内部租赁价格不能为空',
|
||||
message: '请输入正确的内部租赁价格',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
buyPrice: [
|
||||
{
|
||||
required: true,
|
||||
message: '原值不能为空',
|
||||
message: '请输入正确的原值',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
|
|
@ -834,6 +835,14 @@ export default {
|
|||
this.queryParams.level = data.level
|
||||
this.handleQuery()
|
||||
},
|
||||
changeNum(form) {
|
||||
console.log('🚀 ~ changeNum ~ item:', form)
|
||||
if (Number(form.leasePrice) < 0) {
|
||||
form.leasePrice = 0
|
||||
} else if (Number(form.buyPrice) < 0) {
|
||||
form.buyPrice = 0
|
||||
}
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
|
|
|
|||
Loading…
Reference in New Issue