常熟吴彦祖 4 months ago
parent
commit
d9559ebde1
  1. 2
      src/api/orderIssure/soIssueNotify.js
  2. 9
      src/assets/scss/aiDesign.scss
  3. 2
      src/assets/scss/index.scss
  4. 201
      src/views/modules/orderIssure/searchIssureNotify.vue

2
src/api/orderIssure/soIssueNotify.js

@ -64,6 +64,8 @@ export const updateNotifyStatusNew = data => createAPI(`/orderIssure/newIssure/u
export const searchNotifyLogNew = data => createAPI(`/orderIssure/newIssure/searchNotifyLogNew`,'post',data)
export const searchNotifyLogCloseNew = data => createAPI(`/orderIssure/newIssure/searchNotifyLogCloseNew`,'post',data)
export const pushNotifyToWcs = data => createAPI(`/orderIssure/newIssure/pushNotifyToWcs`,'post',data)
export const checkIssueNotifyInventory = data => createAPI(`/orderIssure/newIssure/checkIssueNotifyInventory`,'post',data)
export const pushInventoryToWcs = data => createAPI(`/orderIssure/newIssure/pushInventoryToWcs`,'post',data)

9
src/assets/scss/aiDesign.scss

@ -0,0 +1,9 @@
/**
* AI设计样式文件 - WMS项目AI新增样式
* 存放AI开发新功能时添加的可复用样式
* 开发流程先检查global.scss没有的话再添加到这里
* Author: AI Assistant
* Date: 2024-12-19
*/
/* AI新增样式将在这里添加 */

2
src/assets/scss/index.scss

@ -2,7 +2,7 @@
@import "variables"; // 站点变量
@import "base";
@import "global";
@import "aiDesign";
// 确保 Element UI 消息组件显示在所有对话框之上
.el-message {
z-index: 3000 !important;

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

@ -100,11 +100,12 @@
<el-table-column
header-align="center"
align="center"
width="120"
width="160"
label="操作">
<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==='CLOSED'" @click="openNotify(scope.row)">开启</a>
<a type="text" size="small" v-if="scope.row.pushWcsFlag!=='Y'" @click="previewInventory(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>
</template>
</el-table-column>
@ -254,8 +255,84 @@
</el-footer>
</el-dialog>
<!-- 库存预览模态框 -->
<el-dialog
title="库存匹配预览"
:visible.sync="previewDialogVisible"
width="80%"
:close-on-click-modal="false">
<el-table
:data="previewData"
border
v-loading="previewLoading"
style="width: 100%;"
height="300"
:row-class-name="getRowClassName">
<el-table-column
prop="rowNo"
label="行号"
width="80"
align="center">
</el-table-column>
<el-table-column
prop="productionOrderNo"
label="生产订单号"
width="140"
align="center">
</el-table-column>
<el-table-column
prop="bomLineNo"
label="BOM行号"
width="100"
align="center">
</el-table-column>
<el-table-column
prop="partNo"
label="物料编码"
width="120"
align="center">
</el-table-column>
<el-table-column
prop="requiredQty"
label="需求数量"
width="100"
align="center">
</el-table-column>
<el-table-column
prop="isWarehouseSatisfied"
label="立库是否满足"
width="120"
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="isOtherWarehouseSatisfied"
label="分切仓库是否满足"
width="140"
align="center">
<template slot-scope="scope">
<span v-if="scope.row.isOtherWarehouseSatisfied" :style="{color: scope.row.isOtherWarehouseSatisfied === 'Y' ? '#67C23A' : '#F56C6C'}">
{{ scope.row.isOtherWarehouseSatisfied === 'Y' ? '是' : '否' }}
</span>
</template>
</el-table-column>
<el-table-column
prop="matchedBarcodes"
label="匹配条码"
min-width="200"
align="left"
show-overflow-tooltip>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button type="primary" class="yzzButtonAn" @click="pushToWCS">推送至WCS</el-button>
<el-button @click="previewDialogVisible = false">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
@ -272,6 +349,8 @@
, searchNotifyLogNew
, searchNotifyLogCloseNew
, pushNotifyToWcs
, checkIssueNotifyInventory
, pushInventoryToWcs
} from "@/api/orderIssure/soIssueNotify.js"
@ -928,6 +1007,11 @@
spec: '',
},
choosePartList: [],
//
previewDialogVisible: false,
previewLoading: false,
previewData: [],
currentRow: {} //
}
},
mounted () {
@ -1098,6 +1182,89 @@
})
})
},
//
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
)
if (validData.length === 0) {
this.$message.warning('没有可推送的数据(只推送绿色和黄色状态的数据)')
return
}
this.$confirm(`确认推送 ${validData.length} 条数据至WCS?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const inData = {
site: this.currentRow.site,
notifyNo: this.currentRow.notifyNo,
inventoryList: validData
}
pushInventoryToWcs(inData).then(({data}) => {
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(() => {
this.$message.error('推送WCS失败')
})
})
},
pushToWcs(row){
this.$confirm('确认推送到WCS?', '提示', {
confirmButtonText: '确定',
@ -1256,4 +1423,32 @@
flex-shrink: 0;
min-width: 30px;
}
/* 库存预览表格行颜色 */
/deep/ .el-table .success-row {
background: #f0f9ff !important;
border-left: 3px solid #67C23A;
}
/deep/ .el-table .warning-row {
background: #fdf6ec !important;
border-left: 3px solid #E6A23C;
}
/deep/ .el-table .danger-row {
background: #fef0f0 !important;
border-left: 3px solid #F56C6C;
}
/deep/ .el-table .success-row:hover > td {
background-color: #ecf5ff !important;
}
/deep/ .el-table .warning-row:hover > td {
background-color: #faecd8 !important;
}
/deep/ .el-table .danger-row:hover > td {
background-color: #fde2e2 !important;
}
</style>
Loading…
Cancel
Save