|
|
@ -103,12 +103,14 @@ |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
header-align="center" |
|
|
header-align="center" |
|
|
align="center" |
|
|
align="center" |
|
|
width="120" |
|
|
|
|
|
|
|
|
width="180" |
|
|
label="操作"> |
|
|
label="操作"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<a type="text" size="small" v-if="scope.row.status==='ISSUE'" @click="closeNotifyModel(scope.row)">关闭</a> |
|
|
<a type="text" size="small" v-if="scope.row.status==='ISSUE'" @click="closeNotifyModel(scope.row)">关闭</a> |
|
|
<a type="text" size="small" v-if="scope.row.status==='CLOSED'" @click="openNotify(scope.row)">开启</a> |
|
|
<a type="text" size="small" v-if="scope.row.status==='CLOSED'" @click="openNotify(scope.row)">开启</a> |
|
|
<a type="text" size="small" v-if="scope.row.pushWcsFlag!=='推送完成'&&scope.row.status==='ISSUE'" @click="previewInventory(scope.row)" style="margin-left: 10px;">推送WCS</a> |
|
|
<a type="text" size="small" v-if="scope.row.pushWcsFlag!=='推送完成'&&scope.row.status==='ISSUE'" @click="previewInventory(scope.row)" style="margin-left: 10px;">推送WCS</a> |
|
|
|
|
|
<!-- rqrq - 取消下达按钮,只在状态为ISSUE且未推送WCS时显示 --> |
|
|
|
|
|
<a type="text" size="small" v-if="scope.row.status==='ISSUE'&&scope.row.pushWcsFlag==='未推送'" @click="cancelIssueNotifyHandle(scope.row)" style="margin-left: 10px;">取消下达</a> |
|
|
<!-- <a type="text" size="small" v-if="scope.row.pushWcsFlag!=='Y'" @click="pushToWcs(scope.row)" style="margin-left: 10px;">推送WCS</a>--> |
|
|
<!-- <a type="text" size="small" v-if="scope.row.pushWcsFlag!=='Y'" @click="pushToWcs(scope.row)" style="margin-left: 10px;">推送WCS</a>--> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
@ -369,6 +371,8 @@ |
|
|
, pushNotifyToWcs |
|
|
, pushNotifyToWcs |
|
|
, checkIssueNotifyInventory |
|
|
, checkIssueNotifyInventory |
|
|
, pushInventoryToWcs |
|
|
, pushInventoryToWcs |
|
|
|
|
|
, checkUserHasUnissueShopOrder |
|
|
|
|
|
, cancelIssueNotify |
|
|
|
|
|
|
|
|
} from "@/api/orderIssure/soIssueNotify.js" |
|
|
} from "@/api/orderIssure/soIssueNotify.js" |
|
|
|
|
|
|
|
|
@ -1328,6 +1332,65 @@ |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @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){ |
|
|
deleteNotifyMaterial(row){ |
|
|
this.$confirm('确认删除?', '提示', { |
|
|
this.$confirm('确认删除?', '提示', { |
|
|
confirmButtonText: '确定', |
|
|
confirmButtonText: '确定', |
|
|
|