diff --git a/src/views/modules/orderIssure/searchIssureNotify.vue b/src/views/modules/orderIssure/searchIssureNotify.vue
index 448fd14..e466d09 100644
--- a/src/views/modules/orderIssure/searchIssureNotify.vue
+++ b/src/views/modules/orderIssure/searchIssureNotify.vue
@@ -105,8 +105,8 @@
关闭
开启
- 预览
- 推送WCS
+ 推送WCS
+
@@ -154,6 +154,19 @@
style="width: 100px; height: 80px"/>
+
+
+
+
+ {{ scope.row.pushWmsFlag === 'Y' ? '是' : '否' }}
+
+
+
@@ -329,8 +342,10 @@
@@ -1011,7 +1026,6 @@
previewDialogVisible: false,
previewLoading: false,
previewData: [],
- currentRow: {} // 当前查看的申请单行数据
}
},
mounted () {
@@ -1225,9 +1239,11 @@
// 从预览对话框推送至WCS
pushToWCS() {
// 筛选绿色和黄色的数据(orderSatisfactionStatus = 1 或 2)
- const validData = this.previewData.filter(item =>
- item.orderSatisfactionStatus === 1 || item.orderSatisfactionStatus === 2
- )
+ // const validData = this.previewData.filter(item =>
+ // item.orderSatisfactionStatus === 1 || item.orderSatisfactionStatus === 2
+ // )
+ //全部推送 后端判断
+ const validData = this.previewData
if (validData.length === 0) {
this.$message.warning('没有可推送的数据(只推送绿色和黄色状态的数据)')
@@ -1239,6 +1255,9 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
+ // 显示加载状态 - rqrq
+ this.previewLoading = true
+
const inData = {
site: this.currentRow.site,
notifyNo: this.currentRow.notifyNo,
@@ -1246,6 +1265,7 @@
}
pushInventoryToWcs(inData).then(({data}) => {
+ this.previewLoading = false
if (data && data.code === 0) {
this.$message({
message: '推送WCS成功',
@@ -1255,13 +1275,17 @@
this.previewDialogVisible = false
this.searchTable()
} else {
- this.$alert(data.msg, '错误', {
+ this.$alert(data.msg || '推送失败', '错误', {
confirmButtonText: '确定'
})
}
- }).catch(() => {
- this.$message.error('推送WCS失败')
+ }).catch((error) => {
+ this.previewLoading = false
+ this.$message.error(error.message || '推送WCS失败,请重试')
})
+ }).catch(() => {
+ // 用户取消操作 - rqrq
+ console.log('用户取消推送')
})
},