|
|
|
@ -1690,337 +1690,12 @@ export default { |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(row)); |
|
|
|
this.refreshCurrentTabTable (); |
|
|
|
}, |
|
|
|
refreshCurrentTabTable(){ |
|
|
|
if(this.currentRow===''||this.currentRow===null){ |
|
|
|
this.currentRow={site:'',notifyNo:'',orderType:'shoporder'} |
|
|
|
} |
|
|
|
// rqrq - 添加orderType参数 |
|
|
|
let queryData = { |
|
|
|
...this.currentRow, |
|
|
|
orderType: 'shoporder' |
|
|
|
} |
|
|
|
if(this.activeName==='detail'){ |
|
|
|
searchNotifyOrderListNew(queryData).then(({data}) => { |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
if (data && data.code == 0) { |
|
|
|
this.dataList2 = data.rows |
|
|
|
|
|
|
|
} else { |
|
|
|
this.dataList2 = []; |
|
|
|
} |
|
|
|
}); |
|
|
|
}else if(this.activeName==='sub'){ |
|
|
|
searchNotifyMaterialListNew(queryData).then(({data}) => { |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
if (data && data.code == 0) { |
|
|
|
this.dataList3 = data.rows |
|
|
|
|
|
|
|
} else { |
|
|
|
this.dataList3 = []; |
|
|
|
} |
|
|
|
}); |
|
|
|
}else if(this.activeName==='change'){ |
|
|
|
searchNotifyLogNew(queryData).then(({data}) => { |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
if (data && data.code == 0) { |
|
|
|
this.dataList5 = data.rows |
|
|
|
|
|
|
|
} else { |
|
|
|
this.dataList5 = []; |
|
|
|
} |
|
|
|
}); |
|
|
|
}else if(this.activeName==='close'){ |
|
|
|
searchNotifyLogCloseNew(queryData).then(({data}) => { |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
if (data && data.code == 0) { |
|
|
|
this.dataList6 = data.rows |
|
|
|
|
|
|
|
} else { |
|
|
|
this.dataList6 = []; |
|
|
|
} |
|
|
|
}); |
|
|
|
}else if(this.activeName==='labelDetail'){ // rqrq - 预定标签清单页签 - rqrq |
|
|
|
searchMaterialListDetail(queryData).then(({data}) => { |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
if (data && data.code == 0) { |
|
|
|
this.dataList7 = data.rows |
|
|
|
|
|
|
|
} else { |
|
|
|
this.dataList7 = []; |
|
|
|
} |
|
|
|
}); |
|
|
|
}else { |
|
|
|
searchSumNotifyMaterialListNew(queryData).then(({data}) => { |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
if (data && data.code == 0) { |
|
|
|
this.dataList4 = data.rows |
|
|
|
|
|
|
|
} else { |
|
|
|
this.dataList4 = []; |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
searchTable(){ |
|
|
|
this.searchData.limit = this.pageSize |
|
|
|
this.searchData.page = this.pageIndex |
|
|
|
searchNotifyHeaderNew(this.searchData).then(({data}) => { |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
if (data && data.code == 0) { |
|
|
|
this.dataList = data.page.list |
|
|
|
this.pageIndex = data.page.currPage |
|
|
|
this.pageSize = data.page.pageSize |
|
|
|
this.totalPage = data.page.totalCount |
|
|
|
} else { |
|
|
|
this.dataList = []; |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
closeNotifyModel(row){ |
|
|
|
this.closeData.site=row.site |
|
|
|
this.closeData.notifyNo=row.notifyNo |
|
|
|
this.closeData.closeRemark='' |
|
|
|
this.closeModalFlag=true |
|
|
|
}, |
|
|
|
closeNotify(){ |
|
|
|
if(this.closeData.closeRemark==null||this.closeData.closeRemark===''){ |
|
|
|
this.$alert("必须输入关闭原因", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
let inData={ |
|
|
|
site:this.closeData.site, |
|
|
|
notifyNo:this.closeData.notifyNo, |
|
|
|
closeRemark:this.closeData.closeRemark, |
|
|
|
username:this.$store.state.user.name, |
|
|
|
status:'CLOSED', |
|
|
|
} |
|
|
|
updateNotifyStatusNew(inData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.closeModalFlag=false |
|
|
|
this.searchTable() |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
openNotify(row){ |
|
|
|
this.$confirm('确认打开?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
let inData={ |
|
|
|
site:row.site, |
|
|
|
notifyNo:row.notifyNo, |
|
|
|
status:'ISSUE', |
|
|
|
} |
|
|
|
updateNotifyStatusNew(inData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.searchTable() |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 预览库存匹配情况 |
|
|
|
previewInventory(row) { |
|
|
|
this.currentRow = row // 保存当前行数据 |
|
|
|
this.previewDialogVisible = true |
|
|
|
this.previewLoading = true |
|
|
|
this.previewData = [] |
|
|
|
|
|
|
|
let inData = { |
|
|
|
site: row.site, |
|
|
|
notifyNo: row.notifyNo |
|
|
|
} |
|
|
|
|
|
|
|
checkIssueNotifyInventory(inData).then(({data}) => { |
|
|
|
this.previewLoading = false |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.previewData = data.rows || [] |
|
|
|
console.log('库存预览数据:', this.previewData) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.previewLoading = false |
|
|
|
this.$message.error('获取库存预览失败') |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 根据订单满足状态设置行样式 |
|
|
|
getRowClassName({row}) { |
|
|
|
if (row.orderSatisfactionStatus === 1) { |
|
|
|
return 'success-row' // 绿色:完全立库满足 |
|
|
|
} else if (row.orderSatisfactionStatus === 2) { |
|
|
|
return 'warning-row' // 黄色:立库+分切区满足 |
|
|
|
} else if (row.orderSatisfactionStatus === 3) { |
|
|
|
return 'danger-row' // 红色:存在不满足 |
|
|
|
} |
|
|
|
return '' |
|
|
|
}, |
|
|
|
|
|
|
|
// 从预览对话框推送至WCS |
|
|
|
pushToWCS() { |
|
|
|
// 筛选绿色和黄色的数据(orderSatisfactionStatus = 1 或 2) |
|
|
|
// const validData = this.previewData.filter(item => |
|
|
|
// item.orderSatisfactionStatus === 1 || item.orderSatisfactionStatus === 2 |
|
|
|
// ) |
|
|
|
//全部推送 后端判断 |
|
|
|
const validData = this.previewData |
|
|
|
|
|
|
|
if (validData.length === 0) { |
|
|
|
this.$message.warning('没有可推送的数据(只推送绿色和黄色状态的数据)') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
this.$confirm(`确认推送 ${validData.length} 条数据至WCS?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
// 显示加载状态 - rqrq |
|
|
|
this.previewLoading = true |
|
|
|
|
|
|
|
const inData = { |
|
|
|
site: this.currentRow.site, |
|
|
|
notifyNo: this.currentRow.notifyNo, |
|
|
|
inventoryList: validData |
|
|
|
} |
|
|
|
|
|
|
|
pushInventoryToWcs(inData).then(({data}) => { |
|
|
|
this.previewLoading = false |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message({ |
|
|
|
message: '推送WCS成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500 |
|
|
|
}) |
|
|
|
this.previewDialogVisible = false |
|
|
|
this.searchTable() |
|
|
|
} else { |
|
|
|
this.$alert(data.msg || '推送失败', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch((error) => { |
|
|
|
this.previewLoading = false |
|
|
|
this.$message.error(error.message || '推送WCS失败,请重试') |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
// 用户取消操作 - rqrq |
|
|
|
console.log('用户取消推送') |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
pushToWcs(row){ |
|
|
|
this.$confirm('确认推送到WCS?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
let inData={ |
|
|
|
site: row.site, |
|
|
|
notifyNo: row.notifyNo |
|
|
|
} |
|
|
|
pushNotifyToWcs(inData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.searchTable() |
|
|
|
this.$message({ |
|
|
|
message: '推送WCS成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 取消下达处理方法 - rqrq |
|
|
|
* @param row 当前行数据 |
|
|
|
*/ |
|
|
|
cancelIssueNotifyHandle(row) { |
|
|
|
// 先判断发起人是否有未下达的shoporder申请单 - rqrq |
|
|
|
let checkData = { |
|
|
|
site: row.site, |
|
|
|
username: row.username |
|
|
|
} |
|
|
|
|
|
|
|
checkUserHasUnissueShopOrder(checkData).then(({ data }) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
// 如果有未下达的申请单 - rqrq |
|
|
|
if (data.row != null) { |
|
|
|
this.$alert('该用户有未下达的申请单,请先处理', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 没有未下达的申请单,执行取消下达 - rqrq |
|
|
|
this.$confirm(`确定取消下达申请单【${row.notifyNo}】吗?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
let cancelData = { |
|
|
|
site: row.site, |
|
|
|
notifyNo: row.notifyNo |
|
|
|
} |
|
|
|
|
|
|
|
cancelIssueNotify(cancelData).then(({ data }) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success('取消下达成功') |
|
|
|
// 重新加载数据 - rqrq |
|
|
|
this.searchTable() |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.$message.error('取消下达失败') |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
// 用户取消操作 - rqrq |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.$message.error('检查用户申请单失败') |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
deleteNotifyMaterial(row){ |
|
|
|
this.$confirm('确认删除?', '提示', { |
|
|
|
@ -2045,29 +1720,6 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
deleteNotifySOSPlus(row){ |
|
|
|
this.$confirm('确认删除?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
deleteNotifySOSPlus(row).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 进入工单物料明细 |
|
|
|
enterSOSDetail(row) { |
|
|
|
let rows = { |
|
|
|
@ -2082,78 +1734,10 @@ export default { |
|
|
|
} |
|
|
|
this.enterSOS(rows) |
|
|
|
}, |
|
|
|
// 打开物料明细对话框 |
|
|
|
enterSOS(row) { |
|
|
|
this.materialModalFlag = true |
|
|
|
this.sobomList = [] |
|
|
|
this.sobomData = { |
|
|
|
orderNo: row.orderNo, |
|
|
|
seqNo: row.seqNo, |
|
|
|
partNo: row.partNo, |
|
|
|
} |
|
|
|
this.bomLoadFlag = true |
|
|
|
let inData = { |
|
|
|
site: this.currentRow.site || this.$store.state.user.site, |
|
|
|
notifyNo: this.currentRow.notifyNo, |
|
|
|
orderNo: row.orderNo, |
|
|
|
releaseNo: row.releaseNo, |
|
|
|
sequenceNo: row.sequenceNo, |
|
|
|
partNo: row.partNo, |
|
|
|
itemNo: row.itemNo, |
|
|
|
} |
|
|
|
getSOSBOMForIssureNew(inData).then(({ data }) => { |
|
|
|
this.bomLoadFlag = false |
|
|
|
if (data.code === 0) { |
|
|
|
this.sobomList = data.rows |
|
|
|
for (let i = 0; i < this.sobomList.length; i++) { |
|
|
|
this.sobomList[i].itemNo = inData.itemNo |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.bomLoadFlag = false |
|
|
|
this.$message.error('获取物料明细失败') |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 全数领料 |
|
|
|
qtyAllForBom(row) { |
|
|
|
row.qtyToIssue = row.qtyRequired |
|
|
|
}, |
|
|
|
// 保存物料明细 |
|
|
|
saveMaterialDetail() { |
|
|
|
for (let i = 0; i < this.sobomList.length; i++) { |
|
|
|
if ( |
|
|
|
this.sobomList[i].qtyToIssue === '' || |
|
|
|
this.sobomList[i].qtyToIssue == null |
|
|
|
) { |
|
|
|
this.sobomList[i].qtyToIssue = 0 |
|
|
|
} |
|
|
|
this.sobomList[i].notifyNo = this.currentRow.notifyNo |
|
|
|
this.sobomList[i].site = this.currentRow.site || this.$store.state.user.site |
|
|
|
} |
|
|
|
|
|
|
|
let materialList = this.sobomList.filter((item) => item.qtyToIssue > 0) |
|
|
|
if (materialList.length == 0) { |
|
|
|
this.$alert('没有需要保存的内容!', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
saveMaterialDetail(materialList).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.materialModalFlag = false |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
this.$message.success('操作成功') |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 处理材料明细行双击事件 |
|
|
|
handleMaterialRowDblClick(row) { |
|
|
|
|
|
|
|
@ -2172,63 +1756,6 @@ export default { |
|
|
|
} |
|
|
|
this.editMaterialModalFlag = true |
|
|
|
}, |
|
|
|
// 保存编辑的材料明细 |
|
|
|
saveEditMaterialDetail() { |
|
|
|
if (this.editMaterialData.qtyToIssue === null || this.editMaterialData.qtyToIssue === '') { |
|
|
|
this.$alert('申请数量不能为空!', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
if (this.editMaterialData.qtyToIssue < 0) { |
|
|
|
this.$alert('申请数量不能小于0!', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
|
|
|
|
// 使用完整的行数据,只更新申请数量 |
|
|
|
let materialData = { |
|
|
|
...this.editMaterialData, |
|
|
|
} |
|
|
|
|
|
|
|
// 确保申请数量不为空 |
|
|
|
if (materialData.qtyToIssue === '' || materialData.qtyToIssue == null) { |
|
|
|
materialData.qtyToIssue = 0 |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
updateMaterialDetail(materialData).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.editMaterialModalFlag = false |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
this.$message.success('保存成功') |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.$message.error('保存失败') |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//导出excel - rqrq |
|
|
|
async createExportData() { |
|
|
|
const queryParams = { |
|
|
|
...this.searchData, |
|
|
|
limit: 999999, // 设置一个很大的数字来获取全部数据 - rqrq |
|
|
|
page: 1 |
|
|
|
} |
|
|
|
const {data} = await searchNotifyHeaderNew(queryParams) |
|
|
|
if (data && data.code === 0) { |
|
|
|
return data.page.list || [] |
|
|
|
} |
|
|
|
return [] |
|
|
|
}, |
|
|
|
startDownload() { |
|
|
|
// this.exportData = this.dataList |
|
|
|
|
|
|
|
@ -2259,17 +1786,6 @@ export default { |
|
|
|
return '' |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 统一构建海安查询入参,强制使用登录用户site避免跨站点串单 - rqrq |
|
|
|
*/ |
|
|
|
haiAnBuildQueryData (row) { |
|
|
|
const baseRow = row || {} |
|
|
|
return { |
|
|
|
...baseRow, |
|
|
|
site: this.$store.state.user.site, |
|
|
|
orderType: 'shoporder' |
|
|
|
} |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 海安标签页签补充追踪列,领料栈板固定放最后一列便于对账 - rqrq |
|
|
|
*/ |
|
|
|
haiAnEnsureLabelColumns () { |
|
|
|
@ -2366,25 +1882,6 @@ export default { |
|
|
|
this.dataList4 = data && data.code === 0 ? (data.rows || []) : [] |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 海安主表查询改为海安接口,固定传登录站点并保留分页语义 - rqrq |
|
|
|
*/ |
|
|
|
searchTable () { |
|
|
|
this.searchData.limit = this.pageSize |
|
|
|
this.searchData.page = this.pageIndex |
|
|
|
this.searchData.site = this.$store.state.user.site |
|
|
|
this.searchData.orderType = 'shipment' |
|
|
|
haiAnSearchNotifyHeaderNew(this.searchData).then(({ data }) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.dataList = data.page.list |
|
|
|
this.pageIndex = data.page.currPage |
|
|
|
this.pageSize = data.page.pageSize |
|
|
|
this.totalPage = data.page.totalCount |
|
|
|
return |
|
|
|
} |
|
|
|
this.dataList = [] |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 海安关闭申请单,保持旧页面的必填关闭原因校验与提示语义 - rqrq |
|
|
|
@ -2902,54 +2399,6 @@ export default { |
|
|
|
this.noOrderAllocSaving = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 海安取消下达流程:先检查未下达冲突,再执行取消并刷新列表 - rqrq |
|
|
|
*/ |
|
|
|
cancelIssueNotifyHandle (row) { |
|
|
|
const checkData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
username: row.username |
|
|
|
} |
|
|
|
haiAnCheckUserHasUnissueShopOrder(checkData).then(({ data }) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
if (data.row != null) { |
|
|
|
this.$alert('该用户有未下达的申请单,请先处理', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
this.$confirm(`确定取消下达申请单【${row.notifyNo}】吗?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
const cancelData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
notifyNo: row.notifyNo |
|
|
|
} |
|
|
|
haiAnCancelIssueNotify(cancelData).then(({ data }) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success('取消下达成功') |
|
|
|
this.searchTable() |
|
|
|
return |
|
|
|
} |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
this.$message.error('取消下达失败') |
|
|
|
}) |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
this.$message.error('检查用户申请单失败') |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 未推送领料单整单删除。确认后把订单、物料、标签明细和指定物料一起删掉 - rqrq |
|
|
|
*/ |
|
|
|
@ -3017,46 +2466,6 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 海安查看页物料弹窗查询,按海安接口回显已保存数量并透传subsite - rqrq |
|
|
|
*/ |
|
|
|
enterSOS (row) { |
|
|
|
this.materialModalFlag = true |
|
|
|
this.sobomList = [] |
|
|
|
this.sobomData = { |
|
|
|
orderNo: row.orderNo, |
|
|
|
seqNo: row.seqNo, |
|
|
|
partNo: row.partNo, |
|
|
|
subSite: row.subSite |
|
|
|
} |
|
|
|
this.bomLoadFlag = true |
|
|
|
const inData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
notifyNo: this.currentRow.notifyNo, |
|
|
|
orderNo: row.orderNo, |
|
|
|
releaseNo: row.releaseNo, |
|
|
|
sequenceNo: row.sequenceNo, |
|
|
|
partNo: row.partNo, |
|
|
|
itemNo: row.itemNo |
|
|
|
} |
|
|
|
haiAnGetSOSBOMForIssureNew(inData).then(({ data }) => { |
|
|
|
this.bomLoadFlag = false |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.sobomList = data.rows || [] |
|
|
|
for (let i = 0; i < this.sobomList.length; i++) { |
|
|
|
this.sobomList[i].itemNo = inData.itemNo |
|
|
|
this.sobomList[i].subSite = row.subSite |
|
|
|
} |
|
|
|
return |
|
|
|
} |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
this.bomLoadFlag = false |
|
|
|
this.$message.error('获取物料明细失败') |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 海安保存材料明细走海安先删后存链路,并透传subsite防止跨子站点串单 - rqrq |
|
|
|
@ -3126,23 +2535,6 @@ export default { |
|
|
|
}).catch(() => { |
|
|
|
this.$message.error('保存失败') |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 海安导出数据改为海安主查询接口,确保导出内容来自海安表链路 - rqrq |
|
|
|
*/ |
|
|
|
async createExportData () { |
|
|
|
const queryParams = { |
|
|
|
...this.searchData, |
|
|
|
site: this.$store.state.user.site, |
|
|
|
orderType: 'shipment', |
|
|
|
limit: 999999, |
|
|
|
page: 1 |
|
|
|
} |
|
|
|
const { data } = await haiAnSearchNotifyHeaderNew(queryParams) |
|
|
|
if (data && data.code === 0) { |
|
|
|
return data.page.list || [] |
|
|
|
} |
|
|
|
return [] |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 销售发料查看页查询参数:固定orderType=shipment,避免与shoporder串单 - rqrq |
|
|
|
|