|
@@ -907,7 +907,9 @@ export default {
|
|
|
//收款公司
|
|
|
saleOrderReceiveCustomer: null,
|
|
|
//是否忽视收货客户电话字段
|
|
|
- ignoreSaleOrderConsigneeTel: 0
|
|
|
+ ignoreSaleOrderConsigneeTel: 0,
|
|
|
+ //暂时存取的数据
|
|
|
+ temporarylist: [],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -1882,7 +1884,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 确定
|
|
|
- makeSure() {
|
|
|
+ async makeSure() {
|
|
|
if (this.selectionList.length == 0) {
|
|
|
this.$message.warning("请先填写具体信息");
|
|
|
return;
|
|
@@ -1894,15 +1896,20 @@ export default {
|
|
|
i++;
|
|
|
}
|
|
|
});
|
|
|
+ let s=0
|
|
|
//确认规格型号格式是否正确
|
|
|
- this.axios
|
|
|
+ await this.axios
|
|
|
.post("/api/v1/ams/queryFormat",this.selectionList)
|
|
|
- .then(res =>{
|
|
|
- if (res.data.code == "500"){
|
|
|
- this.$message.error("规格型号不对");
|
|
|
- return;
|
|
|
+ .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;
|
|
@@ -1938,8 +1945,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(
|
|
@@ -1952,8 +1988,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++;
|