|
@@ -183,6 +183,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="createACar"
|
|
|
></el-input>
|
|
|
</template>
|
|
|
<!-- 米数 -->
|
|
@@ -308,12 +312,11 @@
|
|
|
disabled
|
|
|
>
|
|
|
</el-input>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click="changeMaterial(scope.$index)"
|
|
|
- v-if="isCellClick == 1"
|
|
|
- >更改</el-button
|
|
|
- >
|
|
|
+ <!--更改-->
|
|
|
+ <i class="el-icon-edit"
|
|
|
+ @click="changeMaterial(scope.$index)"
|
|
|
+ style="font-size: 20px"
|
|
|
+ v-if="isCellClick == 1"></i>
|
|
|
</template>
|
|
|
<!-- 物资件数 -->
|
|
|
<template v-if="item.prop == 'orderPlanWeight'">
|
|
@@ -322,6 +325,14 @@
|
|
|
v-model.number="scope.row.orderPlanWeight"
|
|
|
></el-input>
|
|
|
</template>
|
|
|
+ <!--规格型号-->
|
|
|
+ <template v-if="item.prop=='Specification'">
|
|
|
+ <el-input
|
|
|
+ class="textinput"
|
|
|
+ v-model.number="scope.row.Specification"
|
|
|
+ style="width:120px"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
<!-- 米数 -->
|
|
|
<template v-if="item.prop == 'meterNumber'">
|
|
|
<el-input
|
|
@@ -358,12 +369,12 @@
|
|
|
disabled
|
|
|
>
|
|
|
</el-input>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click="ondrawer(scope.row, scope.$index)"
|
|
|
- v-if="isCellClick == 1"
|
|
|
- >选择</el-button
|
|
|
- >
|
|
|
+ <!--增加-->
|
|
|
+ <i class="el-icon-folder-add"
|
|
|
+ @click="ondrawer(scope.row, scope.$index)"
|
|
|
+ v-if="isCellClick == 1"
|
|
|
+ style="font-size: 20px"
|
|
|
+ ></i>
|
|
|
</template>
|
|
|
<!-- 收货客户电话号码 -->
|
|
|
<template v-if="item.prop == 'saleOrderConsigneeTel'">
|
|
@@ -389,7 +400,8 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<!-- 操作列 -->
|
|
|
- <el-table-column fixed="right" label="操作" width="200">
|
|
|
+ <el-table-column fixed="right" label="操作" width="200"
|
|
|
+ v-if="isCellClick == 1">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
@click.native.prevent="deleteRow(scope.$index, selectionList)"
|
|
@@ -411,7 +423,7 @@
|
|
|
>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column fixed="right" width="80">
|
|
|
+ <el-table-column fixed="right" width="80" v-if="isCellClick == 1">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
@click.native.prevent="copyRowfluAll(scope.$index, scope.row)"
|
|
@@ -705,7 +717,7 @@ export default {
|
|
|
{
|
|
|
prop: "Specification",
|
|
|
label: "规格型号",
|
|
|
- width: "140"
|
|
|
+ width: "140",
|
|
|
},
|
|
|
{
|
|
|
prop: "orderPlanWeight",
|
|
@@ -841,7 +853,8 @@ export default {
|
|
|
{
|
|
|
prop: "Specification",
|
|
|
label: "规格型号",
|
|
|
- width: "140"
|
|
|
+ width: "140",
|
|
|
+ slot: true
|
|
|
},
|
|
|
{
|
|
|
prop: "orderPlanWeight",
|
|
@@ -898,7 +911,9 @@ export default {
|
|
|
//收款公司
|
|
|
saleOrderReceiveCustomer: null,
|
|
|
//是否忽视收货客户电话字段
|
|
|
- ignoreSaleOrderConsigneeTel: 0
|
|
|
+ ignoreSaleOrderConsigneeTel: 0,
|
|
|
+ //暂时存取的数据
|
|
|
+ temporarylist: [],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -1816,6 +1831,20 @@ export default {
|
|
|
},
|
|
|
//确定收货地址事件
|
|
|
addAddressClick() {
|
|
|
+ //不管是外层还是内层都需要修改,如果存在都需要修改收货客户的电话
|
|
|
+ //定义一个正则表达式判断是否有电话
|
|
|
+ var est=/\d{11}/g
|
|
|
+ var string2=this.place.match(est)
|
|
|
+ console.log("-----------这是抓取到的数据----------")
|
|
|
+ console.log(string2)
|
|
|
+ if (string2 != null){
|
|
|
+ for(i=0;i<string2.length;i++){
|
|
|
+ var reg=/^1[3456789]\d{9}$/
|
|
|
+ if(reg.test(string2[i])){
|
|
|
+ this.saleOrderConsigneeTel=string2
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if (this.inOrOut % 2 == 0) {
|
|
|
for (
|
|
|
var i = this.row.index;
|
|
@@ -1873,7 +1902,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 确定
|
|
|
- makeSure() {
|
|
|
+ async makeSure() {
|
|
|
if (this.selectionList.length == 0) {
|
|
|
this.$message.warning("请先填写具体信息");
|
|
|
return;
|
|
@@ -1885,6 +1914,20 @@ export default {
|
|
|
i++;
|
|
|
}
|
|
|
});
|
|
|
+ let s=0
|
|
|
+ //确认规格型号格式是否正确
|
|
|
+ await this.axios
|
|
|
+ .post("/api/v1/ams/queryFormat",this.selectionList)
|
|
|
+ .then(res=>{
|
|
|
+ if (res.data.code=="500"){
|
|
|
+ s=1
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log("这是获取到的数据")
|
|
|
+ if (s== 1){
|
|
|
+ this.$message.error("规格型号有问题,请重新输入");
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (i != 0) {
|
|
|
this.$message.error("件数必填且请输入正整数");
|
|
|
return;
|
|
@@ -1920,8 +1963,37 @@ export default {
|
|
|
});
|
|
|
this.orderMakeSure = true;
|
|
|
},
|
|
|
+ async getlist(){
|
|
|
+ let res=await this.axios
|
|
|
+ .post("/api/v1/ams/queryMaterial",this.selectionList)
|
|
|
+ this.selectionList=res.data.data
|
|
|
+ console.log("这是查询出来的")
|
|
|
+ console.log(res.data.data)
|
|
|
+ console.log("这是修改后的数据")
|
|
|
+ console.log(this.selectionList)
|
|
|
+ },
|
|
|
//发送请求
|
|
|
- sendRequest() {
|
|
|
+ async sendRequest() {
|
|
|
+ //根据规格型号与物资名称获取对应的物资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.axios
|
|
|
.post(
|
|
@@ -1934,8 +2006,10 @@ export default {
|
|
|
//是否还有件数未填写
|
|
|
var orderPlanWeightAllFill = 0;
|
|
|
//初始化maplist
|
|
|
+ this.selectionList=this.temporarylist
|
|
|
+ console.log("以下是修改过后的数据")
|
|
|
+ console.log(this.selectionList)
|
|
|
var mapList = [];
|
|
|
- console.log(this.selectionList);
|
|
|
this.selectionList.forEach(item => {
|
|
|
if (!item.orderPlanWeight) {
|
|
|
orderPlanWeightAllFill++;
|
|
@@ -2013,8 +2087,45 @@ export default {
|
|
|
})
|
|
|
.catch(_ => {});
|
|
|
},
|
|
|
+ CloseClick() {},
|
|
|
+ //点击事件(上)
|
|
|
+ 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()
|
|
|
+ }
|
|
|
|
|
|
- CloseClick() {}
|
|
|
+ },
|
|
|
+ //点击事件(下)
|
|
|
+ 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()
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|