|
|
|
@ -191,15 +191,18 @@ |
|
|
|
if(this.contents.length <= 0) { |
|
|
|
return this.$msg('您未选择物资') |
|
|
|
} |
|
|
|
|
|
|
|
let is_empty = false; |
|
|
|
console.log("总的", this.contents) |
|
|
|
let list = this.contents.map(item => { |
|
|
|
if(!item.delivery_number.value){ |
|
|
|
is_empty = true; |
|
|
|
} |
|
|
|
if(Number(item.delivery_number.value) > item.stock) { |
|
|
|
console.log('循环几次') |
|
|
|
uni.showModal({ |
|
|
|
title: '温馨提示', |
|
|
|
content: `物资:${item.material_name},仅剩${item.stock}单位库存,已超出您申请的数量,是否直接修改成出库${item.stock}单位`, |
|
|
|
cancelColor: '#11D189', |
|
|
|
confirmColor: '#FF0000', |
|
|
|
confirmColor: '#11D189', |
|
|
|
success: result => { |
|
|
|
if(result.confirm){ |
|
|
|
this.isStock = true |
|
|
|
@ -251,6 +254,15 @@ |
|
|
|
_api = this.API.API_EDITOUTORDER; |
|
|
|
} |
|
|
|
let state = ['待确认', '已确认'][_t]; // 传入状态 |
|
|
|
if(is_empty){ |
|
|
|
uni.showModal({ |
|
|
|
title: '温馨提示', |
|
|
|
content: '您有物资未填写出库数量, 请填写', |
|
|
|
showCancel: false, |
|
|
|
confirmColor: '#11D189' |
|
|
|
}) |
|
|
|
return; |
|
|
|
} |
|
|
|
this.$http(_api, { |
|
|
|
data: list, |
|
|
|
state: state |
|
|
|
|