更新
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-input v-model="partNumber" size="small" placeholder="零件号" clearable style="width:160px;margin-top: 3px"/>
|
||||
<el-input v-model="partNumber" size="small" placeholder="零件号或零件名称" clearable style="width:160px;margin-top: 3px"/>
|
||||
<el-button type="primary" size="mini" icon="el-icon-search" style="margin-left:20px" plain @click="getList()">查询</el-button>
|
||||
<el-button type="danger" plain size="mini" icon="el-icon-caret-right" style="float: right;margin-right:10px" @click="getBack()">打回</el-button>
|
||||
<el-table v-loading="loading1" ref="multipleTable" :data="List1" border size="mini" stripe highlight-current-row height="265" style="width: 100%;margin-top: 3px" @selection-change="handleSelectionChange">
|
||||
@@ -53,10 +53,10 @@
|
||||
<el-table-column label="操作" align="center" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
<div style="display: inline-block">
|
||||
<el-button type="text" size="mini" icon="el-icon-edit" style="margin-left:10px" @click="handleEdit(scope.row)"/>
|
||||
<el-button type="text" size="mini" icon="el-icon-edit" @click="handleEdit(scope.row)"/>
|
||||
</div>
|
||||
<div style="display: inline-block">
|
||||
<el-button :disabled="scope.row.单据状态==='成交'" type="text" size="mini" icon="el-icon-delete" @click="handleDelete(scope.row)"/>
|
||||
<el-button :disabled="scope.row.单据状态==='成交'" type="text" size="mini" icon="el-icon-delete" style="margin-left:10px" @click="handleDelete(scope.row)"/>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -96,7 +96,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="外协价格(元)" align="center" width="130px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-positive="'float'" v-model="scope.row.加工价格_成交" class="editWorkTime" type="number" style="text-align: right" size="small" @change="saveAct(scope.row)"/>
|
||||
<el-input v-positive="'float'" v-model="scope.row.加工价格_成交" class="editWorkTime" type="number" style="text-align: right" size="small" @change="saveAct(scope.row)" @blur="filterNuber(scope.row.加工价格_成交, scope.$index, '加工价格_成交')"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机加工开始时间" align="center" width="150px">
|
||||
@@ -292,6 +292,22 @@ export default {
|
||||
})
|
||||
this.loading2 = false
|
||||
},
|
||||
filterNuber(val, index, date, row) {
|
||||
console.log(index, 6666)
|
||||
let value = '' + val
|
||||
value = value
|
||||
.replace(/[^\d.]/g, '') // 清除“数字”和“.”以外的字符
|
||||
.replace(/\.{2,}/g, '.') // 只保留第一个. 清除多余的
|
||||
.replace('.', '$#$')
|
||||
.replace(/\./g, '')
|
||||
.replace('$#$', '.')
|
||||
.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
|
||||
if (value.indexOf('.') < 0 && value !== '') {
|
||||
value = parseFloat(value).toFixed(2)
|
||||
}
|
||||
console.log(value)
|
||||
this.List3[index][date] = value
|
||||
},
|
||||
// 表3合计
|
||||
getSummaries(param) {
|
||||
const { data } = param
|
||||
@@ -303,7 +319,7 @@ export default {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
sums[4] += Math.round(parseFloat(data[i].加工价格_成交) * 100) / 100
|
||||
}
|
||||
sums[4] = Math.round(sums[4] * 100) / 100 + ' 元'
|
||||
sums[4] = sums[4].toFixed(2) + ' 元'
|
||||
return sums
|
||||
},
|
||||
// 查询未选入零件
|
||||
|
||||
Reference in New Issue
Block a user