前端逻辑修改
This commit is contained in:
parent
481c14c3b7
commit
33941173a3
|
|
@ -126,12 +126,12 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="送货数量" align="center" prop="deliveryNum" :show-overflow-tooltip="true">
|
<el-table-column label="送货数量" align="center" prop="deliveryNum" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model.number="scope.row.deliveryNum" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.deliveryNum=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>
|
<el-input v-model="scope.row.deliveryNum" placeholder="请输入" maxlength="10" clearable @change="patternValue(scope.row)"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合格数量" align="center" prop="qualifiedNum" :show-overflow-tooltip="true">
|
<el-table-column label="合格数量" align="center" prop="qualifiedNum" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model.number="scope.row.qualifiedNum" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.qualifiedNum=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>
|
<el-input v-model="scope.row.qualifiedNum" placeholder="请输入" maxlength="10" clearable @change="patternValue2(scope.row)"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true">
|
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true">
|
||||||
|
|
@ -760,6 +760,23 @@ export default {
|
||||||
this.attachmentList.splice(sum, 1)
|
this.attachmentList.splice(sum, 1)
|
||||||
this.baseInfo.inspectAttachmentList.splice(sum, 1)
|
this.baseInfo.inspectAttachmentList.splice(sum, 1)
|
||||||
},
|
},
|
||||||
|
patternValue(row){
|
||||||
|
row.deliveryNum = row.deliveryNum.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1')
|
||||||
|
setTimeout(()=>{
|
||||||
|
if(Number(row.deliveryNum)>Number(row.orderNum)){
|
||||||
|
row.deliveryNum = row.orderNum
|
||||||
|
}
|
||||||
|
},500)
|
||||||
|
|
||||||
|
},
|
||||||
|
patternValue2(row){
|
||||||
|
row.qualifiedNum = row.qualifiedNum.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1')
|
||||||
|
setTimeout(()=>{
|
||||||
|
if(Number(row.qualifiedNum)>Number(row.deliveryNum)){
|
||||||
|
row.qualifiedNum = row.deliveryNum
|
||||||
|
}
|
||||||
|
},500)
|
||||||
|
},
|
||||||
//日期
|
//日期
|
||||||
formatDate(date) {
|
formatDate(date) {
|
||||||
// 格式化为 YYYY-MM-DD
|
// 格式化为 YYYY-MM-DD
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue