|
@@ -166,6 +166,8 @@
|
|
border
|
|
border
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
highlight-current-row
|
|
highlight-current-row
|
|
|
|
+ ref="materialTableTop"
|
|
|
|
+ id="table"
|
|
>
|
|
>
|
|
<el-table-column
|
|
<el-table-column
|
|
v-for="(item, i) in materialTableTop"
|
|
v-for="(item, i) in materialTableTop"
|
|
@@ -185,6 +187,10 @@
|
|
class="textinput111"
|
|
class="textinput111"
|
|
v-model.number="scope.row.orderPlanWeight"
|
|
v-model.number="scope.row.orderPlanWeight"
|
|
placeholder="(必填)"
|
|
placeholder="(必填)"
|
|
|
|
+ :id="'input' + scope.$index"
|
|
|
|
+ @keyup.up.native="clicks(scope.$index)"
|
|
|
|
+ @keyup.down.native="clickx(scope.$index)"
|
|
|
|
+ @keyup.enter.native="singleDistribute"
|
|
></el-input>
|
|
></el-input>
|
|
</template>
|
|
</template>
|
|
<!-- 米数 -->
|
|
<!-- 米数 -->
|
|
@@ -315,6 +321,14 @@
|
|
>更改</el-button
|
|
>更改</el-button
|
|
>
|
|
>
|
|
</template>
|
|
</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'">
|
|
<template v-if="item.prop == 'orderPlanWeight'">
|
|
<el-input
|
|
<el-input
|
|
@@ -887,7 +901,8 @@ export default {
|
|
{
|
|
{
|
|
prop: "Specification",
|
|
prop: "Specification",
|
|
label: "规格型号",
|
|
label: "规格型号",
|
|
- width: "140px"
|
|
|
|
|
|
+ width: "140px",
|
|
|
|
+ slot: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
prop: "orderPlanWeight",
|
|
prop: "orderPlanWeight",
|
|
@@ -946,7 +961,9 @@ export default {
|
|
ignoreSaleOrderConsigneeTel: 0,
|
|
ignoreSaleOrderConsigneeTel: 0,
|
|
restaurants: [],
|
|
restaurants: [],
|
|
saleAreaId: null,
|
|
saleAreaId: null,
|
|
- isNiTui: 0
|
|
|
|
|
|
+ isNiTui: 0,
|
|
|
|
+ datalistindex: 0,
|
|
|
|
+ temporarylist:[],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -1969,7 +1986,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 确定
|
|
// 确定
|
|
- makeSure() {
|
|
|
|
|
|
+ async makeSure() {
|
|
if (this.selectionList.length == 0) {
|
|
if (this.selectionList.length == 0) {
|
|
this.$message.warning("请先填写具体信息");
|
|
this.$message.warning("请先填写具体信息");
|
|
return;
|
|
return;
|
|
@@ -1981,6 +1998,18 @@ export default {
|
|
i++;
|
|
i++;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ let flag=0
|
|
|
|
+ await this.axios
|
|
|
|
+ .post("/api/v1/ams/queryFormat",this.selectionList)
|
|
|
|
+ .then(res=>{
|
|
|
|
+ if (res.data.code=="500"){
|
|
|
|
+ flag=1
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ if (flag== 1){
|
|
|
|
+ this.$message.error("规格型号有问题,请重新输入");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
if (i != 0) {
|
|
if (i != 0) {
|
|
this.$message.error("件数必填且请输入正整数");
|
|
this.$message.error("件数必填且请输入正整数");
|
|
return;
|
|
return;
|
|
@@ -2017,10 +2046,31 @@ export default {
|
|
this.orderMakeSure = true;
|
|
this.orderMakeSure = true;
|
|
},
|
|
},
|
|
//发送请求
|
|
//发送请求
|
|
- sendRequest() {
|
|
|
|
|
|
+ async sendRequest() {
|
|
this.orderMakeSure = false;
|
|
this.orderMakeSure = false;
|
|
//是否还有件数未填写
|
|
//是否还有件数未填写
|
|
var orderPlanWeightAllFill = 0;
|
|
var orderPlanWeightAllFill = 0;
|
|
|
|
+ //根据规格型号与物资名称获取对应的物资ID||确认规格型号格式是否正确
|
|
|
|
+ //先把暂存区的数据清空
|
|
|
|
+ this.temporarylist=[]
|
|
|
|
+ let flag=0
|
|
|
|
+ await this.axios
|
|
|
|
+ .post("/api/v1/ams/queryMaterial",this.selectionList)
|
|
|
|
+ .then(res=>{
|
|
|
|
+ if (res.data.code === "500"){
|
|
|
|
+ flag=1
|
|
|
|
+ }
|
|
|
|
+ console.log(res.data.code)
|
|
|
|
+ //给暂存区的数据赋值
|
|
|
|
+ this.temporarylist=res.data.data
|
|
|
|
+ console.log("以下是查询出来的数据")
|
|
|
|
+ console.log(res.data.data)
|
|
|
|
+ })
|
|
|
|
+ if (flag===1){
|
|
|
|
+ this.$message.error("规格型号不对")
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.selectionList=this.temporarylist
|
|
//初始化maplist
|
|
//初始化maplist
|
|
var mapList = [];
|
|
var mapList = [];
|
|
this.selectionList.forEach(item => {
|
|
this.selectionList.forEach(item => {
|
|
@@ -2105,6 +2155,44 @@ export default {
|
|
done();
|
|
done();
|
|
})
|
|
})
|
|
.catch(_ => {});
|
|
.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()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|