|
@@ -166,6 +166,8 @@
|
|
|
border
|
|
|
style="width: 100%"
|
|
|
highlight-current-row
|
|
|
+ ref="materialTableTop"
|
|
|
+ id="table"
|
|
|
>
|
|
|
<el-table-column
|
|
|
v-for="(item, i) in materialTableTop"
|
|
@@ -185,6 +187,10 @@
|
|
|
class="textinput111"
|
|
|
v-model.number="scope.row.orderPlanWeight"
|
|
|
placeholder="(必填)"
|
|
|
+ :id="'input' + scope.$index"
|
|
|
+ @keyup.up.native="clicks(scope.$index)"
|
|
|
+ @keyup.down.native="clickx(scope.$index)"
|
|
|
+ @keyup.enter.native="singleDistribute"
|
|
|
></el-input>
|
|
|
</template>
|
|
|
<!-- 米数 -->
|
|
@@ -315,6 +321,14 @@
|
|
|
>更改</el-button
|
|
|
>
|
|
|
</template>
|
|
|
+ <!--规格型号-->
|
|
|
+ <template v-if="item.prop == 'Specification'">
|
|
|
+ <el-input
|
|
|
+ style="width: 120px"
|
|
|
+ class="textinput"
|
|
|
+ v-model.number="scope.row.Specification"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
<!-- 物资件数 -->
|
|
|
<template v-if="item.prop == 'orderPlanWeight'">
|
|
|
<el-input
|
|
@@ -887,7 +901,8 @@ export default {
|
|
|
{
|
|
|
prop: "Specification",
|
|
|
label: "规格型号",
|
|
|
- width: "140px"
|
|
|
+ width: "140px",
|
|
|
+ slot: true
|
|
|
},
|
|
|
{
|
|
|
prop: "orderPlanWeight",
|
|
@@ -946,7 +961,8 @@ export default {
|
|
|
ignoreSaleOrderConsigneeTel: 0,
|
|
|
restaurants: [],
|
|
|
saleAreaId: null,
|
|
|
- isNiTui: 0
|
|
|
+ isNiTui: 0,
|
|
|
+ datalistindex: 0
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -2105,6 +2121,44 @@ export default {
|
|
|
done();
|
|
|
})
|
|
|
.catch(_ => {});
|
|
|
+ },
|
|
|
+ //点击事件(上)
|
|
|
+ clicks(index){
|
|
|
+ console.log(index)
|
|
|
+ console.log(this.materialList)
|
|
|
+ console.log(this.materialList.length-1)
|
|
|
+ console.log('clicks=e',arguments);
|
|
|
+ if (index==0){
|
|
|
+ console.log("向上1")
|
|
|
+ //this.datalistindex=this.materialTableTop.length-1
|
|
|
+ document.getElementById("input" + (this.materialList.length-1)).focus()
|
|
|
+ }else {
|
|
|
+ console.log("向上2")
|
|
|
+ //this.$refs.materialTableTop.bodyWrapper.scrollTop=index
|
|
|
+ document.getElementById("input" + (index-1)).focus()
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ //点击事件(下)
|
|
|
+ clickx(index){
|
|
|
+ console.log(index)
|
|
|
+ console.log(this.materialList)
|
|
|
+ console.log(this.materialList.length-1)
|
|
|
+ if (index ==this.materialList.length-1){
|
|
|
+ console.log("向下1")
|
|
|
+ document.getElementById("input" + 0).focus()
|
|
|
+ }else {
|
|
|
+ console.log("向下2")
|
|
|
+ //this.datalistindex+=1
|
|
|
+ //this.$refs.materialTableTop.bodyWrapper.scrollTop=(index+1)*height
|
|
|
+ //var tbl=document.getElementById("table").childNodes[0]
|
|
|
+ //tbl.childNodes[len].childNodes[0].childNodes[0].focus()children[3]
|
|
|
+ //const rowlist=this.$refs.materialTableTop.$el.children[3].children[1].children[0]
|
|
|
+ //.children[1].children[len].children[3].children[0].children[0].children[0].focus()
|
|
|
+ //console.log(rowlist)
|
|
|
+ var nextInput = document.getElementById("input" + (index + 1));
|
|
|
+ nextInput.focus()
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|