刻字机选择
This commit is contained in:
@@ -45,9 +45,9 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(e, i) in dataList" :key="i" @click="toRadio(e)">
|
<tr v-for="(e, i) in dataList" :key="i">
|
||||||
<td>
|
<td>
|
||||||
<button class="iconfont select_icon select_square_icon" :class="e.checked ? 'selected_icon' : 'unselect_icon'"></button>
|
<button class="iconfont select_icon select_square_icon" :class="e.checked ? 'selected_icon' : 'unselect_icon'" @click="toRadio(e)"></button>
|
||||||
</td>
|
</td>
|
||||||
<td>{{ i+1 }}</td>
|
<td>{{ i+1 }}</td>
|
||||||
<td>{{ e.device_code }}</td>
|
<td>{{ e.device_code }}</td>
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
<td>{{e.plan_qty | numeric(3)}}</td>
|
<td>{{e.plan_qty | numeric(3)}}</td>
|
||||||
<td>{{e.dq_real_qty | numeric(3)}}</td>
|
<td>{{e.dq_real_qty | numeric(3)}}</td>
|
||||||
<td>{{ e.material_spec }}</td>
|
<td>{{ e.material_spec }}</td>
|
||||||
<td><input type="number" class="input" v-model="e.weight"></td>
|
<td><input type="number" class="input" v-model="e.weight" @blur="handleBlur(e)"></td>
|
||||||
<td>{{ e.material_code }}</td>
|
<td>{{ e.material_code }}</td>
|
||||||
<td>{{ e.material_name }}</td>
|
<td>{{ e.material_name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -96,7 +96,7 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
let weight = accDiv(this.$route.query.weight, this.checkArr.length)
|
let weight = accDiv(this.$route.query.weight, this.checkArr.length)
|
||||||
weight = Number(weight).toFixed(3)
|
weight = Number(weight).toFixed(0)
|
||||||
this.dataList.map(el => {
|
this.dataList.map(el => {
|
||||||
if (el.checked === true) {
|
if (el.checked === true) {
|
||||||
this.$set(el, 'weight', weight)
|
this.$set(el, 'weight', weight)
|
||||||
@@ -148,6 +148,9 @@ export default {
|
|||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleBlur (e) {
|
||||||
|
e.weight = Math.trunc(Number(e.weight))
|
||||||
|
},
|
||||||
toRadio (e) {
|
toRadio (e) {
|
||||||
e.checked = !e.checked
|
e.checked = !e.checked
|
||||||
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
||||||
|
|||||||
Reference in New Issue
Block a user