Browse Source

领料申请单取消下达

master
常熟吴彦祖 2 months ago
parent
commit
b472c53f8d
  1. 8
      src/api/orderIssure/soIssueNotify.js
  2. 65
      src/views/modules/orderIssure/searchIssureNotify.vue

8
src/api/orderIssure/soIssueNotify.js

@ -67,5 +67,13 @@ export const pushNotifyToWcs = data => createAPI(`/orderIssure/newIssure/pushNot
export const checkIssueNotifyInventory = data => createAPI(`/orderIssure/newIssure/checkIssueNotifyInventory`,'post',data) export const checkIssueNotifyInventory = data => createAPI(`/orderIssure/newIssure/checkIssueNotifyInventory`,'post',data)
export const pushInventoryToWcs = data => createAPI(`/orderIssure/newIssure/pushInventoryToWcs`,'post',data) export const pushInventoryToWcs = data => createAPI(`/orderIssure/newIssure/pushInventoryToWcs`,'post',data)
// ================== rqrq - 取消下达功能接口 ==================
// 检查用户是否有未下达的shoporder申请单 - rqrq
export const checkUserHasUnissueShopOrder = data => createAPI(`/orderIssure/issureNotify/checkUserHasUnissueShopOrder`,'post',data)
// 取消下达申请单 - rqrq
export const cancelIssueNotify = data => createAPI(`/orderIssure/issureNotify/cancelIssueNotify`,'post',data)

65
src/views/modules/orderIssure/searchIssureNotify.vue

@ -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: '确定',

Loading…
Cancel
Save