|
|
@ -48,7 +48,7 @@ |
|
|
style="width: 100px; height: 80px" /></span> |
|
|
style="width: 100px; height: 80px" /></span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column fixed="right" header-align="center" align="center" width="120" label="操作"> |
|
|
|
|
|
|
|
|
<el-table-column fixed="right" header-align="center" align="center" width="250" label="操作"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<!-- <template v-if="!authUpdate"> |
|
|
<!-- <template v-if="!authUpdate"> |
|
|
<el-link |
|
|
<el-link |
|
|
@ -59,6 +59,14 @@ |
|
|
<el-link style="cursor: pointer" |
|
|
<el-link style="cursor: pointer" |
|
|
@click="closeModal(scope.row)">关闭</el-link> |
|
|
@click="closeModal(scope.row)">关闭</el-link> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
<!-- rqrq - 推送WCS按钮,只在状态为ISSUE且未推送完成时显示 --> |
|
|
|
|
|
<el-link v-if="scope.row.status==='ISSUE' && scope.row.pushWcsFlag!=='推送完成'" |
|
|
|
|
|
style="cursor: pointer; margin-left: 10px;" |
|
|
|
|
|
@click="previewInventory(scope.row)">推送WCS</el-link> |
|
|
|
|
|
<!-- rqrq - 取消下达按钮,只在状态为ISSUE且未推送WCS时显示 --> |
|
|
|
|
|
<el-link v-if="scope.row.status==='ISSUE'&&scope.row.pushWcsFlag==='未推送'" |
|
|
|
|
|
style="cursor: pointer; margin-left: 10px;" |
|
|
|
|
|
@click="cancelIssueShipmentHandle(scope.row)">取消下达</el-link> |
|
|
<!-- <template v-if="!authIssue"> |
|
|
<!-- <template v-if="!authIssue"> |
|
|
<el-link v-if="scope.row.orderStatus === '草稿' || scope.row.orderStatus === '编辑中'" style="cursor: pointer" |
|
|
<el-link v-if="scope.row.orderStatus === '草稿' || scope.row.orderStatus === '编辑中'" style="cursor: pointer" |
|
|
@click="issueModal(scope.row)">下达</el-link> |
|
|
@click="issueModal(scope.row)">下达</el-link> |
|
|
@ -496,6 +504,49 @@ |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!-- rqrq - 库存预览弹窗(发货通知单只有绿色和红色) --> |
|
|
|
|
|
<el-dialog |
|
|
|
|
|
title="库存预览" |
|
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
|
v-drag |
|
|
|
|
|
:visible.sync="previewDialogVisible" |
|
|
|
|
|
width="90%"> |
|
|
|
|
|
<div v-loading="previewLoading"> |
|
|
|
|
|
<el-table |
|
|
|
|
|
:data="previewData" |
|
|
|
|
|
height="400" |
|
|
|
|
|
border |
|
|
|
|
|
:row-style="getRowStyle" |
|
|
|
|
|
highlight-current-row |
|
|
|
|
|
style="width: 100%"> |
|
|
|
|
|
<el-table-column prop="partNo" label="物料编号" min-width="80"></el-table-column> |
|
|
|
|
|
<el-table-column prop="requiredQty" label="需求数量" min-width="80" align="right"></el-table-column> |
|
|
|
|
|
<el-table-column prop="productionOrderNo" label="发货单" min-width="100"></el-table-column> |
|
|
|
|
|
<el-table-column prop="bomLineNo" label="行号" min-width="60"></el-table-column> |
|
|
|
|
|
<el-table-column label="是否满足" min-width="80" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span :style="{color: scope.row.isWarehouseSatisfied === 'Y' ? '#67C23A' : '#F56C6C'}"> |
|
|
|
|
|
{{ scope.row.isWarehouseSatisfied === 'Y' ? '满足' : '不满足' }} |
|
|
|
|
|
</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="matchedBarcodes" label="匹配条码" min-width="500" align="left" class-name="wrap-text-column"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div style="white-space: normal; word-break: break-all; line-height: 1.5;"> |
|
|
|
|
|
{{ scope.row.matchedBarcodes }} |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button type="primary" @click="pushToWcs" :disabled="pushLoading"> |
|
|
|
|
|
{{ pushLoading ? '推送中...' : '推送至WCS' }} |
|
|
|
|
|
</el-button> |
|
|
|
|
|
<el-button @click="previewDialogVisible = false" :disabled="pushLoading">关闭</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
@ -508,7 +559,11 @@ import { |
|
|
createNotify, |
|
|
createNotify, |
|
|
getNotifyNoDetail, |
|
|
getNotifyNoDetail, |
|
|
searchNotifyMaterialList, |
|
|
searchNotifyMaterialList, |
|
|
closeInboundNotification |
|
|
|
|
|
|
|
|
closeInboundNotification, |
|
|
|
|
|
checkUserHasUnissueShipment, |
|
|
|
|
|
cancelIssueShipment, |
|
|
|
|
|
checkShipmentInventory, |
|
|
|
|
|
pushShipmentInventoryToWcs |
|
|
} from '@/api/shipment/shipmentIssue.js' |
|
|
} from '@/api/shipment/shipmentIssue.js' |
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
import { getChooselist } from '@/api/chooselist/chooselist.js' |
|
|
import { getChooselist } from '@/api/chooselist/chooselist.js' |
|
|
@ -538,7 +593,7 @@ export default { |
|
|
orderNo: '', |
|
|
orderNo: '', |
|
|
orderType: '', |
|
|
orderType: '', |
|
|
orderStatus: '', |
|
|
orderStatus: '', |
|
|
orderStatusList: ['UNISSUE'], |
|
|
|
|
|
|
|
|
orderStatusList: [], |
|
|
startDate: '', |
|
|
startDate: '', |
|
|
endDate: '', |
|
|
endDate: '', |
|
|
page: 1, |
|
|
page: 1, |
|
|
@ -1421,6 +1476,12 @@ export default { |
|
|
materialModalFlag: false, |
|
|
materialModalFlag: false, |
|
|
sobomData:{}, |
|
|
sobomData:{}, |
|
|
notifyNo:'', |
|
|
notifyNo:'', |
|
|
|
|
|
// rqrq - 库存预览相关变量 |
|
|
|
|
|
previewDialogVisible: false, |
|
|
|
|
|
previewLoading: false, |
|
|
|
|
|
pushLoading: false, |
|
|
|
|
|
previewData: [], |
|
|
|
|
|
currentNotifyRow: null, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -1528,7 +1589,7 @@ export default { |
|
|
site: '', |
|
|
site: '', |
|
|
orderNo: '', |
|
|
orderNo: '', |
|
|
orderType: '', |
|
|
orderType: '', |
|
|
orderStatus: '草稿', |
|
|
|
|
|
|
|
|
orderStatus: '', |
|
|
requiredInboundDate: '', |
|
|
requiredInboundDate: '', |
|
|
supplierId: '', |
|
|
supplierId: '', |
|
|
supplierName: '', |
|
|
supplierName: '', |
|
|
@ -2267,6 +2328,159 @@ export default { |
|
|
this.authClose = !closeFlag |
|
|
this.authClose = !closeFlag |
|
|
this.authIssue = !issueFlag |
|
|
this.authIssue = !issueFlag |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @Description 取消下达处理方法 - rqrq |
|
|
|
|
|
* @param row 当前行数据 |
|
|
|
|
|
*/ |
|
|
|
|
|
cancelIssueShipmentHandle(row) { |
|
|
|
|
|
// 先判断发起人是否有未下达的shipment申请单 - rqrq |
|
|
|
|
|
let checkData = { |
|
|
|
|
|
site: row.site, |
|
|
|
|
|
username: row.username |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
checkUserHasUnissueShipment(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 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
cancelIssueShipment(cancelData).then(({ data }) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.$message.success('取消下达成功') |
|
|
|
|
|
// 重新加载数据 - rqrq |
|
|
|
|
|
this.getDataList() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.$message.error('取消下达失败') |
|
|
|
|
|
}) |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
// 用户取消操作 - rqrq |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.$message.error('检查用户申请单失败') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @Description 预览库存(发货通知单,只考虑立库) - rqrq |
|
|
|
|
|
* @param row 当前申请单行数据 |
|
|
|
|
|
*/ |
|
|
|
|
|
previewInventory(row) { |
|
|
|
|
|
this.currentNotifyRow = row |
|
|
|
|
|
this.previewDialogVisible = true |
|
|
|
|
|
this.previewLoading = true |
|
|
|
|
|
this.previewData = [] |
|
|
|
|
|
|
|
|
|
|
|
let inData = { |
|
|
|
|
|
site: row.site, |
|
|
|
|
|
notifyNo: row.notifyNo |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
checkShipmentInventory(inData).then(({data}) => { |
|
|
|
|
|
this.previewLoading = false |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.previewData = data.rows || [] |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.previewLoading = false |
|
|
|
|
|
this.$message.error('获取库存预览失败') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @Description 推送至WCS(发货通知单) - rqrq |
|
|
|
|
|
*/ |
|
|
|
|
|
pushToWcs() { |
|
|
|
|
|
if (!this.previewData || this.previewData.length === 0) { |
|
|
|
|
|
this.$message.warning('没有可推送的数据') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 检查是否有满足条件的数据(orderSatisfactionStatus === 1,绿色) - rqrq |
|
|
|
|
|
const validData = this.previewData.filter(item => item.orderSatisfactionStatus === 1) |
|
|
|
|
|
if (validData.length === 0) { |
|
|
|
|
|
this.$message.warning('没有满足库存要求的订单,无法推送') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.$confirm('确认推送至WCS?', '提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
this.pushLoading = true |
|
|
|
|
|
|
|
|
|
|
|
let pushData = { |
|
|
|
|
|
site: this.currentNotifyRow.site, |
|
|
|
|
|
notifyNo: this.currentNotifyRow.notifyNo, |
|
|
|
|
|
shipmentInventoryList: this.previewData |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pushShipmentInventoryToWcs(pushData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '推送WCS成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500 |
|
|
|
|
|
}) |
|
|
|
|
|
this.previewDialogVisible = false |
|
|
|
|
|
this.getDataList() // 刷新列表 |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.$message.error('推送WCS失败') |
|
|
|
|
|
}).finally(() => { |
|
|
|
|
|
this.pushLoading = false |
|
|
|
|
|
}) |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
// 用户取消 - rqrq |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @Description 表格行样式(发货通知单:绿色=满足,红色=不满足) - rqrq |
|
|
|
|
|
*/ |
|
|
|
|
|
getRowStyle({ row }) { |
|
|
|
|
|
if (row.orderSatisfactionStatus === 1) { |
|
|
|
|
|
return { backgroundColor: '#67C23A20' } // 绿色背景 |
|
|
|
|
|
} else if (row.orderSatisfactionStatus === 3) { |
|
|
|
|
|
return { backgroundColor: '#F56C6C20' } // 红色背景 |
|
|
|
|
|
} |
|
|
|
|
|
return {} |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
@ -2279,4 +2493,11 @@ export default { |
|
|
height: auto; |
|
|
height: auto; |
|
|
line-height: 1.5; |
|
|
line-height: 1.5; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* rqrq - 匹配条码列自动换行显示 */ |
|
|
|
|
|
/deep/ .wrap-text-column .cell { |
|
|
|
|
|
white-space: normal !important; |
|
|
|
|
|
word-break: break-all !important; |
|
|
|
|
|
line-height: 1.5 !important; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |