|
@@ -74,13 +74,21 @@
|
|
|
<div class="form-list-two-box">
|
|
|
<el-form-item label="" :prop="'maxList.'+ index +'.list.'+ minIndex +'.applyNum'"
|
|
|
:rules="rules.applyNum">
|
|
|
- <el-input
|
|
|
- maxLength="6"
|
|
|
- v-model="minItem.applyNum"
|
|
|
- placeholder="请输入本次申购量"
|
|
|
- clearable
|
|
|
- style="width: 220px"
|
|
|
- ><i slot="append">{{item.chemicalUnit}}</i></el-input>
|
|
|
+ <!--<el-input-->
|
|
|
+ <!--maxLength="6"-->
|
|
|
+ <!--v-model="minItem.applyNum"-->
|
|
|
+ <!--placeholder="请输入本次申购量"-->
|
|
|
+ <!--clearable-->
|
|
|
+ <!--style="width: 220px"-->
|
|
|
+ <!--><i slot="append">{{item.chemicalUnit}}</i></el-input>-->
|
|
|
+ <div class="form-apply-num-box">
|
|
|
+ <el-input-number v-model="minItem.applyNum"
|
|
|
+ :controls="false"
|
|
|
+ style="width:159px;"
|
|
|
+ @change="applyNumChange(minItem.applyNum,index,minIndex)"
|
|
|
+ :min="0" :max="999999"></el-input-number>
|
|
|
+ <p class="form-apply-num-text-box">{{item.chemicalUnit}}</p>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
<p class="el-icon-delete button-icon-p" v-if="formData.maxList[index].list.length>1" @click="delObj(index,minIndex)"></p>
|
|
|
<p class="el-icon-circle-plus-outline button-icon-p" v-if="minIndex ==formData.maxList[index].list.length-1" @click="addObj(index)"></p>
|
|
@@ -138,7 +146,7 @@
|
|
|
{ required: true, message: '请输入本次申购量', trigger: 'blur' },
|
|
|
{ required: true, message: "请输入本次申购量", validator: this.spaceJudgment, trigger: "blur" },
|
|
|
{ required: true, message: "请输入本次申购量", validator: nonZero, trigger: "blur" },
|
|
|
- { required: true, message: "只能输入数字", validator: this.isNum, trigger: "blur" },
|
|
|
+ // { required: true, message: "只能输入数字", validator: this.isNum, trigger: "blur" },
|
|
|
],
|
|
|
},
|
|
|
//实验室列表
|
|
@@ -164,6 +172,13 @@
|
|
|
this.addData();
|
|
|
},
|
|
|
methods: {
|
|
|
+ applyNumChange(e,index,minIndex){
|
|
|
+ let text = e+''
|
|
|
+ if(text.indexOf('.') >= 0){
|
|
|
+ let num = text.substring(0, text.indexOf('.') + 6)
|
|
|
+ this.$set(this.formData.maxList[index].list[minIndex],'applyNum',num);
|
|
|
+ }
|
|
|
+ },
|
|
|
//新增逻辑
|
|
|
addData(){
|
|
|
let self = this;
|
|
@@ -436,3 +451,29 @@
|
|
|
}
|
|
|
}
|
|
|
</style>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+ .form-apply-num-box{
|
|
|
+ display: flex;
|
|
|
+ .el-input-number .el-input{
|
|
|
+ input{
|
|
|
+ padding:0 15px;
|
|
|
+ text-align: left;
|
|
|
+ width:159px;
|
|
|
+ border-top-right-radius: 0;
|
|
|
+ border-bottom-right-radius: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .form-apply-num-text-box{
|
|
|
+ padding:0 15px !important;
|
|
|
+ background-color: #F5F7FA;
|
|
|
+ color: #909399;
|
|
|
+ border: 1px solid #DCDFE6;
|
|
|
+ border-radius: 4px;
|
|
|
+ white-space: nowrap;
|
|
|
+ border-top-left-radius:0;
|
|
|
+ border-bottom-left-radius:0;
|
|
|
+ border-left:none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|