|
@ -54,7 +54,9 @@ |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
goHome, |
|
|
goHome, |
|
|
updateTitle |
|
|
updateTitle, |
|
|
|
|
|
getCurrDateOneMonthsTimes, |
|
|
|
|
|
navigateBack |
|
|
} from '@/common/basic.js'; |
|
|
} from '@/common/basic.js'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
@ -126,7 +128,7 @@ |
|
|
this.tolocationTypeList = res.tolocationTypeList; |
|
|
this.tolocationTypeList = res.tolocationTypeList; |
|
|
this.showFromLocationPopup(); |
|
|
this.showFromLocationPopup(); |
|
|
} else { |
|
|
} else { |
|
|
this.$refs.comMessage.showBreakMessage(res.message ); |
|
|
this.$refs.comMessage.showBreakMessage(res.message); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
@ -235,11 +237,11 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
commit() { |
|
|
commit() { |
|
|
if(this.reasonText==""){ |
|
|
if (this.reasonText == "") { |
|
|
this.showMessage("请先选择报废原因") |
|
|
this.showMessage("请先选择报废原因") |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if(this.detailSource.length==0){ |
|
|
if (this.detailSource.length == 0) { |
|
|
this.showErrorMessage("请先扫描数据") |
|
|
this.showErrorMessage("请先扫描数据") |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
@ -251,40 +253,35 @@ |
|
|
|
|
|
|
|
|
var params = this.setRequestParams(); |
|
|
var params = this.setRequestParams(); |
|
|
console.log("提交" + JSON.stringify(params)) |
|
|
console.log("提交" + JSON.stringify(params)) |
|
|
// scrapRequestCreate(params).then(res => { |
|
|
scrapRequestCreate(params).then(res => { |
|
|
// uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
// if (res.data) { |
|
|
if (res.data) { |
|
|
// this.showCommitSuccessMessage("提交成功<br>生成采购收货记录" + res.data, ) |
|
|
this.showCommitSuccessMessage("提交成功<br>生成报废出库申请<br>" + res.data, ) |
|
|
// } else { |
|
|
} else { |
|
|
// this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
// } |
|
|
} |
|
|
// }).catch(error => { |
|
|
}).catch(error => { |
|
|
// uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
// this.showErrorMessage(error) |
|
|
this.showErrorMessage(error) |
|
|
// }) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setRequestParams(){ |
|
|
setRequestParams() { |
|
|
var subList = [] |
|
|
var subList = [] |
|
|
this.detailSource.forEach(item => { |
|
|
this.detailSource.forEach(item => { |
|
|
item.subList.forEach(detail => { |
|
|
item.subList.forEach(detail => { |
|
|
if (detail.scaned) { |
|
|
if (detail.scaned) { |
|
|
|
|
|
detail.fromLocationCode = detail.locationCode |
|
|
subList.push(detail) |
|
|
subList.push(detail) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
this.dataContent.subList = subList |
|
|
this.dataContent.subList = subList |
|
|
this.dataContent.businessType = "PurchasePutaway" |
|
|
this.dataContent.status = 1; |
|
|
this.dataContent.departmentCode= "研发部门"; |
|
|
this.dataContent.fromWarehouseCode = "W1"; |
|
|
this.dataContent.status= 1 ; |
|
|
this.dataContent.dueTime = getCurrDateOneMonthsTimes(); |
|
|
this.dataContent.autoCommit = "FALSE"; |
|
|
|
|
|
this.dataContent.autoAgree = "FALSE"; |
|
|
|
|
|
this.dataContent.autoExecute = "FALSE"; |
|
|
|
|
|
this.dataContent.directCreateRecord = "FALSE"; |
|
|
|
|
|
return this.dataContent; |
|
|
return this.dataContent; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -324,8 +321,7 @@ |
|
|
|
|
|
|
|
|
showCommitSuccessMessage(hint) { |
|
|
showCommitSuccessMessage(hint) { |
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
this.fromLocationCode = ''; |
|
|
navigateBack(1) |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|